Skip to content

These template help in fast project creation. This repo will include multiple template, choose the one which suitable

Notifications You must be signed in to change notification settings

quochuynh67/my-project-template

Repository files navigation

my-project-template

These template help in fast project creation. This repo will include multiple template, choose the one which is suitable

Features

flutter-base-project-structure-1

  • Create simple flutter project using rxdart, sqflite, provider
  • Saparate project folder: view - bussiness logic - service
  • Create feature file very fast: create 3 files (view, logic, route)

flutter-base-project-structure-2

  • cleaner base

Next release

  • Add more app structure such as scope_model, flutter_bloc, redux, mobx...
  • Update bashscript to use easily, switch another structure
  • Use Navigator 2.0

Dependencies

  • [sqflite] - Dart wrapper on SQLite, a self-contained, high-reliability, embedded, SQL database engine.
  • [provider] - A wrapper around InheritedWidget to make them easier to use and more reusable.
  • [rxdart] - RxDart is an implementation of the popular reactiveX api for asynchronous programming, leveraging the native Dart Streams api.
  • [shared_preferences] - Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.

Installation

Dart version required:

environment:
  sdk: ">=2.12.0 <3.0.0"

Multiple-Language

Install flutter intl plugin from marketplace

And follow this guide to add the language.

Usage

Clone the git sample.

git clone https://github.com/quochuynh67/my-project-template

Usage

To create new project, by running:

../my-project-template/flutter_project_creation.sh

↪️ And then, Input your project name. For example: test_new_project

↪️ And then, Input the path to the template you want to use with new project. For example: ../my-project-template/flutter-base-project-structure-1

↪️ After that, It will be created like the image below image info

ℹ️ Note

Don't worry about `already exist MainActivity.kt` file, because Android studio was created one time.
And then bashscript change it's parent folder.

To create feature, by running:

⚠️ make sure you went to lib/ui where contains your feature folder

../my-project-template/flutter_feature_creation.sh

↪️ And then, input the prefix file you want. For example setting:

This step will create 3 file: setting_bloc.dart, setting_route.dart, setting_view.dart

↪️ And then, input the name for class you want. For example: Setting:

This step will generate the content into the file such as: SettingView, SettingBloc.

image info image info

About

These template help in fast project creation. This repo will include multiple template, choose the one which suitable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published