-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken web support, platform theming issues, and typography updat…
…es (#460) * start fixing gallery for web * additional platform safety, theme, and typographic fixes * update version
- Loading branch information
1 parent
64472fe
commit 0e8231f
Showing
16 changed files
with
301 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import 'package:flutter/foundation.dart' show kIsWeb; | ||
import 'dart:io' as io; | ||
|
||
import 'package:flutter/widgets.dart' | ||
show | ||
PlatformMenu, | ||
PlatformMenuItem, | ||
PlatformProvidedMenuItem, | ||
PlatformProvidedMenuItemType; | ||
|
||
List<PlatformMenuItem> menuBarItems() { | ||
if (kIsWeb) { | ||
return []; | ||
} else { | ||
if (io.Platform.isMacOS) { | ||
return const [ | ||
PlatformMenu( | ||
label: 'macos_ui Widget Gallery', | ||
menus: [ | ||
PlatformProvidedMenuItem( | ||
type: PlatformProvidedMenuItemType.about, | ||
), | ||
PlatformProvidedMenuItem( | ||
type: PlatformProvidedMenuItemType.quit, | ||
), | ||
], | ||
), | ||
PlatformMenu( | ||
label: 'View', | ||
menus: [ | ||
PlatformProvidedMenuItem( | ||
type: PlatformProvidedMenuItemType.toggleFullScreen, | ||
), | ||
], | ||
), | ||
PlatformMenu( | ||
label: 'Window', | ||
menus: [ | ||
PlatformProvidedMenuItem( | ||
type: PlatformProvidedMenuItemType.minimizeWindow, | ||
), | ||
PlatformProvidedMenuItem( | ||
type: PlatformProvidedMenuItemType.zoomWindow, | ||
), | ||
], | ||
), | ||
]; | ||
} else { | ||
return []; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.