Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
89b437e6
Unverified
Commit
89b437e6
authored
Mar 28, 2022
by
Michael Goderbauer
Committed by
GitHub
Mar 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare flutter_gallery for use_super_parameters (#100515)
parent
bd6beb4e
Changes
83
Hide whitespace changes
Inline
Side-by-side
Showing
83 changed files
with
216 additions
and
260 deletions
+216
-260
home.dart
...ration_tests/flutter_gallery/lib/demo/animation/home.dart
+5
-8
widgets.dart
...ion_tests/flutter_gallery/lib/demo/animation/widgets.dart
+6
-9
animation_demo.dart
...ration_tests/flutter_gallery/lib/demo/animation_demo.dart
+1
-1
home.dart
...ation_tests/flutter_gallery/lib/demo/calculator/home.dart
+5
-5
logic.dart
...tion_tests/flutter_gallery/lib/demo/calculator/logic.dart
+1
-1
calculator_demo.dart
...ation_tests/flutter_gallery/lib/demo/calculator_demo.dart
+1
-1
colors_demo.dart
...tegration_tests/flutter_gallery/lib/demo/colors_demo.dart
+5
-6
contacts_demo.dart
...gration_tests/flutter_gallery/lib/demo/contacts_demo.dart
+4
-5
cupertino_activity_indicator_demo.dart
...lib/demo/cupertino/cupertino_activity_indicator_demo.dart
+1
-1
cupertino_alert_demo.dart
...tter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
+2
-2
cupertino_buttons_demo.dart
...er_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart
+1
-1
cupertino_navigation_demo.dart
...gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
+15
-16
cupertino_picker_demo.dart
...ter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart
+3
-5
cupertino_refresh_demo.dart
...er_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
+1
-1
cupertino_segmented_control_demo.dart
.../lib/demo/cupertino/cupertino_segmented_control_demo.dart
+1
-1
cupertino_slider_demo.dart
...ter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart
+1
-1
cupertino_switch_demo.dart
...ter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart
+1
-1
cupertino_text_field_demo.dart
...gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
+1
-1
fortnightly.dart
...sts/flutter_gallery/lib/demo/fortnightly/fortnightly.dart
+3
-3
images_demo.dart
...tegration_tests/flutter_gallery/lib/demo/images_demo.dart
+1
-1
backdrop_demo.dart
...ests/flutter_gallery/lib/demo/material/backdrop_demo.dart
+7
-7
banner_demo.dart
..._tests/flutter_gallery/lib/demo/material/banner_demo.dart
+1
-1
bottom_app_bar_demo.dart
...lutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
+1
-1
bottom_navigation_demo.dart
...ter_gallery/lib/demo/material/bottom_navigation_demo.dart
+3
-3
buttons_demo.dart
...tests/flutter_gallery/lib/demo/material/buttons_demo.dart
+1
-1
cards_demo.dart
...n_tests/flutter_gallery/lib/demo/material/cards_demo.dart
+7
-11
chip_demo.dart
...on_tests/flutter_gallery/lib/demo/material/chip_demo.dart
+2
-3
data_table_demo.dart
...ts/flutter_gallery/lib/demo/material/data_table_demo.dart
+1
-1
date_and_time_picker_demo.dart
..._gallery/lib/demo/material/date_and_time_picker_demo.dart
+3
-5
dialog_demo.dart
..._tests/flutter_gallery/lib/demo/material/dialog_demo.dart
+2
-2
drawer_demo.dart
..._tests/flutter_gallery/lib/demo/material/drawer_demo.dart
+1
-1
elevation_demo.dart
...sts/flutter_gallery/lib/demo/material/elevation_demo.dart
+1
-1
expansion_panels_demo.dart
...tter_gallery/lib/demo/material/expansion_panels_demo.dart
+5
-5
expansion_tile_list_demo.dart
...r_gallery/lib/demo/material/expansion_tile_list_demo.dart
+1
-1
full_screen_dialog_demo.dart
...er_gallery/lib/demo/material/full_screen_dialog_demo.dart
+3
-4
grid_list_demo.dart
...sts/flutter_gallery/lib/demo/material/grid_list_demo.dart
+4
-5
icons_demo.dart
...n_tests/flutter_gallery/lib/demo/material/icons_demo.dart
+1
-1
leave_behind_demo.dart
.../flutter_gallery/lib/demo/material/leave_behind_demo.dart
+2
-3
list_demo.dart
...on_tests/flutter_gallery/lib/demo/material/list_demo.dart
+1
-1
menu_demo.dart
...on_tests/flutter_gallery/lib/demo/material/menu_demo.dart
+1
-1
modal_bottom_sheet_demo.dart
...er_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
+1
-1
overscroll_demo.dart
...ts/flutter_gallery/lib/demo/material/overscroll_demo.dart
+1
-1
page_selector_demo.dart
...flutter_gallery/lib/demo/material/page_selector_demo.dart
+1
-1
persistent_bottom_sheet_demo.dart
...llery/lib/demo/material/persistent_bottom_sheet_demo.dart
+1
-1
progress_indicator_demo.dart
...er_gallery/lib/demo/material/progress_indicator_demo.dart
+1
-1
reorderable_list_demo.dart
...tter_gallery/lib/demo/material/reorderable_list_demo.dart
+1
-1
scrollable_tabs_demo.dart
...utter_gallery/lib/demo/material/scrollable_tabs_demo.dart
+1
-1
search_demo.dart
..._tests/flutter_gallery/lib/demo/material/search_demo.dart
+1
-1
selection_controls_demo.dart
...er_gallery/lib/demo/material/selection_controls_demo.dart
+1
-1
slider_demo.dart
..._tests/flutter_gallery/lib/demo/material/slider_demo.dart
+1
-1
snack_bar_demo.dart
...sts/flutter_gallery/lib/demo/material/snack_bar_demo.dart
+1
-1
tabs_demo.dart
...on_tests/flutter_gallery/lib/demo/material/tabs_demo.dart
+1
-1
tabs_fab_demo.dart
...ests/flutter_gallery/lib/demo/material/tabs_fab_demo.dart
+1
-1
text_form_field_demo.dart
...utter_gallery/lib/demo/material/text_form_field_demo.dart
+3
-3
tooltip_demo.dart
...tests/flutter_gallery/lib/demo/material/tooltip_demo.dart
+1
-1
pesto_demo.dart
...ntegration_tests/flutter_gallery/lib/demo/pesto_demo.dart
+13
-18
app.dart
...ntegration_tests/flutter_gallery/lib/demo/shrine/app.dart
+1
-1
backdrop.dart
...ation_tests/flutter_gallery/lib/demo/shrine/backdrop.dart
+6
-9
category_menu_page.dart
...s/flutter_gallery/lib/demo/shrine/category_menu_page.dart
+2
-2
expanding_bottom_sheet.dart
...utter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
+4
-5
home.dart
...tegration_tests/flutter_gallery/lib/demo/shrine/home.dart
+3
-3
login.dart
...egration_tests/flutter_gallery/lib/demo/shrine/login.dart
+2
-2
shopping_cart.dart
..._tests/flutter_gallery/lib/demo/shrine/shopping_cart.dart
+4
-4
asymmetric_view.dart
...gallery/lib/demo/shrine/supplemental/asymmetric_view.dart
+1
-1
cut_corners_border.dart
...lery/lib/demo/shrine/supplemental/cut_corners_border.dart
+4
-8
product_card.dart
...er_gallery/lib/demo/shrine/supplemental/product_card.dart
+2
-2
product_columns.dart
...gallery/lib/demo/shrine/supplemental/product_columns.dart
+3
-3
shrine_demo.dart
...tegration_tests/flutter_gallery/lib/demo/shrine_demo.dart
+1
-1
transformations_demo.dart
...allery/lib/demo/transformations/transformations_demo.dart
+1
-1
transformations_demo_color_picker.dart
...mo/transformations/transformations_demo_color_picker.dart
+2
-2
transformations_demo_edit_board_point.dart
...ransformations/transformations_demo_edit_board_point.dart
+2
-2
transformations_demo_gesture_transformable.dart
...ormations/transformations_demo_gesture_transformable.dart
+2
-3
typography_demo.dart
...ation_tests/flutter_gallery/lib/demo/typography_demo.dart
+3
-3
video_demo.dart
...ntegration_tests/flutter_gallery/lib/demo/video_demo.dart
+8
-8
about.dart
dev/integration_tests/flutter_gallery/lib/gallery/about.dart
+1
-2
app.dart
dev/integration_tests/flutter_gallery/lib/gallery/app.dart
+2
-2
backdrop.dart
...tegration_tests/flutter_gallery/lib/gallery/backdrop.dart
+5
-8
demo.dart
dev/integration_tests/flutter_gallery/lib/gallery/demo.dart
+7
-9
home.dart
dev/integration_tests/flutter_gallery/lib/gallery/home.dart
+6
-8
options.dart
...ntegration_tests/flutter_gallery/lib/gallery/options.dart
+4
-4
updater.dart
...ntegration_tests/flutter_gallery/lib/gallery/updater.dart
+1
-2
pubspec.yaml
dev/integration_tests/flutter_gallery/pubspec.yaml
+1
-1
live_smoketest.dart
...ntegration_tests/flutter_gallery/test/live_smoketest.dart
+1
-1
No files found.
dev/integration_tests/flutter_gallery/lib/demo/animation/home.dart
View file @
89b437e6
...
@@ -75,12 +75,10 @@ class _RenderStatusBarPaddingSliver extends RenderSliver {
...
@@ -75,12 +75,10 @@ class _RenderStatusBarPaddingSliver extends RenderSliver {
class
_StatusBarPaddingSliver
extends
SingleChildRenderObjectWidget
{
class
_StatusBarPaddingSliver
extends
SingleChildRenderObjectWidget
{
const
_StatusBarPaddingSliver
({
const
_StatusBarPaddingSliver
({
Key
?
key
,
required
this
.
maxHeight
,
required
this
.
maxHeight
,
this
.
scrollFactor
=
5.0
,
this
.
scrollFactor
=
5.0
,
})
:
assert
(
maxHeight
>=
0.0
),
})
:
assert
(
maxHeight
>=
0.0
),
assert
(
scrollFactor
>=
1.0
),
assert
(
scrollFactor
>=
1.0
);
super
(
key:
key
);
final
double
maxHeight
;
final
double
maxHeight
;
final
double
scrollFactor
;
final
double
scrollFactor
;
...
@@ -260,7 +258,6 @@ class _AllSectionsLayout extends MultiChildLayoutDelegate {
...
@@ -260,7 +258,6 @@ class _AllSectionsLayout extends MultiChildLayoutDelegate {
class
_AllSectionsView
extends
AnimatedWidget
{
class
_AllSectionsView
extends
AnimatedWidget
{
_AllSectionsView
({
_AllSectionsView
({
Key
?
key
,
required
this
.
sectionIndex
,
required
this
.
sectionIndex
,
required
this
.
sections
,
required
this
.
sections
,
required
this
.
selectedIndex
,
required
this
.
selectedIndex
,
...
@@ -271,7 +268,7 @@ class _AllSectionsView extends AnimatedWidget {
...
@@ -271,7 +268,7 @@ class _AllSectionsView extends AnimatedWidget {
})
:
assert
(
sectionCards
.
length
==
sections
.
length
),
})
:
assert
(
sectionCards
.
length
==
sections
.
length
),
assert
(
sectionIndex
>=
0
&&
sectionIndex
<
sections
.
length
),
assert
(
sectionIndex
>=
0
&&
sectionIndex
<
sections
.
length
),
assert
(
selectedIndex
.
value
!
>=
0.0
&&
selectedIndex
.
value
!
<
sections
.
length
.
toDouble
()),
assert
(
selectedIndex
.
value
!
>=
0.0
&&
selectedIndex
.
value
!
<
sections
.
length
.
toDouble
()),
super
(
key:
key
,
listenable:
selectedIndex
);
super
(
listenable:
selectedIndex
);
final
int
sectionIndex
;
final
int
sectionIndex
;
final
List
<
Section
>
sections
;
final
List
<
Section
>
sections
;
...
@@ -361,9 +358,9 @@ class _AllSectionsView extends AnimatedWidget {
...
@@ -361,9 +358,9 @@ class _AllSectionsView extends AnimatedWidget {
// visible.
// visible.
class
_SnappingScrollPhysics
extends
ClampingScrollPhysics
{
class
_SnappingScrollPhysics
extends
ClampingScrollPhysics
{
const
_SnappingScrollPhysics
({
const
_SnappingScrollPhysics
({
ScrollPhysics
?
parent
,
super
.
parent
,
required
this
.
midScrollOffset
,
required
this
.
midScrollOffset
,
})
:
super
(
parent:
parent
)
;
});
final
double
midScrollOffset
;
final
double
midScrollOffset
;
...
@@ -415,7 +412,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
...
@@ -415,7 +412,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
}
}
class
AnimationDemoHome
extends
StatefulWidget
{
class
AnimationDemoHome
extends
StatefulWidget
{
const
AnimationDemoHome
({
Key
?
key
})
:
super
(
key:
key
);
const
AnimationDemoHome
({
super
.
key
}
);
static
const
String
routeName
=
'/animation'
;
static
const
String
routeName
=
'/animation'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/animation/widgets.dart
View file @
89b437e6
...
@@ -10,8 +10,7 @@ const double kSectionIndicatorWidth = 32.0;
...
@@ -10,8 +10,7 @@ const double kSectionIndicatorWidth = 32.0;
// The card for a single section. Displays the section's gradient and background image.
// The card for a single section. Displays the section's gradient and background image.
class
SectionCard
extends
StatelessWidget
{
class
SectionCard
extends
StatelessWidget
{
const
SectionCard
({
Key
?
key
,
required
this
.
section
})
const
SectionCard
({
super
.
key
,
required
this
.
section
});
:
super
(
key:
key
);
final
Section
section
;
final
Section
section
;
...
@@ -45,12 +44,11 @@ class SectionCard extends StatelessWidget {
...
@@ -45,12 +44,11 @@ class SectionCard extends StatelessWidget {
// offset a little. It's supposed to look sort-of 3D.
// offset a little. It's supposed to look sort-of 3D.
class
SectionTitle
extends
StatelessWidget
{
class
SectionTitle
extends
StatelessWidget
{
const
SectionTitle
({
const
SectionTitle
({
Key
?
key
,
super
.
key
,
required
this
.
section
,
required
this
.
section
,
required
this
.
scale
,
required
this
.
scale
,
required
this
.
opacity
,
required
this
.
opacity
,
})
:
assert
(
opacity
>=
0.0
&&
opacity
<=
1.0
),
})
:
assert
(
opacity
>=
0.0
&&
opacity
<=
1.0
);
super
(
key:
key
);
final
Section
section
;
final
Section
section
;
final
double
scale
;
final
double
scale
;
...
@@ -94,7 +92,7 @@ class SectionTitle extends StatelessWidget {
...
@@ -94,7 +92,7 @@ class SectionTitle extends StatelessWidget {
// Small horizontal bar that indicates the selected section.
// Small horizontal bar that indicates the selected section.
class
SectionIndicator
extends
StatelessWidget
{
class
SectionIndicator
extends
StatelessWidget
{
const
SectionIndicator
({
Key
?
key
,
this
.
opacity
=
1.0
})
:
super
(
key:
key
);
const
SectionIndicator
({
super
.
key
,
this
.
opacity
=
1.0
}
);
final
double
opacity
;
final
double
opacity
;
...
@@ -112,10 +110,9 @@ class SectionIndicator extends StatelessWidget {
...
@@ -112,10 +110,9 @@ class SectionIndicator extends StatelessWidget {
// Display a single SectionDetail.
// Display a single SectionDetail.
class
SectionDetailView
extends
StatelessWidget
{
class
SectionDetailView
extends
StatelessWidget
{
SectionDetailView
({
Key
?
key
,
required
this
.
detail
})
SectionDetailView
({
super
.
key
,
required
this
.
detail
})
:
assert
(
detail
.
imageAsset
!=
null
),
:
assert
(
detail
.
imageAsset
!=
null
),
assert
((
detail
.
imageAsset
??
detail
.
title
)
!=
null
),
assert
((
detail
.
imageAsset
??
detail
.
title
)
!=
null
);
super
(
key:
key
);
final
SectionDetail
detail
;
final
SectionDetail
detail
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/animation_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'animation/home.dart'
;
import
'animation/home.dart'
;
class
AnimationDemo
extends
StatelessWidget
{
class
AnimationDemo
extends
StatelessWidget
{
const
AnimationDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
AnimationDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/animation'
;
static
const
String
routeName
=
'/animation'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'logic.dart'
;
import
'logic.dart'
;
class
Calculator
extends
StatefulWidget
{
class
Calculator
extends
StatefulWidget
{
const
Calculator
({
Key
?
key
})
:
super
(
key:
key
);
const
Calculator
({
super
.
key
}
);
@override
@override
State
<
Calculator
>
createState
()
=>
CalculatorState
();
State
<
Calculator
>
createState
()
=>
CalculatorState
();
...
@@ -138,7 +138,7 @@ class CalculatorState extends State<Calculator> {
...
@@ -138,7 +138,7 @@ class CalculatorState extends State<Calculator> {
}
}
class
CalcDisplay
extends
StatelessWidget
{
class
CalcDisplay
extends
StatelessWidget
{
const
CalcDisplay
({
Key
?
key
,
this
.
content
})
:
super
(
key:
key
);
const
CalcDisplay
({
super
.
key
,
this
.
content
}
);
final
String
?
content
;
final
String
?
content
;
...
@@ -154,7 +154,7 @@ class CalcDisplay extends StatelessWidget {
...
@@ -154,7 +154,7 @@ class CalcDisplay extends StatelessWidget {
}
}
class
KeyPad
extends
StatelessWidget
{
class
KeyPad
extends
StatelessWidget
{
const
KeyPad
({
Key
?
key
,
this
.
calcState
})
:
super
(
key:
key
);
const
KeyPad
({
super
.
key
,
this
.
calcState
}
);
final
CalculatorState
?
calcState
;
final
CalculatorState
?
calcState
;
...
@@ -222,7 +222,7 @@ class KeyPad extends StatelessWidget {
...
@@ -222,7 +222,7 @@ class KeyPad extends StatelessWidget {
}
}
class
KeyRow
extends
StatelessWidget
{
class
KeyRow
extends
StatelessWidget
{
const
KeyRow
(
this
.
keys
,
{
Key
?
key
})
:
super
(
key:
key
);
const
KeyRow
(
this
.
keys
,
{
super
.
key
}
);
final
List
<
Widget
>
keys
;
final
List
<
Widget
>
keys
;
...
@@ -238,7 +238,7 @@ class KeyRow extends StatelessWidget {
...
@@ -238,7 +238,7 @@ class KeyRow extends StatelessWidget {
}
}
class
CalcKey
extends
StatelessWidget
{
class
CalcKey
extends
StatelessWidget
{
const
CalcKey
(
this
.
text
,
this
.
onTap
,
{
Key
?
key
})
:
super
(
key:
key
);
const
CalcKey
(
this
.
text
,
this
.
onTap
,
{
super
.
key
}
);
final
String
text
;
final
String
text
;
final
GestureTapCallback
onTap
;
final
GestureTapCallback
onTap
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/calculator/logic.dart
View file @
89b437e6
...
@@ -17,7 +17,7 @@ class ExpressionToken {
...
@@ -17,7 +17,7 @@ class ExpressionToken {
/// A token that represents a number.
/// A token that represents a number.
class
NumberToken
extends
ExpressionToken
{
class
NumberToken
extends
ExpressionToken
{
NumberToken
(
String
s
tringRep
,
this
.
number
)
:
super
(
stringRep
);
NumberToken
(
String
s
uper
.
stringRep
,
this
.
number
);
NumberToken
.
fromNumber
(
num
number
)
:
this
(
'
$number
'
,
number
);
NumberToken
.
fromNumber
(
num
number
)
:
this
(
'
$number
'
,
number
);
...
...
dev/integration_tests/flutter_gallery/lib/demo/calculator_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'calculator/home.dart'
;
import
'calculator/home.dart'
;
class
CalculatorDemo
extends
StatelessWidget
{
class
CalculatorDemo
extends
StatelessWidget
{
const
CalculatorDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CalculatorDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/calculator'
;
static
const
String
routeName
=
'/calculator'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/colors_demo.dart
View file @
89b437e6
...
@@ -42,11 +42,11 @@ final List<Palette> allPalettes = <Palette>[
...
@@ -42,11 +42,11 @@ final List<Palette> allPalettes = <Palette>[
class
ColorItem
extends
StatelessWidget
{
class
ColorItem
extends
StatelessWidget
{
const
ColorItem
({
const
ColorItem
({
Key
?
key
,
super
.
key
,
required
this
.
index
,
required
this
.
index
,
required
this
.
color
,
required
this
.
color
,
this
.
prefix
=
''
,
this
.
prefix
=
''
,
})
:
super
(
key:
key
)
;
});
final
int
index
;
final
int
index
;
final
Color
color
;
final
Color
color
;
...
@@ -80,10 +80,9 @@ class ColorItem extends StatelessWidget {
...
@@ -80,10 +80,9 @@ class ColorItem extends StatelessWidget {
class
PaletteTabView
extends
StatelessWidget
{
class
PaletteTabView
extends
StatelessWidget
{
PaletteTabView
({
PaletteTabView
({
Key
?
key
,
super
.
key
,
required
this
.
colors
,
required
this
.
colors
,
})
:
assert
(
colors
.
isValid
),
})
:
assert
(
colors
.
isValid
);
super
(
key:
key
);
final
Palette
colors
;
final
Palette
colors
;
...
@@ -119,7 +118,7 @@ class PaletteTabView extends StatelessWidget {
...
@@ -119,7 +118,7 @@ class PaletteTabView extends StatelessWidget {
}
}
class
ColorsDemo
extends
StatelessWidget
{
class
ColorsDemo
extends
StatelessWidget
{
const
ColorsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ColorsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/colors'
;
static
const
String
routeName
=
'/colors'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/contacts_demo.dart
View file @
89b437e6
...
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
...
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
class
_ContactCategory
extends
StatelessWidget
{
class
_ContactCategory
extends
StatelessWidget
{
const
_ContactCategory
({
Key
?
key
,
this
.
icon
,
this
.
children
})
:
super
(
key:
key
);
const
_ContactCategory
({
this
.
icon
,
this
.
children
}
);
final
IconData
?
icon
;
final
IconData
?
icon
;
final
List
<
Widget
>?
children
;
final
List
<
Widget
>?
children
;
...
@@ -42,9 +42,8 @@ class _ContactCategory extends StatelessWidget {
...
@@ -42,9 +42,8 @@ class _ContactCategory extends StatelessWidget {
}
}
class
_ContactItem
extends
StatelessWidget
{
class
_ContactItem
extends
StatelessWidget
{
const
_ContactItem
({
Key
?
key
,
this
.
icon
,
required
this
.
lines
,
this
.
tooltip
,
this
.
onPressed
})
const
_ContactItem
({
this
.
icon
,
required
this
.
lines
,
this
.
tooltip
,
this
.
onPressed
})
:
assert
(
lines
.
length
>
1
),
:
assert
(
lines
.
length
>
1
);
super
(
key:
key
);
final
IconData
?
icon
;
final
IconData
?
icon
;
final
List
<
String
>
lines
;
final
List
<
String
>
lines
;
...
@@ -86,7 +85,7 @@ class _ContactItem extends StatelessWidget {
...
@@ -86,7 +85,7 @@ class _ContactItem extends StatelessWidget {
}
}
class
ContactsDemo
extends
StatefulWidget
{
class
ContactsDemo
extends
StatefulWidget
{
const
ContactsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ContactsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/contacts'
;
static
const
String
routeName
=
'/contacts'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_activity_indicator_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoProgressIndicatorDemo
extends
StatelessWidget
{
class
CupertinoProgressIndicatorDemo
extends
StatelessWidget
{
const
CupertinoProgressIndicatorDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoProgressIndicatorDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/progress_indicator'
;
static
const
String
routeName
=
'/cupertino/progress_indicator'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoAlertDemo
extends
StatefulWidget
{
class
CupertinoAlertDemo
extends
StatefulWidget
{
const
CupertinoAlertDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoAlertDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/alert'
;
static
const
String
routeName
=
'/cupertino/alert'
;
...
@@ -198,7 +198,7 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
...
@@ -198,7 +198,7 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
}
}
class
CupertinoDessertDialog
extends
StatelessWidget
{
class
CupertinoDessertDialog
extends
StatelessWidget
{
const
CupertinoDessertDialog
({
Key
?
key
,
this
.
title
,
this
.
content
})
:
super
(
key:
key
);
const
CupertinoDessertDialog
({
super
.
key
,
this
.
title
,
this
.
content
}
);
final
Widget
?
title
;
final
Widget
?
title
;
final
Widget
?
content
;
final
Widget
?
content
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoButtonsDemo
extends
StatefulWidget
{
class
CupertinoButtonsDemo
extends
StatefulWidget
{
const
CupertinoButtonsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoButtonsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/buttons'
;
static
const
String
routeName
=
'/cupertino/buttons'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
View file @
89b437e6
...
@@ -32,14 +32,13 @@ const List<String> coolColorNames = <String>[
...
@@ -32,14 +32,13 @@ const List<String> coolColorNames = <String>[
const
int
_kChildCount
=
50
;
const
int
_kChildCount
=
50
;
class
CupertinoNavigationDemo
extends
StatelessWidget
{
class
CupertinoNavigationDemo
extends
StatelessWidget
{
CupertinoNavigationDemo
({
Key
?
key
,
this
.
randomSeed
})
CupertinoNavigationDemo
({
super
.
key
,
this
.
randomSeed
})
:
colorItems
=
List
<
Color
>.
generate
(
_kChildCount
,
(
int
index
)
{
:
colorItems
=
List
<
Color
>.
generate
(
_kChildCount
,
(
int
index
)
{
return
coolColors
[
math
.
Random
(
randomSeed
).
nextInt
(
coolColors
.
length
)];
return
coolColors
[
math
.
Random
(
randomSeed
).
nextInt
(
coolColors
.
length
)];
})
,
})
,
colorNameItems
=
List
<
String
>.
generate
(
_kChildCount
,
(
int
index
)
{
colorNameItems
=
List
<
String
>.
generate
(
_kChildCount
,
(
int
index
)
{
return
coolColorNames
[
math
.
Random
(
randomSeed
).
nextInt
(
coolColorNames
.
length
)];
return
coolColorNames
[
math
.
Random
(
randomSeed
).
nextInt
(
coolColorNames
.
length
)];
}),
});
super
(
key:
key
);
static
const
String
routeName
=
'/cupertino/navigation'
;
static
const
String
routeName
=
'/cupertino/navigation'
;
...
@@ -105,7 +104,7 @@ class CupertinoNavigationDemo extends StatelessWidget {
...
@@ -105,7 +104,7 @@ class CupertinoNavigationDemo extends StatelessWidget {
}
}
class
ExitButton
extends
StatelessWidget
{
class
ExitButton
extends
StatelessWidget
{
const
ExitButton
({
Key
?
key
})
:
super
(
key:
key
);
const
ExitButton
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -135,11 +134,11 @@ final Widget trailingButtons = Row(
...
@@ -135,11 +134,11 @@ final Widget trailingButtons = Row(
class
CupertinoDemoTab1
extends
StatelessWidget
{
class
CupertinoDemoTab1
extends
StatelessWidget
{
const
CupertinoDemoTab1
({
const
CupertinoDemoTab1
({
Key
?
key
,
super
.
key
,
this
.
colorItems
,
this
.
colorItems
,
this
.
colorNameItems
,
this
.
colorNameItems
,
this
.
randomSeed
,
this
.
randomSeed
,
})
:
super
(
key:
key
)
;
});
final
List
<
Color
>?
colorItems
;
final
List
<
Color
>?
colorItems
;
final
List
<
String
>?
colorNameItems
;
final
List
<
String
>?
colorNameItems
;
...
@@ -186,13 +185,13 @@ class CupertinoDemoTab1 extends StatelessWidget {
...
@@ -186,13 +185,13 @@ class CupertinoDemoTab1 extends StatelessWidget {
class
Tab1RowItem
extends
StatelessWidget
{
class
Tab1RowItem
extends
StatelessWidget
{
const
Tab1RowItem
({
const
Tab1RowItem
({
Key
?
key
,
super
.
key
,
this
.
index
,
this
.
index
,
this
.
lastItem
,
this
.
lastItem
,
this
.
color
,
this
.
color
,
this
.
colorName
,
this
.
colorName
,
this
.
randomSeed
,
this
.
randomSeed
,
})
:
super
(
key:
key
)
;
});
final
int
?
index
;
final
int
?
index
;
final
bool
?
lastItem
;
final
bool
?
lastItem
;
...
@@ -290,7 +289,7 @@ class Tab1RowItem extends StatelessWidget {
...
@@ -290,7 +289,7 @@ class Tab1RowItem extends StatelessWidget {
}
}
class
Tab1ItemPage
extends
StatefulWidget
{
class
Tab1ItemPage
extends
StatefulWidget
{
const
Tab1ItemPage
({
Key
?
key
,
this
.
color
,
this
.
colorName
,
this
.
index
,
this
.
randomSeed
})
:
super
(
key:
key
);
const
Tab1ItemPage
({
super
.
key
,
this
.
color
,
this
.
colorName
,
this
.
index
,
this
.
randomSeed
}
);
final
Color
?
color
;
final
Color
?
color
;
final
String
?
colorName
;
final
String
?
colorName
;
...
@@ -437,7 +436,7 @@ class Tab1ItemPageState extends State<Tab1ItemPage> {
...
@@ -437,7 +436,7 @@ class Tab1ItemPageState extends State<Tab1ItemPage> {
}
}
class
CupertinoDemoTab2
extends
StatelessWidget
{
class
CupertinoDemoTab2
extends
StatelessWidget
{
const
CupertinoDemoTab2
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoDemoTab2
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -461,7 +460,7 @@ class CupertinoDemoTab2 extends StatelessWidget {
...
@@ -461,7 +460,7 @@ class CupertinoDemoTab2 extends StatelessWidget {
}
}
class
Tab2Header
extends
StatelessWidget
{
class
Tab2Header
extends
StatelessWidget
{
const
Tab2Header
({
Key
?
key
})
:
super
(
key:
key
);
const
Tab2Header
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -589,7 +588,7 @@ enum Tab2ConversationBubbleColor {
...
@@ -589,7 +588,7 @@ enum Tab2ConversationBubbleColor {
}
}
class
Tab2ConversationBubble
extends
StatelessWidget
{
class
Tab2ConversationBubble
extends
StatelessWidget
{
const
Tab2ConversationBubble
({
Key
?
key
,
this
.
text
,
this
.
color
})
:
super
(
key:
key
);
const
Tab2ConversationBubble
({
super
.
key
,
this
.
text
,
this
.
color
}
);
final
String
?
text
;
final
String
?
text
;
final
Tab2ConversationBubbleColor
?
color
;
final
Tab2ConversationBubbleColor
?
color
;
...
@@ -633,7 +632,7 @@ class Tab2ConversationBubble extends StatelessWidget {
...
@@ -633,7 +632,7 @@ class Tab2ConversationBubble extends StatelessWidget {
}
}
class
Tab2ConversationAvatar
extends
StatelessWidget
{
class
Tab2ConversationAvatar
extends
StatelessWidget
{
const
Tab2ConversationAvatar
({
Key
?
key
,
this
.
text
,
this
.
color
})
:
super
(
key:
key
);
const
Tab2ConversationAvatar
({
super
.
key
,
this
.
text
,
this
.
color
}
);
final
String
?
text
;
final
String
?
text
;
final
Color
?
color
;
final
Color
?
color
;
...
@@ -672,7 +671,7 @@ class Tab2ConversationAvatar extends StatelessWidget {
...
@@ -672,7 +671,7 @@ class Tab2ConversationAvatar extends StatelessWidget {
}
}
class
Tab2ConversationRow
extends
StatelessWidget
{
class
Tab2ConversationRow
extends
StatelessWidget
{
const
Tab2ConversationRow
({
Key
?
key
,
this
.
avatar
,
this
.
text
})
:
super
(
key:
key
);
const
Tab2ConversationRow
({
super
.
key
,
this
.
avatar
,
this
.
text
}
);
final
Tab2ConversationAvatar
?
avatar
;
final
Tab2ConversationAvatar
?
avatar
;
final
String
?
text
;
final
String
?
text
;
...
@@ -742,7 +741,7 @@ List<Widget> buildTab2Conversation() {
...
@@ -742,7 +741,7 @@ List<Widget> buildTab2Conversation() {
}
}
class
CupertinoDemoTab3
extends
StatelessWidget
{
class
CupertinoDemoTab3
extends
StatelessWidget
{
const
CupertinoDemoTab3
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoDemoTab3
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -794,7 +793,7 @@ class CupertinoDemoTab3 extends StatelessWidget {
...
@@ -794,7 +793,7 @@ class CupertinoDemoTab3 extends StatelessWidget {
}
}
class
Tab3Dialog
extends
StatelessWidget
{
class
Tab3Dialog
extends
StatelessWidget
{
const
Tab3Dialog
({
Key
?
key
})
:
super
(
key:
key
);
const
Tab3Dialog
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart
View file @
89b437e6
...
@@ -12,7 +12,7 @@ const double _kPickerSheetHeight = 216.0;
...
@@ -12,7 +12,7 @@ const double _kPickerSheetHeight = 216.0;
const
double
_kPickerItemHeight
=
32.0
;
const
double
_kPickerItemHeight
=
32.0
;
class
CupertinoPickerDemo
extends
StatefulWidget
{
class
CupertinoPickerDemo
extends
StatefulWidget
{
const
CupertinoPickerDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoPickerDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/picker'
;
static
const
String
routeName
=
'/cupertino/picker'
;
...
@@ -22,9 +22,8 @@ class CupertinoPickerDemo extends StatefulWidget {
...
@@ -22,9 +22,8 @@ class CupertinoPickerDemo extends StatefulWidget {
class
_BottomPicker
extends
StatelessWidget
{
class
_BottomPicker
extends
StatelessWidget
{
const
_BottomPicker
({
const
_BottomPicker
({
Key
?
key
,
required
this
.
child
,
required
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
Widget
child
;
final
Widget
child
;
...
@@ -54,9 +53,8 @@ class _BottomPicker extends StatelessWidget {
...
@@ -54,9 +53,8 @@ class _BottomPicker extends StatelessWidget {
class
_Menu
extends
StatelessWidget
{
class
_Menu
extends
StatelessWidget
{
const
_Menu
({
const
_Menu
({
Key
?
key
,
required
this
.
children
,
required
this
.
children
,
})
:
super
(
key:
key
)
;
});
final
List
<
Widget
>
children
;
final
List
<
Widget
>
children
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
View file @
89b437e6
...
@@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoRefreshControlDemo
extends
StatefulWidget
{
class
CupertinoRefreshControlDemo
extends
StatefulWidget
{
const
CupertinoRefreshControlDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoRefreshControlDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/refresh'
;
static
const
String
routeName
=
'/cupertino/refresh'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_segmented_control_demo.dart
View file @
89b437e6
...
@@ -12,7 +12,7 @@ const Color _kKeyPenumbraOpacity = Color(0x24000000); // alpha = 0.14
...
@@ -12,7 +12,7 @@ const Color _kKeyPenumbraOpacity = Color(0x24000000); // alpha = 0.14
const
Color
_kAmbientShadowOpacity
=
Color
(
0x1F000000
);
// alpha = 0.12
const
Color
_kAmbientShadowOpacity
=
Color
(
0x1F000000
);
// alpha = 0.12
class
CupertinoSegmentedControlDemo
extends
StatefulWidget
{
class
CupertinoSegmentedControlDemo
extends
StatefulWidget
{
const
CupertinoSegmentedControlDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoSegmentedControlDemo
({
super
.
key
}
);
static
const
String
routeName
=
'cupertino/segmented_control'
;
static
const
String
routeName
=
'cupertino/segmented_control'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoSliderDemo
extends
StatefulWidget
{
class
CupertinoSliderDemo
extends
StatefulWidget
{
const
CupertinoSliderDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoSliderDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/slider'
;
static
const
String
routeName
=
'/cupertino/slider'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
CupertinoSwitchDemo
extends
StatefulWidget
{
class
CupertinoSwitchDemo
extends
StatefulWidget
{
const
CupertinoSwitchDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoSwitchDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/switch'
;
static
const
String
routeName
=
'/cupertino/switch'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
View file @
89b437e6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
class
CupertinoTextFieldDemo
extends
StatefulWidget
{
class
CupertinoTextFieldDemo
extends
StatefulWidget
{
const
CupertinoTextFieldDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CupertinoTextFieldDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/cupertino/text_fields'
;
static
const
String
routeName
=
'/cupertino/text_fields'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/fortnightly/fortnightly.dart
View file @
89b437e6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
FortnightlyDemo
extends
StatelessWidget
{
class
FortnightlyDemo
extends
StatelessWidget
{
const
FortnightlyDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
FortnightlyDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/fortnightly'
;
static
const
String
routeName
=
'/fortnightly'
;
...
@@ -33,7 +33,7 @@ class FortnightlyDemo extends StatelessWidget {
...
@@ -33,7 +33,7 @@ class FortnightlyDemo extends StatelessWidget {
}
}
class
ShortAppBar
extends
StatelessWidget
{
class
ShortAppBar
extends
StatelessWidget
{
const
ShortAppBar
({
Key
?
key
,
this
.
onBackPressed
})
:
super
(
key:
key
);
const
ShortAppBar
({
super
.
key
,
this
.
onBackPressed
}
);
final
VoidCallback
?
onBackPressed
;
final
VoidCallback
?
onBackPressed
;
...
@@ -68,7 +68,7 @@ class ShortAppBar extends StatelessWidget {
...
@@ -68,7 +68,7 @@ class ShortAppBar extends StatelessWidget {
}
}
class
FruitPage
extends
StatelessWidget
{
class
FruitPage
extends
StatelessWidget
{
const
FruitPage
({
Key
?
key
})
:
super
(
key:
key
);
const
FruitPage
({
super
.
key
}
);
static
final
String
paragraph1
=
'''
static
final
String
paragraph1
=
'''
Have you ever held a quince? It'
s
strange
;
Have you ever held a quince? It'
s
strange
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/images_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../gallery/demo.dart'
;
import
'../gallery/demo.dart'
;
class
ImagesDemo
extends
StatelessWidget
{
class
ImagesDemo
extends
StatelessWidget
{
const
ImagesDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ImagesDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/images'
;
static
const
String
routeName
=
'/images'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/backdrop_demo.dart
View file @
89b437e6
...
@@ -95,7 +95,7 @@ const List<Category> allCategories = <Category>[
...
@@ -95,7 +95,7 @@ const List<Category> allCategories = <Category>[
];
];
class
CategoryView
extends
StatelessWidget
{
class
CategoryView
extends
StatelessWidget
{
const
CategoryView
({
Key
?
key
,
this
.
category
})
:
super
(
key:
key
);
const
CategoryView
({
super
.
key
,
this
.
category
}
);
final
Category
?
category
;
final
Category
?
category
;
...
@@ -149,13 +149,13 @@ class CategoryView extends StatelessWidget {
...
@@ -149,13 +149,13 @@ class CategoryView extends StatelessWidget {
// BackdropDemo.
// BackdropDemo.
class
BackdropPanel
extends
StatelessWidget
{
class
BackdropPanel
extends
StatelessWidget
{
const
BackdropPanel
({
const
BackdropPanel
({
Key
?
key
,
super
.
key
,
this
.
onTap
,
this
.
onTap
,
this
.
onVerticalDragUpdate
,
this
.
onVerticalDragUpdate
,
this
.
onVerticalDragEnd
,
this
.
onVerticalDragEnd
,
this
.
title
,
this
.
title
,
this
.
child
,
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
VoidCallback
?
onTap
;
final
VoidCallback
?
onTap
;
final
GestureDragUpdateCallback
?
onVerticalDragUpdate
;
final
GestureDragUpdateCallback
?
onVerticalDragUpdate
;
...
@@ -204,9 +204,9 @@ class BackdropPanel extends StatelessWidget {
...
@@ -204,9 +204,9 @@ class BackdropPanel extends StatelessWidget {
// Cross fades between 'Select a Category' and 'Asset Viewer'.
// Cross fades between 'Select a Category' and 'Asset Viewer'.
class
BackdropTitle
extends
AnimatedWidget
{
class
BackdropTitle
extends
AnimatedWidget
{
const
BackdropTitle
({
const
BackdropTitle
({
Key
?
key
,
super
.
key
,
required
Animation
<
double
>
listenable
,
required
Animation
<
double
>
super
.
listenable
,
})
:
super
(
key:
key
,
listenable:
listenable
)
;
});
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -239,7 +239,7 @@ class BackdropTitle extends AnimatedWidget {
...
@@ -239,7 +239,7 @@ class BackdropTitle extends AnimatedWidget {
// This widget is essentially the backdrop itself.
// This widget is essentially the backdrop itself.
class
BackdropDemo
extends
StatefulWidget
{
class
BackdropDemo
extends
StatefulWidget
{
const
BackdropDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
BackdropDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/backdrop'
;
static
const
String
routeName
=
'/material/backdrop'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/banner_demo.dart
View file @
89b437e6
...
@@ -13,7 +13,7 @@ enum BannerDemoAction {
...
@@ -13,7 +13,7 @@ enum BannerDemoAction {
}
}
class
BannerDemo
extends
StatefulWidget
{
class
BannerDemo
extends
StatefulWidget
{
const
BannerDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
BannerDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/banner'
;
static
const
String
routeName
=
'/material/banner'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
BottomAppBarDemo
extends
StatefulWidget
{
class
BottomAppBarDemo
extends
StatefulWidget
{
const
BottomAppBarDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
BottomAppBarDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/bottom_app_bar'
;
static
const
String
routeName
=
'/material/bottom_app_bar'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart
View file @
89b437e6
...
@@ -75,7 +75,7 @@ class NavigationIconView {
...
@@ -75,7 +75,7 @@ class NavigationIconView {
}
}
class
CustomIcon
extends
StatelessWidget
{
class
CustomIcon
extends
StatelessWidget
{
const
CustomIcon
({
Key
?
key
})
:
super
(
key:
key
);
const
CustomIcon
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -90,7 +90,7 @@ class CustomIcon extends StatelessWidget {
...
@@ -90,7 +90,7 @@ class CustomIcon extends StatelessWidget {
}
}
class
CustomInactiveIcon
extends
StatelessWidget
{
class
CustomInactiveIcon
extends
StatelessWidget
{
const
CustomInactiveIcon
({
Key
?
key
})
:
super
(
key:
key
);
const
CustomInactiveIcon
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -107,7 +107,7 @@ class CustomInactiveIcon extends StatelessWidget {
...
@@ -107,7 +107,7 @@ class CustomInactiveIcon extends StatelessWidget {
}
}
class
BottomNavigationDemo
extends
StatefulWidget
{
class
BottomNavigationDemo
extends
StatefulWidget
{
const
BottomNavigationDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
BottomNavigationDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/bottom_navigation'
;
static
const
String
routeName
=
'/material/bottom_navigation'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart
View file @
89b437e6
...
@@ -46,7 +46,7 @@ const String _actionText =
...
@@ -46,7 +46,7 @@ const String _actionText =
const
String
_actionCode
=
'buttons_action'
;
const
String
_actionCode
=
'buttons_action'
;
class
ButtonsDemo
extends
StatefulWidget
{
class
ButtonsDemo
extends
StatefulWidget
{
const
ButtonsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ButtonsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/buttons'
;
static
const
String
routeName
=
'/material/buttons'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart
View file @
89b437e6
...
@@ -64,8 +64,7 @@ const List<TravelDestination> destinations = <TravelDestination>[
...
@@ -64,8 +64,7 @@ const List<TravelDestination> destinations = <TravelDestination>[
];
];
class
TravelDestinationItem
extends
StatelessWidget
{
class
TravelDestinationItem
extends
StatelessWidget
{
const
TravelDestinationItem
({
Key
?
key
,
required
this
.
destination
,
this
.
shape
})
const
TravelDestinationItem
({
super
.
key
,
required
this
.
destination
,
this
.
shape
});
:
super
(
key:
key
);
// This height will allow for all the Card's content to fit comfortably within the card.
// This height will allow for all the Card's content to fit comfortably within the card.
static
const
double
height
=
338.0
;
static
const
double
height
=
338.0
;
...
@@ -99,8 +98,7 @@ class TravelDestinationItem extends StatelessWidget {
...
@@ -99,8 +98,7 @@ class TravelDestinationItem extends StatelessWidget {
}
}
class
TappableTravelDestinationItem
extends
StatelessWidget
{
class
TappableTravelDestinationItem
extends
StatelessWidget
{
const
TappableTravelDestinationItem
({
Key
?
key
,
required
this
.
destination
,
this
.
shape
})
const
TappableTravelDestinationItem
({
super
.
key
,
required
this
.
destination
,
this
.
shape
});
:
super
(
key:
key
);
// This height will allow for all the Card's content to fit comfortably within the card.
// This height will allow for all the Card's content to fit comfortably within the card.
static
const
double
height
=
298.0
;
static
const
double
height
=
298.0
;
...
@@ -143,8 +141,7 @@ class TappableTravelDestinationItem extends StatelessWidget {
...
@@ -143,8 +141,7 @@ class TappableTravelDestinationItem extends StatelessWidget {
}
}
class
SelectableTravelDestinationItem
extends
StatefulWidget
{
class
SelectableTravelDestinationItem
extends
StatefulWidget
{
const
SelectableTravelDestinationItem
({
Key
?
key
,
required
this
.
destination
,
this
.
shape
})
const
SelectableTravelDestinationItem
({
super
.
key
,
required
this
.
destination
,
this
.
shape
});
:
super
(
key:
key
);
final
TravelDestination
destination
;
final
TravelDestination
destination
;
final
ShapeBorder
?
shape
;
final
ShapeBorder
?
shape
;
...
@@ -222,9 +219,9 @@ class _SelectableTravelDestinationItemState extends State<SelectableTravelDestin
...
@@ -222,9 +219,9 @@ class _SelectableTravelDestinationItemState extends State<SelectableTravelDestin
class
SectionTitle
extends
StatelessWidget
{
class
SectionTitle
extends
StatelessWidget
{
const
SectionTitle
({
const
SectionTitle
({
Key
?
key
,
super
.
key
,
this
.
title
,
this
.
title
,
})
:
super
(
key:
key
)
;
});
final
String
?
title
;
final
String
?
title
;
...
@@ -241,8 +238,7 @@ class SectionTitle extends StatelessWidget {
...
@@ -241,8 +238,7 @@ class SectionTitle extends StatelessWidget {
}
}
class
TravelDestinationContent
extends
StatelessWidget
{
class
TravelDestinationContent
extends
StatelessWidget
{
const
TravelDestinationContent
({
Key
?
key
,
required
this
.
destination
})
const
TravelDestinationContent
({
super
.
key
,
required
this
.
destination
});
:
super
(
key:
key
);
final
TravelDestination
destination
;
final
TravelDestination
destination
;
...
@@ -339,7 +335,7 @@ class TravelDestinationContent extends StatelessWidget {
...
@@ -339,7 +335,7 @@ class TravelDestinationContent extends StatelessWidget {
}
}
class
CardsDemo
extends
StatefulWidget
{
class
CardsDemo
extends
StatefulWidget
{
const
CardsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
CardsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/cards'
;
static
const
String
routeName
=
'/material/cards'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart
View file @
89b437e6
...
@@ -88,10 +88,9 @@ const Map<String, Set<String>> _materialActions = <String, Set<String>>{
...
@@ -88,10 +88,9 @@ const Map<String, Set<String>> _materialActions = <String, Set<String>>{
class
_ChipsTile
extends
StatelessWidget
{
class
_ChipsTile
extends
StatelessWidget
{
const
_ChipsTile
({
const
_ChipsTile
({
Key
?
key
,
this
.
label
,
this
.
label
,
this
.
children
,
this
.
children
,
})
:
super
(
key:
key
)
;
});
final
String
?
label
;
final
String
?
label
;
final
List
<
Widget
>?
children
;
final
List
<
Widget
>?
children
;
...
@@ -135,7 +134,7 @@ class _ChipsTile extends StatelessWidget {
...
@@ -135,7 +134,7 @@ class _ChipsTile extends StatelessWidget {
}
}
class
ChipDemo
extends
StatefulWidget
{
class
ChipDemo
extends
StatefulWidget
{
const
ChipDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ChipDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/chip'
;
static
const
String
routeName
=
'/material/chip'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/data_table_demo.dart
View file @
89b437e6
...
@@ -142,7 +142,7 @@ class DessertDataSource extends DataTableSource {
...
@@ -142,7 +142,7 @@ class DessertDataSource extends DataTableSource {
}
}
class
DataTableDemo
extends
StatefulWidget
{
class
DataTableDemo
extends
StatefulWidget
{
const
DataTableDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
DataTableDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/data-table'
;
static
const
String
routeName
=
'/material/data-table'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart
View file @
89b437e6
...
@@ -9,12 +9,11 @@ import '../../gallery/demo.dart';
...
@@ -9,12 +9,11 @@ import '../../gallery/demo.dart';
class
_InputDropdown
extends
StatelessWidget
{
class
_InputDropdown
extends
StatelessWidget
{
const
_InputDropdown
({
const
_InputDropdown
({
Key
?
key
,
this
.
labelText
,
this
.
labelText
,
this
.
valueText
,
this
.
valueText
,
this
.
valueStyle
,
this
.
valueStyle
,
this
.
onPressed
,
this
.
onPressed
,
})
:
super
(
key:
key
)
;
});
final
String
?
labelText
;
final
String
?
labelText
;
final
String
?
valueText
;
final
String
?
valueText
;
...
@@ -47,13 +46,12 @@ class _InputDropdown extends StatelessWidget {
...
@@ -47,13 +46,12 @@ class _InputDropdown extends StatelessWidget {
class
_DateTimePicker
extends
StatelessWidget
{
class
_DateTimePicker
extends
StatelessWidget
{
const
_DateTimePicker
({
const
_DateTimePicker
({
Key
?
key
,
this
.
labelText
,
this
.
labelText
,
this
.
selectedDate
,
this
.
selectedDate
,
this
.
selectedTime
,
this
.
selectedTime
,
this
.
selectDate
,
this
.
selectDate
,
this
.
selectTime
,
this
.
selectTime
,
})
:
super
(
key:
key
)
;
});
final
String
?
labelText
;
final
String
?
labelText
;
final
DateTime
?
selectedDate
;
final
DateTime
?
selectedDate
;
...
@@ -111,7 +109,7 @@ class _DateTimePicker extends StatelessWidget {
...
@@ -111,7 +109,7 @@ class _DateTimePicker extends StatelessWidget {
}
}
class
DateAndTimePickerDemo
extends
StatefulWidget
{
class
DateAndTimePickerDemo
extends
StatefulWidget
{
const
DateAndTimePickerDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
DateAndTimePickerDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/date-and-time-pickers'
;
static
const
String
routeName
=
'/material/date-and-time-pickers'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/dialog_demo.dart
View file @
89b437e6
...
@@ -21,7 +21,7 @@ const String _alertWithTitleText =
...
@@ -21,7 +21,7 @@ const String _alertWithTitleText =
'data to Google, even when no apps are running.'
;
'data to Google, even when no apps are running.'
;
class
DialogDemoItem
extends
StatelessWidget
{
class
DialogDemoItem
extends
StatelessWidget
{
const
DialogDemoItem
({
Key
?
key
,
this
.
icon
,
this
.
color
,
this
.
text
,
this
.
onPressed
})
:
super
(
key:
key
);
const
DialogDemoItem
({
super
.
key
,
this
.
icon
,
this
.
color
,
this
.
text
,
this
.
onPressed
}
);
final
IconData
?
icon
;
final
IconData
?
icon
;
final
Color
?
color
;
final
Color
?
color
;
...
@@ -46,7 +46,7 @@ class DialogDemoItem extends StatelessWidget {
...
@@ -46,7 +46,7 @@ class DialogDemoItem extends StatelessWidget {
}
}
class
DialogDemo
extends
StatefulWidget
{
class
DialogDemo
extends
StatefulWidget
{
const
DialogDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
DialogDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/dialog'
;
static
const
String
routeName
=
'/material/dialog'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/drawer_demo.dart
View file @
89b437e6
...
@@ -13,7 +13,7 @@ const String _kAsset2 = 'people/square/sandra.png';
...
@@ -13,7 +13,7 @@ const String _kAsset2 = 'people/square/sandra.png';
const
String
_kGalleryAssetsPackage
=
'flutter_gallery_assets'
;
const
String
_kGalleryAssetsPackage
=
'flutter_gallery_assets'
;
class
DrawerDemo
extends
StatefulWidget
{
class
DrawerDemo
extends
StatefulWidget
{
const
DrawerDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
DrawerDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/drawer'
;
static
const
String
routeName
=
'/material/drawer'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/elevation_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
ElevationDemo
extends
StatefulWidget
{
class
ElevationDemo
extends
StatefulWidget
{
const
ElevationDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ElevationDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/elevation'
;
static
const
String
routeName
=
'/material/elevation'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/expansion_panels_demo.dart
View file @
89b437e6
...
@@ -18,12 +18,12 @@ typedef ValueToString<T> = String? Function(T value);
...
@@ -18,12 +18,12 @@ typedef ValueToString<T> = String? Function(T value);
class
DualHeaderWithHint
extends
StatelessWidget
{
class
DualHeaderWithHint
extends
StatelessWidget
{
const
DualHeaderWithHint
({
const
DualHeaderWithHint
({
Key
?
key
,
super
.
key
,
this
.
name
,
this
.
name
,
this
.
value
,
this
.
value
,
this
.
hint
,
this
.
hint
,
this
.
showHint
,
this
.
showHint
,
})
:
super
(
key:
key
)
;
});
final
String
?
name
;
final
String
?
name
;
final
String
?
value
;
final
String
?
value
;
...
@@ -81,12 +81,12 @@ class DualHeaderWithHint extends StatelessWidget {
...
@@ -81,12 +81,12 @@ class DualHeaderWithHint extends StatelessWidget {
class
CollapsibleBody
extends
StatelessWidget
{
class
CollapsibleBody
extends
StatelessWidget
{
const
CollapsibleBody
({
const
CollapsibleBody
({
Key
?
key
,
super
.
key
,
this
.
margin
=
EdgeInsets
.
zero
,
this
.
margin
=
EdgeInsets
.
zero
,
this
.
child
,
this
.
child
,
this
.
onSave
,
this
.
onSave
,
this
.
onCancel
,
this
.
onCancel
,
})
:
super
(
key:
key
)
;
});
final
EdgeInsets
margin
;
final
EdgeInsets
margin
;
final
Widget
?
child
;
final
Widget
?
child
;
...
@@ -177,7 +177,7 @@ class DemoItem<T> {
...
@@ -177,7 +177,7 @@ class DemoItem<T> {
}
}
class
ExpansionPanelsDemo
extends
StatefulWidget
{
class
ExpansionPanelsDemo
extends
StatefulWidget
{
const
ExpansionPanelsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ExpansionPanelsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/expansion_panels'
;
static
const
String
routeName
=
'/material/expansion_panels'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
ExpansionTileListDemo
extends
StatelessWidget
{
class
ExpansionTileListDemo
extends
StatelessWidget
{
const
ExpansionTileListDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ExpansionTileListDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/expansion-tile-list'
;
static
const
String
routeName
=
'/material/expansion-tile-list'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
View file @
89b437e6
...
@@ -15,10 +15,9 @@ enum DismissDialogAction {
...
@@ -15,10 +15,9 @@ enum DismissDialogAction {
}
}
class
DateTimeItem
extends
StatelessWidget
{
class
DateTimeItem
extends
StatelessWidget
{
DateTimeItem
({
Key
?
key
,
required
DateTime
dateTime
,
required
this
.
onChanged
})
DateTimeItem
({
super
.
key
,
required
DateTime
dateTime
,
required
this
.
onChanged
})
:
date
=
DateTime
(
dateTime
.
year
,
dateTime
.
month
,
dateTime
.
day
),
:
date
=
DateTime
(
dateTime
.
year
,
dateTime
.
month
,
dateTime
.
day
),
time
=
TimeOfDay
(
hour:
dateTime
.
hour
,
minute:
dateTime
.
minute
),
time
=
TimeOfDay
(
hour:
dateTime
.
hour
,
minute:
dateTime
.
minute
);
super
(
key:
key
);
final
DateTime
date
;
final
DateTime
date
;
final
TimeOfDay
time
;
final
TimeOfDay
time
;
...
@@ -93,7 +92,7 @@ class DateTimeItem extends StatelessWidget {
...
@@ -93,7 +92,7 @@ class DateTimeItem extends StatelessWidget {
}
}
class
FullScreenDialogDemo
extends
StatefulWidget
{
class
FullScreenDialogDemo
extends
StatefulWidget
{
const
FullScreenDialogDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
FullScreenDialogDemo
({
super
.
key
}
);
@override
@override
FullScreenDialogDemoState
createState
()
=>
FullScreenDialogDemoState
();
FullScreenDialogDemoState
createState
()
=>
FullScreenDialogDemoState
();
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/grid_list_demo.dart
View file @
89b437e6
...
@@ -38,7 +38,7 @@ class Photo {
...
@@ -38,7 +38,7 @@ class Photo {
}
}
class
GridPhotoViewer
extends
StatefulWidget
{
class
GridPhotoViewer
extends
StatefulWidget
{
const
GridPhotoViewer
({
Key
?
key
,
this
.
photo
})
:
super
(
key:
key
);
const
GridPhotoViewer
({
super
.
key
,
this
.
photo
}
);
final
Photo
?
photo
;
final
Photo
?
photo
;
...
@@ -155,12 +155,11 @@ class _GridPhotoViewerState extends State<GridPhotoViewer> with SingleTickerProv
...
@@ -155,12 +155,11 @@ class _GridPhotoViewerState extends State<GridPhotoViewer> with SingleTickerProv
class
GridDemoPhotoItem
extends
StatelessWidget
{
class
GridDemoPhotoItem
extends
StatelessWidget
{
GridDemoPhotoItem
({
GridDemoPhotoItem
({
Key
?
key
,
super
.
key
,
required
this
.
photo
,
required
this
.
photo
,
required
this
.
tileStyle
,
required
this
.
tileStyle
,
required
this
.
onBannerTap
,
required
this
.
onBannerTap
,
})
:
assert
(
photo
.
isValid
),
})
:
assert
(
photo
.
isValid
);
super
(
key:
key
);
final
Photo
photo
;
final
Photo
photo
;
final
GridDemoTileStyle
tileStyle
;
final
GridDemoTileStyle
tileStyle
;
...
@@ -245,7 +244,7 @@ class GridDemoPhotoItem extends StatelessWidget {
...
@@ -245,7 +244,7 @@ class GridDemoPhotoItem extends StatelessWidget {
}
}
class
GridListDemo
extends
StatefulWidget
{
class
GridListDemo
extends
StatefulWidget
{
const
GridListDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
GridListDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/grid-list'
;
static
const
String
routeName
=
'/material/grid-list'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/icons_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
IconsDemo
extends
StatefulWidget
{
class
IconsDemo
extends
StatefulWidget
{
const
IconsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
IconsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/icons'
;
static
const
String
routeName
=
'/material/icons'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart
View file @
89b437e6
...
@@ -33,7 +33,7 @@ class LeaveBehindItem implements Comparable<LeaveBehindItem> {
...
@@ -33,7 +33,7 @@ class LeaveBehindItem implements Comparable<LeaveBehindItem> {
}
}
class
LeaveBehindDemo
extends
StatefulWidget
{
class
LeaveBehindDemo
extends
StatefulWidget
{
const
LeaveBehindDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
LeaveBehindDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/leave-behind'
;
static
const
String
routeName
=
'/material/leave-behind'
;
...
@@ -188,13 +188,12 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
...
@@ -188,13 +188,12 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
class
_LeaveBehindListItem
extends
StatelessWidget
{
class
_LeaveBehindListItem
extends
StatelessWidget
{
const
_LeaveBehindListItem
({
const
_LeaveBehindListItem
({
Key
?
key
,
required
this
.
item
,
required
this
.
item
,
required
this
.
onArchive
,
required
this
.
onArchive
,
required
this
.
onDelete
,
required
this
.
onDelete
,
required
this
.
dismissDirection
,
required
this
.
dismissDirection
,
required
this
.
confirmDismiss
,
required
this
.
confirmDismiss
,
})
:
super
(
key:
key
)
;
});
final
LeaveBehindItem
item
;
final
LeaveBehindItem
item
;
final
DismissDirection
dismissDirection
;
final
DismissDirection
dismissDirection
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/list_demo.dart
View file @
89b437e6
...
@@ -21,7 +21,7 @@ enum _MaterialListType {
...
@@ -21,7 +21,7 @@ enum _MaterialListType {
}
}
class
ListDemo
extends
StatefulWidget
{
class
ListDemo
extends
StatefulWidget
{
const
ListDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ListDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/list'
;
static
const
String
routeName
=
'/material/list'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/menu_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
MenuDemo
extends
StatefulWidget
{
class
MenuDemo
extends
StatefulWidget
{
const
MenuDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
MenuDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/menu'
;
static
const
String
routeName
=
'/material/menu'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
ModalBottomSheetDemo
extends
StatelessWidget
{
class
ModalBottomSheetDemo
extends
StatelessWidget
{
const
ModalBottomSheetDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ModalBottomSheetDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/modal-bottom-sheet'
;
static
const
String
routeName
=
'/material/modal-bottom-sheet'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/overscroll_demo.dart
View file @
89b437e6
...
@@ -11,7 +11,7 @@ import '../../gallery/demo.dart';
...
@@ -11,7 +11,7 @@ import '../../gallery/demo.dart';
enum
IndicatorType
{
overscroll
,
refresh
}
enum
IndicatorType
{
overscroll
,
refresh
}
class
OverscrollDemo
extends
StatefulWidget
{
class
OverscrollDemo
extends
StatefulWidget
{
const
OverscrollDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
OverscrollDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/overscroll'
;
static
const
String
routeName
=
'/material/overscroll'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/page_selector_demo.dart
View file @
89b437e6
...
@@ -74,7 +74,7 @@ class _PageSelector extends StatelessWidget {
...
@@ -74,7 +74,7 @@ class _PageSelector extends StatelessWidget {
}
}
class
PageSelectorDemo
extends
StatelessWidget
{
class
PageSelectorDemo
extends
StatelessWidget
{
const
PageSelectorDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
PageSelectorDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/page-selector'
;
static
const
String
routeName
=
'/material/page-selector'
;
static
final
List
<
Icon
>
icons
=
<
Icon
>[
static
final
List
<
Icon
>
icons
=
<
Icon
>[
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
PersistentBottomSheetDemo
extends
StatefulWidget
{
class
PersistentBottomSheetDemo
extends
StatefulWidget
{
const
PersistentBottomSheetDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
PersistentBottomSheetDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/persistent-bottom-sheet'
;
static
const
String
routeName
=
'/material/persistent-bottom-sheet'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/progress_indicator_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
ProgressIndicatorDemo
extends
StatefulWidget
{
class
ProgressIndicatorDemo
extends
StatefulWidget
{
const
ProgressIndicatorDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ProgressIndicatorDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/progress-indicator'
;
static
const
String
routeName
=
'/material/progress-indicator'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/reorderable_list_demo.dart
View file @
89b437e6
...
@@ -18,7 +18,7 @@ enum _ReorderableListType {
...
@@ -18,7 +18,7 @@ enum _ReorderableListType {
}
}
class
ReorderableListDemo
extends
StatefulWidget
{
class
ReorderableListDemo
extends
StatefulWidget
{
const
ReorderableListDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ReorderableListDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/reorderable-list'
;
static
const
String
routeName
=
'/material/reorderable-list'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart
View file @
89b437e6
...
@@ -36,7 +36,7 @@ const List<_Page> _allPages = <_Page>[
...
@@ -36,7 +36,7 @@ const List<_Page> _allPages = <_Page>[
];
];
class
ScrollableTabsDemo
extends
StatefulWidget
{
class
ScrollableTabsDemo
extends
StatefulWidget
{
const
ScrollableTabsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ScrollableTabsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/scrollable-tabs'
;
static
const
String
routeName
=
'/material/scrollable-tabs'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/search_demo.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
SearchDemo
extends
StatefulWidget
{
class
SearchDemo
extends
StatefulWidget
{
const
SearchDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
SearchDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/search'
;
static
const
String
routeName
=
'/material/search'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/selection_controls_demo.dart
View file @
89b437e6
...
@@ -28,7 +28,7 @@ const String _switchText =
...
@@ -28,7 +28,7 @@ const String _switchText =
const
String
_switchCode
=
'selectioncontrols_switch'
;
const
String
_switchCode
=
'selectioncontrols_switch'
;
class
SelectionControlsDemo
extends
StatefulWidget
{
class
SelectionControlsDemo
extends
StatefulWidget
{
const
SelectionControlsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
SelectionControlsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/selection-controls'
;
static
const
String
routeName
=
'/material/selection-controls'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart
View file @
89b437e6
...
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
SliderDemo
extends
StatefulWidget
{
class
SliderDemo
extends
StatefulWidget
{
const
SliderDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
SliderDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/slider'
;
static
const
String
routeName
=
'/material/slider'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/snack_bar_demo.dart
View file @
89b437e6
...
@@ -19,7 +19,7 @@ const String _text3 =
...
@@ -19,7 +19,7 @@ const String _text3 =
'By default snackbars automatically disappear after a few seconds '
;
'By default snackbars automatically disappear after a few seconds '
;
class
SnackBarDemo
extends
StatefulWidget
{
class
SnackBarDemo
extends
StatefulWidget
{
const
SnackBarDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
SnackBarDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/snack-bar'
;
static
const
String
routeName
=
'/material/snack-bar'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/tabs_demo.dart
View file @
89b437e6
...
@@ -137,7 +137,7 @@ class _CardDataItem extends StatelessWidget {
...
@@ -137,7 +137,7 @@ class _CardDataItem extends StatelessWidget {
}
}
class
TabsDemo
extends
StatelessWidget
{
class
TabsDemo
extends
StatelessWidget
{
const
TabsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TabsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/tabs'
;
static
const
String
routeName
=
'/material/tabs'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/tabs_fab_demo.dart
View file @
89b437e6
...
@@ -35,7 +35,7 @@ final List<_Page> _allPages = <_Page>[
...
@@ -35,7 +35,7 @@ final List<_Page> _allPages = <_Page>[
];
];
class
TabsFabDemo
extends
StatefulWidget
{
class
TabsFabDemo
extends
StatefulWidget
{
const
TabsFabDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TabsFabDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/tabs-fab'
;
static
const
String
routeName
=
'/material/tabs-fab'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart
View file @
89b437e6
...
@@ -9,7 +9,7 @@ import 'package:flutter/services.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter/services.dart';
import
'../../gallery/demo.dart'
;
import
'../../gallery/demo.dart'
;
class
TextFormFieldDemo
extends
StatefulWidget
{
class
TextFormFieldDemo
extends
StatefulWidget
{
const
TextFormFieldDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TextFormFieldDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/text-form-field'
;
static
const
String
routeName
=
'/material/text-form-field'
;
...
@@ -26,7 +26,7 @@ class PersonData {
...
@@ -26,7 +26,7 @@ class PersonData {
class
PasswordField
extends
StatefulWidget
{
class
PasswordField
extends
StatefulWidget
{
const
PasswordField
({
const
PasswordField
({
Key
?
key
,
super
.
key
,
this
.
fieldKey
,
this
.
fieldKey
,
this
.
hintText
,
this
.
hintText
,
this
.
labelText
,
this
.
labelText
,
...
@@ -34,7 +34,7 @@ class PasswordField extends StatefulWidget {
...
@@ -34,7 +34,7 @@ class PasswordField extends StatefulWidget {
this
.
onSaved
,
this
.
onSaved
,
this
.
validator
,
this
.
validator
,
this
.
onFieldSubmitted
,
this
.
onFieldSubmitted
,
})
:
super
(
key:
key
)
;
});
final
Key
?
fieldKey
;
final
Key
?
fieldKey
;
final
String
?
hintText
;
final
String
?
hintText
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/tooltip_demo.dart
View file @
89b437e6
...
@@ -12,7 +12,7 @@ const String _introText =
...
@@ -12,7 +12,7 @@ const String _introText =
'apps accessible, like screen readers.'
;
'apps accessible, like screen readers.'
;
class
TooltipDemo
extends
StatelessWidget
{
class
TooltipDemo
extends
StatelessWidget
{
const
TooltipDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TooltipDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/material/tooltips'
;
static
const
String
routeName
=
'/material/tooltips'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart
View file @
89b437e6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
PestoDemo
extends
StatelessWidget
{
class
PestoDemo
extends
StatelessWidget
{
const
PestoDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
PestoDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/pesto'
;
static
const
String
routeName
=
'/pesto'
;
...
@@ -28,7 +28,7 @@ final ThemeData _kTheme = ThemeData(
...
@@ -28,7 +28,7 @@ final ThemeData _kTheme = ThemeData(
);
);
class
PestoHome
extends
StatelessWidget
{
class
PestoHome
extends
StatelessWidget
{
const
PestoHome
({
Key
?
key
})
:
super
(
key:
key
);
const
PestoHome
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -37,7 +37,7 @@ class PestoHome extends StatelessWidget {
...
@@ -37,7 +37,7 @@ class PestoHome extends StatelessWidget {
}
}
class
PestoFavorites
extends
StatelessWidget
{
class
PestoFavorites
extends
StatelessWidget
{
const
PestoFavorites
({
Key
?
key
})
:
super
(
key:
key
);
const
PestoFavorites
({
super
.
key
}
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -47,26 +47,21 @@ class PestoFavorites extends StatelessWidget {
...
@@ -47,26 +47,21 @@ class PestoFavorites extends StatelessWidget {
class
PestoStyle
extends
TextStyle
{
class
PestoStyle
extends
TextStyle
{
const
PestoStyle
({
const
PestoStyle
({
double
fontSize
=
12.0
,
double
super
.
fontSize
=
12.0
,
FontWeight
?
fontWeight
,
super
.
fontWeight
,
Color
color
=
Colors
.
black87
,
Color
super
.
color
=
Colors
.
black87
,
double
?
letterSpacing
,
super
.
letterSpacing
,
double
?
height
,
super
.
height
,
})
:
super
(
})
:
super
(
inherit:
false
,
inherit:
false
,
color:
color
,
fontFamily:
'Raleway'
,
fontFamily:
'Raleway'
,
fontSize:
fontSize
,
fontWeight:
fontWeight
,
textBaseline:
TextBaseline
.
alphabetic
,
textBaseline:
TextBaseline
.
alphabetic
,
letterSpacing:
letterSpacing
,
height:
height
,
);
);
}
}
// Displays a grid of recipe cards.
// Displays a grid of recipe cards.
class
RecipeGridPage
extends
StatefulWidget
{
class
RecipeGridPage
extends
StatefulWidget
{
const
RecipeGridPage
({
Key
?
key
,
this
.
recipes
})
:
super
(
key:
key
);
const
RecipeGridPage
({
super
.
key
,
this
.
recipes
}
);
final
List
<
Recipe
?>?
recipes
;
final
List
<
Recipe
?>?
recipes
;
...
@@ -189,7 +184,7 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
...
@@ -189,7 +184,7 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
}
}
class
PestoLogo
extends
StatefulWidget
{
class
PestoLogo
extends
StatefulWidget
{
const
PestoLogo
({
Key
?
key
,
this
.
height
,
this
.
t
})
:
super
(
key:
key
);
const
PestoLogo
({
super
.
key
,
this
.
height
,
this
.
t
}
);
final
double
?
height
;
final
double
?
height
;
final
double
?
t
;
final
double
?
t
;
...
@@ -252,7 +247,7 @@ class _PestoLogoState extends State<PestoLogo> {
...
@@ -252,7 +247,7 @@ class _PestoLogoState extends State<PestoLogo> {
// A card with the recipe's image, author, and title.
// A card with the recipe's image, author, and title.
class
RecipeCard
extends
StatelessWidget
{
class
RecipeCard
extends
StatelessWidget
{
const
RecipeCard
({
Key
?
key
,
this
.
recipe
,
this
.
onTap
})
:
super
(
key:
key
);
const
RecipeCard
({
super
.
key
,
this
.
recipe
,
this
.
onTap
}
);
final
Recipe
?
recipe
;
final
Recipe
?
recipe
;
final
VoidCallback
?
onTap
;
final
VoidCallback
?
onTap
;
...
@@ -314,7 +309,7 @@ class RecipeCard extends StatelessWidget {
...
@@ -314,7 +309,7 @@ class RecipeCard extends StatelessWidget {
// Displays one recipe. Includes the recipe sheet with a background image.
// Displays one recipe. Includes the recipe sheet with a background image.
class
RecipePage
extends
StatefulWidget
{
class
RecipePage
extends
StatefulWidget
{
const
RecipePage
({
Key
?
key
,
this
.
recipe
})
:
super
(
key:
key
);
const
RecipePage
({
super
.
key
,
this
.
recipe
}
);
final
Recipe
?
recipe
;
final
Recipe
?
recipe
;
...
@@ -433,7 +428,7 @@ class _RecipePageState extends State<RecipePage> {
...
@@ -433,7 +428,7 @@ class _RecipePageState extends State<RecipePage> {
/// Displays the recipe's name and instructions.
/// Displays the recipe's name and instructions.
class
RecipeSheet
extends
StatelessWidget
{
class
RecipeSheet
extends
StatelessWidget
{
RecipeSheet
({
Key
?
key
,
this
.
recipe
})
:
super
(
key:
key
);
RecipeSheet
({
super
.
key
,
this
.
recipe
}
);
final
TextStyle
titleStyle
=
const
PestoStyle
(
fontSize:
34.0
);
final
TextStyle
titleStyle
=
const
PestoStyle
(
fontSize:
34.0
);
final
TextStyle
descriptionStyle
=
const
PestoStyle
(
fontSize:
15.0
,
color:
Colors
.
black54
,
height:
24.0
/
15.0
);
final
TextStyle
descriptionStyle
=
const
PestoStyle
(
fontSize:
15.0
,
color:
Colors
.
black54
,
height:
24.0
/
15.0
);
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart
View file @
89b437e6
...
@@ -13,7 +13,7 @@ import 'login.dart';
...
@@ -13,7 +13,7 @@ import 'login.dart';
import
'supplemental/cut_corners_border.dart'
;
import
'supplemental/cut_corners_border.dart'
;
class
ShrineApp
extends
StatefulWidget
{
class
ShrineApp
extends
StatefulWidget
{
const
ShrineApp
({
Key
?
key
})
:
super
(
key:
key
);
const
ShrineApp
({
super
.
key
}
);
@override
@override
State
<
ShrineApp
>
createState
()
=>
_ShrineAppState
();
State
<
ShrineApp
>
createState
()
=>
_ShrineAppState
();
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart
View file @
89b437e6
...
@@ -14,10 +14,9 @@ const double _kPeakVelocityProgress = 0.379146;
...
@@ -14,10 +14,9 @@ const double _kPeakVelocityProgress = 0.379146;
class
_TappableWhileStatusIs
extends
StatefulWidget
{
class
_TappableWhileStatusIs
extends
StatefulWidget
{
const
_TappableWhileStatusIs
(
const
_TappableWhileStatusIs
(
this
.
status
,
{
this
.
status
,
{
Key
?
key
,
this
.
controller
,
this
.
controller
,
this
.
child
,
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
AnimationController
?
controller
;
final
AnimationController
?
controller
;
final
AnimationStatus
status
;
final
AnimationStatus
status
;
...
@@ -72,10 +71,9 @@ class _TappableWhileStatusIsState extends State<_TappableWhileStatusIs> {
...
@@ -72,10 +71,9 @@ class _TappableWhileStatusIsState extends State<_TappableWhileStatusIs> {
class
_FrontLayer
extends
StatelessWidget
{
class
_FrontLayer
extends
StatelessWidget
{
const
_FrontLayer
({
const
_FrontLayer
({
Key
?
key
,
this
.
onTap
,
this
.
onTap
,
this
.
child
,
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
VoidCallback
?
onTap
;
final
VoidCallback
?
onTap
;
final
Widget
?
child
;
final
Widget
?
child
;
...
@@ -109,12 +107,11 @@ class _FrontLayer extends StatelessWidget {
...
@@ -109,12 +107,11 @@ class _FrontLayer extends StatelessWidget {
class
_BackdropTitle
extends
AnimatedWidget
{
class
_BackdropTitle
extends
AnimatedWidget
{
const
_BackdropTitle
({
const
_BackdropTitle
({
Key
?
key
,
required
Animation
<
double
>
super
.
listenable
,
required
Animation
<
double
>
listenable
,
this
.
onPress
,
this
.
onPress
,
required
this
.
frontTitle
,
required
this
.
frontTitle
,
required
this
.
backTitle
,
required
this
.
backTitle
,
})
:
super
(
key:
key
,
listenable:
listenable
)
;
});
final
void
Function
()?
onPress
;
final
void
Function
()?
onPress
;
final
Widget
frontTitle
;
final
Widget
frontTitle
;
...
@@ -198,13 +195,13 @@ class _BackdropTitle extends AnimatedWidget {
...
@@ -198,13 +195,13 @@ class _BackdropTitle extends AnimatedWidget {
/// front or back layer is showing.
/// front or back layer is showing.
class
Backdrop
extends
StatefulWidget
{
class
Backdrop
extends
StatefulWidget
{
const
Backdrop
({
const
Backdrop
({
Key
?
key
,
super
.
key
,
required
this
.
frontLayer
,
required
this
.
frontLayer
,
required
this
.
backLayer
,
required
this
.
backLayer
,
required
this
.
frontTitle
,
required
this
.
frontTitle
,
required
this
.
backTitle
,
required
this
.
backTitle
,
required
this
.
controller
,
required
this
.
controller
,
})
:
super
(
key:
key
)
;
});
final
Widget
frontLayer
;
final
Widget
frontLayer
;
final
Widget
backLayer
;
final
Widget
backLayer
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/category_menu_page.dart
View file @
89b437e6
...
@@ -11,9 +11,9 @@ import 'model/product.dart';
...
@@ -11,9 +11,9 @@ import 'model/product.dart';
class
CategoryMenuPage
extends
StatelessWidget
{
class
CategoryMenuPage
extends
StatelessWidget
{
const
CategoryMenuPage
({
const
CategoryMenuPage
({
Key
?
key
,
super
.
key
,
this
.
onCategoryTap
,
this
.
onCategoryTap
,
})
:
super
(
key:
key
)
;
});
final
VoidCallback
?
onCategoryTap
;
final
VoidCallback
?
onCategoryTap
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
View file @
89b437e6
...
@@ -25,8 +25,7 @@ const double _kCornerRadius = 24.0;
...
@@ -25,8 +25,7 @@ const double _kCornerRadius = 24.0;
const
double
_kWidthForCartIcon
=
64.0
;
const
double
_kWidthForCartIcon
=
64.0
;
class
ExpandingBottomSheet
extends
StatefulWidget
{
class
ExpandingBottomSheet
extends
StatefulWidget
{
const
ExpandingBottomSheet
({
Key
?
key
,
required
this
.
hideController
})
const
ExpandingBottomSheet
({
super
.
key
,
required
this
.
hideController
});
:
super
(
key:
key
);
final
AnimationController
hideController
;
final
AnimationController
hideController
;
...
@@ -403,7 +402,7 @@ class ExpandingBottomSheetState extends State<ExpandingBottomSheet> with TickerP
...
@@ -403,7 +402,7 @@ class ExpandingBottomSheetState extends State<ExpandingBottomSheet> with TickerP
}
}
class
ProductThumbnailRow
extends
StatefulWidget
{
class
ProductThumbnailRow
extends
StatefulWidget
{
const
ProductThumbnailRow
({
Key
?
key
})
:
super
(
key:
key
);
const
ProductThumbnailRow
({
super
.
key
}
);
@override
@override
State
<
ProductThumbnailRow
>
createState
()
=>
_ProductThumbnailRowState
();
State
<
ProductThumbnailRow
>
createState
()
=>
_ProductThumbnailRowState
();
...
@@ -512,7 +511,7 @@ class _ProductThumbnailRowState extends State<ProductThumbnailRow> {
...
@@ -512,7 +511,7 @@ class _ProductThumbnailRowState extends State<ProductThumbnailRow> {
}
}
class
ExtraProductsNumber
extends
StatelessWidget
{
class
ExtraProductsNumber
extends
StatelessWidget
{
const
ExtraProductsNumber
({
Key
?
key
})
:
super
(
key:
key
);
const
ExtraProductsNumber
({
super
.
key
}
);
// Calculates the number to be displayed at the end of the row if there are
// Calculates the number to be displayed at the end of the row if there are
// more than three products in the cart. This calculates overflow products,
// more than three products in the cart. This calculates overflow products,
...
@@ -555,7 +554,7 @@ class ExtraProductsNumber extends StatelessWidget {
...
@@ -555,7 +554,7 @@ class ExtraProductsNumber extends StatelessWidget {
}
}
class
ProductThumbnail
extends
StatelessWidget
{
class
ProductThumbnail
extends
StatelessWidget
{
const
ProductThumbnail
(
this
.
animation
,
this
.
opacityAnimation
,
this
.
product
,
{
Key
?
key
})
:
super
(
key:
key
);
const
ProductThumbnail
(
this
.
animation
,
this
.
opacityAnimation
,
this
.
product
,
{
super
.
key
}
);
final
Animation
<
double
>
animation
;
final
Animation
<
double
>
animation
;
final
Animation
<
double
>
opacityAnimation
;
final
Animation
<
double
>
opacityAnimation
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/home.dart
View file @
89b437e6
...
@@ -12,7 +12,7 @@ import 'model/product.dart';
...
@@ -12,7 +12,7 @@ import 'model/product.dart';
import
'supplemental/asymmetric_view.dart'
;
import
'supplemental/asymmetric_view.dart'
;
class
ProductPage
extends
StatelessWidget
{
class
ProductPage
extends
StatelessWidget
{
const
ProductPage
({
Key
?
key
,
this
.
category
=
Category
.
all
})
:
super
(
key:
key
);
const
ProductPage
({
super
.
key
,
this
.
category
=
Category
.
all
}
);
final
Category
category
;
final
Category
category
;
...
@@ -29,8 +29,8 @@ class HomePage extends StatelessWidget {
...
@@ -29,8 +29,8 @@ class HomePage extends StatelessWidget {
const
HomePage
({
const
HomePage
({
this
.
expandingBottomSheet
,
this
.
expandingBottomSheet
,
this
.
backdrop
,
this
.
backdrop
,
Key
?
key
,
super
.
key
,
})
:
super
(
key:
key
)
;
});
final
ExpandingBottomSheet
?
expandingBottomSheet
;
final
ExpandingBottomSheet
?
expandingBottomSheet
;
final
Backdrop
?
backdrop
;
final
Backdrop
?
backdrop
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart
View file @
89b437e6
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
...
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import
'colors.dart'
;
import
'colors.dart'
;
class
LoginPage
extends
StatefulWidget
{
class
LoginPage
extends
StatefulWidget
{
const
LoginPage
({
Key
?
key
})
:
super
(
key:
key
);
const
LoginPage
({
super
.
key
}
);
@override
@override
State
<
LoginPage
>
createState
()
=>
_LoginPageState
();
State
<
LoginPage
>
createState
()
=>
_LoginPageState
();
...
@@ -123,7 +123,7 @@ class _LoginPageState extends State<LoginPage> {
...
@@ -123,7 +123,7 @@ class _LoginPageState extends State<LoginPage> {
}
}
class
PrimaryColorOverride
extends
StatelessWidget
{
class
PrimaryColorOverride
extends
StatelessWidget
{
const
PrimaryColorOverride
({
Key
?
key
,
this
.
color
,
this
.
child
})
:
super
(
key:
key
);
const
PrimaryColorOverride
({
super
.
key
,
this
.
color
,
this
.
child
}
);
final
Color
?
color
;
final
Color
?
color
;
final
Widget
?
child
;
final
Widget
?
child
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/shopping_cart.dart
View file @
89b437e6
...
@@ -14,7 +14,7 @@ import 'model/product.dart';
...
@@ -14,7 +14,7 @@ import 'model/product.dart';
const
double
_leftColumnWidth
=
60.0
;
const
double
_leftColumnWidth
=
60.0
;
class
ShoppingCartPage
extends
StatefulWidget
{
class
ShoppingCartPage
extends
StatefulWidget
{
const
ShoppingCartPage
({
Key
?
key
})
:
super
(
key:
key
);
const
ShoppingCartPage
({
super
.
key
}
);
@override
@override
State
<
ShoppingCartPage
>
createState
()
=>
_ShoppingCartPageState
();
State
<
ShoppingCartPage
>
createState
()
=>
_ShoppingCartPageState
();
...
@@ -103,7 +103,7 @@ class _ShoppingCartPageState extends State<ShoppingCartPage> {
...
@@ -103,7 +103,7 @@ class _ShoppingCartPageState extends State<ShoppingCartPage> {
}
}
class
ShoppingCartSummary
extends
StatelessWidget
{
class
ShoppingCartSummary
extends
StatelessWidget
{
const
ShoppingCartSummary
({
Key
?
key
,
this
.
model
})
:
super
(
key:
key
);
const
ShoppingCartSummary
({
super
.
key
,
this
.
model
}
);
final
AppStateModel
?
model
;
final
AppStateModel
?
model
;
...
@@ -182,11 +182,11 @@ class ShoppingCartSummary extends StatelessWidget {
...
@@ -182,11 +182,11 @@ class ShoppingCartSummary extends StatelessWidget {
class
ShoppingCartRow
extends
StatelessWidget
{
class
ShoppingCartRow
extends
StatelessWidget
{
const
ShoppingCartRow
({
const
ShoppingCartRow
({
Key
?
key
,
super
.
key
,
required
this
.
product
,
required
this
.
product
,
required
this
.
quantity
,
required
this
.
quantity
,
this
.
onPressed
,
this
.
onPressed
,
})
:
super
(
key:
key
)
;
});
final
Product
product
;
final
Product
product
;
final
int
?
quantity
;
final
int
?
quantity
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart
View file @
89b437e6
...
@@ -8,7 +8,7 @@ import '../model/product.dart';
...
@@ -8,7 +8,7 @@ import '../model/product.dart';
import
'product_columns.dart'
;
import
'product_columns.dart'
;
class
AsymmetricView
extends
StatelessWidget
{
class
AsymmetricView
extends
StatelessWidget
{
const
AsymmetricView
({
Key
?
key
,
this
.
products
})
:
super
(
key:
key
);
const
AsymmetricView
({
super
.
key
,
this
.
products
}
);
final
List
<
Product
>?
products
;
final
List
<
Product
>?
products
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart
View file @
89b437e6
...
@@ -8,15 +8,11 @@ import 'package:flutter/material.dart';
...
@@ -8,15 +8,11 @@ import 'package:flutter/material.dart';
class
CutCornersBorder
extends
OutlineInputBorder
{
class
CutCornersBorder
extends
OutlineInputBorder
{
const
CutCornersBorder
({
const
CutCornersBorder
({
BorderSide
borderSide
=
BorderSide
.
none
,
super
.
borderSide
=
BorderSide
.
none
,
BorderRadius
borderRadius
=
const
BorderRadius
.
all
(
Radius
.
circular
(
2.0
)),
super
.
borderRadius
=
const
BorderRadius
.
all
(
Radius
.
circular
(
2.0
)),
this
.
cut
=
7.0
,
this
.
cut
=
7.0
,
double
gapPadding
=
2.0
,
super
.
gapPadding
=
2.0
,
})
:
super
(
});
borderSide:
borderSide
,
borderRadius:
borderRadius
,
gapPadding:
gapPadding
,
);
@override
@override
CutCornersBorder
copyWith
({
CutCornersBorder
copyWith
({
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/product_card.dart
View file @
89b437e6
...
@@ -10,8 +10,8 @@ import '../model/app_state_model.dart';
...
@@ -10,8 +10,8 @@ import '../model/app_state_model.dart';
import
'../model/product.dart'
;
import
'../model/product.dart'
;
class
ProductCard
extends
StatelessWidget
{
class
ProductCard
extends
StatelessWidget
{
const
ProductCard
({
Key
?
key
,
this
.
imageAspectRatio
=
33
/
49
,
this
.
product
})
const
ProductCard
({
super
.
key
,
this
.
imageAspectRatio
=
33
/
49
,
this
.
product
})
:
assert
(
imageAspectRatio
>
0
)
,
super
(
key:
key
)
;
:
assert
(
imageAspectRatio
>
0
);
final
double
imageAspectRatio
;
final
double
imageAspectRatio
;
final
Product
?
product
;
final
Product
?
product
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/product_columns.dart
View file @
89b437e6
...
@@ -9,10 +9,10 @@ import 'product_card.dart';
...
@@ -9,10 +9,10 @@ import 'product_card.dart';
class
TwoProductCardColumn
extends
StatelessWidget
{
class
TwoProductCardColumn
extends
StatelessWidget
{
const
TwoProductCardColumn
({
const
TwoProductCardColumn
({
Key
?
key
,
super
.
key
,
required
this
.
bottom
,
required
this
.
bottom
,
this
.
top
,
this
.
top
,
})
:
super
(
key:
key
)
;
});
final
Product
?
bottom
,
top
;
final
Product
?
bottom
,
top
;
...
@@ -58,7 +58,7 @@ class TwoProductCardColumn extends StatelessWidget {
...
@@ -58,7 +58,7 @@ class TwoProductCardColumn extends StatelessWidget {
}
}
class
OneProductCardColumn
extends
StatelessWidget
{
class
OneProductCardColumn
extends
StatelessWidget
{
const
OneProductCardColumn
({
Key
?
key
,
this
.
product
})
:
super
(
key:
key
);
const
OneProductCardColumn
({
super
.
key
,
this
.
product
}
);
final
Product
?
product
;
final
Product
?
product
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine_demo.dart
View file @
89b437e6
...
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
...
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
import
'shrine/app.dart'
;
import
'shrine/app.dart'
;
class
ShrineDemo
extends
StatelessWidget
{
class
ShrineDemo
extends
StatelessWidget
{
const
ShrineDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
ShrineDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/shrine'
;
// Used by the Gallery app.
static
const
String
routeName
=
'/shrine'
;
// Used by the Gallery app.
...
...
dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart
View file @
89b437e6
...
@@ -9,7 +9,7 @@ import 'transformations_demo_edit_board_point.dart';
...
@@ -9,7 +9,7 @@ import 'transformations_demo_edit_board_point.dart';
import
'transformations_demo_gesture_transformable.dart'
;
import
'transformations_demo_gesture_transformable.dart'
;
class
TransformationsDemo
extends
StatefulWidget
{
class
TransformationsDemo
extends
StatefulWidget
{
const
TransformationsDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TransformationsDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/transformations'
;
static
const
String
routeName
=
'/transformations'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_color_picker.dart
View file @
89b437e6
...
@@ -8,11 +8,11 @@ import 'package:flutter/material.dart';
...
@@ -8,11 +8,11 @@ import 'package:flutter/material.dart';
@immutable
@immutable
class
ColorPicker
extends
StatelessWidget
{
class
ColorPicker
extends
StatelessWidget
{
const
ColorPicker
({
const
ColorPicker
({
Key
?
key
,
super
.
key
,
required
this
.
colors
,
required
this
.
colors
,
required
this
.
selectedColor
,
required
this
.
selectedColor
,
this
.
onColorSelection
,
this
.
onColorSelection
,
})
:
super
(
key:
key
)
;
});
final
Set
<
Color
>
colors
;
final
Set
<
Color
>
colors
;
final
Color
selectedColor
;
final
Color
selectedColor
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_edit_board_point.dart
View file @
89b437e6
...
@@ -10,10 +10,10 @@ import 'transformations_demo_color_picker.dart';
...
@@ -10,10 +10,10 @@ import 'transformations_demo_color_picker.dart';
@immutable
@immutable
class
EditBoardPoint
extends
StatelessWidget
{
class
EditBoardPoint
extends
StatelessWidget
{
const
EditBoardPoint
({
const
EditBoardPoint
({
Key
?
key
,
super
.
key
,
required
this
.
boardPoint
,
required
this
.
boardPoint
,
this
.
onColorSelection
,
this
.
onColorSelection
,
})
:
super
(
key:
key
)
;
});
final
BoardPoint
boardPoint
;
final
BoardPoint
boardPoint
;
final
ValueChanged
<
Color
>?
onColorSelection
;
final
ValueChanged
<
Color
>?
onColorSelection
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_gesture_transformable.dart
View file @
89b437e6
...
@@ -14,7 +14,7 @@ import 'transformations_demo_inertial_motion.dart';
...
@@ -14,7 +14,7 @@ import 'transformations_demo_inertial_motion.dart';
@immutable
@immutable
class
GestureTransformable
extends
StatefulWidget
{
class
GestureTransformable
extends
StatefulWidget
{
const
GestureTransformable
({
const
GestureTransformable
({
Key
?
key
,
super
.
key
,
// The child to perform the transformations on.
// The child to perform the transformations on.
required
this
.
child
,
required
this
.
child
,
// The desired visible size of the widget and the area that is receptive to
// The desired visible size of the widget and the area that is receptive to
...
@@ -75,8 +75,7 @@ class GestureTransformable extends StatefulWidget {
...
@@ -75,8 +75,7 @@ class GestureTransformable extends StatefulWidget {
assert
(
assert
(
!
reset
||
onResetEnd
!=
null
,
!
reset
||
onResetEnd
!=
null
,
'Must implement onResetEnd to use reset.'
,
'Must implement onResetEnd to use reset.'
,
),
);
super
(
key:
key
);
final
Widget
child
;
final
Widget
child
;
final
Size
size
;
final
Size
size
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/typography_demo.dart
View file @
89b437e6
...
@@ -6,11 +6,11 @@ import 'package:flutter/material.dart';
...
@@ -6,11 +6,11 @@ import 'package:flutter/material.dart';
class
TextStyleItem
extends
StatelessWidget
{
class
TextStyleItem
extends
StatelessWidget
{
const
TextStyleItem
({
const
TextStyleItem
({
Key
?
key
,
super
.
key
,
required
this
.
name
,
required
this
.
name
,
required
this
.
style
,
required
this
.
style
,
required
this
.
text
,
required
this
.
text
,
})
:
super
(
key:
key
)
;
});
final
String
name
;
final
String
name
;
final
TextStyle
style
;
final
TextStyle
style
;
...
@@ -39,7 +39,7 @@ class TextStyleItem extends StatelessWidget {
...
@@ -39,7 +39,7 @@ class TextStyleItem extends StatelessWidget {
}
}
class
TypographyDemo
extends
StatelessWidget
{
class
TypographyDemo
extends
StatelessWidget
{
const
TypographyDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
TypographyDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/typography'
;
static
const
String
routeName
=
'/typography'
;
...
...
dev/integration_tests/flutter_gallery/lib/demo/video_demo.dart
View file @
89b437e6
...
@@ -12,7 +12,7 @@ import 'package:flutter/material.dart';
...
@@ -12,7 +12,7 @@ import 'package:flutter/material.dart';
import
'package:video_player/video_player.dart'
;
import
'package:video_player/video_player.dart'
;
class
VideoCard
extends
StatelessWidget
{
class
VideoCard
extends
StatelessWidget
{
const
VideoCard
({
Key
?
key
,
this
.
controller
,
this
.
title
,
this
.
subtitle
})
:
super
(
key:
key
);
const
VideoCard
({
super
.
key
,
this
.
controller
,
this
.
title
,
this
.
subtitle
}
);
final
VideoPlayerController
?
controller
;
final
VideoPlayerController
?
controller
;
final
String
?
title
;
final
String
?
title
;
...
@@ -93,7 +93,7 @@ class VideoCard extends StatelessWidget {
...
@@ -93,7 +93,7 @@ class VideoCard extends StatelessWidget {
}
}
class
VideoPlayerLoading
extends
StatefulWidget
{
class
VideoPlayerLoading
extends
StatefulWidget
{
const
VideoPlayerLoading
(
this
.
controller
,
{
Key
?
key
})
:
super
(
key:
key
);
const
VideoPlayerLoading
(
this
.
controller
,
{
super
.
key
}
);
final
VideoPlayerController
?
controller
;
final
VideoPlayerController
?
controller
;
...
@@ -137,7 +137,7 @@ class _VideoPlayerLoadingState extends State<VideoPlayerLoading> {
...
@@ -137,7 +137,7 @@ class _VideoPlayerLoadingState extends State<VideoPlayerLoading> {
}
}
class
VideoPlayPause
extends
StatefulWidget
{
class
VideoPlayPause
extends
StatefulWidget
{
const
VideoPlayPause
(
this
.
controller
,
{
Key
?
key
})
:
super
(
key:
key
);
const
VideoPlayPause
(
this
.
controller
,
{
super
.
key
}
);
final
VideoPlayerController
?
controller
;
final
VideoPlayerController
?
controller
;
...
@@ -203,10 +203,10 @@ class _VideoPlayPauseState extends State<VideoPlayPause> {
...
@@ -203,10 +203,10 @@ class _VideoPlayPauseState extends State<VideoPlayPause> {
class
FadeAnimation
extends
StatefulWidget
{
class
FadeAnimation
extends
StatefulWidget
{
const
FadeAnimation
({
const
FadeAnimation
({
Key
?
key
,
super
.
key
,
this
.
child
,
this
.
child
,
this
.
duration
=
const
Duration
(
milliseconds:
500
),
this
.
duration
=
const
Duration
(
milliseconds:
500
),
})
:
super
(
key:
key
)
;
});
final
Widget
?
child
;
final
Widget
?
child
;
final
Duration
duration
;
final
Duration
duration
;
...
@@ -266,10 +266,10 @@ class _FadeAnimationState extends State<FadeAnimation> with SingleTickerProvider
...
@@ -266,10 +266,10 @@ class _FadeAnimationState extends State<FadeAnimation> with SingleTickerProvider
class
ConnectivityOverlay
extends
StatefulWidget
{
class
ConnectivityOverlay
extends
StatefulWidget
{
const
ConnectivityOverlay
({
const
ConnectivityOverlay
({
Key
?
key
,
super
.
key
,
this
.
child
,
this
.
child
,
this
.
connectedCompleter
,
this
.
connectedCompleter
,
})
:
super
(
key:
key
)
;
});
final
Widget
?
child
;
final
Widget
?
child
;
final
Completer
<
void
>?
connectedCompleter
;
final
Completer
<
void
>?
connectedCompleter
;
...
@@ -343,7 +343,7 @@ class _ConnectivityOverlayState extends State<ConnectivityOverlay> {
...
@@ -343,7 +343,7 @@ class _ConnectivityOverlayState extends State<ConnectivityOverlay> {
}
}
class
VideoDemo
extends
StatefulWidget
{
class
VideoDemo
extends
StatefulWidget
{
const
VideoDemo
({
Key
?
key
})
:
super
(
key:
key
);
const
VideoDemo
({
super
.
key
}
);
static
const
String
routeName
=
'/video'
;
static
const
String
routeName
=
'/video'
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/about.dart
View file @
89b437e6
...
@@ -22,8 +22,7 @@ class _LinkTextSpan extends TextSpan {
...
@@ -22,8 +22,7 @@ class _LinkTextSpan extends TextSpan {
// manage the recognizer from outside the TextSpan, e.g. in the State of a
// manage the recognizer from outside the TextSpan, e.g. in the State of a
// stateful widget that then hands the recognizer to the TextSpan.
// stateful widget that then hands the recognizer to the TextSpan.
_LinkTextSpan
({
TextStyle
?
style
,
String
?
url
,
String
?
text
})
:
super
(
_LinkTextSpan
({
super
.
style
,
String
?
url
,
String
?
text
})
:
super
(
style:
style
,
text:
text
??
url
,
text:
text
??
url
,
recognizer:
TapGestureRecognizer
()..
onTap
=
()
{
recognizer:
TapGestureRecognizer
()..
onTap
=
()
{
launch
(
url
!,
forceSafariVC:
false
);
launch
(
url
!,
forceSafariVC:
false
);
...
...
dev/integration_tests/flutter_gallery/lib/gallery/app.dart
View file @
89b437e6
...
@@ -21,14 +21,14 @@ import 'updater.dart';
...
@@ -21,14 +21,14 @@ import 'updater.dart';
class
GalleryApp
extends
StatefulWidget
{
class
GalleryApp
extends
StatefulWidget
{
const
GalleryApp
({
const
GalleryApp
({
Key
?
key
,
super
.
key
,
this
.
updateUrlFetcher
,
this
.
updateUrlFetcher
,
this
.
enablePerformanceOverlay
=
true
,
this
.
enablePerformanceOverlay
=
true
,
this
.
enableRasterCacheImagesCheckerboard
=
true
,
this
.
enableRasterCacheImagesCheckerboard
=
true
,
this
.
enableOffscreenLayersCheckerboard
=
true
,
this
.
enableOffscreenLayersCheckerboard
=
true
,
this
.
onSendFeedback
,
this
.
onSendFeedback
,
this
.
testMode
=
false
,
this
.
testMode
=
false
,
})
:
super
(
key:
key
)
;
});
final
UpdateUrlFetcher
?
updateUrlFetcher
;
final
UpdateUrlFetcher
?
updateUrlFetcher
;
final
bool
enablePerformanceOverlay
;
final
bool
enablePerformanceOverlay
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/backdrop.dart
View file @
89b437e6
...
@@ -25,10 +25,9 @@ final Animatable<BorderRadius?> _kFrontHeadingBevelRadius = BorderRadiusTween(
...
@@ -25,10 +25,9 @@ final Animatable<BorderRadius?> _kFrontHeadingBevelRadius = BorderRadiusTween(
class
_TappableWhileStatusIs
extends
StatefulWidget
{
class
_TappableWhileStatusIs
extends
StatefulWidget
{
const
_TappableWhileStatusIs
(
const
_TappableWhileStatusIs
(
this
.
status
,
{
this
.
status
,
{
Key
?
key
,
this
.
controller
,
this
.
controller
,
this
.
child
,
this
.
child
,
})
:
super
(
key:
key
)
;
});
final
AnimationController
?
controller
;
final
AnimationController
?
controller
;
final
AnimationStatus
status
;
final
AnimationStatus
status
;
...
@@ -83,12 +82,11 @@ class _TappableWhileStatusIsState extends State<_TappableWhileStatusIs> {
...
@@ -83,12 +82,11 @@ class _TappableWhileStatusIsState extends State<_TappableWhileStatusIs> {
class
_CrossFadeTransition
extends
AnimatedWidget
{
class
_CrossFadeTransition
extends
AnimatedWidget
{
const
_CrossFadeTransition
({
const
_CrossFadeTransition
({
Key
?
key
,
this
.
alignment
=
Alignment
.
center
,
this
.
alignment
=
Alignment
.
center
,
required
Animation
<
double
>
progress
,
required
Animation
<
double
>
progress
,
this
.
child0
,
this
.
child0
,
this
.
child1
,
this
.
child1
,
})
:
super
(
key:
key
,
listenable:
progress
);
})
:
super
(
listenable:
progress
);
final
AlignmentGeometry
alignment
;
final
AlignmentGeometry
alignment
;
final
Widget
?
child0
;
final
Widget
?
child0
;
...
@@ -134,11 +132,10 @@ class _CrossFadeTransition extends AnimatedWidget {
...
@@ -134,11 +132,10 @@ class _CrossFadeTransition extends AnimatedWidget {
class
_BackAppBar
extends
StatelessWidget
{
class
_BackAppBar
extends
StatelessWidget
{
const
_BackAppBar
({
const
_BackAppBar
({
Key
?
key
,
this
.
leading
=
const
SizedBox
(
width:
56.0
),
this
.
leading
=
const
SizedBox
(
width:
56.0
),
required
this
.
title
,
required
this
.
title
,
this
.
trailing
,
this
.
trailing
,
})
:
super
(
key:
key
)
;
});
final
Widget
leading
;
final
Widget
leading
;
final
Widget
title
;
final
Widget
title
;
...
@@ -179,14 +176,14 @@ class _BackAppBar extends StatelessWidget {
...
@@ -179,14 +176,14 @@ class _BackAppBar extends StatelessWidget {
class
Backdrop
extends
StatefulWidget
{
class
Backdrop
extends
StatefulWidget
{
const
Backdrop
({
const
Backdrop
({
Key
?
key
,
super
.
key
,
this
.
frontAction
,
this
.
frontAction
,
this
.
frontTitle
,
this
.
frontTitle
,
this
.
frontHeading
,
this
.
frontHeading
,
this
.
frontLayer
,
this
.
frontLayer
,
this
.
backTitle
,
this
.
backTitle
,
this
.
backLayer
,
this
.
backLayer
,
})
:
super
(
key:
key
)
;
});
final
Widget
?
frontAction
;
final
Widget
?
frontAction
;
final
Widget
?
frontTitle
;
final
Widget
?
frontTitle
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/demo.dart
View file @
89b437e6
...
@@ -42,13 +42,13 @@ class ComponentDemoTabData {
...
@@ -42,13 +42,13 @@ class ComponentDemoTabData {
class
TabbedComponentDemoScaffold
extends
StatelessWidget
{
class
TabbedComponentDemoScaffold
extends
StatelessWidget
{
const
TabbedComponentDemoScaffold
({
const
TabbedComponentDemoScaffold
({
Key
?
key
,
super
.
key
,
this
.
title
,
this
.
title
,
this
.
demos
,
this
.
demos
,
this
.
actions
,
this
.
actions
,
this
.
isScrollable
=
true
,
this
.
isScrollable
=
true
,
this
.
showExampleCodeAction
=
true
,
this
.
showExampleCodeAction
=
true
,
})
:
super
(
key:
key
)
;
});
final
List
<
ComponentDemoTabData
>?
demos
;
final
List
<
ComponentDemoTabData
>?
demos
;
final
String
?
title
;
final
String
?
title
;
...
@@ -148,7 +148,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
...
@@ -148,7 +148,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
}
}
class
FullScreenCodeDialog
extends
StatefulWidget
{
class
FullScreenCodeDialog
extends
StatefulWidget
{
const
FullScreenCodeDialog
({
Key
?
key
,
this
.
exampleCodeTag
})
:
super
(
key:
key
);
const
FullScreenCodeDialog
({
super
.
key
,
this
.
exampleCodeTag
}
);
final
String
?
exampleCodeTag
;
final
String
?
exampleCodeTag
;
...
@@ -216,13 +216,12 @@ class FullScreenCodeDialogState extends State<FullScreenCodeDialog> {
...
@@ -216,13 +216,12 @@ class FullScreenCodeDialogState extends State<FullScreenCodeDialog> {
}
}
class
MaterialDemoDocumentationButton
extends
StatelessWidget
{
class
MaterialDemoDocumentationButton
extends
StatelessWidget
{
MaterialDemoDocumentationButton
(
String
routeName
,
{
Key
?
key
})
MaterialDemoDocumentationButton
(
String
routeName
,
{
super
.
key
})
:
documentationUrl
=
kDemoDocumentationUrl
[
routeName
],
:
documentationUrl
=
kDemoDocumentationUrl
[
routeName
],
assert
(
assert
(
kDemoDocumentationUrl
[
routeName
]
!=
null
,
kDemoDocumentationUrl
[
routeName
]
!=
null
,
'A documentation URL was not specified for demo route
$routeName
in kAllGalleryDemos'
,
'A documentation URL was not specified for demo route
$routeName
in kAllGalleryDemos'
,
),
);
super
(
key:
key
);
final
String
?
documentationUrl
;
final
String
?
documentationUrl
;
...
@@ -237,13 +236,12 @@ class MaterialDemoDocumentationButton extends StatelessWidget {
...
@@ -237,13 +236,12 @@ class MaterialDemoDocumentationButton extends StatelessWidget {
}
}
class
CupertinoDemoDocumentationButton
extends
StatelessWidget
{
class
CupertinoDemoDocumentationButton
extends
StatelessWidget
{
CupertinoDemoDocumentationButton
(
String
routeName
,
{
Key
?
key
})
CupertinoDemoDocumentationButton
(
String
routeName
,
{
super
.
key
})
:
documentationUrl
=
kDemoDocumentationUrl
[
routeName
],
:
documentationUrl
=
kDemoDocumentationUrl
[
routeName
],
assert
(
assert
(
kDemoDocumentationUrl
[
routeName
]
!=
null
,
kDemoDocumentationUrl
[
routeName
]
!=
null
,
'A documentation URL was not specified for demo route
$routeName
in kAllGalleryDemos'
,
'A documentation URL was not specified for demo route
$routeName
in kAllGalleryDemos'
,
),
);
super
(
key:
key
);
final
String
?
documentationUrl
;
final
String
?
documentationUrl
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/home.dart
View file @
89b437e6
...
@@ -18,7 +18,7 @@ const double _kDemoItemHeight = 64.0;
...
@@ -18,7 +18,7 @@ const double _kDemoItemHeight = 64.0;
const
Duration
_kFrontLayerSwitchDuration
=
Duration
(
milliseconds:
300
);
const
Duration
_kFrontLayerSwitchDuration
=
Duration
(
milliseconds:
300
);
class
_FlutterLogo
extends
StatelessWidget
{
class
_FlutterLogo
extends
StatelessWidget
{
const
_FlutterLogo
(
{
Key
?
key
})
:
super
(
key:
key
);
const
_FlutterLogo
();
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -41,10 +41,9 @@ class _FlutterLogo extends StatelessWidget {
...
@@ -41,10 +41,9 @@ class _FlutterLogo extends StatelessWidget {
class
_CategoryItem
extends
StatelessWidget
{
class
_CategoryItem
extends
StatelessWidget
{
const
_CategoryItem
({
const
_CategoryItem
({
Key
?
key
,
this
.
category
,
this
.
category
,
this
.
onTap
,
this
.
onTap
,
})
:
super
(
key:
key
)
;
});
final
GalleryDemoCategory
?
category
;
final
GalleryDemoCategory
?
category
;
final
VoidCallback
?
onTap
;
final
VoidCallback
?
onTap
;
...
@@ -95,10 +94,9 @@ class _CategoryItem extends StatelessWidget {
...
@@ -95,10 +94,9 @@ class _CategoryItem extends StatelessWidget {
class
_CategoriesPage
extends
StatelessWidget
{
class
_CategoriesPage
extends
StatelessWidget
{
const
_CategoriesPage
({
const
_CategoriesPage
({
Key
?
key
,
this
.
categories
,
this
.
categories
,
this
.
onCategoryTap
,
this
.
onCategoryTap
,
})
:
super
(
key:
key
)
;
});
final
Iterable
<
GalleryDemoCategory
>?
categories
;
final
Iterable
<
GalleryDemoCategory
>?
categories
;
final
ValueChanged
<
GalleryDemoCategory
>?
onCategoryTap
;
final
ValueChanged
<
GalleryDemoCategory
>?
onCategoryTap
;
...
@@ -162,7 +160,7 @@ class _CategoriesPage extends StatelessWidget {
...
@@ -162,7 +160,7 @@ class _CategoriesPage extends StatelessWidget {
}
}
class
_DemoItem
extends
StatelessWidget
{
class
_DemoItem
extends
StatelessWidget
{
const
_DemoItem
({
Key
?
key
,
this
.
demo
})
:
super
(
key:
key
);
const
_DemoItem
({
this
.
demo
}
);
final
GalleryDemo
?
demo
;
final
GalleryDemo
?
demo
;
...
@@ -262,10 +260,10 @@ class _DemosPage extends StatelessWidget {
...
@@ -262,10 +260,10 @@ class _DemosPage extends StatelessWidget {
class
GalleryHome
extends
StatefulWidget
{
class
GalleryHome
extends
StatefulWidget
{
const
GalleryHome
({
const
GalleryHome
({
Key
?
key
,
super
.
key
,
this
.
testMode
=
false
,
this
.
testMode
=
false
,
this
.
optionsPage
,
this
.
optionsPage
,
})
:
super
(
key:
key
)
;
});
final
Widget
?
optionsPage
;
final
Widget
?
optionsPage
;
final
bool
testMode
;
final
bool
testMode
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/options.dart
View file @
89b437e6
...
@@ -93,7 +93,7 @@ const double _kItemHeight = 48.0;
...
@@ -93,7 +93,7 @@ const double _kItemHeight = 48.0;
const
EdgeInsetsDirectional
_kItemPadding
=
EdgeInsetsDirectional
.
only
(
start:
56.0
);
const
EdgeInsetsDirectional
_kItemPadding
=
EdgeInsetsDirectional
.
only
(
start:
56.0
);
class
_OptionsItem
extends
StatelessWidget
{
class
_OptionsItem
extends
StatelessWidget
{
const
_OptionsItem
({
Key
?
key
,
this
.
child
})
:
super
(
key:
key
);
const
_OptionsItem
({
this
.
child
}
);
final
Widget
?
child
;
final
Widget
?
child
;
...
@@ -167,7 +167,7 @@ class _ActionItem extends StatelessWidget {
...
@@ -167,7 +167,7 @@ class _ActionItem extends StatelessWidget {
}
}
class
_TextButton
extends
StatelessWidget
{
class
_TextButton
extends
StatelessWidget
{
const
_TextButton
({
Key
?
key
,
this
.
onPressed
,
this
.
child
})
:
super
(
key:
key
);
const
_TextButton
({
this
.
onPressed
,
this
.
child
}
);
final
VoidCallback
?
onPressed
;
final
VoidCallback
?
onPressed
;
final
Widget
?
child
;
final
Widget
?
child
;
...
@@ -467,11 +467,11 @@ class _PlatformItem extends StatelessWidget {
...
@@ -467,11 +467,11 @@ class _PlatformItem extends StatelessWidget {
class
GalleryOptionsPage
extends
StatelessWidget
{
class
GalleryOptionsPage
extends
StatelessWidget
{
const
GalleryOptionsPage
({
const
GalleryOptionsPage
({
Key
?
key
,
super
.
key
,
this
.
options
,
this
.
options
,
this
.
onOptionsChanged
,
this
.
onOptionsChanged
,
this
.
onSendFeedback
,
this
.
onSendFeedback
,
})
:
super
(
key:
key
)
;
});
final
GalleryOptions
?
options
;
final
GalleryOptions
?
options
;
final
ValueChanged
<
GalleryOptions
>?
onOptionsChanged
;
final
ValueChanged
<
GalleryOptions
>?
onOptionsChanged
;
...
...
dev/integration_tests/flutter_gallery/lib/gallery/updater.dart
View file @
89b437e6
...
@@ -9,8 +9,7 @@ import 'package:url_launcher/url_launcher.dart';
...
@@ -9,8 +9,7 @@ import 'package:url_launcher/url_launcher.dart';
typedef
UpdateUrlFetcher
=
Future
<
String
?>
Function
();
typedef
UpdateUrlFetcher
=
Future
<
String
?>
Function
();
class
Updater
extends
StatefulWidget
{
class
Updater
extends
StatefulWidget
{
const
Updater
({
required
this
.
updateUrlFetcher
,
this
.
child
,
Key
?
key
})
const
Updater
({
required
this
.
updateUrlFetcher
,
this
.
child
,
super
.
key
});
:
super
(
key:
key
);
final
UpdateUrlFetcher
updateUrlFetcher
;
final
UpdateUrlFetcher
updateUrlFetcher
;
final
Widget
?
child
;
final
Widget
?
child
;
...
...
dev/integration_tests/flutter_gallery/pubspec.yaml
View file @
89b437e6
name
:
flutter_gallery
name
:
flutter_gallery
environment
:
environment
:
sdk
:
"
>=2.1
2
.0-0
<3.0.0"
sdk
:
"
>=2.1
7
.0-0
<3.0.0"
dependencies
:
dependencies
:
flutter
:
flutter
:
...
...
dev/integration_tests/flutter_gallery/test/live_smoketest.dart
View file @
89b437e6
...
@@ -101,7 +101,7 @@ final Finder backFinder = find.byElementPredicate(
...
@@ -101,7 +101,7 @@ final Finder backFinder = find.byElementPredicate(
);
);
class
_LiveWidgetController
extends
LiveWidgetController
{
class
_LiveWidgetController
extends
LiveWidgetController
{
_LiveWidgetController
(
WidgetsBinding
binding
)
:
super
(
binding
);
_LiveWidgetController
(
super
.
binding
);
/// With [frameSync] enabled, Flutter Driver will wait to perform an action
/// With [frameSync] enabled, Flutter Driver will wait to perform an action
/// until there are no pending frames in the app under test.
/// until there are no pending frames in the app under test.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment