getCountries function

Future<void> getCountries(
  1. dynamic context
)

Implementation

Future<void> getCountries(context) async {
  try {
    final response = await Network().getCountries();
    countryListNotifier.value.clear();
    countryListNotifier.value.addAll(response);
    countryListNotifier.notifyListeners();
    //print("countryListNotifier list=${jsonEncode(countryListNotifier.value.length)}");
  } catch (e) {
    //print('catch e=$e');
  }
}