geoao 0.0.1+1 copy "geoao: ^0.0.1+1" to clipboard
geoao: ^0.0.1+1 copied to clipboard

A geolocation Package providing same functionalities as GEOAO API

Geoao #

A package that uses Geoao API developed by ATECH, aiming to expose all geolocation data referring to Angola.

MainClass ✨ #

/// GEOAO
///
/// Geolocation Angola - Geoao
/// A package that uses geoao API aiming to expose all geolocation data referring to Angola
class Geoao {
  ProvinceService _provinceService;
  CountyService _countyService;

  Geoao() {
    _provinceService = ProvinceService();
    _countyService = CountyService();
  }

  /// getProvinces
  ///
  /// Get all provinces of Angola
  Future<ProvincesModel> getProvinces() async =>
      await _provinceService.getProvinces();

  /// getCounties
  ///
  /// Get all counties from a province [provinceId] of Angola
  Future<List<CountyModel>> getCounties(int provinceId) async =>
      await _countyService.getCounties(provinceId);

  /// getCountyById
  ///
  /// Get specific county [countyId] of Angola
  Future<CountyModel> getCountyById(int countyId) async =>
      await _countyService.getCountyById(countyId);
}

Usage 🤳 #

import 'package:geoao/geoao.dart';

_exampleUsage() async {
  Geoao _geoao;
  
  ProvincesModel provincesModel;
  List<CountyModel> counties;
  CountyModel countyModel;

  int idProvince = 1;
  int idCounty = 1;

  provincesModel = await _geoao.getProvinces();
  counties = await _geoao.getCounties(idProvince);
  countyModel = await _geoao.getCountyById(idCounty);
}

MIT License #

1
likes
40
pub points
0%
popularity

Publisher

verified publisherdev.atech.co.ao

A geolocation Package providing same functionalities as GEOAO API

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on geoao