gpt4 book ai didi

flutter 错误 : The argument type 'Object?' can't be assigned to the parameter type 'String'

转载 作者:行者123 更新时间:2023-12-05 08:30:03 24 4
gpt4 key购买 nike

所以我开始学习 dart 和 flutter,在观看一些类(class)时我遇到了这个错误。是否在 flutter 中更改了某些内容,为什么它不起作用?另外,如果我没有附上需要的东西,我很抱歉,我是这个世界上的新人。谢谢!

error part

Column (
children: [

Pytanie(
pytania[_indekspytan]['tekstPytan'],
),

and here is the whole column

Column(

children: [

Pytanie(
pytania[_indekspytan]['tekstPytan'],
),

...(pytania[_indekspytan]['odpowiedzi'] as List<String> ).map((odpowiedz) { //kropki zapobiegaja tworzeniu 2 listy, podmienia wartosci

return Odpowiedz(_odpowiedzi, odpowiedz);

}).toList()


],



),

最佳答案

使用 toString() 怎么样

Pytanie(
pytania[_indekspytan]['tekstPytan']?.toString() ?? ''
),

关于 flutter 错误 : The argument type 'Object?' can't be assigned to the parameter type 'String' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66749996/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com