notifyListeners abstract method
void
notifyListeners()
Notify dependents that this provider has changed.
This is typically used for mutable state, such as to do:
class TodoList extends Notifier<List<Todo>> {
@override
List<Todo>> build() => [];
void addTodo(Todo todo) {
state.add(todo);
ref.notifyListeners();
}
}
Implementation
void notifyListeners();