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:
SuicaLondon 2024-08-28 09:38:06 +01:00 committed by GitHub
parent 3379460596
commit ee0fdae631
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.
///