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)…