我的home.dart页面中心还有一个按钮,当用户点击按钮时,它会导航到详细信息页面。应用程序树和代码如下所示。我尝试在我的home.dart中实现home.dart,所以在home.dart之后,只要深入,就可以使用"InheritedWidget“调用”void_handleUserInteraction“函数不幸的是,我老是犯这样的错误:
I/flutter (20715): The getter 'handleOnTap' was call
我正在学习flutter的提供者,我正在遭受一个错误。 void save() { }class Main extends StatelessWidget { WidgetError: Could not find the correct Provider<Model> above this Main Widget
This likely
我正在使用provider包来管理Flutter中的状态。我尝试在build函数中执行final app = Provider.of<Application>(context).app;。但是,它会抛出以下错误: Error: Could not find the correct Provider<Application> above this MyApp Widget
To fix,to Provi
我想在initState方法中从数据库中获取一个值。因此,我尝试通过使用Provider.of(context)方法调用函数来访问值。: Could not find the correct Provider<RestaurantTimings> above this MyApp WidgetEflutter ( 6424): // to t