skip to Main Content

Flutter – Why BlocProvider doesn't allow to assign another list of BlocProvider which I want to import from other file?

class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return MultiBlocProvider( providers: blocProviders(context), child: MaterialApp.router( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), routerConfig: AppRouter().router,…

VIEW QUESTION

how to call setState inside FutureBuilder<List<dynamic>>in flutter

I am trying to call setState inside a ListView.builder which itself is inside a FutureBuilder FutureBuilder<List<dynamic>>( future: BidRepository().bidsTrucker('new'), builder: (context, snapshot) { if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } final trips = snapshot.data!; return ListView.builder( itemCount: trips.length, itemBuilder: ((context,…

VIEW QUESTION
Back To Top
Search