PhoneNumberModule constructor

PhoneNumberModule({
  1. required String countryCode,
  2. required String phoneNumber,
})

Implementation

PhoneNumberModule({
  required this.countryCode,
  required this.phoneNumber,
}) {
  if (countryCode != '+20') {
    throw Exception('countryCode must be +20');
  }
  if (phoneNumber.length != 10) {
    throw Exception('phoneNumber must be 10 digits');
  }
}