MBMedia constructor
Initializes a file with the dictionary returned by the MBurger APIs.
- Parameters:
dictionary
: Thedictionary
returned by the APIs.
Implementation
MBMedia({required Map<String, dynamic> dictionary})
: id = dictionary['id'] is int ? dictionary['id'] as int : 0,
uuid = dictionary['uuid'] is String ? dictionary['uuid'] as String : '',
url = dictionary['url'] is String ? dictionary['url'] as String : '',
size = dictionary['size'] is int ? dictionary['size'] as int : 0,
mimeType = dictionary['mime_type'] is String
? dictionary['mime_type'] as String
: '',
fileName = dictionary['file_name'] is String
? dictionary['file_name'] as String
: '';