Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
370a279
Refactor internal classes and methods
johnpryan Jul 1, 2022
aaec44a
format
johnpryan Jul 12, 2022
61fbc2d
Sort imports
johnpryan Jul 12, 2022
632b012
Update changelog
johnpryan Jul 12, 2022
40e2c61
Address code review comments
johnpryan Jul 13, 2022
61da05d
remove routing library
johnpryan Jul 14, 2022
1c2577c
Move classes in go_router.dart into separate libraries
johnpryan Jul 14, 2022
db91f56
Move Configuration.validate() into constructor
johnpryan Jul 14, 2022
1eaf6c3
Remove comment
johnpryan Jul 14, 2022
ea01665
use continue in redirect loop
johnpryan Jul 14, 2022
d4c2ff9
Fix comments
johnpryan Jul 14, 2022
199c353
Sort imports
johnpryan Jul 14, 2022
b8a65af
Fix logging in configuration
johnpryan Jul 14, 2022
85fe41d
add visibleForTesting annotation
johnpryan Jul 14, 2022
ccb8097
Merge branch 'main' into refactor
johnpryan Jul 14, 2022
e0bb4f4
Updates from merge with main
johnpryan Jul 14, 2022
4c17bba
Format
johnpryan Jul 15, 2022
8449014
Add TODOs to make Router implementation classes private
johnpryan Jul 15, 2022
9b40f1e
Add copyright headers
johnpryan Jul 15, 2022
0e14a04
Fix tests
johnpryan Jul 15, 2022
73feaa8
Merge branch 'main' into refactor
johnpryan Jul 20, 2022
e3458e6
format
johnpryan Jul 20, 2022
13bc273
fix comment
johnpryan Jul 20, 2022
2a350ad
Update packages/go_router/lib/src/parser.dart
johnpryan Jul 21, 2022
fc82dbb
add whitespace
johnpryan Jul 21, 2022
86c8961
format
johnpryan Jul 21, 2022
7f8954c
Hide typedefs that weren't previously exported
johnpryan Jul 21, 2022
fdcf0ed
Delete empty file
johnpryan Jul 21, 2022
78e60a6
add missing import
johnpryan Jul 21, 2022
26b4c12
Specify version 4.1.2 in pubspec.yaml
johnpryan Jul 21, 2022
0c5436e
Update packages/go_router/lib/src/builder.dart
johnpryan Jul 21, 2022
348697b
Fix comment
johnpryan Jul 21, 2022
77f2244
Add isError and error getters to RouteMatchList
johnpryan Jul 21, 2022
820162d
Add issue links to TODO comments
johnpryan Jul 21, 2022
07f7ada
Add link to issue for TODO
johnpryan Jul 22, 2022
686d315
Merge branch 'main' into refactor
johnpryan Jul 22, 2022
5e282d3
Re-apply code from #2306 due to merge conflicts
johnpryan Jul 22, 2022
714e682
Add issue references
johnpryan Jul 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add issue links to TODO comments
  • Loading branch information
johnpryan committed Jul 21, 2022
commit 820162d46c5d5464cfdc3bc2ed974c1bf29b50d5
1 change: 1 addition & 0 deletions packages/go_router/lib/src/information_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class GoRouteInformationProvider extends RouteInformationProvider
_valueInEngine.location == routeInformation.location);
SystemNavigator.selectMultiEntryHistory();
// TODO(chunhtai): report extra to browser through state if possible
// See https://github.com/flutter/flutter/issues/108142
SystemNavigator.routeInformationUpdated(
location: routeInformation.location!,
replace: replace,
Expand Down
1 change: 0 additions & 1 deletion packages/go_router/lib/src/matching.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class RouteMatchList {
_matches.isEmpty ? Uri() : Uri.parse(_matches.last.fullUriString);

/// Pushes a match onto the list of matches.
// TODO(johnpryan): deprecate this API when new route types are added
void push(RouteMatch match) {
_matches.add(match);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/go_router/lib/src/redirection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'match.dart';
import 'matching.dart';

/// A GoRouter redirector function.
// TODO(johnpryan): make redirector async (#105808)
// TODO(johnpryan): make redirector async
// See https://github.com/flutter/flutter/issues/105808
typedef RouteRedirector = RouteMatchList Function(RouteMatchList matches,
RouteConfiguration configuration, RouteMatcher matcher,
{Object? extra});
Expand Down
7 changes: 4 additions & 3 deletions packages/go_router/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class GoRouter extends ChangeNotifier with NavigatorObserver {
GoRouter({
required List<GoRoute> routes,
// TODO(johnpryan): Change to a route, improve error API
// See https://github.com/flutter/flutter/issues/108144
GoRouterPageBuilder? errorPageBuilder,
GoRouterWidgetBuilder? errorBuilder,
GoRouterRedirect? redirect,
Expand All @@ -32,10 +33,12 @@ class GoRouter extends ChangeNotifier with NavigatorObserver {
bool routerNeglect = false,
String? initialLocation,
// TODO(johnpryan): Deprecate this parameter
// See https://github.com/flutter/flutter/issues/108132
UrlPathStrategy? urlPathStrategy,
List<NavigatorObserver>? observers,
bool debugLogDiagnostics = false,
// TODO(johnpryan): Deprecate this parameter
// See https://github.com/flutter/flutter/issues/108145
GoRouterNavigatorBuilder? navigatorBuilder,
String? restorationScopeId,
}) {
Expand Down Expand Up @@ -94,16 +97,13 @@ class GoRouter extends ChangeNotifier with NavigatorObserver {

/// The router delegate. Provide this to the MaterialApp or CupertinoApp's
/// `.router()` constructor
// TODO(johnpryan): change type to RouterDelegate
GoRouterDelegate get routerDelegate => _routerDelegate;

/// The route information provider used by [GoRouter].
// TODO(johnpryan): change type to RouteInformationProvider
GoRouteInformationProvider get routeInformationProvider =>
_routeInformationProvider;

/// The route information parser used by [GoRouter].
// TODO(johnpryan): change type to RouteInformationParser
GoRouteInformationParser get routeInformationParser =>
_routeInformationParser;

Expand All @@ -119,6 +119,7 @@ class GoRouter extends ChangeNotifier with NavigatorObserver {
/// Get a location from route name and parameters.
/// This is useful for redirecting to a named location.
// TODO(johnpryan): Deprecate this API
// See https://github.com/flutter/flutter/issues/107729
String namedLocation(
String name, {
Map<String, String> params = const <String, String>{},
Expand Down