move the material_gallery/demos.dart script (#3582)

* move the material_gallery/demos.dart script

* rename all_demos.dart to all.dart
diff --git a/examples/material_gallery/lib/demo/all.dart b/examples/material_gallery/lib/demo/all.dart
new file mode 100644
index 0000000..a2c41f9
--- /dev/null
+++ b/examples/material_gallery/lib/demo/all.dart
@@ -0,0 +1,37 @@
+// 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/material_gallery/lib/demo/data_table_demo.dart b/examples/material_gallery/lib/demo/data_table_demo.dart
index 62a481f..14bb144 100644
--- a/examples/material_gallery/lib/demo/data_table_demo.dart
+++ b/examples/material_gallery/lib/demo/data_table_demo.dart
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-import 'package:flutter/rendering.dart';
 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);
diff --git a/examples/material_gallery/lib/demos.dart b/examples/material_gallery/lib/demos.dart
deleted file mode 100644
index 5d48384..0000000
--- a/examples/material_gallery/lib/demos.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 'demo/buttons_demo.dart';
-export 'demo/cards_demo.dart';
-export 'demo/colors_demo.dart';
-export 'demo/chip_demo.dart';
-export 'demo/data_table_demo.dart';
-export 'demo/date_picker_demo.dart';
-export 'demo/dialog_demo.dart';
-export 'demo/drop_down_demo.dart';
-export 'demo/drawing_demo.dart';
-export 'demo/fitness_demo.dart';
-export 'demo/flexible_space_demo.dart';
-export 'demo/grid_list_demo.dart';
-export 'demo/icons_demo.dart';
-export 'demo/leave_behind_demo.dart';
-export 'demo/list_demo.dart';
-export 'demo/modal_bottom_sheet_demo.dart';
-export 'demo/menu_demo.dart';
-export 'demo/overscroll_demo.dart';
-export 'demo/page_selector_demo.dart';
-export 'demo/persistent_bottom_sheet_demo.dart';
-export 'demo/progress_indicator_demo.dart';
-export 'demo/selection_controls_demo.dart';
-export 'demo/slider_demo.dart';
-export 'demo/snack_bar_demo.dart';
-export 'demo/scrollable_tabs_demo.dart';
-export 'demo/tabs_demo.dart';
-export 'demo/tabs_fab_demo.dart';
-export 'demo/text_field_demo.dart';
-export 'demo/time_picker_demo.dart';
-export 'demo/tooltip_demo.dart';
-export 'demo/two_level_list_demo.dart';
-export 'demo/typography_demo.dart';
-export 'demo/weather_demo.dart';
diff --git a/examples/material_gallery/lib/gallery/app.dart b/examples/material_gallery/lib/gallery/app.dart
index 4fd6ab4..bbe31f7 100644
--- a/examples/material_gallery/lib/gallery/app.dart
+++ b/examples/material_gallery/lib/gallery/app.dart
@@ -5,7 +5,7 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/scheduler.dart' show timeDilation;
 
