static T? generateOBJ<T>(json) { if (json == null) { return null; } else { return jsonDecode(jsonEncode(json)) as T; } }
Flutter 泛型实例化工具方法
4 min read
static T? generateOBJ<T>(json) { if (json == null) { return null; } else { return jsonDecode(jsonEncode(json)) as T; } }