notNull static method

void notNull(
  1. dynamic value, [
  2. String? message
])

Asserts that the value is not null

Implementation

static void notNull(dynamic value, [String? message]) {
  if (value == null) {
    throw AssertionError(message ?? 'Value must not be null');
  }
}