[Gallery] Add Material Menu demo (#212)

* Add Material Menu demo
pull/220/head
Per Classon 5 years ago committed by GitHub
parent 8c3fab2ea7
commit 06df53bb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

@ -24,6 +24,7 @@ import 'package:gallery/demos/material/chip_demo.dart';
import 'package:gallery/demos/material/dialog_demo.dart';
import 'package:gallery/demos/material/grid_list_demo.dart';
import 'package:gallery/demos/material/list_demo.dart';
import 'package:gallery/demos/material/menu_demo.dart';
import 'package:gallery/demos/material/progress_indicator_demo.dart';
import 'package:gallery/demos/material/selection_controls_demo.dart';
import 'package:gallery/demos/material/sliders_demo.dart';
@ -337,6 +338,53 @@ List<GalleryDemo> materialDemos(BuildContext context) {
),
],
),
GalleryDemo(
title: GalleryLocalizations.of(context).demoMenuTitle,
icon: GalleryIcons.moreVert,
subtitle: GalleryLocalizations.of(context).demoMenuSubtitle,
configurations: [
GalleryDemoConfiguration(
title: GalleryLocalizations.of(context).demoContextMenuTitle,
description: GalleryLocalizations.of(context).demoMenuDescription,
documentationUrl:
'https://api.flutter.dev/flutter/material/PopupMenuItem-class.html',
buildRoute: (context) => MenuDemo(
type: MenuDemoType.contextMenu,
),
code: CodeSegments.menuDemoContext,
),
GalleryDemoConfiguration(
title: GalleryLocalizations.of(context).demoSectionedMenuTitle,
description: GalleryLocalizations.of(context).demoMenuDescription,
documentationUrl:
'https://api.flutter.dev/flutter/material/PopupMenuItem-class.html',
buildRoute: (context) => MenuDemo(
type: MenuDemoType.sectionedMenu,
),
code: CodeSegments.menuDemoSectioned,
),
GalleryDemoConfiguration(
title: GalleryLocalizations.of(context).demoChecklistMenuTitle,
description: GalleryLocalizations.of(context).demoMenuDescription,
documentationUrl:
'https://api.flutter.dev/flutter/material/CheckedPopupMenuItem-class.html',
buildRoute: (context) => MenuDemo(
type: MenuDemoType.checklistMenu,
),
code: CodeSegments.menuDemoChecklist,
),
GalleryDemoConfiguration(
title: GalleryLocalizations.of(context).demoSimpleMenuTitle,
description: GalleryLocalizations.of(context).demoMenuDescription,
documentationUrl:
'https://api.flutter.dev/flutter/material/PopupMenuItem-class.html',
buildRoute: (context) => MenuDemo(
type: MenuDemoType.simpleMenu,
),
code: CodeSegments.menuDemoSimple,
),
],
),
GalleryDemo(
title: GalleryLocalizations.of(context).demoProgressIndicatorTitle,
icon: GalleryIcons.progressActivity,

@ -0,0 +1,367 @@
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:gallery/l10n/gallery_localizations.dart';
enum MenuDemoType {
contextMenu,
sectionedMenu,
simpleMenu,
checklistMenu,
}
enum SimpleValue {
one,
two,
three,
}
enum CheckedValue {
one,
two,
three,
four,
}
class MenuDemo extends StatefulWidget {
const MenuDemo({Key key, this.type}) : super(key: key);
final MenuDemoType type;
@override
_MenuDemoState createState() => _MenuDemoState();
}
class _MenuDemoState extends State<MenuDemo> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
void showInSnackBar(String value) {
_scaffoldKey.currentState.showSnackBar(SnackBar(
content: Text(value),
));
}
@override
Widget build(BuildContext context) {
Widget demo;
switch (widget.type) {
case MenuDemoType.contextMenu:
demo = _ContextMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.sectionedMenu:
demo = _SectionedMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.simpleMenu:
demo = _SimpleMenuDemo(showInSnackBar: showInSnackBar);
break;
case MenuDemoType.checklistMenu:
demo = _ChecklistMenuDemo(showInSnackBar: showInSnackBar);
break;
}
return Scaffold(
key: _scaffoldKey,
appBar: AppBar(
title: Text(GalleryLocalizations.of(context).demoMenuTitle),
automaticallyImplyLeading: false,
),
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Center(
child: demo,
),
),
);
}
}
// BEGIN menuDemoContext
// Pressing the PopupMenuButton on the right of this item shows
// a simple menu with one disabled item. Typically the contents
// of this "contextual menu" would reflect the app's state.
class _ContextMenuDemo extends StatelessWidget {
const _ContextMenuDemo({Key key, this.showInSnackBar}) : super(key: key);
final void Function(String value) showInSnackBar;
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(GalleryLocalizations.of(context)
.demoMenuAnItemWithAContextMenuButton),
trailing: PopupMenuButton<String>(
padding: EdgeInsets.zero,
onSelected: (value) => showInSnackBar(
GalleryLocalizations.of(context).demoMenuSelected(value),
),
itemBuilder: (context) => <PopupMenuItem<String>>[
PopupMenuItem<String>(
value: GalleryLocalizations.of(context).demoMenuContextMenuItemOne,
child: Text(
GalleryLocalizations.of(context).demoMenuContextMenuItemOne,
),
),
PopupMenuItem<String>(
enabled: false,
child: Text(
GalleryLocalizations.of(context).demoMenuADisabledMenuItem,
),
),
PopupMenuItem<String>(
value:
GalleryLocalizations.of(context).demoMenuContextMenuItemThree,
child: Text(
GalleryLocalizations.of(context).demoMenuContextMenuItemThree,
),
),
],
),
);
}
}
// END
// BEGIN menuDemoSectioned
// Pressing the PopupMenuButton on the right of this item shows
// a menu whose items have text labels and icons and a divider
// That separates the first three items from the last one.
class _SectionedMenuDemo extends StatelessWidget {
const _SectionedMenuDemo({Key key, this.showInSnackBar}) : super(key: key);
final void Function(String value) showInSnackBar;
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(
GalleryLocalizations.of(context).demoMenuAnItemWithASectionedMenu),
trailing: PopupMenuButton<String>(
padding: EdgeInsets.zero,
onSelected: (value) => showInSnackBar(
GalleryLocalizations.of(context).demoMenuSelected(value)),
itemBuilder: (context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: GalleryLocalizations.of(context).demoMenuPreview,
child: ListTile(
leading: Icon(Icons.visibility),
title: Text(
GalleryLocalizations.of(context).demoMenuPreview,
),
),
),
PopupMenuItem<String>(
value: GalleryLocalizations.of(context).demoMenuShare,
child: ListTile(
leading: Icon(Icons.person_add),
title: Text(
GalleryLocalizations.of(context).demoMenuShare,
),
),
),
PopupMenuItem<String>(
value: GalleryLocalizations.of(context).demoMenuGetLink,
child: ListTile(
leading: Icon(Icons.link),
title: Text(
GalleryLocalizations.of(context).demoMenuGetLink,
),
),
),
const PopupMenuDivider(),
PopupMenuItem<String>(
value: GalleryLocalizations.of(context).demoMenuRemove,
child: ListTile(
leading: Icon(Icons.delete),
title: Text(
GalleryLocalizations.of(context).demoMenuRemove,
),
),
),
],
),
);
}
}
// END
// BEGIN menuDemoSimple
// This entire list item is a PopupMenuButton. Tapping anywhere shows
// a menu whose current value is highlighted and aligned over the
// list item's center line.
class _SimpleMenuDemo extends StatefulWidget {
const _SimpleMenuDemo({Key key, this.showInSnackBar}) : super(key: key);
final void Function(String value) showInSnackBar;
@override
_SimpleMenuDemoState createState() => _SimpleMenuDemoState();
}
class _SimpleMenuDemoState extends State<_SimpleMenuDemo> {
SimpleValue _simpleValue;
void showAndSetMenuSelection(BuildContext context, SimpleValue value) {
setState(() {
_simpleValue = value;
});
widget.showInSnackBar(
GalleryLocalizations.of(context)
.demoMenuSelected(simpleValueToString(context, value)),
);
}
String simpleValueToString(BuildContext context, SimpleValue value) => {
SimpleValue.one: GalleryLocalizations.of(context).demoMenuItemValueOne,
SimpleValue.two: GalleryLocalizations.of(context).demoMenuItemValueTwo,
SimpleValue.three:
GalleryLocalizations.of(context).demoMenuItemValueThree,
}[value];
@override
void initState() {
super.initState();
_simpleValue = SimpleValue.two;
}
@override
Widget build(BuildContext context) {
return PopupMenuButton<SimpleValue>(
padding: EdgeInsets.zero,
initialValue: _simpleValue,
onSelected: (value) => showAndSetMenuSelection(context, value),
child: ListTile(
title: Text(
GalleryLocalizations.of(context).demoMenuAnItemWithASimpleMenu),
subtitle: Text(simpleValueToString(context, _simpleValue)),
),
itemBuilder: (context) => <PopupMenuItem<SimpleValue>>[
PopupMenuItem<SimpleValue>(
value: SimpleValue.one,
child: Text(simpleValueToString(
context,
SimpleValue.one,
)),
),
PopupMenuItem<SimpleValue>(
value: SimpleValue.two,
child: Text(simpleValueToString(
context,
SimpleValue.two,
)),
),
PopupMenuItem<SimpleValue>(
value: SimpleValue.three,
child: Text(simpleValueToString(
context,
SimpleValue.three,
)),
),
],
);
}
}
// END
// BEGIN menuDemoChecklist
// Pressing the PopupMenuButton on the right of this item shows a menu
// whose items have checked icons that reflect this app's state.
class _ChecklistMenuDemo extends StatefulWidget {
const _ChecklistMenuDemo({Key key, this.showInSnackBar}) : super(key: key);
final void Function(String value) showInSnackBar;
@override
_ChecklistMenuDemoState createState() => _ChecklistMenuDemoState();
}
class _ChecklistMenuDemoState extends State<_ChecklistMenuDemo> {
List<CheckedValue> _checkedValues;
@override
void initState() {
super.initState();
_checkedValues = [CheckedValue.three];
}
void showCheckedMenuSelections(BuildContext context, CheckedValue value) {
if (_checkedValues.contains(value)) {
setState(() {
_checkedValues.remove(value);
});
} else {
setState(() {
_checkedValues.add(value);
});
}
widget.showInSnackBar(
GalleryLocalizations.of(context).demoMenuChecked(
_checkedValues.map((value) => checkedValueToString(context, value)),
),
);
}
String checkedValueToString(BuildContext context, CheckedValue value) => {
CheckedValue.one: GalleryLocalizations.of(context).demoMenuOne,
CheckedValue.two: GalleryLocalizations.of(context).demoMenuTwo,
CheckedValue.three: GalleryLocalizations.of(context).demoMenuThree,
CheckedValue.four: GalleryLocalizations.of(context).demoMenuFour,
}[value];
bool isChecked(CheckedValue value) => _checkedValues.contains(value);
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(
GalleryLocalizations.of(context).demoMenuAnItemWithAChecklistMenu),
trailing: PopupMenuButton<CheckedValue>(
padding: EdgeInsets.zero,
onSelected: (value) => showCheckedMenuSelections(context, value),
itemBuilder: (context) => <PopupMenuItem<CheckedValue>>[
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.one,
checked: isChecked(CheckedValue.one),
child: Text(
checkedValueToString(context, CheckedValue.one),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.two,
enabled: false,
checked: isChecked(CheckedValue.two),
child: Text(
checkedValueToString(context, CheckedValue.two),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.three,
checked: isChecked(CheckedValue.three),
child: Text(
checkedValueToString(context, CheckedValue.three),
),
),
CheckedPopupMenuItem<CheckedValue>(
value: CheckedValue.four,
checked: isChecked(CheckedValue.four),
child: Text(
checkedValueToString(context, CheckedValue.four),
),
),
],
),
);
}
}
// END

