Skip to content

A Flutter widgets that show List of Philippine Regions, Provinces, Cities, Municipalities, and Barangays

License

Notifications You must be signed in to change notification settings

josephmangmang/philippines_rpcmb

Repository files navigation

Pub.dev

A Flutter widgets that show List of Philippine Regions, Provinces, Cities, Municipalities, and Barangays

Usage

Please check /example folder.

Philippine Regions can be access directly via

import 'package:philippines_rpcmb/philippines_rpcmb.dart';

philippineRegions;

Display dropdown list of Philippine regions

PhilippineRegionDropdownView(
    onChanged: (Region? value) {
        setState(() {
        if (region != value) {
            province = null;
            municipality = null;
            barangay = null;
        }
        region = value;
        });
    },
    value: region,
    )

Province

  PhilippineProvinceDropdownView(
    provinces: region?.provinces ?? [],
    onChanged: (Province? value) {
    setState(() {
        if (province != value) {
        municipality = null;
        barangay = null;
        }
        province = value;
    });
    },
    value: province,
)

Municipalities

 PhilippineMunicipalityDropdownView(
    municipalities: province?.municipalities ?? [],
    onChanged: (value) {
        setState(() {
        if (municipality != value) {
            barangay = null;
        }
        municipality = value;
        });
    },
    value: municipality,
)

Barangays

 PhilippineBarangayDropdownView(
    barangays: municipality?.barangays ?? [],
    onChanged: (value) {
    setState(() {
        barangay = value;
    });
})

About

A Flutter widgets that show List of Philippine Regions, Provinces, Cities, Municipalities, and Barangays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published