Skip to content

hisptz/dhis2-dart-utils

Repository files navigation

DHIS2 DART UTILITIES

A collection of data models, constants and utility functions used to build a DHIS2 app in dart.

Contents:

Features

This util library offers the following features:

  • Generator function for DHIS2 uid.
  • Utilities, data models and constants for DHIS2 periods.
  • DHIS2 Program indicator engine.
  • DHIS2 Program rule engine.
  • DHIS2 Program HTTP service.

Getting Started

  • Package Installation
  • The package can be installed using following alternatives:

    • For a dart project use the command:
    dart pub add dhis2_dart_utils
    
    • For a flutter project use the command:
    flutter pub add dhis2_dart_utils
    
    • Adding it directly on the pubspec.yaml dependencies and running flutter pug get or dart pub get.
    dependencies:
      dhis2_dart_utils: <version>
    

  • Testing and Development
  • These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

     git clone <github_repository_url>
    

    After getting a copy of the project source code, the following command will download all the project dependencies ready for testing, running and deploying the package

     cd <repository_name>
    
     dart pub get
    

    Examples can be run from the examples folder using the dart run commands.

    Tests can be run on the project folder by the command

    dart test
    

    Usage

  • How to Import
  • import 'package:dhis2_dart_utils/dhis2_dart_utils.dart';
    

    For more examples, click here!