From 8a823328ca8a09b455a45ad17ecb8256356d9c8f Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 29 Sep 2016 08:59:43 -0700 Subject: [PATCH] Make animation_demo a manual test (#6117) This demo doesn't work properly in landscape and is confusing. It's really more of a test of the material arc code. Fixes #5710 --- .../manual_tests/material_arc.dart | 10 +++++++--- examples/flutter_gallery/lib/demo/all.dart | 1 - examples/flutter_gallery/lib/gallery/item.dart | 7 ------- .../test_driver/transitions_perf_test.dart | 1 - 4 files changed, 7 insertions(+), 12 deletions(-) rename examples/flutter_gallery/lib/demo/animation_demo.dart => dev/manual_tests/material_arc.dart (99%) diff --git a/examples/flutter_gallery/lib/demo/animation_demo.dart b/dev/manual_tests/material_arc.dart similarity index 99% rename from examples/flutter_gallery/lib/demo/animation_demo.dart rename to dev/manual_tests/material_arc.dart index ee1e662cb1b..8faaf1bd9c5 100644 --- a/examples/flutter_gallery/lib/demo/animation_demo.dart +++ b/dev/manual_tests/material_arc.dart @@ -188,7 +188,7 @@ class _PointDemoState extends State<_PointDemo> { final MaterialPointArcTween arc = new MaterialPointArcTween(begin: _begin, end: _end); return new RawGestureDetector( behavior: _dragTarget == null ? HitTestBehavior.deferToChild : HitTestBehavior.opaque, - gestures: { + gestures: { ImmediateMultiDragGestureRecognizer: (ImmediateMultiDragGestureRecognizer recognizer) { // ignore: map_value_type_not_assignable, https://github.com/flutter/flutter/issues/5771 return (recognizer ??= new ImmediateMultiDragGestureRecognizer()) ..onStart = _handleOnStart; @@ -407,8 +407,6 @@ class _ArcDemo { class AnimationDemo extends StatefulWidget { AnimationDemo({ Key key }) : super(key: key); - static const String routeName = '/animation'; - @override _AnimationDemoState createState() => new _AnimationDemoState(); } @@ -469,3 +467,9 @@ class _AnimationDemoState extends State with TickerProviderStateM ); } } + +void main() { + runApp(new MaterialApp( + home: new AnimationDemo() + )); +} diff --git a/examples/flutter_gallery/lib/demo/all.dart b/examples/flutter_gallery/lib/demo/all.dart index 517b637f3f5..1629c294f0e 100644 --- a/examples/flutter_gallery/lib/demo/all.dart +++ b/examples/flutter_gallery/lib/demo/all.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export 'animation_demo.dart'; export 'bottom_navigation_demo.dart'; export 'buttons_demo.dart'; export 'contacts_demo.dart'; diff --git a/examples/flutter_gallery/lib/gallery/item.dart b/examples/flutter_gallery/lib/gallery/item.dart index ca6cd9539cf..c42fd9da996 100644 --- a/examples/flutter_gallery/lib/gallery/item.dart +++ b/examples/flutter_gallery/lib/gallery/item.dart @@ -229,13 +229,6 @@ final List kAllGalleryItems = [ buildRoute: (BuildContext context) => new TooltipDemo() ), // Styles - new GalleryItem( - title: 'Animation', - subtitle: 'Material motion for points and rectangles', - category: 'Style', - routeName: AnimationDemo.routeName, - buildRoute: (BuildContext context) => new AnimationDemo() - ), new GalleryItem( title: 'Colors', subtitle: 'All of the predefined colors', diff --git a/examples/flutter_gallery/test_driver/transitions_perf_test.dart b/examples/flutter_gallery/test_driver/transitions_perf_test.dart index 676708a96f4..83387271cd4 100644 --- a/examples/flutter_gallery/test_driver/transitions_perf_test.dart +++ b/examples/flutter_gallery/test_driver/transitions_perf_test.dart @@ -55,7 +55,6 @@ final List demoTitles = [ 'Time picker', 'Tooltips', // Style - 'Animation', 'Colors', 'Typography' ];