Flutter: InternalLinkedHashMap' has no instance method 'cast' with matching arguments

前端 未结 1 1464
不思量自难忘°
不思量自难忘° 2021-01-18 12:50

I\'m unable to find solutions from the previously available question, I have cast json string to map

Below is my API calling method.

相关标签:
1条回答
  • 2021-01-18 13:11

    Use instead

    .cast<String,dynamic>();
    

    See also https://api.dartlang.org/stable/2.0.0/dart-core/Map/cast.html

    Usually it's better to use Map<String,String>.from(oldMap) instead of cast<...>(...)

    0 讨论(0)
提交回复
热议问题