패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.3.1

us_states

주 이름과 약어를 다루는 간단한 Dart 라이브러리입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.9만
좋아요
12
Pub 점수
160

패키지 설치

flutter pub add us_states

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

미국 주 이름과 약어를 다루는 간단한 Dart 라이브러리입니다. 전체 이름, 두 글자 약어 및 기타 일반적인 매핑을 포함한 주 데이터에 쉽게 접근할 수 있습니다. 주 기반 검색, 폼 검증 또는 주소 처리가 필요한 애플리케이션에 적합합니다. 이 패키지는 가볍고 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다. webb.engineer에서 유지보수되며, 투명성과 커뮤니티 기여를 위해 GitHub에 호스팅되어 있습니다.

사용 사례

  • 주소 양식 검증
  • 국가 드롭다운 생성
  • 지리 데이터 매핑
  • 사용자 위치 선택
  • 미국 주별 데이터 정규화

주요 기능

  • 전체 주 이름에서 약어 검색
  • 약어에서 전체 이름으로의 변환
  • 미국 전역 50개 주 지원
  • 크로스 플랫폼 호환성
  • 경량이며 통합이 쉬움

적합한 대상

  • 폼 처리 앱
  • 위치 기반 서비스
  • 데이터 입력 도구
  • 지리정보시스템
  • 상태 데이터가 필요한 Dart 프로젝트

고려 사항

  • 미국 주들에만 제한
  • 지역 또는 카운티에 대한 지원 없음
  • 새로운 상태 변경을 위해 수동 업데이트가 필요합니다
  • 국제 국가 데이터에 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

us_states

Simple Dart library to deal with state names and abbreviations.

CircleCI

Installation

Add the following to dependencies section in your pubspec.yml:

  us_states: ^1.3.1

Usage

Note
  • All methods that take a string are case-insensitive. No need to adjust case before passing string into a method.
Get a state's name from an abbreviation

Returns null if not found.

USStates.getName("IA");
// returns "Iowa"
Get a state's abbreviation from name

Returns null if not found.

USStates.getAbbreviation("Iowa");
// returns "IA"
Get a list of all state names
USStates.getAllNames();
// returns ["Alaska", "Alabama", ...]
Get a list of all state abbreviations
USStates.getAllAbbreviations();
// returns ["AK", "AL", ...]
Get a map with state abbreviations as keys and names as values
USStates.getAbbreviationMap();
// returns {"AK": "Alaska", "AL": "Alabama", ...}
Get a map with state names as keys and abbreviations as values
USStates.getNameMap();
// returns {"Alaska": "AK", "Alabama": "AL", ...}

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위