FileResource.fromJson constructor

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

Implementation

factory FileResource.fromJson(Map<String, dynamic> json) {
  const JsonEncoder encoder = JsonEncoder();
  final dynamic lastSyncSummary = encoder.convert(json['lastSyncSummary']);
  return FileResource(
      id: json['id'],
      elementId: json['elementId'],
      elementType: json['elementType'],
      formInstance: json['formInstance'],
      resourceId: json['resourceId'],
      name: json['name'],
      contentType: json['contentType'],
      contentLength: json['contentLength'],
      storageStatus: json['storageStatus'],
      localFilePath: json['localFilePath'],
      synced: json['synced'],
      syncFailed: json['syncFailed'],
      lastSyncSummary: lastSyncSummary,
      lastSyncDate: json['lastSyncDate'],
      created: json['created'],
      lastUpdated: json['lastUpdated'],
      dirty: json['dirty'] ?? false);
}