|
|
@ -1,4 +1,4 @@ |
|
|
|
import 'package:flutter/widgets.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:intersperse/intersperse.dart'; |
|
|
|
import 'package:intersperse/intersperse.dart'; |
|
|
|
import 'package:meta/meta.dart'; |
|
|
|
import 'package:meta/meta.dart'; |
|
|
|
import 'package:neon/src/settings/widgets/settings_tile.dart'; |
|
|
|
import 'package:neon/src/settings/widgets/settings_tile.dart'; |
|
|
@ -15,19 +15,27 @@ class SettingsCategory extends StatelessWidget { |
|
|
|
final List<SettingsTile> tiles; |
|
|
|
final List<SettingsTile> tiles; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(final BuildContext context) => Column( |
|
|
|
Widget build(final BuildContext context) { |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
final textTheme = Theme.of(context).textTheme; |
|
|
|
children: [ |
|
|
|
|
|
|
|
if (title != null) ...[ |
|
|
|
return Column( |
|
|
|
title!, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
], |
|
|
|
children: [ |
|
|
|
...tiles, |
|
|
|
if (title != null) |
|
|
|
] |
|
|
|
DefaultTextStyle( |
|
|
|
.intersperse( |
|
|
|
style: textTheme.titleMedium!.copyWith( |
|
|
|
const SizedBox( |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
height: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
child: title!, |
|
|
|
) |
|
|
|
), |
|
|
|
.toList(), |
|
|
|
...tiles, |
|
|
|
); |
|
|
|
] |
|
|
|
|
|
|
|
.intersperse( |
|
|
|
|
|
|
|
const SizedBox( |
|
|
|
|
|
|
|
height: 10, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
.toList(), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|