Skip to content

Instantly share code, notes, and snippets.

@Norbert515
Created February 20, 2018 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Norbert515/a410591bd57d36259d4330214a99c9c8 to your computer and use it in GitHub Desktop.
Save Norbert515/a410591bd57d36259d4330214a99c9c8 to your computer and use it in GitHub Desktop.
BookCard-IconButton
child: new IconButton(
icon: bookState.starred? new Icon(Icons.star): new Icon(Icons.star_border),
color: Colors.black,
onPressed: (){
setState(() {
bookState.starred = !bookState.starred;
});
BookDatabase.get().updateBook(bookState);
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment