Relative Content

Tag Archive for flutterdartbloc

Could not find the correct Provider above this Builder Widget

class ProfileView extends StatelessWidget { const ProfileView({super.key}); @override Widget build(BuildContext context) { return BlocProvider( create: (_) => ProfileCubit( context.read<AuthenticationRepository>(), context.read<RemoteRepository>(), sessionCubit: context.read<SessionCubit>(), ), child: const ProfileViewContent(), ); } } class ProfileViewContent extends StatefulWidget { const ProfileViewContent({super.key}); @override State<ProfileViewContent> createState() => _ProfileViewContentState(); } class _ProfileViewContentState extends State<ProfileViewContent> with TickerProviderStateMixin { @override Widget build(BuildContext context) { return […]

Class ‘Home’ has no instance method ‘call’

Class ‘Home’ has no instance method ‘call’.
Receiver: Instance of ‘Home’
Tried calling: call(addToCart: Closure: (ProductDataModel) => void from Function ‘addToCart’:., cartItems: Instance(length:0) of ‘_GrowableList’)

Flutter bloc – How can I use BlocBuilder?

I’m a Flutter Beginer and about to use Bloc.
but this error message comes up and I tried to use ‘extends StateStreamable<CalculatorEvent>’ or ‘implements’
but it doesn’t work. please help me to solve this error. Thank you.