init method

Future init({
  1. String? initialCountryCode,
  2. List<String>? excludeCountries,
  3. List<String>? includeCountries,
  4. String? initialPhoneNumber,
  5. String? locale,
  6. String? errorText,
})

Implementation

Future init(
    {String? initialCountryCode,
    List<String>? excludeCountries,
    List<String>? includeCountries,
    String? initialPhoneNumber,
    String? locale,
    String? errorText}) async {
  _countries = await loadCountries(_context, locale: locale);
  _visibleCountries = _countries;
  _selectedCountry = _countries.first;
  _errorText = errorText;
  _initialCountryCode = initialCountryCode;
  _excludeCountries = excludeCountries;
  _includeCountries = includeCountries;
  _initialPhoneNumber = initialPhoneNumber;
  _selectValues();
}