CustomFileSyncEvent.fromJson constructor

CustomFileSyncEvent.fromJson(
  1. Map<String, dynamic> jsonDecode
)

Implementation

CustomFileSyncEvent.fromJson(Map<String, dynamic> jsonDecode) {
  filesTried = jsonDecode['filesTried'];
  sizeUploaded = jsonDecode['sizeUploaded'];
  totalNumberOfFiles = jsonDecode['totalNumberOfFiles'];
  totalSize = jsonDecode['totalSize'];
  fileSyncStatus = jsonDecode['fileSyncStatus'] == null
      ? null
      : ManualFileSyncStatus.values.firstWhere((element) {
          return element.value.toLowerCase() ==
              jsonDecode['fileSyncStatus'].toLowerCase();
        });
}