diff --git a/examples/flutter_gallery/material_gallery/.gitignore b/examples/flutter_gallery/material_gallery/.gitignore
deleted file mode 100644
index 14c7d4c3f7..0000000000
--- a/examples/flutter_gallery/material_gallery/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.DS_Store
-.atom/
-.idea
-.packages
-.pub/
-build/
-ios/.generated/
-packages
-pubspec.lock
diff --git a/examples/flutter_gallery/material_gallery/README.md b/examples/flutter_gallery/material_gallery/README.md
deleted file mode 100644
index 0d13d4db89..0000000000
--- a/examples/flutter_gallery/material_gallery/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Flutter gallery
-
-Demo app for the Material Design widgets and other features provided by Flutter.
-
-## Icon
-
-Icon was generated using Android Asset Studio:
-https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=0&foreground.space.pad=0.1&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=ffffff%2C100&effects=none
-
-From the Flutter Logo:
-https://github.com/flutter/website/blob/master/_includes/logo.html
-which appears to be CC-BY 4.0.
diff --git a/examples/flutter_gallery/material_gallery/android/AndroidManifest.xml b/examples/flutter_gallery/material_gallery/android/AndroidManifest.xml
deleted file mode 100644
index b76c2b44e3..0000000000
--- a/examples/flutter_gallery/material_gallery/android/AndroidManifest.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/flutter_gallery/material_gallery/android/res/mipmap-hdpi/ic_launcher.png b/examples/flutter_gallery/material_gallery/android/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index f0a55cda78..0000000000
Binary files a/examples/flutter_gallery/material_gallery/android/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/android/res/mipmap-mdpi/ic_launcher.png b/examples/flutter_gallery/material_gallery/android/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index eb98dc451d..0000000000
Binary files a/examples/flutter_gallery/material_gallery/android/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/android/res/mipmap-xhdpi/ic_launcher.png b/examples/flutter_gallery/material_gallery/android/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index f1783dbbf3..0000000000
Binary files a/examples/flutter_gallery/material_gallery/android/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/android/res/mipmap-xxhdpi/ic_launcher.png b/examples/flutter_gallery/material_gallery/android/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 46828a290a..0000000000
Binary files a/examples/flutter_gallery/material_gallery/android/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/android/res/mipmap-xxxhdpi/ic_launcher.png b/examples/flutter_gallery/material_gallery/android/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index a5276715d9..0000000000
Binary files a/examples/flutter_gallery/material_gallery/android/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/flutter_logo.png b/examples/flutter_gallery/material_gallery/assets/flutter_logo.png
deleted file mode 100644
index b795ed72d1..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/flutter_logo.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_animation.png b/examples/flutter_gallery/material_gallery/assets/section_animation.png
deleted file mode 100644
index 8ada8cf0c1..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_animation.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_components.png b/examples/flutter_gallery/material_gallery/assets/section_components.png
deleted file mode 100644
index 5fb17bd60f..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_components.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_layout.png b/examples/flutter_gallery/material_gallery/assets/section_layout.png
deleted file mode 100644
index 808a1fdf5b..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_layout.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_patterns.png b/examples/flutter_gallery/material_gallery/assets/section_patterns.png
deleted file mode 100644
index c78cb8aecc..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_patterns.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_style.png b/examples/flutter_gallery/material_gallery/assets/section_style.png
deleted file mode 100644
index 3433fb2cea..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_style.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/assets/section_usability.png b/examples/flutter_gallery/material_gallery/assets/section_usability.png
deleted file mode 100644
index e1ba0aa601..0000000000
Binary files a/examples/flutter_gallery/material_gallery/assets/section_usability.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/flutter.yaml b/examples/flutter_gallery/material_gallery/flutter.yaml
deleted file mode 100644
index 7a2ca11994..0000000000
--- a/examples/flutter_gallery/material_gallery/flutter.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: flutter_gallery
-uses-material-design: true
-assets:
- - assets/flutter_logo.png
- - assets/section_animation.png
- - assets/section_style.png
- - assets/section_layout.png
- - assets/section_components.png
- - assets/section_patterns.png
- - assets/section_usability.png
- - packages/flutter_gallery_assets/ali_connors.png
- - packages/flutter_gallery_assets/sun.png
- - packages/flutter_gallery_assets/clouds-0.png
- - packages/flutter_gallery_assets/clouds-1.png
- - packages/flutter_gallery_assets/ray.png
- - packages/flutter_gallery_assets/sun.png
- - packages/flutter_gallery_assets/weathersprites.json
- - packages/flutter_gallery_assets/weathersprites.png
- - packages/flutter_gallery_assets/icon-sun.png
- - packages/flutter_gallery_assets/icon-rain.png
- - packages/flutter_gallery_assets/icon-snow.png
- - packages/flutter_gallery_assets/kangaroo_valley_safari.png
- - packages/flutter_gallery_assets/top_10_australian_beaches.png
- - packages/flutter_gallery_assets/jumpingjack.json
- - packages/flutter_gallery_assets/jumpingjack.png
- - packages/flutter_gallery_assets/grain.png
- - packages/flutter_gallery_assets/fancylines.png
- - packages/flutter_gallery_assets/landscape_0.jpg
- - packages/flutter_gallery_assets/landscape_1.jpg
- - packages/flutter_gallery_assets/landscape_2.jpg
- - packages/flutter_gallery_assets/landscape_3.jpg
- - packages/flutter_gallery_assets/landscape_4.jpg
- - packages/flutter_gallery_assets/landscape_5.jpg
- - packages/flutter_gallery_assets/landscape_6.jpg
- - packages/flutter_gallery_assets/landscape_7.jpg
- - packages/flutter_gallery_assets/landscape_8.jpg
- - packages/flutter_gallery_assets/landscape_9.jpg
- - packages/flutter_gallery_assets/landscape_10.jpg
- - packages/flutter_gallery_assets/landscape_11.jpg
- - packages/flutter_gallery_assets/shadow.png
- - lib/gallery/example_code.dart
diff --git a/examples/flutter_gallery/material_gallery/ios/.gitignore b/examples/flutter_gallery/material_gallery/ios/.gitignore
deleted file mode 100644
index ecb842d705..0000000000
--- a/examples/flutter_gallery/material_gallery/ios/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.generated/
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 363d1c4ce4..0000000000
--- a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,142 +0,0 @@
-{
- "images" : [
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-Small-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-Small-40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-Small.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-Small@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Small-40.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Small-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "icon_16x16.png",
- "scale" : "1x"
- },
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "icon_16x16@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "icon_32x32.png",
- "scale" : "1x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "icon_32x32@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "icon_128x128.png",
- "scale" : "1x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "icon_128x128@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "icon_256x256.png",
- "scale" : "1x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "icon_256x256@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "icon_512x512.png",
- "scale" : "1x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "icon_512x512@2x.png",
- "scale" : "2x"
- }
- ]
-}
\ No newline at end of file
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
deleted file mode 100644
index 9996f5e598..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
deleted file mode 100644
index 7a543edbdd..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76.png
deleted file mode 100644
index 05a8268104..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
deleted file mode 100644
index bfbca28f5d..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
deleted file mode 100644
index c924b8e497..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png
deleted file mode 100644
index 3006f1d348..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png
deleted file mode 100644
index 5f7d22d364..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png
deleted file mode 100644
index 9996f5e598..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
deleted file mode 100644
index 3433da1196..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
deleted file mode 100644
index f7f9f16d1b..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
deleted file mode 100644
index e9c23601cf..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128.png
deleted file mode 100644
index dd5fccb0a9..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png
deleted file mode 100644
index 1909e27511..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16.png
deleted file mode 100644
index 40a701b514..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png
deleted file mode 100644
index 06c1a80560..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256.png
deleted file mode 100644
index 1909e27511..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png
deleted file mode 100644
index 69c96ef1e2..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32.png
deleted file mode 100644
index 06c1a80560..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png
deleted file mode 100644
index 0f94371460..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512.png
deleted file mode 100644
index 69c96ef1e2..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png b/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png
deleted file mode 100644
index 1d6355f58c..0000000000
Binary files a/examples/flutter_gallery/material_gallery/ios/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png and /dev/null differ
diff --git a/examples/flutter_gallery/material_gallery/ios/Info.plist b/examples/flutter_gallery/material_gallery/ios/Info.plist
deleted file mode 100644
index c89ab01a94..0000000000
--- a/examples/flutter_gallery/material_gallery/ios/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- Runner
- CFBundleIdentifier
- io.flutter.materialgallery
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- Flutter gallery
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
-
-
diff --git a/examples/flutter_gallery/material_gallery/ios/LaunchScreen.storyboard b/examples/flutter_gallery/material_gallery/ios/LaunchScreen.storyboard
deleted file mode 100644
index 78686cd075..0000000000
--- a/examples/flutter_gallery/material_gallery/ios/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/all.dart b/examples/flutter_gallery/material_gallery/lib/demo/all.dart
deleted file mode 100644
index a2c41f923f..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/all.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-export 'buttons_demo.dart';
-export 'cards_demo.dart';
-export 'chip_demo.dart';
-export 'colors_demo.dart';
-export 'data_table_demo.dart';
-export 'date_picker_demo.dart';
-export 'dialog_demo.dart';
-export 'drawing_demo.dart';
-export 'drop_down_demo.dart';
-export 'fitness_demo.dart';
-export 'flexible_space_demo.dart';
-export 'grid_list_demo.dart';
-export 'icons_demo.dart';
-export 'leave_behind_demo.dart';
-export 'list_demo.dart';
-export 'menu_demo.dart';
-export 'modal_bottom_sheet_demo.dart';
-export 'overscroll_demo.dart';
-export 'page_selector_demo.dart';
-export 'persistent_bottom_sheet_demo.dart';
-export 'progress_indicator_demo.dart';
-export 'scrollable_tabs_demo.dart';
-export 'selection_controls_demo.dart';
-export 'slider_demo.dart';
-export 'snack_bar_demo.dart';
-export 'tabs_demo.dart';
-export 'tabs_fab_demo.dart';
-export 'text_field_demo.dart';
-export 'time_picker_demo.dart';
-export 'tooltip_demo.dart';
-export 'two_level_list_demo.dart';
-export 'typography_demo.dart';
-export 'weather_demo.dart';
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/buttons_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/buttons_demo.dart
deleted file mode 100644
index 70b9922a31..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/buttons_demo.dart
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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 '../gallery/demo.dart';
-
-const String _raisedText =
- "# Raised buttons\n"
- "Raised buttons add dimension to mostly flat layouts. They emphasize "
- "functions on busy or wide spaces.";
-
-const String _raisedCode = 'buttons_raised';
-
-const String _flatText =
- "# Flat buttons\n"
- "A flat button displays an ink splash on press "
- "but does not lift. Use flat buttons on toolbars, in dialogs and "
- "inline with padding";
-
-const String _flatCode = 'buttons_flat';
-
-const String _dropdownText =
- "# Dropdown buttons\n"
- "A dropdown button displays a menu that's used to select a value from a "
- "small set of values. The button displays the current value and a down "
- "arrow.";
-
-const String _dropdownCode = 'buttons_dropdown';
-
-const String _iconText =
- "IconButtons are appropriate for toggle buttons that allow a single choice to be "
- "selected or deselected, such as adding or removing an item's star.";
-
-const String _iconCode = 'buttons_icon';
-
-const String _actionText =
- "# Floating action buttons\n"
- "Floating action buttons are used for a promoted action. They are "
- "distinguished by a circled icon floating above the UI and can have motion "
- "behaviors that include morphing, launching, and a transferring anchor "
- "point.";
-
-const String _actionCode = 'buttons_action';
-
-class ButtonsDemo extends StatefulWidget {
- static const String routeName = '/buttons';
-
- @override
- _ButtonsDemoState createState() => new _ButtonsDemoState();
-}
-
-class _ButtonsDemoState extends State {
- @override
- Widget build(BuildContext context) {
- List demos = [
- new ComponentDemoTabData(
- tabName: 'RAISED',
- description: _raisedText,
- widget: buildRaisedButton(),
- exampleCodeTag: _raisedCode
- ),
- new ComponentDemoTabData(
- tabName: 'FLAT',
- description: _flatText,
- widget: buildFlatButton(),
- exampleCodeTag: _flatCode
- ),
- new ComponentDemoTabData(
- tabName: 'DROPDOWN',
- description: _dropdownText,
- widget: buildDropdownButton(),
- exampleCodeTag: _dropdownCode
- ),
- new ComponentDemoTabData(
- tabName: 'ICON',
- description: _iconText,
- widget: buildIconButton(),
- exampleCodeTag: _iconCode
- ),
- new ComponentDemoTabData(
- tabName: 'ACTION',
- description: _actionText,
- widget: buildActionButton(),
- exampleCodeTag: _actionCode
- ),
- ];
-
- return new TabbedComponentDemoScaffold(
- title: 'Buttons',
- demos: demos
- );
- }
-
- Widget buildRaisedButton() {
- return new Align(
- alignment: new FractionalOffset(0.5, 0.4),
- child: new ButtonBar(
- alignment: MainAxisAlignment.collapse,
- children: [
- new RaisedButton(
- child: new Text('RAISED BUTTON'),
- onPressed: () {
- // Perform some action
- }
- ),
- new RaisedButton(
- child: new Text('DISABLED')
- )
- ]
- )
- );
- }
-
- Widget buildFlatButton() {
- return new Align(
- alignment: new FractionalOffset(0.5, 0.4),
- child: new ButtonBar(
- alignment: MainAxisAlignment.collapse,
- children: [
- new FlatButton(
- child: new Text('FLAT BUTTON'),
- onPressed: () {
- // Perform some action
- }
- ),
- new FlatButton(
- child: new Text('DISABLED')
- )
- ]
- )
- );
- }
-
- String dropdownValue = 'Free';
-
- Widget buildDropdownButton() {
- return new Align(
- alignment: new FractionalOffset(0.5, 0.4),
- child: new DropDownButton(
- value: dropdownValue,
- onChanged: (String newValue) {
- setState(() {
- if (newValue != null)
- dropdownValue = newValue;
- });
- },
- items: ['One', 'Two', 'Free', 'Four']
- .map((String value) {
- return new DropDownMenuItem(
- value: value,
- child: new Text(value));
- })
- .toList()
- )
- );
- }
-
- bool iconButtonToggle = false;
-
- Widget buildIconButton() {
- return new Align(
- alignment: new FractionalOffset(0.5, 0.4),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.collapse,
- children: [
- new IconButton(
- icon: Icons.thumb_up,
- onPressed: () {
- setState(() => iconButtonToggle = !iconButtonToggle);
- },
- color: iconButtonToggle ? Theme.of(context).primaryColor : null
- ),
- new IconButton(
- icon: Icons.thumb_up
- )
- ]
- .map((Widget button) => new SizedBox(width: 64.0, height: 64.0, child: button))
- .toList()
- )
- );
- }
-
- Widget buildActionButton() {
- return new Align(
- alignment: new FractionalOffset(0.5, 0.4),
- child: new FloatingActionButton(
- child: new Icon(icon: Icons.add),
- onPressed: () {
- // Perform some action
- }
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/cards_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/cards_demo.dart
deleted file mode 100644
index 4ebb6cbdf0..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/cards_demo.dart
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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:flutter/widgets.dart';
-
-class TravelDestination {
- const TravelDestination({ this.assetName, this.title, this.description });
-
- final String assetName;
- final String title;
- final List description;
-
- bool get isValid => assetName != null && title != null && description?.length == 3;
-}
-
-final List destinations = [
- const TravelDestination(
- assetName: 'packages/flutter_gallery_assets/top_10_australian_beaches.png',
- title: 'Top 10 Australian beaches',
- description: const [
- 'Number 10',
- 'Whitehaven Beach',
- 'Whitsunday Island, Whitsunday Islands'
- ]
- ),
- const TravelDestination(
- assetName: 'packages/flutter_gallery_assets/kangaroo_valley_safari.png',
- title: 'Kangaroo Valley Safari',
- description: const [
- '2031 Moss Vale Road',
- 'Kangaroo Valley 2577',
- 'New South Wales'
- ]
- )
-];
-
-class TravelDestinationItem extends StatelessWidget {
- TravelDestinationItem({ Key key, this.destination }) : super(key: key) {
- assert(destination != null && destination.isValid);
- }
-
- static final double height = 328.0;
- final TravelDestination destination;
-
- @override
- Widget build(BuildContext context) {
- ThemeData theme = Theme.of(context);
- TextStyle titleStyle = theme.textTheme.headline.copyWith(color: Colors.white);
- TextStyle descriptionStyle = theme.textTheme.subhead;
-
- return new SizedBox(
- height: height,
- child: new Card(
- child: new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- // photo and title
- new SizedBox(
- height: 184.0,
- child: new Stack(
- children: [
- new Positioned(
- left: 0.0,
- top: 0.0,
- bottom: 0.0,
- right: 0.0,
- child: new AssetImage(
- name: destination.assetName,
- fit: ImageFit.cover
- )
- ),
- new Positioned(
- bottom: 16.0,
- left: 16.0,
- child: new Text(destination.title, style: titleStyle)
- )
- ]
- )
- ),
- // description and share/expore buttons
- new Flexible(
- child: new Padding(
- padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
- child: new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- // three line description
- new Text(destination.description[0], style: descriptionStyle),
- new Text(destination.description[1], style: descriptionStyle),
- new Text(destination.description[2], style: descriptionStyle),
- ]
- )
- )
- ),
- // share, explore buttons
- // TODO(abarth): The theme and the bar should be part of card.
- new ButtonTheme.footer(
- child: new ButtonBar(
- alignment: MainAxisAlignment.start,
- children: [
- new FlatButton(
- child: new Text('SHARE'),
- onPressed: () { /* do nothing */ }
- ),
- new FlatButton(
- child: new Text('EXPLORE'),
- onPressed: () { /* do nothing */ }
- ),
- ]
- )
- ),
- ]
- )
- )
- );
- }
-}
-
-class CardsDemo extends StatelessWidget {
- static const String routeName = '/cards';
-
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(
- title: new Text('Travel stream')
- ),
- body: new ScrollableList(
- itemExtent: TravelDestinationItem.height,
- padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
- children: destinations.map((TravelDestination destination) {
- return new Container(
- margin: const EdgeInsets.only(bottom: 8.0),
- child: new TravelDestinationItem(destination: destination)
- );
- })
- .toList()
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/chip_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/chip_demo.dart
deleted file mode 100644
index 08b2ae87f1..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/chip_demo.dart
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 The Chromium Authors. 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';
-
-class ChipDemo extends StatefulWidget {
- static const String routeName = '/chip';
-
- @override
- _ChipDemoState createState() => new _ChipDemoState();
-}
-
-class _ChipDemoState extends State {
- bool _showBananas = true;
-
- void _deleteBananas() {
- setState(() {
- _showBananas = false;
- });
- }
-
- @override
- Widget build(BuildContext context) {
- List chips = [
- new Chip(
- label: new Text('Apple')
- ),
- new Chip(
- avatar: new CircleAvatar(child: new Text('B')),
- label: new Text('Blueberry')
- ),
- ];
-
- if (_showBananas) {
- chips.add(new Chip(
- label: new Text('Bananas'),
- onDeleted: _deleteBananas
- ));
- }
-
- return new Scaffold(
- appBar: new AppBar(title: new Text('Chips')),
- body: new Block(
- children: chips.map((Widget widget) {
- return new Container(
- height: 100.0,
- child: new Center(child: widget)
- );
- }).toList()
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/colors_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/colors_demo.dart
deleted file mode 100644
index 471b34913d..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/colors_demo.dart
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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:flutter/widgets.dart';
-
-const double kColorItemHeight = 48.0;
-
-class ColorSwatch {
- const ColorSwatch({ this.name, this.colors, this.accentColors, this.threshold: 900});
-
- final String name;
- final Map colors;
- final Map accentColors;
- final int threshold; // titles for indices > threshold are white, otherwise black
-
- bool get isValid => this.name != null && this.colors != null && threshold != null;
-}
-
-const List colorSwatches = const [
- const ColorSwatch(name: 'RED', colors: Colors.red, accentColors: Colors.redAccent, threshold: 300),
- const ColorSwatch(name: 'PINK', colors: Colors.pink, accentColors: Colors.pinkAccent, threshold: 200),
- const ColorSwatch(name: 'PURPLE', colors: Colors.purple, accentColors: Colors.purpleAccent, threshold: 200),
- const ColorSwatch(name: 'DEEP PURPLE', colors: Colors.deepPurple, accentColors: Colors.deepPurpleAccent, threshold: 200),
- const ColorSwatch(name: 'INDIGO', colors: Colors.indigo, accentColors: Colors.indigoAccent, threshold: 200),
- const ColorSwatch(name: 'BLUE', colors: Colors.blue, accentColors: Colors.blueAccent, threshold: 400),
- const ColorSwatch(name: 'LIGHT BLUE', colors: Colors.lightBlue, accentColors: Colors.lightBlueAccent, threshold: 500),
- const ColorSwatch(name: 'CYAN', colors: Colors.cyan, accentColors: Colors.cyanAccent, threshold: 600),
- const ColorSwatch(name: 'TEAL', colors: Colors.teal, accentColors: Colors.tealAccent, threshold: 400),
- const ColorSwatch(name: 'GREEN', colors: Colors.green, accentColors: Colors.greenAccent, threshold: 500),
- const ColorSwatch(name: 'LIGHT GREEN', colors: Colors.lightGreen, accentColors: Colors.lightGreenAccent, threshold: 600),
- const ColorSwatch(name: 'LIME', colors: Colors.lime, accentColors: Colors.limeAccent, threshold: 800),
- const ColorSwatch(name: 'YELLOW', colors: Colors.yellow, accentColors: Colors.yellowAccent),
- const ColorSwatch(name: 'AMBER', colors: Colors.amber, accentColors: Colors.amberAccent),
- const ColorSwatch(name: 'ORANGE', colors: Colors.orange, accentColors: Colors.orangeAccent, threshold: 700),
- const ColorSwatch(name: 'DEEP ORANGE', colors: Colors.deepOrange, accentColors: Colors.deepOrangeAccent, threshold: 400),
- const ColorSwatch(name: 'BROWN', colors: Colors.brown, threshold: 200),
- const ColorSwatch(name: 'GREY', colors: Colors.grey, threshold: 500),
- const ColorSwatch(name: 'BLUE GREY', colors: Colors.blueGrey, threshold: 500)
-];
-
-
-class ColorItem extends StatelessWidget {
- ColorItem({ Key key, this.index, this.color, this.prefix: '' }) : super(key: key) {
- assert(index != null);
- assert(color != null);
- assert(prefix != null);
- }
-
- final int index;
- final Color color;
- final String prefix;
-
- String colorString() => "#${color.value.toRadixString(16).padLeft(8, '0').toUpperCase()}";
-
- @override
- Widget build(BuildContext context) {
- return new Container(
- height: kColorItemHeight,
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
- decoration: new BoxDecoration(backgroundColor: color),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- new Text('$prefix$index'),
- new Text(colorString())
- ]
- )
- );
- }
-}
-
-class ColorSwatchTabView extends StatelessWidget {
- ColorSwatchTabView({ Key key, this.swatch }) : super(key: key) {
- assert(swatch != null && swatch.isValid);
- }
-
- final ColorSwatch swatch;
- final TextStyle blackTextStyle = Typography.black.body1;
- final TextStyle whiteTextStyle = Typography.white.body1;
-
- @override
- Widget build(BuildContext context) {
- List colorItems = swatch.colors.keys.map((int index) {
- return new DefaultTextStyle(
- style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
- child: new ColorItem(index: index, color: swatch.colors[index])
- );
- })
- .toList();
-
- if (swatch.accentColors != null) {
- colorItems.addAll(swatch.accentColors.keys.map((int index) {
- return new DefaultTextStyle(
- style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
- child: new ColorItem(index: index, color: swatch.accentColors[index], prefix: 'A')
- );
- })
- .toList());
- }
-
- return new ScrollableList(
- itemExtent: kColorItemHeight,
- children: colorItems
- );
- }
-}
-
-class ColorsDemo extends StatelessWidget {
- static const String routeName = '/colors';
-
- @override
- Widget build(BuildContext context) {
- return new TabBarSelection(
- values: colorSwatches,
- child: new Scaffold(
- appBar: new AppBar(
- elevation: 0,
- title: new Text('Colors'),
- tabBar: new TabBar(
- isScrollable: true,
- labels: new Map.fromIterable(colorSwatches, value: (ColorSwatch swatch) {
- return new TabLabel(text: swatch.name);
- })
- )
- ),
- body: new TabBarView(
- children: colorSwatches.map((ColorSwatch swatch) {
- return new ColorSwatchTabView(swatch: swatch);
- })
- .toList()
- )
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/data_table_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/data_table_demo.dart
deleted file mode 100644
index 2b6a0a325e..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/data_table_demo.dart
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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:flutter/rendering.dart';
-
-class Desert {
- Desert(this.name, this.calories, this.fat, this.carbs, this.protein, this.sodium, this.calcium, this.iron);
- final String name;
- final int calories;
- final double fat;
- final int carbs;
- final double protein;
- final int sodium;
- final int calcium;
- final int iron;
-
- bool selected = false;
-}
-
-class DataTableDemo extends StatefulWidget {
- static const String routeName = '/data-table';
-
- @override
- _DataTableDemoState createState() => new _DataTableDemoState();
-}
-
-class _DataTableDemoState extends State {
-
- int _sortColumnIndex;
- bool _sortAscending = true;
-
- final List _deserts = [
- new Desert('Frozen yogurt', 159, 6.0, 24, 4.0, 87, 14, 1),
- new Desert('Ice cream sandwich', 237, 9.0, 37, 4.3, 129, 8, 1),
- new Desert('Eclair', 262, 16.0, 24, 6.0, 337, 6, 7),
- new Desert('Cupcake', 305, 3.7, 67, 4.3, 413, 3, 8),
- new Desert('Gingerbread', 356, 16.0, 49, 3.9, 327, 7, 16),
- new Desert('Jelly bean', 375, 0.0, 94, 0.0, 50, 0, 0),
- new Desert('Lollipop', 392, 0.2, 98, 0.0, 38, 0, 2),
- new Desert('Honeycomb', 408, 3.2, 87, 6.5, 562, 0, 45),
- new Desert('Donut', 452, 25.0, 51, 4.9, 326, 2, 22),
- new Desert('KitKat', 518, 26.0, 65, 7.0, 54, 12, 6),
- ];
-
- void _sort/**/(Comparable getField(Desert d), int columnIndex, bool ascending) {
- setState(() {
- _deserts.sort((Desert a, Desert b) {
- if (!ascending) {
- final Desert c = a;
- a = b;
- b = c;
- }
- final Comparable aValue = getField(a);
- final Comparable bValue = getField(b);
- return Comparable.compare(aValue, bValue);
- });
- _sortColumnIndex = columnIndex;
- _sortAscending = ascending;
- });
- }
-
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(title: new Text('Data tables')),
- body: new Block(
- children: [
- new Material(
- child: new IntrinsicHeight(
- child: new Block(
- scrollDirection: Axis.horizontal,
- children: [
- new DataTable(
- sortColumnIndex: _sortColumnIndex,
- sortAscending: _sortAscending,
- columns: [
- new DataColumn(
- label: new Text('Dessert (100g serving)'),
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.name, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Calories'),
- tooltip: 'The total amount of food energy in the given serving size.',
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.calories, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Fat (g)'),
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.fat, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Carbs (g)'),
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.carbs, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Protein (g)'),
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.protein, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Sodium (mg)'),
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.sodium, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Calcium (%)'),
- tooltip: 'The amount of calcium as a percentage of the recommended daily amount.',
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.calcium, columnIndex, ascending)
- ),
- new DataColumn(
- label: new Text('Iron (%)'),
- numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.iron, columnIndex, ascending)
- ),
- ],
- rows: _deserts.map/**/((Desert desert) {
- return new DataRow(
- key: new ValueKey(desert),
- selected: desert.selected,
- onSelectChanged: (bool selected) { setState(() { desert.selected = selected; }); },
- cells: [
- new DataCell(new Text('${desert.name}')),
- new DataCell(new Text('${desert.calories}')),
- new DataCell(new Text('${desert.fat.toStringAsFixed(1)}')),
- new DataCell(new Text('${desert.carbs}')),
- new DataCell(new Text('${desert.protein.toStringAsFixed(1)}')),
- new DataCell(new Text('${desert.sodium}')),
- new DataCell(new Text('${desert.calcium}%')),
- new DataCell(new Text('${desert.iron}%')),
- ]
- );
- }).toList(growable: false)
- )
- ]
- )
- )
- )
- ]
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/date_picker_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/date_picker_demo.dart
deleted file mode 100644
index 7244a2acd1..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/date_picker_demo.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:flutter/material.dart';
-import 'package:intl/intl.dart';
-
-class DatePickerDemo extends StatefulWidget {
- static const String routeName = '/date-picker';
-
- @override
- _DatePickerDemoState createState() => new _DatePickerDemoState();
-}
-
-class _DatePickerDemoState extends State {
- DateTime _selectedDate = new DateTime.now();
-
- Future _handleSelectDate() async {
- DateTime picked = await showDatePicker(
- context: context,
- initialDate: _selectedDate,
- firstDate: new DateTime(2015, 8),
- lastDate: new DateTime(2101)
- );
- if (picked != _selectedDate) {
- setState(() {
- _selectedDate = picked;
- });
- }
- }
-
- @override
- Widget build(BuildContext context) {
- return
- new Scaffold(
- appBar: new AppBar(title: new Text('Date picker')),
- body: new Column(
- children: [
- new Text(new DateFormat.yMMMd().format(_selectedDate)),
- new SizedBox(height: 20.0),
- new RaisedButton(
- onPressed: _handleSelectDate,
- child: new Text('SELECT DATE')
- ),
- ],
- mainAxisAlignment: MainAxisAlignment.center
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/dialog_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/dialog_demo.dart
deleted file mode 100644
index f514a82ad0..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/dialog_demo.dart
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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:flutter/widgets.dart';
-
-import 'full_screen_dialog_demo.dart';
-
-enum DialogDemoAction {
- cancel,
- discard,
- disagree,
- agree,
-}
-
-const String _alertWithoutTitleText = "Discard draft?";
-
-const String _alertWithTitleText =
- "Let Google help apps determine location. This means sending anyonmous location "
- "data to Google, even when no apps are running.";
-
-class DialogDemoItem extends StatelessWidget {
- DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key);
-
- final IconData icon;
- final Color color;
- final String text;
- final VoidCallback onPressed;
-
- @override
- Widget build(BuildContext context) {
- return new InkWell(
- onTap: onPressed,
- child: new Padding(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- new Icon(
- size: 36.0,
- icon: icon,
- color: color
- ),
- new Padding(
- padding: const EdgeInsets.only(left: 16.0),
- child: new Text(text)
- )
- ]
- )
- )
- );
- }
-}
-
-class DialogDemo extends StatefulWidget {
- static const String routeName = '/dialog';
-
- @override
- DialogDemoState createState() => new DialogDemoState();
-}
-
-class DialogDemoState extends State {
- final GlobalKey _scaffoldKey = new GlobalKey();
-
- void showDemoDialog/**/({ BuildContext context, Dialog dialog }) {
- showDialog/**/(
- context: context,
- child: dialog
- )
- .then((dynamic/*=T*/ value) { // The value passed to Navigator.pop() or null.
- if (value != null) {
- _scaffoldKey.currentState.showSnackBar(new SnackBar(
- content: new Text('You selected: $value')
- ));
- }
- });
- }
-
- @override
- Widget build(BuildContext context) {
- final ThemeData theme = Theme.of(context);
- final TextStyle dialogTextStyle = theme.textTheme.subhead.copyWith(color: theme.textTheme.caption.color);
-
- return new Scaffold(
- key: _scaffoldKey,
- appBar: new AppBar(
- title: new Text('Dialogs')
- ),
- body: new Block(
- padding: const EdgeInsets.symmetric(vertical: 24.0, horizontal: 72.0),
- children: [
- new RaisedButton(
- child: new Text('ALERT'),
- onPressed: () {
- showDemoDialog/**/(
- context: context,
- dialog: new Dialog(
- content: new Text(
- _alertWithoutTitleText,
- style: dialogTextStyle
- ),
- actions: [
- new FlatButton(
- child: new Text('CANCEL'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); }
- ),
- new FlatButton(
- child: new Text('DISCARD'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.discard); }
- )
- ]
- )
- );
- }
- ),
- new RaisedButton(
- child: new Text('ALERT WITH TITLE'),
- onPressed: () {
- showDemoDialog/**/(
- context: context,
- dialog: new Dialog(
- title: new Text('Use Google\'s location service?'),
- content: new Text(
- _alertWithTitleText,
- style: dialogTextStyle
- ),
- actions: [
- new FlatButton(
- child: new Text('DISAGREE'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.disagree); }
- ),
- new FlatButton(
- child: new Text('AGREE'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.agree); }
- )
- ]
- )
- );
- }
- ),
- new RaisedButton(
- child: new Text('SIMPLE'),
- onPressed: () {
- showDemoDialog/**/(
- context: context,
- dialog: new Dialog(
- title: new Text('Set backup account'),
- content: new Column(
- children: [
- new DialogDemoItem(
- icon: Icons.account_circle,
- color: theme.primaryColor,
- text: 'username@gmail.com',
- onPressed: () { Navigator.pop(context, 'username@gmail.com'); }
- ),
- new DialogDemoItem(
- icon: Icons.account_circle,
- color: theme.primaryColor,
- text: 'user02@gmail.com',
- onPressed: () { Navigator.pop(context, 'user02@gmail.com'); }
- ),
- new DialogDemoItem(
- icon: Icons.add_circle,
- text: 'add account',
- color: theme.disabledColor
- )
- ]
- )
- )
- );
- }
- ),
- new RaisedButton(
- child: new Text('CONFIRMATION'),
- onPressed: () {
- showTimePicker(
- context: context,
- initialTime: const TimeOfDay(hour: 15, minute: 30)
- )
- .then((TimeOfDay value) { // The value passed to Navigator.pop() or null.
- if (value != null) {
- _scaffoldKey.currentState.showSnackBar(new SnackBar(
- content: new Text('You selected: $value')
- ));
- }
- });
- }
- ),
- new RaisedButton(
- child: new Text('FULLSCREEN'),
- onPressed: () {
- Navigator.push(context, new MaterialPageRoute(
- builder: (BuildContext context) => new FullScreenDialogDemo()
- ));
- }
- )
- ]
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/drawing_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/drawing_demo.dart
deleted file mode 100644
index 9774d52f07..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/drawing_demo.dart
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-
-import 'package:flutter_sprites/flutter_sprites.dart';
-
-class DrawingDemo extends StatefulWidget {
- static const String routeName = '/drawing';
-
- @override
- _DrawingDemoState createState() => new _DrawingDemoState();
-}
-
-class _DrawingDemoState extends State {
- _LineDrawingNode _rootNode;
- ImageMap _images;
-
- Future _loadAssets(AssetBundle bundle) async {
- _images = new ImageMap(bundle);
- await _images.load([
- 'packages/flutter_gallery_assets/fancylines.png'
- ]);
- }
-
- @override
- void initState() {
- super.initState();
- _loadAssets(DefaultAssetBundle.of(context)).then((_) {
- setState(() {
- _rootNode = new _LineDrawingNode(_images);
- });
- });
- }
-
- @override
- Widget build(BuildContext context) {
- Widget body;
- if (_rootNode == null) {
- body = new Center(
- child: new CircularProgressIndicator()
- );
- } else {
- body = new SpriteWidget(_rootNode, SpriteBoxTransformMode.nativePoints);
- }
-
- return new Scaffold(
- appBar: new AppBar(
- title: new Text('Fancy lines')
- ),
- body: body
- );
- }
-}
-
-class _LineDrawingNode extends NodeWithSize {
- _LineDrawingNode(this._images) : super(const Size(1024.0, 1024.0)) {
- userInteractionEnabled = true;
- }
-
- final ImageMap _images;
- EffectLine _currentLine;
-
- @override
- bool handleEvent(SpriteBoxEvent event) {
- if (event.type == PointerDownEvent) {
- _currentLine = new EffectLine(
- texture: new Texture(_images['packages/flutter_gallery_assets/fancylines.png']),
- colorSequence: new ColorSequence.fromStartAndEndColor(Colors.purple[500], Colors.purple[600]),
- fadeAfterDelay: 3.0,
- fadeDuration: 1.0
- );
- _currentLine.addPoint(event.boxPosition);
- addChild(_currentLine);
- } else if (event.type == PointerMoveEvent) {
- _currentLine.addPoint(event.boxPosition);
- }
-
- return true;
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/drop_down_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/drop_down_demo.dart
deleted file mode 100644
index eeaa119434..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/drop_down_demo.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 The Chromium Authors. 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';
-
-class DropDownDemo extends StatefulWidget {
- static const String routeName = '/dropdown';
-
- @override
- _DropDownDemoState createState() => new _DropDownDemoState();
-}
-
-class _DropDownDemoState extends State {
- String _value = "Free";
-
- List> buildItems() {
- return ["One", "Two", "Free", "Four"].map((String value) {
- return new DropDownMenuItem(value: value, child: new Text(value));
- })
- .toList();
- }
-
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(title: new Text('Drop-down button')),
- body: new Center(
- child: new DropDownButton(
- items: buildItems(),
- value: _value,
- onChanged: (String newValue) {
- setState(() {
- if (newValue != null)
- _value = newValue;
- });
- }
- )
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/fitness_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/fitness_demo.dart
deleted file mode 100644
index 45cc3bac1f..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/fitness_demo.dart
+++ /dev/null
@@ -1,589 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:math' as math;
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter_sprites/flutter_sprites.dart';
-
-ImageMap _images;
-SpriteSheet _sprites;
-
-class FitnessDemo extends StatelessWidget {
- FitnessDemo({ Key key }) : super(key: key);
-
- static const String routeName = '/fitness';
-
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(
- title: new Text('Fitness')
- ),
- body: new _FitnessDemoContents()
- );
- }
-}
-
-class _FitnessDemoContents extends StatefulWidget {
- _FitnessDemoContents({ Key key }) : super(key: key);
-
- @override
- _FitnessDemoContentsState createState() => new _FitnessDemoContentsState();
-}
-
-class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
-
- Future _loadAssets(AssetBundle bundle) async {
- _images = new ImageMap(bundle);
- await _images.load([
- 'packages/flutter_gallery_assets/jumpingjack.png',
- ]);
-
- String json = await DefaultAssetBundle.of(context).loadString('packages/flutter_gallery_assets/jumpingjack.json');
- _sprites = new SpriteSheet(_images['packages/flutter_gallery_assets/jumpingjack.png'], json);
- }
-
- @override
- void initState() {
- super.initState();
-
- AssetBundle bundle = DefaultAssetBundle.of(context);
- _loadAssets(bundle).then((_) {
- setState(() {
- _assetsLoaded = true;
- workoutAnimation = new _WorkoutAnimationNode(
- onPerformedJumpingJack: () {
- setState(() {
- _count += 1;
- });
- },
- onSecondPassed: (int seconds) {
- setState(() {
- _time = seconds;
- });
- }
- );
- });
- });
- }
-
- bool _assetsLoaded = false;
- int _count = 0;
- int _time = 0;
- int get kcal => (_count * 0.2).toInt();
-
- _WorkoutAnimationNode workoutAnimation;
-
- @override
- Widget build(BuildContext context) {
- if (!_assetsLoaded)
- return new Container();
-
- Color buttonColor;
- String buttonText;
- VoidCallback onButtonPressed;
-
- if (workoutAnimation.workingOut) {
- buttonColor = Colors.red[500];
- buttonText = "STOP WORKOUT";
- onButtonPressed = endWorkout;
- } else {
- buttonColor = Theme.of(context).primaryColor;
- buttonText = "START WORKOUT";
- onButtonPressed = startWorkout;
- }
-
- return new Material(
- child: new Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- new Flexible(
- child: new Container(
- decoration: new BoxDecoration(backgroundColor: Colors.grey[800]),
- child: new SpriteWidget(workoutAnimation, SpriteBoxTransformMode.scaleToFit)
- )
- ),
- new Padding(
- padding: new EdgeInsets.only(top: 20.0),
- child: new Text('JUMPING JACKS', style: Theme.of(context).textTheme.title)
- ),
- new Padding(
- padding: new EdgeInsets.only(top: 20.0, bottom: 20.0),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- _createInfoPanelCell(Icons.accessibility, '$_count', 'COUNT'),
- _createInfoPanelCell(Icons.timer, _formatSeconds(_time), 'TIME'),
- _createInfoPanelCell(Icons.flash_on, '$kcal', 'KCAL')
- ]
- )
- ),
- new Padding(
- padding: new EdgeInsets.only(bottom: 16.0),
- child: new SizedBox(
- width: 300.0,
- height: 72.0,
- child: new RaisedButton (
- onPressed: onButtonPressed,
- color: buttonColor,
- child: new Text(
- buttonText,
- style: new TextStyle(color: Colors.white, fontSize: 20.0)
- )
- )
- )
- )
- ]
- )
- );
- }
-
- Widget _createInfoPanelCell(IconData icon, String value, String description) {
- Color color;
- if (workoutAnimation.workingOut)
- color = Colors.black87;
- else
- color = Theme.of(context).disabledColor;
-
- return new Container(
- width: 100.0,
- child: new Center(
- child: new Column(
- children: [
- new Icon(icon: icon, size: 48.0, color: color),
- new Text(value, style: new TextStyle(fontSize: 24.0, color: color)),
- new Text(description, style: new TextStyle(color: color))
- ]
- )
- )
- );
- }
-
- String _formatSeconds(int seconds) {
- int minutes = seconds ~/ 60;
- String secondsStr = "${seconds % 60}".padLeft(2, "0");
- return "$minutes:$secondsStr";
- }
-
- void startWorkout() {
- setState(() {
- _count = 0;
- _time = 0;
- workoutAnimation.start();
- });
- }
-
- void endWorkout() {
- setState(() {
- workoutAnimation.stop();
-
- if (_count >= 3) {
- showDialog(
- context: context,
- child: new Stack(children: [
- new _Fireworks(),
- new Dialog(
- title: new Text('Awesome workout'),
- content: new Text('You have completed $_count jumping jacks. Good going!'),
- actions: [
- new FlatButton(
- child: new Text('SWEET'),
- onPressed: () { Navigator.pop(context); }
- )
- ]
- )
- ])
- );
- }
- });
- }
-}
-
-typedef void _SecondPassedCallback(int seconds);
-
-class _WorkoutAnimationNode extends NodeWithSize {
- _WorkoutAnimationNode({
- this.onPerformedJumpingJack,
- this.onSecondPassed
- }) : super(const Size(1024.0, 1024.0)) {
- reset();
-
- _progress = new _ProgressCircle(const Size(800.0, 800.0));
- _progress.pivot = const Point(0.5, 0.5);
- _progress.position = const Point(512.0, 512.0);
- addChild(_progress);
-
- _jumpingJack = new _JumpingJack((){
- onPerformedJumpingJack();
- });
- _jumpingJack.scale = 0.5;
- _jumpingJack.position = const Point(512.0, 550.0);
- addChild(_jumpingJack);
- }
-
- final VoidCallback onPerformedJumpingJack;
- final _SecondPassedCallback onSecondPassed;
-
- int seconds;
-
- bool workingOut;
-
- static const int _kTargetMillis = 1000 * 30;
- int _startTimeMillis;
- _ProgressCircle _progress;
- _JumpingJack _jumpingJack;
-
- void reset() {
- seconds = 0;
- workingOut = false;
- }
-
- void start() {
- reset();
- _startTimeMillis = new DateTime.now().millisecondsSinceEpoch;
- workingOut = true;
- _jumpingJack.animateJumping();
- }
-
- void stop() {
- workingOut = false;
- _jumpingJack.neutralPose();
- }
-
- @override
- void update(double dt) {
- if (workingOut) {
- int millis = new DateTime.now().millisecondsSinceEpoch - _startTimeMillis;
- int newSeconds = (millis) ~/ 1000;
- if (newSeconds != seconds) {
- seconds = newSeconds;
- onSecondPassed(seconds);
- }
-
- _progress.value = millis / _kTargetMillis;
- } else {
- _progress.value = 0.0;
- }
- }
-}
-
-class _ProgressCircle extends NodeWithSize {
- _ProgressCircle(Size size, [this.value = 0.0]) : super(size);
-
- static const double _kTwoPI = math.PI * 2.0;
- static const double _kEpsilon = .0000001;
- static const double _kSweep = _kTwoPI - _kEpsilon;
-
- double value;
-
- @override
- void paint(Canvas canvas) {
- applyTransformForPivot(canvas);
-
- Paint circlePaint = new Paint()
- ..color = Colors.white30
- ..strokeWidth = 24.0
- ..style = PaintingStyle.stroke;
-
- canvas.drawCircle(
- new Point(size.width / 2.0, size.height / 2.0),
- size.width / 2.0,
- circlePaint
- );
-
- Paint pathPaint = new Paint()
- ..color = Colors.purple[500]
- ..strokeWidth = 25.0
- ..style = PaintingStyle.stroke;
-
- double angle = value.clamp(0.0, 1.0) * _kSweep;
- Path path = new Path()
- ..arcTo(Point.origin & size, -math.PI / 2.0, angle, false);
- canvas.drawPath(path, pathPaint);
- }
-}
-
-class _JumpingJack extends Node {
- _JumpingJack(VoidCallback onPerformedJumpingJack) {
- left = new _JumpingJackSide(false, onPerformedJumpingJack);
- right = new _JumpingJackSide(true, null);
- addChild(left);
- addChild(right);
- }
-
- void animateJumping() {
- left.animateJumping();
- right.animateJumping();
- }
-
- void neutralPose() {
- left.neutralPosition(true);
- right.neutralPosition(true);
- }
-
- _JumpingJackSide left;
- _JumpingJackSide right;
-}
-
-class _JumpingJackSide extends Node {
- _JumpingJackSide(bool right, this.onPerformedJumpingJack) {
- // Torso and head
- torso = _createPart('torso.png', const Point(512.0, 512.0));
- addChild(torso);
-
- head = _createPart('head.png', const Point(512.0, 160.0));
- torso.addChild(head);
-
- if (right) {
- torso.opacity = 0.0;
- head.opacity = 0.0;
- torso.scaleX = -1.0;
- }
-
- // Left side movable parts
- upperArm = _createPart('upper-arm.png', const Point(445.0, 220.0));
- torso.addChild(upperArm);
- lowerArm = _createPart('lower-arm.png', const Point(306.0, 200.0));
- upperArm.addChild(lowerArm);
- hand = _createPart('hand.png', const Point(215.0, 127.0));
- lowerArm.addChild(hand);
- upperLeg = _createPart('upper-leg.png', const Point(467.0, 492.0));
- torso.addChild(upperLeg);
- lowerLeg = _createPart('lower-leg.png', const Point(404.0, 660.0));
- upperLeg.addChild(lowerLeg);
- foot = _createPart('foot.png', const Point(380.0, 835.0));
- lowerLeg.addChild(foot);
-
- torso.setPivotAndPosition(Point.origin);
-
- neutralPosition(false);
- }
-
- _JumpingJackPart torso;
- _JumpingJackPart head;
- _JumpingJackPart upperArm;
- _JumpingJackPart lowerArm;
- _JumpingJackPart hand;
- _JumpingJackPart lowerLeg;
- _JumpingJackPart upperLeg;
- _JumpingJackPart foot;
-
- final VoidCallback onPerformedJumpingJack;
-
- _JumpingJackPart _createPart(String textureName, Point pivotPosition) {
- return new _JumpingJackPart(_sprites[textureName], pivotPosition);
- }
-
- void animateJumping() {
- actions.stopAll();
- actions.run(new ActionSequence([
- _createPoseAction(null, 0, 0.5),
- new ActionCallFunction(_animateJumpingLoop)
- ]));
- }
-
- void _animateJumpingLoop() {
- actions.run(new ActionRepeatForever(
- new ActionSequence([
- _createPoseAction(0, 1, 0.30),
- _createPoseAction(1, 2, 0.30),
- _createPoseAction(2, 1, 0.30),
- _createPoseAction(1, 0, 0.30),
- new ActionCallFunction(() {
- if (onPerformedJumpingJack != null)
- onPerformedJumpingJack();
- })
- ])
- ));
- }
-
- void neutralPosition(bool animate) {
- actions.stopAll();
- if (animate) {
- actions.run(_createPoseAction(null, 1, 0.5));
- } else {
- List d = _dataForPose(1);
- upperArm.rotation = d[0];
- lowerArm.rotation = d[1];
- hand.rotation = d[2];
- upperLeg.rotation = d[3];
- lowerLeg.rotation = d[4];
- foot.rotation = d[5];
- torso.position = new Point(0.0, d[6]);
- }
- }
-
- ActionInterval _createPoseAction(int startPose, int endPose, double duration) {
- List d0 = _dataForPose(startPose);
- List d1 = _dataForPose(endPose);
-
- List tweens = [
- _tweenRotation(upperArm, d0[0], d1[0], duration),
- _tweenRotation(lowerArm, d0[1], d1[1], duration),
- _tweenRotation(hand, d0[2], d1[2], duration),
- _tweenRotation(upperLeg, d0[3], d1[3], duration),
- _tweenRotation(lowerLeg, d0[4], d1[4], duration),
- _tweenRotation(foot, d0[5], d1[5], duration),
- new ActionTween(
- (Point a) => torso.position = a,
- new Point(0.0, d0[6]),
- new Point(0.0, d1[6]),
- duration
- )
- ];
-
- return new ActionGroup(tweens);
- }
-
- ActionTween _tweenRotation(_JumpingJackPart part, double r0, double r1, double duration) {
- return new ActionTween(
- (double a) => part.rotation = a,
- r0,
- r1,
- duration
- );
- }
-
- List _dataForPose(int pose) {
- if (pose == null)
- return _dataForCurrentPose();
-
- if (pose == 0) {
- return [
- -80.0, // Upper arm rotation
- -30.0, // Lower arm rotation
- -10.0, // Hand rotation
- -15.0, // Upper leg rotation
- 5.0, // Lower leg rotation
- 15.0, // Foot rotation
- 0.0 // Torso y offset
- ];
- } else if (pose == 1) {
- return [
- 0.0,
- 0.0,
- 0.0,
- 0.0,
- 0.0,
- 0.0,
- -70.0
- ];
- } else {
- return [
- 40.0,
- 30.0,
- 10.0,
- 20.0,
- -20.0,
- 15.0,
- 40.0
- ];
- }
- }
-
- List _dataForCurrentPose() {
- return [
- upperArm.rotation,
- lowerArm.rotation,
- hand.rotation,
- upperLeg.rotation,
- lowerLeg.rotation,
- foot.rotation,
- torso.position.y
- ];
- }
-}
-
-class _JumpingJackPart extends Sprite {
- _JumpingJackPart(Texture texture, this.pivotPosition) : super(texture);
- final Point pivotPosition;
-
- void setPivotAndPosition(Point newPosition) {
- pivot = new Point(pivotPosition.x / 1024.0, pivotPosition.y / 1024.0);
- position = newPosition;
-
- for (Node child in children) {
- _JumpingJackPart subPart = child;
- subPart.setPivotAndPosition(
- new Point(
- subPart.pivotPosition.x - pivotPosition.x,
- subPart.pivotPosition.y - pivotPosition.y
- )
- );
- }
- }
-}
-
-class _Fireworks extends StatefulWidget {
- _Fireworks({ Key key }) : super(key: key);
-
- @override
- _FireworksState createState() => new _FireworksState();
-}
-
-class _FireworksState extends State<_Fireworks> {
- @override
- void initState() {
- super.initState();
- fireworks = new _FireworksNode();
- }
-
- _FireworksNode fireworks;
-
- @override
- Widget build(BuildContext context) {
- return new SpriteWidget(fireworks);
- }
-}
-
-class _FireworksNode extends NodeWithSize {
- _FireworksNode() : super(const Size(1024.0, 1024.0));
- double _countDown = 0.0;
-
- @override
- void update(double dt) {
- if (_countDown <= 0.0) {
- _addExplosion();
- _countDown = randomDouble();
- }
-
- _countDown -= dt;
- }
-
- Color _randomExplosionColor() {
- double rand = randomDouble();
- if (rand < 0.25)
- return Colors.pink[200];
- else if (rand < 0.5)
- return Colors.lightBlue[200];
- else if (rand < 0.75)
- return Colors.purple[200];
- else
- return Colors.cyan[200];
- }
-
- void _addExplosion() {
- Color startColor = _randomExplosionColor();
- Color endColor = startColor.withAlpha(0);
-
- ParticleSystem system = new ParticleSystem(
- _sprites['particle-0.png'],
- numParticlesToEmit: 100,
- emissionRate: 1000.0,
- rotateToMovement: true,
- startRotation: 90.0,
- endRotation: 90.0,
- speed: 100.0,
- speedVar: 50.0,
- startSize: 1.0,
- startSizeVar: 0.5,
- gravity: const Offset(0.0, 30.0),
- colorSequence: new ColorSequence.fromStartAndEndColor(startColor, endColor)
- );
- system.position = new Point(randomDouble() * 1024.0, randomDouble() * 1024.0);
- addChild(system);
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/flexible_space_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/flexible_space_demo.dart
deleted file mode 100644
index d63b082144..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/flexible_space_demo.dart
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2015 The Chromium Authors. 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:flutter/widgets.dart';
-
-class _ContactCategory extends StatelessWidget {
- _ContactCategory({ Key key, this.icon, this.children }) : super(key: key);
-
- final IconData icon;
- final List children;
-
- @override
- Widget build(BuildContext context) {
- return new Container(
- padding: const EdgeInsets.symmetric(vertical: 16.0),
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: Theme.of(context).dividerColor))
- ),
- child: new DefaultTextStyle(
- style: Theme.of(context).textTheme.subhead,
- child: new Row(
- children: [
- new SizedBox(
- width: 72.0,
- child: new Icon(icon: icon, color: Theme.of(context).primaryColor)
- ),
- new Flexible(child: new Column(children: children))
- ]
- )
- )
- );
- }
-}
-
-class _ContactItem extends StatelessWidget {
- _ContactItem({ Key key, this.icon, this.lines }) : super(key: key) {
- assert(lines.length > 1);
- }
-
- final IconData icon;
- final List lines;
-
- @override
- Widget build(BuildContext context) {
- List columnChildren = lines.sublist(0, lines.length - 1).map((String line) => new Text(line)).toList();
- columnChildren.add(new Text(lines.last, style: Theme.of(context).textTheme.caption));
-
- List rowChildren = [
- new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: columnChildren
- )
- ];
- if (icon != null) {
- rowChildren.add(new SizedBox(
- width: 72.0,
- child: new Icon(icon: icon, color: Theme.of(context).disabledColor)
- ));
- }
- return new Padding(
- padding: const EdgeInsets.symmetric(vertical: 16.0),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: rowChildren
- )
- );
- }
-}
-
-class FlexibleSpaceDemo extends StatefulWidget {
- static const String routeName = '/flexible-space';
-
- @override
- FlexibleSpaceDemoState createState() => new FlexibleSpaceDemoState();
-}
-
-class FlexibleSpaceDemoState extends State {
- final GlobalKey _scaffoldKey = new GlobalKey();
- final double _appBarHeight = 256.0;
- AppBarBehavior _appBarBehavior = AppBarBehavior.scroll;
-
- @override
- Widget build(BuildContext context) {
- final double statusBarHeight = MediaQuery.of(context).padding.top;
- return new Theme(
- data: new ThemeData(
- brightness: ThemeBrightness.light,
- primarySwatch: Colors.indigo
- ),
- child: new Scaffold(
- key: _scaffoldKey,
- appBarBehavior: _appBarBehavior,
- appBar: new AppBar(
- expandedHeight: _appBarHeight,
- actions: [
- new IconButton(
- icon: Icons.create,
- tooltip: 'Search',
- onPressed: () {
- _scaffoldKey.currentState.showSnackBar(new SnackBar(
- content: new Text('Not supported.')
- ));
- }
- ),
- new PopupMenuButton(
- onSelected: (AppBarBehavior value) {
- setState(() {
- _appBarBehavior = value;
- });
- },
- itemBuilder: (BuildContext context) => >[
- new PopupMenuItem(
- value: AppBarBehavior.scroll,
- child: new Text('Toolbar scrolls away')
- ),
- new PopupMenuItem(
- value: AppBarBehavior.under,
- child: new Text('Toolbar stays put')
- )
- ]
- )
- ],
- flexibleSpace: new FlexibleSpaceBar(
- title : new Text('Ali Connors'),
- background: new AssetImage(
- name: 'packages/flutter_gallery_assets/ali_connors.png',
- fit: ImageFit.cover,
- height: _appBarHeight
- )
- )
- ),
- body: new Block(
- padding: new EdgeInsets.only(top: _appBarHeight + statusBarHeight),
- children: [
- new _ContactCategory(
- icon: Icons.call,
- children: [
- new _ContactItem(
- icon: Icons.message,
- lines: [
- '(650) 555-1234',
- 'Mobile'
- ]
- ),
- new _ContactItem(
- icon: Icons.message,
- lines: [
- '(323) 555-6789',
- 'Work'
- ]
- )
- ]
- ),
- new _ContactCategory(
- icon: Icons.email,
- children: [
- new _ContactItem(
- lines: [
- 'ali_connors@example.com',
- 'Personal'
- ]
- ),
- new _ContactItem(
- lines: [
- 'aliconnors@example.com',
- 'Work'
- ]
- )
- ]
- ),
- new _ContactCategory(
- icon: Icons.location_on,
- children: [
- new _ContactItem(
- lines: [
- '2000 Main Street',
- 'San Francisco, CA',
- 'Home'
- ]
- ),
- new _ContactItem(
- lines: [
- '1600 Amphitheater Parkway',
- 'Mountain View, CA',
- 'Work'
- ]
- ),
- new _ContactItem(
- lines: [
- '126 Severyns Ave',
- 'Mountain View, CA',
- 'Jet Travel'
- ]
- )
- ]
- )
- ]
- )
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/full_screen_dialog_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/full_screen_dialog_demo.dart
deleted file mode 100644
index ecb7889814..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/full_screen_dialog_demo.dart
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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:intl/intl.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/widgets.dart';
-
-// This demo is based on
-// https://www.google.com/design/spec/components/dialogs.html#dialogs-full-screen-dialogs
-
-enum DismissDialogAction {
- cancel,
- discard,
- save,
-}
-
-class DateTimeItem extends StatelessWidget {
- DateTimeItem({ Key key, DateTime dateTime, this.onChanged })
- : date = new DateTime(dateTime.year, dateTime.month, dateTime.day),
- time = new TimeOfDay(hour: dateTime.hour, minute: dateTime.minute),
- super(key: key) {
- assert(onChanged != null);
- }
-
- final DateTime date;
- final TimeOfDay time;
- final ValueChanged onChanged;
-
- @override
- Widget build(BuildContext context) {
- final ThemeData theme = Theme.of(context);
-
- return new DefaultTextStyle(
- style: theme.textTheme.subhead,
- child: new Row(
- children: [
- new Flexible(
- child: new Container(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: theme.dividerColor))
- ),
- child: new InkWell(
- onTap: () {
- showDatePicker(
- context: context,
- initialDate: date,
- firstDate: date.subtract(const Duration(days: 30)),
- lastDate: date.add(const Duration(days: 30))
- )
- .then((DateTime value) {
- onChanged(new DateTime(value.year, value.month, value.day, time.hour, time.minute));
- });
- },
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- new Text(new DateFormat('EEE, MMM d yyyy').format(date)),
- new Icon(icon: Icons.arrow_drop_down, color: Colors.black54),
- ]
- )
- )
- )
- ),
- new Container(
- margin: const EdgeInsets.only(left: 8.0),
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: theme.dividerColor))
- ),
- child: new InkWell(
- onTap: () {
- showTimePicker(
- context: context,
- initialTime: time
- )
- .then((TimeOfDay value) {
- onChanged(new DateTime(date.year, date.month, date.day, value.hour, value.minute));
- });
- },
- child: new Row(
- children: [
- new Text('$time'),
- new Icon(icon: Icons.arrow_drop_down, color: Colors.black54),
- ]
- )
- )
- )
- ]
- )
- );
- }
-}
-
-class FullScreenDialogDemo extends StatefulWidget {
- @override
- FullScreenDialogDemoState createState() => new FullScreenDialogDemoState();
-}
-
-class FullScreenDialogDemoState extends State {
- DateTime _fromDateTime = new DateTime.now();
- DateTime _toDateTime = new DateTime.now();
- bool _allDayValue = false;
- bool _saveNeeded = false;
-
- void handleDismissButton(BuildContext context) {
- if (!_saveNeeded) {
- Navigator.pop(context, null);
- return;
- }
-
- final ThemeData theme = Theme.of(context);
- final TextStyle dialogTextStyle = theme.textTheme.subhead.copyWith(color: theme.textTheme.caption.color);
-
- showDialog(
- context: context,
- child: new Dialog(
- content: new Text(
- 'Discard new event?',
- style: dialogTextStyle
- ),
- actions: [
- new FlatButton(
- child: new Text('CANCEL'),
- onPressed: () { Navigator.pop(context, DismissDialogAction.cancel); }
- ),
- new FlatButton(
- child: new Text('DISCARD'),
- onPressed: () {
- Navigator.openTransaction(context, (NavigatorTransaction transaction) {
- transaction.pop(DismissDialogAction.discard); // pop the cancel/discard dialog
- transaction.pop(null); // pop this route
- });
- }
- )
- ]
- )
- );
- }
-
- @override
- Widget build(BuildContext context) {
- final ThemeData theme = Theme.of(context);
-
- return new Scaffold(
- appBar: new AppBar(
- leading: new IconButton(
- icon: Icons.clear,
- onPressed: () { handleDismissButton(context); }
- ),
- title: new Text('New event'),
- actions: [
- new FlatButton(
- child: new Text('SAVE', style: theme.textTheme.body1.copyWith(color: Colors.white)),
- onPressed: () {
- Navigator.pop(context, DismissDialogAction.save);
- }
- )
- ]
- ),
- body: new Block(
- padding: const EdgeInsets.all(16.0),
- children: [
- new Container(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: theme.dividerColor))
- ),
- child: new Align(
- alignment: FractionalOffset.bottomLeft,
- child: new Text('Event name', style: theme.textTheme.display2)
- )
- ),
- new Container(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: theme.dividerColor))
- ),
- child: new Align(
- alignment: FractionalOffset.bottomLeft,
- child: new Text('Location', style: theme.textTheme.title.copyWith(color: Colors.black54))
- )
- ),
- new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- new Text('From', style: theme.textTheme.caption),
- new DateTimeItem(
- dateTime: _fromDateTime,
- onChanged: (DateTime value) {
- setState(() {
- _fromDateTime = value;
- _saveNeeded = true;
- });
- }
- )
- ]
- ),
- new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- new Text('To', style: theme.textTheme.caption),
- new DateTimeItem(
- dateTime: _toDateTime,
- onChanged: (DateTime value) {
- setState(() {
- _toDateTime = value;
- _saveNeeded = true;
- });
- }
- )
- ]
- ),
- new Container(
- decoration: new BoxDecoration(
- border: new Border(bottom: new BorderSide(color: theme.dividerColor))
- ),
- child: new Row(
- children: [
- new Checkbox(
- value: _allDayValue,
- onChanged: (bool value) {
- setState(() {
- _allDayValue = value;
- _saveNeeded = true;
- });
- }
- ),
- new Text('All-day')
- ]
- )
- )
- ]
- .map((Widget child) {
- return new Container(
- padding: const EdgeInsets.symmetric(vertical: 8.0),
- height: 96.0,
- child: child
- );
- })
- .toList()
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/grid_list_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/grid_list_demo.dart
deleted file mode 100644
index 129be0913c..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/grid_list_demo.dart
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:flutter/material.dart';
-import 'package:flutter/widgets.dart';
-
-import '../gallery/demo.dart';
-
-const String _kExampleCode = 'gridlists';
-
-enum GridDemoTileStyle {
- imageOnly,
- oneLine,
- twoLine
-}
-
-class Photo {
- Photo({ this.assetName, this.title, this.caption, this.isFavorite: false });
-
- final String assetName;
- final String title;
- final String caption;
-
- bool isFavorite;
-
- bool get isValid => assetName != null && title != null && caption != null && isFavorite != null;
-}
-
-const String photoHeroTag = 'Photo';
-
-typedef void PhotoFavoriteCallback(Photo photo);
-
-class GridDemoPhotoItem extends StatelessWidget {
- GridDemoPhotoItem({
- Key key,
- this.photo,
- this.tileStyle,
- this.onPressedFavorite
- }) : super(key: key) {
- assert(photo != null && photo.isValid);
- assert(tileStyle != null);
- assert(onPressedFavorite != null);
- }
-
- final Photo photo;
- final GridDemoTileStyle tileStyle;
- final PhotoFavoriteCallback onPressedFavorite;
-
- void showPhoto(BuildContext context) {
- Key photoKey = new Key(photo.assetName);
- Set mostValuableKeys = new HashSet();
- mostValuableKeys.add(photoKey);
-
- Navigator.push(context, new MaterialPageRoute(
- settings: new RouteSettings(
- mostValuableKeys: mostValuableKeys
- ),
- builder: (BuildContext context) {
- return new Scaffold(
- appBar: new AppBar(
- title: new Text(photo.title)
- ),
- body: new Material(
- child: new Hero(
- tag: photoHeroTag,
- child: new AssetImage(
- name: photo.assetName,
- fit: ImageFit.cover
- )
- )
- )
- );
- }
- ));
- }
-
- @override
- Widget build(BuildContext context) {
- final Widget image = new GestureDetector(
- onTap: () { showPhoto(context); },
- child: new Hero(
- key: new Key(photo.assetName),
- tag: photoHeroTag,
- child: new AssetImage(
- name: photo.assetName,
- fit: ImageFit.cover
- )
- )
- );
-
- IconData icon = photo.isFavorite ? Icons.star : Icons.star_border;
-
- switch(tileStyle) {
- case GridDemoTileStyle.imageOnly:
- return image;
-
- case GridDemoTileStyle.oneLine:
- return new GridTile(
- header: new GridTileBar(
- backgroundColor: Colors.black45,
- leading: new IconButton(
- icon: icon,
- color: Colors.white,
- onPressed: () { onPressedFavorite(photo); }
- ),
- title: new Text(photo.title)
- ),
- child: image
- );
-
- case GridDemoTileStyle.twoLine:
- return new GridTile(
- footer: new GridTileBar(
- backgroundColor: Colors.black45,
- title: new Text(photo.title),
- subtitle: new Text(photo.caption),
- trailing: new IconButton(
- icon: icon,
- color: Colors.white,
- onPressed: () { onPressedFavorite(photo); }
- )
- ),
- child: image
- );
- }
- }
-}
-
-class GridListDemo extends StatefulWidget {
- GridListDemo({ Key key }) : super(key: key);
-
- static const String routeName = '/grid-list';
-
- @override
- GridListDemoState createState() => new GridListDemoState();
-}
-
-class GridListDemoState extends State {
- GridDemoTileStyle tileStyle = GridDemoTileStyle.twoLine;
-
- List photos = [
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_0.jpg',
- title: 'Philippines',
- caption: 'Batad rice terraces'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_1.jpg',
- title: 'Italy',
- caption: 'Ceresole Reale'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_2.jpg',
- title: 'Somewhere',
- caption: 'Beautiful mountains'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_3.jpg',
- title: 'A place',
- caption: 'Beautiful hills'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_4.jpg',
- title: 'New Zealand',
- caption: 'View from the van'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_5.jpg',
- title: 'Autumn',
- caption: 'The golden season'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_6.jpg',
- title: 'Germany',
- caption: 'Englischer Garten'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_7.jpg',
- title: 'A country',
- caption: 'Grass fields'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_8.jpg',
- title: 'Mountain country',
- caption: 'River forest'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_9.jpg',
- title: 'Alpine place',
- caption: 'Green hills'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_10.jpg',
- title: 'Desert land',
- caption: 'Blue skies'
- ),
- new Photo(
- assetName: 'packages/flutter_gallery_assets/landscape_11.jpg',
- title: 'Narnia',
- caption: 'Rocks and rivers'
- ),
- ];
-
- void showTileStyleMenu(BuildContext context) {
- final List> items = >[
- new PopupMenuItem(
- value: GridDemoTileStyle.imageOnly,
- child: new Text('Image only')
- ),
- new PopupMenuItem(
- value: GridDemoTileStyle.oneLine,
- child: new Text('One line')
- ),
- new PopupMenuItem(
- value: GridDemoTileStyle.twoLine,
- child: new Text('Two line')
- )
- ];
-
- final EdgeInsets padding = MediaQuery.of(context).padding;
- final RelativeRect position = new RelativeRect.fromLTRB(
- 0.0, padding.top + 16.0, padding.right + 16.0, 0.0
- );
-
- showMenu(context: context, position: position, items: items).then((GridDemoTileStyle value) {
- setState(() {
- tileStyle = value;
- });
- });
- }
-
- // When the ScrollableGrid first appears we want the last row to only be
- // partially visible, to help the user recognize that the grid is scrollable.
- // The GridListDemoGridDelegate's tileHeightFactor is used for this.
- @override
- Widget build(BuildContext context) {
- final Orientation orientation = MediaQuery.of(context).orientation;
- return new Scaffold(
- appBar: new AppBar(
- title: new Text('Grid list'),
- actions: [
- new IconButton(
- icon: Icons.more_vert,
- onPressed: () { showTileStyleMenu(context); },
- tooltip: 'Show menu'
- )
- ]
- ),
- body: new Column(
- children: [
- new Flexible(
- child: new ScrollableGrid(
- delegate: new FixedColumnCountGridDelegate(
- columnCount: (orientation == Orientation.portrait) ? 2 : 3,
- rowSpacing: 4.0,
- columnSpacing: 4.0,
- padding: const EdgeInsets.all(4.0),
- tileAspectRatio: (orientation == Orientation.portrait) ? 1.0 : 1.3
- ),
- children: photos.map((Photo photo) {
- return new GridDemoPhotoItem(
- photo: photo,
- tileStyle: tileStyle,
- onPressedFavorite: (Photo photo) {
- setState(() {
- photo.isFavorite = !photo.isFavorite;
- });
- }
- );
- })
- )
- ),
- new DemoBottomBar(
- exampleCodeTag: _kExampleCode
- )
- ]
- )
- );
- }
-}
diff --git a/examples/flutter_gallery/material_gallery/lib/demo/icons_demo.dart b/examples/flutter_gallery/material_gallery/lib/demo/icons_demo.dart
deleted file mode 100644
index b83ef8c542..0000000000
--- a/examples/flutter_gallery/material_gallery/lib/demo/icons_demo.dart
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright 2016 The Chromium Authors. 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';
-
-class IconsDemo extends StatefulWidget {
- static const String routeName = '/icons';
-
- @override
- IconsDemoState createState() => new IconsDemoState();
-}
-
-class IconsDemoState extends State {
- static final List