A Flutter project that implemented getx package and firebase services.

Overview

Get X Firebase

pub package likes building Telegram

A Flutter Package that implemented firebase services with getx package.

It's free, open source, complete, rapid development package for creating Social apps, Chat apps, Community(Forum) apps, Shopping mall apps, and much more based on Firebase.

  • Complete features.
    This package has complete features (see Features below) that most of apps require.
  • Simple, easy and the right way.
    We want it to be deadly simple yet, right way for ourselves and for the developers in the world. We know when it gets complicated, our lives would get even more complicated.
  • Real time.
    We design it to be real time when it is applied to your app. All the events like post and comment creation, voting(like, dislike), deletion would appears on all the user's phone immediately after the event.

Help Maintenance

I've been maintaining quite many repos these days and burning out slowly. If you could help me cheer up, buying me a cup of coffee will make my life really happy and get much energy out of it.



Features

  • User

    • User registration and login with email/password
    • User profile update
    • User profile photo update
    • Social logins
      • Google
      • Apple (Coming Soon)
      • Facebook (Coming Soon)
    • Phone number authentication (Coming Soon)
  • Push notifications (Coming Soon)

    • Admin can send push notifications to all users.
    • Admin can send push notifications to users of a forum.
    • User can enable/disable to get notification when other users creates comments under his posts/comments.
    • User can subscribe/unsubscribe for new posts or comments under a forum.
  • Location (Coming Soon)

    • App can update login user's GEO location. There are many possiblities by saving GEO location.
    • App can search other users(by distance, gender) near the login user GEO point.
  • Security

    • Tight Firestore security rules are applied.
  • Fully Customizable
    • GetxFire package does not involve in any of part application's login or UI. It is completely separated from the app. Thus, it's highly customizable.

Getting Started

Installation

Install the library from pub:

dependencies:
  getxfire: <latest-version>

Import the library

import 'package:getxfire/getxfire.dart';

Init GetxFire

Add this inside main() function at main.dart file:

WidgetsFlutterBinding.ensureInitialized();
await GetxFire.init();

Usage

Open Dialog

Will popup success message :

GetxFire.openDialog.messageSuccess("Create User successfully!");

Will popup error message :

GetxFire.openDialog.messageError("Failed to Create User!");

Will popup info message :

GetxFire.openDialog.info(
  lottiePath: GetxFire.lottiePath.COMING_SOON,
  lottiePadding: EdgeInsets.only(top: 50),
);

Will popup message with yes and no confirm button :

GetxFire.openDialog.confirm(
  content: "Are you sure to sign out?",
  lottiePath: GetxFire.lottiePath.THINKING, // lottiePath: "assets/lottie/coffee-favorite.json",
  onYesClicked: () async {
    final User user = GetxFire.currentUser;
    if (user == null) {
      ScaffoldMessenger.of(context)
          .showSnackBar(const SnackBar(
        content: Text('No one has signed in.'),
      ));
      return;
    }
    await GetxFire.signOut();

    final String uid = user.uid;
    ScaffoldMessenger.of(context).showSnackBar(SnackBar(
      content: Text('$uid has successfully signed out.'),
    ));
  },
);

Get Lottie Assets Available

GetxFire.lottiePath.<functions>

We can get default lottie animation assets, such as : THINKING, COMING_SOON, SEARCH_FILES, SAD_HEART, NO_ACTIVITY, MULTI_TASKING, IMAGE_ICON, EMPTY_BOX, and COFFEE_FAVORITE

class LottiePath {
  final THINKING = "assets/lottie/thinking.json";
  final COMING_SOON = "assets/lottie/coming-soon.json";
  final SEARCH_FILES = "assets/lottie/search-files.json";
  final SAD_HEART = "assets/lottie/sad-heart.json";
  final NO_ACTIVITY = "assets/lottie/no-activity.json";
  final MULTI_TASKING = "assets/lottie/multi-tasking.json";
  final IMAGE_ICON = "assets/lottie/image-icon.json";
  final EMPTY_BOX = "assets/lottie/empty-box.json";
  final COFFEE_FAVORITE = "assets/lottie/coffee-favorite.json";
}

