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

country_currency_pickers 표지
패키지 상세v3.0.0

country_currency_pickers

국가, 코드, 깃발, 화폐 및 여러 가지 선택 방법을 제공합니다... 하나의 위젯만 멀지 않은 곳에...

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.4천
좋아요
39
Pub 점수
150

패키지 설치

flutter pub add country_currency_pickers

패키지 개요

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

국가 및 통화 선택 기능을 포괄적으로 제공하는 플러터 패키지로, 국가 이름, 코드, 깃발 및 통화 정보를 포함합니다. 사용자 정의 가능한 UI 옵션을 갖춘 단일 위젯으로 국가와 통화를 선택할 수 있습니다. 국제화, 결제 양식 또는 사용자 위치 설정이 필요한 앱에 적합합니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 모든 주요 플랫폼을 지원합니다.

사용 사례

  • 국제 양식 입력
  • 결제 시 통화 선택
  • 사용자 프로필 로컬라이제이션
  • 다국어 앱 설정
  • 여행 및 물류 앱
  • 국가 선택이 있는 사용자 온보딩

주요 기능

  • 내장된 국가 및 통화 데이터
  • 플래그 아이콘 지원
  • 사용자 정의 가능한 피커 위젯
  • 여러 플랫폼을 지원합니다
  • Flutter 폼과의 간편한 통합
  • 검색 및 필터링 가능한 목록

적합한 대상

  • 전자상거래 앱
  • 글로벌 여행 애플리케이션
  • 금융 및 은행 도구
  • 다국어 모바일 앱
  • 사용자 등록 흐름

고려 사항

  • 최신 데이터 업데이트를 위해 인터넷이 필요합니다
  • 내장된 데이터로 인해 초기 번들 크기가 커짐
  • 내부 UI 컴포넌트의 사용자 지정이 제한적
  • 다크 모드 호환성을 위해 추가적인 스타일링이 필요할 수 있습니다
  • 매우 큰 데이터 세트에 최적화되지 않음

원본 README

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

country_currency_pickers

Countries, codes, flags, currency and several way of picking them at your service...one widget away...

CountryPickerDropdown example
 CountryPickerDropdown(
            initialValue: 'tr',
            itemBuilder: _buildDropdownItem,
            onValuePicked: (Country country) {
              print("${country.name}");
            },
          ),
 Widget _buildDropdownItem(Country country) => Container(
        child: Row(
          children: <Widget>[
            CountryPickerUtils.getDefaultFlagImage(country),
            SizedBox(
              width: 8.0,
            ),
            Text("+${country.phoneCode}(${country.isoCode})"),
          ],
        ),
      );
CurrencyPickerDropdown example
 CurrencyPickerDropdown(
            initialValue: 'INR',
            itemBuilder: _buildCurrencyDropdownItem,
            onValuePicked: (Country country) {
              print("${country.name}");
            },
          ),
 Widget _buildCurrencyDropdownItem(Country country) => Container(
        child: Row(
          children: <Widget>[
            CountryPickerUtils.getDefaultFlagImage(country),
            SizedBox(
              width: 8.0,
            ),
            Text("${country.currencyCode}"),
          ],
        ),
      );
CountryPickerDialog example
void _openCountryPickerDialog() => showDialog(
        context: context,
        builder: (context) => Theme(
            data: Theme.of(context).copyWith(primaryColor: Colors.pink),
            child: CountryPickerDialog(
                titlePadding: EdgeInsets.all(8.0),
                searchCursorColor: Colors.pinkAccent,
                searchInputDecoration: InputDecoration(hintText: 'Search...'),
                isSearchable: true,
                title: Text('Select your phone code'),
                onValuePicked: (Country country) =>
                    setState(() => _selectedDialogCountry = country),
                itemBuilder: _buildDialogItem)),
      );
CurrencyPickerDialog example
void _openCurrencyPickerDialog() => showDialog(
        context: context,
        builder: (context) => Theme(
            data: Theme.of(context).copyWith(primaryColor: Colors.pink),
            child: CurrencyPickerDialog(
                titlePadding: EdgeInsets.all(8.0),
                searchCursorColor: Colors.pinkAccent,
                searchInputDecoration: InputDecoration(hintText: 'Search...'),
                isSearchable: true,
                title: Text('Select your Currency'),
                onValuePicked: (Country country) =>
                    setState(() => _selectedDialogCountry = country),
                itemBuilder: _buildCurrencyDialogItem)),
      );
CountryPickerCupertino example
 void _openCupertinoCountryPicker() => showCupertinoModalPopup<void>(
      context: context,
      builder: (BuildContext context) {
        return CountryPickerCupertino(
          pickerSheetHeight: 300.0,
          onValuePicked: (Country country) =>
              setState(() => _selectedCupertinoCountry = country),
        );
      });
CurrencyPickerCupertino example
 void _openCupertinoCurrencyPicker() => showCupertinoModalPopup<void>(
      context: context,
      builder: (BuildContext context) {
        return CurrencyPickerCupertino(
          pickerSheetHeight: 300.0,
          onValuePicked: (Country country) =>
              setState(() => _selectedCupertinoCountry = country),
        );
      });

Credits

Forked from country_pickers repo. Thanks goes to country-flags repo for the flag image assets. Learn Pain Less | Code Academy (learn to code)

카테고리

소스 저장소

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

아직 데이터가 없습니다.