主文件中的路由: class MyApp extends StatelessWidget { Widget build(BuildContext context) {'/search'); ], drawer: AppDrawer(), }
} 错误: type '(String) => dynamic' is not a subtype of
我是Flutter的新手。我在构造函数中调用future方法时遇到了问题。我创建了一个方法,它返回一个依赖于所选项目的小部件类。但是我看到错误"type ' Future‘is not a subtype of type 'Widget'“如果我添加了void类型而不是Future类型,它将被执行一次来创建一个主体。return DataB(); if (selectedValue == "c") {
return
该错误指向我所在的上一个页面的导航。您将在其中看到指向CameraScreen的导航。This _ModalScope<dynamic> widget cannot be marked as needing to build because the framework isThe widget which was currently being built when
当转换documentSnapshot.data() as DocumentSnapshot<Map<String, dynamic>>时,我得到了错误:_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'DocumentSnapshot<Map<String, dynamic>>' in type cast
我使用<