From 18ead8138affae3379a4a25c65102bd3a897bc90 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sat, 22 Jul 2023 01:57:10 +0200 Subject: [PATCH] Enable Material 3 on `context_menus` (#1948) Enable Material 3 #### Before Material 3 Screenshot 2023-07-20 at 13 53 16 Screenshot 2023-07-20 at 13 53 08 #### With Material 3 Screenshot 2023-07-20 at 13 54 12 Screenshot 2023-07-20 at 13 54 06 ## Pre-launch Checklist - [ ] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [ ] I signed the [CLA]. - [ ] I read the [Contributors Guide]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --------- Co-authored-by: Brett Morgan --- experimental/context_menus/lib/main.dart | 1 + experimental/context_menus/lib/platform_selector.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/experimental/context_menus/lib/main.dart b/experimental/context_menus/lib/main.dart index 6ca9af6aa..9978da272 100644 --- a/experimental/context_menus/lib/main.dart +++ b/experimental/context_menus/lib/main.dart @@ -62,6 +62,7 @@ class _MyAppState extends State { theme: ThemeData( primarySwatch: Colors.blue, platform: defaultTargetPlatform, + useMaterial3: true, ), initialRoute: '/', routes: { diff --git a/experimental/context_menus/lib/platform_selector.dart b/experimental/context_menus/lib/platform_selector.dart index ad486c5ca..48b444b54 100644 --- a/experimental/context_menus/lib/platform_selector.dart +++ b/experimental/context_menus/lib/platform_selector.dart @@ -27,7 +27,7 @@ class _PlatformSelectorState extends State { @override Widget build(BuildContext context) { return SizedBox( - width: 160.0, + width: 170.0, child: DropdownButton( value: defaultTargetPlatform, icon: const Icon(Icons.arrow_downward),