-
fzyzcjy authored
Close https://github.com/flutter/flutter/issues/125724 > The `navigator.dart` has ~10 repeats of things like: > > ```dart > final _RouteEntry? currentRouteEntry = _navigator!._history.cast<_RouteEntry?>().lastWhere( > (_RouteEntry? e) => e != null && _RouteEntry.isPresentPredicate(e), > orElse: () => null, > ); > ``` > > while it can be greatly simplified as: > > ```dart > final _RouteEntry? currentRouteEntry = _navigator!._history.lastWhereOrNull(_RouteEntry.isPresentPredicate); > ``` > > Thus, it seems that we can beautify the code a little bit. Same as https://github.com/flutter/flutter/pull/125099, but without external dependency For more detailed explanation why it does not introduce external dependency: https://github.com/flutter/flutter/pull/125099#discussion_r1174230502
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
lib | ||
test | ||
test_fixes | ||
test_private | ||
test_profile | ||
test_release | ||
LICENSE | ||
README.md | ||
analysis_options.yaml | ||
build.yaml | ||
dart_test.yaml | ||
pubspec.yaml |