Commit 3732d754 authored by Matt Perry's avatar Matt Perry Committed by GitHub

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.
parent ef79e7a1
...@@ -22,9 +22,6 @@ const double _kFloatingActionButtonMargin = 16.0; // TODO(hmuller): should be de ...@@ -22,9 +22,6 @@ const double _kFloatingActionButtonMargin = 16.0; // TODO(hmuller): should be de
const Duration _kFloatingActionButtonSegue = const Duration(milliseconds: 200); const Duration _kFloatingActionButtonSegue = const Duration(milliseconds: 200);
final Tween<double> _kFloatingActionButtonTurnTween = new Tween<double>(begin: -0.125, end: 0.0); final Tween<double> _kFloatingActionButtonTurnTween = new Tween<double>(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; const double _kBackGestureWidth = 20.0;
/// The Scaffold's appbar is the toolbar, bottom, and the "flexible space" /// The Scaffold's appbar is the toolbar, bottom, and the "flexible space"
...@@ -700,9 +697,7 @@ class ScaffoldState extends State<Scaffold> { ...@@ -700,9 +697,7 @@ class ScaffoldState extends State<Scaffold> {
NavigationGestureController _backGestureController; NavigationGestureController _backGestureController;
bool _shouldHandleBackGesture() { bool _shouldHandleBackGesture() {
return _kBackGestureEnabled && return Theme.of(context).platform == TargetPlatform.iOS && Navigator.canPop(context);
Theme.of(context).platform == TargetPlatform.iOS &&
Navigator.canPop(context);
} }
void _handleDragStart(DragStartDetails details) { void _handleDragStart(DragStartDetails details) {
......
...@@ -121,9 +121,8 @@ void main() { ...@@ -121,9 +121,8 @@ void main() {
await gesture.moveBy(new Offset(50.0, 0.0)); await gesture.moveBy(new Offset(50.0, 0.0));
await tester.pump(); await tester.pump();
// TODO(mpcomplete): back gesture disabled. Home should be onstage when // Home is now visible.
// it is reenabled. expect(find.text('Home'), isOnstage);
expect(find.text('Home'), findsNothing);
expect(find.text('Settings'), isOnstage); expect(find.text('Settings'), isOnstage);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment