简体   繁体   English

Flutter Firestore 在小部件树中找不到提供程序?

[英]Flutter Firestore can't find provider in the widget tree?

Hello I am trying to firebase in my app and I keep running into problems.您好,我正在尝试在我的应用程序中使用 firebase,但我一直遇到问题。 I've tried the suggestions in this screen shot, but I think perhaps I am not understanding properly.我已经尝试过此屏幕截图中的建议,但我想我可能没有正确理解。 颤动运行的输出

Its saying cannot find correct Provider, I am guessing it can't find it in the tree.它说找不到正确的提供者,我猜它无法在树中找到它。 But it looks to me as if it is there但在我看来它就在那里我的提供者在哪里

Here is my main where I call provider这是我打电话给供应商的主要地方在此处输入图像描述

So it turns out this is what works.所以事实证明这是有效的。 Now i just need to figure out how to present the data.现在我只需要弄清楚如何呈现数据。

这现在运行并解决了问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM