Skip to content

Instantly share code, notes, and snippets.

@PeterHdd
Last active April 11, 2021 11:40
Show Gist options
  • Save PeterHdd/1117cfc16c73a8dab291cc0019676cf5 to your computer and use it in GitHub Desktop.
Save PeterHdd/1117cfc16c73a8dab291cc0019676cf5 to your computer and use it in GitHub Desktop.
var retrievedName;
ElevatedButton(
onPressed: () {
ref.child("Name").once().then((DataSnapshot data){
print(data.value);
print(data.key);
setState(() {
retrievedName = data.value;
});
});
},
child: Text("Get"),
),
Text(retrievedName ?? ""),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment