mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Upgrading samples to flutter_lints, part 1 of n (#804)
This commit is contained in:
@@ -13,13 +13,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/apple.jpg',
|
||||
category: VeggieCategory.fruit,
|
||||
shortDescription: 'Green or red, they\'re generally round and tasty.',
|
||||
accentColor: Color(0x40de8c66),
|
||||
accentColor: const Color(0x40de8c66),
|
||||
seasons: [Season.winter, Season.spring, Season.summer, Season.autumn],
|
||||
vitaminAPercentage: 2,
|
||||
vitaminCPercentage: 8,
|
||||
servingSize: 'One large apple',
|
||||
caloriesPerServing: 130,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'A peck of apples (that\'s a real unit of mesaurement!) weighs approximately how many pounds?',
|
||||
[
|
||||
@@ -91,13 +91,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/artichoke.jpg',
|
||||
category: VeggieCategory.flower,
|
||||
shortDescription: 'The armadillo of vegetables.',
|
||||
accentColor: Color(0x408ea26d),
|
||||
accentColor: const Color(0x408ea26d),
|
||||
seasons: [Season.spring, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 25,
|
||||
servingSize: '1 medium artichoke',
|
||||
caloriesPerServing: 60,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Artichokes are which part of the plant?',
|
||||
[
|
||||
@@ -142,13 +142,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/asparagus.jpg',
|
||||
category: VeggieCategory.fern,
|
||||
shortDescription: 'It\'s been used a food and medicine for millenia.',
|
||||
accentColor: Color(0x408cb437),
|
||||
accentColor: const Color(0x408cb437),
|
||||
seasons: [Season.spring],
|
||||
vitaminAPercentage: 10,
|
||||
vitaminCPercentage: 15,
|
||||
servingSize: '5 spears',
|
||||
caloriesPerServing: 20,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'The nodules at the tip of an asparagus spear are actually which part of the plant?',
|
||||
[
|
||||
@@ -193,13 +193,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/avocado.jpg',
|
||||
category: VeggieCategory.stealthFruit,
|
||||
shortDescription: 'One of the oiliest, richest fruits money can buy.',
|
||||
accentColor: Color(0x40b0ba59),
|
||||
accentColor: const Color(0x40b0ba59),
|
||||
seasons: [Season.winter, Season.spring, Season.summer],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 4,
|
||||
servingSize: '1/5 medium avocado',
|
||||
caloriesPerServing: 50,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'What\'s the most popular variety of avocado?',
|
||||
[
|
||||
@@ -244,13 +244,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/blackberry.jpg',
|
||||
category: VeggieCategory.berry,
|
||||
shortDescription: 'Find them on backroads and fences in the Northwest.',
|
||||
accentColor: Color(0x409d5adb),
|
||||
accentColor: const Color(0x409d5adb),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 6,
|
||||
vitaminCPercentage: 4,
|
||||
servingSize: '1 cup',
|
||||
caloriesPerServing: 62,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'What color are unripe blackberries?',
|
||||
[
|
||||
@@ -286,13 +286,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/cantaloupe.jpg',
|
||||
category: VeggieCategory.melon,
|
||||
shortDescription: 'A fruit so tasty there\'s a utensil just for it.',
|
||||
accentColor: Color(0x40f6bd56),
|
||||
accentColor: const Color(0x40f6bd56),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 120,
|
||||
vitaminCPercentage: 80,
|
||||
servingSize: '1/4 medium cantaloupe',
|
||||
caloriesPerServing: 50,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which of these is another name for cantaloupe?',
|
||||
[
|
||||
@@ -337,13 +337,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/cauliflower.jpg',
|
||||
category: VeggieCategory.cruciferous,
|
||||
shortDescription: 'Looks like white broccoli and explodes when cut.',
|
||||
accentColor: Color(0x40c891a8),
|
||||
accentColor: const Color(0x40c891a8),
|
||||
seasons: [Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 100,
|
||||
servingSize: '1/6 medium head',
|
||||
caloriesPerServing: 25,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'The quote "Cauliflower is nothing but cabbage with a college education" is attributed to whom?',
|
||||
[
|
||||
@@ -397,13 +397,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/endive.jpg',
|
||||
category: VeggieCategory.leafy,
|
||||
shortDescription: 'It\'s basically the veal of lettuce.',
|
||||
accentColor: Color(0x40c5be53),
|
||||
accentColor: const Color(0x40c5be53),
|
||||
seasons: [Season.winter, Season.spring, Season.autumn],
|
||||
vitaminAPercentage: 10,
|
||||
vitaminCPercentage: 2,
|
||||
servingSize: '1/2 cup, chopped',
|
||||
caloriesPerServing: 4,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'What\'s another name for Belgian endive?',
|
||||
[
|
||||
@@ -439,13 +439,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/fig.jpg',
|
||||
category: VeggieCategory.fruit,
|
||||
shortDescription: 'Delicious when sliced and wrapped in prosciutto.',
|
||||
accentColor: Color(0x40aa6d7c),
|
||||
accentColor: const Color(0x40aa6d7c),
|
||||
seasons: [Season.summer, Season.autumn],
|
||||
vitaminAPercentage: 2,
|
||||
vitaminCPercentage: 2,
|
||||
servingSize: '1 large fig',
|
||||
caloriesPerServing: 50,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which of these isn\'t a variety of figs?',
|
||||
[
|
||||
@@ -481,13 +481,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/grape.jpg',
|
||||
category: VeggieCategory.berry,
|
||||
shortDescription: 'Couldn\'t have wine without them.',
|
||||
accentColor: Color(0x40ac708a),
|
||||
accentColor: const Color(0x40ac708a),
|
||||
seasons: [Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 2,
|
||||
servingSize: '3/4 cup',
|
||||
caloriesPerServing: 90,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'How long ago were grapes introduced to the Americas?',
|
||||
[
|
||||
@@ -532,13 +532,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/green_bell_pepper.jpg',
|
||||
category: VeggieCategory.stealthFruit,
|
||||
shortDescription: 'Pleasantly bitter, like a sad movie.',
|
||||
accentColor: Color(0x408eb332),
|
||||
accentColor: const Color(0x408eb332),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 4,
|
||||
vitaminCPercentage: 190,
|
||||
servingSize: '1 medium pepper',
|
||||
caloriesPerServing: 25,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'What\'s the Australian term for a bell pepper?',
|
||||
[
|
||||
@@ -574,13 +574,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/habanero.jpg',
|
||||
category: VeggieCategory.stealthFruit,
|
||||
shortDescription: 'Delicious... in extremely small quantities.',
|
||||
accentColor: Color(0x40ff7a01),
|
||||
accentColor: const Color(0x40ff7a01),
|
||||
seasons: [Season.summer, Season.autumn],
|
||||
vitaminAPercentage: 9,
|
||||
vitaminCPercentage: 100,
|
||||
servingSize: '1 pepper',
|
||||
caloriesPerServing: 20,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'How high can habaneros rate on the Scoville scale?',
|
||||
[
|
||||
@@ -616,13 +616,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/kale.jpg',
|
||||
category: VeggieCategory.cruciferous,
|
||||
shortDescription: 'The meanest vegetable. Does not want to be eaten.',
|
||||
accentColor: Color(0x40a86bd8),
|
||||
accentColor: const Color(0x40a86bd8),
|
||||
seasons: [Season.winter, Season.autumn],
|
||||
vitaminAPercentage: 133,
|
||||
vitaminCPercentage: 134,
|
||||
servingSize: '1 cup, chopped',
|
||||
caloriesPerServing: 33,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Kale is sweeter when harvested after what?',
|
||||
[
|
||||
@@ -658,13 +658,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/kiwi.jpg',
|
||||
category: VeggieCategory.berry,
|
||||
shortDescription: 'Also known as Chinese gooseberry.',
|
||||
accentColor: Color(0x40b47b37),
|
||||
accentColor: const Color(0x40b47b37),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 2,
|
||||
vitaminCPercentage: 240,
|
||||
servingSize: '2 medium kiwis',
|
||||
caloriesPerServing: 90,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Europeans sometimes refer to kiwi as what?',
|
||||
[
|
||||
@@ -700,13 +700,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/lemon.jpg',
|
||||
category: VeggieCategory.citrus,
|
||||
shortDescription: 'Similar to limes, only yellow.',
|
||||
accentColor: Color(0x40e2a500),
|
||||
accentColor: const Color(0x40e2a500),
|
||||
seasons: [Season.winter],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 40,
|
||||
servingSize: '1 medium lemon',
|
||||
caloriesPerServing: 15,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'A lemon tree can produce up to how many pounds of fruit each year?',
|
||||
[
|
||||
@@ -751,13 +751,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/lime.jpg',
|
||||
category: VeggieCategory.citrus,
|
||||
shortDescription: 'Couldn\'t have ceviche and margaritas without them.',
|
||||
accentColor: Color(0x4089b733),
|
||||
accentColor: const Color(0x4089b733),
|
||||
seasons: [Season.winter],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 35,
|
||||
servingSize: '1 medium lime',
|
||||
caloriesPerServing: 20,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which American state is famous for its Key Lime Pie?',
|
||||
[
|
||||
@@ -793,13 +793,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/mango.jpg',
|
||||
category: VeggieCategory.tropical,
|
||||
shortDescription: 'A fun orange fruit popular with smoothie enthusiasts.',
|
||||
accentColor: Color(0x40fcc93c),
|
||||
accentColor: const Color(0x40fcc93c),
|
||||
seasons: [Season.summer, Season.autumn],
|
||||
vitaminAPercentage: 72,
|
||||
vitaminCPercentage: 203,
|
||||
servingSize: '1 fruit',
|
||||
caloriesPerServing: 201,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'In Mexico, mangos are frequently dusted with what spices before being eaten as a snack?',
|
||||
[
|
||||
@@ -835,13 +835,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/mushroom.jpg',
|
||||
category: VeggieCategory.fungus,
|
||||
shortDescription: 'They\'re not truffles, but they\'re still tasty.',
|
||||
accentColor: Color(0x40ba754b),
|
||||
accentColor: const Color(0x40ba754b),
|
||||
seasons: [Season.spring, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 2,
|
||||
servingSize: '5 medium \'shrooms',
|
||||
caloriesPerServing: 20,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Someone who loves eating mushrooms is called what?',
|
||||
[
|
||||
@@ -886,13 +886,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/nectarine.jpg',
|
||||
category: VeggieCategory.stoneFruit,
|
||||
shortDescription: 'Tiny, bald peaches.',
|
||||
accentColor: Color(0x40e45b3b),
|
||||
accentColor: const Color(0x40e45b3b),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 8,
|
||||
vitaminCPercentage: 15,
|
||||
servingSize: '1 medium nectarine',
|
||||
caloriesPerServing: 60,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Nectarines are technically a variety of which other fruit?',
|
||||
[
|
||||
@@ -928,13 +928,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/persimmon.jpg',
|
||||
category: VeggieCategory.fruit,
|
||||
shortDescription: 'It\'s like a plum and an apple had a baby together.',
|
||||
accentColor: Color(0x40979852),
|
||||
accentColor: const Color(0x40979852),
|
||||
seasons: [Season.winter, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 27,
|
||||
servingSize: '1 fruit',
|
||||
caloriesPerServing: 32,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'What\'s the most commonly grown variety of persimmon?',
|
||||
[
|
||||
@@ -970,13 +970,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/plum.jpg',
|
||||
category: VeggieCategory.stoneFruit,
|
||||
shortDescription: 'Popular in fruit salads and children\'s tales.',
|
||||
accentColor: Color(0x40e48b47),
|
||||
accentColor: const Color(0x40e48b47),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 8,
|
||||
vitaminCPercentage: 10,
|
||||
servingSize: '2 medium plums',
|
||||
caloriesPerServing: 70,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Plums should be handled with care because...?',
|
||||
[
|
||||
@@ -1012,13 +1012,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/potato.jpg',
|
||||
category: VeggieCategory.tuber,
|
||||
shortDescription: 'King of starches and giver of french fries.',
|
||||
accentColor: Color(0x40c65c63),
|
||||
accentColor: const Color(0x40c65c63),
|
||||
seasons: [Season.winter, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 45,
|
||||
servingSize: '1 medium spud',
|
||||
caloriesPerServing: 110,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which country consumes the most fried potatoes per capita?',
|
||||
[
|
||||
@@ -1054,13 +1054,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/radicchio.jpg',
|
||||
category: VeggieCategory.leafy,
|
||||
shortDescription: 'It\'s that bitter taste in the salad you\'re eating.',
|
||||
accentColor: Color(0x40d75875),
|
||||
accentColor: const Color(0x40d75875),
|
||||
seasons: [Season.spring, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 10,
|
||||
servingSize: '2 cups shredded',
|
||||
caloriesPerServing: 20,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Radicchio is a particuarly good source of which mineral?',
|
||||
[
|
||||
@@ -1096,13 +1096,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/radish.jpg',
|
||||
category: VeggieCategory.root,
|
||||
shortDescription: 'Try roasting them in addition to slicing them up raw.',
|
||||
accentColor: Color(0x40819e4e),
|
||||
accentColor: const Color(0x40819e4e),
|
||||
seasons: [Season.spring, Season.autumn],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 30,
|
||||
servingSize: '7 radishes',
|
||||
caloriesPerServing: 10,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which ancient civilization is known to have used radish oil?',
|
||||
[
|
||||
@@ -1138,13 +1138,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/squash.jpg',
|
||||
category: VeggieCategory.gourd,
|
||||
shortDescription: 'Just slather them in butter and pop \'em in the oven.',
|
||||
accentColor: Color(0x40dbb721),
|
||||
accentColor: const Color(0x40dbb721),
|
||||
seasons: [Season.winter, Season.autumn],
|
||||
vitaminAPercentage: 297,
|
||||
vitaminCPercentage: 48,
|
||||
servingSize: '1 cup diced butternut',
|
||||
caloriesPerServing: 63,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which of these is not a type of squash?',
|
||||
[
|
||||
@@ -1181,13 +1181,13 @@ class LocalVeggieProvider {
|
||||
category: VeggieCategory.berry,
|
||||
shortDescription:
|
||||
'A delicious fruit that keeps its seeds on the outside.',
|
||||
accentColor: Color(0x40f06a44),
|
||||
accentColor: const Color(0x40f06a44),
|
||||
seasons: [Season.spring, Season.summer],
|
||||
vitaminAPercentage: 0,
|
||||
vitaminCPercentage: 160,
|
||||
servingSize: '8 medium strawberries',
|
||||
caloriesPerServing: 50,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'How many seeds are in the average strawberry?',
|
||||
[
|
||||
@@ -1223,13 +1223,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/tangelo.jpg',
|
||||
category: VeggieCategory.citrus,
|
||||
shortDescription: 'No one\'s sure what they are or where they came from.',
|
||||
accentColor: Color(0x40f88c06),
|
||||
accentColor: const Color(0x40f88c06),
|
||||
seasons: [Season.winter, Season.autumn],
|
||||
vitaminAPercentage: 6,
|
||||
vitaminCPercentage: 181,
|
||||
servingSize: '1 medium tangelo',
|
||||
caloriesPerServing: 60,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'The tangelo is thought to be a cross between oranges and which other fruit?',
|
||||
[
|
||||
@@ -1265,13 +1265,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/tomato.jpg',
|
||||
category: VeggieCategory.stealthFruit,
|
||||
shortDescription: 'A new world food with old world tradition.',
|
||||
accentColor: Color(0x40ea3628),
|
||||
accentColor: const Color(0x40ea3628),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 20,
|
||||
vitaminCPercentage: 40,
|
||||
servingSize: '1 medium tomato',
|
||||
caloriesPerServing: 25,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'French speakers sometimes refer to tomatoes with which name?',
|
||||
[
|
||||
@@ -1307,13 +1307,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/watermelon.jpg',
|
||||
category: VeggieCategory.melon,
|
||||
shortDescription: 'Everyone\'s favorite closing act at the picnic.',
|
||||
accentColor: Color(0x40fa8c75),
|
||||
accentColor: const Color(0x40fa8c75),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 30,
|
||||
vitaminCPercentage: 25,
|
||||
servingSize: '2 cups diced',
|
||||
caloriesPerServing: 80,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'How much of a watermelon is water?',
|
||||
[
|
||||
@@ -1358,13 +1358,13 @@ class LocalVeggieProvider {
|
||||
imageAssetPath: 'assets/images/orange_bell_pepper.jpg',
|
||||
category: VeggieCategory.stealthFruit,
|
||||
shortDescription: 'Like green pepper, but nicer.',
|
||||
accentColor: Color(0x40fd8e00),
|
||||
accentColor: const Color(0x40fd8e00),
|
||||
seasons: [Season.summer],
|
||||
vitaminAPercentage: 4,
|
||||
vitaminCPercentage: 190,
|
||||
servingSize: '1 medium pepper',
|
||||
caloriesPerServing: 25,
|
||||
trivia: [
|
||||
trivia: const [
|
||||
Trivia(
|
||||
'Which compound (not found in bell peppers) is responsible for many peppers\' spicy taste?',
|
||||
[
|
||||
|
||||
@@ -61,7 +61,7 @@ class _VeggieAppState extends State<VeggieApp> with RestorationMixin {
|
||||
child: CupertinoApp(
|
||||
theme: Styles.veggieThemeData,
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: HomeScreen(restorationId: 'home'),
|
||||
home: const HomeScreen(restorationId: 'home'),
|
||||
restorationScopeId: 'app',
|
||||
),
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ServingInfoChart extends StatelessWidget {
|
||||
final themeData = CupertinoTheme.of(context);
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
@@ -187,9 +187,9 @@ class InfoView extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
for (Season season in veggie.seasons) ...[
|
||||
SizedBox(width: 12),
|
||||
const SizedBox(width: 12),
|
||||
Padding(
|
||||
padding: Styles.seasonIconPadding[season],
|
||||
child: Icon(
|
||||
@@ -201,18 +201,18 @@ class InfoView extends StatelessWidget {
|
||||
],
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
veggie.name,
|
||||
style: Styles.detailsTitleText(themeData),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
veggie.shortDescription,
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
),
|
||||
ServingInfoChart(veggie, prefs),
|
||||
SizedBox(height: 24),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -222,7 +222,7 @@ class InfoView extends StatelessWidget {
|
||||
appState.setFavorite(id, value);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Save to Garden',
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
@@ -239,7 +239,7 @@ class DetailsScreen extends StatefulWidget {
|
||||
final int id;
|
||||
final String restorationId;
|
||||
|
||||
DetailsScreen({this.id, this.restorationId});
|
||||
const DetailsScreen({this.id, this.restorationId});
|
||||
|
||||
static String show(NavigatorState navigator, int veggieId) {
|
||||
return navigator.restorablePush<void>(_routeBuilder, arguments: veggieId);
|
||||
@@ -321,9 +321,9 @@ class _DetailsScreenState extends State<DetailsScreen> with RestorationMixin {
|
||||
restorationId: 'list',
|
||||
children: [
|
||||
_buildHeader(context, appState),
|
||||
SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
CupertinoSegmentedControl<int>(
|
||||
children: {
|
||||
children: const {
|
||||
0: Text(
|
||||
'Facts & Info',
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:veggieseasons/data/veggie.dart';
|
||||
import 'package:veggieseasons/widgets/veggie_headline.dart';
|
||||
|
||||
class FavoritesScreen extends StatelessWidget {
|
||||
FavoritesScreen({this.restorationId, Key key}) : super(key: key);
|
||||
const FavoritesScreen({this.restorationId, Key key}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
@@ -22,7 +22,7 @@ class FavoritesScreen extends StatelessWidget {
|
||||
final model = Provider.of<AppState>(context);
|
||||
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
navigationBar: const CupertinoNavigationBar(
|
||||
middle: Text('My Garden'),
|
||||
),
|
||||
child: Center(
|
||||
@@ -37,10 +37,10 @@ class FavoritesScreen extends StatelessWidget {
|
||||
: ListView(
|
||||
restorationId: 'list',
|
||||
children: [
|
||||
SizedBox(height: 24),
|
||||
const SizedBox(height: 24),
|
||||
for (Veggie veggie in model.favoriteVeggies)
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(16, 0, 16, 24),
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 24),
|
||||
child: VeggieHeadline(veggie),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:veggieseasons/screens/search.dart';
|
||||
import 'package:veggieseasons/screens/settings.dart';
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
HomeScreen({Key key, this.restorationId}) : super(key: key);
|
||||
const HomeScreen({Key key, this.restorationId}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
@@ -20,7 +20,7 @@ class HomeScreen extends StatelessWidget {
|
||||
restorationId: restorationId,
|
||||
child: CupertinoTabScaffold(
|
||||
restorationId: 'scaffold',
|
||||
tabBar: CupertinoTabBar(items: [
|
||||
tabBar: CupertinoTabBar(items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(CupertinoIcons.home),
|
||||
label: 'Home',
|
||||
@@ -40,13 +40,13 @@ class HomeScreen extends StatelessWidget {
|
||||
]),
|
||||
tabBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
return ListScreen(restorationId: 'list');
|
||||
return const ListScreen(restorationId: 'list');
|
||||
} else if (index == 1) {
|
||||
return FavoritesScreen(restorationId: 'favorites');
|
||||
return const FavoritesScreen(restorationId: 'favorites');
|
||||
} else if (index == 2) {
|
||||
return SearchScreen(restorationId: 'search');
|
||||
return const SearchScreen(restorationId: 'search');
|
||||
} else {
|
||||
return SettingsScreen(restorationId: 'settings');
|
||||
return const SettingsScreen(restorationId: 'settings');
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -14,14 +14,14 @@ import 'package:veggieseasons/styles.dart';
|
||||
import 'package:veggieseasons/widgets/veggie_card.dart';
|
||||
|
||||
class ListScreen extends StatelessWidget {
|
||||
ListScreen({this.restorationId, Key key}) : super(key: key);
|
||||
const ListScreen({this.restorationId, Key key}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
Widget _generateVeggieRow(Veggie veggie, Preferences prefs,
|
||||
{bool inSeason = true}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
|
||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 24),
|
||||
child: FutureBuilder<Set<VeggieCategory>>(
|
||||
future: prefs.preferredCategories,
|
||||
builder: (context, snapshot) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'package:veggieseasons/data/veggie.dart';
|
||||
import 'package:veggieseasons/widgets/veggie_headline.dart';
|
||||
|
||||
class SearchScreen extends StatefulWidget {
|
||||
SearchScreen({this.restorationId, Key key}) : super(key: key);
|
||||
const SearchScreen({this.restorationId, Key key}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
@@ -85,7 +85,7 @@ class _SearchScreenState extends State<SearchScreen> with RestorationMixin {
|
||||
);
|
||||
} else {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
|
||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 24),
|
||||
child: VeggieHeadline(veggies[i - 1]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ import 'package:veggieseasons/widgets/settings_group.dart';
|
||||
import 'package:veggieseasons/widgets/settings_item.dart';
|
||||
|
||||
class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
VeggieCategorySettingsScreen({Key key, this.restorationId}) : super(key: key);
|
||||
const VeggieCategorySettingsScreen({Key key, this.restorationId})
|
||||
: super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
@@ -24,7 +25,7 @@ class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
static Route<void> _routeBuilder(BuildContext context, Object argument) {
|
||||
return CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
VeggieCategorySettingsScreen(restorationId: 'category'),
|
||||
const VeggieCategorySettingsScreen(restorationId: 'category'),
|
||||
title: 'Preferred Categories',
|
||||
);
|
||||
}
|
||||
@@ -37,7 +38,7 @@ class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
return RestorationScope(
|
||||
restorationId: restorationId,
|
||||
child: CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
navigationBar: const CupertinoNavigationBar(
|
||||
middle: Text('Preferred Categories'),
|
||||
previousPageTitle: 'Settings',
|
||||
),
|
||||
@@ -65,7 +66,7 @@ class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
} else {
|
||||
toggle = CupertinoSwitch(
|
||||
toggle = const CupertinoSwitch(
|
||||
value: false,
|
||||
onChanged: null,
|
||||
);
|
||||
@@ -93,7 +94,7 @@ class VeggieCategorySettingsScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
class CalorieSettingsScreen extends StatelessWidget {
|
||||
CalorieSettingsScreen({Key key, this.restorationId}) : super(key: key);
|
||||
const CalorieSettingsScreen({Key key, this.restorationId}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
@@ -107,7 +108,8 @@ class CalorieSettingsScreen extends StatelessWidget {
|
||||
|
||||
static Route<void> _routeBuilder(BuildContext context, Object argument) {
|
||||
return CupertinoPageRoute<void>(
|
||||
builder: (context) => CalorieSettingsScreen(restorationId: 'calorie'),
|
||||
builder: (context) =>
|
||||
const CalorieSettingsScreen(restorationId: 'calorie'),
|
||||
title: 'Calorie Target',
|
||||
);
|
||||
}
|
||||
@@ -119,7 +121,7 @@ class CalorieSettingsScreen extends StatelessWidget {
|
||||
return RestorationScope(
|
||||
restorationId: restorationId,
|
||||
child: CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
navigationBar: const CupertinoNavigationBar(
|
||||
previousPageTitle: 'Settings',
|
||||
),
|
||||
backgroundColor: Styles.scaffoldBackground(brightness),
|
||||
@@ -152,9 +154,10 @@ class CalorieSettingsScreen extends StatelessWidget {
|
||||
|
||||
return SettingsGroup(
|
||||
items: steps,
|
||||
header: SettingsGroupHeader('Available calorie levels'),
|
||||
footer: SettingsGroupFooter('These are used for serving '
|
||||
'calculations'),
|
||||
header: const SettingsGroupHeader('Available calorie levels'),
|
||||
footer:
|
||||
const SettingsGroupFooter('These are used for serving '
|
||||
'calculations'),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -166,14 +169,14 @@ class CalorieSettingsScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
class SettingsScreen extends StatelessWidget {
|
||||
SettingsScreen({this.restorationId, Key key}) : super(key: key);
|
||||
const SettingsScreen({this.restorationId, Key key}) : super(key: key);
|
||||
|
||||
final String restorationId;
|
||||
|
||||
SettingsItem _buildCaloriesItem(BuildContext context, Preferences prefs) {
|
||||
return SettingsItem(
|
||||
label: 'Calorie Target',
|
||||
icon: SettingsIcon(
|
||||
icon: const SettingsIcon(
|
||||
backgroundColor: Styles.iconBlue,
|
||||
icon: Styles.calorieIcon,
|
||||
),
|
||||
@@ -186,8 +189,8 @@ class SettingsScreen extends StatelessWidget {
|
||||
snapshot.data?.toString() ?? '',
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
SettingsNavigationIndicator(),
|
||||
const SizedBox(width: 8),
|
||||
const SettingsNavigationIndicator(),
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -202,11 +205,11 @@ class SettingsScreen extends StatelessWidget {
|
||||
return SettingsItem(
|
||||
label: 'Preferred Categories',
|
||||
subtitle: 'What types of veggies you prefer!',
|
||||
icon: SettingsIcon(
|
||||
icon: const SettingsIcon(
|
||||
backgroundColor: Styles.iconGold,
|
||||
icon: Styles.preferenceIcon,
|
||||
),
|
||||
content: SettingsNavigationIndicator(),
|
||||
content: const SettingsNavigationIndicator(),
|
||||
onPress: () {
|
||||
VeggieCategorySettingsScreen.show(Navigator.of(context));
|
||||
},
|
||||
@@ -217,23 +220,23 @@ class SettingsScreen extends StatelessWidget {
|
||||
BuildContext context, Preferences prefs) {
|
||||
return SettingsItem(
|
||||
label: 'Restore Defaults',
|
||||
icon: SettingsIcon(
|
||||
icon: const SettingsIcon(
|
||||
backgroundColor: CupertinoColors.systemRed,
|
||||
icon: Styles.resetIcon,
|
||||
),
|
||||
content: SettingsNavigationIndicator(),
|
||||
content: const SettingsNavigationIndicator(),
|
||||
onPress: () {
|
||||
showCupertinoDialog<void>(
|
||||
context: context,
|
||||
builder: (context) => CupertinoAlertDialog(
|
||||
title: Text('Are you sure?'),
|
||||
content: Text(
|
||||
title: const Text('Are you sure?'),
|
||||
content: const Text(
|
||||
'Are you sure you want to reset the current settings?',
|
||||
),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
isDestructiveAction: true,
|
||||
child: Text('Yes'),
|
||||
child: const Text('Yes'),
|
||||
onPressed: () async {
|
||||
await prefs.restoreDefaults();
|
||||
Navigator.pop(context);
|
||||
@@ -241,7 +244,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
isDefaultAction: true,
|
||||
child: Text('No'),
|
||||
child: const Text('No'),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
)
|
||||
],
|
||||
@@ -264,7 +267,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: CustomScrollView(
|
||||
restorationId: 'list',
|
||||
slivers: <Widget>[
|
||||
CupertinoSliverNavigationBar(
|
||||
const CupertinoSliverNavigationBar(
|
||||
largeTitle: Text('Settings'),
|
||||
),
|
||||
SliverSafeArea(
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:veggieseasons/data/veggie.dart';
|
||||
|
||||
abstract class Styles {
|
||||
static CupertinoThemeData veggieThemeData = CupertinoThemeData(
|
||||
static CupertinoThemeData veggieThemeData = const CupertinoThemeData(
|
||||
textTheme: CupertinoTextThemeData(
|
||||
textStyle: TextStyle(
|
||||
color: CupertinoColors.label,
|
||||
@@ -30,7 +30,7 @@ abstract class Styles {
|
||||
|
||||
static TextStyle minorText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(128, 128, 128, 1),
|
||||
color: const Color.fromRGBO(128, 128, 128, 1),
|
||||
);
|
||||
|
||||
static TextStyle headlineName(CupertinoThemeData themeData) =>
|
||||
@@ -41,19 +41,19 @@ abstract class Styles {
|
||||
|
||||
static TextStyle cardTitleText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.9),
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.9),
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
static TextStyle cardCategoryText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(255, 255, 255, 0.9),
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.9),
|
||||
);
|
||||
|
||||
static TextStyle cardDescriptionText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.9),
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.9),
|
||||
);
|
||||
|
||||
static TextStyle detailsTitleText(CupertinoThemeData themeData) =>
|
||||
@@ -69,13 +69,13 @@ abstract class Styles {
|
||||
|
||||
static TextStyle detailsBoldDescriptionText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.9),
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.9),
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
static TextStyle detailsServingHeaderText(CupertinoThemeData themeData) =>
|
||||
themeData.textTheme.textStyle.copyWith(
|
||||
color: Color.fromRGBO(176, 176, 176, 1),
|
||||
color: const Color.fromRGBO(176, 176, 176, 1),
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
@@ -198,7 +198,9 @@ abstract class Styles {
|
||||
: CupertinoColors.darkBackgroundGray;
|
||||
|
||||
static Color settingsLineation(Brightness brightness) =>
|
||||
brightness == Brightness.light ? Color(0xffbcbbc1) : Color(0xff4c4b4b);
|
||||
brightness == Brightness.light
|
||||
? const Color(0xffbcbbc1)
|
||||
: const Color(0xff4c4b4b);
|
||||
|
||||
static const Color settingsBackground = Color(0xffefeff4);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class FrostedBox extends StatelessWidget {
|
||||
return BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Styles.frostedBackground,
|
||||
),
|
||||
child: child,
|
||||
@@ -117,7 +117,7 @@ class CloseButtonState extends State<CloseButton> {
|
||||
child: Center(
|
||||
child: ColorChangingIcon(
|
||||
CupertinoIcons.clear_thick,
|
||||
duration: Duration(milliseconds: 300),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
color: tapInProgress
|
||||
? Styles.closeButtonPressed
|
||||
: Styles.closeButtonUnpressed,
|
||||
|
||||
@@ -21,7 +21,7 @@ class SettingsGroupHeader extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15,
|
||||
right: 15,
|
||||
bottom: 6,
|
||||
@@ -42,7 +42,7 @@ class SettingsGroupFooter extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15,
|
||||
right: 15,
|
||||
top: 7.5,
|
||||
|
||||
@@ -20,7 +20,7 @@ class SettingsNavigationIndicator extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Icon(
|
||||
return const Icon(
|
||||
CupertinoIcons.forward,
|
||||
color: Styles.settingsMediumGray,
|
||||
size: 21,
|
||||
@@ -99,7 +99,7 @@ class SettingsItemState extends State<SettingsItem> {
|
||||
});
|
||||
await widget.onPress();
|
||||
Future.delayed(
|
||||
Duration(milliseconds: 150),
|
||||
const Duration(milliseconds: 150),
|
||||
() {
|
||||
setState(() {
|
||||
pressed = false;
|
||||
@@ -133,10 +133,10 @@ class SettingsItemState extends State<SettingsItem> {
|
||||
? Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
SizedBox(height: 8.5),
|
||||
const SizedBox(height: 8.5),
|
||||
Text(widget.label,
|
||||
style: themeData.textTheme.textStyle),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
widget.subtitle,
|
||||
style: Styles.settingsItemSubtitleText(themeData),
|
||||
@@ -144,7 +144,7 @@ class SettingsItemState extends State<SettingsItem> {
|
||||
],
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(top: 1.5),
|
||||
padding: const EdgeInsets.only(top: 1.5),
|
||||
child: Text(widget.label,
|
||||
style: themeData.textTheme.textStyle),
|
||||
),
|
||||
|
||||
@@ -135,7 +135,7 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
|
||||
'All done!',
|
||||
style: Styles.triviaFinishedTitleText(themeData),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text('You answered', style: themeData.textTheme.textStyle),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -157,9 +157,9 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
|
||||
],
|
||||
),
|
||||
Text('questions correctly!', style: themeData.textTheme.textStyle),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
CupertinoButton(
|
||||
child: Text('Try Again'),
|
||||
child: const Text('Try Again'),
|
||||
onPressed: () => _resetGame(),
|
||||
),
|
||||
],
|
||||
@@ -173,12 +173,12 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
currentTrivia.question,
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
const SizedBox(height: 32),
|
||||
for (int i = 0; i < currentTrivia.answers.length; i++)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
@@ -209,9 +209,9 @@ class _TriviaViewState extends State<TriviaView> with RestorationMixin {
|
||||
: 'Sorry, that wasn\'t the right answer.',
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
CupertinoButton(
|
||||
child: Text('Next Question'),
|
||||
child: const Text('Next Question'),
|
||||
onPressed: () => setState(() {
|
||||
triviaIndex.value++;
|
||||
status.value = PlayerStatus.readyToAnswer;
|
||||
|
||||
@@ -105,7 +105,7 @@ class _PressableCardState extends State<PressableCard> {
|
||||
}
|
||||
|
||||
class VeggieCard extends StatelessWidget {
|
||||
VeggieCard(this.veggie, this.isInSeason, this.isPreferredCategory);
|
||||
const VeggieCard(this.veggie, this.isInSeason, this.isPreferredCategory);
|
||||
|
||||
/// Veggie to be displayed by the card.
|
||||
final Veggie veggie;
|
||||
@@ -120,7 +120,7 @@ class VeggieCard extends StatelessWidget {
|
||||
Widget _buildDetails(BuildContext context) {
|
||||
final themeData = CupertinoTheme.of(context);
|
||||
return FrostyBackground(
|
||||
color: Color(0x90ffffff),
|
||||
color: const Color(0x90ffffff),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
||||
@@ -49,7 +49,7 @@ class VeggieHeadline extends StatelessWidget {
|
||||
var widgets = <Widget>[];
|
||||
|
||||
for (var season in seasons) {
|
||||
widgets.add(SizedBox(width: 4));
|
||||
widgets.add(const SizedBox(width: 4));
|
||||
widgets.add(
|
||||
Container(
|
||||
height: 10,
|
||||
@@ -80,7 +80,7 @@ class VeggieHeadline extends StatelessWidget {
|
||||
height: 72,
|
||||
width: 72,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user