Skip to content

Commit

Permalink
Change to Open in and add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpryan committed Jun 12, 2024
1 parent f6e74a3 commit 09cf0f7
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions pkgs/dartpad_ui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1106,21 +1106,13 @@ class OverflowMenu extends StatelessWidget {

static const _menuItems = [
(
label: 'dart.dev',
uri: 'https://dart.dev',
),
(
label: 'flutter.dev',
uri: 'https://flutter.dev',
label: 'Install SDK',
uri: 'https://docs.flutter.dev/get-started/install',
),
(
label: 'Sharing guide',
uri: 'https://github.com/dart-lang/dart-pad/wiki/Sharing-Guide'
),
(
label: 'DartPad on GitHub',
uri: 'https://github.com/dart-lang/dart-pad',
),
];

@override
Expand Down Expand Up @@ -1161,9 +1153,10 @@ class ContinueInMenu extends StatelessWidget {
Widget build(BuildContext context) {
return MenuAnchor(
builder: (context, MenuController controller, Widget? child) {
return TextButton(
child: const Text('Continue in...'),
return TextButton.icon(
onPressed: () => controller.toggleMenuState(),
icon: const Icon(Icons.file_download_outlined),
label: const Text('Open in'),
);
},
menuChildren: [
Expand All @@ -1178,17 +1171,6 @@ class ContinueInMenu extends StatelessWidget {
child: Text('IDX'),
),
),
MenuItemButton(
trailingIcon: const Icon(Icons.launch),
onPressed: () {
url_launcher.launchUrl(
Uri.parse('https://docs.flutter.dev/get-started/install'));
},
child: const Padding(
padding: EdgeInsets.fromLTRB(0, 0, 32, 0),
child: Text('Install SDK'),
),
)
].map((widget) => PointerInterceptor(child: widget))
],
);
Expand Down

0 comments on commit 09cf0f7

Please sign in to comment.