Open railsudemydale2 opened 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), ), ), ), ), ); } }
@railsudemydale2 you need to add "home: SplashPage()" inside MaterialApp
@tabernerojerry thanks bro
appreciated !
════════ 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),
),
),
),
),
);
}
}