From 3732d754cadbde57b8c9ef8979438389300e4ec8 Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Thu, 1 Sep 2016 13:22:22 -0400 Subject: [PATCH] Re-enable iOS back gesture. (#5680) The iOS transition is the more buggy part of this feature, and it wasn't disabled. Let's just leave them enabled while I work on improvements. --- packages/flutter/lib/src/material/scaffold.dart | 7 +------ packages/flutter/test/widget/page_transitions_test.dart | 5 ++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 35d962ed32..603c87d739 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -22,9 +22,6 @@ const double _kFloatingActionButtonMargin = 16.0; // TODO(hmuller): should be de const Duration _kFloatingActionButtonSegue = const Duration(milliseconds: 200); final Tween _kFloatingActionButtonTurnTween = new Tween(begin: -0.125, end: 0.0); -// iOS back gesture is in development. This flag will go away when it's ready -// to ship. -const bool _kBackGestureEnabled = false; const double _kBackGestureWidth = 20.0; /// The Scaffold's appbar is the toolbar, bottom, and the "flexible space" @@ -700,9 +697,7 @@ class ScaffoldState extends State { NavigationGestureController _backGestureController; bool _shouldHandleBackGesture() { - return _kBackGestureEnabled && - Theme.of(context).platform == TargetPlatform.iOS && - Navigator.canPop(context); + return Theme.of(context).platform == TargetPlatform.iOS && Navigator.canPop(context); } void _handleDragStart(DragStartDetails details) { diff --git a/packages/flutter/test/widget/page_transitions_test.dart b/packages/flutter/test/widget/page_transitions_test.dart index 474aec5793..50cd48844e 100644 --- a/packages/flutter/test/widget/page_transitions_test.dart +++ b/packages/flutter/test/widget/page_transitions_test.dart @@ -121,9 +121,8 @@ void main() { await gesture.moveBy(new Offset(50.0, 0.0)); await tester.pump(); - // TODO(mpcomplete): back gesture disabled. Home should be onstage when - // it is reenabled. - expect(find.text('Home'), findsNothing); + // Home is now visible. + expect(find.text('Home'), isOnstage); expect(find.text('Settings'), isOnstage); });