A simple flutter starter with firebase & getX

Overview

Flutter starter

GetX simplify & optimise a lot how to use Flutter!

You should read a bit about GetX and Firebase.

Package used

  • Firebase (firebase_core, firebase_auth, cloud_firestore)
  • GetX
  • get_storage
  • crypto
  • http
  • csv (Use to convert csv of google excel translations)

External resources

Commons commands

  • flutter run will run the app on a device. (It will ask which devices if you got few)
  • flutter devices will show you your devices list.
  • flutter run -d {device} will run on the chosen device.
  • flutter build {web | ios | android} will build the app for the chosen platform.
  • flutter run --release will let you test an optimized build (Like the release).

Translations

You can run a commandline app to generate the GetX Localization class which pulls from a google sheet

  • Go to /helpers/update_localizations.dart
  • Run with dart update_localizations.dart

Firebase

It's currently link to a test one on mine (To make your test rapidly of that Repo #imSoNice) but if make sure you setup firebase with your project to continue your development.

There should be things to replace: (When you will setup your proper firebase)

  • A file for IOS (/ios/Runner/GoogleService-Info.plist)
  • A file for Android (/android/app/google-services.json)
  • Credentials to replace for web. (In /web/index.html)

The rules in Firestore for this project are fairly simple. Here are the rules -created.

  • The first rule matches any user in the admin collection and allows you to read that document only. No one is allowed to write to this collection. I manually add my admin users through the firebase console.

  • The second rule allows the user to read and write only if the user matches the currently logged in user. So a user can only change information about themselves. Here is how my collections are setup in Firestore.

Themes

Use as far as you can the themes.

TODO: There is more to add here

Overview of the project

main.dart — contains info for maintaining the state of the app for the theme, language and user. It initializes language and theme settings. Sets up routing.

/constants/

Tips: Try to use & edit app_themes constants as more as you can.

app_themes.dart — contains info related to our light and dark themes.

globals.dart — contains some global app settings

app_routes.dart — contains the app routes.

/controllers/

Tips: The controllers are contains a lot of logic and think it a way to be reusable!

auth_controller.dart — our user and authentication functions for creating, logging in and out our user and saving our user data.

language_controller.dart — saves and loads our selected language.

theme_controller.dart — saves and loads our selected theme.

/helpers/

Tips: The google excel way is sooo nice. Use that update_localizations script!

validator.dart — contains some validation functions for our form fields.

update_localizations.dart — command line dart app that generates the localization.g.dart file.

localizations.g.dart — this file is generated from our google sheet (do not manually edit this file).

/models/

user_model.dart — contains the model for our user saved in Firestore.

menu_option_model.dart — contains our model for our language options and theme options in settings.

/screens/

Tips:

  • Screens should use components and add max-width, margin & spacing between them.
  • The screens file name should has similar name if not a exact name as the url & className should be like NameScreen.

home.dart — contains the ui for the home which shows info about the user.

settings.dart — contains the settings screen for setting the theme and language and some user settings.

splash.dart — contains the initial loading screen, currently just a circular progress indicator.

/screens/auth/

Tips: If there is a lot of screen that share a common purpose, group them in a folder.

reset-password.dart — sends a password reset email to the user.

sign-in.dart — allows user to login with email and password.

sign-up.dart — allows user to create a new account.

update-profile.dart — allows user to change his email or name.

/components/

Tips: The components should NOT have a max-width, margin/padding most of the time! I mean except for the components with that purpose like the Section.

section.dart — Add a padding(left/right) and max-width for a section. Imagine (Layout -> Section -> Content/Components)

avatar.dart — displays a user avatar on the home.

dropdown_picker.dart — shows a dropdown list.

dropdown_picker_with_icon.dart — shows a dropdown list with icons.

form_input_field.dart — handles our form field elements.

form_input_field_with_icon.dart — handles our form field elements but has an icon too.

vertical_spacing.dart — just a space in the ui.

label_button.dart — one type of button in ui.

loading.dart — circular loading indicator overlay.

logo_graphic_header.dart — a graphic displayed in our ui.

