GithubHelp home page GithubHelp logo

winxene / bloc_auth_firestore Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 289 KB

An example of Flutter project which utilises Firestore and Firebase with bloc pattern

License: MIT License

Kotlin 0.47% Ruby 4.72% Swift 2.26% Objective-C 0.12% Dart 92.43%

bloc_auth_firestore's Introduction

Flutter Firestore Authentication with BLoC Pattern

This project is an example of implementing the BLoC (Business Logic Component) pattern in a Flutter application that uses Firestore and Firebase Authentication. In addition to that, this project complies with clean architecture.

Project Structure

The project is structured as follows:

  • lib/: This is where the main code of the application resides.
    • bloc/: Contains the BLoC classes for managing app state.
    • models/: Contains the data models used in the application.
    • screens/: Contains the UI screens of the application.
    • manager/: Contains the manager used for Firebase Authentication and Firestore.
    • features/: Contains the different features of the application, each feature is isolated and independent from others.
    • shared/: Contains the code that is shared across multiple features such as widgets, utilities, and constants.
    • core/: Contains the core functionalities that are used throughout the application such as network requests, local storage, and authentication.
  • test/: Contains the unit tests for the application.
  • pubspec.yaml: The file for managing Dart packages for the application.

About BLoC Pattern

The BLoC pattern is a design pattern in Flutter for separating business logic from UI code. It stands for Business Logic Component. The main idea behind BLoC is that everything in the app should be represented as stream of events: widgets submit events; other widgets will respond. BLoC sits in the middle, managing the conversation.

The BLoC pattern makes your code modular, easy to test and scalable. It separates the business logic from the UI, allowing developers to focus on the UI while knowing that the business logic is separated and handled.

Why Use BLoC Pattern

  • Separation of Concerns: The BLoC pattern separates business logic from UI code. This makes your code cleaner and easier to maintain.
  • Testability: Because business logic is separated from UI code, it's easier to write unit tests for the business logic.
  • Reusability: The BLoC pattern allows you to reuse the same business logic for different UIs.

Getting Started

To get started with this project, clone the repository and run flutter run in the root directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

bloc_auth_firestore's People

Contributors

winxene avatar

Stargazers

alberto.garcia 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.