A Flutter widgets that show List of Philippine Regions, Provinces, Cities, Municipalities, and Barangays
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;
});
})