Mark `IconData` `final` and `@mustBeConst`
diff --git a/packages/flutter/lib/foundation.dart b/packages/flutter/lib/foundation.dart index 5f774a2..df87090 100644 --- a/packages/flutter/lib/foundation.dart +++ b/packages/flutter/lib/foundation.dart
@@ -14,6 +14,8 @@ factory, immutable, internal, + // ignore: experimental_member_use + mustBeConst, mustCallSuper, nonVirtual, optionalTypeArgs,
diff --git a/packages/flutter/lib/src/widgets/icon_data.dart b/packages/flutter/lib/src/widgets/icon_data.dart index 07b9892..341d4f9 100644 --- a/packages/flutter/lib/src/widgets/icon_data.dart +++ b/packages/flutter/lib/src/widgets/icon_data.dart
@@ -20,7 +20,7 @@ /// the code points (or instances of [IconData]) which are not referenced from /// Dart app code. See the [staticIconProvider] annotation for more details. @immutable -class IconData { +final class IconData { /// Creates icon data. /// /// Rarely used directly. Instead, consider using one of the predefined icons @@ -45,9 +45,12 @@ /// need to be explicitly opted out at build time). See [staticIconProvider] /// for more context. const IconData( - this.codePoint, { - this.fontFamily, - this.fontPackage, + // ignore: experimental_member_use + @mustBeConst this.codePoint, { + // ignore: experimental_member_use + @mustBeConst this.fontFamily, + // ignore: experimental_member_use + @mustBeConst this.fontPackage, this.matchTextDirection = false, this.fontFamilyFallback, });