|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.material; |
|
|
|
using Unity.UIWidgets.widgets; |
|
|
|
|
|
|
|
namespace UIWidgetsGallery.gallery { |
|
|
|
|
|
|
if (ReferenceEquals(null, other)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return string.Equals(this.name, other.name) && Equals(this.icon, other.icon); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this.Equals((GalleryDemoCategory) obj); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
public override string ToString() { |
|
|
|
return $"{this.GetType()}({this.title} {this.routeName})"; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static partial class DemoUtils { |
|
|
|
|
|
|
title: "Shrine", |
|
|
|
subtitle: "Basic shopping app", |
|
|
|
icon: GalleryIcons.shrine, |
|
|
|
category: DemoUtils._kDemos, |
|
|
|
category: _kDemos, |
|
|
|
routeName: ShrineDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new ShrineDemo() |
|
|
|
), |
|
|
|
|
|
|
icon: GalleryIcons.account_box, |
|
|
|
category: DemoUtils._kDemos, |
|
|
|
category: _kDemos, |
|
|
|
routeName: ContactsDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new ContactsDemo() |
|
|
|
), |
|
|
|
|
|
|
icon: GalleryIcons.animation, |
|
|
|
category: DemoUtils._kDemos, |
|
|
|
category: _kDemos, |
|
|
|
routeName: AnimationDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new AnimationDemo() |
|
|
|
), |
|
|
|
|
|
|
title: "Colors", |
|
|
|
subtitle: "All of the predefined colors", |
|
|
|
icon: GalleryIcons.colors, |
|
|
|
category: DemoUtils._kStyle, |
|
|
|
category: _kStyle, |
|
|
|
routeName: ColorsDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new ColorsDemo() |
|
|
|
), |
|
|
|
|
|
|
icon: GalleryIcons.custom_typography, |
|
|
|
category: DemoUtils._kStyle, |
|
|
|
category: _kStyle, |
|
|
|
routeName: TypographyDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new TypographyDemo() |
|
|
|
), |
|
|
|
|
|
|
title: "Backdrop", |
|
|
|
subtitle: "Select a front layer from back layer", |
|
|
|
icon: GalleryIcons.backdrop, |
|
|
|
category: DemoUtils._kMaterialComponents, |
|
|
|
category: _kMaterialComponents, |
|
|
|
routeName: BackdropDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new BackdropDemo() |
|
|
|
), |
|
|
|
|
|
|
icon: GalleryIcons.bottom_app_bar, |
|
|
|
category: DemoUtils._kMaterialComponents, |
|
|
|
category: _kMaterialComponents, |
|
|
|
routeName: BottomAppBarDemo.routeName, |
|
|
|
documentationUrl: "https://docs.flutter.io/flutter/material/BottomAppBar-class.html", |
|
|
|
buildRoute: (BuildContext context) => new BottomAppBarDemo() |
|
|
|
|
|
|
subtitle: "Bottom navigation with cross-fading views", |
|
|
|
icon: GalleryIcons.bottom_navigation, |
|
|
|
category: DemoUtils._kMaterialComponents, |
|
|
|
category: _kMaterialComponents, |
|
|
|
routeName: BottomNavigationDemo.routeName, |
|
|
|
documentationUrl: "https://docs.flutter.io/flutter/material/BottomNavigationBar-class.html", |
|
|
|
buildRoute: (BuildContext context) => new BottomNavigationDemo() |
|
|
|
|
|
|
title: "Buttons", |
|
|
|
subtitle: "Flat, raised, dropdown, and more", |
|
|
|
icon: GalleryIcons.generic_buttons, |
|
|
|
category: DemoUtils._kMaterialComponents, |
|
|
|
category: _kMaterialComponents, |
|
|
|
routeName: ButtonsDemo.routeName, |
|
|
|
buildRoute: (BuildContext context) => new ButtonsDemo() |
|
|
|
), |
|
|
|
|
|
|
title: "Cards", |
|
|
|
subtitle: "Baseline cards with rounded corners", |
|
|
|
icon: GalleryIcons.cards, |
|
|
|
category: DemoUtils._kMaterialComponents, |
|
|
|
category: _kMaterialComponents, |
|
|
|
routeName: CardsDemo.routeName, |
|
|
|
documentationUrl: "https://docs.flutter.io/flutter/material/Card-class.html", |
|
|
|
buildRoute: (BuildContext context) => new CardsDemo() |
|
|
|
|
|
|
documentationUrl: "https://docs.flutter.io/flutter/material/Chip-class.html", |
|
|
|
buildRoute: (BuildContext context) => new ChipDemo() |
|
|
|
), |
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Data tables",
|
|
|
|
// subtitle: "Rows and columns",
|
|
|
|
// icon: GalleryIcons.data_table,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DataTableDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/PaginatedDataTable-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => DataTableDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Dialogs",
|
|
|
|
// subtitle: "Simple, alert, and fullscreen",
|
|
|
|
// icon: GalleryIcons.dialogs,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DialogDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showDialog.html",
|
|
|
|
// buildRoute: (BuildContext context) => DialogDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Elevations",
|
|
|
|
// subtitle: "Shadow values on cards",
|
|
|
|
// // TODO(larche): Change to custom icon for elevations when one exists.
|
|
|
|
// icon: GalleryIcons.cupertino_progress,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ElevationDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Material/elevation.html",
|
|
|
|
// buildRoute: (BuildContext context) => ElevationDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Expand/collapse list control",
|
|
|
|
// subtitle: "A list with one sub-list level",
|
|
|
|
// icon: GalleryIcons.expand_all,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TwoLevelListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionTile-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TwoLevelListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Expansion panels",
|
|
|
|
// subtitle: "List of expanding panels",
|
|
|
|
// icon: GalleryIcons.expand_all,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ExpansionPanelsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionPanel-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ExpansionPanelsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Grid",
|
|
|
|
// subtitle: "Row and column layout",
|
|
|
|
// icon: GalleryIcons.grid_on,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: GridListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/widgets/GridView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new GridListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Icons",
|
|
|
|
// subtitle: "Enabled and disabled icons with opacity",
|
|
|
|
// icon: GalleryIcons.sentiment_very_satisfied,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: IconsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/IconButton-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => IconsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists",
|
|
|
|
// subtitle: "Scrolling list layouts",
|
|
|
|
// icon: GalleryIcons.list_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ListTile-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new ListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists: leave-behind list items",
|
|
|
|
// subtitle: "List items with hidden actions",
|
|
|
|
// icon: GalleryIcons.lists_leave_behind,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: LeaveBehindDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/widgets/Dismissible-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new LeaveBehindDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists: reorderable",
|
|
|
|
// subtitle: "Reorderable lists",
|
|
|
|
// icon: GalleryIcons.list_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ReorderableListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ReorderableListView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new ReorderableListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Menus",
|
|
|
|
// subtitle: "Menu buttons and simple menus",
|
|
|
|
// icon: GalleryIcons.more_vert,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: MenuDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/PopupMenuButton-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new MenuDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Navigation drawer",
|
|
|
|
// subtitle: "Navigation drawer with standard header",
|
|
|
|
// icon: GalleryIcons.menu,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DrawerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Drawer-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => DrawerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pagination",
|
|
|
|
// subtitle: "PageView with indicator",
|
|
|
|
// icon: GalleryIcons.page_control,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: PageSelectorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => PageSelectorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pickers",
|
|
|
|
// subtitle: "Date and time selection widgets",
|
|
|
|
// icon: GalleryIcons.@event,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DateAndTimePickerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showDatePicker.html",
|
|
|
|
// buildRoute: (BuildContext context) => DateAndTimePickerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Progress indicators",
|
|
|
|
// subtitle: "Linear, circular, indeterminate",
|
|
|
|
// icon: GalleryIcons.progress_activity,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ProgressIndicatorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/LinearProgressIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ProgressIndicatorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pull to refresh",
|
|
|
|
// subtitle: "Refresh indicators",
|
|
|
|
// icon: GalleryIcons.refresh,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: OverscrollDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/RefreshIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => OverscrollDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Search",
|
|
|
|
// subtitle: "Expandable search",
|
|
|
|
// icon: Icons.search,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SearchDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showSearch.html",
|
|
|
|
// buildRoute: (BuildContext context) => SearchDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Selection controls",
|
|
|
|
// subtitle: "Checkboxes, radio buttons, and switches",
|
|
|
|
// icon: GalleryIcons.check_box,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SelectionControlsDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => SelectionControlsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Sliders",
|
|
|
|
// subtitle: "Widgets for selecting a value by swiping",
|
|
|
|
// icon: GalleryIcons.sliders,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SliderDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Slider-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => SliderDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Snackbar",
|
|
|
|
// subtitle: "Temporary messaging",
|
|
|
|
// icon: GalleryIcons.snackbar,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SnackBarDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ScaffoldState/showSnackBar.html",
|
|
|
|
// buildRoute: (BuildContext context) => SnackBarDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tabs",
|
|
|
|
// subtitle: "Tabs with independently scrollable views",
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TabsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TabsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tabs: Scrolling",
|
|
|
|
// subtitle: "Tab bar that scrolls",
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// routeName: ScrollableTabsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBar-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ScrollableTabsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Text fields",
|
|
|
|
// subtitle: "Single line of editable text and numbers",
|
|
|
|
// icon: GalleryIcons.text_fields_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TextFormFieldDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TextFormField-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => const TextFormFieldDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tooltips",
|
|
|
|
// subtitle: "Short message displayed on long-press",
|
|
|
|
// icon: GalleryIcons.tooltip,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TooltipDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Tooltip-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TooltipDemo()
|
|
|
|
// ),
|
|
|
|
//
|
|
|
|
// // Cupertino Components
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Activity Indicator",
|
|
|
|
// icon: GalleryIcons.cupertino_progress,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoProgressIndicatorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoActivityIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoProgressIndicatorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Alerts",
|
|
|
|
// icon: GalleryIcons.dialogs,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoAlertDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoAlertDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Buttons",
|
|
|
|
// icon: GalleryIcons.generic_buttons,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoButtonsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoButton-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoButtonsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Navigation",
|
|
|
|
// icon: GalleryIcons.bottom_navigation,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoNavigationDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoTabScaffold-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoNavigationDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pickers",
|
|
|
|
// icon: GalleryIcons.@event,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoPickerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoPickerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pull to refresh",
|
|
|
|
// icon: GalleryIcons.cupertino_pull_to_refresh,
|
|
|
|
// category: _kCupertinoComponents,
|
|
|
|
// routeName: CupertinoRefreshControlDemo.routeName,
|
|
|
|
// documentationUrl:
|
|
|
|
// "https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoRefreshControlDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Segmented Control",
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSegmentedControlDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSegmentedControl-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSegmentedControlDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Sliders",
|
|
|
|
// icon: GalleryIcons.sliders,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSliderDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSliderDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Switches",
|
|
|
|
// icon: GalleryIcons.cupertino_switch,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSwitchDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSwitch-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSwitchDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Text Fields",
|
|
|
|
// icon: GalleryIcons.text_fields_alt,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoTextFieldDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoTextFieldDemo()
|
|
|
|
// ),
|
|
|
|
//
|
|
|
|
// // Media
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Animated images",
|
|
|
|
// subtitle: "GIF and WebP animations",
|
|
|
|
// icon: GalleryIcons.animation,
|
|
|
|
// category: GalleryDemoCategory._kMedia,
|
|
|
|
// routeName: ImagesDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => ImagesDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Video",
|
|
|
|
// subtitle: "Video playback",
|
|
|
|
// icon: GalleryIcons.drive_video,
|
|
|
|
// category: GalleryDemoCategory._kMedia,
|
|
|
|
// routeName: VideoDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => new VideoDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Data tables",
|
|
|
|
// subtitle: "Rows and columns",
|
|
|
|
// icon: GalleryIcons.data_table,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DataTableDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/PaginatedDataTable-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => DataTableDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Dialogs",
|
|
|
|
// subtitle: "Simple, alert, and fullscreen",
|
|
|
|
// icon: GalleryIcons.dialogs,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DialogDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showDialog.html",
|
|
|
|
// buildRoute: (BuildContext context) => DialogDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Elevations",
|
|
|
|
// subtitle: "Shadow values on cards",
|
|
|
|
// // TODO(larche): Change to custom icon for elevations when one exists.
|
|
|
|
// icon: GalleryIcons.cupertino_progress,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ElevationDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Material/elevation.html",
|
|
|
|
// buildRoute: (BuildContext context) => ElevationDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Expand/collapse list control",
|
|
|
|
// subtitle: "A list with one sub-list level",
|
|
|
|
// icon: GalleryIcons.expand_all,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TwoLevelListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionTile-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TwoLevelListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Expansion panels",
|
|
|
|
// subtitle: "List of expanding panels",
|
|
|
|
// icon: GalleryIcons.expand_all,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ExpansionPanelsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionPanel-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ExpansionPanelsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Grid",
|
|
|
|
// subtitle: "Row and column layout",
|
|
|
|
// icon: GalleryIcons.grid_on,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: GridListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/widgets/GridView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new GridListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Icons",
|
|
|
|
// subtitle: "Enabled and disabled icons with opacity",
|
|
|
|
// icon: GalleryIcons.sentiment_very_satisfied,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: IconsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/IconButton-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => IconsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists",
|
|
|
|
// subtitle: "Scrolling list layouts",
|
|
|
|
// icon: GalleryIcons.list_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ListTile-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new ListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists: leave-behind list items",
|
|
|
|
// subtitle: "List items with hidden actions",
|
|
|
|
// icon: GalleryIcons.lists_leave_behind,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: LeaveBehindDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/widgets/Dismissible-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new LeaveBehindDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Lists: reorderable",
|
|
|
|
// subtitle: "Reorderable lists",
|
|
|
|
// icon: GalleryIcons.list_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ReorderableListDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ReorderableListView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new ReorderableListDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Menus",
|
|
|
|
// subtitle: "Menu buttons and simple menus",
|
|
|
|
// icon: GalleryIcons.more_vert,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: MenuDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/PopupMenuButton-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => new MenuDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Navigation drawer",
|
|
|
|
// subtitle: "Navigation drawer with standard header",
|
|
|
|
// icon: GalleryIcons.menu,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DrawerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Drawer-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => DrawerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pagination",
|
|
|
|
// subtitle: "PageView with indicator",
|
|
|
|
// icon: GalleryIcons.page_control,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: PageSelectorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => PageSelectorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pickers",
|
|
|
|
// subtitle: "Date and time selection widgets",
|
|
|
|
// icon: GalleryIcons.@event,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: DateAndTimePickerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showDatePicker.html",
|
|
|
|
// buildRoute: (BuildContext context) => DateAndTimePickerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Progress indicators",
|
|
|
|
// subtitle: "Linear, circular, indeterminate",
|
|
|
|
// icon: GalleryIcons.progress_activity,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: ProgressIndicatorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/LinearProgressIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ProgressIndicatorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pull to refresh",
|
|
|
|
// subtitle: "Refresh indicators",
|
|
|
|
// icon: GalleryIcons.refresh,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: OverscrollDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/RefreshIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => OverscrollDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Search",
|
|
|
|
// subtitle: "Expandable search",
|
|
|
|
// icon: Icons.search,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SearchDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/showSearch.html",
|
|
|
|
// buildRoute: (BuildContext context) => SearchDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Selection controls",
|
|
|
|
// subtitle: "Checkboxes, radio buttons, and switches",
|
|
|
|
// icon: GalleryIcons.check_box,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SelectionControlsDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => SelectionControlsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Sliders",
|
|
|
|
// subtitle: "Widgets for selecting a value by swiping",
|
|
|
|
// icon: GalleryIcons.sliders,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SliderDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Slider-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => SliderDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Snackbar",
|
|
|
|
// subtitle: "Temporary messaging",
|
|
|
|
// icon: GalleryIcons.snackbar,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: SnackBarDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/ScaffoldState/showSnackBar.html",
|
|
|
|
// buildRoute: (BuildContext context) => SnackBarDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tabs",
|
|
|
|
// subtitle: "Tabs with independently scrollable views",
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TabsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TabsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tabs: Scrolling",
|
|
|
|
// subtitle: "Tab bar that scrolls",
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// routeName: ScrollableTabsDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TabBar-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => ScrollableTabsDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Text fields",
|
|
|
|
// subtitle: "Single line of editable text and numbers",
|
|
|
|
// icon: GalleryIcons.text_fields_alt,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TextFormFieldDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/TextFormField-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => const TextFormFieldDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Tooltips",
|
|
|
|
// subtitle: "Short message displayed on long-press",
|
|
|
|
// icon: GalleryIcons.tooltip,
|
|
|
|
// category: GalleryDemoCategory._kMaterialComponents,
|
|
|
|
// routeName: TooltipDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/material/Tooltip-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => TooltipDemo()
|
|
|
|
// ),
|
|
|
|
//
|
|
|
|
// Cupertino Components
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Activity Indicator",
|
|
|
|
// icon: GalleryIcons.cupertino_progress,
|
|
|
|
// category: _kCupertinoComponents,
|
|
|
|
// routeName: CupertinoProgressIndicatorDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoActivityIndicator-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoProgressIndicatorDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Alerts",
|
|
|
|
// icon: GalleryIcons.dialogs,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoAlertDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoAlertDemo()
|
|
|
|
// ),
|
|
|
|
new GalleryDemo( |
|
|
|
title: "Buttons", |
|
|
|
icon: GalleryIcons.generic_buttons, |
|
|
|
category: _kCupertinoComponents, |
|
|
|
routeName: CupertinoButtonsDemo.routeName, |
|
|
|
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoButton-class.html", |
|
|
|
buildRoute: (BuildContext context) => new CupertinoButtonsDemo() |
|
|
|
), |
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Navigation",
|
|
|
|
// icon: GalleryIcons.bottom_navigation,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoNavigationDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoTabScaffold-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoNavigationDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pickers",
|
|
|
|
// icon: GalleryIcons.@event,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoPickerDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoPickerDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pull to refresh",
|
|
|
|
// icon: GalleryIcons.cupertino_pull_to_refresh,
|
|
|
|
// category: _kCupertinoComponents,
|
|
|
|
// routeName: CupertinoRefreshControlDemo.routeName,
|
|
|
|
// documentationUrl:
|
|
|
|
// "https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoRefreshControlDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Segmented Control",
|
|
|
|
// icon: GalleryIcons.tabs,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSegmentedControlDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSegmentedControl-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSegmentedControlDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Sliders",
|
|
|
|
// icon: GalleryIcons.sliders,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSliderDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSliderDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Switches",
|
|
|
|
// icon: GalleryIcons.cupertino_switch,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoSwitchDemo.routeName,
|
|
|
|
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSwitch-class.html",
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoSwitchDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Text Fields",
|
|
|
|
// icon: GalleryIcons.text_fields_alt,
|
|
|
|
// category: GalleryDemoCategory._kCupertinoComponents,
|
|
|
|
// routeName: CupertinoTextFieldDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => CupertinoTextFieldDemo()
|
|
|
|
// ),
|
|
|
|
//
|
|
|
|
// // Media
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Animated images",
|
|
|
|
// subtitle: "GIF and WebP animations",
|
|
|
|
// icon: GalleryIcons.animation,
|
|
|
|
// category: GalleryDemoCategory._kMedia,
|
|
|
|
// routeName: ImagesDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => ImagesDemo()
|
|
|
|
// ),
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Video",
|
|
|
|
// subtitle: "Video playback",
|
|
|
|
// icon: GalleryIcons.drive_video,
|
|
|
|
// category: GalleryDemoCategory._kMedia,
|
|
|
|
// routeName: VideoDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => new VideoDemo()
|
|
|
|
// ),
|
|
|
|
// galleryDemos.Insert(0,
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pesto",
|
|
|
|
// subtitle: "Simple recipe browser",
|
|
|
|
// icon: Icons.adjust,
|
|
|
|
// category: GalleryDemoCategory._kDemos,
|
|
|
|
// routeName: PestoDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => new PestoDemo()
|
|
|
|
// )
|
|
|
|
// );
|
|
|
|
// galleryDemos.Insert(0,
|
|
|
|
// new GalleryDemo(
|
|
|
|
// title: "Pesto",
|
|
|
|
// subtitle: "Simple recipe browser",
|
|
|
|
// icon: Icons.adjust,
|
|
|
|
// category: GalleryDemoCategory._kDemos,
|
|
|
|
// routeName: PestoDemo.routeName,
|
|
|
|
// buildRoute: (BuildContext context) => new PestoDemo()
|
|
|
|
// )
|
|
|
|
// );
|
|
|
|
return true; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
demo => demo.documentationUrl |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |