List<String> datas;
final tags = record['tags'];
if (tags != null) {
datas = tags;
}
E/flutter (32539): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception:
type 'List<dynamic>' is not a subtype of type 'List<String>'
List<String> datas;
final tags = record['tags']?.cast<String>() ;
if (tags != null) {
datas = tags;
}
http 통신할때 모델을 리스트로 만들어줄때 엄청많이나는 오류였는데
var parsed = jsondcode(res.body).cast<Map<String,dynamic>>(); 이런식으로하니 잘되네요 감사합니다.