castValue<T> method

T castValue<T>()

Implementation

T castValue<T>() {
  if (value is T) {
    return value as T;
  }
  throw Exception('Invalid cast');
}