Unverified Commit 58ab556f authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

first part of applying sort_child_properties_last (#82387)

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