Code Monkey home page Code Monkey logo

soil_moisture_app's Introduction


This is a Flutter project, which will serve as the dashboard for the Soil Moisture content of a particular area.

Color Theme: Material.io

Font: JetBrains Mono

Screenshots



Description

The app gets its name from the French word for Thirst. Its purpose, is to detect moisture content of soil from sensors.

Moisture was the main motif, but later it rolled to collecting ambient temperature, humidity and light too.

API endpoints and repository

The API implementation of this project can be found in this repository.

The base URL for the application is https://soif.herokuapp.com/

The various endpoints used by this app are:

  • /getdata/<currentdate in dd-mm-yyyy>
  • /getdata/now
  • /setpump
  • /getpump

Contributions

We would love to see some feedback in the form of issues raised and PRs. If you need an IoT project with application integration, this project can serve as the baseline application. Show your appreciation by ⭐ing this repository!​ ​

Team Members

soil_moisture_app's People

Contributors

arig23498 avatar royarg02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

soil_moisture_app's Issues

Build fails on Flutter v1.17+

Running flutter run on v1.0.3 results in compilation error:

Compiler message:
/home/anurag/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_charts-1.0.0-beta.4/lib/src/common/user_interaction/t
ooltip.dart:312:32: Error: Constant evaluation error:
    _painter.getLocation(const Offset(null, null));                     
                               ^                                        
org-dartlang-sdk:///flutter/lib/ui/geometry.dart:16:9: Context: This assertion failed.
  const OffsetBase(double dx, double dy)                                
        ^                                                               
                                                                        
Compiler message:                                                       
/home/anurag/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_charts-1.0.0-beta.4/lib/src/common/user_interaction/tooltip.dart:312:32: Error: Constant evaluation error:
    _painter.getLocation(const Offset(null, null));                     
                               ^                                        
org-dartlang-sdk:///flutter/lib/ui/geometry.dart:16:9: Context: This assertion failed.
  const OffsetBase(double dx, double dy)                                
        ^                                                               
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.                                                           
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Script '/home/anurag/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 882
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildDebug'.              
> Process 'command '/home/anurag/flutter/bin/flutter'' finished with non-zero exit value 1
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 19s

The issue seems to be related to syncfusion_flutter_charts package:
https://github.com/RoyARG02/soil_moisture_app/blob/fef3e73b2a24079817ca77b7aecf883b4a0bed5c/pubspec.yaml#L13
Considering that the app is using a beta version of the package. We need to either:

  • use a recent version of the above package, or
  • look for some other package for charting.

A viable alternative could be the charts_flutter package.

The main method

The main method still takes up time, it is not async. All the api endpoints are fetched and then the runApp is triggered, I am guessing a synchronisation error in any of the classes or methods that is made. @royarg02

Add automated tests

Some areas where testing could be implemented:

  • Theme change tests.
  • Tests using some mock data of the API.
  • Widget tests(whether the widgets are properly shown/hidden and are displaying correct information).

Additional areas for tests may then be added subsequently.

The Threshold Page

The user should be notified on completion of the set button.
A dialog box maybe stating them that the {success:true}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.