skip to Main Content

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

FutureBuilder flutter

I am creating an app like snapchat where the app start with camera page and before this it ask user for camera and microphone permission if the user grant both permission then the camera widget will be displayed other wise…

VIEW QUESTION

The Future builder in Flutter is fetching data twice

The Future builder in my Flutter app is fetching data twice, as opposed to fetching data just once. class StudentListView extends StatefulWidget { @override State<StudentListView> createState() => _StudentListViewState(); } class _StudentListViewState extends State<StudentListView> { List<StudentModel> students = []; late Future…

VIEW QUESTION
Back To Top
Search