toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'name': name,
      'path': path,
      'size': size,
      'type': type,
      'lastModified': lastModified.toIso8601String(),
      'imageInfo': imageInfo != null
          ? {
              'width': imageInfo!.width,
              'height': imageInfo!.height,
              'format': imageInfo!.format,
              'hasAlpha': imageInfo!.hasAlpha,
            }
          : null,
    };