Continent.fromWireName constructor

Continent.fromWireName(
  1. String wireName
)

Creates continent with a decoded json object from countries

Implementation

factory Continent.fromWireName(String wireName) {
  switch (wireName) {
    case africaWireName:
      return africa;

    case antarcticaWireName:
      return antarctica;

    case asiaWireName:
      return asia;

    case australiaWireName:
      return australia;

    case europeWireName:
      return europe;

    case northAmericaWireName:
      return northAmerica;

    case southAmericaWireName:
      return southAmerica;

    default:
      throw ArgumentError('Unsupported wireName: $wireName');
  }
}