Coder Social home page Coder Social logo

flutter_fast_cli's Introduction

Flutter Fast Apps

MIT License pub version

DocumentationCode on the RocksSupportPub.dev

Table of Contents

Getting Started

Activate the CLI:

dart pub global activate flutter_fast_cli

Create an online app (and join the Flutter Fast social network):

fast app

Create an online app without the Flutter Fast Firebase setup:

fast app --fresh

Create an offline app:

fast app --offline

These commands will prompt you for your app name (my_app) and organization (com.example).

The generated app contains code for all third-party services and is thus bloated (eg. don't ship this code). Once you've decided which services you want to use, you can remove the unused code.

For templates that use specific services, see cotr.dev/flutter-faster.

What is it?

The Flutter Fast CLI is used to generate either an online or offline app.

The online app supports all of the third-party platforms listed below:

  • Firebase
  • Supabase
  • Appwrite
  • Pocketbase
  • Amplitude
  • Posthog
  • Sentry
  • Fastlane
  • GitHub Actions
  • Shorebird
  • RevenueCat

The offline app is a stripped-down version of the online app that doesn't require any third-party services.

Once you've generated the app, you can control which platforms are used by modifying the dart-define variables used to run the app. For example, to run an app with Firebase and Amplitude, you would run:

flutter run --dart-define=PAAS=firebase --dart-define=analytics=amplitude

Flutter Fast Social

The default app generated by the fast app command contains the firebase_options.dart file required to connect to the official Flutter Fast Firebase project. Install the app on your device to gain access to the exclusive Flutter Fast social network.

If you want to create a project with your own Firebase project, add the --fresh flag to the fast app command.

The Flutter Fast app is constantly changing and all messages and data are subject to deletion at any time.

Commands

General

Name Description
app Create a new Flutter Fast app using the step-by-step wizard
build Run dart run build_runner --delete-conflicting-outputs
update Update flutter_fast_cli

To get started, visit the official docs!

Documentation

See the API documentation for details on the following topics:

Features

AB Testing

Method Remote Config Posthog
Feature Flags
String Values

Analytics

Method Amplitude Posthog Firebase Analytics
Events
User Properties
User Properties (Set once)

Authentication

Method Firebase Supabase Appwrite Pocketbase
Email/Password
Google
Apple

Automation

Method Android iOS Web
Fastlane
GitHub Actions
Shorebird

Flutter Fast

What is Flutter Fast?

The Flutter Fast CLI is a tool for generating a starter Flutter application with everything you need to start shipping.

The Flutter Fast stack is opinionated to enable flexibility of choice regarding third-party technologies. For that reason, the following components of the stack are used regardless of the platform:

Similarly, Flutter Fast apps use a consistent project structure:

├── 📁 lib/
│  ├── 📁 app
│  ├── 📁 features
│  │   ├── 📁 featureOne
│  │   └── 📁 featureTwo
│  │       ├── 📁 models
│  │       ├── 📁 ui
│  │       │   ├── 📄 two_view.dart
│  │       └── 📁 services
│  └── 📄 main.dart
├── 📄 CHANGELOG.md
├── 📄 pubspec.lock
├── 📄 README.md

Why Flutter Fast?

I created Flutter Fast to solve two of my own problems.

Faster Setup

Nothing puts a damper on my motivation to start a new project like the thought of spending 6 hours setting up a starter project. I wanted to dive straight into the fun part of coding and ship faster 🚢

The Flutter Fast CLI takes care of nearly all the tedious setup involved in creating a user-based application. The longest part of getting started is setting up the peripheral tools (ex. Firebase, Supabase, Amplitude, etc).

Less Lock-in

I love experimenting. I love writing about different tech stacks and understanding how competing tools work. With that in mind, the second goal of the Flutter Fast CLI was to create a tool that wouldn't depend on a single platform. While the CLI is still a work in progress, a few examples of this flexibility are ready for use:

  • Choose to use either Firebase, Supabase, Pocketbaso, or AppWrite as your PaaS
  • Choose between Amplitude and Posthog for analytics
  • Choose between Sentry and Firebase Crashlytics for crash reporting

You can view the roadmap to see additional platforms we plan to support.

How Fast?

Below is an incomplete list of all the things the Flutter Fast CLI does for you:

  • Sets up Sign In, Register, Forgot Password, and Profile screens
  • SSO with Google and Apple
  • Adds a settings screen with dark mode toggle
  • Adds a simple onboarding view new users see on account creation
  • Creates a router using auto_route, go_router, or the vanilla navigator and adds it to your MaterialApp
  • Introduces authentication based navigation and route guards
  • Creates an instance of get_it
  • Auto registers services in get_it using injectable (optional)
  • Adds an analysis_options.yaml file
  • Creates a complete pubspec.yaml file with necessary dependencies based on config value
  • Adds the flutter_launcher_icon package and code snippet to quickly swap out logo (includes logic to remove alpha channel on iOS)
  • Sets up Sentry for crash reporting
  • Adds a basic debugging NavigationObserver to router
  • Creates useful TextStyle and BuildContext extensions
  • Creates constants.dart file with reusable padding and gap values
  • Adds basic bash scripts with preconfigured run configurations for Fastlane and common Flutter tasks
  • Includes Android and iOS Fastlane files with Flutter-safe methods for incrementing build numbers (doesn't wipe out $(FLUTTER_BUILD_NUMBER))
  • Adds multiDexEnabled = true to app/build.gradle
  • Performs release signing setup and creates empty key.properties file
  • Includes package_info_plus file and adds version string to home drawer
  • Includes support for flex_color_scheme and google_fonts 🎨
  • Includes boilerplate for generating ColorScheme from image
  • Sets up config.json file to be used with --dart-define-from-file run argument
  • Includes support for setting app and organization name at generation time
  • Adds json_serializable and json_annotation dependencies
  • Creates a README.md file with helpful deploy tips (stuff I always forget)
  • Creates abstract service classes for easy extensibility
  • Runs flutter pub run build_runner build --delete-conflicting-outputs and dart format . so projects are run-ready

Flutter Faster

The fast app command gives you just about everything you need to launch a cross-platform Flutter app...but sometimes that's not enough. The Flutter Faster brick pack is an ever-expanding library of Mason bricks that can accelerate your development process. There are 30+ bricks for adding features, screens, and pizzazz:

  • Subscription service (fast_subscriptions)
  • User feedback screen (fast_feedback)
  • Google maps setup (google_maps_flutter)
  • Biometric sign in (fast_biometrics)
  • Pre-built RSS feed module
  • Pre-build AI Chat module (for Firebase builds)
  • A generic Feedback feature that works out-of-the-box with Firestore, Supabase, Pocketbase or Appwrite
  • Adds billing dependency to app/build.gradle for subscription apps
  • Plus lots more

To get all of the bricks, as well as lifetime updates and all future bricks that are added, check out our website!

flutter_fast_cli's People

Contributors

jtmuller5 avatar carmas123 avatar

Stargazers

Febry Ardiansyah avatar Apo avatar Saif Aljanahi avatar Yeikel Uriarte Arteaga avatar Mxlgv avatar  avatar Fabio Tea avatar Rock avatar Cem Avcı avatar  avatar Andres Garcia avatar Onur Keskin, Ph.D. avatar Andrei Sas avatar Temirlan Tashbolotov avatar  avatar Chandan kumar yadav avatar Yakup Emeksiz avatar Yakub Subaşı avatar  avatar Mandy Schoep avatar Robson Silva avatar عمر avatar Imran Issa avatar TimoDevs avatar  avatar Matthew Jaoudi avatar Damy Wise avatar  avatar  avatar  avatar Prafull Kotecha avatar Walid Ashik avatar Deepraj Baidya avatar Martin Olivari avatar Hafeez Ahmed avatar Md Ruhul Amin Rahat avatar  avatar vincentj avatar  avatar Lam Nguyen avatar  avatar

Watchers

senthilkumar avatar Damy Wise avatar  avatar

flutter_fast_cli's Issues

can't find @firebase

Hi,

I am using windows.

I had two issues, one I solved the other I have not yet.

  1. All imports pointed to (for example):
import 'package:flutterfast/features/authentication/ui/forgot_password_view.dart';

and were not found. I manually changed all code in the project to:

import 'package:<MY APP NAME>/features/authentication/ui/forgot_password_view.dart';
  1. After that I have one issue remaining. It is not resolving @firebase annotation.

fast wizard hangs after providing app name

Hi, I just tested running "fast wizard" and it stalls immediately after asking for the application name.

Running "fast app -n my_app -o com.example" works.

Tested on Windows with both PowerShell and the Command Prompt.

Too much boilerplate code

There is too much boilerplate code, there should be a wizard for choosing services we want to link to our project. I don't think it's necessary to have firebase, appwrite, supabase services simultaneously in our source code. But that's a great job you've done. Congrats mate. I love the setup.

Outdated dependencies

The dependencies available by default on the app are outdated, when you upgrade them, you get a bunch of errors.

Unable to find file

Hi when I try to run fast to create a new project on Windows machine I got an error on flutter create command.
I got "Unable to find specified file", it would appear as if the args package can't find flutter on my PC.

Is there anything particular I can check?

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.