我想在flutter项目中使用provider package(4.0),但是我得到了“尝试使用Provider with a subtype of Listenable/Stream”错误/警告。我的星座:
我有一个Api()类,它包含用于firebase-cloudstorage的基本CRUD功能。我有一个EventService()-class,它使用带有具体参数的Api()-class。对于我的视图,我有一个名为EventOverviewMo
我可以在main.dart文件的初始化方法中使用provider吗?我迷失在如何将多提供者提升到窗口小部件之上以使其工作。我试着把它移到createstate和main方法上。我不知道该怎么做。: Error: Could not find the correct Provider<UserProvider> above this MyApp Widgetflutter:To fix, please:flutt
我想在initState方法中从数据库中获取一个值。因此,我尝试通过使用Provider.of(context)方法调用函数来访问值。There are a few common scenarios:E/flutter ( 6424): - The provider you are tryingE/flutter ( 6424):
E/flutter ( 6424): -