0 purchases
dhis2 flutter ui
DHIS2 FLUTTER UI
This Library support common components in Dhis2 used in Flutter
Table of Contents #
About
Project Structure
Getting Started
Supported Components
Usage
Built Using
About #
DHIS2 Flutter UI is a library combine different UI experience used to in DHIS2 to deliver solution.It is consists of different form components ,common components and models that support dhis2 api data structure with reference to their metadata.
Project Structure #
The implementation of this project was based on Flutter and Dart.
The structure of this project folders is as summarized bellow:
|-package
| |-lib
| |-dhis2_flutter_ui.dart
| |-src
| |-main_directive.dart
| |-ui
| |-components
| |-core
| |-models
| |-utils
|
copied to clipboard
Supported Components #
The following are list of supported components and models in the packages.
i. Input Components #
list of input components
copied to clipboard
components
props
SearchInput
RadioInputFieldContainer
BooleanInputFieldContainer
CheckBoxInputField
DateInputFieldContainer
InputClearIcon
NumericalInputFieldContainer
SelectInputField
TextInputFieldContainer
TrueOnlyInputFieldContainer
InputFieldContainer
PercentageInputFieldContainer
TimeInputFieldContainer
FormFieldInputIcon
ii. Generic Components #
list of generic components
copied to clipboard
components
props
CircularProcessLoader
MaterialCard
LineSeparator
iii. Models Supported #
list of models
copied to clipboard
Models
props
Application
String id; String label ; String iconPath; List
InputField
String id;String name; String? translatedName;String? description; String? translatedDescription; String valueType; Color? labelColor; Color? inputColor; Color? background; bool? renderAsRadio; bool? isReadOnly; bool? isPasswordField; bool? shouldCapitalize;bool? allowFuturePeriod; bool? disablePastPeriod; bool? hasError; int? minAgeInYear; int? maxAgeInYear; int? numberOfMonth; String? suffixLabel; String? hint; String? translatedHint; List
InputFieldOption
String name; String? translatedName; dynamic code;
iv. Utils Supported #
List of Utils
copied to clipboard
Name
Functions
FormValidator
Validators.pattern('regex','message')
InputMask
InputMask(pattern:'xxxx-xxx-xxx',separator:'-')
Permissions #
When using the Coordinate Input Field component within the DHIS2 Flutter UI library, it's important to ensure that the necessary permissions are granted for the seamless functionality of location-related features. The following permissions are required:
Android Permissions:: For Android, you need to add the required permissions to the AndroidManifest.xml file. You can find this file in the android/app/src/main directory of your Flutter project.
Add the following lines within the
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
copied to clipboard
iOS Permissions:: For iOS, you need to include the appropriate keys in your app's Info.plist file. You can find this file in the ios/Runner directory of your Flutter project.
Open the Info.plist file and add the following keys:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your app's explanation for using location services while in use</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Your app's explanation for using location services in the background</string>
copied to clipboard
Getting Started #
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
git clone <github_repository_url>
copied to clipboard
How to Deploy #
The following are step by step instruction that will help you deploy this package.
Login into you local environment (terminal) #
dart pub login
copied to clipboard
This will create a link to redirect you into supported web browser ,then login through your supported email you have used in pubdev
Dry run to format package before deploy #
This will run and check best practice that recommended by pub dev , it will check formats , file structure , required content of pubspec.yalm file , package size and version of the package control.
Use the following command for dry run of your package.
dart pub publish -n
copied to clipboard
or
dart pub publish --dry-run
copied to clipboard
Publish package #
Use the following command to publish package into pubdev
dart pub publish
copied to clipboard
🔧 Running the tests #
Explain how to run the automated tests for this system.
Break down into end to end tests #
Explain what these tests test and why
Give an example
copied to clipboard
And coding style tests #
Explain what these tests test and why
Give an example
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.