Skip to content

Map-Rank/residat-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to residat-mobile-platform Image Description

Version License: AGPL

Build Status Coverage Dependencies

RESIDAT is a digital platform for sharing place-based information on climate risks from spatial data and citizen science reports .This platform shall have five main components

  • Visualization of place-based climate risks
  • information through dashboards
  • Hosting of published reports by community stakeholders
  • Chatroom for community climate realities
  • Sending out mobile notifications by local and regional climate authoritative bodies.
Login Community

Table of Contents 📚

  1. Introduction
  2. Context
  3. Features
  4. Installation Instruction
  5. Troubleshooting
  6. Testing
  7. Code of Conduct
  8. License

Introduction

RESIDAT is a digital platform designed to enhance community resilience by providing access to climate risk information in Cameroon. It leverages spatial data and citizen science reports to visualize climate risks through interactive GIS dashboards. The platform offers a suite of features including:

  • Visualization Dashboards: Interactive maps and graphs for understanding local climate risks and stakeholder activities.
  • Community Intelligence: A repository for stakeholders to publish, manage, and interact with climate adaptation reports.
  • Community Chat Rooms: Spaces for real-time discussion and exchange of climate-related information and services..

RESIDAT serves as a critical tool for local and regional climate authoritative bodies to send out mobile notifications and engage communities in proactive climate risk management.

Visit this link To access our full documentation and our apis.

Visit this discussion link To access our discussion forum, suggest functionalities or ideas, get in touch with us.

Context

RESIDAT was born from the necessity to mitigate climate risks for communities in Cameroon. It targets the heart of climate vulnerability by providing critical, actionable data through GIS visualizations and real-time reports. The platform's goal is to empower communities and authorities to make informed decisions, enabling proactive and collaborative efforts towards climate resilience. In the face of increasing climate challenges, RESIDAT stands as a beacon of innovation and solidarity.

Vision Statement

"Residat envisions a resilient Cameroon where every community has the knowledge and tools to adapt to climate variability. Our vision is to become a leading platform in climate risk assessment and adaptation strategies, contributing to sustainable development and disaster risk reduction through innovative geospatial technologies."

Mission Statement

"Our mission is to empower vulnerable communities in Cameroon by providing them with accurate, accessible, and actionable geospatial data on climate hazards. Through the integration of GIS, drone technology, and big data analytics, Residat aims to facilitate informed decision-making and proactive environmental management."

Community Statement

"Residat is dedicated to fostering a collaborative environment where scientists, local authorities, developers, and community members come together to combat climate risks. We encourage the sharing of insights, the development of local solutions, and the creation of a united front against the adverse effects of climate change."

Licensing Strategy

"To maximize impact and encourage innovation, Residat will operate under an AGPL License, promoting open-source collaboration. This approach will allow for the free use, modification, and distribution of our resources, ensuring they remain accessible for adaptation to other regions facing similar climate challenges."

Features

RESIDAT offers a powerful suite of features designed to provide stakeholders with comprehensive climate risk data and facilitate community engagement in climate resilience:

  • Interactive GIS Dashboards: Leveraging cutting-edge GIS technology, RESIDAT provides dynamic maps and graphs that allow users to visualize and interact with climate risk data specific to their local communities.

  • Community Intelligence Reports: A dedicated space for stakeholders to publish, manage, and interact with reports on climate adaptation efforts. These reports provide valuable insights into local initiatives and challenges.

  • Real-Time Community Chat Rooms: These forums offer a space for stakeholders to discuss climate realities, share observations, and promote climate services, fostering a community-driven approach to climate resilience.

  • Mobile Notifications: Integration with mobile platforms ensures that stakeholders receive timely updates and warnings about climate hazards, enabling swift and informed responses to emerging risks.

  • Citizen Science Contributions: Encouraging local community members to contribute data and reports, RESIDAT amplifies the reach and accuracy of climate risk information through citizen science.

  • Data-Driven Insights: By analyzing spatial data and user-contributed reports, RESIDAT provides actionable insights that support climate risk management and decision-making processes.

  • Stakeholder Engagement Tools: Features designed to enhance collaboration among various actors, including local authorities, NGOs, businesses, and academia, to drive collective action in climate adaptation.

Installation Instruction

In order to run and use this project on your devices you need to fulfill the prerequisites and dependencies required below.

Prerequisites

  1. Get a powerful machine that will allow you to emulate an android, ios device or both.( Visit this link for more enhancement)
  2. Set up Android Studio or VScode on your device.

