ByteValidationExtension extension

Extension to add validation methods to ByteConverter.

on

Methods

assertMaxSize(ByteConverter maxSize, [String? name]) → void

Available on ByteConverter, provided by the ByteValidationExtension extension

Asserts that this size does not exceed maxSize.
assertPositive([String? name]) → void

Available on ByteConverter, provided by the ByteValidationExtension extension

Asserts that this size is positive.
isInRange({required ByteConverter min, required ByteConverter max}) bool

Available on ByteConverter, provided by the ByteValidationExtension extension

Returns true if this size is within the specified range.
isWithinQuota(ByteConverter quota) bool

Available on ByteConverter, provided by the ByteValidationExtension extension

Returns true if this size is within quota.
validate({ByteConverter? maxSize, ByteConverter? minSize, bool requirePositive = false}) ValidationResult

Available on ByteConverter, provided by the ByteValidationExtension extension

Validates this size against the given constraints.