我使用一个颤振FutureBuilder小部件和SharedPreferences,在使用它们获取语言并将它们传递给子小部件之前等待加载首选项。; String?:我要传递的方法和小部件都是用来发送类型错误The argument type 'Object?'can't be assigned to the parameter
导致的问题是模型中的类别列表,我已经执行了强制转换方法,但它仍然不起作用。请帮帮我,我被困在这里2天了。<dynamic>' is not a subtype of type 'List<String>'
FutureBuilder/src/widgets/async.dart:773:55)
#3 StatefulElement.build (
这是我在quiz.dart上的代码 final List<Map<String, Object>> questions;(questions[question_index]['Answers'] as List<Map<String, Object>>)
.map((answer) {这是我在answe
我刚开始使用Flutter编写代码,现在我正在尝试从restapi获取数据。我在debug中得到了这个错误类型'list<dynamic>' is not a subtype of type 'string' ? 有什么解决方案吗?apiservice: Future<List<Petani>> getDafPet() async {
final response = await client.get("http
代码如下: final List<Map<String, dynamic>> questions; children: [
Question(questions[question_index]['QuestionText'] as String(questions[question_index]['Answers'] a
一旦按下这个图标按钮,就会打开一个howOkCancelAlertDialog,如果您单击ok,就会打开一个showTextInputDialog,将从键盘输入的输入分配给列表类型的输入变量。context.read<SettingsBloc>().changePassword(input as String);