Reputation: 1204
Its my 1st time using riverpod and for practice purposes, I'm making to-do app.
I'm using StateNotifierProvider and it's not updating the ListViewBuilder but updating the length of items but not showing that item. Please Guide me, Here is the SC of StateNotifier
and here is the calling method to call add method here is the SC
and here is the UI UPDATING THE NUMBERS OF items but not updating the list.
Upvotes: 0
Views: 284
Reputation: 1204
I solved my issue:
void addtask(String? newtask) {
final task = TaskModel(name: newtask!);
state = [...state, task];
}
Upvotes: 0