@@ -251,26 +251,17 @@ class AppBloc extends Bloc<AppEvent, AppState> {
251
251
}
252
252
}
253
253
254
- String ? _mapFontFamily (String fontFamily) {
255
- // Assuming 'SystemDefault' means use the theme's default font
256
- if (fontFamily == 'SystemDefault' ) return null ;
257
-
258
- // Map specific font family names to GoogleFonts
259
- switch (fontFamily) {
260
- case 'Roboto' :
261
- return GoogleFonts .roboto ().fontFamily;
262
- case 'OpenSans' :
263
- return GoogleFonts .openSans ().fontFamily;
264
- case 'Lato' :
265
- return GoogleFonts .lato ().fontFamily;
266
- case 'Montserrat' :
267
- return GoogleFonts .montserrat ().fontFamily;
268
- case 'Merriweather' :
269
- return GoogleFonts .merriweather ().fontFamily;
270
- default :
271
- // If an unknown font family is specified, fall back to theme default
272
- return null ;
254
+ String ? _mapFontFamily (String fontFamilyString) {
255
+ // If the input is 'SystemDefault', return null so FlexColorScheme uses its default.
256
+ if (fontFamilyString == 'SystemDefault' ) {
257
+ print ('[AppBloc] _mapFontFamily: Input is SystemDefault, returning null.' );
258
+ return null ;
273
259
}
260
+ // Otherwise, return the font family string directly.
261
+ // The GoogleFonts.xyz().fontFamily getters often return strings like "Roboto-Regular",
262
+ // but FlexColorScheme's fontFamily parameter or GoogleFonts.xyzTextTheme() expect simple names.
263
+ print ('[AppBloc] _mapFontFamily: Input is $fontFamilyString , returning as is.' );
264
+ return fontFamilyString;
274
265
}
275
266
276
267
// Map AppTextScaleFactor to AppTextScaleFactor (no change needed)
0 commit comments