psgc_picker 1.0.2 copy "psgc_picker: ^1.0.2" to clipboard
psgc_picker: ^1.0.2 copied to clipboard

This package is used for listing all the region, province, city, municipality, and barangay. Philippine Standard Geographic Codes

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:psgc_picker/psgc_picker.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(),
        body: Padding(
          padding: const EdgeInsets.all(8.0),
          child: PsgcPicker(
            regionLabel: 'Region',
            provinceLabel: 'Province',
            cityLabel: 'City/Municipality',
            selectedRegion: 'CALABARZON',
            selectedProvince: 'RIZAL',
            selectedCity: 'CAINTA',
            spacing: 10,
            onRegionChanged: (value) => {
              // Get the selected value here
            },
            onProvinceChanged: (value) => {
              // Get the selected value here
            },
            onCityChanged: (value) => {
              // Get the selected value here
            },
          ),
        ),
      ),
    );
  }
}
2
likes
150
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

This package is used for listing all the region, province, city, municipality, and barangay. Philippine Standard Geographic Codes

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on psgc_picker