@ -1434,6 +1434,13 @@ class GalleryLocalizations {
desc: r'Title for the material buttons component demo.');
}
String get demoChecklistMenuTitle {
return Intl.message(r'Checklist menu',
locale: _localeName,
name: 'demoChecklistMenuTitle',
desc: r'Title for the checklist menu component demo.');
}
String get demoChipSubtitle {
return Intl.message(
r'Compact elements that represent an input, attribute, or action',
@ -1535,6 +1542,13 @@ class GalleryLocalizations {
desc: r'Title for the colors demo.');
}
String get demoContextMenuTitle {
return Intl.message(r'Context menu',
locale: _localeName,
name: 'demoContextMenuTitle',
desc: r'Title for the context menu component demo.');
}
String get demoCupertinoActionSheetDescription {
return Intl.message(
r'An action sheet is a specific style of alert that presents the user with a set of two or more choices related to the current context. An action sheet can have a title, an additional message, and a list of actions.',
@ -1989,6 +2003,169 @@ class GalleryLocalizations {
desc: r'Title for lists demo.');
}
String get demoMenuADisabledMenuItem {
return Intl.message(r'Disabled menu item',
locale: _localeName,
name: 'demoMenuADisabledMenuItem',
desc:
r'Text label for a disabled menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuAnItemWithAChecklistMenu {
return Intl.message(r'An item with a checklist menu',
locale: _localeName,
name: 'demoMenuAnItemWithAChecklistMenu',
desc:
r'Label next to a button that opens a checklist menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuAnItemWithAContextMenuButton {
return Intl.message(r'An item with a context menu',
locale: _localeName,
name: 'demoMenuAnItemWithAContextMenuButton',
desc:
r'Label next to a button that opens a menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuAnItemWithASectionedMenu {
return Intl.message(r'An item with a sectioned menu',
locale: _localeName,
name: 'demoMenuAnItemWithASectionedMenu',
desc:
r'Label next to a button that opens a sectioned menu . A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuAnItemWithASimpleMenu {
return Intl.message(r'An item with a simple menu',
locale: _localeName,
name: 'demoMenuAnItemWithASimpleMenu',
desc:
r'Label next to a button that opens a simple menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String demoMenuChecked(Object value) {
return Intl.message(r'Checked: $value',
locale: _localeName,
name: 'demoMenuChecked',
desc: r'A text to show what value was checked.',
args: <Object>[value]);
}
String get demoMenuContextMenuItemOne {
return Intl.message(r'Context menu item one',
locale: _localeName,
name: 'demoMenuContextMenuItemOne',
desc:
r'Text label for a context menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuContextMenuItemThree {
return Intl.message(r'Context menu item three',
locale: _localeName,
name: 'demoMenuContextMenuItemThree',
desc:
r'Text label for a context menu item three. A menu displays a list of choices on a temporary surface. Used as an example in a demo.');
}
String get demoMenuDescription {
return Intl.message(
r'A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control.',
locale: _localeName,
name: 'demoMenuDescription',
desc: r'Description for the menu demo.');
}
String get demoMenuFour {
return Intl.message(r'Four',
locale: _localeName, name: 'demoMenuFour', desc: r'The number four.');
}
String get demoMenuGetLink {
return Intl.message(r'Get link',
locale: _localeName,
name: 'demoMenuGetLink',
desc: r'Button to get link for content.');
}
String get demoMenuItemValueOne {
return Intl.message(r'Menu item one',
locale: _localeName,
name: 'demoMenuItemValueOne',
desc: r'The first item in a menu.');
}
String get demoMenuItemValueThree {
return Intl.message(r'Menu item three',
locale: _localeName,
name: 'demoMenuItemValueThree',
desc: r'The third item in a menu.');
}
String get demoMenuItemValueTwo {
return Intl.message(r'Menu item two',
locale: _localeName,
name: 'demoMenuItemValueTwo',
desc: r'The second item in a menu.');
}
String get demoMenuOne {
return Intl.message(r'One',
locale: _localeName, name: 'demoMenuOne', desc: r'The number one.');
}
String get demoMenuPreview {
return Intl.message(r'Preview',
locale: _localeName,
name: 'demoMenuPreview',
desc: r'Button to preview content.');
}
String get demoMenuRemove {
return Intl.message(r'Remove',
locale: _localeName,
name: 'demoMenuRemove',
desc: r'Button to remove content.');
}
String demoMenuSelected(Object value) {
return Intl.message(r'Selected: $value',
locale: _localeName,
name: 'demoMenuSelected',
desc: r'A text to show what value was selected.',
args: <Object>[value]);
}
String get demoMenuShare {
return Intl.message(r'Share',
locale: _localeName,
name: 'demoMenuShare',
desc: r'Button to share content.');
}
String get demoMenuSubtitle {
return Intl.message(r'Menu buttons and simple menus',
locale: _localeName,
name: 'demoMenuSubtitle',
desc: r'Short description for the menu component demo.');
}
String get demoMenuThree {
return Intl.message(r'Three',
locale: _localeName, name: 'demoMenuThree', desc: r'The number three.');
}
String get demoMenuTitle {
return Intl.message(r'Menu',
locale: _localeName,
name: 'demoMenuTitle',
desc: r'Title for the menu component demo.');
}
String get demoMenuTwo {
return Intl.message(r'Two',
locale: _localeName, name: 'demoMenuTwo', desc: r'The number two.');
}
String get demoOneLineListsTitle {
return Intl.message(r'One Line',
locale: _localeName,
@ -2078,6 +2255,13 @@ class GalleryLocalizations {
desc: r'Title for the range sliders component demo.');
}
String get demoSectionedMenuTitle {
return Intl.message(r'Sectioned menu',
locale: _localeName,
name: 'demoSectionedMenuTitle',
desc: r'Title for the sectioned menu component demo.');
}
String get demoSelectionControlsCheckboxDescription {
return Intl.message(
r'Checkboxes allow the user to select multiple options from a set. A normal checkbox'
@ -2156,6 +2340,13 @@ class GalleryLocalizations {
desc: r'Title for the simple dialog component demo.');
}
String get demoSimpleMenuTitle {
return Intl.message(r'Simple menu',
locale: _localeName,
name: 'demoSimpleMenuTitle',
desc: r'Title for the simple menu component demo.');
}
String get demoSlidersContinuous {
return Intl.message(r'Continuous',
locale: _localeName,

@ -689,6 +689,124 @@
"@demoSlidersEditableNumericalValue": {
"description": "Label for input field that has an editable numerical value."
},
"demoMenuTitle": "Menu",
"@demoMenuTitle": {
"description": "Title for the menu component demo."
},
"demoContextMenuTitle": "Context menu",
"@demoContextMenuTitle": {
"description": "Title for the context menu component demo."
},
"demoSectionedMenuTitle": "Sectioned menu",
"@demoSectionedMenuTitle": {
"description": "Title for the sectioned menu component demo."
},
"demoSimpleMenuTitle": "Simple menu",
"@demoSimpleMenuTitle": {
"description": "Title for the simple menu component demo."
},
"demoChecklistMenuTitle": "Checklist menu",
"@demoChecklistMenuTitle": {
"description": "Title for the checklist menu component demo."
},
"demoMenuSubtitle": "Menu buttons and simple menus",
"@demoMenuSubtitle": {
"description": "Short description for the menu component demo."
},
"demoMenuDescription": "A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control.",
"@demoMenuDescription": {
"description": "Description for the menu demo."
},
"demoMenuItemValueOne": "Menu item one",
"@demoMenuItemValueOne": {
"description": "The first item in a menu."
},
"demoMenuItemValueTwo": "Menu item two",
"@demoMenuItemValueTwo": {
"description": "The second item in a menu."
},
"demoMenuItemValueThree": "Menu item three",
"@demoMenuItemValueThree": {
"description": "The third item in a menu."
},
"demoMenuOne": "One",
"@demoMenuOne": {
"description": "The number one."
},
"demoMenuTwo": "Two",
"@demoMenuTwo": {
"description": "The number two."
},
"demoMenuThree": "Three",
"@demoMenuThree": {
"description": "The number three."
},
"demoMenuFour": "Four",
"@demoMenuFour": {
"description": "The number four."
},
"demoMenuAnItemWithAContextMenuButton": "An item with a context menu",
"@demoMenuAnItemWithAContextMenuButton": {
"description": "Label next to a button that opens a menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuContextMenuItemOne": "Context menu item one",
"@demoMenuContextMenuItemOne": {
"description": "Text label for a context menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuADisabledMenuItem": "Disabled menu item",
"@demoMenuADisabledMenuItem": {
"description": "Text label for a disabled menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuContextMenuItemThree": "Context menu item three",
"@demoMenuContextMenuItemThree": {
"description": "Text label for a context menu item three. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuAnItemWithASectionedMenu": "An item with a sectioned menu",
"@demoMenuAnItemWithASectionedMenu": {
"description": "Label next to a button that opens a sectioned menu . A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuPreview": "Preview",
"@demoMenuPreview": {
"description": "Button to preview content."
},
"demoMenuShare": "Share",
"@demoMenuShare": {
"description": "Button to share content."
},
"demoMenuGetLink": "Get link",
"@demoMenuGetLink": {
"description": "Button to get link for content."
},
"demoMenuRemove": "Remove",
"@demoMenuRemove": {
"description": "Button to remove content."
},
"demoMenuSelected": "Selected: {value}",
"@demoMenuSelected": {
"description": "A text to show what value was selected.",
"placeholders": {
"value": {
"example": "1"
}
}
},
"demoMenuChecked": "Checked: {value}",
"@demoMenuChecked": {
"description": "A text to show what value was checked.",
"placeholders": {
"value": {
"example": "1"
}
}
},
"demoMenuAnItemWithASimpleMenu": "An item with a simple menu",
"@demoMenuAnItemWithASimpleMenu": {
"description": "Label next to a button that opens a simple menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoMenuAnItemWithAChecklistMenu": "An item with a checklist menu",
"@demoMenuAnItemWithAChecklistMenu": {
"description": "Label next to a button that opens a checklist menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
},
"demoFullscreenDialogTitle": "Fullscreen",
"@demoFullscreenDialogTitle": {
"description": "Title for the fullscreen dialog component demo."

@ -653,6 +653,114 @@
name="demoSlidersEditableNumericalValue"
description="Label for input field that has an editable numerical value."
>Editable numerical value</string>
<string
name="demoMenuTitle"
description="Title for the menu component demo."
>Menu</string>
<string
name="demoContextMenuTitle"
description="Title for the context menu component demo."
>Context menu</string>
<string
name="demoSectionedMenuTitle"
description="Title for the sectioned menu component demo."
>Sectioned menu</string>
<string
name="demoSimpleMenuTitle"
description="Title for the simple menu component demo."
>Simple menu</string>
<string
name="demoChecklistMenuTitle"
description="Title for the checklist menu component demo."
>Checklist menu</string>
<string
name="demoMenuSubtitle"
description="Short description for the menu component demo."
>Menu buttons and simple menus</string>
<string
name="demoMenuDescription"
description="Description for the menu demo."
>A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control.</string>
<string
name="demoMenuItemValueOne"
description="The first item in a menu."
>Menu item one</string>
<string
name="demoMenuItemValueTwo"
description="The second item in a menu."
>Menu item two</string>
<string
name="demoMenuItemValueThree"
description="The third item in a menu."
>Menu item three</string>
<string
name="demoMenuOne"
description="The number one."
>One</string>
<string
name="demoMenuTwo"
description="The number two."
>Two</string>
<string
name="demoMenuThree"
description="The number three."
>Three</string>
<string
name="demoMenuFour"
description="The number four."
>Four</string>
<string
name="demoMenuAnItemWithAContextMenuButton"
description="Label next to a button that opens a menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a context menu</string>
<string
name="demoMenuContextMenuItemOne"
description="Text label for a context menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Context menu item one</string>
<string
name="demoMenuADisabledMenuItem"
description="Text label for a disabled menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Disabled menu item</string>
<string
name="demoMenuContextMenuItemThree"
description="Text label for a context menu item three. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Context menu item three</string>
<string
name="demoMenuAnItemWithASectionedMenu"
description="Label next to a button that opens a sectioned menu . A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a sectioned menu</string>
<string
name="demoMenuPreview"
description="Button to preview content."
>Preview</string>
<string
name="demoMenuShare"
description="Button to share content."
>Share</string>
<string
name="demoMenuGetLink"
description="Button to get link for content."
>Get link</string>
<string
name="demoMenuRemove"
description="Button to remove content."
>Remove</string>
<string
name="demoMenuSelected"
description="A text to show what value was selected."
>Selected: {value}</string>
<string
name="demoMenuChecked"
description="A text to show what value was checked."
>Checked: {value}</string>
<string
name="demoMenuAnItemWithASimpleMenu"
description="Label next to a button that opens a simple menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a simple menu</string>
<string
name="demoMenuAnItemWithAChecklistMenu"
description="Label next to a button that opens a checklist menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a checklist menu</string>
<string
name="demoFullscreenDialogTitle"
description="Title for the fullscreen dialog component demo."

@ -41,6 +41,10 @@ class MessageLookup extends MessageLookupByLibrary {
static m8(value) => "Discrete: ${value}";
static m25(value) => "Checked: ${value}";
static m26(value) => "Selected: ${value}";
static m9(name, phoneNumber) => "${name} phone number is ${phoneNumber}";
static m10(value) => "You selected: \"${value}\"";
@ -372,6 +376,8 @@ class MessageLookup extends MessageLookupByLibrary {
"demoButtonSubtitle": MessageLookupByLibrary.simpleMessage(
"Flat, raised, outline, and more"),
"demoButtonTitle": MessageLookupByLibrary.simpleMessage("Buttons"),
"demoChecklistMenuTitle":
MessageLookupByLibrary.simpleMessage("Checklist menu"),
"demoChipSubtitle": MessageLookupByLibrary.simpleMessage(
"Compact elements that represent an input, attribute, or action"),
"demoChipTitle": MessageLookupByLibrary.simpleMessage("Chips"),
@ -395,6 +401,8 @@ class MessageLookup extends MessageLookupByLibrary {
"demoColorsSubtitle": MessageLookupByLibrary.simpleMessage(
"All of the predefined colors"),
"demoColorsTitle": MessageLookupByLibrary.simpleMessage("Colors"),
"demoContextMenuTitle":
MessageLookupByLibrary.simpleMessage("Context menu"),
"demoCupertinoActionSheetDescription": MessageLookupByLibrary.simpleMessage(
"An action sheet is a specific style of alert that presents the user with a set of two or more choices related to the current context. An action sheet can have a title, an additional message, and a list of actions."),
"demoCupertinoActionSheetTitle":
@ -517,6 +525,43 @@ class MessageLookup extends MessageLookupByLibrary {
"demoListsSubtitle":
MessageLookupByLibrary.simpleMessage("Scrolling list layouts"),
"demoListsTitle": MessageLookupByLibrary.simpleMessage("Lists"),
"demoMenuADisabledMenuItem":
MessageLookupByLibrary.simpleMessage("Disabled menu item"),
"demoMenuAnItemWithAChecklistMenu":
MessageLookupByLibrary.simpleMessage(
"An item with a checklist menu"),
"demoMenuAnItemWithAContextMenuButton":
MessageLookupByLibrary.simpleMessage("An item with a context menu"),
"demoMenuAnItemWithASectionedMenu":
MessageLookupByLibrary.simpleMessage(
"An item with a sectioned menu"),
"demoMenuAnItemWithASimpleMenu":
MessageLookupByLibrary.simpleMessage("An item with a simple menu"),
"demoMenuChecked": m25,
"demoMenuContextMenuItemOne":
MessageLookupByLibrary.simpleMessage("Context menu item one"),
"demoMenuContextMenuItemThree":
MessageLookupByLibrary.simpleMessage("Context menu item three"),
"demoMenuDescription": MessageLookupByLibrary.simpleMessage(
"A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control."),
"demoMenuFour": MessageLookupByLibrary.simpleMessage("Four"),
"demoMenuGetLink": MessageLookupByLibrary.simpleMessage("Get link"),
"demoMenuItemValueOne":
MessageLookupByLibrary.simpleMessage("Menu item one"),
"demoMenuItemValueThree":
MessageLookupByLibrary.simpleMessage("Menu item three"),
"demoMenuItemValueTwo":
MessageLookupByLibrary.simpleMessage("Menu item two"),
"demoMenuOne": MessageLookupByLibrary.simpleMessage("One"),
"demoMenuPreview": MessageLookupByLibrary.simpleMessage("Preview"),
"demoMenuRemove": MessageLookupByLibrary.simpleMessage("Remove"),
"demoMenuSelected": m26,
"demoMenuShare": MessageLookupByLibrary.simpleMessage("Share"),
"demoMenuSubtitle": MessageLookupByLibrary.simpleMessage(
"Menu buttons and simple menus"),
"demoMenuThree": MessageLookupByLibrary.simpleMessage("Three"),
"demoMenuTitle": MessageLookupByLibrary.simpleMessage("Menu"),
"demoMenuTwo": MessageLookupByLibrary.simpleMessage("Two"),
"demoOneLineListsTitle":
MessageLookupByLibrary.simpleMessage("One Line"),
"demoOptionsFeatureDescription": MessageLookupByLibrary.simpleMessage(
@ -540,6 +585,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Sliders reflect a range of values along a bar. They can have icons on both ends of the bar that reflect a range of values. They are ideal for adjusting settings such as volume, brightness, or applying image filters."),
"demoRangeSlidersTitle":
MessageLookupByLibrary.simpleMessage("Range Sliders"),
"demoSectionedMenuTitle":
MessageLookupByLibrary.simpleMessage("Sectioned menu"),
"demoSelectionControlsCheckboxDescription":
MessageLookupByLibrary.simpleMessage(
"Checkboxes allow the user to select multiple options from a set. A normal checkbox\'s value is true or false and a tristate checkbox\'s value can also be null."),
@ -562,6 +609,8 @@ class MessageLookup extends MessageLookupByLibrary {
"demoSimpleDialogDescription": MessageLookupByLibrary.simpleMessage(
"A simple dialog offers the user a choice between several options. A simple dialog has an optional title that is displayed above the choices."),
"demoSimpleDialogTitle": MessageLookupByLibrary.simpleMessage("Simple"),
"demoSimpleMenuTitle":
MessageLookupByLibrary.simpleMessage("Simple menu"),
"demoSlidersContinuous":
MessageLookupByLibrary.simpleMessage("Continuous"),
"demoSlidersContinuousRangeSliderWithCustomTheme":

Loading…
Cancel
Save