从Firebase cloud_store获取数据。我想将数据传递到静态const String =“ here”;
Firestore.instance.collection('postman').document('FdsgttSX1Fc8').get()
.then((DocumentSnapshot ds) {
var link = ds['link_data'];
assert(link is String);
print("link value: $link");
return link ;
});
try {
final response = await http.get(url);
if (200 == response.statusCode) {
return parseMovies(response.body);
} else {
return Movies();
}
} catch (e) {
print('Error ${e.toString()}');
return Movies();
}