Skip to content

context.showToast throws Null check operator used on a null value #76

Open

Description

@santiagoquiroga-tc

Flutter doctor

[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version 10.0.26100.2605], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Android Studio (version 2024.2)
[√] VS Code (version 1.96.0)
[√] Connected device (3 available)
[√] Network resources

Using GoRouter. I tried adding the navigatorKey, but that didn't work

final navigatorKey = GlobalKey<NavigatorState>();

final app_router = GoRouter(
  navigatorKey: navigatorKey,
  initialLocation: '/login',
  routes: [
    GoRoute(
      path: '/debug',
      builder: (context, state) => DebugScreen(),
    ),
    GoRoute(
      path: '/login',
      builder: (context, state) => LoginScreen(),
    ),
    GoRoute(
      path: '/',
      builder: (context, state) => HomeScreen(),
    ),
  ],
);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions