mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Samples maintenance (#435)
This commit is contained in:
@@ -20,7 +20,7 @@ class ListScreen extends StatelessWidget {
|
||||
child: FutureBuilder<Set<VeggieCategory>>(
|
||||
future: prefs.preferredCategories,
|
||||
builder: (context, snapshot) {
|
||||
final data = snapshot.data ?? Set<VeggieCategory>();
|
||||
final data = snapshot.data ?? <VeggieCategory>{};
|
||||
return VeggieCard(veggie, inSeason, data.contains(veggie.category));
|
||||
}),
|
||||
);
|
||||
@@ -30,13 +30,13 @@ class ListScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return CupertinoTabView(
|
||||
builder: (context) {
|
||||
String dateString = DateFormat("MMMM y").format(DateTime.now());
|
||||
var dateString = DateFormat('MMMM y').format(DateTime.now());
|
||||
|
||||
final appState =
|
||||
ScopedModel.of<AppState>(context, rebuildOnChange: true);
|
||||
final prefs =
|
||||
ScopedModel.of<Preferences>(context, rebuildOnChange: true);
|
||||
final CupertinoThemeData themeData = CupertinoTheme.of(context);
|
||||
final themeData = CupertinoTheme.of(context);
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: ListView.builder(
|
||||
@@ -66,7 +66,7 @@ class ListScreen extends StatelessWidget {
|
||||
style: Styles.headlineText(themeData)),
|
||||
);
|
||||
} else {
|
||||
int relativeIndex =
|
||||
var relativeIndex =
|
||||
index - (appState.availableVeggies.length + 2);
|
||||
return _generateVeggieRow(
|
||||
appState.unavailableVeggies[relativeIndex], prefs,
|
||||
|
||||
Reference in New Issue
Block a user