FileUpload.fromJson constructor

FileUpload.fromJson(
  1. Map<String, dynamic> json
)

Creates an instance of FileUpload from a JSON string

Implementation

factory FileUpload.fromJson(Map<String, dynamic> json) => FileUpload(
      base64: json['base64'],
      lastModified: json['lastModified'] == null
          ? null
          : DateTime.fromMillisecondsSinceEpoch(json['lastModified']),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.tryParse(json['lastModifiedDate']),
      name: json['name'],
      size: json['size'],
      type: json['type'],
    );