AssetInfo.fromJson constructor
AssetInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AssetInfo.fromJson(Map<String, dynamic> json) => AssetInfo(
name: json['name'],
path: json['path'],
size: json['size'],
type: json['type'],
lastModified: DateTime.parse(json['lastModified']),
imageInfo: json['imageInfo'] != null
? ImageInfo(
width: json['imageInfo']['width'],
height: json['imageInfo']['height'],
format: json['imageInfo']['format'],
hasAlpha: json['imageInfo']['hasAlpha'],
)
: null,
);