Right now I have a Firestore folder which contains numbered documents with information like Volume, temperature, air quality. These values are saved as numbers. I somehow want these Firestore numbers to be saved as Integer variables in my flutter project, so that I can work with them (For example show dark colors if the Volume is too loud).
But it just doesn't work, no matter what I try. Is it even possible? I can only display the firestore values, but I can't save them..
Here a picture of my database: 
My code:
Future<String> getValue() async{ final doc = await FirebaseFirestore.instance .collection('Digitaluhr') .doc('1.002') .get(); Future <String> lautstaerke = doc['Lautstärke']; return lautstaerke; } @override Widget build(BuildContext context) { Future <String> Lautstaerke = getValue(); String transform = Lautstaerke.toString(); var test = int.parse(transform); assert(test is int); Text('$test'), Please help :(

getValueis aFuture, you have to useasync/awaitto get its value. If you need this in a build method,FutureBuildercan solve your problem.