ResoCoder / flutter-ddd-firebase-course

https://resocoder.com/flutter-firebase-ddd-course
GNU General Public License v3.0
470 stars 161 forks source link

Exception caught by widgets library #17

Open railsudemydale2 opened 3 years ago

railsudemydale2 commented 3 years ago

════════ 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 commented 3 years ago

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

amitsingh6391 commented 3 years ago

@tabernerojerry thanks bro

hanimhanna commented 3 years ago

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

appreciated !