asBean<T> method
Implementation
T? asBean<T>(String key, Function(Map<String, dynamic> json) toBean, {bool decode = false}) {
try {
if (decode && this[key] != null && this[key] != 'null') {
return toBean(json.decode(this[key]));
}
if (this[key] != null && _isClassBean(this[key])) {
return toBean(this[key]);
}
} catch (e) {
_print('json 解析异常,异常值:"$key":${this[key]}');
}
return null;
}