Last active
January 10, 2021 16:44
-
-
Save corelmax/a8f1000296fcccb7aeb92da85914a38e 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
@@ -14,12 +14,13 @@ | |
return ListView.builder( | |
itemCount: todos.length, | |
itemBuilder: (context, index) { | |
+ var item = todos.entries.elementAt(index).value; | |
return Card( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Row( | |
children: [ | |
- Checkbox(value: false, onChanged: (value) { | |
+ Checkbox(value: item.isDone, onChanged: (value) { | |
// we will update todo item here | |
}), | |
Expanded( | |
@@ -31,7 +32,7 @@ | |
}, | |
child: TextField( | |
controller: TextEditingController( | |
- text: 'todo text is here', | |
+ text: item.title, | |
), | |
onChanged: (String text) { | |
// update todo's title here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment