Unverified Commit 5ae64381 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Revert "Handle null return from WillPopCallback" (#127112)

Reverts flutter/flutter#127039

Google3 has been fixed, so this work around is no longe necessary.
parent 2b95fa67
...@@ -1499,9 +1499,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T ...@@ -1499,9 +1499,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
final _ModalScopeState<T>? scope = _scopeKey.currentState; final _ModalScopeState<T>? scope = _scopeKey.currentState;
assert(scope != null); assert(scope != null);
for (final WillPopCallback callback in List<WillPopCallback>.of(_willPopCallbacks)) { for (final WillPopCallback callback in List<WillPopCallback>.of(_willPopCallbacks)) {
// TODO(goderbauer): Tests using the Component Framework in google3 insist on returning if (!await callback()) {
// null for mocked out WillPopCallbacks. Fix that to remove ignore.
if (await callback() != true) { // ignore: no_literal_bool_comparisons
return RoutePopDisposition.doNotPop; return RoutePopDisposition.doNotPop;
} }
} }
......
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