Skip to content

A Flutter starter kit for beginner with Bloc, SQFlite, Fluro and Chopper to architect.

License

Notifications You must be signed in to change notification settings

rinlv/flutter-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter-starter

A Flutter starter kit for beginner with Bloc, SQFlite, Fluro and Chopper to architect.

Feature:

Folder Structure

Here is the core folder structure which flutter provides.

flutter-app/
|- android
|- build
|- ios
|- lib
|- test

Here is the folder structure we have been using in this project

lib/
|- base/
|- constants/
|- data/
|- l10n/
|- models/
|- routes/
|- screens/
|- utility/
|- widgets/
|- main.dart

Now, lets dive into the lib folder which has the main code for the application.

1- base - Contains all the base class
2- constants - All the application level constants are defined in this directory with-in their respective files. This directory contains the config for `color`, `font`, `localization` and others.
3- data - Contains the data layer of your project, includes directories for local, network and shared pref/cache.
4- l10n - Contains all translation language file.
5- models - Contains all generated model.
6- routes - Contains all the routes for your application.
7- screens - Contains all the ui of your project, contains sub directory for each screen.
8- utility — Contains the utilities/common functions of your application.
9- widgets — Contains the common widgets for your applications. For example, Button, TextField etc.
10- main.dart - This is the starting point of the application. All the application level configurations are defined in this file i.e, theme, routes, title, orientation etc.

How to Use

Step 1:

Download or clone this repo by using the link below:

https://github.com/rinlv/flutter-starter.git

Step 2:

Go to project root and execute the following command in console to get the required dependencies:

flutter pub get 

Step 3:

This project uses inject library that works with code generation, execute the following command to generate files:

flutter packages pub run build_runner build --delete-conflicting-outputs

or watch command in order to keep the source code synced automatically:

flutter packages pub run build_runner watch

Hide Generated Files

In-order to hide generated files, navigate to Android Studio -> Preferences -> Editor -> File Types and past the below lines under ignore files and folders section:

*.inject.summary;*.inject.dart;*.g.dart;

In Visual Studio Code, navigate to Preferences -> Settings and search for Files:Exclude. Add the following patterns:

**/*.inject.summary
**/*.inject.dart
**/*.g.dart

Recommended

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Bloc Pattern

Layouts

Databases

Localization

RxDart

Flavouring

Awesome Flutter:

License

CC0

About

A Flutter starter kit for beginner with Bloc, SQFlite, Fluro and Chopper to architect.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published