from CountryName Factory · Issue #73 · chandrabezzo/CountryCodePicker · GitHub
Skip to content

from CountryName Factory #73

Open
Open

Description

@david-legend

Just a simple method for getting a country using their name will be helpful.
I dont want to create my own extension method

Activity

  1. MrRoy121 commented on Mar 6, 2026

    @MrRoy121

    The package already exports codes and CountryCode — it's doable without any changes:
    This is already possible using the exported API:

    final country = codes
      .map((c) => CountryCode.fromJson(c))
      .firstWhere((c) => c.name == 'Italy');
    

    No extension method needed. Closing as expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions