checkInstance method

void checkInstance(
  1. Object? value
)

Implementation

void checkInstance(Object? value) {
  if (value is! T) {
    throw ArgumentError.value(value, 'value', 'Not an instance of $T');
  }
}