Android Studio is the official Integrated Development Environment (IDE) for Android app development. Based on the powerful code editor and developer tools from IntelliJ IDEA , Android Studio offers even more features that enhance your productivity when building Android apps, such as:

  • A flexible Gradle-based build system
  • A fast and feature-rich emulator
  • A unified environment where you can develop for all Android devices
  • Live Edit to update composables in emulators and physical devices in real time
  • Code templates and GitHub integration to help you build common app features and import sample code
  • Extensive testing tools and frameworks
  • Lint tools to catch performance, usability, version compatibility, and other problems
  • C++ and NDK support
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine Download Android Studio here

Visual Studio Code, also commonly referred to as VS Code, is an integrated development environment developed by Microsoft for Windows, Linux, macOS and web browsers. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded version control with Git. Users can change the theme, keyboard shortcuts, preferences, and install extensions that add functionality. VScode offers a wide range of advantages that are:

  • Code in any language
  • Some key features include Git integration, debugging tools, and extensions that allow you to customize your workflow.
  • Large Community environment
  • Fast and efficient: Visual Studio Code is fast and efficient, with a small footprint. Download Visual Studio Code here

In the case you have been used to VSCode and your working machine is not really powerful, VScode is a better choice but you have to have a good knowledge with dealing with extensions. Android Studio is suitable for powerful machine, that do not deal with fast and efficiency concerns and ease the environment installation process.

  1. "Fork" or Clone this repository from the main page.

Dependencies

Once you have the project in your development environment, Get all the dependencies of the project by tapping the command: "flutter pub get" at the root of your project in your terminal. Following is the list of dependencies used in our project and their different usage:

  • cupertino_icons: ^1.0.2 This is an asset repo containing the default set of icon assets used by Flutter's
  • change_app_package_name: ^1.1.0 Helps to change the package name of your app in all the files affected
  • firebase_core: ^2.24.2 Flutter plugin for Firebase Core, enabling connecting to multiple Firebase apps.
  • flutter_native_splash: ^2.2.19 This package automatically generates iOS, Android, and Web-native code for customizing this native splash screen background color and splash image. Supports dark mode, full screen, and platform-specific options.
  • get: ^4.6.6 Open screens/snackbars/dialogs without context, manage states and inject dependencies easily
  • get_storage: ^2.1.1 A fast, extra light and synchronous key-value storage written entirely in Dart
  • google_fonts: ^4.0.4 Applies a specific font family to your entire application
  • flutter_spinkit: ^5.2.1 A collection of loading indicators animated with flutter.
  • flutter_rounded_date_picker: ^3.0.4 The Flutter plugin that help you can choose dates and years with rounded calendars and customizable themes
  • image_picker: ^1.0.4 Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera.
  • font_awesome_flutter: ^10.4.0 The Font Awesome Icon pack available as Flutter Icons. Provides 2000 additional icons to use in your apps
  • path_provider: ^2.1.1 Flutter plugin for getting commonly used locations on host platform file systems, such as the temp and app data directories.
  • icons_launcher: ^2.1.0 A command-line tool that simplifies the task of updating your Flutter app's launcher icon
  • share_plus: ^7.2.2 Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS
  • intl_phone_field: ^3.2.0 A customised Flutter TextFormField to input international phone number along with country code.
  • dio: ^5.4.3+1 A powerful HTTP networking package, supports Interceptors, Aborting and canceling a request, Custom adapters, Transformers, etc.
  • mockito: ^5.4.0 A mock framework inspired by Mockito with APIs for Fakes, Mocks, behavior verification, and stubbing.
  • http_mock_adapter: ^0.6.1 A simple to use mocking package for Dio intended to be used in tests. It provides various types and methods to declaratively mock request-response communication.
  • coverage: ^1.8.0 Coverage provides coverage data collection, manipulation, and formatting for Dart. collect_coverage collects coverage JSON from the Dart VM Service. format_coverage formats JSON coverage data into either LCOV or pretty-printed format.
  • webview_flutter: ^4.8.0 A Flutter plugin that provides a WebView widget backed by the system webview.
  • url_launcher: ^6.3.0 Flutter plugin for launching a URL. Supports web, phone, SMS, and email schemes.
  • flutter_localizations: Flutter Localization is a package use for in-app localization with map data. More easier and faster to implement and inspired by the flutter_localizations itself.
  • intl: any Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues.
  • flutter_typeahead: ^5.2.0 A highly customizable typeahead (autocomplete) text input field for Flutter
  • firebase_messaging: ^14.7.10 Flutter plugin for Firebase Cloud Messaging, a cross-platform messaging solution that lets you reliably deliver messages on Android and iOS.
  • flutter_local_notifications: ^17.2.2 A cross platform plugin for displaying local notifications.
  • envied: ^0.5.4+1 Explicitly reads environment variables into a dart file from a .env file for more security and faster start up times.

