Commit c05871a7 authored by Adam Barth's avatar Adam Barth

Double-tapping modal barrier pops twice

Now we ignore the pointer after we start popping the route.

Fixes #686
parent 8dd8c203
......@@ -442,16 +442,22 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
final PageStorageBucket _storageBucket = new PageStorageBucket();
Widget _buildModalBarrier(BuildContext context) {
Widget barrier;
if (barrierColor != null) {
assert(barrierColor != _kTransparent);
return new AnimatedModalBarrier(
barrier = new AnimatedModalBarrier(
color: new AnimatedColorValue(_kTransparent, end: barrierColor, curve: Curves.ease),
performance: performance,
dismissable: barrierDismissable
);
} else {
return new ModalBarrier(dismissable: barrierDismissable);
barrier = new ModalBarrier(dismissable: barrierDismissable);
}
assert(performance.status != PerformanceStatus.dismissed);
return new IgnorePointer(
ignoring: performance.status == PerformanceStatus.reverse,
child: barrier
);
}
Widget _buildModalScope(BuildContext context) {
......
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