isValid method

  1. @override
bool isValid(
  1. Set<E> instance
)
override

Tells whether the instance is valid.

Implementation

@override
bool isValid(Set<E> instance) {
  final length = this.length;
  if (length != null && !length.isValid(instance.length)) {
    return false;
  }
  if (!instance.every(elementKind.isValid)) {
    return false;
  }
  return super.isValid(instance);
}