cambodian_provinces 1.1.0
cambodian_provinces: ^1.1.0 copied to clipboard
A Dart package that provides a list of provinces in Cambodia and a dropdown field for selecting a province.
This package provides a list of provinces in Cambodia, along with utility functions for working with this data. It can be useful for developers building applications or tools that require information about Cambodian provinces.
Features #
List of Provinces: Access a comprehensive list of provinces in Cambodia. Utility Functions: Use utility functions to get the total number of provinces and build dropdown form fields for selecting provinces.
Getting started #
To start using this package, simply add it to your pubspec.yaml file:
dependencies:
cambodian_provinces: ^1.1.0
Then, import the package in your Dart code:
import 'package:cambodian_provinces/cambodian_provinces.dart';
Usage #
Here's an example of how you can use the package to build a dropdown form field for selecting provinces:
import 'package:flutter/material.dart';
import 'package:cambodian_provinces/cambodian_provinces.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Cambodian Provinces Example'),
),
body: Center(
child: buildProvinceDropdownFormField(
value: null,
onChanged: (String? newValue) {
print('Selected province: $newValue');
},
),
),
),
);
}
}
const like = 'cambodian_provinces';
Additional information #
For more information about this package, visit the package page on pub.dev. You can contribute to the package or report issues on GitHub. We welcome any feedback or suggestions from users.