Change section heading
This commit is contained in:
parent
b704502c7d
commit
73a079bfca
|
@ -60,12 +60,7 @@ class _AppearanceConfig extends StatelessWidget {
|
||||||
body: Observer(
|
body: Observer(
|
||||||
builder: (ctx) => ListView(
|
builder: (ctx) => ListView(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
_SectionHeading('Theme'),
|
||||||
child: Text(
|
|
||||||
'Theme',
|
|
||||||
style: theme.textTheme.headline6,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
for (final theme in ThemeMode.values)
|
for (final theme in ThemeMode.values)
|
||||||
RadioListTile<ThemeMode>(
|
RadioListTile<ThemeMode>(
|
||||||
value: theme,
|
value: theme,
|
||||||
|
@ -103,24 +98,21 @@ class _AccountsConfig extends StatelessWidget {
|
||||||
return ListView(
|
return ListView(
|
||||||
children: [
|
children: [
|
||||||
for (var entry in accountsStore.users.entries) ...[
|
for (var entry in accountsStore.users.entries) ...[
|
||||||
Center(
|
_SectionHeading(entry.key),
|
||||||
child: Text(
|
|
||||||
entry.key,
|
|
||||||
style: theme.textTheme.subtitle2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
for (var username in entry.value.keys) ...[
|
for (var username in entry.value.keys) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing:
|
trailing:
|
||||||
username == accountsStore.defaultUserFor(entry.key).name
|
username == accountsStore.defaultUserFor(entry.key).name
|
||||||
? Icon(Icons.check_circle_outline)
|
? Icon(
|
||||||
|
Icons.check_circle_outline,
|
||||||
|
color: theme.accentColor,
|
||||||
|
)
|
||||||
: null,
|
: null,
|
||||||
selected: username ==
|
|
||||||
accountsStore.defaultUserFor(entry.key).name,
|
|
||||||
title: Text(username),
|
title: Text(username),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
accountsStore.setDefaultAccountFor(entry.key, username);
|
accountsStore.setDefaultAccountFor(entry.key, username);
|
||||||
},
|
},
|
||||||
|
|
||||||
onTap: () {}, // TODO: go to managing account
|
onTap: () {}, // TODO: go to managing account
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -133,3 +125,19 @@ class _AccountsConfig extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _SectionHeading extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
|
||||||
|
const _SectionHeading(this.text);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
return Padding(
|
||||||
|
child: Text(text.toUpperCase(),
|
||||||
|
style: theme.textTheme.subtitle2.copyWith(color: theme.accentColor)),
|
||||||
|
padding: EdgeInsets.only(left: 20, top: 40),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue