Skip to content
Prev Previous commit
Next Next commit
Fix analysis issues
  • Loading branch information
johnpryan committed Feb 23, 2023
commit 05599c64520c9b6ccbb7554ce5323767c80d5112
10 changes: 5 additions & 5 deletions packages/go_router_builder/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ class App extends StatelessWidget {
);
}

const key = GlobalObjectKey<NavigatorState>('navigator_key');
const GlobalObjectKey<NavigatorState> key = GlobalObjectKey('navigator_key');

@TypedGoRoute<HomeRoute>(
path: '/',
routes: [
routes: <TypedShellRoute<FamilyRoute>>[
TypedShellRoute<FamilyRoute>(
routes: <TypedGoRoute<GoRouteData>>[
TypedGoRoute<FamilyIdRoute>(
path: 'family/:fid',
routes: [
routes: <TypedGoRoute<PersonRoute>>[
TypedGoRoute<PersonRoute>(
path: 'person/:pid',
routes: <TypedGoRoute<GoRouteData>>[
Expand All @@ -99,8 +99,8 @@ class FamilyRoute extends ShellRouteData {
static final GlobalKey<NavigatorState> $navigatorKey = GlobalKey();

@override
Widget builder(BuildContext context, GoRouterState state, Widget child) {
return FamilyScreen(child: child);
Widget builder(BuildContext context, GoRouterState state, Widget navigator) {
return FamilyScreen(child: navigator);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/go_router_builder/lib/src/route_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class RouteConfig {
) {
assert(!reader.isNull, 'reader should not be null');
final InterfaceType type = reader.objectValue.type! as InterfaceType;
final bool isShellRoute = type.element2.name == 'TypedShellRoute';
final bool isShellRoute = type.element.name == 'TypedShellRoute';

String? path;

Expand Down