국가 선택을 위한 하단 시트를 제공하는 플러터 패키지로, 국기와 선택적 다이얼 코드를 표시합니다. 국제 전화번호 입력이 필요한 양식에 적합한 깔끔하고 사용자 친화적인 인터페이스를 제공합니다. 가볍고 기존 플러터 앱에 원활하게 통합되며, 커스터마이징을 지원하며 현대적이고 직관적인 UX를 고려해 설계되었습니다.
사용 사례
국제 전화번호 입력
사용자 프로필 국가 선택
다국어 앱 로컬라이제이션
여행 또는 배송 양식 국가 선택기
인증 흐름 국가 선택
주요 기능
바텀 시트 UI
국가 깃발 표시
선택적 다이얼 코드 지원
사용자 정의 가능한 외관
Flutter 폼과의 간편한 통합
경량이고 빠름
적합한 대상
국가 선택이 필요한 모바일 앱
전화번호 입력이 필요한 양식
글로벌 사용자를 대상으로 하는 앱
간단한 국가 선택기 필요 개발자
사용자 인터페이스 중심의 Flutter 프로젝트
고려 사항
국가 및 통화 코드만 제한
내장 검색 기능 없음
지역 필터링을 지원하지 않습니다
선택한 국가 데이터의 수동 처리가 필요합니다
오프라인 모드가 지정되지 않았습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Ola Like Country Picker
A new country picker Flutter package built in Dart.
To use the Country Picker look at the example below :
Example Usage:
class_MyHomePageStateextendsState<MyHomePage> {
CountryPicker countryPicker;
Country country = Country.fromJson(countryCodes[0]); // select initial country @overridevoidinitState() {
super.initState();
countryPicker = CountryPicker(onCountrySelected: (Country country) {
print(country);
setState(() {
this.country = country;
});
});
}
@overrideWidgetbuild(BuildContext context) {
// To simply launch the country picker// use countryPicker.launch(context)// to forcefully dismiss use countryPicker.dismiss()// simple example could bereturnGestureDetector(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage(country.flagUri, package: 'ola_like_country_picker'),
),
),
),
onTap: () {
countryPicker.launch(context);
},
);
}
}
Output
Parameters
parameter
default
required
type
remark
onCountrySelected
null
yes
OnCountrySelectedCallback
called when country is selected.
showTitle
true
no
bool
whether to show title or not.
titleText
"Select your country"
no
String
text for title.
To simply use country list view any where use CountryListView() and to modify attributes like flagWidth, flagHeight, countryTitle style etc use below arguments like