我在使用颤动访问firestore中的数据时遇到问题

时间:2018-06-08 18:06:55

标签: firebase google-cloud-firestore flutter

我在我的调试控制台中得到这两个错误(core_booster,getBoosterConfig = false)和(无法到达Firestore后端。)在我的火库数据中我有一个收集“食谱”然后在de文件中我有每个食谱有自己的属性。 在这里,我给你一个秘密的代码。

new StreamBuilder(
        stream: Firestore.instance.collection('Recipes').snapshots(),
        builder: (context, snapshot) {
          if (!snapshot.hasData)
            return const Center(child: CircularProgressIndicator());
          return ListView.builder(
            itemCount: snapshot.data.documents.length,
            itemBuilder: (context, index) =>
                _buildListRecipe(context, snapshot.data.documents[index]),
          );
        });

然后在我的_buildListRecipe中,我正在访问每个食谱的值。

new Image.network(

            document["firstImage"],

            width: double.infinity,
            height: 150.0,
            fit: BoxFit.cover,
          ),

0 个答案:

没有答案
相关问题