我从Firebase Cloudstore获取数据。我想将数据传递给静态const String =“ here”;

时间:2020-03-11 02:44:52

标签: firebase flutter google-cloud-firestore

从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();
}

enter image description here

0 个答案:

没有答案