[google_fonts] Make a map keyed on FontWeight non-const (#10058)
A proposed engine PR will allow construction of arbitrary FontWeight instances and thus needs to overload the FontWeight equality operator (see https://github.com/flutter/flutter/pull/175771)
With that change it will no longer be possible to use FontWeight as the key in a const map.
diff --git a/packages/google_fonts/CHANGELOG.md b/packages/google_fonts/CHANGELOG.md
index cc9cff8..b49a261 100644
--- a/packages/google_fonts/CHANGELOG.md
+++ b/packages/google_fonts/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 6.3.2
+
+- Makes a map keyed on FontWeight non-const for compatibility with proposed changes to the engine's implementation of FontWeight.
+
## 6.3.1
- Transfers the package source from
diff --git a/packages/google_fonts/lib/src/google_fonts_variant.dart b/packages/google_fonts/lib/src/google_fonts_variant.dart
index 4d2f624..347887f 100644
--- a/packages/google_fonts/lib/src/google_fonts_variant.dart
+++ b/packages/google_fonts/lib/src/google_fonts_variant.dart
@@ -171,7 +171,7 @@
/// Mapping from font weight types to the 'weight' part of the Google Fonts API
/// specific filename.
-const Map<FontWeight, String> _fontWeightToFilenameWeightParts =
+final Map<FontWeight, String> _fontWeightToFilenameWeightParts =
<FontWeight, String>{
FontWeight.w100: 'Thin',
FontWeight.w200: 'ExtraLight',
diff --git a/packages/google_fonts/pubspec.yaml b/packages/google_fonts/pubspec.yaml
index bbe2346..3a81ffc 100644
--- a/packages/google_fonts/pubspec.yaml
+++ b/packages/google_fonts/pubspec.yaml
@@ -2,7 +2,7 @@
description: A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.
repository: https://github.com/flutter/packages/tree/main/packages/google_fonts
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_fonts%22
-version: 6.3.1
+version: 6.3.2
environment:
sdk: ^3.7.0