isValid method

  1. @override
bool isValid()
override

Implementation

@override
bool isValid() {
  if (this.value != null) {
    // if the value is not null ==> check the sign of the value
    if (this.value?.sign == -1) {
      return false;
    }
  }
  return true;
}