isAcceptableValue method Null safety

VerificationResult isAcceptableValue(
  1. T value,
  2. VerificationMeta meta

Checks whether the given value fits into this column. The default implementation only checks for nullability, but subclasses might enforce additional checks. For instance, a text column might verify that a text has a certain length.


VerificationResult isAcceptableValue(T value, VerificationMeta meta) {
  final nullOk = $nullable;
  if (!nullOk && value == null) {
    return _invalidNull;
  } else {
    return additionalChecks?.call(value, meta) ??
        const VerificationResult.success();