This is a package that helps provide a full list of Nigerian states and local governments.
- List of all states in Nigeria
- List of all local governments in Nigeria
- List of local governments per state in Nigeria
dependencies:
nigerian_states_and_lga: ^latest_version
import 'package:nigerian_states_and_lga/nigerian_states_and_lga.dart';
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(),
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(),
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(),
nigerian_states_and_lga.mp4
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.
Contributions are highly welcomed. Please free free to open a pull request so that we can all improve this package together.