var temp=cartString==null?[]:json.decode(cartString.toString());
// 转换为list形式
List tempList=(tempas as List).cast();
// 转化为字符串
cartString=json.encode(tempList).toString();
var temp=cartString==null?[]:json.decode(cartString.toString());
// 转换为list形式
List tempList=(tempas as List).cast();
// 转化为字符串
cartString=json.encode(tempList).toString();
本文标题:类型转换
本文链接:https://www.haomeiwen.com/subject/edqfrktx.html
网友评论