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

前端 未结 1 1466
不思量自难忘°
不思量自难忘° 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();
    

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

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

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