return Scaffold(
backgroundColor: Colors.white,
body: Center(
child: BlocProvider(
// create: (context) => BlocProvider.of<LoginBloc>(context)..add(LoginSubmit(_usernameController.text, _passwordController.text)),
create: (context) => LoginBloc(BlocProvider.of<AuthBloc>(context)).add(LoginSubmit(_usernameController.text, _passwordController.text)),
// BlocProvider.of<LoginBloc>(_)..add(LoginSubmit(_usernameController.text, _passwordController.text)),
child: BlocConsumer<LoginBloc, LoginState>(listener: (context, state) async {
if (state is LoginFailed) {
CustomeAlertDialog.show(context, "", state.error, key: null);
}
please help me, i got error flutter : Error: Inferred type argument 'void' doesn't conform to the bound 'Cubit' of the type variable 'T' on 'BlocProvider'. lib/login_page.dart:106
- 'Cubit' is from 'package:bloc/src/cubit.dart' ('/D:/Master/flutter/.pub-cache/hosted/pub.flutter-io.cn/bloc-6.1.3/lib/src/cubit.dart'). package:bloc/src/cubit.dart:1
- 'Object' is from 'dart:core'. Try specifying type arguments explicitly so that they conform to the bounds. child: BlocProvider(