Benin Republic territory data for your dart/flutter app
# BJ Location Data
Benin Republic location data for web and mobile apps
For javascript version, please visit location_data_bj npm package
For raw data version, please visit bj_location_data_raw repository
>
>
> Data Snapshot (As of 2023-12-21)
>
> Department: 12
>
> Town: 77
>
> District: 546
>
> Neighborhood: 5303
>
> The `code` used in the dataset is an auto generated code. Please refer to the bj_location_data_raw repository for more information.
------------------------
Note:
- This package is pure dart package. It can be used in all platforms supported by dart.
- For flutter users, note that we don't provide any widget for now. **`Feel free to contribute`**.
## Installation
In the dependencies: section of your pubspec.yaml, add the following line:
```yaml
dependencies:
location_data_bj:
```
## API Usage:
1. Get all departments
```dart
List departments = LocationData.departmentList(sortBy: 'asc');
```
2. Get all towns
```dart
List towns = LocationData.townsList(sortBy: 'asc');
```
3. Get all districts
```dart
List districts = LocationData.districtList(sortBy: 'asc');
```
4. Get all neighborhoods
```dart
List neighborhoods = LocationData.neighborhoodList(sortBy: 'asc');
```
5. Get department by code
```dart
Department? department = LocationData.department('cot');
```
6. Get town by code
```dart
Town? town = LocationData.town('cot');
```
7. Get district by code
```dart
District? district = LocationData.district('cot');
```
8. Get neighborhood by code
```dart
Neighborhood? neighborhood = LocationData.neighborhood('cot');
```
9. Get towns of department
```dart
List towns = LocationData.townsOfDepartment('cot', sortBy: 'asc');
```
10. Get districts of town
```dart
List districts = LocationData.districtsOfTown('cot', sortBy: 'asc');
```
11. Get neighborhoods of district
```dart
List neighborhoods = LocationData.neighborhoodsOfDistrict('cot', sortBy: 'asc');
```
12. Search data
```dart
List result = LocationData.searchData('cot' …