mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Follow-up to https://github.com/flutter/flutter/pull/167677 Addresses clean-up comments in cherry-pick: https://github.com/flutter/flutter/pull/168386
This commit is contained in:
parent
67ef841cae
commit
83082c19b7
@ -535,12 +535,12 @@ class _CupertinoAppState extends State<CupertinoApp> {
|
|||||||
Widget _exitWidgetSelectionButtonBuilder(
|
Widget _exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return _CupertinoInspectorButton.filled(
|
return _CupertinoInspectorButton.filled(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
icon: CupertinoIcons.xmark,
|
icon: CupertinoIcons.xmark,
|
||||||
buttonKey: key,
|
buttonKey: key,
|
||||||
);
|
);
|
||||||
@ -549,12 +549,12 @@ class _CupertinoAppState extends State<CupertinoApp> {
|
|||||||
Widget _moveExitWidgetSelectionButtonBuilder(
|
Widget _moveExitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
bool isLeftAligned = true,
|
bool isLeftAligned = true,
|
||||||
}) {
|
}) {
|
||||||
return _CupertinoInspectorButton.iconOnly(
|
return _CupertinoInspectorButton.iconOnly(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
icon: isLeftAligned ? CupertinoIcons.arrow_right : CupertinoIcons.arrow_left,
|
icon: isLeftAligned ? CupertinoIcons.arrow_right : CupertinoIcons.arrow_left,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -562,12 +562,12 @@ class _CupertinoAppState extends State<CupertinoApp> {
|
|||||||
Widget _tapBehaviorButtonBuilder(
|
Widget _tapBehaviorButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required bool selectionOnTapEnabled,
|
required bool selectionOnTapEnabled,
|
||||||
}) {
|
}) {
|
||||||
return _CupertinoInspectorButton.toggle(
|
return _CupertinoInspectorButton.toggle(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
// This icon is also used for the Material-styled button and for DevTools.
|
// This icon is also used for the Material-styled button and for DevTools.
|
||||||
// It should be updated in all 3 places if changed.
|
// It should be updated in all 3 places if changed.
|
||||||
icon: CupertinoIcons.cursor_rays,
|
icon: CupertinoIcons.cursor_rays,
|
||||||
@ -685,21 +685,21 @@ class _CupertinoAppState extends State<CupertinoApp> {
|
|||||||
class _CupertinoInspectorButton extends InspectorButton {
|
class _CupertinoInspectorButton extends InspectorButton {
|
||||||
const _CupertinoInspectorButton.filled({
|
const _CupertinoInspectorButton.filled({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
super.buttonKey,
|
super.buttonKey,
|
||||||
}) : super.filled();
|
}) : super.filled();
|
||||||
|
|
||||||
const _CupertinoInspectorButton.toggle({
|
const _CupertinoInspectorButton.toggle({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
super.toggledOn,
|
super.toggledOn,
|
||||||
}) : super.toggle();
|
}) : super.toggle();
|
||||||
|
|
||||||
const _CupertinoInspectorButton.iconOnly({
|
const _CupertinoInspectorButton.iconOnly({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
}) : super.iconOnly();
|
}) : super.iconOnly();
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ class _CupertinoInspectorButton extends InspectorButton {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Icon buttonIcon = Icon(
|
final Icon buttonIcon = Icon(
|
||||||
icon,
|
icon,
|
||||||
semanticLabel: semanticLabel,
|
semanticLabel: semanticsLabel,
|
||||||
size: iconSizeForVariant,
|
size: iconSizeForVariant,
|
||||||
color: foregroundColor(context),
|
color: foregroundColor(context),
|
||||||
);
|
);
|
||||||
|
@ -29,7 +29,6 @@ import 'page.dart';
|
|||||||
import 'scaffold.dart' show ScaffoldMessenger, ScaffoldMessengerState;
|
import 'scaffold.dart' show ScaffoldMessenger, ScaffoldMessengerState;
|
||||||
import 'scrollbar.dart';
|
import 'scrollbar.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
import 'tooltip.dart';
|
import 'tooltip.dart';
|
||||||
|
|
||||||
// Examples can assume:
|
// Examples can assume:
|
||||||
@ -936,12 +935,12 @@ class _MaterialAppState extends State<MaterialApp> {
|
|||||||
Widget _exitWidgetSelectionButtonBuilder(
|
Widget _exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return _MaterialInspectorButton.filled(
|
return _MaterialInspectorButton.filled(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
icon: Icons.close,
|
icon: Icons.close,
|
||||||
isDarkTheme: _isDarkTheme(context),
|
isDarkTheme: _isDarkTheme(context),
|
||||||
buttonKey: key,
|
buttonKey: key,
|
||||||
@ -951,12 +950,12 @@ class _MaterialAppState extends State<MaterialApp> {
|
|||||||
Widget _moveExitWidgetSelectionButtonBuilder(
|
Widget _moveExitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
bool isLeftAligned = true,
|
bool isLeftAligned = true,
|
||||||
}) {
|
}) {
|
||||||
return _MaterialInspectorButton.iconOnly(
|
return _MaterialInspectorButton.iconOnly(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
icon: isLeftAligned ? Icons.arrow_right : Icons.arrow_left,
|
icon: isLeftAligned ? Icons.arrow_right : Icons.arrow_left,
|
||||||
isDarkTheme: _isDarkTheme(context),
|
isDarkTheme: _isDarkTheme(context),
|
||||||
);
|
);
|
||||||
@ -965,12 +964,12 @@ class _MaterialAppState extends State<MaterialApp> {
|
|||||||
Widget _tapBehaviorButtonBuilder(
|
Widget _tapBehaviorButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required bool selectionOnTapEnabled,
|
required bool selectionOnTapEnabled,
|
||||||
}) {
|
}) {
|
||||||
return _MaterialInspectorButton.toggle(
|
return _MaterialInspectorButton.toggle(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
semanticLabel: semanticLabel,
|
semanticsLabel: semanticsLabel,
|
||||||
// This icon is also used for the Cupertino-styled button and for DevTools.
|
// This icon is also used for the Cupertino-styled button and for DevTools.
|
||||||
// It should be updated in all 3 places if changed.
|
// It should be updated in all 3 places if changed.
|
||||||
icon: CupertinoIcons.cursor_rays,
|
icon: CupertinoIcons.cursor_rays,
|
||||||
@ -1172,7 +1171,7 @@ class _MaterialAppState extends State<MaterialApp> {
|
|||||||
class _MaterialInspectorButton extends InspectorButton {
|
class _MaterialInspectorButton extends InspectorButton {
|
||||||
const _MaterialInspectorButton.filled({
|
const _MaterialInspectorButton.filled({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
required this.isDarkTheme,
|
required this.isDarkTheme,
|
||||||
super.buttonKey,
|
super.buttonKey,
|
||||||
@ -1180,7 +1179,7 @@ class _MaterialInspectorButton extends InspectorButton {
|
|||||||
|
|
||||||
const _MaterialInspectorButton.toggle({
|
const _MaterialInspectorButton.toggle({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
required this.isDarkTheme,
|
required this.isDarkTheme,
|
||||||
super.toggledOn,
|
super.toggledOn,
|
||||||
@ -1188,7 +1187,7 @@ class _MaterialInspectorButton extends InspectorButton {
|
|||||||
|
|
||||||
const _MaterialInspectorButton.iconOnly({
|
const _MaterialInspectorButton.iconOnly({
|
||||||
required super.onPressed,
|
required super.onPressed,
|
||||||
required super.semanticLabel,
|
required super.semanticsLabel,
|
||||||
required super.icon,
|
required super.icon,
|
||||||
required this.isDarkTheme,
|
required this.isDarkTheme,
|
||||||
}) : super.iconOnly();
|
}) : super.iconOnly();
|
||||||
@ -1210,7 +1209,7 @@ class _MaterialInspectorButton extends InspectorButton {
|
|||||||
padding: _buttonPadding,
|
padding: _buttonPadding,
|
||||||
constraints: _buttonConstraints,
|
constraints: _buttonConstraints,
|
||||||
style: _selectionButtonsIconStyle(context),
|
style: _selectionButtonsIconStyle(context),
|
||||||
icon: Icon(icon, semanticLabel: semanticLabel),
|
icon: Icon(icon, semanticLabel: semanticsLabel),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1221,14 +1220,21 @@ class _MaterialInspectorButton extends InspectorButton {
|
|||||||
return IconButton.styleFrom(
|
return IconButton.styleFrom(
|
||||||
foregroundColor: foreground,
|
foregroundColor: foreground,
|
||||||
backgroundColor: background,
|
backgroundColor: background,
|
||||||
side:
|
side: _borderSide(color: foreground),
|
||||||
variant == InspectorButtonVariant.toggle && !toggledOn!
|
|
||||||
? BorderSide(color: foreground)
|
|
||||||
: null,
|
|
||||||
tapTargetSize: MaterialTapTargetSize.padded,
|
tapTargetSize: MaterialTapTargetSize.padded,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BorderSide? _borderSide({required Color color}) {
|
||||||
|
switch (variant) {
|
||||||
|
case InspectorButtonVariant.filled:
|
||||||
|
case InspectorButtonVariant.iconOnly:
|
||||||
|
return null;
|
||||||
|
case InspectorButtonVariant.toggle:
|
||||||
|
return toggledOn == false ? BorderSide(color: color) : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color foregroundColor(BuildContext context) {
|
Color foregroundColor(BuildContext context) {
|
||||||
final Color primaryColor = _primaryColor(context);
|
final Color primaryColor = _primaryColor(context);
|
||||||
|
@ -25,7 +25,6 @@ import 'colors.dart';
|
|||||||
import 'constants.dart';
|
import 'constants.dart';
|
||||||
import 'material_button.dart';
|
import 'material_button.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart' show MaterialTapTargetSize;
|
|
||||||
|
|
||||||
// Examples can assume:
|
// Examples can assume:
|
||||||
// late BuildContext context;
|
// late BuildContext context;
|
||||||
|
@ -23,7 +23,6 @@ import 'material.dart';
|
|||||||
import 'material_localizations.dart';
|
import 'material_localizations.dart';
|
||||||
import 'text_theme.dart';
|
import 'text_theme.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
|
|
||||||
// Examples can assume:
|
// Examples can assume:
|
||||||
// enum Department { treasury, state }
|
// enum Department { treasury, state }
|
||||||
|
@ -20,7 +20,6 @@ import 'material_state.dart';
|
|||||||
import 'scaffold.dart';
|
import 'scaffold.dart';
|
||||||
import 'text_theme.dart';
|
import 'text_theme.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
import 'tooltip.dart';
|
import 'tooltip.dart';
|
||||||
|
|
||||||
class _DefaultHeroTag {
|
class _DefaultHeroTag {
|
||||||
|
@ -30,7 +30,6 @@ import 'material_state.dart';
|
|||||||
import 'popup_menu_theme.dart';
|
import 'popup_menu_theme.dart';
|
||||||
import 'text_theme.dart';
|
import 'text_theme.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
import 'tooltip.dart';
|
import 'tooltip.dart';
|
||||||
|
|
||||||
// Examples can assume:
|
// Examples can assume:
|
||||||
|
@ -34,7 +34,6 @@ import 'search_view_theme.dart';
|
|||||||
import 'text_field.dart';
|
import 'text_field.dart';
|
||||||
import 'text_theme.dart';
|
import 'text_theme.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
|
|
||||||
const int _kOpenViewMilliseconds = 600;
|
const int _kOpenViewMilliseconds = 600;
|
||||||
const Duration _kOpenViewDuration = Duration(milliseconds: _kOpenViewMilliseconds);
|
const Duration _kOpenViewDuration = Duration(milliseconds: _kOpenViewMilliseconds);
|
||||||
|
@ -13,7 +13,6 @@ import 'package:flutter/widgets.dart';
|
|||||||
|
|
||||||
import 'material_state.dart';
|
import 'material_state.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
|
|
||||||
// Examples can assume:
|
// Examples can assume:
|
||||||
// late BuildContext context;
|
// late BuildContext context;
|
||||||
|
@ -14,7 +14,7 @@ import 'material_localizations.dart';
|
|||||||
import 'theme_data.dart';
|
import 'theme_data.dart';
|
||||||
import 'typography.dart';
|
import 'typography.dart';
|
||||||
|
|
||||||
export 'theme_data.dart' show Brightness, ThemeData;
|
export 'theme_data.dart' show Brightness, MaterialTapTargetSize, ThemeData;
|
||||||
|
|
||||||
/// The duration over which theme changes animate by default.
|
/// The duration over which theme changes animate by default.
|
||||||
const Duration kThemeAnimationDuration = Duration(milliseconds: 200);
|
const Duration kThemeAnimationDuration = Duration(milliseconds: 200);
|
||||||
|
@ -33,7 +33,6 @@ import 'text_button.dart';
|
|||||||
import 'text_form_field.dart';
|
import 'text_form_field.dart';
|
||||||
import 'text_theme.dart';
|
import 'text_theme.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'theme_data.dart';
|
|
||||||
import 'time.dart';
|
import 'time.dart';
|
||||||
import 'time_picker_theme.dart';
|
import 'time_picker_theme.dart';
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ typedef ExitWidgetSelectionButtonBuilder =
|
|||||||
Widget Function(
|
Widget Function(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ typedef MoveExitWidgetSelectionButtonBuilder =
|
|||||||
Widget Function(
|
Widget Function(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
bool isLeftAligned,
|
bool isLeftAligned,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ typedef TapBehaviorButtonBuilder =
|
|||||||
Widget Function(
|
Widget Function(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required bool selectionOnTapEnabled,
|
required bool selectionOnTapEnabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3054,7 +3054,7 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
const InspectorButton({
|
const InspectorButton({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
required this.semanticLabel,
|
required this.semanticsLabel,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
this.buttonKey,
|
this.buttonKey,
|
||||||
required this.variant,
|
required this.variant,
|
||||||
@ -3067,7 +3067,7 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
const InspectorButton.filled({
|
const InspectorButton.filled({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
required this.semanticLabel,
|
required this.semanticsLabel,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
this.buttonKey,
|
this.buttonKey,
|
||||||
}) : variant = InspectorButtonVariant.filled,
|
}) : variant = InspectorButtonVariant.filled,
|
||||||
@ -3080,7 +3080,7 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
const InspectorButton.toggle({
|
const InspectorButton.toggle({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
required this.semanticLabel,
|
required this.semanticsLabel,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
bool this.toggledOn = true,
|
bool this.toggledOn = true,
|
||||||
}) : buttonKey = null,
|
}) : buttonKey = null,
|
||||||
@ -3092,7 +3092,7 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
const InspectorButton.iconOnly({
|
const InspectorButton.iconOnly({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
required this.semanticLabel,
|
required this.semanticsLabel,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
}) : buttonKey = null,
|
}) : buttonKey = null,
|
||||||
variant = InspectorButtonVariant.iconOnly,
|
variant = InspectorButtonVariant.iconOnly,
|
||||||
@ -3102,7 +3102,7 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
/// The semantic label for the button, used for accessibility.
|
/// The semantic label for the button, used for accessibility.
|
||||||
final String semanticLabel;
|
final String semanticsLabel;
|
||||||
|
|
||||||
/// The icon to display within the button.
|
/// The icon to display within the button.
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
@ -3131,8 +3131,15 @@ abstract class InspectorButton extends StatelessWidget {
|
|||||||
///
|
///
|
||||||
/// Returns [buttonSize] if the variant is [InspectorButtonVariant.iconOnly],
|
/// Returns [buttonSize] if the variant is [InspectorButtonVariant.iconOnly],
|
||||||
/// otherwise returns [buttonIconSize].
|
/// otherwise returns [buttonIconSize].
|
||||||
double get iconSizeForVariant =>
|
double get iconSizeForVariant {
|
||||||
variant == InspectorButtonVariant.iconOnly ? buttonSize : buttonIconSize;
|
switch (variant) {
|
||||||
|
case InspectorButtonVariant.iconOnly:
|
||||||
|
return buttonSize;
|
||||||
|
case InspectorButtonVariant.filled:
|
||||||
|
case InspectorButtonVariant.toggle:
|
||||||
|
return buttonIconSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Provides the appropriate foreground color for the button's icon.
|
/// Provides the appropriate foreground color for the button's icon.
|
||||||
Color foregroundColor(BuildContext context);
|
Color foregroundColor(BuildContext context);
|
||||||
@ -3656,7 +3663,7 @@ class _WidgetInspectorButtonGroupState extends State<_WidgetInspectorButtonGroup
|
|||||||
_changeButtonGroupAlignment();
|
_changeButtonGroupAlignment();
|
||||||
_onTooltipHidden();
|
_onTooltipHidden();
|
||||||
},
|
},
|
||||||
semanticLabel: buttonLabel,
|
semanticsLabel: buttonLabel,
|
||||||
isLeftAligned: _leftAligned,
|
isLeftAligned: _leftAligned,
|
||||||
),
|
),
|
||||||
onTooltipVisible: () {
|
onTooltipVisible: () {
|
||||||
@ -3672,7 +3679,7 @@ class _WidgetInspectorButtonGroupState extends State<_WidgetInspectorButtonGroup
|
|||||||
button: widget.exitWidgetSelectionButtonBuilder(
|
button: widget.exitWidgetSelectionButtonBuilder(
|
||||||
context,
|
context,
|
||||||
onPressed: _exitWidgetSelectionMode,
|
onPressed: _exitWidgetSelectionMode,
|
||||||
semanticLabel: buttonLabel,
|
semanticsLabel: buttonLabel,
|
||||||
key: _exitWidgetSelectionButtonKey,
|
key: _exitWidgetSelectionButtonKey,
|
||||||
),
|
),
|
||||||
onTooltipVisible: () {
|
onTooltipVisible: () {
|
||||||
@ -3692,7 +3699,7 @@ class _WidgetInspectorButtonGroupState extends State<_WidgetInspectorButtonGroup
|
|||||||
button: buttonBuilder(
|
button: buttonBuilder(
|
||||||
context,
|
context,
|
||||||
onPressed: _changeSelectionOnTapMode,
|
onPressed: _changeSelectionOnTapMode,
|
||||||
semanticLabel: 'Change widget selection mode for taps',
|
semanticsLabel: 'Change widget selection mode for taps',
|
||||||
selectionOnTapEnabled: _selectionOnTapEnabled.value,
|
selectionOnTapEnabled: _selectionOnTapEnabled.value,
|
||||||
),
|
),
|
||||||
onTooltipVisible: _changeSelectionOnTapTooltip,
|
onTooltipVisible: _changeSelectionOnTapTooltip,
|
||||||
|
@ -375,7 +375,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget exitWidgetSelectionButtonBuilder(
|
Widget exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
exitWidgetSelectionButtonKey = key;
|
exitWidgetSelectionButtonKey = key;
|
||||||
@ -553,7 +553,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget exitWidgetSelectionButtonBuilder(
|
Widget exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
exitWidgetSelectionButtonKey = key;
|
exitWidgetSelectionButtonKey = key;
|
||||||
@ -807,7 +807,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
return (
|
return (
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
||||||
@ -898,7 +898,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget exitWidgetSelectionButtonBuilder(
|
Widget exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
||||||
@ -960,7 +960,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget exitWidgetSelectionButtonBuilder(
|
Widget exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return Material(
|
return Material(
|
||||||
@ -975,7 +975,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget moveWidgetSelectionButtonBuilder(
|
Widget moveWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
bool isLeftAligned = true,
|
bool isLeftAligned = true,
|
||||||
}) {
|
}) {
|
||||||
return Material(
|
return Material(
|
||||||
@ -1041,7 +1041,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget exitWidgetSelectionButtonBuilder(
|
Widget exitWidgetSelectionButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required GlobalKey key,
|
required GlobalKey key,
|
||||||
}) {
|
}) {
|
||||||
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
||||||
@ -1050,7 +1050,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
Widget tapBehaviorButtonBuilder(
|
Widget tapBehaviorButtonBuilder(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
required String semanticLabel,
|
required String semanticsLabel,
|
||||||
required bool selectionOnTapEnabled,
|
required bool selectionOnTapEnabled,
|
||||||
}) {
|
}) {
|
||||||
return Material(
|
return Material(
|
||||||
|
Loading…
Reference in New Issue
Block a user