serialized property

Future<Map<String, dynamic>> get serialized

only gets called when the request failed and has to be tried again later

Implementation

Future<Map<String, dynamic>> get serialized async {
  //when storing files we have to make sure they are permanently stored, not only in cache
  final scope = _deriveScopeFromJson(json);
  String scoped(String base) =>
      scope != null && scope.isNotEmpty ? '$scope/$base' : base;

  this.multipartFileNames ??= await Future.wait(
      _multipartFiles! //either names or files are set
          .map((file) async => await OP.permaStoreCachedXFile(
              file, scoped(LOCALLY_ADDED_PREFIX + file.name))));
  return _$RequestDataToJson(this);
}