-import '../demos.dart';
+import '../demo/all.dart';
 import 'home.dart';
 
 final Map<String, WidgetBuilder> kRoutes = <String, WidgetBuilder>{
diff --git a/examples/material_gallery/lib/gallery/demo.dart b/examples/material_gallery/lib/gallery/demo.dart
index 9e8ec0a..b619910 100644
--- a/examples/material_gallery/lib/gallery/demo.dart
+++ b/examples/material_gallery/lib/gallery/demo.dart
@@ -5,8 +5,8 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_markdown/flutter_markdown.dart';
 
-import 'syntax_highlighter.dart';
 import 'example_code_parser.dart';
+import 'syntax_highlighter.dart';
 
 class SingleComponentDemoData {
   SingleComponentDemoData({
diff --git a/examples/material_gallery/lib/gallery/example_code_parser.dart b/examples/material_gallery/lib/gallery/example_code_parser.dart
index 855ff5c..2cf0bff 100644
--- a/examples/material_gallery/lib/gallery/example_code_parser.dart
+++ b/examples/material_gallery/lib/gallery/example_code_parser.dart
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 import 'dart:async';
+
 import 'package:flutter/services.dart';
 
 const String _kStartTag = '// START ';
diff --git a/examples/material_gallery/lib/gallery/home.dart b/examples/material_gallery/lib/gallery/home.dart
index a8125ea..d825a19 100644
--- a/examples/material_gallery/lib/gallery/home.dart
+++ b/examples/material_gallery/lib/gallery/home.dart
@@ -5,7 +5,7 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 
-import '../demos.dart';
+import '../demo/all.dart';
 import 'drawer.dart';
 import 'header.dart';
 import 'item.dart';
diff --git a/examples/material_gallery/test/example_code_parser_test.dart b/examples/material_gallery/test/example_code_parser_test.dart
index 84961ab..ffe5d25 100644
--- a/examples/material_gallery/test/example_code_parser_test.dart
+++ b/examples/material_gallery/test/example_code_parser_test.dart
@@ -5,11 +5,10 @@
 import 'dart:async';
 
 import 'package:flutter/services.dart';
+import 'package:material_gallery/gallery/example_code_parser.dart';
 import 'package:mojo/core.dart' as core;
 import 'package:test/test.dart';
 
-import '../lib/gallery/example_code_parser.dart';
-
 void main() {
   test('Material Gallery example code parser test', () async {
     TestAssetBundle bundle = new TestAssetBundle();
diff --git a/examples/material_gallery/test/smoke_test.dart b/examples/material_gallery/test/smoke_test.dart
index 20224d1..ea73ac4 100644
--- a/examples/material_gallery/test/smoke_test.dart
+++ b/examples/material_gallery/test/smoke_test.dart
@@ -4,18 +4,17 @@
 
 import 'package:flutter/material.dart';
 import 'package:flutter_test/flutter_test.dart';
+import 'package:material_gallery/gallery/app.dart' as material_gallery_app;
+import 'package:material_gallery/gallery/item.dart' as material_gallery_item;
+import 'package:material_gallery/main.dart' as material_gallery_main;
 import 'package:test/test.dart';
 
-import '../lib/main.dart' as material_gallery;
-import '../lib/gallery/app.dart' as material_gallery;
-import '../lib/gallery/item.dart' as material_gallery;
-
 // Warning: the following strings must be kept in sync with GalleryHome.
 const List<String> demoCategories = const <String>['Demos', 'Components', 'Style'];
 
 Finder findGalleryItemByRouteName(WidgetTester tester, String routeName) {
   return find.byWidgetPredicate((Widget widget) {
-    return widget is material_gallery.GalleryItem
+    return widget is material_gallery_item.GalleryItem
         && widget.routeName == routeName;
   });
 }
@@ -53,7 +52,7 @@
 void main() {
   test('Material Gallery app smoke test', () {
     testWidgets((WidgetTester tester) {
-      material_gallery.main(); // builds the app and schedules a frame but doesn't trigger one
+      material_gallery_main.main(); // builds the app and schedules a frame but doesn't trigger one
       tester.pump(); // see https://github.com/flutter/flutter/issues/1865
       tester.pump(); // triggers a frame
 
@@ -66,7 +65,7 @@
 
       final List<double> scrollDeltas = new List<double>();
       double previousY = tester.getTopRight(find.text(demoCategories[0])).y;
-      final List<String> routeNames = material_gallery.kRoutes.keys.toList();
+      final List<String> routeNames = material_gallery_app.kRoutes.keys.toList();
       for (String routeName in routeNames) {
         final double y = tester.getTopRight(findGalleryItemByRouteName(tester, routeName)).y;
         scrollDeltas.add(previousY - y);
diff --git a/examples/material_gallery/test_driver/scroll_perf_test.dart b/examples/material_gallery/test_driver/scroll_perf_test.dart
index c4795b5..3e57813 100644
--- a/examples/material_gallery/test_driver/scroll_perf_test.dart
+++ b/examples/material_gallery/test_driver/scroll_perf_test.dart
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 import 'dart:async';
+
 import 'package:flutter_driver/flutter_driver.dart';
 import 'package:test/test.dart';