草庐IT

question_type

全部标签

firebase - flutter 错误 : type 'Future<dynamic>' is not a subtype of type 'List<Game>'

我正在尝试构建一个包含不同游戏列表的应用。作为后端,我使用Firebase并且连接工作正常,我对其进行了测试。无论如何,我在用来自firebase的真实数据替换模拟数据时遇到了问题。我总是收到此错误:type'Future'isnotasubtypeoftype'List'我有以下功能:getGames()async{ListnewGamesList=[];QuerySnapshotresult=awaitFirestore.instance.collection('products').getDocuments();Listdocuments=result.documents;doc

flutter - 未处理的异常 : type 'Future<void>' is not a subtype of type 'Future<Photography>' on Firestore

我需要从firestore数据库中获取所有数据。我是这样走的,https://stackoverflow.com/a/55865045/9139407FuturegetPhotography(){Futuredata=awaitdb.collection('photography').document('0yUc5QBGHNNq6WK9CyyF').setData(jsonDecode(jsonEncode(Photography([AllImages(["list"])],"image_url","Shanika","image_url","lovelycouple","Bhanuk

flutter - 未处理的异常 : type 'Future<void>' is not a subtype of type 'Future<Photography>' on Firestore

我需要从firestore数据库中获取所有数据。我是这样走的,https://stackoverflow.com/a/55865045/9139407FuturegetPhotography(){Futuredata=awaitdb.collection('photography').document('0yUc5QBGHNNq6WK9CyyF').setData(jsonDecode(jsonEncode(Photography([AllImages(["list"])],"image_url","Shanika","image_url","lovelycouple","Bhanuk

flutter - 如何解决 List<dynamic> is not a subtype of type 'Map<String, dynamic>?

错误说它无法创建ApplicableFlightFlightSegmentReference有问题Listdynamicisnotasubtypeoftype'MapString,dynamic这是使用json.decode和fromJson的地方varmap=json.decode(response.body)asMap;ResponseGateresponseGate=newResponseGate.fromJson(map);这是json.decode的输出片段..,ApplicableFlight:{FlightReferences:F1,FlightSegmentRefere

flutter - 如何解决 List<dynamic> is not a subtype of type 'Map<String, dynamic>?

错误说它无法创建ApplicableFlightFlightSegmentReference有问题Listdynamicisnotasubtypeoftype'MapString,dynamic这是使用json.decode和fromJson的地方varmap=json.decode(response.body)asMap;ResponseGateresponseGate=newResponseGate.fromJson(map);这是json.decode的输出片段..,ApplicableFlight:{FlightReferences:F1,FlightSegmentRefere

A component required a bean of type ‘...Mapper‘ that could not be found问题解决

错误如图第一步查看配置文件是否正确第二步查看标签是否正确检查UserMapper上是否加上@Mapper补充第二步还是不行的话查看下POM文件是否导入mybatis-plus-boot-starter配置mybatis-plus.mapper-locations无提示信息;此时发现右上角出现感叹号,Cannotresolveconfigurationproperty‘mybatis-plus.mapper-locations’,强行敲完,启动报错。如图所示检查pom文件,发现未引入包:mybatis-plus-boot-starterdependency>groupId>com.baomido

android - D8 : Program type already present: android. support.v4.media.MediaBrowserCompat$CustomActionCallback

我是flutter的新手,我构建了一个非常小的应用程序来显示当前的纬度和经度,这需要我在pubspec.yaml中添加两个依赖项:-location和simple_permissions获取当前用户位置并请求位置权限。但是当我运行该应用程序时,它显示以下错误:-Gradletask'assembleDebug'...D8:Programtypealreadypresent:android.support.v4.media.MediaBrowserCompat$CustomActionCallbackFAILURE:Buildfailedwithanexception.*Whatwent

android - D8 : Program type already present: android. support.v4.media.MediaBrowserCompat$CustomActionCallback

我是flutter的新手,我构建了一个非常小的应用程序来显示当前的纬度和经度,这需要我在pubspec.yaml中添加两个依赖项:-location和simple_permissions获取当前用户位置并请求位置权限。但是当我运行该应用程序时,它显示以下错误:-Gradletask'assembleDebug'...D8:Programtypealreadypresent:android.support.v4.media.MediaBrowserCompat$CustomActionCallbackFAILURE:Buildfailedwithanexception.*Whatwent

flutter - '_Type' 不是类型 'Widget' 的子类型

我把NoContentPage中的红屏'_Type'isnotasubtypeoftype'Widget'异常记下了完整的组件代码并调用了place到StatefulWidget中。这段代码有什么问题。我认为这是flutter中非常常见的异常。classNoContentPageextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){return(newContainer(width:320.0,child:newColumn(children:[Center(child:Text(AppLocalization

flutter - '_Type' 不是类型 'Widget' 的子类型

我把NoContentPage中的红屏'_Type'isnotasubtypeoftype'Widget'异常记下了完整的组件代码并调用了place到StatefulWidget中。这段代码有什么问题。我认为这是flutter中非常常见的异常。classNoContentPageextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){return(newContainer(width:320.0,child:newColumn(children:[Center(child:Text(AppLocalization