Giter VIP home page Giter VIP logo

flutter_base_project's Introduction

Flutter Base Project

A Flutter project that is gonna be used as a starting point for some projects.

How to create new modules

Installing Mason

First instal mason globally: dart pub global activate mason_cli
Then, on the project folder run once: mason init
Finally, you can add the riverpod_module brick by running: mason add riverpod_module

Creating new modules

Just run mason make riverpod_module --name modulename on the terminal in the features folder and all the starting files will be generated. The output will be a folder with:

├── model
│   └── modulename_model.dart
├── providers
│   └── modulename_providers.dart
├── repository
│   ├── modulename_repository.dart
│   ├── modulename_repository_fake.dart
│   └── modulename_repository_impl.dart
├── view
│   └── modulename_view.dart
└── widget
    └── modulename_widget.dart

Testing

Code Metrics

Dart Code Metrics is a static analysis tool that helps you analyse and improve your code quality.

  • Reports code metrics
  • Provides additional rules for the dart analyzer
  • Checks for anti-patterns
  • Checks unused *.dart files
  • Checks unused l10n
  • Can be used as CLI, analyzer plugin or library

To execute it, run the following command:
flutter pub run dart_code_metrics:metrics analyze lib

The results will be shown in the console.

Running Tests:

flutter test --machine --coverage > tests.output

Running SonarQube

Assuming that:

  • You have sonar-scanner installed;
  • SonarQube is running on http://localhost:9000;
  • The Project Key is flutter_base_project;
  • The Project Token is sqp_f770b6ae69c13bba5abbf1b9e39f1c1007f9601c;

Then you run the following command:
sonar-scanner.bat -D"sonar.projectKey=flutter_base_project" -D"sonar.host.url=http://localhost:9000" -D"sonar.login=sqp_f770b6ae69c13bba5abbf1b9e39f1c1007f9601c"

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.