nullSafeThrow method

int nullSafeThrow({
  1. Exception? exception,
})

如果为空抛出异常

Implementation

int nullSafeThrow({Exception? exception}) {
  if (this == null) {
    throw exception ?? ArgumentError('Value should not be null');
  }
  return this!;
}