skip to Main Content

Flutter BloC couldn't find correct provider when context.read is called

I created a basic project to learn Flutter better. In bnb.dart file if I use: context.read<AppBottomNavigationBarState>().selectedIndex to change the currentIndex field of the BottomNavigationBar. The application throws: The following ProviderNotFoundException was thrown building BlocBuilder<AppBottomNavigationBarCubit, AppBottomNavigationBarState> But if I change that…

VIEW QUESTION

Error 'badge' is being imported from 2 dart sources – Flutter

Getting this error for build failure: error build: ../../../development/flutter/.pub-cache/hosted/pub.dev/bubble_bottom_bar-2.0.0/lib/bubble_bottom_bar.dart:195:14: Error: ‘Badge’ is imported from both ‘package:badges/src/badge.dart’ and ‘package:flutter/src/material/badge.dart’. Using code from https://codecanyon.net/item/flyweb-for-web-to-app-convertor-flutter-admin-panel-v10/26840230 Can anyone suggest where and what needs to be edited to get this issue resolved. Have tried updating…

VIEW QUESTION
Back To Top
Search