Example :

GetxFire.lottiePath.THINKING

Loading Progress Bar

GetxFire.progressHud.<functions>

Example :

// This for show loading progress bar
GetxFire.progressHud.show();

// This for hide loading progress bar
GetxFire.progressHud.hide();

Converter Date, etc.

GetxFire.converter.<functions>

Helper Scripts

GetxFire.helper.<functions>

For Use FirebaseAuth.instance Services

GetxFire.auth.<functions>

For Use Firestore Services

GetxFire.firestore.<functions>

For Use Storage Services

GetxFire.storage.<functions>

Login Anonymously

await GetxFire.signInAnonymously(
  onSuccess: (userCredential) {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text(
            'Signed in Anonymously as user ${userCredential.user.uid}'),
      ),
    );
  },
  onError: (code, message) {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text('Failed to sign in Anonymously\n$message'),
      ),
    );
  },
);

Login Email & Password

await GetxFire.signInWithEmailAndPassword(
  email: _emailController.text,
  password: _passwordController.text,
  onSuccess: (userCredential) {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text('${userCredential.user.email} signed in'),
      ),
    );
  },
  onError: (code, message) {},
);

Login With Google (Google Sign-in)

await GetxFire.signInWithGoogle(
  onSuccess: (userCredential) {
    final user = userCredential.user;
    ScaffoldMessenger.of(context).showSnackBar(SnackBar(
      content: Text('Sign In ${user.uid} with Google'),
    ));
  },
  onError: (code, message) {
    // ScaffoldMessenger.of(context).showSnackBar(
    //   SnackBar(
    //     content: Text('Failed to sign in with Google: $message'),
    //   ),
    // );
  },
);

For Get Current User

GetxFire.currentUser

example :

User user = GetxFire.currentUser;

For Get Current User Changes

Add this inside void initState() function at statfullwidget :

GetxFire.userChanges().listen((event) => setState(() {}));

For Get Current User State Changes

Add this inside void initState() function at statfullwidget :

GetxFire.userStateChanges(setState);

References

Packages Dependencies

These are the available Packages Dependencies in this repository.

Plugin Pub Points Popularity Likes
firebase_core pub package pub points popularity likes
firebase_auth pub package pub points popularity likes
cloud_firestore pub package pub points popularity likes
firebase_storage pub package pub points popularity likes
firebase_dynamic_links pub package pub points popularity likes
firebase_analytics pub package pub points popularity likes
google_sign_in pub package pub points popularity likes
intl pub package pub points popularity likes
get pub package pub points popularity likes
lottie pub package pub points popularity likes
font_awesome_flutter pub package pub points popularity likes
image_picker pub package pub points popularity likes
image_cropper pub package pub points popularity likes
flutter_animated_dialog pub package pub points popularity likes
flutter_spinkit pub package pub points popularity likes
flutter_web_browser pub package pub points popularity likes

Components

  • Firebase
    Firebase is a leading cloud system powered by Google. It has lots of goods to build web and app.

    • We first built it with Firebase and LEMP(Linux + Nginx + MariaDB + PHP). It was fine but was a pressure to maintain two different systems. So, We decided to remove LEMP and built it again with Firebase only.

    • You may use Firebase as free plan for a test.

  • Flutter
    Flutter as its app development toolkit.

  • And other open source Flutter & Dart packages.

Requirements

  • Basic understanding of Flutter and Dart.
  • Basic understanding of Firebase.
  • Editor: VSCode, Xcode(for Mac OS).
    Our primary editor is VSCode and we use Xcode for Flutter settings. We found it more easy to do the settings with Xcode for iOS development.

