checkNotNull<T> function

T checkNotNull<T>(
  1. T object, [
  2. String? message
])

Implementation

T checkNotNull<T>(T object, [String? message]) {
  if (object == null) {
    throw ArgumentError('$message ${T.toString()}');
  } else {
    return object;
  }
}