ImageModel.fromMap constructor

ImageModel.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory ImageModel.fromMap(Map<String, dynamic> map) {
  return ImageModel(
    url: map['url'] as String,
    width: map['width'] != null ? map['width'] as int : null,
    height: map['height'] != null ? map['height'] as int : null,
  );
}