findWithLocales method

Future<List<IntlResourceContent>> findWithLocales(
  1. List<String> locales
)

Finds the resource withe locales.

Implementation

Future<List<IntlResourceContent>> findWithLocales(
    List<String> locales) async {
  var found = <IntlResourceContent>[];
  if (locales.isEmpty) return found;

  for (var l in locales) {
    var resource = await find(l);
    if (resource != null) found.add(resource);
  }

  return found;
}