Handle BlocProvider with Modal Bottom Sheet

Issue I have a statefull widget with a Gesture detector within a Bloc Provider. @override Widget build(BuildContext context) { return RepositoryProvider.value( value: _authRepository, child: BlocProvider( create: (context) => AuthBloc(authRepository: AuthRepository()), child: Scaffold( body: GestureDetector( onTap: () { showSignInBottomSheet(context); }, ),

Continue reading

Receiving data as null in provider

Issue This is My Repository class DB { final db = FirebaseFirestore.instance; Stream<QuerySnapshot> init(UserModel user) { return db .collection(‘CollectionName’) .doc(user.email) //this is a unique value which i want to retrieve the value from main after successful login .collection(‘New Collection’) .snapshots();

Continue reading

Error: 'sthrow' isn't a type. sthrow ProviderNotFoundException(T, context.widget.runtimeType);

Issue I have problem when I use bloc. /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/provider-6.0.4/lib/src/provider.dart:343:7: Error: ‘sthrow’ isn’t a type. sthrow ProviderNotFoundException(T, context.widget.runtimeType); ^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/provider-6.0.4/lib/src/provider.dart:343:14: Error: Expected ‘;’ after this. sthrow ProviderNotFoundException(T, context.widget.runtimeType); ^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/provider-6.0.4/lib/src/provider.dart:343:41: Error: Expected ‘)’ before this. sthrow ProviderNotFoundException(T, context.widget.runtimeType); ^ 2 FAILURE:

Continue reading