checkNotNull<T> static method

T checkNotNull<T>(
  1. T? value,
  2. String type,
  3. String field
)

Throws a BuiltValueNullFieldError if value is null.

Implementation

static T checkNotNull<T>(T? value, String type, String field) {
  if (value == null) {
    throw BuiltValueNullFieldError(type, field);
  }
  return value;
}