Some miscellaneous changes found while making another PR (#111620)

This commit is contained in:
Greg Spencer 2022-09-20 14:03:02 -07:00 committed by GitHub
parent 4aea2f9933
commit ce7789e030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 10 deletions

View File

@ -340,7 +340,7 @@ class _DemoButtonState extends State<DemoButton> {
return TextButton(
focusNode: _focusNode,
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
foregroundColor: const MaterialStatePropertyAll<Color>(Colors.black),
overlayColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
if (states.contains(MaterialState.focused)) {
return Colors.red;

View File

@ -70,7 +70,7 @@ class _SwitchExampleState extends State<SwitchExample> {
value: light,
overlayColor: overlayColor,
trackColor: trackColor,
thumbColor: MaterialStateProperty.all<Color>(Colors.black),
thumbColor: const MaterialStatePropertyAll<Color>(Colors.black),
onChanged: (bool value) {
// This is called when the user toggles the switch.
setState(() {

View File

@ -102,6 +102,8 @@ abstract class ButtonStyleButton extends StatefulWidget {
final MaterialStatesController? statesController;
/// Typically the button's label.
///
/// {@macro flutter.widgets.ProxyWidget.child}
final Widget? child;
/// Returns a non-null [ButtonStyle] that's based primarily on the [Theme]'s

View File

@ -103,7 +103,7 @@ void main() {
'children': <Map<String, Object?>>[
<String, Object?>{
'id': 7,
'label': 'Sub Sub Menu 100',
'label': 'Sub Sub Menu 110',
'enabled': true,
'shortcutTrigger': 97,
'shortcutModifiers': 8,
@ -111,7 +111,7 @@ void main() {
<String, Object?>{'id': 8, 'isDivider': true},
<String, Object?>{
'id': 10,
'label': 'Sub Sub Menu 101',
'label': 'Sub Sub Menu 111',
'enabled': true,
'shortcutTrigger': 98,
'shortcutModifiers': 2,
@ -119,7 +119,7 @@ void main() {
<String, Object?>{'id': 11, 'isDivider': true},
<String, Object?>{
'id': 12,
'label': 'Sub Sub Menu 102',
'label': 'Sub Sub Menu 112',
'enabled': true,
'shortcutTrigger': 99,
'shortcutModifiers': 4,
@ -127,7 +127,7 @@ void main() {
<String, Object?>{'id': 13, 'isDivider': true},
<String, Object?>{
'id': 14,
'label': 'Sub Sub Menu 103',
'label': 'Sub Sub Menu 113',
'enabled': true,
'shortcutTrigger': 100,
'shortcutModifiers': 1,
@ -248,10 +248,10 @@ const List<String> subMenu1 = <String>[
];
const List<String> subSubMenu10 = <String>[
'Sub Sub Menu 100',
'Sub Sub Menu 101',
'Sub Sub Menu 102',
'Sub Sub Menu 103',
'Sub Sub Menu 110',
'Sub Sub Menu 111',
'Sub Sub Menu 112',
'Sub Sub Menu 113',
];
const List<String> subMenu2 = <String>[