byName static method

Country? byName(
  1. String name
)

Country by common name. Returns null if not found.

Implementation

static Country? byName(String name) =>
    _all.firstWhereOrNull((c) => c.name == name);