mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 23:08:59 +00:00
[VeggieSeasons] Fix dark mode problems (#395)
This commit is contained in:
committed by
GitHub
parent
28742ddeaf
commit
d9c9b3a519
@@ -17,13 +17,13 @@ class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final model = ScopedModel.of<Preferences>(context, rebuildOnChange: true);
|
||||
final currentPrefs = model.preferredCategories;
|
||||
|
||||
Brightness brightness = CupertinoTheme.brightnessOf(context);
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: Text('Preferred Categories'),
|
||||
previousPageTitle: 'Settings',
|
||||
),
|
||||
backgroundColor: Styles.scaffoldBackground,
|
||||
backgroundColor: Styles.scaffoldBackground(brightness),
|
||||
child: FutureBuilder<Set<VeggieCategory>>(
|
||||
future: currentPrefs,
|
||||
builder: (context, snapshot) {
|
||||
@@ -80,12 +80,12 @@ class CalorieSettingsScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final model = ScopedModel.of<Preferences>(context, rebuildOnChange: true);
|
||||
|
||||
Brightness brightness = CupertinoTheme.brightnessOf(context);
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
previousPageTitle: 'Settings',
|
||||
),
|
||||
backgroundColor: Styles.scaffoldBackground,
|
||||
backgroundColor: Styles.scaffoldBackground(brightness),
|
||||
child: ListView(
|
||||
children: [
|
||||
FutureBuilder<int>(
|
||||
@@ -138,7 +138,10 @@ class SettingsScreen extends StatelessWidget {
|
||||
builder: (context, snapshot) {
|
||||
return Row(
|
||||
children: [
|
||||
Text(snapshot.data?.toString() ?? ''),
|
||||
Text(
|
||||
snapshot.data?.toString() ?? '',
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
SettingsNavigationIndicator(),
|
||||
],
|
||||
@@ -182,7 +185,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
|
||||
return CupertinoPageScaffold(
|
||||
child: Container(
|
||||
color: Styles.scaffoldBackground,
|
||||
color: Styles.scaffoldBackground(CupertinoTheme.brightnessOf(context)),
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
CupertinoSliverNavigationBar(
|
||||
|
||||
Reference in New Issue
Block a user