dzair_data_usage 0.0.1
dzair_data_usage: ^0.0.1 copied to clipboard

A package that allows you to use and manipulate algeria cities data.

dzair_data_usage #

dzair_data_usage is a dart/flutter package for dealing with algerian cities data such as dairas,communes and more.

Installation #

Run this command: With Flutter:

 $ flutter pub add dzair_data_usage

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  dzair_data_usage: 0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it Now in your Dart code, you can use:

import 'package:dzair_data_usage/dzair.dart';
import 'package:dzair_data_usage/wilaya.dart';
import 'package:dzair_data_usage/daira.dart';
import 'package:dzair_data_usage/postCode.dart';
import 'package:dzair_data_usage/langs.dart';

Usage #


    Dzair dzair= Dzair();
    //get every wilaya in algeria
    List<Wilaya> wilayas= dzair.getWilayat();
    //get every daira in algeria
    List<Daira> dairas= dzair.getDairat();
    //get every postcode in algeria
    List<PostCode> postcodes= dzair.getPostCodes();
    //print the post address of the first element in [postcodes]
    print(postcodes[0].getPostAddress());


    //search for daira in algeria
    //result will apears in french
    List<Daira> result = dzair.searchDairatByName('mosta',Language.FR);
    //print result names
    result.forEach((element) {
      element.getDairaName(Language.FR);
    });


   //search for communes in a wilaya
    //result will apears in french
    List<Communes> communes = wilayas[0].searchCommuneByName('m',Language.FR);
    //print result names in arabic
    communes.forEach((element) {
      element.getCommuneName(Language.AR);
    });

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License #

MIT

3
likes
90
pub points
17%
popularity

A package that allows you to use and manipulate algeria cities data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on dzair_data_usage