Giter Site home page Giter Site logo

berthold-lbb / base_flutter_app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sdstolworthy/base_flutter_app

0.0 1.0 0.0 1.75 MB

A fast and easy way to start a new flutter application.

License: MIT License

Objective-C 0.03% Dart 99.20% Kotlin 0.39% Swift 0.38%

base_flutter_app's Introduction

Flutter Base App

The Flutter Base App is a starter Flutter app that includes many features common in all apps.

The app provides several generic widgets and features to get you started, including:

  • Internationalization
  • Welcome and Login screens
  • Firebase plugins
  • Generic Item Feed
  • Generic Item Edit/Create widgets
  • Bloc state management
  • Theming
  • [COMING SOON] Push notifications

Up and Running

To get started, clone or fork the repository.

To configure Firebase, the instructions here: Firebase Installation instructions.

Build configurations

The app is structured to require separate Google Services configurations for dev and production. Please see this link for instructions to configure Firebase. Also, see here, here, and here.

Firing up Firebase

It is a good idea to keep development and production environments separate. If you use Firebase services, you should create two separate projects, one for production and one for development. The two google-services.json files should be placed in the android/app/src/${environment} folder. When the app is compiled, the file that belongs to each build environment will be included in the product. Thus, you can maintain separate datastores and user lists for each environment.

iOS directions for build flavors forthcoming

Custom entry points

flutter_base_app uses distinct variables for development and prod. These are specified in two different entry point files in the lib/ directory.

In order to run a debug version of flutter_base_app, use the command flutter run -t lib/main_development.dart --flavor development.

This tells flutter to run the app using lib/main_development.dart as the entry point, and the development flavor specified in app/build.gradle.

Likewise, to build the android app, run flutter build apk -t lib/main_development.dart --flavor development.

Build flavors

There are two build flavors described for flutter_base_app: development and production. For android, these build flavors' unique resources are specified in android/app/src/${build_flavor}. Any file unique to the build flavor should be defined in that directory.

Important The app will not compile if you have not configured Firebase for the target platform (iOS or Android).

Structure

Screens

Screens are the major logical divisions of the app. They tie together state and presentation. Screens are located in src/lib/screens

Routes

Routing is handled by a single navigator. The navigator is located in src/services/navigator.dart. Routes are located in src/services/routes.dart.

Repositories

The repositories wrap network requests. They are located in src/services/repositories.

Theming

The theme is located in src/lib/theme. The theme is a light wrapper around the Material theme. The routes are already set up to correctly inherit from the theme in the theme folder.

base_flutter_app's People

Contributors

sdstolworthy avatar

Watchers

 avatar

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.