lajz/currency_pickers
국가, 코드, 국기, 통화 및 여러 가지 선택 방법을 이용할 수 있습니다… 한 위젯만 멀리…
- Stars
- 5
- Forks
- 5
- 최근 푸시(UTC)
- 2023. 7. 4.
- 프로젝트 상태
- 활성
언어DartObjective-CJava
사용 중인 의존성
의존성 목록 2 개
- flutter
{"sdk":"flutter"} - flutter_test개발 의존성
{"sdk":"flutter"}
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
README 펼치기 / 접기
currency_pickers
Currency picker for flutter
CurrencyPickerDropdown example
CurrencyPickerDropdown(
initialValue: 'tr',
itemBuilder: _buildDropdownItem,
onValuePicked: (Country country) {
print("${country.name}");
},
),
Widget _buildDropdownItem(Country country) => Container(
child: Row(
children: <Widget>[
CurrencyPickerUtils.getDefaultFlagImage(country),
SizedBox(
width: 8.0,
),
Text("+${country.currencyCode}(${country.isoCode})"),
],
),
);
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 phone code'),
onValuePicked: (Country country) =>
setState(() => _selectedDialogCountry = country),
itemBuilder: _buildDialogItem)),
);
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.