ImageDto.fromMap constructor
Creates an ImageDto from a map.
map is a map containing the image data with keys 'url', 'width', 'height', and optionally 'isCatalog'.
Returns a new ImageDto instance.
Implementation
factory ImageDto.fromMap(Map<String, dynamic> map) {
return ImageDto(
url: map['url'] as String,
width: map['width'] as int,
height: map['height'] as int,
isCatalog: map['isCatalog'] as bool? ?? false,
);
}