Response<T extends Object> constructor

Response<T extends Object>({
  1. int requestCode = 0,
  2. T? data,
  3. List<T>? backups,
  4. List<T>? ignores,
  5. List<T>? result,
  6. double? progress,
  7. Status? status,
  8. String? error,
  9. String? message,
  10. dynamic feedback,
  11. dynamic snapshot,
})

Implementation

Response({
  this.requestCode = 0,
  T? data,
  List<T>? backups,
  List<T>? ignores,
  List<T>? result,
  double? progress,
  Status? status,
  String? error,
  String? message,
  this.feedback,
  this.snapshot,
})  : _data = data,
      _backups = backups,
      _ignores = ignores,
      _result = result,
      _progress = progress,
      _error = error,
      _message = message,
      _status = status ??= (data != null || result != null)
          ? Status.ok
          : (error ?? '').isNotEmpty
              ? Status.error
              : null;