1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Adds analysis options to Veggie Seasons (#98)

This commit is contained in:
Andrew Brogdon
2019-07-01 10:26:50 -07:00
committed by GitHub
parent 2ec8cc3684
commit 4646f0fc8e
13 changed files with 65 additions and 42 deletions

View File

@@ -23,7 +23,7 @@ class ServingInfoChart extends StatelessWidget {
// value of this vitamin" data adjusted for the user's preferred calorie
// target.
Widget _buildVitaminText(int standardPercentage, Future<int> targetCalories) {
return FutureBuilder(
return FutureBuilder<int>(
future: targetCalories,
builder: (context, snapshot) {
final target = snapshot?.data ?? 2000;
@@ -172,7 +172,7 @@ class InfoView extends StatelessWidget {
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
FutureBuilder(
FutureBuilder<Set<VeggieCategory>>(
future: prefs.preferredCategories,
builder: (context, snapshot) {
return Text(
@@ -284,7 +284,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
Expanded(
child: ListView(
children: [
CupertinoSegmentedControl(
CupertinoSegmentedControl<int>(
children: {
0: Text('Facts & Info'),
1: Text('Trivia'),