flutter 报错:type ‘List<dynamic>‘ is not a subtype of type ‘List<String>‘
Android原生调用flutter的方法,传递的参数是ArrayList<String>,flutter端接收到参数时转为List<String>:List<String> data = methodCall.arguments;报错:type 'List<dynamic>' is not a subtype of type 'List<St
·
Android原生调用flutter的方法,传递的参数是ArrayList<String>
,flutter端接收到参数时转为List<String>
:
List<String> data = methodCall.arguments;
报错:
type 'List<dynamic>' is not a subtype of type 'List<String>'
解决:
List<String> data = methodCall.arguments.cast<String>();
How to cast < dynamic> to List< String>?
Flutter出现List< dynamic> is not a subtype of type List解决方法
flutter 一直出现type ‘List<dynamic>‘ is not a subtype of type ‘List<Widget>‘
更多推荐
已为社区贡献41条内容
所有评论(0)