@@ -159,29 +159,25 @@ class _SettingsView extends StatelessWidget {
159
159
children: [
160
160
ExpansionTile (
161
161
title: Text (l10n.themeSettingsLabel),
162
- childrenPadding:
163
- const EdgeInsets .symmetric (
164
- horizontal: AppSpacing .xxl,
165
- ),
162
+ childrenPadding: const EdgeInsets .symmetric (
163
+ horizontal: AppSpacing .xxl,
164
+ ),
166
165
children: [
167
166
_buildSettingSection (
168
167
context,
169
168
title: l10n.baseThemeLabel,
170
- description:
171
- l10n.baseThemeDescription,
169
+ description: l10n.baseThemeDescription,
172
170
child: DropdownButton <AppBaseTheme >(
173
171
value: userAppSettings
174
172
.displaySettings
175
173
.baseTheme,
176
174
onChanged: (value) {
177
175
if (value != null ) {
178
- context
179
- .read <SettingsBloc >()
180
- .add (
181
- SettingsBaseThemeChanged (
182
- value,
183
- ),
184
- );
176
+ context.read <SettingsBloc >().add (
177
+ SettingsBaseThemeChanged (
178
+ value,
179
+ ),
180
+ );
185
181
}
186
182
},
187
183
items: AppBaseTheme .values
@@ -197,7 +193,7 @@ class _SettingsView extends StatelessWidget {
197
193
),
198
194
)
199
195
.toList (),
200
- isExpanded: true ,
196
+ // Removed isExpanded: true
201
197
),
202
198
),
203
199
const SizedBox (height: AppSpacing .lg),
@@ -232,36 +228,32 @@ class _SettingsView extends StatelessWidget {
232
228
),
233
229
)
234
230
.toList (),
235
- isExpanded: true ,
231
+ // Removed isExpanded: true
236
232
),
237
233
),
238
234
],
239
235
),
240
236
ExpansionTile (
241
237
title: Text (l10n.fontSettingsLabel),
242
- childrenPadding:
243
- const EdgeInsets .symmetric (
244
- horizontal: AppSpacing .xxl,
245
- ),
238
+ childrenPadding: const EdgeInsets .symmetric (
239
+ horizontal: AppSpacing .xxl,
240
+ ),
246
241
children: [
247
242
_buildSettingSection (
248
243
context,
249
244
title: l10n.fontFamilyLabel,
250
- description:
251
- l10n.fontFamilyDescription,
245
+ description: l10n.fontFamilyDescription,
252
246
child: DropdownButton <String >(
253
247
value: userAppSettings
254
248
.displaySettings
255
249
.fontFamily,
256
250
onChanged: (value) {
257
251
if (value != null ) {
258
- context
259
- .read <SettingsBloc >()
260
- .add (
261
- SettingsFontFamilyChanged (
262
- value,
263
- ),
264
- );
252
+ context.read <SettingsBloc >().add (
253
+ SettingsFontFamilyChanged (
254
+ value,
255
+ ),
256
+ );
265
257
}
266
258
},
267
259
items: _supportedFontFamilies
@@ -277,7 +269,7 @@ class _SettingsView extends StatelessWidget {
277
269
),
278
270
)
279
271
.toList (),
280
- isExpanded: true ,
272
+ // Removed isExpanded: true
281
273
),
282
274
),
283
275
const SizedBox (height: AppSpacing .lg),
@@ -312,28 +304,25 @@ class _SettingsView extends StatelessWidget {
312
304
),
313
305
)
314
306
.toList (),
315
- isExpanded: true ,
307
+ // Removed isExpanded: true
316
308
),
317
309
),
318
310
const SizedBox (height: AppSpacing .lg),
319
311
_buildSettingSection (
320
312
context,
321
313
title: l10n.fontWeightLabel,
322
- description:
323
- l10n.fontWeightDescription,
314
+ description: l10n.fontWeightDescription,
324
315
child: DropdownButton <AppFontWeight >(
325
316
value: userAppSettings
326
317
.displaySettings
327
318
.fontWeight,
328
319
onChanged: (value) {
329
320
if (value != null ) {
330
- context
331
- .read <SettingsBloc >()
332
- .add (
333
- SettingsFontWeightChanged (
334
- value,
335
- ),
336
- );
321
+ context.read <SettingsBloc >().add (
322
+ SettingsFontWeightChanged (
323
+ value,
324
+ ),
325
+ );
337
326
}
338
327
},
339
328
items: AppFontWeight .values
@@ -349,7 +338,7 @@ class _SettingsView extends StatelessWidget {
349
338
),
350
339
)
351
340
.toList (),
352
- isExpanded: true ,
341
+ // Removed isExpanded: true
353
342
),
354
343
),
355
344
],
@@ -384,9 +373,8 @@ class _SettingsView extends StatelessWidget {
384
373
_getLanguageName (lang, l10n),
385
374
),
386
375
),
387
- )
388
- .toList (),
389
- isExpanded: true ,
376
+ ).toList (),
377
+ // Removed isExpanded: true
390
378
),
391
379
),
392
380
],
@@ -411,25 +399,30 @@ class _SettingsView extends StatelessWidget {
411
399
required String description,
412
400
required Widget child,
413
401
}) {
414
- return Column (
402
+ return Row (
415
403
crossAxisAlignment: CrossAxisAlignment .start,
404
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
416
405
children: [
417
- Text (
418
- title,
419
- style: Theme .of (context).textTheme.titleMedium,
420
- ),
421
- const SizedBox (height: AppSpacing .xs),
422
- Text (
423
- description,
424
- style: Theme .of (context).textTheme.bodySmall? .copyWith (
425
- color: Theme .of (context).colorScheme.onSurfaceVariant,
406
+ Expanded (
407
+ child: Column (
408
+ crossAxisAlignment: CrossAxisAlignment .start,
409
+ children: [
410
+ Text (
411
+ title,
412
+ style: Theme .of (context).textTheme.titleMedium,
413
+ ),
414
+ const SizedBox (height: AppSpacing .xs),
415
+ Text (
416
+ description,
417
+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
418
+ color: Theme .of (context).colorScheme.onSurfaceVariant,
419
+ ),
420
+ ),
421
+ ],
426
422
),
427
423
),
428
- const SizedBox (height: AppSpacing .sm),
429
- Align (
430
- alignment: Alignment .centerLeft,
431
- child: child,
432
- ),
424
+ const SizedBox (width: AppSpacing .lg), // Add some spacing between text and dropdown
425
+ child,
433
426
],
434
427
);
435
428
}
0 commit comments