formatNumberSync function

String formatNumberSync(
  1. String number, {
  2. CountryWithPhoneCode? country,
  3. PhoneNumberType phoneNumberType = PhoneNumberType.mobile,
  4. PhoneNumberFormat phoneNumberFormat = PhoneNumberFormat.international,
  5. bool removeCountryCodeFromResult = false,
  6. bool inputContainsCountryCode = true,
})

Implementation

String formatNumberSync(
  final String number, {
  final CountryWithPhoneCode? country,
  final PhoneNumberType phoneNumberType = PhoneNumberType.mobile,
  final PhoneNumberFormat phoneNumberFormat = PhoneNumberFormat.international,
  final bool removeCountryCodeFromResult = false,
  final bool inputContainsCountryCode = true,
}) {
  return FlutterLibphonenumberPlatform.instance.formatNumberSync(
    number,
    country: country,
    phoneNumberType: phoneNumberType,
    phoneNumberFormat: phoneNumberFormat,
    removeCountryCodeFromResult: removeCountryCodeFromResult,
    inputContainsCountryCode: inputContainsCountryCode,
  );
}