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
58ab556f
Unverified
Commit
58ab556f
authored
May 13, 2021
by
Alexandre Ardhuin
Committed by
GitHub
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first part of applying sort_child_properties_last (#82387)
parent
64765d86
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
150 additions
and
140 deletions
+150
-140
app.dart
packages/flutter/lib/src/cupertino/app.dart
+3
-3
context_menu.dart
packages/flutter/lib/src/cupertino/context_menu.dart
+2
-2
dialog.dart
packages/flutter/lib/src/cupertino/dialog.dart
+4
-4
nav_bar.dart
packages/flutter/lib/src/cupertino/nav_bar.dart
+2
-2
route.dart
packages/flutter/lib/src/cupertino/route.dart
+2
-2
search_field.dart
packages/flutter/lib/src/cupertino/search_field.dart
+6
-3
segmented_control.dart
packages/flutter/lib/src/cupertino/segmented_control.dart
+1
-1
sliding_segmented_control.dart
.../flutter/lib/src/cupertino/sliding_segmented_control.dart
+1
-1
app.dart
packages/flutter/lib/src/material/app.dart
+3
-3
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+5
-2
button_bar.dart
packages/flutter/lib/src/material/button_bar.dart
+1
-1
chip.dart
packages/flutter/lib/src/material/chip.dart
+3
-3
data_table.dart
packages/flutter/lib/src/material/data_table.dart
+3
-3
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+11
-11
date_picker_deprecated.dart
...ages/flutter/lib/src/material/date_picker_deprecated.dart
+1
-1
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+1
-1
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
expansion_tile.dart
packages/flutter/lib/src/material/expansion_tile.dart
+2
-2
flexible_space_bar.dart
packages/flutter/lib/src/material/flexible_space_bar.dart
+3
-3
floating_action_button.dart
...ages/flutter/lib/src/material/floating_action_button.dart
+1
-1
icon_button.dart
packages/flutter/lib/src/material/icon_button.dart
+1
-1
ink_well.dart
packages/flutter/lib/src/material/ink_well.dart
+1
-1
material.dart
packages/flutter/lib/src/material/material.dart
+9
-9
material_button.dart
packages/flutter/lib/src/material/material_button.dart
+1
-1
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+1
-1
reorderable_list.dart
packages/flutter/lib/src/material/reorderable_list.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+4
-4
scrollbar.dart
packages/flutter/lib/src/material/scrollbar.dart
+2
-2
snack_bar.dart
packages/flutter/lib/src/material/snack_bar.dart
+1
-1
tabs.dart
packages/flutter/lib/src/material/tabs.dart
+2
-2
theme.dart
packages/flutter/lib/src/material/theme.dart
+1
-1
user_accounts_drawer_header.dart
...flutter/lib/src/material/user_accounts_drawer_header.dart
+1
-1
animated_size.dart
packages/flutter/lib/src/widgets/animated_size.dart
+1
-1
animated_switcher.dart
packages/flutter/lib/src/widgets/animated_switcher.dart
+1
-1
app.dart
packages/flutter/lib/src/widgets/app.dart
+1
-1
banner.dart
packages/flutter/lib/src/widgets/banner.dart
+1
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+1
-1
container.dart
packages/flutter/lib/src/widgets/container.dart
+1
-1
dismissible.dart
packages/flutter/lib/src/widgets/dismissible.dart
+1
-1
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+1
-1
draggable_scrollable_sheet.dart
...s/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
+2
-2
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+5
-5
list_wheel_scroll_view.dart
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
+4
-4
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+1
-1
reorderable_list.dart
packages/flutter/lib/src/widgets/reorderable_list.dart
+5
-5
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+1
-1
scroll_configuration.dart
packages/flutter/lib/src/widgets/scroll_configuration.dart
+2
-2
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+1
-1
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+1
-1
sliver.dart
packages/flutter/lib/src/widgets/sliver.dart
+2
-2
visibility.dart
packages/flutter/lib/src/widgets/visibility.dart
+4
-4
button_test.dart
packages/flutter/test/cupertino/button_test.dart
+10
-10
context_menu_action_test.dart
...ages/flutter/test/cupertino/context_menu_action_test.dart
+1
-1
dialog_test.dart
packages/flutter/test/cupertino/dialog_test.dart
+5
-1
form_section_test.dart
packages/flutter/test/cupertino/form_section_test.dart
+2
-2
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+5
-5
picker_test.dart
packages/flutter/test/cupertino/picker_test.dart
+1
-1
scaffold_test.dart
packages/flutter/test/cupertino/scaffold_test.dart
+1
-1
tab_scaffold_test.dart
packages/flutter/test/cupertino/tab_scaffold_test.dart
+8
-8
No files found.
packages/flutter/lib/src/cupertino/app.dart
View file @
58ab556f
...
...
@@ -442,8 +442,8 @@ class CupertinoScrollBehavior extends ScrollBehavior {
case
TargetPlatform
.
macOS
:
case
TargetPlatform
.
windows
:
return
CupertinoScrollbar
(
child:
child
,
controller:
details
.
controller
,
child:
child
,
);
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
...
...
@@ -489,13 +489,13 @@ class _CupertinoAppState extends State<CupertinoApp> {
Widget
_inspectorSelectButtonBuilder
(
BuildContext
context
,
VoidCallback
onPressed
)
{
return
CupertinoButton
.
filled
(
padding:
EdgeInsets
.
zero
,
onPressed:
onPressed
,
child:
const
Icon
(
CupertinoIcons
.
search
,
size:
28.0
,
color:
CupertinoColors
.
white
,
),
padding:
EdgeInsets
.
zero
,
onPressed:
onPressed
,
);
}
...
...
packages/flutter/lib/src/cupertino/context_menu.dart
View file @
58ab556f
...
...
@@ -383,9 +383,9 @@ class _CupertinoContextMenuState extends State<CupertinoContextMenu> with Ticker
builder:
(
BuildContext
context
)
{
return
_DecoyChild
(
beginRect:
childRect
,
child:
widget
.
child
,
controller:
_openController
,
endRect:
_decoyChildEndRect
,
child:
widget
.
child
,
);
},
);
...
...
@@ -820,12 +820,12 @@ class _ContextMenuRoute<T> extends PopupRoute<T> {
// in the final position.
return
_ContextMenuRouteStatic
(
actions:
_actions
,
child:
_builder
!(
context
,
animation
),
childGlobalKey:
_childGlobalKey
,
contextMenuLocation:
_contextMenuLocation
,
onDismiss:
_onDismiss
,
orientation:
orientation
,
sheetGlobalKey:
_sheetGlobalKey
,
child:
_builder
!(
context
,
animation
),
);
},
);
...
...
packages/flutter/lib/src/cupertino/dialog.dart
View file @
58ab556f
...
...
@@ -344,9 +344,9 @@ class CupertinoAlertDialog extends StatelessWidget {
);
if
(
actions
.
isNotEmpty
)
{
actionSection
=
_CupertinoAlertActionSection
(
children:
actions
,
scrollController:
actionScrollController
,
isActionSheet:
false
,
children:
actions
,
);
}
...
...
@@ -646,10 +646,10 @@ class CupertinoActionSheet extends StatelessWidget {
);
}
return
_CupertinoAlertActionSection
(
children:
actions
!,
scrollController:
actionScrollController
,
hasCancelButton:
cancelButton
!=
null
,
isActionSheet:
true
,
children:
actions
!,
);
}
...
...
@@ -708,9 +708,9 @@ class CupertinoActionSheet extends StatelessWidget {
vertical:
_kActionSheetEdgeVerticalPadding
,
),
child:
Column
(
children:
children
,
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
children
,
),
),
),
...
...
@@ -788,8 +788,8 @@ class CupertinoActionSheetAction extends StatelessWidget {
),
child:
DefaultTextStyle
(
style:
style
,
child:
child
,
textAlign:
TextAlign
.
center
,
child:
child
,
),
),
),
...
...
packages/flutter/lib/src/cupertino/nav_bar.dart
View file @
58ab556f
...
...
@@ -1076,9 +1076,9 @@ class _NavigationBarStaticComponents {
route
.
fullscreenDialog
)
{
leadingContent
=
CupertinoButton
(
child:
const
Text
(
'Close'
),
padding:
EdgeInsets
.
zero
,
onPressed:
()
{
route
.
navigator
!.
maybePop
();
},
child:
const
Text
(
'Close'
),
);
}
...
...
@@ -1318,6 +1318,7 @@ class CupertinoNavigationBarBackButton extends StatelessWidget {
}
return
CupertinoButton
(
padding:
EdgeInsets
.
zero
,
child:
Semantics
(
container:
true
,
excludeSemantics:
true
,
...
...
@@ -1345,7 +1346,6 @@ class CupertinoNavigationBarBackButton extends StatelessWidget {
),
),
),
padding:
EdgeInsets
.
zero
,
onPressed:
()
{
if
(
onPressed
!=
null
)
{
onPressed
!();
...
...
packages/flutter/lib/src/cupertino/route.dart
View file @
58ab556f
...
...
@@ -265,8 +265,8 @@ mixin CupertinoRouteTransitionMixin<T> on PageRoute<T> {
return
CupertinoFullscreenDialogTransition
(
primaryRouteAnimation:
animation
,
secondaryRouteAnimation:
secondaryAnimation
,
child:
child
,
linearTransition:
linearTransition
,
child:
child
,
);
}
else
{
return
CupertinoPageTransition
(
...
...
@@ -1227,8 +1227,8 @@ Widget _buildCupertinoDialogTransitions(BuildContext context, Animation<double>
return
FadeTransition
(
opacity:
fadeAnimation
,
child:
ScaleTransition
(
child:
child
,
scale:
animation
.
drive
(
_dialogScaleTween
),
child:
child
,
),
);
}
...
...
packages/flutter/lib/src/cupertino/search_field.dart
View file @
58ab556f
...
...
@@ -394,21 +394,24 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
);
final
Widget
prefix
=
Padding
(
padding:
widget
.
prefixInsets
,
child:
IconTheme
(
data:
iconThemeData
,
child:
widget
.
prefixIcon
,
),
padding:
widget
.
prefixInsets
,
);
final
Widget
suffix
=
Padding
(
padding:
widget
.
suffixInsets
,
child:
CupertinoButton
(
child:
IconTheme
(
child:
widget
.
suffixIcon
,
data:
iconThemeData
),
onPressed:
widget
.
onSuffixTap
??
_defaultOnSuffixTap
,
minSize:
0
,
padding:
EdgeInsets
.
zero
,
child:
IconTheme
(
data:
iconThemeData
,
child:
widget
.
suffixIcon
,
),
),
padding:
widget
.
suffixInsets
,
);
return
CupertinoTextField
(
...
...
packages/flutter/lib/src/cupertino/segmented_control.dart
View file @
58ab556f
...
...
@@ -409,11 +409,11 @@ class _SegmentedControlState<T extends Object> extends State<CupertinoSegmentedC
}
final
Widget
box
=
_SegmentedControlRenderWidget
<
T
>(
children:
_gestureChildren
,
selectedIndex:
selectedIndex
,
pressedIndex:
pressedIndex
,
backgroundColors:
_backgroundColors
,
borderColor:
_borderColor
!,
children:
_gestureChildren
,
);
return
Padding
(
...
...
packages/flutter/lib/src/cupertino/sliding_segmented_control.dart
View file @
58ab556f
...
...
@@ -687,11 +687,11 @@ class _SegmentedControlState<T> extends State<CupertinoSlidingSegmentedControl<T
animation:
thumbScaleAnimation
,
builder:
(
BuildContext
context
,
Widget
?
child
)
{
return
_SegmentedControlRenderWidget
<
T
>(
children:
children
,
highlightedIndex:
highlightedIndex
,
thumbColor:
CupertinoDynamicColor
.
resolve
(
widget
.
thumbColor
,
context
),
thumbScale:
thumbScaleAnimation
.
value
,
state:
this
,
children:
children
,
);
},
),
...
...
packages/flutter/lib/src/material/app.dart
View file @
58ab556f
...
...
@@ -713,8 +713,8 @@ class MaterialScrollBehavior extends ScrollBehavior {
case
TargetPlatform
.
macOS
:
case
TargetPlatform
.
windows
:
return
Scrollbar
(
child:
child
,
controller:
details
.
controller
,
child:
child
,
);
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
...
...
@@ -737,9 +737,9 @@ class MaterialScrollBehavior extends ScrollBehavior {
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
return
GlowingOverscrollIndicator
(
child:
child
,
axisDirection:
details
.
direction
,
color:
Theme
.
of
(
context
).
colorScheme
.
secondary
,
child:
child
,
);
}
}
...
...
@@ -770,9 +770,9 @@ class _MaterialAppState extends State<MaterialApp> {
Widget
_inspectorSelectButtonBuilder
(
BuildContext
context
,
VoidCallback
onPressed
)
{
return
FloatingActionButton
(
child:
const
Icon
(
Icons
.
search
),
onPressed:
onPressed
,
mini:
true
,
child:
const
Icon
(
Icons
.
search
),
);
}
...
...
packages/flutter/lib/src/material/app_bar.dart
View file @
58ab556f
...
...
@@ -901,8 +901,8 @@ class _AppBarState extends State<AppBar> {
if
(!
widget
.
excludeHeaderSemantics
)
{
title
=
Semantics
(
namesRoute:
namesRoute
,
child:
title
,
header:
true
,
child:
title
,
);
}
...
...
@@ -1186,7 +1186,10 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
title:
title
,
actions:
actions
,
flexibleSpace:
(
title
==
null
&&
flexibleSpace
!=
null
&&
!
excludeHeaderSemantics
)
?
Semantics
(
child:
flexibleSpace
,
header:
true
)
?
Semantics
(
header:
true
,
child:
flexibleSpace
,
)
:
flexibleSpace
,
bottom:
bottom
,
elevation:
forceElevated
||
isScrolledUnder
?
elevation
:
0.0
,
...
...
packages/flutter/lib/src/material/button_bar.dart
View file @
58ab556f
...
...
@@ -188,13 +188,13 @@ class ButtonBar extends StatelessWidget {
mainAxisAlignment:
alignment
??
barTheme
.
alignment
??
MainAxisAlignment
.
end
,
mainAxisSize:
mainAxisSize
??
barTheme
.
mainAxisSize
??
MainAxisSize
.
max
,
overflowDirection:
overflowDirection
??
barTheme
.
overflowDirection
??
VerticalDirection
.
down
,
overflowButtonSpacing:
overflowButtonSpacing
,
children:
children
.
map
<
Widget
>((
Widget
child
)
{
return
Padding
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
paddingUnit
),
child:
child
,
);
}).
toList
(),
overflowButtonSpacing:
overflowButtonSpacing
,
),
);
switch
(
buttonTheme
.
layoutBehavior
)
{
...
...
packages/flutter/lib/src/material/chip.dart
View file @
58ab556f
...
...
@@ -1982,14 +1982,14 @@ class _RawChipState extends State<RawChip> with TickerProviderStateMixin<RawChip
child:
widget
.
label
,
),
avatar:
AnimatedSwitcher
(
child:
widget
.
avatar
,
duration:
_kDrawerDuration
,
switchInCurve:
Curves
.
fastOutSlowIn
,
child:
widget
.
avatar
,
),
deleteIcon:
AnimatedSwitcher
(
child:
_buildDeleteIcon
(
context
,
theme
,
chipTheme
,
deleteIconKey
),
duration:
_kDrawerDuration
,
switchInCurve:
Curves
.
fastOutSlowIn
,
child:
_buildDeleteIcon
(
context
,
theme
,
chipTheme
,
deleteIconKey
),
),
brightness:
chipTheme
.
brightness
,
padding:
(
widget
.
padding
??
chipTheme
.
padding
).
resolve
(
textDirection
),
...
...
@@ -2028,9 +2028,9 @@ class _RawChipState extends State<RawChip> with TickerProviderStateMixin<RawChip
result
=
_ChipRedirectingHitDetectionWidget
(
constraints:
constraints
,
child:
Center
(
child:
result
,
widthFactor:
1.0
,
heightFactor:
1.0
,
child:
result
,
),
);
return
Semantics
(
...
...
packages/flutter/lib/src/material/data_table.dart
View file @
58ab556f
...
...
@@ -790,8 +790,8 @@ class DataTable extends StatelessWidget {
if
(
onRowTap
!=
null
)
{
contents
=
TableRowInkWell
(
onTap:
onRowTap
,
child:
contents
,
overlayColor:
overlayColor
,
child:
contents
,
);
}
return
TableCell
(
...
...
@@ -915,14 +915,14 @@ class DataTable extends StatelessWidget {
onLongPress:
onLongPress
,
onTapCancel:
onTapCancel
,
onTapDown:
onTapDown
,
child:
label
,
overlayColor:
overlayColor
,
child:
label
,
);
}
else
if
(
onSelectChanged
!=
null
)
{
label
=
TableRowInkWell
(
onTap:
onSelectChanged
,
child:
label
,
overlayColor:
overlayColor
,
child:
label
,
);
}
return
label
;
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
58ab556f
...
...
@@ -528,12 +528,12 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
spacing:
8
,
children:
<
Widget
>[
TextButton
(
child:
Text
(
widget
.
cancelText
??
localizations
.
cancelButtonLabel
),
onPressed:
_handleCancel
,
child:
Text
(
widget
.
cancelText
??
localizations
.
cancelButtonLabel
),
),
TextButton
(
child:
Text
(
widget
.
confirmText
??
localizations
.
okButtonLabel
),
onPressed:
_handleOk
,
child:
Text
(
widget
.
confirmText
??
localizations
.
okButtonLabel
),
),
],
),
...
...
@@ -630,6 +630,8 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
final
Size
dialogSize
=
_dialogSize
(
context
)
*
textScaleFactor
;
return
Dialog
(
insetPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
,
vertical:
24.0
),
clipBehavior:
Clip
.
antiAlias
,
child:
AnimatedContainer
(
width:
dialogSize
.
width
,
height:
dialogSize
.
height
,
...
...
@@ -673,8 +675,6 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
}),
),
),
insetPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
,
vertical:
24.0
),
clipBehavior:
Clip
.
antiAlias
,
);
}
}
...
...
@@ -1512,6 +1512,10 @@ class _DateRangePickerDialogState extends State<DateRangePickerDialog> with Rest
}
return
Dialog
(
insetPadding:
insetPadding
,
shape:
shape
,
elevation:
elevation
,
clipBehavior:
Clip
.
antiAlias
,
child:
AnimatedContainer
(
width:
size
.
width
,
height:
size
.
height
,
...
...
@@ -1526,10 +1530,6 @@ class _DateRangePickerDialogState extends State<DateRangePickerDialog> with Rest
}),
),
),
insetPadding:
insetPadding
,
shape:
shape
,
elevation:
elevation
,
clipBehavior:
Clip
.
antiAlias
,
);
}
}
...
...
@@ -1607,6 +1607,7 @@ class _CalendarRangePickerDialog extends StatelessWidget {
const
SizedBox
(
width:
8
),
],
bottom:
PreferredSize
(
preferredSize:
const
Size
(
double
.
infinity
,
64
),
child:
Row
(
children:
<
Widget
>[
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
<
360
?
42
:
72
),
Expanded
(
...
...
@@ -1654,7 +1655,6 @@ class _CalendarRangePickerDialog extends StatelessWidget {
child:
entryModeButton
!,
),
]),
preferredSize:
const
Size
(
double
.
infinity
,
64
),
),
),
body:
_CalendarDateRangePicker
(
...
...
@@ -2725,12 +2725,12 @@ class _InputDateRangePickerDialog extends StatelessWidget {
spacing:
8
,
children:
<
Widget
>[
TextButton
(
child:
Text
(
cancelText
??
localizations
.
cancelButtonLabel
),
onPressed:
onCancel
,
child:
Text
(
cancelText
??
localizations
.
cancelButtonLabel
),
),
TextButton
(
child:
Text
(
confirmText
??
localizations
.
okButtonLabel
),
onPressed:
onConfirm
,
child:
Text
(
confirmText
??
localizations
.
okButtonLabel
),
),
],
),
...
...
packages/flutter/lib/src/material/date_picker_deprecated.dart
View file @
58ab556f
...
...
@@ -301,8 +301,8 @@ class DayPicker extends StatelessWidget {
onTap:
()
{
onChanged
(
dayToBuild
);
},
child:
dayWidget
,
dragStartBehavior:
dragStartBehavior
,
child:
dayWidget
,
);
}
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
58ab556f
...
...
@@ -507,9 +507,9 @@ class AlertDialog extends StatelessWidget {
child:
DefaultTextStyle
(
style:
titleTextStyle
??
dialogTheme
.
titleTextStyle
??
theme
.
textTheme
.
headline6
!,
child:
Semantics
(
child:
title
,
namesRoute:
label
==
null
,
container:
true
,
child:
title
,
),
),
);
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
58ab556f
...
...
@@ -176,9 +176,9 @@ class _DropdownMenuItemButtonState<T> extends State<_DropdownMenuItemButton<T>>
child
=
InkWell
(
autofocus:
widget
.
itemIndex
==
widget
.
route
.
selectedIndex
,
enableFeedback:
widget
.
enableFeedback
,
child:
child
,
onTap:
_handleOnTap
,
onFocusChange:
_handleFocusChange
,
child:
child
,
);
}
child
=
FadeTransition
(
opacity:
opacity
,
child:
child
);
...
...
packages/flutter/lib/src/material/expansion_tile.dart
View file @
58ab556f
...
...
@@ -309,7 +309,9 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
final
bool
shouldRemoveChildren
=
closed
&&
!
widget
.
maintainState
;
final
Widget
result
=
Offstage
(
offstage:
closed
,
child:
TickerMode
(
enabled:
!
closed
,
child:
Padding
(
padding:
widget
.
childrenPadding
??
EdgeInsets
.
zero
,
child:
Column
(
...
...
@@ -317,9 +319,7 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
children:
widget
.
children
,
),
),
enabled:
!
closed
,
),
offstage:
closed
,
);
return
AnimatedBuilder
(
...
...
packages/flutter/lib/src/material/flexible_space_bar.dart
View file @
58ab556f
...
...
@@ -337,13 +337,13 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
final
double
blurAmount
=
(
constraints
.
maxHeight
-
settings
.
maxExtent
)
/
10
;
children
.
add
(
Positioned
.
fill
(
child:
BackdropFilter
(
child:
Container
(
color:
Colors
.
transparent
,
),
filter:
ui
.
ImageFilter
.
blur
(
sigmaX:
blurAmount
,
sigmaY:
blurAmount
,
),
child:
Container
(
color:
Colors
.
transparent
,
),
),
));
}
...
...
packages/flutter/lib/src/material/floating_action_button.dart
View file @
58ab556f
...
...
@@ -499,8 +499,8 @@ class FloatingActionButton extends StatelessWidget {
clipBehavior:
clipBehavior
,
focusNode:
focusNode
,
autofocus:
autofocus
,
child:
child
,
enableFeedback:
enableFeedback
,
child:
child
,
);
if
(
tooltip
!=
null
)
{
...
...
packages/flutter/lib/src/material/icon_button.dart
View file @
58ab556f
...
...
@@ -381,7 +381,6 @@ class IconButton extends StatelessWidget {
onTap:
onPressed
,
mouseCursor:
mouseCursor
,
enableFeedback:
enableFeedback
,
child:
result
,
focusColor:
focusColor
??
theme
.
focusColor
,
hoverColor:
hoverColor
??
theme
.
hoverColor
,
highlightColor:
highlightColor
??
theme
.
highlightColor
,
...
...
@@ -391,6 +390,7 @@ class IconButton extends StatelessWidget {
(
iconSize
+
math
.
min
(
padding
.
horizontal
,
padding
.
vertical
))
*
0.7
,
// x 0.5 for diameter -> radius and + 40% overflow derived from other Material apps.
),
child:
result
,
),
);
}
...
...
packages/flutter/lib/src/material/ink_well.dart
View file @
58ab556f
...
...
@@ -580,7 +580,6 @@ class InkResponse extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
final
_ParentInkResponseState
?
parentState
=
_ParentInkResponseProvider
.
of
(
context
);
return
_InkResponseStateWidget
(
child:
child
,
onTap:
onTap
,
onTapDown:
onTapDown
,
onTapCancel:
onTapCancel
,
...
...
@@ -609,6 +608,7 @@ class InkResponse extends StatelessWidget {
parentState:
parentState
,
getRectCallback:
getRectCallback
,
debugCheckContext:
debugCheckContext
,
child:
child
,
);
}
...
...
packages/flutter/lib/src/material/material.dart
View file @
58ab556f
...
...
@@ -385,8 +385,8 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
key:
_inkFeatureRenderer
,
absorbHitTest:
widget
.
type
!=
MaterialType
.
transparency
,
color:
backgroundColor
,
child:
contents
,
vsync:
this
,
child:
contents
,
),
);
...
...
@@ -445,19 +445,19 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
required
Widget
contents
,
})
{
final
_ShapeBorderPaint
child
=
_ShapeBorderPaint
(
child:
contents
,
shape:
shape
,
child:
contents
,
);
if
(
clipBehavior
==
Clip
.
none
)
{
return
child
;
}
return
ClipPath
(
child:
child
,
clipper:
ShapeBorderClipper
(
shape:
shape
,
textDirection:
Directionality
.
maybeOf
(
context
),
),
clipBehavior:
clipBehavior
,
child:
child
,
);
}
...
...
@@ -781,11 +781,6 @@ class _MaterialInteriorState extends AnimatedWidgetBaseState<_MaterialInterior>
final
ShapeBorder
shape
=
_border
!.
evaluate
(
animation
)!;
final
double
elevation
=
_elevation
!.
evaluate
(
animation
);
return
PhysicalShape
(
child:
_ShapeBorderPaint
(
child:
widget
.
child
,
shape:
shape
,
borderOnForeground:
widget
.
borderOnForeground
,
),
clipper:
ShapeBorderClipper
(
shape:
shape
,
textDirection:
Directionality
.
maybeOf
(
context
),
...
...
@@ -794,6 +789,11 @@ class _MaterialInteriorState extends AnimatedWidgetBaseState<_MaterialInterior>
elevation:
elevation
,
color:
ElevationOverlay
.
applyOverlay
(
context
,
widget
.
color
,
elevation
),
shadowColor:
_shadowColor
!.
evaluate
(
animation
)!,
child:
_ShapeBorderPaint
(
shape:
shape
,
borderOnForeground:
widget
.
borderOnForeground
,
child:
widget
.
child
,
),
);
}
}
...
...
@@ -812,9 +812,9 @@ class _ShapeBorderPaint extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
CustomPaint
(
child:
child
,
painter:
borderOnForeground
?
null
:
_ShapeBorderPainter
(
shape
,
Directionality
.
maybeOf
(
context
)),
foregroundPainter:
borderOnForeground
?
_ShapeBorderPainter
(
shape
,
Directionality
.
maybeOf
(
context
))
:
null
,
child:
child
,
);
}
}
...
...
packages/flutter/lib/src/material/material_button.dart
View file @
58ab556f
...
...
@@ -427,9 +427,9 @@ class MaterialButton extends StatelessWidget {
focusNode:
focusNode
,
autofocus:
autofocus
,
animationDuration:
buttonTheme
.
getAnimationDuration
(
this
),
child:
child
,
materialTapTargetSize:
materialTapTargetSize
??
theme
.
materialTapTargetSize
,
disabledElevation:
disabledElevation
??
0.0
,
child:
child
,
);
}
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
58ab556f
...
...
@@ -1169,8 +1169,8 @@ class PopupMenuButtonState<T> extends State<PopupMenuButton<T>> {
child:
InkWell
(
onTap:
widget
.
enabled
?
showButtonMenu
:
null
,
canRequestFocus:
_canRequestFocus
,
child:
widget
.
child
,
enableFeedback:
enableFeedback
,
child:
widget
.
child
,
),
);
...
...
packages/flutter/lib/src/material/reorderable_list.dart
View file @
58ab556f
...
...
@@ -491,8 +491,8 @@ class _ReorderableListViewState extends State<ReorderableListView> {
final
double
animValue
=
Curves
.
easeInOut
.
transform
(
animation
.
value
);
final
double
elevation
=
lerpDouble
(
0
,
6
,
animValue
)!;
return
Material
(
child:
child
,
elevation:
elevation
,
child:
child
,
);
},
child:
child
,
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
58ab556f
...
...
@@ -2919,13 +2919,13 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
DrawerController
(
key:
_endDrawerKey
,
alignment:
DrawerAlignment
.
end
,
child:
widget
.
endDrawer
!,
drawerCallback:
_endDrawerOpenedCallback
,
dragStartBehavior:
widget
.
drawerDragStartBehavior
,
scrimColor:
widget
.
drawerScrimColor
,
edgeDragWidth:
widget
.
drawerEdgeDragWidth
,
enableOpenDragGesture:
widget
.
endDrawerEnableOpenDragGesture
,
isDrawerOpen:
_endDrawerOpened
.
value
,
child:
widget
.
endDrawer
!,
),
_ScaffoldSlot
.
endDrawer
,
// remove the side padding from the side we're not touching
...
...
@@ -2945,13 +2945,13 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
DrawerController
(
key:
_drawerKey
,
alignment:
DrawerAlignment
.
start
,
child:
widget
.
drawer
!,
drawerCallback:
_drawerOpenedCallback
,
dragStartBehavior:
widget
.
drawerDragStartBehavior
,
scrimColor:
widget
.
drawerScrimColor
,
edgeDragWidth:
widget
.
drawerEdgeDragWidth
,
enableOpenDragGesture:
widget
.
drawerEnableOpenDragGesture
,
isDrawerOpen:
_drawerOpened
.
value
,
child:
widget
.
drawer
!,
),
_ScaffoldSlot
.
drawer
,
// remove the side padding from the side we're not touching
...
...
@@ -3185,11 +3185,11 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
_addIfNonNull
(
children
,
_FloatingActionButtonTransition
(
child:
widget
.
floatingActionButton
,
fabMoveAnimation:
_floatingActionButtonMoveController
,
fabMotionAnimator:
_floatingActionButtonAnimator
,
geometryNotifier:
_geometryNotifier
,
currentController:
_floatingActionButtonVisibilityController
,
child:
widget
.
floatingActionButton
,
),
_ScaffoldSlot
.
floatingActionButton
,
removeLeftPadding:
true
,
...
...
@@ -3253,7 +3253,6 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
color:
widget
.
backgroundColor
??
themeData
.
scaffoldBackgroundColor
,
child:
AnimatedBuilder
(
animation:
_floatingActionButtonMoveController
,
builder:
(
BuildContext
context
,
Widget
?
child
)
{
return
CustomMultiChildLayout
(
children:
children
,
delegate:
_ScaffoldLayout
(
extendBody:
_extendBody
,
extendBodyBehindAppBar:
widget
.
extendBodyBehindAppBar
,
...
...
@@ -3268,6 +3267,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
isSnackBarFloating:
isSnackBarFloating
,
snackBarWidth:
snackBarWidth
,
),
children:
children
,
);
}),
),
...
...
packages/flutter/lib/src/material/scrollbar.dart
View file @
58ab556f
...
...
@@ -176,7 +176,6 @@ class _ScrollbarState extends State<Scrollbar> {
Widget
build
(
BuildContext
context
)
{
if
(
_useCupertinoScrollbar
)
{
return
CupertinoScrollbar
(
child:
widget
.
child
,
isAlwaysShown:
widget
.
isAlwaysShown
??
false
,
thickness:
widget
.
thickness
??
CupertinoScrollbar
.
defaultThickness
,
thicknessWhileDragging:
widget
.
thickness
??
CupertinoScrollbar
.
defaultThicknessWhileDragging
,
...
...
@@ -184,10 +183,10 @@ class _ScrollbarState extends State<Scrollbar> {
radiusWhileDragging:
widget
.
radius
??
CupertinoScrollbar
.
defaultRadiusWhileDragging
,
controller:
widget
.
controller
,
notificationPredicate:
widget
.
notificationPredicate
,
child:
widget
.
child
,
);
}
return
_MaterialScrollbar
(
child:
widget
.
child
,
controller:
widget
.
controller
,
isAlwaysShown:
widget
.
isAlwaysShown
,
showTrackOnHover:
widget
.
showTrackOnHover
,
...
...
@@ -196,6 +195,7 @@ class _ScrollbarState extends State<Scrollbar> {
radius:
widget
.
radius
,
notificationPredicate:
widget
.
notificationPredicate
,
interactive:
widget
.
interactive
,
child:
widget
.
child
,
);
}
}
...
...
packages/flutter/lib/src/material/snack_bar.dart
View file @
58ab556f
...
...
@@ -632,8 +632,8 @@ class _SnackBarState extends State<SnackBar> {
}
return
Hero
(
child:
ClipRect
(
child:
snackBarTransition
),
tag:
'<SnackBar Hero tag -
${widget.content}
>'
,
child:
ClipRect
(
child:
snackBarTransition
),
);
}
}
packages/flutter/lib/src/material/tabs.dart
View file @
58ab556f
...
...
@@ -119,8 +119,8 @@ class Tab extends StatelessWidget implements PreferredSizeWidget{
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
child:
icon
,
margin:
iconMargin
,
child:
icon
,
),
_buildLabelText
(),
],
...
...
@@ -130,8 +130,8 @@ class Tab extends StatelessWidget implements PreferredSizeWidget{
return
SizedBox
(
height:
height
,
child:
Center
(
child:
label
,
widthFactor:
1.0
,
child:
label
,
),
);
}
...
...
packages/flutter/lib/src/material/theme.dart
View file @
58ab556f
...
...
@@ -227,8 +227,8 @@ class _AnimatedThemeState extends AnimatedWidgetBaseState<AnimatedTheme> {
@override
Widget
build
(
BuildContext
context
)
{
return
Theme
(
child:
widget
.
child
,
data:
_data
!.
evaluate
(
animation
),
child:
widget
.
child
,
);
}
...
...
packages/flutter/lib/src/material/user_accounts_drawer_header.dart
View file @
58ab556f
...
...
@@ -199,8 +199,8 @@ class _AccountDetailsState extends State<_AccountDetails> with SingleTickerProvi
if
(
widget
.
onTap
!=
null
)
{
accountDetails
=
InkWell
(
onTap:
widget
.
onTap
,
child:
accountDetails
,
excludeFromSemantics:
true
,
child:
accountDetails
,
);
}
...
...
packages/flutter/lib/src/widgets/animated_size.dart
View file @
58ab556f
...
...
@@ -123,13 +123,13 @@ class _AnimatedSizeState
@override
Widget
build
(
BuildContext
context
)
{
return
_AnimatedSize
(
child:
widget
.
child
,
alignment:
widget
.
alignment
,
curve:
widget
.
curve
,
duration:
widget
.
duration
,
reverseDuration:
widget
.
reverseDuration
,
vsync:
this
,
clipBehavior:
widget
.
clipBehavior
,
child:
widget
.
child
,
);
}
}
...
...
packages/flutter/lib/src/widgets/animated_switcher.dart
View file @
58ab556f
...
...
@@ -273,11 +273,11 @@ class AnimatedSwitcher extends StatefulWidget {
/// This is an [AnimatedSwitcherLayoutBuilder] function.
static
Widget
defaultLayoutBuilder
(
Widget
?
currentChild
,
List
<
Widget
>
previousChildren
)
{
return
Stack
(
alignment:
Alignment
.
center
,
children:
<
Widget
>[
...
previousChildren
,
if
(
currentChild
!=
null
)
currentChild
,
],
alignment:
Alignment
.
center
,
);
}
...
...
packages/flutter/lib/src/widgets/app.dart
View file @
58ab556f
...
...
@@ -1592,8 +1592,8 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
assert
(()
{
if
(
widget
.
debugShowWidgetInspector
||
WidgetsApp
.
debugShowWidgetInspectorOverride
)
{
result
=
WidgetInspector
(
child:
result
,
selectButtonBuilder:
widget
.
inspectorSelectButtonBuilder
,
child:
result
,
);
}
if
(
widget
.
debugShowCheckedModeBanner
&&
WidgetsApp
.
debugAllowBannerOverride
)
{
...
...
packages/flutter/lib/src/widgets/banner.dart
View file @
58ab556f
...
...
@@ -345,10 +345,10 @@ class CheckedModeBanner extends StatelessWidget {
Widget
result
=
child
;
assert
(()
{
result
=
Banner
(
child:
result
,
message:
'DEBUG'
,
textDirection:
TextDirection
.
ltr
,
location:
BannerLocation
.
topEnd
,
child:
result
,
);
return
true
;
}());
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
58ab556f
...
...
@@ -2653,11 +2653,11 @@ class UnconstrainedBox extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
ConstraintsTransformBox
(
child:
child
,
textDirection:
textDirection
,
alignment:
alignment
,
clipBehavior:
clipBehavior
,
constraintsTransform:
_axisToTransform
(
constrainedAxis
),
child:
child
,
);
}
...
...
packages/flutter/lib/src/widgets/container.dart
View file @
58ab556f
...
...
@@ -431,7 +431,7 @@ class Container extends StatelessWidget {
current
=
Padding
(
padding:
margin
!,
child:
current
);
if
(
transform
!=
null
)
current
=
Transform
(
transform:
transform
!,
child:
current
,
alignment:
transformAlignm
ent
);
current
=
Transform
(
transform:
transform
!,
alignment:
transformAlignment
,
child:
curr
ent
);
return
current
!;
}
...
...
packages/flutter/lib/src/widgets/dismissible.dart
View file @
58ab556f
...
...
@@ -618,8 +618,8 @@ class _DismissibleState extends State<Dismissible> with TickerProviderStateMixin
onVerticalDragUpdate:
_directionIsXAxis
?
null
:
_handleDragUpdate
,
onVerticalDragEnd:
_directionIsXAxis
?
null
:
_handleDragEnd
,
behavior:
widget
.
behavior
,
child:
content
,
dragStartBehavior:
widget
.
dragStartBehavior
,
child:
content
,
);
}
}
packages/flutter/lib/src/widgets/drag_target.dart
View file @
58ab556f
...
...
@@ -1007,8 +1007,8 @@ class _DragAvatar<T extends Object> extends Drag {
left:
_lastOffset
!.
dx
-
overlayTopLeft
.
dx
,
top:
_lastOffset
!.
dy
-
overlayTopLeft
.
dy
,
child:
IgnorePointer
(
child:
feedback
,
ignoringSemantics:
ignoringFeedbackSemantics
,
child:
feedback
,
),
);
}
...
...
packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
View file @
58ab556f
...
...
@@ -335,8 +335,8 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
_extent
.
availablePixels
=
widget
.
maxChildSize
*
constraints
.
biggest
.
height
;
final
Widget
sheet
=
FractionallySizedBox
(
heightFactor:
_extent
.
currentExtent
,
child:
widget
.
builder
(
context
,
_scrollController
),
alignment:
Alignment
.
bottomCenter
,
child:
widget
.
builder
(
context
,
_scrollController
),
);
return
widget
.
expand
?
SizedBox
.
expand
(
child:
sheet
)
:
sheet
;
},
...
...
@@ -554,7 +554,7 @@ class DraggableScrollableActuator extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
_InheritedResetNotifier
(
child:
child
,
notifier:
_notifier
);
return
_InheritedResetNotifier
(
notifier:
_notifier
,
child:
child
);
}
}
...
...
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
58ab556f
...
...
@@ -772,7 +772,6 @@ class _AnimatedContainerState extends AnimatedWidgetBaseState<AnimatedContainer>
Widget
build
(
BuildContext
context
)
{
final
Animation
<
double
>
animation
=
this
.
animation
;
return
Container
(
child:
widget
.
child
,
alignment:
_alignment
?.
evaluate
(
animation
),
padding:
_padding
?.
evaluate
(
animation
),
decoration:
_decoration
?.
evaluate
(
animation
),
...
...
@@ -782,6 +781,7 @@ class _AnimatedContainerState extends AnimatedWidgetBaseState<AnimatedContainer>
transform:
_transform
?.
evaluate
(
animation
),
transformAlignment:
_transformAlignment
?.
evaluate
(
animation
),
clipBehavior:
widget
.
clipBehavior
,
child:
widget
.
child
,
);
}
...
...
@@ -1248,13 +1248,13 @@ class _AnimatedPositionedState extends AnimatedWidgetBaseState<AnimatedPositione
@override
Widget
build
(
BuildContext
context
)
{
return
Positioned
(
child:
widget
.
child
,
left:
_left
?.
evaluate
(
animation
),
top:
_top
?.
evaluate
(
animation
),
right:
_right
?.
evaluate
(
animation
),
bottom:
_bottom
?.
evaluate
(
animation
),
width:
_width
?.
evaluate
(
animation
),
height:
_height
?.
evaluate
(
animation
),
child:
widget
.
child
,
);
}
...
...
@@ -1385,13 +1385,13 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
assert
(
debugCheckHasDirectionality
(
context
));
return
Positioned
.
directional
(
textDirection:
Directionality
.
of
(
context
),
child:
widget
.
child
,
start:
_start
?.
evaluate
(
animation
),
top:
_top
?.
evaluate
(
animation
),
end:
_end
?.
evaluate
(
animation
),
bottom:
_bottom
?.
evaluate
(
animation
),
width:
_width
?.
evaluate
(
animation
),
height:
_height
?.
evaluate
(
animation
),
child:
widget
.
child
,
);
}
...
...
@@ -1532,8 +1532,8 @@ class _AnimatedOpacityState extends ImplicitlyAnimatedWidgetState<AnimatedOpacit
Widget
build
(
BuildContext
context
)
{
return
FadeTransition
(
opacity:
_opacityAnimation
,
child:
widget
.
child
,
alwaysIncludeSemantics:
widget
.
alwaysIncludeSemantics
,
child:
widget
.
child
,
);
}
}
...
...
@@ -1919,7 +1919,6 @@ class _AnimatedPhysicalModelState extends AnimatedWidgetBaseState<AnimatedPhysic
@override
Widget
build
(
BuildContext
context
)
{
return
PhysicalModel
(
child:
widget
.
child
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
borderRadius:
_borderRadius
!.
evaluate
(
animation
),
...
...
@@ -1928,6 +1927,7 @@ class _AnimatedPhysicalModelState extends AnimatedWidgetBaseState<AnimatedPhysic
shadowColor:
widget
.
animateShadowColor
?
_shadowColor
!.
evaluate
(
animation
)!
:
widget
.
shadowColor
,
child:
widget
.
child
,
);
}
}
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
View file @
58ab556f
...
...
@@ -93,7 +93,7 @@ class ListWheelChildListDelegate extends ListWheelChildDelegate {
Widget
?
build
(
BuildContext
context
,
int
index
)
{
if
(
index
<
0
||
index
>=
children
.
length
)
return
null
;
return
IndexedSemantics
(
child:
children
[
index
],
index:
index
);
return
IndexedSemantics
(
index:
index
,
child:
children
[
index
]
);
}
@override
...
...
@@ -139,7 +139,7 @@ class ListWheelChildLoopingListDelegate extends ListWheelChildDelegate {
Widget
?
build
(
BuildContext
context
,
int
index
)
{
if
(
children
.
isEmpty
)
return
null
;
return
IndexedSemantics
(
child:
children
[
index
%
children
.
length
],
index:
index
);
return
IndexedSemantics
(
index:
index
,
child:
children
[
index
%
children
.
length
]
);
}
@override
...
...
@@ -182,11 +182,11 @@ class ListWheelChildBuilderDelegate extends ListWheelChildDelegate {
Widget
?
build
(
BuildContext
context
,
int
index
)
{
if
(
childCount
==
null
)
{
final
Widget
?
child
=
builder
(
context
,
index
);
return
child
==
null
?
null
:
IndexedSemantics
(
child:
child
,
index:
index
);
return
child
==
null
?
null
:
IndexedSemantics
(
index:
index
,
child:
child
);
}
if
(
index
<
0
||
index
>=
childCount
!)
return
null
;
return
IndexedSemantics
(
child:
builder
(
context
,
index
),
index:
index
);
return
IndexedSemantics
(
index:
index
,
child:
builder
(
context
,
index
)
);
}
@override
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
58ab556f
...
...
@@ -507,8 +507,8 @@ class OverlayState extends State<Overlay> with TickerProviderStateMixin {
}
return
_Theatre
(
skipCount:
children
.
length
-
onstageCount
,
children:
children
.
reversed
.
toList
(
growable:
false
),
clipBehavior:
widget
.
clipBehavior
,
children:
children
.
reversed
.
toList
(
growable:
false
),
);
}
...
...
packages/flutter/lib/src/widgets/reorderable_list.dart
View file @
58ab556f
...
...
@@ -852,8 +852,8 @@ class SliverReorderableListState extends State<SliverReorderableList> with Ticke
return
_ReorderableItem
(
key:
_ReorderableItemGlobalKey
(
child
.
key
!,
index
,
this
),
index:
index
,
child:
child
,
capturedThemes:
InheritedTheme
.
capture
(
from:
context
,
to:
overlay
.
context
),
child:
child
,
);
}
...
...
@@ -1221,11 +1221,11 @@ class _DragInfo extends Drag {
_DragItemProxy
(
listState:
listState
,
index:
index
,
child:
child
,
size:
itemSize
,
animation:
_proxyAnimation
!,
position:
dragPosition
-
dragOffset
-
_overlayOrigin
(
context
),
proxyDecorator:
proxyDecorator
,
child:
child
,
),
);
}
...
...
@@ -1270,14 +1270,14 @@ class _DragItemProxy extends StatelessWidget {
if
(
dropPosition
!=
null
)
{
effectivePosition
=
Offset
.
lerp
(
dropPosition
-
overlayOrigin
,
effectivePosition
,
Curves
.
easeOut
.
transform
(
animation
.
value
))!;
}
return
Positioned
(
return
Positioned
(
left:
effectivePosition
.
dx
,
top:
effectivePosition
.
dy
,
child:
SizedBox
(
width:
size
.
width
,
height:
size
.
height
,
child:
child
,
),
left:
effectivePosition
.
dx
,
top:
effectivePosition
.
dy
,
);
},
child:
proxyChild
,
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
58ab556f
...
...
@@ -1823,9 +1823,9 @@ class RawDialogRoute<T> extends PopupRoute<T> {
@override
Widget
buildPage
(
BuildContext
context
,
Animation
<
double
>
animation
,
Animation
<
double
>
secondaryAnimation
)
{
return
Semantics
(
child:
_pageBuilder
(
context
,
animation
,
secondaryAnimation
),
scopesRoute:
true
,
explicitChildNodes:
true
,
child:
_pageBuilder
(
context
,
animation
,
secondaryAnimation
),
);
}
...
...
packages/flutter/lib/src/widgets/scroll_configuration.dart
View file @
58ab556f
...
...
@@ -108,9 +108,9 @@ class ScrollBehavior {
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
return
GlowingOverscrollIndicator
(
child:
child
,
axisDirection:
axisDirection
,
color:
_kDefaultGlowColor
,
child:
child
,
);
}
}
...
...
@@ -124,8 +124,8 @@ class ScrollBehavior {
case
TargetPlatform
.
macOS
:
case
TargetPlatform
.
windows
:
return
RawScrollbar
(
child:
child
,
controller:
details
.
controller
,
child:
child
,
);
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
...
...
packages/flutter/lib/src/widgets/scrollable.dart
View file @
58ab556f
...
...
@@ -758,10 +758,10 @@ class ScrollableState extends State<Scrollable> with TickerProviderStateMixin, R
if
(!
widget
.
excludeFromSemantics
)
{
result
=
_ScrollSemantics
(
key:
_scrollSemanticsKey
,
child:
result
,
position:
position
,
allowImplicitScrolling:
_physics
!.
allowImplicitScrolling
,
semanticChildCount:
widget
.
semanticChildCount
,
child:
result
,
);
}
...
...
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
58ab556f
...
...
@@ -338,8 +338,8 @@ class SingleChildScrollView extends StatelessWidget {
return
_SingleChildViewport
(
axisDirection:
axisDirection
,
offset:
offset
,
child:
contents
,
clipBehavior:
clipBehavior
,
child:
contents
,
);
},
);
...
...
packages/flutter/lib/src/widgets/sliver.dart
View file @
58ab556f
...
...
@@ -470,7 +470,7 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
}
if
(
addAutomaticKeepAlives
)
child
=
AutomaticKeepAlive
(
child:
child
);
return
KeyedSubtree
(
child:
child
,
key:
key
);
return
KeyedSubtree
(
key:
key
,
child:
child
);
}
@override
...
...
@@ -734,7 +734,7 @@ class SliverChildListDelegate extends SliverChildDelegate {
}
if
(
addAutomaticKeepAlives
)
child
=
AutomaticKeepAlive
(
child:
child
);
return
KeyedSubtree
(
child:
child
,
key:
key
);
return
KeyedSubtree
(
key:
key
,
child:
child
);
}
@override
...
...
packages/flutter/lib/src/widgets/visibility.dart
View file @
58ab556f
...
...
@@ -218,9 +218,9 @@ class Visibility extends StatelessWidget {
Widget
result
=
child
;
if
(!
maintainInteractivity
)
{
result
=
IgnorePointer
(
child:
child
,
ignoring:
!
visible
,
ignoringSemantics:
!
visible
&&
!
maintainSemantics
,
child:
child
,
);
}
return
Opacity
(
...
...
@@ -235,10 +235,10 @@ class Visibility extends StatelessWidget {
if
(
maintainState
)
{
Widget
result
=
child
;
if
(!
maintainAnimation
)
result
=
TickerMode
(
child:
child
,
enabled:
visible
);
result
=
TickerMode
(
enabled:
visible
,
child:
child
);
return
Offstage
(
child:
result
,
offstage:
!
visible
,
child:
result
,
);
}
assert
(!
maintainAnimation
);
...
...
@@ -473,7 +473,7 @@ class SliverVisibility extends StatelessWidget {
if
(
maintainState
)
{
Widget
result
=
sliver
;
if
(!
maintainAnimation
)
result
=
TickerMode
(
child:
sliver
,
enabled:
visible
);
result
=
TickerMode
(
enabled:
visible
,
child:
sliver
);
return
SliverOffstage
(
sliver:
result
,
offstage:
!
visible
,
...
...
packages/flutter/test/cupertino/button_test.dart
View file @
58ab556f
...
...
@@ -19,8 +19,8 @@ void main() {
testWidgets
(
'Default layout minimum size'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'X'
,
style:
testStyle
),
onPressed:
null
,
child:
Text
(
'X'
,
style:
testStyle
),
)),
);
final
RenderBox
buttonBox
=
tester
.
renderObject
(
find
.
byType
(
CupertinoButton
));
...
...
@@ -35,9 +35,9 @@ void main() {
const
double
minSize
=
60.0
;
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'X'
,
style:
testStyle
),
onPressed:
null
,
minSize:
minSize
,
child:
Text
(
'X'
,
style:
testStyle
),
)),
);
final
RenderBox
buttonBox
=
tester
.
renderObject
(
find
.
byType
(
CupertinoButton
));
...
...
@@ -51,8 +51,8 @@ void main() {
testWidgets
(
'Size grows with text'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'XXXX'
,
style:
testStyle
),
onPressed:
null
,
child:
Text
(
'XXXX'
,
style:
testStyle
),
)),
);
final
RenderBox
buttonBox
=
tester
.
renderObject
(
find
.
byType
(
CupertinoButton
));
...
...
@@ -130,9 +130,9 @@ void main() {
testWidgets
(
'Button with background is wider'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'X'
,
style:
testStyle
),
onPressed:
null
,
color:
Color
(
0xFFFFFFFF
),
child:
Text
(
'X'
,
style:
testStyle
),
)));
final
RenderBox
buttonBox
=
tester
.
renderObject
(
find
.
byType
(
CupertinoButton
));
expect
(
...
...
@@ -144,9 +144,9 @@ void main() {
testWidgets
(
'Custom padding'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'X'
,
style:
testStyle
),
onPressed:
null
,
padding:
EdgeInsets
.
all
(
100.0
),
child:
Text
(
'X'
,
style:
testStyle
),
)));
final
RenderBox
buttonBox
=
tester
.
renderObject
(
find
.
byType
(
CupertinoButton
));
expect
(
...
...
@@ -185,8 +185,8 @@ void main() {
testWidgets
(
"Disabled button doesn't animate"
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'Tap me'
),
onPressed:
null
,
child:
Text
(
'Tap me'
),
)));
expect
(
SchedulerBinding
.
instance
!.
transientCallbackCount
,
equals
(
0
));
await
tester
.
tap
(
find
.
byType
(
CupertinoButton
));
...
...
@@ -267,10 +267,10 @@ void main() {
testWidgets
(
'Can specify colors'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
boilerplate
(
child:
CupertinoButton
(
child:
const
Text
(
'Skeuomorph me'
),
color:
const
Color
(
0x000000FF
),
disabledColor:
const
Color
(
0x0000FF00
),
onPressed:
()
{
},
child:
const
Text
(
'Skeuomorph me'
),
)));
BoxDecoration
boxDecoration
=
tester
.
widget
<
DecoratedBox
>(
...
...
@@ -280,10 +280,10 @@ void main() {
expect
(
boxDecoration
.
color
,
const
Color
(
0x000000FF
));
await
tester
.
pumpWidget
(
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'Skeuomorph me'
),
color:
Color
(
0x000000FF
),
disabledColor:
Color
(
0x0000FF00
),
onPressed:
null
,
child:
Text
(
'Skeuomorph me'
),
)));
boxDecoration
=
tester
.
widget
<
DecoratedBox
>(
...
...
@@ -308,10 +308,10 @@ void main() {
MediaQuery
(
data:
const
MediaQueryData
(
platformBrightness:
Brightness
.
dark
),
child:
boilerplate
(
child:
CupertinoButton
(
child:
const
Text
(
'Skeuomorph me'
),
color:
bgColor
,
disabledColor:
inactive
,
onPressed:
()
{
},
child:
const
Text
(
'Skeuomorph me'
),
)),
),
);
...
...
@@ -326,10 +326,10 @@ void main() {
MediaQuery
(
data:
const
MediaQueryData
(
platformBrightness:
Brightness
.
light
),
child:
boilerplate
(
child:
const
CupertinoButton
(
child:
Text
(
'Skeuomorph me'
),
color:
bgColor
,
disabledColor:
inactive
,
onPressed:
null
,
child:
Text
(
'Skeuomorph me'
),
)),
),
);
...
...
packages/flutter/test/cupertino/context_menu_action_test.dart
View file @
58ab556f
...
...
@@ -17,11 +17,11 @@ void main() {
final
UniqueKey
actionKey
=
UniqueKey
();
final
CupertinoContextMenuAction
action
=
CupertinoContextMenuAction
(
key:
actionKey
,
child:
const
Text
(
'I am a CupertinoContextMenuAction'
),
onPressed:
onPressed
,
trailingIcon:
CupertinoIcons
.
home
,
isDestructiveAction:
isDestructiveAction
,
isDefaultAction:
isDefaultAction
,
child:
const
Text
(
'I am a CupertinoContextMenuAction'
),
);
return
CupertinoApp
(
...
...
packages/flutter/test/cupertino/dialog_test.dart
View file @
58ab556f
...
...
@@ -127,7 +127,11 @@ void main() {
title:
const
Text
(
'The Title'
),
content:
const
Text
(
'Content'
),
actions:
<
Widget
>[
CupertinoDialogAction
(
child:
const
Text
(
'Cancel'
),
isDefaultAction:
true
,
onPressed:
()
{}),
CupertinoDialogAction
(
isDefaultAction:
true
,
onPressed:
()
{},
child:
const
Text
(
'Cancel'
),
),
const
CupertinoDialogAction
(
child:
Text
(
'OK'
)),
],
),
...
...
packages/flutter/test/cupertino/form_section_test.dart
View file @
58ab556f
...
...
@@ -123,8 +123,8 @@ void main() {
child:
MediaQuery
(
data:
const
MediaQueryData
(),
child:
CupertinoFormSection
(
children:
<
Widget
>[
CupertinoTextFormFieldRow
()],
backgroundColor:
backgroundColor
,
children:
<
Widget
>[
CupertinoTextFormFieldRow
()],
),
),
),
...
...
@@ -142,8 +142,8 @@ void main() {
CupertinoApp
(
home:
Center
(
child:
CupertinoFormSection
(
children:
<
Widget
>[
CupertinoTextFormFieldRow
()],
clipBehavior:
Clip
.
antiAlias
,
children:
<
Widget
>[
CupertinoTextFormFieldRow
()],
),
),
),
...
...
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
58ab556f
...
...
@@ -18,8 +18,8 @@ void main() {
const
CupertinoApp
(
home:
CupertinoNavigationBar
(
leading:
CupertinoButton
(
child:
Text
(
'Something'
),
onPressed:
null
,
child:
Text
(
'Something'
),
),
middle:
Text
(
'Title'
),
),
...
...
@@ -133,7 +133,7 @@ void main() {
home:
Align
(
alignment:
Alignment
.
topCenter
,
child:
CupertinoNavigationBar
(
leading:
const
CupertinoButton
(
child:
Text
(
'Cheetah'
),
onPressed:
null
),
leading:
const
CupertinoButton
(
onPressed:
null
,
child:
Text
(
'Cheetah'
)
),
// Let the box take all the vertical space to test vertical padding but let
// the nav bar position it horizontally.
middle:
Align
(
...
...
@@ -142,7 +142,7 @@ void main() {
widthFactor:
1.0
,
child:
const
Text
(
'Title'
),
),
trailing:
const
CupertinoButton
(
child:
Text
(
'Puma'
),
onPressed:
null
),
trailing:
const
CupertinoButton
(
onPressed:
null
,
child:
Text
(
'Puma'
)
),
padding:
const
EdgeInsetsDirectional
.
only
(
start:
10.0
,
end:
20.0
,
...
...
@@ -245,11 +245,11 @@ void main() {
child:
Align
(
alignment:
Alignment
.
topCenter
,
child:
CupertinoNavigationBar
(
leading:
CupertinoButton
(
child:
Text
(
'Cheetah'
),
onPressed:
null
),
leading:
CupertinoButton
(
onPressed:
null
,
child:
Text
(
'Cheetah'
)
),
// Let the box take all the vertical space to test vertical padding but let
// the nav bar position it horizontally.
middle:
Text
(
'Title'
),
trailing:
CupertinoButton
(
child:
Text
(
'Puma'
),
onPressed:
null
),
trailing:
CupertinoButton
(
onPressed:
null
,
child:
Text
(
'Puma'
)
),
padding:
EdgeInsetsDirectional
.
only
(
start:
10.0
,
end:
20.0
,
...
...
packages/flutter/test/cupertino/picker_test.dart
View file @
58ab556f
...
...
@@ -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:
null
,
children:
const
<
Widget
>[
Text
(
'1'
),
Text
(
'1'
)],
),
),
),
...
...
packages/flutter/test/cupertino/scaffold_test.dart
View file @
58ab556f
...
...
@@ -420,8 +420,8 @@ void main() {
await
tester
.
pumpWidget
(
const
CupertinoApp
(
home:
CupertinoPageScaffold
(
child:
Center
(),
backgroundColor:
Color
(
0xFF010203
),
child:
Center
(),
),
),
);
...
...
packages/flutter/test/cupertino/tab_scaffold_test.dart
View file @
58ab556f
...
...
@@ -58,10 +58,10 @@ void main() {
tabBar:
_buildTabBar
(),
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -248,10 +248,10 @@ void main() {
controller:
controller
,
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -284,10 +284,10 @@ void main() {
tabBar:
_buildTabBar
(),
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -303,10 +303,10 @@ void main() {
controller:
CupertinoTabController
(
initialIndex:
1
),
// Programmatically change the tab now.
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -630,10 +630,10 @@ void main() {
controller:
controller
,
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -652,10 +652,10 @@ void main() {
controller:
controller
,
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -688,10 +688,10 @@ void main() {
controller:
oldController
,
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
@@ -710,10 +710,10 @@ void main() {
tabBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomPaint
(
child:
Text
(
'Page
${index + 1}
'
),
painter:
TestCallbackPainter
(
onPaint:
()
{
tabsPainted
.
add
(
index
);
},
),
child:
Text
(
'Page
${index + 1}
'
),
);
},
),
...
...
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