validator method
A function that must return a validation error if the provided
value is invalid and null otherwise.
Implementation
@override
TermsAndConditionsError? validator(bool value) {
return value ? null : TermsAndConditionsError.notAccepted;
}