Installation & Usage

  • To use this plugin, please visit the GetxFire Wiki Documentation

  • If you are not familiar with Firebase and Flutter, you may have difficulties to install it.

    • GetxFire is not a smple package that you just add it into pubspec.yaml and ready to go.
    • Many of the settings are coming from the packages that getxfire is using. And for release, it may need extra settgins.
    • Most of developers are having troubles with settings. You are not the only one. Ask us on Git issues.
  • We will cover all the settings and try to put it as demonstrative as it can be.

    • We will begin with Firebase settings and contiue gradual settings with Flutter.
  • And please let us know if there is any mistake on the documentation.

State Management

GetX : https://pub.dev/packages/get

GetX is an extra-light and powerful solution for Flutter. It combines high-performance state management, intelligent dependency injection, and route management quickly and practically.

GetX has 3 basic principles. This means that these are the priority for all resources in the library: PRODUCTIVITY, PERFORMANCE AND ORGANIZATION.

GetX is not bloated. It has a multitude of features that allow you to start programming without worrying about anything, but each of these features are in separate containers and are only started after use. If you only use State Management, only State Management will be compiled. If you only use routes, nothing from the state management will be compiled.

GetX has a huge ecosystem, a large community, a large number of collaborators, and will be maintained as long as the Flutter exists. GetX too is capable of running with the same code on Android, iOS, Web, Mac, Linux, Windows, and on your server.

Social Media

You might also like...

Self Host Group Chat App (firebase + clean architecture) is full functional group chat where you can create new groups and update profile and communicate in different groups easily. there 2 auth firebase method [Google & Email Password]

Self Host Group Chat App (firebase + clean architecture) is full functional group chat where you can create new groups and update profile and communicate in different groups easily. there 2 auth firebase method [Google & Email Password]

Self Host Group Chat App (firebase + clean architecture) Show some and star the repo to support the project Screenshots Packages we are using: flutter

Jan 8, 2023

Task management app with flutter, firebase firestore, and firebase auth

to_do_list A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Mar 3, 2022

Ecommerce-App-with-firebase - Ecommerce App With Firebase and Flutter

Ecommerce-App-with-firebase - Ecommerce App With Firebase and Flutter

Samir Online Store Samir Online Store Samir Online Store Samir Online Store Down

Dec 24, 2022

GETX 2.13.1 COMMON CLASS

ecommerce export PATH="$PATH:/Users/mac/Documents/flutter/bin" shopping use total price count num get totalPrice = items.fold(0, (total, current) =

Jan 30, 2022

Dio desafio chatonline flutter firebase - Developing an Online Chat Application Integrated with Firebase

Dio desafio chatonline flutter firebase - Developing an Online Chat Application Integrated with Firebase

Desenvolvendo um aplicativo de Chat Online integrado ao Firebase Descrição Neste

Jan 4, 2022

Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service.

Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service.

chat_app Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service. Resource video 0.1 Sign In and Register page

Oct 4, 2021

This design has been created for educational purposes. Also this project has integrated push notifications with firebase and my own server in python.

This design has been created for educational purposes. Also this project has integrated push notifications with firebase and my own server in python.

Ui Clone of the Nequi application This design has been created for educational purposes. Also this project has integrated push notifications with fire

Nov 17, 2022

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

Jan 6, 2023

This is an example project for Firebase integration using flutter.

This is an example project for Firebase integration using flutter.

Flutter Firebase Integration Example Project In this video we have shown how to create #Firebase app from firebase console and integrate that into #Fl

Jul 28, 2022
Comments
  • Problem occured configuration project

    Problem occured configuration project

    i try to run my flutter app , i use package called getxfire , before the curent error i got same error with flutter life cycle package and after adding implementation method in this package it run

    but now i have this error

    What went wrong: A problem occurred configuring project ':flutter_web_browser'.

    Could not load compiled classes for build file 'C:\src\flutter.pub-cache\hosted \pub.dartlang.org\flutter_web_browser-0.15.0\android\build.gradle' from cache

    opened by pretech86 0
  • Suggest

    Suggest

    Kindly can you add these features

    1- upload posts 2- upload photos 3- make comments 4- make like and dislike , love and others 5- make share 6- delete posts 7- get all users 8- get all posts

    opened by pretech86 0
  • Example Forum

    Example Forum

    Hello, thanks for the cool package... I look forward to watching it grow and evolve. I see there's lots of commented code in your example. Do you plan to make it a full working example with forum features etc? Thanks

    opened by jtkeyva 0
Releases(0.1.7)
  • 0.1.7(Jun 8, 2021)

    • Added GetxFire.userChanges() for user current changes stream.
    • Added GetxFire.userStateChanges(setState) for user current state changes streaming automatically.
    • Updated Readme File.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.6(Jun 6, 2021)

    • Added GetxFire.helper for Helper.
    • Included by launchURL(), copyText(), stringTag(), and searchIndex()
    • Updated Readme File.
    • Updated Readme File for detail documentation.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Jun 2, 2021)

    • Added GetxFire.firestore for FirestoreService.
    • Added GetxFire.storage for StorageService.
    • Added GetxFire.openDialog for OpenDialog.
    • Added GetxFire.progressHud for ProgressHud.
    • Implemented get, lottie, font_awesome_flutter, image_picker, image_cropper, flutter_animated_dialog, and flutter_spinkit.
    • BREAK UPDATES
    • Null-Safety Release
    • Registration
    • Sign In with Email Password
    • Sign In Anonymously
    • Logout
    • Delete Current User
    Source code(tar.gz)
    Source code(zip)
  • 0.0.4(May 28, 2021)

  • 0.0.3(May 28, 2021)

  • 0.0.1(May 26, 2021)

