Skip to content

Instantly share code, notes, and snippets.

@ijoschek ijoschek/.\lib\scr\home.dart Secret

Last active Dec 5, 2018
What would you like to do?
class _Home extends State<StatefulWidget> {
void interact() async {
final DocumentReference postRef =
await Firestore.instance.runTransaction((Transaction tx) async {
DocumentSnapshot postSnapshot = await tx.get(postRef);
if (postSnapshot.exists) {
await tx.update(postRef,
<String, dynamic>{'count':['count'] + 1});
Widget build(BuildContext context) {
return Scaffold(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.