Flutter Build Failed, Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'

Viewed 24

Good Morning All, I've a problem with running my flutter project. It was workinng very well, during development I made ```hot reload''' but it doesn't work

so, I terminated the debug seesion and start a new one

this is the result of debugging my project

I follow this answer but it doesn't work

How can i solve it

Launching lib\main.dart on DRA LX2 in debug mode...
Running Gradle task 'assembleDebug'...
lib/modules/auth/login_pharmacy.dart:27:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/shared/drawer/home_drawer.dart:23:41: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
  Widget build(BuildContext context) => BlocConsumer<HomeCubit, HomeStates>(
                                        ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/Home/home_page.dart:25:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/darwerScreens/about_us.dart:17:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/darwerScreens/complaints.dart:26:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/darwerScreens/contact_us.dart:17:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/darwerScreens/pharmacy_user_profile_screen.dart:23:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/auth/reset_password.dart:28:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/notification/notification.dart:15:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/modules/Home/one_order_details_screen.dart:24:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^
lib/models/orders/open_image.dart:17:12: Error: Type argument 'HomeCubit' doesn't conform to the bound 'StateStreamable<S>' of the type variable 'B' on 'BlocConsumer'.
 - 'HomeCubit' is from 'package:elagy_pharmacy_app/Cubit%20Folder/my_cubit_shared_file.dart' ('lib/Cubit%20Folder/my_cubit_shared_file.dart').
 - 'StateStreamable' is from 'package:bloc/src/bloc.dart' ('/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.1.0/lib/src/bloc.dart').
Try changing type arguments so that they conform to the bounds.
    return BlocConsumer<HomeCubit, HomeStates>(
           ^
/C:/Users/sayed/Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_bloc-8.1.1/lib/src/bloc_consumer.dart:61:20: Context: This is the type variable whose bound isn't conformed to.
class BlocConsumer<B extends StateStreamable<S>, S> extends StatefulWidget {
                   ^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\sayed\Documents\flutter_windows_2.2.3-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\sayed\Documents\flutter_windows_2.2.3-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 34s
Exception: Gradle task assembleDebug failed with exit code 1
0 Answers
Related