dev_dependencies:

  • build_runner: ^2.4.11 A build system for Dart code generation and modular compilation.

  • envied_generator: ^0.5.4+1 This package contains the generator for Envied.

  • flutter_lints: ^2.0.0 Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices.

Troubleshooting

In case your flutter version is 3.16 or posterior to version 3.16, you might be facing issues with your graddle files and your project will not run. Follow this link to solve the issue After following the instructions on the link above you might need to delete the following from your graddle file because Gradle wrapper already has it: task clean(type: Delete) { delete rootProject.buildDir }

Testing

Testing is a crucial aspect of the development process, ensuring that the code is robust and behaves as expected. In the Residat project, we employ the native test package designed by the flutter team for our testing framework, providing an efficient and feature-rich environment for both unit and integration testing. Below is a summary of the current test coverage and details about the testing setup and examples.

Test Setup

Flutter provides a native library that allows you to run your test; but in order to generate a tangible report of all the lines covered by your test you need to implement the following steps:

  • you need to install the coverage library in your project at the root of your project using the command: flutter pub add coverage
  • To generate the report you may run in your terminal the command flutter test --coverage(that report will be generated into a file called lcov.info )

the lcov.info file does not provide ready to exploit information, so we'll be using some commands to generate a html readable report that will allow us to read our report.

  1. On a Windows System
  • Paste the content of your lcov file into .txt file and run the following Python Script reading_file = open("coverage.txt", "r")

new_file_content = "" for line in reading_file: stripped_line = line.strip() new_line = stripped_line.replace("\", "/") new_file_content += new_line +"\n" reading_file.close()

writing_file = open("coverage.txt", "w") writing_file.write(new_file_content) writing_file.close()

  • paste back the content of your .txt file into your lcov.info file
  • run the following command: wsl genhtml coverage/lcov.info -o coverage/ (Assuming you have a Windows sublinux System installed on your machine)
  1. On a Linux System
  • Just directly run the command genhtml coverage/lcov.info -o coverage/

Test Coverage Summary

Our test coverage is actually at 57% representing the percentage of lines covered by our test.

Code of Conduct

RESIDAT Contributor Code of Conduct

As contributors and maintainers of the RESIDAT project, we pledge to foster an open and welcoming environment for everyone. We are committed to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

Visit this discussion link To access our discussion forum, suggest functionalities or ideas, get in touch with us.

Our Principles

  • Collaborative Ethos: We create an inclusive space for diverse backgrounds and experiences, fostering a unique vision and product that resonates with the RESIDAT platform users.

  • Harmony through Dialogue: We promote progress through open discussions, encouraging all community members to share ideas and engage respectfully to achieve consensus and resolve issues.

  • Team Spirit: Recognizing that we each represent a piece of the RESIDAT puzzle, we value your skills and ask that you respect and value the contributions of others.

Our Pledge

We accommodate and uphold diversity in all forms, ensuring that participation in our project and community is a harassment-free experience for everyone.

Behavior Standards

Positive environment-contributing behaviors include:

  • Kind and considerate communication.
  • Respect and acknowledgment of our diverse audience and community members.
  • Refraining from insults, bigotry, and offensive language.
  • Exercising empathy and understanding towards others.

Unacceptable behaviors include:

  • Any form of harassment, either public or private.
  • Abusive comments, trolling, and offensive rhetoric.
  • Religious, political, and cultural attacks.
  • Posting or sharing inappropriate content.
  • Disclosing private information without consent.
  • Any other behaviors considered inappropriate in a professional setting.

Our Responsibilities

The RESIDAT designated team is responsible for enforcing community standards and may take appropriate action against unacceptable behavior.

Scope

This Code of Conduct applies both within project spaces and public spaces when individuals represent the project or community.

Enforcement

Instances of unacceptable behavior can be reported to the designated team at support@mapnrank.com with a detailed description and any relevant evidence. All complaints will be reviewed, investigated, and result in a response deemed necessary and appropriate to the circumstances.

Violations

Violations of this Code of Conduct may result in expulsion from the community or other repercussions as deemed appropriate by the project maintainers.

By contributing to RESIDAT, you agree to abide by these principles and behaviors to ensure our community remains welcoming, inspiring, and constructive for all.

License

  • MapAndRank - Residat is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
  • MapAndRank - Residat is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License along with MapAndRank - Residat. If not, see https://www.gnu.org/licenses/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10