Skip to content

Instantly share code, notes, and snippets.

@corelmax
Last active January 10, 2021 17:41
Show Gist options
  • Save corelmax/a77b770ed8136a82bfa825a7eef1b7cc to your computer and use it in GitHub Desktop.
Save corelmax/a77b770ed8136a82bfa825a7eef1b7cc to your computer and use it in GitHub Desktop.
@@ -34,13 +34,14 @@
child: Row(
children: [
- Checkbox(value: false, onChanged: (value) {
- // we will update todo item here
+ Checkbox(value: todo.isDone, onChanged: (value) {
+ todo.isDone = value;
+ updateTodo(todo);
}),
Expanded(
child: FocusScope(
onFocusChange: (bool focusing) {
if(!focusing) {
- // we will update todo item here
+ updateTodo(todo);
}
},
child: TextField(
@@ -49,7 +49,7 @@
text: 'todo text is here',
),
onChanged: (String text) {
- // update todo's title here
+ todo.title = text;
},
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment