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.
This commit is contained in:
parent
ef79e7a1c0
commit
3732d754ca
@ -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> {
|
|||||||
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() {
|
|||||||
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user