Last active
January 10, 2021 17:41
-
-
Save corelmax/a77b770ed8136a82bfa825a7eef1b7cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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