addTodo method

void addTodo(
  1. String task
)

Implementation

void addTodo(String task) {
  _todos.add(Todo(task: task));
  notifyListeners();
}