Coder Social home page Coder Social logo

start-flutter's Introduction

Flutter starter kit

Built with clean architecture and domain driven design with clear seperation of Presentation, Domain and Data layers.

βœ… Presentation layer: Contains

πŸ”† UI components like widgets and screens

πŸ”† BLoC: State management layer

πŸ”† View model

βœ… Domain layer: Contains

πŸ”† Data model / Data class to be used for the presentation layer

πŸ”† Mapper: Combines data from more than one data classes

πŸ”† Abstract repository

βœ… Data layer: Contains the implementation of repository which defines the data source (local or remote)

βœ… Data flows: From data layer to presentation layer

βœ… Call flows: Presentation layer to data layer

Technical design

Architecture technical design

πŸ’‘ Get started

  1. Download the configuration file from the Firebase Console (the file is called google-services.json). Add this file into the android/app directory within your Flutter project.

  2. Download the configuration file from the Firebase Console (the file is called GoogleService-Info.plist). Add this file via this instruction.

  3. Create file web/config/firebase_config.js. This file should contain the configuration for firebase as you can see web/config/firebase_config.js.example.

/// Copy and paste the following information
/// from your firebase console and save the file as
/// firebase_config.js

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
var firebaseConfig = {
  apiKey: "<Your API Key>",
  authDomain: "Your Auth Domain",
  projectId: "Your Project ID",
  storageBucket: "Your storage bucket",
  messagingSenderId: "Your Messaging Sender ID",
  appId: "Your App ID",
  measurementId: "Your Measurement ID",
};

// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();

NOTE: Please run the shell script to generate code before flutter pub get

sh script/code_generator.sh

start-flutter's People

Contributors

abhishek01039 avatar japatel225 avatar a4adityaa avatar vaishnavi-2307 avatar charmy-k avatar

Stargazers

Robson Antonio Lima Mendonça avatar joe sumpter avatar  avatar  avatar Blood Engineering avatar George Goldstone avatar Glenn Versweyveld avatar Samuel Kanyi avatar

Watchers

Che avatar  avatar

start-flutter's Issues

Fix phone auth for web

Error: Assertion failed:
../…/src/firebase_auth_web_recaptcha_verifier_factory.dart:80
window.document.getElementById(container) != null
"An exception was thrown whilst creating a RecaptchaVerifier instance. No DOM element with an ID of recaptcha could be found."
    at Object.throw_ [as throw] (http://localhost:59920/dart_sdk.js:5041:11)
    at Object.assertFailed (http://localhost:59920/dart_sdk.js:4980:15)
    at new firebase_auth_web_recaptcha_verifier_factory.RecaptchaVerifierFactoryWeb.new (http://localhost:59920/packages/firebase_auth_web/src/firebase_auth_web_recaptcha_verifier_factory.dart.lib.js:156:77)
Launching lib/main.dart on Chrome in debug mode...
lib/main.dart:1
This app is linked to the debug service: ws://127.0.0.1:59997/kdoB-5dKAV0%3D/ws
    at firebase_auth_web_recaptcha_verifier_factory.RecaptchaVerifierFactoryWeb.__.delegateFor (http://localhost:59920/packages/firebase_auth_web/src/firebase_auth_web_recaptcha_verifier_factory.dart.lib.js:74:14)
    at Function.new (http://localhost:59920/packages/firebase_auth/firebase_auth.dart.lib.js:597:94)
    at auth_view_model.AuthViewModel.new.signInWithPhoneNumber (http://localhost:59920/packages/hf_flutter_starter_kit/src/app/feature/authentication/domain/viewmodel/auth_view_model.dart.lib.js:160:137)
    at signInWithPhoneNumber.next (<anonymous>)
    at runBody (http://localhost:59920/dart_sdk.js:37422:34)
    at Object._async [as async] (http://localhost:59920/dart_sdk.js:37453:7)
    at auth_view_model.AuthViewModel.new.signInWithPhoneNumber (http://localhost:59920/packages/hf_flutter_starter_kit/src/app/feature/authentication/domain/viewmodel/auth_view_model.dart.lib.js:158:20)
    at login_verify_screen._LoginVerifyScreenState.new.afterFirstLayout (http://localhost:59920/packages/hf_flutter_starter_kit/src/app/feature/authentication/view/login_verify_screen.dart.lib.js:780:25)
    at http://localhost:59920/packages/after_layout/after_layout.dart.lib.js:23:102
    at _RootZone.runUnary (http://localhost:59920/dart_sdk.js:37274:59)
    at _FutureListener.then.handleValue (http://localhost:59920/dart_sdk.js:32530:29)
    at handleValueCallback (http://localhost:59920/dart_sdk.js:33057:49)
    at Function._propagateToListeners (http://localhost:59920/dart_sdk.js:33095:17)
    at _Future.new.[_completeWithValue] (http://localhost:59920/dart_sdk.js:32943:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:59920/dart_sdk.js:32964:35)
    at Object._microtaskLoop (http://localhost:59920/dart_sdk.js:37526:13)
    at _startMicrotaskLoop (http://localhost:59920/dart_sdk.js:37532:13)
    at http://localhost:59920/dart_sdk.js:33303:9
Application finished.

Implement amplify

Provide our users an option to choose firebase or amplify for backend

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.