Code Monkey home page Code Monkey logo

flutter_template's Introduction

jack

a starter template for flutter/firebase/riverpod/hooks/gorouter/flavors/theming/icons/launchscreen

How to install

  1. mason add jack

  2. mason make jack

Firebase Setup

  1. in your new app dir
    • if you don't have flutterfire yet run dart pub global activate flutterfire_cli
chmod +x flutterfire_config_flavors.sh

./flutterfire_config_flavors <Firebase-Project-ID> <Firebase-Account-Email (optional)>

only add account email parameter if you need to specify firebase account

*steps 2 and 3 are optional

  1. Go to firebase console of project that you created (or existed)
- Setup auth (enable anonymous sign in)
- cloud firestore
- storage
- anything you need.. etc
  1. in firebase dir choose same project in previous step
firebase init

Generate Icons and Launch Screens (optional)

  1. Change the Icons in the assets directory based off of the examples i have. keep the filenames the same and they have their corresponding flavor.
<your-app-dir>
└───assets
    │   icon.png
    │   icon-dev.png
    │   icon-local.png
    │   foreground.png
  1. in rename the .env_config file to .env and edit to your flavor colors
  LOCAL_COLOR='"#FFFFFF"'
  DEV_COLOR='"#000000"'
  PROD_COLOR='"#180437"'
chmod +x icons_and_launch_screen.sh
./icons_and_launch_screen.sh

Theming

For theming this uses the dynamic_color package but when the device isn't supported it uses some themes found in <your-app-dir>/lib/theming/themes.dart

The defaultLightColorScheme and defaultDarkColorScheme can be generated using the Material 3 Theme Builder

Then all you have to do is export to flutter and replace the code in app/lib/theming/themes.dart.

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.