@@ -36,6 +36,7 @@ TextTheme _customizeTextTheme(
36
36
required AppTextScaleFactor appTextScaleFactor,
37
37
required AppFontWeight appFontWeight, // Added parameter
38
38
}) {
39
+ print ('[_customizeTextTheme] Received appFontWeight: $appFontWeight , appTextScaleFactor: $appTextScaleFactor ' );
39
40
// Define font size factors
40
41
double factor;
41
42
switch (appTextScaleFactor) {
@@ -66,6 +67,7 @@ TextTheme _customizeTextTheme(
66
67
selectedFontWeight = FontWeight .w700;
67
68
break ;
68
69
}
70
+ print ('[_customizeTextTheme] Mapped to selectedFontWeight: $selectedFontWeight ' );
69
71
70
72
return baseTextTheme.copyWith (
71
73
// --- Headline/Title Styles ---
@@ -118,25 +120,32 @@ TextTheme _customizeTextTheme(
118
120
// based on the provided font family name.
119
121
// Corrected return type to match GoogleFonts functions (positional optional)
120
122
TextTheme Function ([TextTheme ? ]) _getGoogleFontTextTheme (String ? fontFamily) {
123
+ print ('[_getGoogleFontTextTheme] Received fontFamily: $fontFamily ' );
121
124
// Map font family names (as used in AppBloc mapping) to GoogleFonts functions
122
125
if (fontFamily == GoogleFonts .roboto ().fontFamily) {
126
+ print ('[_getGoogleFontTextTheme] Returning GoogleFonts.robotoTextTheme' );
123
127
return GoogleFonts .robotoTextTheme;
124
128
}
125
129
if (fontFamily == GoogleFonts .openSans ().fontFamily) {
130
+ print ('[_getGoogleFontTextTheme] Returning GoogleFonts.openSansTextTheme' );
126
131
return GoogleFonts .openSansTextTheme;
127
132
}
128
133
if (fontFamily == GoogleFonts .lato ().fontFamily) {
134
+ print ('[_getGoogleFontTextTheme] Returning GoogleFonts.latoTextTheme' );
129
135
return GoogleFonts .latoTextTheme;
130
136
}
131
137
if (fontFamily == GoogleFonts .montserrat ().fontFamily) {
138
+ print ('[_getGoogleFontTextTheme] Returning GoogleFonts.montserratTextTheme' );
132
139
return GoogleFonts .montserratTextTheme;
133
140
}
134
141
if (fontFamily == GoogleFonts .merriweather ().fontFamily) {
142
+ print ('[_getGoogleFontTextTheme] Returning GoogleFonts.merriweatherTextTheme' );
135
143
return GoogleFonts .merriweatherTextTheme;
136
144
}
137
145
// Add mappings for other AppFontType values if needed
138
146
139
147
// Default fallback if fontFamily is null or not recognized
148
+ print ('[_getGoogleFontTextTheme] Defaulting to GoogleFonts.notoSansTextTheme' );
140
149
return GoogleFonts .notoSansTextTheme;
141
150
}
142
151
@@ -149,6 +158,7 @@ ThemeData lightTheme({
149
158
required AppFontWeight appFontWeight, // Added parameter
150
159
String ? fontFamily,
151
160
}) {
161
+ print ('[AppTheme.lightTheme] Received scheme: $scheme , appTextScaleFactor: $appTextScaleFactor , appFontWeight: $appFontWeight , fontFamily: $fontFamily ' );
152
162
final textThemeGetter = _getGoogleFontTextTheme (fontFamily);
153
163
final baseTextTheme = textThemeGetter ();
154
164
@@ -173,6 +183,7 @@ ThemeData darkTheme({
173
183
required AppFontWeight appFontWeight, // Added parameter
174
184
String ? fontFamily,
175
185
}) {
186
+ print ('[AppTheme.darkTheme] Received scheme: $scheme , appTextScaleFactor: $appTextScaleFactor , appFontWeight: $appFontWeight , fontFamily: $fontFamily ' );
176
187
final textThemeGetter = _getGoogleFontTextTheme (fontFamily);
177
188
final baseTextTheme = textThemeGetter (
178
189
ThemeData (brightness: Brightness .dark).textTheme,
0 commit comments