skip to Main Content

Flutter – List not updating after item added

I want to add item in list when floatingAction button is clicked. class EditAgentVehiclesListScreen extends HookWidget { final ValueNotifier<List<VehicleItems>> list; const EditAgentVehiclesListScreen(this.list, {super.key}); @override Widget build(BuildContext context) { return Scaffold( floatingActionButton: FloatingActionButton( backgroundColor: AppTheme.light.colorScheme.primary, onPressed: () { Navigator.pushNamed(context, TenancyRoutes.createVehicleItemsScreen) .then(((onValue)…

VIEW QUESTION

How to avoid render box errors while using flexible around text in flutter?

whenever I use Expanded or Flexible in anyway on this Widget buildRadioButton(String label, String value, String? groupValue, Function(String?) onChanged) { return Row( children: [ Radio( value: value, groupValue: groupValue, onChanged: onChanged, activeColor: Theme.of(context).colorScheme.onBackground, fillColor: MaterialStateColor.resolveWith( (states) { if (states.contains(MaterialState.selected)) {…

VIEW QUESTION
Back To Top
Search