nigerian_states_and_lga

Last updated:

0 purchases

nigerian_states_and_lga Image
nigerian_states_and_lga Images
Add to Cart

Description:

nigerian states and lga

Nigerian States and Local Governments #
This is a package that helps provide a full list of Nigerian states and local governments.
Features #

List of all states in Nigeria
List of all local governments in Nigeria
List of local governments per state in Nigeria

Getting started #
🎖 Installing #
dependencies:
nigerian_states_and_lga: ^latest_version
copied to clipboard
💡 Import #
import 'package:nigerian_states_and_lga/nigerian_states_and_lga.dart';
copied to clipboard
🛠️ Usage #
To get the states
DropdownButton<String>(
key: const ValueKey('States'),
value: stateValue,
isExpanded: true,
hint: const Text('Select a Nigerian state'),
items: NigerianStatesAndLGA.allStates
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
child: Text(value),
value: value,
);
}).toList(),
copied to clipboard
To get LGAs per state
DropdownButton<String>(
key: const ValueKey('Local governments'),
value: lgaValue,
isExpanded: true,
hint: const Text('Select a Lga'),
items:
statesLga.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
child: Text(value),
value: value,
);
}).toList(),
copied to clipboard
To get all LGAs at a go #
DropdownButton<String>(
value: selectedLGAFromAllLGAs,
isExpanded: true,
hint: const Text('Select a Lga'),
items: NigerianStatesAndLGA.getAllNigerianLGAs()
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
child: Text(value),
value: value,
);
}).toList(),
copied to clipboard
🎥 Sample #
https://user-images.githubusercontent.com/49335945/172783733-3caeb79b-7686-49ec-83e7-8a0b83e5a280.mp4
🪲 Bugs/ Feature Requests #
If you encounter any issues while using the package, feel free to open an issue. If you also feel the package is missing any feature, please raise an issue on Github.
🫂 Contribution #
Contributions are highly welcomed. Please free free to open a pull request so that we can all improve this package together.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.