getInitCountry method

dynamic getInitCountry()

Implementation

getInitCountry() {
  if (Countries.countryList
      .where((element) => element["dial_code"] == dialCodeInit)
      .isNotEmpty) {
    selectedCountry = Country.fromJson(Countries.countryList
        .firstWhere((element) => element["dial_code"] == dialCodeInit));
  } else {
    throw Exception("Select dial code for start country");
  }
  update();
}