deserialize static method
Implementation
static FFUploadedFile deserialize(String val) {
final serializedData = jsonDecode(val) as Map<String, dynamic>;
final data = {
'name': serializedData['name'] ?? '',
'bytes': serializedData['bytes'] ?? Uint8List.fromList([]),
'height': serializedData['height'],
'width': serializedData['width'],
'blurHash': serializedData['blurHash'],
};
return FFUploadedFile(
name: data['name'] as String,
bytes: Uint8List.fromList(data['bytes'].cast<int>().toList()),
height: data['height'] as double?,
width: data['width'] as double?,
blurHash: data['blurHash'] as String?,
);
}