0 purchases
psgc picker
PSGC Picker #
This package is used for listing all the region, province, city, municipality, and barangay. Philippine Standard Geographic Codes
Installation #
In the dependencies: section of your pubspec.yaml, add the following line:
dependencies:
psgc_picker: <latest_version>
copied to clipboard
Usage #
import 'package:psgc_picker/psgc_picker.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Package Testing',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(),
body: Center(
child: PsgcPicker(
regionLabel: 'Region',
provinceLabel: 'Province',
cityLabel: 'City/Municipality',
selectedRegion: 'CALABARZON',
selectedProvince: 'RIZAL',
selectedCity: 'CAINTA',
spacing: 5,
onRegionChanged: (value) => {print(value)},
onProvinceChanged: (value) => {print(value)},
onCityChanged: (value) => {print(value)},
),
),
));
}
}
copied to clipboard
Notes #
If the data is outdate, feel free to create issue. Thank you
Credits #
Data generated by this package are from https://psa.gov.ph/classification/psgc/
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.