isEnabled function
Implementation
bool isEnabled(ApplyAuthFormModel state) {
final regex = RegExp(r"[0-9]{3}[-|\s]?[0-9]{3,4}[-|\s]?[0-9]{4}");
final isMathched = regex.hasMatch(state.phoneNumber);
if (!isMathched) {
return false;
}
if (!state.isPrivacyAgreed) {
return false;
}
if (!state.isThirdPrivacyAgreed) {
return false;
}
if (!state.isServiceAgreed) {
return false;
}
if (!state.isLocationServiceAgreed) {
return false;
}
return true;
}