castResult<T> method

T castResult<T>()

Implementation

T castResult<T>() {
  final result = this.result;
  if (result is! T) {
    throw FormatException('Invalid response result type!', result);
  }
  return result;
}