getPhoneNumber static method

String? getPhoneNumber(
  1. GlobalKey<PhoneInputState> key
)

Implementation

static String? getPhoneNumber(GlobalKey<PhoneInputState> key) {
  final state = key.currentState!;

  if (state.formKey.currentState!.validate()) {
    return state.phoneNumber;
  }

  return null;
}