Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception caught by widgets library #17

Open
railsudemydale2 opened this issue Dec 4, 2020 · 3 comments
Open

Exception caught by widgets library #17

railsudemydale2 opened this issue Dec 4, 2020 · 3 comments

Comments

@railsudemydale2
Copy link

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building Builder(dirty):
The getter 'key' was called on null.
Receiver: null
Tried calling: key

import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:notes_firebase_ddd_course/application/auth/auth_bloc.dart';
import 'package:notes_firebase_ddd_course/injection.dart';
import 'package:notes_firebase_ddd_course/presentation/routes/router.gr.dart' as app_router;
import 'package:notes_firebase_ddd_course/presentation/sign_in/sign_in_page.dart';

class AppWidget extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider(
create: (context) =>
getIt()..add(const AuthEvent.authCheckRequested()),
)
],
child: MaterialApp(
title: 'Notes',
debugShowCheckedModeBanner: false,
builder: ExtendedNavigator.builder(router: app_router.Router()),
theme: ThemeData.light().copyWith(
primaryColor: Colors.green[800],
accentColor: Colors.blueAccent,
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: Colors.blue[900],
),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
),
);
}
}

@tabernerojerry
Copy link

@railsudemydale2 you need to add "home: SplashPage()" inside MaterialApp

@amitsingh6391
Copy link

@tabernerojerry thanks bro

@hanimhanna
Copy link

@railsudemydale2 you need to add "home: SplashPage()" inside MaterialApp

appreciated !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants