如果有人能帮我发现这个错误在我的颤音应用程序中发生了什么,我会很感激的。我认为从数据库流返回的数据类型存在问题======== Exceptionthrown building UserProfile(dirty, dependencies: [MediaQuery]):
Bad state: cannot get a field on a DocumentSnapsho
当我运行我的应用程序(,fireBase )时,我得到了这个E/颤振(25055)错误E/flutterflutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatformE/flutter (25055): #0
稍后,我将希望向我的应用程序添加新功能,这将需要在Firestore文档中添加新的字段。如何检查该字段是否存在于文档中,如果不存在,如何返回默认值?'', // This field does not exist yet and throws error}Bad state: field does not existwithin the DocumentSnapshotPlatform
每当我在Flutter中的Messenger应用程序的搜索栏中搜索用户时,我都会得到以下错误: ======== Exception caught by widgets library ==============Bad state: field does not exist within the DocumentSnapshotPlatformWhen the exception was thrown, this was