checkNotNull method - ArgumentError class - dart:core library (original) (raw)
checkNotNull<T> static method
T checkNotNull<T>(
- T? argument, [
- String? name ])
Throws if argument
is null
.
If name
is supplied, it is used as the parameter name in the error message.
Returns the argument
if it is not null.
Implementation
static T checkNotNull<T>(T? argument, [String? name]) =>
argument ?? (throw ArgumentError.notNull(name));