getPhoneNumber static method
Returns a phone number from the PhoneInput that was provided a key
.
Implementation
static String? getPhoneNumber(GlobalKey<PhoneInputState> key) {
final state = key.currentState!;
if (state.formKey.currentState!.validate()) {
return state.phoneNumber;
}
return null;
}