primary_button.dart — another button in the ui.

segmented_selector.dart — a control used to select the theme.

You might also like...

Flutter course chatapp - A Flutter Course Chat App Starter

flutter_course_chat_app_starter Getting Started Firebase installations 1- Open F

Jan 5, 2022

Starter app for Flutter that includes many different production app features; some not typically included in demo apps.

first_app: Starter app for a Flutter production app Maintainer: Greger Wedel, https://github.com/gregertw Listed on: Latest build and artifacts: ** La

Dec 28, 2022

Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky. Introduction Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster. You just need to add

Nov 26, 2022

Flutter starter template for production applications with a REST backend

Flutter starter template for production applications with a REST backend

Flutter Boilerplate My Flutter starter template for production applications with a REST backend. The main aim of this template is to get you up and ru

Apr 13, 2022

Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster.

Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster.

Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster. You just need to add some adjustment to the frontend and you can create your own backend.

Dec 20, 2022

Starter code for the Dicee project in the Complete Flutter Bootcamp

Starter code for the Dicee project in the Complete Flutter Bootcamp

Dicee 🎲 Our Goal The objective of this tutorial is to introduce you to the core programming concepts that will form the foundation of most of the app

Dec 31, 2022

A Flutter e-commerce starter kit built using ScopedModel

Flutter E-Commerce App A Flutter e-commerce starter kit built using ScopedModel for state management that allows you to view a list of paginated produ

Nov 10, 2022

Starter code for the Clima Project from the Complete Flutter Development Bootcamp

Starter code for the Clima Project from the Complete Flutter Development Bootcamp

Clima ☁ Our Goal The objective of this tutorial is to learn about asynchronous programming in Dart. We'll look at how to carry out time consuming task

Dec 10, 2022

A starter example of a Flutter + Mobx + Notifications

A starter example of a Flutter + Mobx + Notifications

flutter-example A starter example of a Flutter + Mobx + Firebase Nofitications Before Debug $ flutter packages pub run build_runner watch --delete-con

Feb 3, 2021
Owner
Guillaume Huard Hughes
Tech Enthusiast, I'm a web/app developper.
Guillaume Huard Hughes
Starter-Flutter - Starter flutter project for best architecture and seperation of code

Modular-Architecture Codebase CodeBase , Infrastructure and the common Layers (c

Ahmed Tawfiq 13 Feb 16, 2022
A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter project. This starter kit build an App Store app as a example

Flutter Starter Kit - App Store Example A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter pro

kw101 678 Jan 8, 2023
Flutter starter - GetX Flutter Firebase Auth Example

GetX Flutter Firebase Auth Example UPDATE: Version 2.0.0 Changed to new language

Jeff McMorris 393 Jan 5, 2023
This repo provides a starter kit thats include Getx package.

Getx_Starter This repo provides a starter kit thats include Getx package. It includes key-value databases, sample pages, and components which they are

Okan 2 Apr 27, 2022
Flutter-GetX-Toturials - Getx full tutorials for flutter

getx_full_tutorials A new Flutter getx tutorial. This Project Contains: Snackbar

Inzimam Bhatti 2 Dec 1, 2022
Flutter getx template - A Flutter Template using GetX package for State management, routing and Dependency Injection

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package

Tareq Islam 6 Aug 27, 2022
constructing... Flutter, Ganache, Truffle, Remix, Getx Pattern, Infura, GetX, Blockchain

constructing... Flutter, Ganache, Truffle, Remix, Getx Pattern, Infura, GetX, Blockchain

Kauê Murakami 20 Dec 20, 2022
A basic boilerplate template for starting a Flutter GetX project. GetX, Dio, MVVM, get CLI, Localization, Pagination etc are implemented.

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We

Hasan Abdullah 214 Jan 9, 2023
Flutter GetX Template (GetX, Dio, MVVM)

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We

null 7 Dec 18, 2022
Flutter firebase starter project

Flutter Firebase Starter project Made with ?? from Nepal A project you can clone to build your next project with Flutter with Firebase services. What

Damodar Lohani 262 Dec 29, 2022