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
6d5fc420
Unverified
Commit
6d5fc420
authored
Oct 12, 2021
by
Ian Hickson
Committed by
GitHub
Oct 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable `sort_child_properties_last` lint (#91585)
parent
ee07b0ea
Changes
42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
171 additions
and
169 deletions
+171
-169
analysis_options.yaml
analysis_options.yaml
+1
-1
component1.dart
...ration_tests/deferred_components_test/lib/component1.dart
+8
-8
drag_and_drop.dart
dev/manual_tests/lib/drag_and_drop.dart
+3
-3
cupertino_context_menu.0.dart
.../lib/cupertino/context_menu/cupertino_context_menu.0.dart
+3
-3
material_banner.0.dart
examples/api/lib/material/banner/material_banner.0.dart
+2
-2
material_banner.1.dart
examples/api/lib/material/banner/material_banner.1.dart
+1
-1
bottom_app_bar.1.dart
...les/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart
+1
-1
dropdown_button.selected_item_builder.0.dart
...ial/dropdown/dropdown_button.selected_item_builder.0.dart
+1
-1
floating_action_button.0.dart
...rial/floating_action_button/floating_action_button.0.dart
+1
-1
navigation_rail.extended_animation.0.dart
...navigation_rail/navigation_rail.extended_animation.0.dart
+1
-1
scaffold_messenger_state.show_material_banner.0.dart
...fold/scaffold_messenger_state.show_material_banner.0.dart
+1
-1
tooltip.1.dart
examples/api/lib/material/tooltip/tooltip.1.dart
+1
-1
system_chrome.set_system_u_i_overlay_style.1.dart
..._chrome/system_chrome.set_system_u_i_overlay_style.1.dart
+1
-1
animated_switcher.0.dart
...pi/lib/widgets/animated_switcher/animated_switcher.0.dart
+1
-1
future_builder.0.dart
examples/api/lib/widgets/async/future_builder.0.dart
+1
-1
stream_builder.0.dart
examples/api/lib/widgets/async/stream_builder.0.dart
+1
-1
fitted_box.0.dart
examples/api/lib/widgets/basic/fitted_box.0.dart
+1
-1
physical_shape.0.dart
examples/api/lib/widgets/basic/physical_shape.0.dart
+8
-7
dismissible.0.dart
examples/api/lib/widgets/dismissible/dismissible.0.dart
+5
-5
draggable.0.dart
examples/api/lib/widgets/drag_target/draggable.0.dart
+8
-8
image.frame_builder.0.dart
examples/api/lib/widgets/image/image.frame_builder.0.dart
+1
-1
animated_slide.0.dart
...api/lib/widgets/implicit_animations/animated_slide.0.dart
+2
-2
page_storage.0.dart
examples/api/lib/widgets/page_storage/page_storage.0.dart
+1
-1
restorable_value.0.dart
...ib/widgets/restoration_properties/restorable_value.0.dart
+1
-1
raw_scrollbar.shape.0.dart
...ples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.dart
+5
-5
date_picker.dart
packages/flutter/lib/src/cupertino/date_picker.dart
+12
-12
banner.dart
packages/flutter/lib/src/material/banner.dart
+1
-1
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+1
-1
form_row_test.dart
packages/flutter/test/cupertino/form_row_test.dart
+4
-4
picker_test.dart
packages/flutter/test/cupertino/picker_test.dart
+1
-1
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+2
-1
expansion_tile_test.dart
packages/flutter/test/material/expansion_tile_test.dart
+2
-2
grid_title_test.dart
packages/flutter/test/material/grid_title_test.dart
+5
-5
popup_menu_test.dart
packages/flutter/test/material/popup_menu_test.dart
+2
-2
reorderable_list_test.dart
packages/flutter/test/material/reorderable_list_test.dart
+1
-1
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+2
-2
object_paint_dispose_test.dart
...ges/flutter/test/rendering/object_paint_dispose_test.dart
+1
-1
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+64
-64
page_view_test.dart
packages/flutter/test/widgets/page_view_test.dart
+2
-2
transform_test.dart
packages/flutter/test/widgets/transform_test.dart
+8
-8
visibility_test.dart
packages/flutter/test/widgets/visibility_test.dart
+2
-2
No files found.
analysis_options.yaml
View file @
6d5fc420
...
...
@@ -186,7 +186,7 @@ linter:
-
recursive_getters
-
sized_box_for_whitespace
-
slash_for_doc_comments
# - sort_child_properties_last # not yet tested
-
sort_child_properties_last
-
sort_constructors_first
# - sort_pub_dependencies # prevents separating pinned transitive dependencies
-
sort_unnamed_constructors_first
...
...
dev/integration_tests/deferred_components_test/lib/component1.dart
View file @
6d5fc420
...
...
@@ -16,14 +16,14 @@ class LogoScreen extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
print
(
_testSentinel
);
return
Container
(
padding:
const
EdgeInsets
.
all
(
25
),
color:
Colors
.
blue
,
child:
Column
(
children:
<
Widget
>[
const
Text
(
'DeferredWidget'
,
key:
Key
(
'DeferredWidget'
)),
Image
.
asset
(
'customassets/flutter_logo.png'
,
key:
const
Key
(
'DeferredImage'
)),
]
),
padding:
const
EdgeInsets
.
all
(
25
),
color:
Colors
.
blue
,
);
}
const
Text
(
'DeferredWidget'
,
key:
Key
(
'DeferredWidget'
)),
Image
.
asset
(
'customassets/flutter_logo.png'
,
key:
const
Key
(
'DeferredImage'
)),
],
),
);
}
}
dev/manual_tests/lib/drag_and_drop.dart
View file @
6d5fc420
...
...
@@ -132,18 +132,18 @@ class ExampleDragSource extends StatelessWidget {
if
(
heavy
)
{
return
LongPressDraggable
<
Color
>(
data:
color
,
child:
contents
,
feedback:
feedback
,
feedbackOffset:
feedbackOffset
,
dragAnchorStrategy:
dragAnchorStrategy
,
child:
contents
,
);
}
else
{
return
Draggable
<
Color
>(
data:
color
,
child:
contents
,
feedback:
feedback
,
feedbackOffset:
feedbackOffset
,
dragAnchorStrategy:
dragAnchorStrategy
,
child:
contents
,
);
}
}
...
...
@@ -208,10 +208,10 @@ class MovableBall extends StatelessWidget {
if
(
position
==
ballPosition
)
{
return
Draggable
<
bool
>(
data:
true
,
child:
ball
,
childWhenDragging:
dashedBall
,
feedback:
ball
,
maxSimultaneousDrags:
1
,
child:
ball
,
);
}
else
{
return
DragTarget
<
bool
>(
...
...
examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart
View file @
6d5fc420
...
...
@@ -35,9 +35,6 @@ class MyStatelessWidget extends StatelessWidget {
width:
100
,
height:
100
,
child:
CupertinoContextMenu
(
child:
Container
(
color:
Colors
.
red
,
),
actions:
<
Widget
>[
CupertinoContextMenuAction
(
child:
const
Text
(
'Action one'
),
...
...
@@ -52,6 +49,9 @@ class MyStatelessWidget extends StatelessWidget {
},
),
],
child:
Container
(
color:
Colors
.
red
,
),
),
),
),
...
...
examples/api/lib/material/banner/material_banner.0.dart
View file @
6d5fc420
...
...
@@ -38,12 +38,12 @@ class MyStatelessWidget extends StatelessWidget {
backgroundColor:
Color
(
0xFFE0E0E0
),
actions:
<
Widget
>[
TextButton
(
child:
Text
(
'OPEN'
),
onPressed:
null
,
child:
Text
(
'OPEN'
),
),
TextButton
(
child:
Text
(
'DISMISS'
),
onPressed:
null
,
child:
Text
(
'DISMISS'
),
),
],
),
...
...
examples/api/lib/material/banner/material_banner.1.dart
View file @
6d5fc420
...
...
@@ -42,8 +42,8 @@ class MyStatelessWidget extends StatelessWidget {
backgroundColor:
Colors
.
green
,
actions:
<
Widget
>[
TextButton
(
child:
Text
(
'DISMISS'
),
onPressed:
null
,
child:
Text
(
'DISMISS'
),
),
],
),
...
...
examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart
View file @
6d5fc420
...
...
@@ -97,8 +97,8 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
floatingActionButton:
_showFab
?
FloatingActionButton
(
onPressed:
()
{},
child:
const
Icon
(
Icons
.
add
),
tooltip:
'Create'
,
child:
const
Icon
(
Icons
.
add
),
)
:
null
,
floatingActionButtonLocation:
_fabLocation
,
...
...
examples/api/lib/material/dropdown/dropdown_button.selected_item_builder.0.dart
View file @
6d5fc420
...
...
@@ -50,8 +50,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
},
items:
items
.
map
((
String
item
)
{
return
DropdownMenuItem
<
String
>(
child:
Text
(
'Log
$item
'
),
value:
item
,
child:
Text
(
'Log
$item
'
),
);
}).
toList
(),
),
...
...
examples/api/lib/material/floating_action_button/floating_action_button.0.dart
View file @
6d5fc420
...
...
@@ -36,8 +36,8 @@ class MyStatelessWidget extends StatelessWidget {
onPressed:
()
{
// Add your onPressed code here!
},
child:
const
Icon
(
Icons
.
navigation
),
backgroundColor:
Colors
.
green
,
child:
const
Icon
(
Icons
.
navigation
),
),
);
}
...
...
examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart
View file @
6d5fc420
...
...
@@ -105,8 +105,8 @@ class MyNavigationRailFab extends StatelessWidget {
),
child:
animation
.
value
==
0
?
FloatingActionButton
(
child:
const
Icon
(
Icons
.
add
),
onPressed:
onPressed
,
child:
const
Icon
(
Icons
.
add
),
)
:
Align
(
alignment:
AlignmentDirectional
.
centerStart
,
...
...
examples/api/lib/material/scaffold/scaffold_messenger_state.show_material_banner.0.dart
View file @
6d5fc420
...
...
@@ -39,8 +39,8 @@ class MyStatelessWidget extends StatelessWidget {
content:
Text
(
'This is a MaterialBanner'
),
actions:
<
Widget
>[
TextButton
(
child:
Text
(
'DISMISS'
),
onPressed:
null
,
child:
Text
(
'DISMISS'
),
),
],
),
...
...
examples/api/lib/material/tooltip/tooltip.1.dart
View file @
6d5fc420
...
...
@@ -34,7 +34,6 @@ class MyStatelessWidget extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Tooltip
(
message:
'I am a Tooltip'
,
child:
const
Text
(
'Tap this text and hold down to show a tooltip.'
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
25
),
gradient:
...
...
@@ -48,6 +47,7 @@ class MyStatelessWidget extends StatelessWidget {
),
showDuration:
const
Duration
(
seconds:
2
),
waitDuration:
const
Duration
(
seconds:
1
),
child:
const
Text
(
'Tap this text and hold down to show a tooltip.'
),
);
}
}
examples/api/lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart
View file @
6d5fc420
...
...
@@ -56,8 +56,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
value:
_currentStyle
,
child:
Center
(
child:
ElevatedButton
(
child:
const
Text
(
'Change Color'
),
onPressed:
_changeColor
,
child:
const
Text
(
'Change Color'
),
),
),
);
...
...
examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart
View file @
6d5fc420
...
...
@@ -42,7 +42,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
AnimatedSwitcher
(
duration:
const
Duration
(
milliseconds:
500
),
transitionBuilder:
(
Widget
child
,
Animation
<
double
>
animation
)
{
return
ScaleTransition
(
child:
child
,
scale:
animation
);
return
ScaleTransition
(
scale:
animation
,
child:
child
);
},
child:
Text
(
'
$_count
'
,
...
...
examples/api/lib/widgets/async/future_builder.0.dart
View file @
6d5fc420
...
...
@@ -71,9 +71,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
}
else
{
children
=
const
<
Widget
>[
SizedBox
(
child:
CircularProgressIndicator
(),
width:
60
,
height:
60
,
child:
CircularProgressIndicator
(),
),
Padding
(
padding:
EdgeInsets
.
only
(
top:
16
),
...
...
examples/api/lib/widgets/async/stream_builder.0.dart
View file @
6d5fc420
...
...
@@ -82,9 +82,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
case
ConnectionState
.
waiting
:
children
=
const
<
Widget
>[
SizedBox
(
child:
CircularProgressIndicator
(),
width:
60
,
height:
60
,
child:
CircularProgressIndicator
(),
),
Padding
(
padding:
EdgeInsets
.
only
(
top:
16
),
...
...
examples/api/lib/widgets/basic/fitted_box.0.dart
View file @
6d5fc420
...
...
@@ -37,9 +37,9 @@ class MyStatelessWidget extends StatelessWidget {
width:
300
,
color:
Colors
.
red
,
child:
FittedBox
(
fit:
BoxFit
.
fill
,
child:
Image
.
network
(
'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'
),
fit:
BoxFit
.
fill
,
),
);
}
...
...
examples/api/lib/widgets/basic/physical_shape.0.dart
View file @
6d5fc420
...
...
@@ -34,7 +34,15 @@ class MyStatelessWidget extends StatelessWidget {
body:
Center
(
child:
PhysicalShape
(
elevation:
5.0
,
clipper:
ShapeBorderClipper
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
10.0
),
),
),
color:
Colors
.
orange
,
child:
const
SizedBox
(
height:
200.0
,
width:
200.0
,
child:
Center
(
child:
Text
(
'Hello, World!'
,
...
...
@@ -44,14 +52,7 @@ class MyStatelessWidget extends StatelessWidget {
),
),
),
height:
200.0
,
width:
200.0
,
),
clipper:
ShapeBorderClipper
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
10.0
),
)),
color:
Colors
.
orange
,
),
),
);
...
...
examples/api/lib/widgets/dismissible/dismissible.0.dart
View file @
6d5fc420
...
...
@@ -42,11 +42,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16
),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
Dismissible
(
child:
ListTile
(
title:
Text
(
'Item
${items[index]}
'
,
),
),
background:
Container
(
color:
Colors
.
green
,
),
...
...
@@ -56,6 +51,11 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
items
.
removeAt
(
index
);
});
},
child:
ListTile
(
title:
Text
(
'Item
${items[index]}
'
,
),
),
);
},
);
...
...
examples/api/lib/widgets/drag_target/draggable.0.dart
View file @
6d5fc420
...
...
@@ -43,14 +43,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Draggable
<
int
>(
// Data is the value this Draggable stores.
data:
10
,
child:
Container
(
height:
100.0
,
width:
100.0
,
color:
Colors
.
lightGreenAccent
,
child:
const
Center
(
child:
Text
(
'Draggable'
),
),
),
feedback:
Container
(
color:
Colors
.
deepOrange
,
height:
100
,
...
...
@@ -65,6 +57,14 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child:
Text
(
'Child When Dragging'
),
),
),
child:
Container
(
height:
100.0
,
width:
100.0
,
color:
Colors
.
lightGreenAccent
,
child:
const
Center
(
child:
Text
(
'Draggable'
),
),
),
),
DragTarget
<
int
>(
builder:
(
...
...
examples/api/lib/widgets/image/image.frame_builder.0.dart
View file @
6d5fc420
...
...
@@ -42,10 +42,10 @@ class MyStatelessWidget extends StatelessWidget {
return
child
;
}
return
AnimatedOpacity
(
child:
child
,
opacity:
frame
==
null
?
0
:
1
,
duration:
const
Duration
(
seconds:
1
),
curve:
Curves
.
easeOut
,
child:
child
,
);
},
),
...
...
examples/api/lib/widgets/implicit_animations/animated_slide.0.dart
View file @
6d5fc420
...
...
@@ -49,12 +49,12 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
ElevatedButton
(
child:
const
Text
(
'Slide up'
),
onPressed:
_slideUp
,
child:
const
Text
(
'Slide up'
),
),
ElevatedButton
(
child:
const
Text
(
'Slide down'
),
onPressed:
_slideDown
,
child:
const
Text
(
'Slide down'
),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
50
),
...
...
examples/api/lib/widgets/page_storage/page_storage.0.dart
View file @
6d5fc420
...
...
@@ -45,8 +45,8 @@ class _MyHomePageState extends State<MyHomePage> {
title:
const
Text
(
'Persistence Example'
),
),
body:
PageStorage
(
child:
pages
[
currentTab
],
bucket:
_bucket
,
child:
pages
[
currentTab
],
),
bottomNavigationBar:
BottomNavigationBar
(
currentIndex:
currentTab
,
...
...
examples/api/lib/widgets/restoration_properties/restorable_value.0.dart
View file @
6d5fc420
...
...
@@ -74,8 +74,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
@override
Widget
build
(
BuildContext
context
)
{
return
OutlinedButton
(
child:
Text
(
'
${_answer.value}
'
),
onPressed:
_incrementAnswer
,
child:
Text
(
'
${_answer.value}
'
),
);
}
}
examples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.dart
View file @
6d5fc420
...
...
@@ -29,16 +29,16 @@ class MyStatelessWidget extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
body:
RawScrollbar
(
child:
ListView
(
children:
List
<
Text
>.
generate
(
100
,
(
int
index
)
=>
Text
((
index
*
index
).
toString
())),
physics:
const
BouncingScrollPhysics
(),
),
shape:
const
StadiumBorder
(
side:
BorderSide
(
color:
Colors
.
brown
,
width:
3.0
)),
thickness:
15.0
,
thumbColor:
Colors
.
blue
,
isAlwaysShown:
true
,
child:
ListView
(
physics:
const
BouncingScrollPhysics
(),
children:
List
<
Text
>.
generate
(
100
,
(
int
index
)
=>
Text
((
index
*
index
).
toString
())),
),
),
);
}
...
...
packages/flutter/lib/src/cupertino/date_picker.dart
View file @
6d5fc420
...
...
@@ -795,6 +795,8 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
assert
(
debugIsFlipped
==
isHourRegionFlipped
);
},
looping:
true
,
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
24
,
(
int
index
)
{
final
int
hour
=
isHourRegionFlipped
?
(
index
+
12
)
%
24
:
index
;
final
int
displayHour
=
widget
.
use24hFormat
?
hour
:
(
hour
+
11
)
%
12
+
1
;
...
...
@@ -808,8 +810,6 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
),
);
}),
looping:
true
,
selectionOverlay:
selectionOverlay
,
),
);
}
...
...
@@ -835,6 +835,8 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
backgroundColor:
widget
.
backgroundColor
,
squeeze:
_kSqueeze
,
onSelectedItemChanged:
_onSelectedItemChange
,
looping:
true
,
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
minuteInterval
,
(
int
index
)
{
final
int
minute
=
index
*
widget
.
minuteInterval
;
...
...
@@ -858,8 +860,6 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
),
);
}),
looping:
true
,
selectionOverlay:
selectionOverlay
,
),
);
}
...
...
@@ -889,6 +889,7 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
assert
(
selectedAmPm
==
0
||
selectedAmPm
==
1
);
_onSelectedItemChange
(
index
);
},
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
2
,
(
int
index
)
{
return
itemPositioningBuilder
(
context
,
...
...
@@ -900,7 +901,6 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
),
);
}),
selectionOverlay:
selectionOverlay
,
),
);
}
...
...
@@ -1172,6 +1172,8 @@ class _CupertinoDatePickerDateState extends State<CupertinoDatePicker> {
if
(
_isCurrentDateValid
)
widget
.
onDateTimeChanged
(
DateTime
(
selectedYear
,
selectedMonth
,
selectedDay
));
},
looping:
true
,
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
31
,
(
int
index
)
{
final
int
day
=
index
+
1
;
return
itemPositioningBuilder
(
...
...
@@ -1182,8 +1184,6 @@ class _CupertinoDatePickerDateState extends State<CupertinoDatePicker> {
),
);
}),
looping:
true
,
selectionOverlay:
selectionOverlay
,
),
);
}
...
...
@@ -1213,6 +1213,8 @@ class _CupertinoDatePickerDateState extends State<CupertinoDatePicker> {
if
(
_isCurrentDateValid
)
widget
.
onDateTimeChanged
(
DateTime
(
selectedYear
,
selectedMonth
,
selectedDay
));
},
looping:
true
,
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
12
,
(
int
index
)
{
final
int
month
=
index
+
1
;
final
bool
isInvalidMonth
=
(
widget
.
minimumDate
?.
year
==
selectedYear
&&
widget
.
minimumDate
!.
month
>
month
)
...
...
@@ -1226,8 +1228,6 @@ class _CupertinoDatePickerDateState extends State<CupertinoDatePicker> {
),
);
}),
looping:
true
,
selectionOverlay:
selectionOverlay
,
),
);
}
...
...
@@ -1782,6 +1782,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
);
});
},
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
24
,
(
int
index
)
{
final
String
label
=
localizations
.
timerPickerHourLabel
(
index
)
??
''
;
final
String
semanticsLabel
=
textDirectionFactor
==
1
...
...
@@ -1794,7 +1795,6 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
child:
_buildPickerNumberLabel
(
localizations
.
timerPickerHour
(
index
),
additionalPadding
),
);
}),
selectionOverlay:
selectionOverlay
,
);
}
...
...
@@ -1847,6 +1847,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
);
});
},
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
minuteInterval
,
(
int
index
)
{
final
int
minute
=
index
*
widget
.
minuteInterval
;
final
String
label
=
localizations
.
timerPickerMinuteLabel
(
minute
)
??
''
;
...
...
@@ -1860,7 +1861,6 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
child:
_buildPickerNumberLabel
(
localizations
.
timerPickerMinute
(
minute
),
additionalPadding
),
);
}),
selectionOverlay:
selectionOverlay
,
);
}
...
...
@@ -1913,6 +1913,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
);
});
},
selectionOverlay:
selectionOverlay
,
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
secondInterval
,
(
int
index
)
{
final
int
second
=
index
*
widget
.
secondInterval
;
final
String
label
=
localizations
.
timerPickerSecondLabel
(
second
)
??
''
;
...
...
@@ -1926,7 +1927,6 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
child:
_buildPickerNumberLabel
(
localizations
.
timerPickerSecond
(
second
),
additionalPadding
),
);
}),
selectionOverlay:
selectionOverlay
,
);
}
...
...
packages/flutter/lib/src/material/banner.dart
View file @
6d5fc420
...
...
@@ -381,8 +381,8 @@ class _MaterialBannerState extends State<MaterialBanner> {
}
return
Hero
(
child:
ClipRect
(
child:
materialBannerTransition
),
tag:
'<MaterialBanner Hero tag -
${widget.content}
>'
,
child:
ClipRect
(
child:
materialBannerTransition
),
);
}
}
packages/flutter/lib/src/material/dropdown.dart
View file @
6d5fc420
...
...
@@ -195,8 +195,8 @@ class _DropdownMenuItemButtonState<T> extends State<_DropdownMenuItemButton<T>>
enableFeedback:
widget
.
enableFeedback
,
onTap:
_handleOnTap
,
onFocusChange:
_handleFocusChange
,
child:
child
,
borderRadius:
itemBorderRadius
,
child:
child
,
);
}
child
=
FadeTransition
(
opacity:
opacity
,
child:
child
);
...
...
packages/flutter/lib/src/material/stepper.dart
View file @
6d5fc420
...
...
@@ -759,7 +759,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
AnimatedSize
(
curve:
Curves
.
fastOutSlowIn
,
duration:
kThemeAnimationDuration
,
child:
Column
(
c
hildren:
stepPanels
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
),
child:
Column
(
c
rossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
stepPanels
),
),
_buildVerticalControls
(
widget
.
currentStep
),
],
...
...
packages/flutter/test/cupertino/form_row_test.dart
View file @
6d5fc420
...
...
@@ -88,8 +88,8 @@ void main() {
const
CupertinoApp
(
home:
Center
(
child:
CupertinoFormRow
(
child:
CupertinoTextField
(),
error:
error
,
child:
CupertinoTextField
(),
),
),
),
...
...
@@ -105,8 +105,8 @@ void main() {
const
CupertinoApp
(
home:
Center
(
child:
CupertinoFormRow
(
child:
CupertinoTextField
(),
helper:
helper
,
child:
CupertinoTextField
(),
),
),
),
...
...
@@ -123,9 +123,9 @@ void main() {
const
CupertinoApp
(
home:
Center
(
child:
CupertinoFormRow
(
child:
CupertinoTextField
(),
helper:
helper
,
error:
error
,
child:
CupertinoTextField
(),
),
),
),
...
...
@@ -145,9 +145,9 @@ void main() {
const
CupertinoApp
(
home:
Center
(
child:
CupertinoFormRow
(
child:
CupertinoTextField
(),
helper:
helper
,
error:
error
,
child:
CupertinoTextField
(),
),
),
),
...
...
packages/flutter/test/cupertino/picker_test.dart
View file @
6d5fc420
...
...
@@ -182,9 +182,9 @@ void main() {
width:
300.0
,
child:
CupertinoPicker
(
itemExtent:
15.0
,
children:
const
<
Widget
>[
Text
(
'1'
),
Text
(
'1'
)],
onSelectedItemChanged:
(
int
i
)
{},
selectionOverlay:
const
CupertinoPickerDefaultSelectionOverlay
(
background:
Color
(
0x12345678
)),
children:
const
<
Widget
>[
Text
(
'1'
),
Text
(
'1'
)],
),
),
),
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
6d5fc420
...
...
@@ -3536,7 +3536,8 @@ void main() {
value:
'One'
,
items:
const
<
DropdownMenuItem
<
String
>>[
DropdownMenuItem
<
String
>(
child:
Text
(
'One'
),
value:
'One'
value:
'One'
,
child:
Text
(
'One'
)
),
],
onChanged:
(
_
)
{
},
...
...
packages/flutter/test/material/expansion_tile_test.dart
View file @
6d5fc420
...
...
@@ -175,13 +175,13 @@ void main() {
initiallyExpanded:
true
,
title:
TestText
(
'Expanded'
,
key:
expandedTitleKey
),
backgroundColor:
Colors
.
red
,
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'0'
))],
trailing:
TestIcon
(
key:
expandedIconKey
),
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'0'
))],
),
ExpansionTile
(
title:
TestText
(
'Collapsed'
,
key:
collapsedTitleKey
),
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'0'
))],
trailing:
TestIcon
(
key:
collapsedIconKey
),
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'0'
))],
),
],
),
...
...
packages/flutter/test/material/grid_title_test.dart
View file @
6d5fc420
...
...
@@ -19,16 +19,16 @@ void main() {
subtitle:
const
Text
(
'Subtitle'
),
trailing:
const
Icon
(
Icons
.
thumb_up
),
),
child:
DecoratedBox
(
decoration:
BoxDecoration
(
color:
Colors
.
green
[
500
],
),
),
footer:
GridTileBar
(
key:
footerKey
,
title:
const
Text
(
'Footer'
),
backgroundColor:
Colors
.
black38
,
),
child:
DecoratedBox
(
decoration:
BoxDecoration
(
color:
Colors
.
green
[
500
],
),
),
),
));
...
...
packages/flutter/test/material/popup_menu_test.dart
View file @
6d5fc420
...
...
@@ -556,9 +556,9 @@ void main() {
testWidgets
(
'PopupMenuButton fails when given both child and icon'
,
(
WidgetTester
tester
)
async
{
expect
(()
{
PopupMenuButton
<
int
>(
child:
const
Text
(
'heyo'
),
icon:
const
Icon
(
Icons
.
view_carousel
),
itemBuilder:
simplePopupMenuItemBuilder
,
child:
const
Text
(
'heyo'
),
);
},
throwsAssertionError
);
});
...
...
@@ -1699,8 +1699,8 @@ void main() {
expect
(()
{
PopupMenuButton
<
int
>(
itemBuilder:
(
BuildContext
context
)
=>
<
PopupMenuItem
<
int
>>[],
child:
Container
(),
icon:
const
Icon
(
Icons
.
error
),
child:
Container
(),
);
},
throwsAssertionError
);
});
...
...
packages/flutter/test/material/reorderable_list_test.dart
View file @
6d5fc420
...
...
@@ -1520,10 +1520,10 @@ void main() {
testWidgets
(
'ReorderableListView asserts on both non-null itemExtent and prototypeItem'
,
(
WidgetTester
tester
)
async
{
expect
(()
=>
ReorderableListView
(
children:
const
<
Widget
>[],
itemExtent:
30
,
prototypeItem:
const
SizedBox
(),
onReorder:
(
int
fromIndex
,
int
toIndex
)
{
},
children:
const
<
Widget
>[],
),
throwsAssertionError
);
});
...
...
packages/flutter/test/material/tabs_test.dart
View file @
6d5fc420
...
...
@@ -3789,12 +3789,12 @@ void main() {
tabs:
<
Widget
>[
Tab
(
icon:
Icon
(
Icons
.
check
,
size:
40
),
child:
Text
(
'1 - OK'
,
style:
TextStyle
(
fontSize:
25
),),
height:
85
,
child:
Text
(
'1 - OK'
,
style:
TextStyle
(
fontSize:
25
),),
),
// icon and child
Tab
(
child:
Text
(
'2 - OK'
,
style:
TextStyle
(
fontSize:
25
),),
height:
85
,
child:
Text
(
'2 - OK'
,
style:
TextStyle
(
fontSize:
25
),),
),
// child
Tab
(
icon:
Icon
(
Icons
.
done
,
size:
40
),
...
...
packages/flutter/test/rendering/object_paint_dispose_test.dart
View file @
6d5fc420
...
...
@@ -16,8 +16,8 @@ void main() {
child:
CustomPaint
(
key:
key
,
painter:
SimplePainter
(),
child:
const
RepaintBoundary
(
child:
Placeholder
()),
foregroundPainter:
SimplePainter
(),
child:
const
RepaintBoundary
(
child:
Placeholder
()),
),
));
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
6d5fc420
This diff is collapsed.
Click to expand it.
packages/flutter/test/widgets/page_view_test.dart
View file @
6d5fc420
...
...
@@ -25,9 +25,9 @@ void main() {
child:
SizedBox
.
fromSize
(
size:
size
,
child:
PageView
(
children:
kStates
.
map
<
Widget
>((
String
state
)
=>
Text
(
state
)).
toList
(),
controller:
controller
,
onPageChanged:
(
int
page
)
{
},
children:
kStates
.
map
<
Widget
>((
String
state
)
=>
Text
(
state
)).
toList
(),
),
),
),
...
...
@@ -70,9 +70,9 @@ void main() {
child:
SizedBox
.
fromSize
(
size:
size
,
child:
PageView
(
children:
kStates
.
map
<
Widget
>((
String
state
)
=>
Text
(
state
)).
toList
(),
controller:
controller
,
onPageChanged:
(
int
page
)
{
},
children:
kStates
.
map
<
Widget
>((
String
state
)
=>
Text
(
state
)).
toList
(),
),
),
),
...
...
packages/flutter/test/widgets/transform_test.dart
View file @
6d5fc420
...
...
@@ -397,8 +397,8 @@ void main() {
await
tester
.
pumpWidget
(
Transform
.
translate
(
offset:
const
Offset
(
25.0
,
25.0
),
child:
const
SizedBox
(
width:
100
,
height:
100
),
filterQuality:
FilterQuality
.
low
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
),
);
expect
(
tester
.
layers
.
whereType
<
ImageFilterLayer
>().
length
,
1
);
...
...
@@ -408,8 +408,8 @@ void main() {
await
tester
.
pumpWidget
(
Transform
.
scale
(
scale:
3.14159
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
filterQuality:
FilterQuality
.
low
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
),
);
expect
(
tester
.
layers
.
whereType
<
ImageFilterLayer
>().
length
,
1
);
...
...
@@ -419,8 +419,8 @@ void main() {
await
tester
.
pumpWidget
(
Transform
.
rotate
(
angle:
math
.
pi
/
4
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
filterQuality:
FilterQuality
.
low
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
),
);
expect
(
tester
.
layers
.
whereType
<
ImageFilterLayer
>().
length
,
1
);
...
...
@@ -430,8 +430,8 @@ void main() {
await
tester
.
pumpWidget
(
Transform
.
rotate
(
angle:
math
.
pi
/
4
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
filterQuality:
FilterQuality
.
low
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
),
);
expect
(
tester
.
layers
.
whereType
<
ImageFilterLayer
>(),
hasLength
(
1
));
...
...
@@ -455,8 +455,8 @@ void main() {
await
tester
.
pumpWidget
(
Transform
.
rotate
(
angle:
math
.
pi
/
4
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
filterQuality:
FilterQuality
.
low
,
child:
const
SizedBox
(
width:
100
,
height:
100
),
),
);
expect
(
tester
.
layers
.
whereType
<
ImageFilterLayer
>(),
hasLength
(
1
));
...
...
@@ -483,18 +483,18 @@ void main() {
),
Transform
.
rotate
(
angle:
math
.
pi
/
6
,
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
filterQuality:
FilterQuality
.
low
,
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
),
Transform
.
scale
(
scale:
1.5
,
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
filterQuality:
FilterQuality
.
low
,
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
),
Transform
.
translate
(
offset:
const
Offset
(
20.0
,
60.0
),
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
filterQuality:
FilterQuality
.
low
,
child:
Center
(
child:
Container
(
width:
100
,
height:
20
,
color:
const
Color
(
0xff00ff00
))),
),
],
),
...
...
packages/flutter/test/widgets/visibility_test.dart
View file @
6d5fc420
...
...
@@ -106,9 +106,9 @@ void main() {
await
tester
.
pumpWidget
(
Center
(
child:
Visibility
(
child:
testChild
,
replacement:
const
Placeholder
(),
visible:
false
,
child:
testChild
,
),
));
expect
(
find
.
byType
(
Text
,
skipOffstage:
false
),
findsNothing
);
...
...
@@ -123,8 +123,8 @@ void main() {
await
tester
.
pumpWidget
(
Center
(
child:
Visibility
(
child:
testChild
,
replacement:
const
Placeholder
(),
child:
testChild
,
),
));
expect
(
find
.
byType
(
Text
,
skipOffstage:
false
),
findsOneWidget
);
...
...
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