Skip to content

Commit

Permalink
Add comment document to fontFamily in the IconData (flutter#154150)
Browse files Browse the repository at this point in the history
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](flutter#154144)
It was marked as closed so I created a new issues for proposal:
Fixes flutter#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].*
  • Loading branch information
SuicaLondon authored Aug 28, 2024
1 parent 3379460 commit ee0fdae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/flutter/lib/src/widgets/icon_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit ee0fdae

Please sign in to comment.