Skip to content

Commit

Permalink
Revert "Handle null return from WillPopCallback" (#127112)
Browse files Browse the repository at this point in the history
Reverts flutter/flutter#127039

Google3 has been fixed, so this work around is no longe necessary.
  • Loading branch information
goderbauer committed May 18, 2023
1 parent 2b95fa6 commit 5ae6438
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/flutter/lib/src/widgets/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1499,9 +1499,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
final _ModalScopeState<T>? scope = _scopeKey.currentState;
assert(scope != null);
for (final WillPopCallback callback in List<WillPopCallback>.of(_willPopCallbacks)) {
// TODO(goderbauer): Tests using the Component Framework in google3 insist on returning
// null for mocked out WillPopCallbacks. Fix that to remove ignore.
if (await callback() != true) { // ignore: no_literal_bool_comparisons
if (!await callback()) {
return RoutePopDisposition.doNotPop;
}
}
Expand Down

0 comments on commit 5ae6438

Please sign in to comment.