`desktop_photo_search` Break fix (#1322)

Update sample code to match
https://github.com/google/flutter-desktop-embedding/pull/903
pull/1325/head
Brett Morgan 3 years ago committed by GitHub
parent 84d82b3021
commit 2dec7fdf85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,10 +75,10 @@ class UnsplashHomePage extends StatelessWidget {
Widget build(BuildContext context) {
final photoSearchModel = Provider.of<PhotoSearchModel>(context);
menubar.setApplicationMenu([
menubar.Submenu(label: 'Search', children: [
menubar.MenuItem(
menubar.NativeSubmenu(label: 'Search', children: [
menubar.NativeMenuItem(
label: 'Search…',
onClicked: () {
onSelected: () {
showDialog<void>(
context: context,
builder: (context) =>
@ -87,17 +87,17 @@ class UnsplashHomePage extends StatelessWidget {
},
),
if (!Platform.isMacOS)
menubar.MenuItem(
menubar.NativeMenuItem(
label: 'Quit',
onClicked: () {
onSelected: () {
SystemNavigator.pop();
},
),
]),
menubar.Submenu(label: 'About', children: [
menubar.MenuItem(
menubar.NativeSubmenu(label: 'About', children: [
menubar.NativeMenuItem(
label: 'About',
onClicked: () {
onSelected: () {
showDialog<void>(
context: context,
builder: (context) => const PolicyDialog(),

@ -78,10 +78,10 @@ class UnsplashHomePage extends StatelessWidget {
Widget build(BuildContext context) {
final photoSearchModel = Provider.of<PhotoSearchModel>(context);
menubar.setApplicationMenu([
menubar.Submenu(label: 'Search', children: [
menubar.MenuItem(
menubar.NativeSubmenu(label: 'Search', children: [
menubar.NativeMenuItem(
label: 'Search…',
onClicked: () {
onSelected: () {
showDialog<void>(
context: context,
builder: (context) =>
@ -90,17 +90,17 @@ class UnsplashHomePage extends StatelessWidget {
},
),
if (!Platform.isMacOS)
menubar.MenuItem(
menubar.NativeMenuItem(
label: 'Quit',
onClicked: () {
onSelected: () {
SystemNavigator.pop();
},
),
]),
menubar.Submenu(label: 'About', children: [
menubar.MenuItem(
menubar.NativeSubmenu(label: 'About', children: [
menubar.NativeMenuItem(
label: 'About',
onClicked: () {
onSelected: () {
showDialog<void>(
context: context,
builder: (context) => const PolicyDialog(),

Loading…
Cancel
Save