getCountriesBy method

Future<Iterable<Country>?> getCountriesBy(
  1. bool fun(
    1. Country
    ), {
  2. bool firstCache = true,
  3. bool onErrorTryCache = false,
})

Implementation

Future<Iterable<Country>?> getCountriesBy(bool Function(Country) fun,
        {bool firstCache: true, bool onErrorTryCache: false}) async =>
    (await getCountries(firstCache: firstCache))
        ?.where((country) => fun(country));