fromJson static method

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

Implementation

static RemoteFile? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return RemoteFile(
    id: (json['id'] as String?) ?? '',
    uniqueId: (json['unique_id'] as String?) ?? '',
    isUploadingActive: (json['is_uploading_active'] as bool?) ?? false,
    isUploadingCompleted: (json['is_uploading_completed'] as bool?) ?? false,
    uploadedSize: (json['uploaded_size'] as int?) ?? 0,
  );
}