草庐IT

reference-parameters

全部标签

flutter - 错误 : The argument type '(int) → dynamic' can't be assigned to the parameter type '(String) → void'

我有一些字段发布String和int,String字段工作正常,我在数据库中获取这些值,在int类型字段中,我收到此错误消息。Theargumenttype'(int)→dynamic'can'tbeassignedtotheparametertype'(String)→void'.我正在使用bloc发布到firebase数据库。这是它的样子。Widgetbuild(BuildContextcontext){finaltrackerBloc=Provider.of(context);StringdocId=DateTime.now().millisecondsSinceEpoch.to

flutter - 错误 : The argument type 'MaterialPageRoute' can't be assigned to the parameter type 'Route<Map>'

我正在学习flutter,这段代码直接来自老师。我知道flutter一直在变化,这可能就是它没有运行的原因。不管怎样,它是:classKlimaticextendsStatefulWidget{@override_KlimaticStatecreateState()=>new_KlimaticState();}class_KlimaticStateextendsState{String_cityEntered;Future_goToNextScreen(BuildContextcontext)async{Mapresults=awaitNavigator.of(context).pus

dart - flutter 错误 :The argument type 'Future<Image>' can't be assigned to the parameter type 'Widget'

我在使用flutterflame库时遇到了这个错误Theargumenttype'Future'can'tbeassignedtotheparametertype'Widget'.我的代码是:import'package:flutter/material.dart';import'package:flame/flame.dart';classTileMapextendsStatefulWidget{@override_TileMapStatecreateState()=>_TileMapState();}class_TileMapStateextendsState{@overrideW

list - 使用 ListView 时出现错误 : The named parameter 'children' isn't defined,

我正在使用Firebase实时数据库检索信息,然后将其呈现在可滚动的数据表中。为了使DataTable可滚动,我将它包装在一个ListView中,按照这篇文章的评论:DataTable-makescrollable,setbackgroundcolourandfix/freezeheaderrowandfirstcolumn这是我的代码:import'package:flutter/material.dart';import'package:firebase_database/firebase_database.dart';import'cprdata.dart';import'dar

dart - flutter 错误 : Attempt to invoke virtual method 'void com.google.firebase.auth.internal.zzab.zzf(int)' on a null object reference, null

每当我构建我的应用程序时,我的应用程序都会成功构建,但在将其安装到设备时,我会遇到以下错误并且应用程序在设备上崩溃并显示白屏。Launchinglib/main.dartonPixel2XLindebugmode...Initializinggradle...Resolvingdependencies...Running'gradlewassembleDebug'...Configuration'compile'inproject':app'isdeprecated.Use'implementation'instead.registerResGeneratingTaskisdeprec

dart - 错误 : The argument type '() → Null' can't be assigned to the parameter type '(Null) → FutureOr<dynamic>'

import'package:flutter/material.dart';import'package:camera/camera.dart';classRegisterextendsStatefulWidget{Listcameras;@override_RegistercreateState(){return_Register();}Register(this.cameras);}class_RegisterextendsState{CameraControllercontroller;@overrideWidgetbuild(BuildContextcontext){retur

dart - 错误 : The argument type '(File) → Future<dynamic>' can't be assigned to the parameter type '(dynamic) → FutureOr<dynamic>'

我正在尝试编译示例:https://github.com/dart-lang/googleapis_examples/blob/master/drive_upload_download_console/bin/main.dart我得到以下Dart编译错误error:Theargumenttype'(File)→Future'can'tbeassignedtotheparametertype'(dynamic)→FutureOr'.(argument_type_not_assignableatlib/google_api_rest/main.dart:49)来自以下代码://Downlo

parameters - Flutter:将传递的参数更改为 "StatefulWidget"

我有一个名为BounceContainer的StatefulWidget。此类包含一个参数child,就像典型的Flutter小部件一样。基本上,只要用户点击它,它就会弹出child。我现在传递child参数的方式如下:classBounceContainerextendsStatefulWidget{finalWidgetchild;//Declaring"child"BounceContainer({this.child});//Initializing"child"//Passing"child"toState@override_BounceContainerStatecreat

sqlite - java.lang.NullPointerException : Attempt to invoke virtual method on a null object reference to select sqlite 异常

我是安卓世界的新手。我有编码问题。这只是一个小错误,我不知道它不起作用,即使我改变了其他方法,但错误仍然是同样的错误。这里的错误发生在logcat:java.lang.NullPointerException:Attempttoinvokevirtualmethod'android.database.Cursorcom.example.zellon.surveyapps.DatabaseHelper.getAData()'onanullobjectreference我只想选择数据库中的数据来获取一个id但不能因为上面的错误。我将给出一个我编码的代码,用于从数据库中选择数据surveyi

python - sqlite3.接口(interface)错误: Error binding parameter 1 - probably unsupported type

我有一个我无法解决的恼人错误..这是我的功能defsavePicture(pic):try:connection=sqlite3.connect('/home/faris/Desktop/site/site.db')db=connection.cursor()printtype(pic.user.profile_picture)db.execute('INSERTINTOpictures(picture_id,caption,created_time,picture_url,link,username,full_name,profile_picture)VALUES(?,?,?,?,?