v1.0.1+6country_list_pick
Flutter 插件專案,用於選擇國家代碼,將顯示國家代碼、撥號代碼、國家旗幟和國家名稱。
135喜歡 32近 30 天下載130Pub 分數
AndroidiOSWebmacOSWindowsLinux
用於顯示和選擇國家代碼的 Flutter 套件
以下為英文專案原文快照,最新內容請造訪 GitHub。
Flutter plugin to pick country with output name, code, dialcode and flag of country
To use this plugin, add country_list_pick as a dependency in your pubspec.yaml.
CountryListPick(
appBar: AppBar(
backgroundColor: Colors.blue,
title: Text('Choisir un pays'),
),
// if you need custome picker use this
// pickerBuilder: (context, CountryCode countryCode){
// return Row(
// children: [
// Image.asset(
// countryCode.flagUri,
// package: 'country_list_pick',
// ),
// Text(countryCode.code),
// Text(countryCode.dialCode),
// ],
// );
// },
// To disable option set to false
theme: CountryTheme(
isShowFlag: true,
isShowTitle: true,
isShowCode: true,
isDownIcon: true,
showEnglishName: true,
),
// Set default value
initialSelection: '+62',
// or
// initialSelection: 'US'
onChanged: (CountryCode code) {
print(code.name);
print(code.code);
print(code.dialCode);
print(code.flagUri);
},
// Whether to allow the widget to set a custom UI overlay
useUiOverlay: true,
// Whether the country list should be wrapped in a SafeArea
useSafeArea: false
),
To call feedback or getting data from this widget, you can make function in onChanged
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