Skip to content

Blockchain-Voting-Based-System/vodth-mobile

Repository files navigation

vodth_mobile

Alt text

Welcome to VODTH, the best voting system in Cambodia utilizing cutting edge technologies such as Blockchain and Machine Learning to make voting secure, transparent and fraud-proof.

Installation

  • Make sure to clone the project
  • Commands
    • Install all the required packages and dependencies
      flutter pub get
    • Run the project
      flutter run

Generate new View

  • Our template follow a clean architecture called MVVM - Model View ViewModel
  • Go to exec.dart and add 'location' : 'file_name' in the views list.
  • Then run this command
      dart scripts/generate_views/exec.dart
  • This project uses AutoRoute which is a package provided by flutter to help generate routes so developer don't have to manually write them.
  • Afterward, in order to generate route for navigation run this command
      flutter pub run build_runner build --delete-conflicting-outputs
  • Lastly, go to routes.dart and add new route that had been generated
  • To navigate screen
      context.router.push([ROUTE NAME])

Generate Model

Add model for the project can be time-consuming and ineffective, because you have to write a fromJson and toJson function for all the fields. To tackle this problem, we use json_serializable to help with generating model.

Add model

  • Navigate to "lib/model/vodth"
  • Then, Create file for the model (Checkout the sample)
  • Make sure include part of '[file_name].g.dart' (file that will be generated)
  • When done, run builder runner to generate model
    flutter pub run build_runner build --delete-conflicting-outputs
  • Usage:
    SampleModel? sampleModel = SampleModel(name: 'John',description: '10x Dev',age: '25');

About

A mobile application for voting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •