checkNotNull<T> static method
- 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));