psgc_picker 1.0.2
SDKflutter
Platformandroidioswindowslinuxmacosweb
This package is used for listing all the region, province, city, municipality, and barangay. Philippine Standard Geographic Codes
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>
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)},
),
),
));
}
}
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/