Owner
Faisal Ramdan
Flutter Programmer | Mobile Developer (Android & iOS)
Faisal Ramdan
Front-end of multiplayer web3 games implemented with Flutter to run on all platforms (Web, Android, iOS, Linux, Window, macOS, TV-OS)

Front-end of multiplayer web3 games implemented with Flutter to run on all platforms (Web, Android, iOS, Linux, Window, macOS, TV-OS)

R-Team 5 Nov 15, 2022
A test for a position as a mobile engineer at the company Phi. (I did not participate in the selection process, I implemented the application for study purposes only)

Phi Bank Aplicativo desenvolvido baseado num teste para o cargo de desenvolvedor mobile na empresa Phi. (Não participei do processo seletivo, implemen

null 1 Dec 1, 2021
All Algorithms implemented in Dart

The Algorithms - Dart All algorithms implemented in Dart (for education) These implementations are for learning purposes. They may be less efficient t

The Algorithms 1.2k Dec 29, 2022
A simple DLNA DMC library implemented by Dart.

DLNA-Dart A simple DLNA DMC library implemented by Dart. It is tiny and only the basic network video casting function is supported. Structure Flutter

Ning 68 Jan 4, 2023
Sorting Visualizer using Flutter followed MVVM Pattern and used Stacked Services. Hope you like it 😋

Sortlizer An App to visualize various sorting algorithms...Developed using Flutter, followed MVVM pattern, and used stacked services. Play Store Link

Roshan Kumar 17 Dec 28, 2022
The official sdk for the user-friendly API of Mega services on the Dart language.

megasdkdart The official sdk for the user-friendly API of Mega services in the Dart language. Example: import 'package:megasdkdart/megasdkdart.dart';

meg4cyberc4t 4 Mar 30, 2022
E-Commerce App built on Flutter with Firebase, SQLite, GetX and MVVM Architecture.

Shopzler A new open source E-commerce App created using Flutter and GetX. ScreenShots Features : Sign-In, Sign-Up and LogOut using Email & Password /

AHMED ELSAYED 138 Jan 6, 2023
Berikut merupakan source code Chat Apps dengan Flutter + GetX + Firebase

chatapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Sandikha Rahardi 52 Dec 31, 2022
Rename Flutter Project Bundle ID Plugin with Firebase Project Support

About (Null-Safety) It helps you to change your flutter project's AppName and BundleId for different platforms, currently only available for IOS, Andr

Inter-Con Security 1 Nov 12, 2021