Xmarmalade /
alisthelper
Alist Helper is an application developed using Flutter, designed to simplify the use of the desktop version of alist. It can manage alist, allowing you to easily start and stop the alist program.
Loading repository data…
nimishbansal / repository
It is a country picker widget built in flutter/Dart
A new country picker Flutter package built in Dart.
It is Flutter plug-n-play country picker package.
CountryPicker countryPicker = CountryPicker(
onCountrySelected:(country){
print(country);
},
);
countryPicker.launch(context)
https://pub.dev/packages/ola_like_country_picker#-installing-tab-
class _MyHomePageState extends State<MyHomePage> {
CountryPicker countryPicker;
Country country = Country.fromJson(countryCodes[0]); // select initial country
@override
void initState() {
super.initState();
countryPicker = CountryPicker(onCountrySelected: (Country country) {
print(country);
setState(() {
this.country = country;
});
});
}
@override
Widget build(BuildContext context) {
// To simply launch the country picker
// use countryPicker.launch(context)
// to forcefully dismiss use countryPicker.dismiss()
// simple example could be
return GestureDetector(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage(country.flagUri, package: 'ola_like_country_picker'),
),
),
),
onTap: () {
countryPicker.launch(context);
},
);
}
}
| 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. |
CountryListView(flagWidth:50, flagHeight:50 , itemTitleStyle: TextStyle(fontSize:20));
return MaterialApp(
theme: ThemeData(primarySwatch: Colors.purple),
home: Scaffold(
appBar: AppBar(
title: Text('Select Country'),
),
body: CountryListView(),
),
);
| parameter | default | required | type | remark |
|---|---|---|---|---|
| countryJsonList | country_codes | no | List<Map<String, String>> | can be used to specify own set of sublist of countries from the variable country_codes |
| flagWidth | 25 | no | double | width of flag |
| flagHeight | 25 | no | double | height of flag |
| showFlag | true | no | bool | whether to show flag or not |
| showDialCode | true | no | bool | whether to show dial code or not |
| dialCodePrefix | '+' | no | String | The prefix added to the dial code for e.g +91 here prefix is '+' |
| itemTitleStyle | null | no | TextStyle | Used to change style of Country title e.g TextStyle(fontSize:30) |
| dialCodeStyle | null | no | TextStyle | Used to change style of Country's dial code e.g TextStyle(backgroundColor:Colors.green[400]) |
| onSelected | null | no | OnCountrySelectedCallback | When Any Country is selected what callback has to be executed e.g CountryListView(onSelected: (Country country){ print(country.toString() }); |
c = CountryPicker(onCountrySelected: (Country country) {
print(country);
setState(() {
this.country = country;
});
});
CountryListView clv = CountryListView(showFlag:false); //own version of CountryListView
c.setCountryListView(clv);
...
...
// Call c.launch(context) in GestureDetector() or other listeners
...
...
The simplest way to show your support is by giving the project a star.
You can also support by becoming a patron on Patreon:
Or by making a single donation by buying a coffee:
Selected from shared topics, language and repository description—not editorial ratings.
Xmarmalade /
Alist Helper is an application developed using Flutter, designed to simplify the use of the desktop version of alist. It can manage alist, allowing you to easily start and stop the alist program.
payam-zahedi /
Toastification is a Flutter package for displaying customizable toast messages. It provides predefined widgets for success, error, warning, and info messages, as well as a custom widget for flexibility. With Toastification, you can add and manage multiple toast messages at the same time with ease.
felangel /
Cubit is a lightweight state management solution. It is a subset of the bloc package that does not rely on events and instead uses methods to emit new states.
hackware1993 /
A super powerful Stack, build flexible layouts with constraints. Similar to ConstraintLayout for Android and AutoLayout for iOS. But the code implementation is much more efficient, it has O(n) layout time complexity and no linear equation solving is required.
Dropsource /
Monarch is a tool for building Flutter widgets in isolation. It makes it easy to build, test and debug complex UIs.
Hash-Studios /
E-Learn is a beautiful open-source education app for Android. It is built with Dart on top of Google's Flutter Framework.