mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add comment document to fontFamily in the IconData (#154150)
Iâve added a comment document for the `fontFamily` property of `IconData`. The purpose of this is to provide developers with a hint when importing a custom icon. It only includes the change made in the comment. The original issue was: [154144](https://github.com/flutter/flutter/issues/154144) It was marked as closed so I created a new issues for proposal: Fixes #154149 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This commit is contained in:
parent
3379460596
commit
ee0fdae631
@ -26,6 +26,17 @@ class IconData {
|
||||
/// Rarely used directly. Instead, consider using one of the predefined icons
|
||||
/// like the [Icons] collection.
|
||||
///
|
||||
/// The [fontFamily] argument is normally required when using custom icons.
|
||||
///
|
||||
/// e.g. When using a [codePoint] from a `CustomIcons` font
|
||||
/// ```yaml
|
||||
/// fonts:
|
||||
/// - family: CustomIcons
|
||||
/// fonts:
|
||||
/// - asset: assets/fonts/CustomIcons.ttf
|
||||
/// ```
|
||||
/// `IconData` usages should specify `fontFamily: 'CustomIcons'`.
|
||||
///
|
||||
/// The [fontPackage] argument must be non-null when using a font family that
|
||||
/// is included in a package. This is used when selecting the font.
|
||||
///
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user