A Flutter Package for Google Login using Firebase

Google Login

A Flutter package for Google sign-in using Firebase.

Features:

  • Google login functionality using firebase

Usage:

This package used to sign in to the google by using the authService.signInWithGoogle() method of this package, First you need to add or connect your flutter application with firebase and add the dependency required for this package to run

Get Started:

AuthServiceForGoogle()

Import:

import 'package:google_login/google_login_module.dart';

// Instantiate the AuthServiceForGoogle

final authService = AuthServiceForGoogle();

// Call the signInWithGoogle method to initiate the Google sign-in process

authService.signInWithGoogle()

Dependencies:

For sign in with Google, this package contains the following dependencies in the yaml file, which must be upgraded in the future.

dependencies:

firebase_auth: ^4.15.2

google_sign_in: ^6.2.0

Installation:

Add the following to your pubspec.yaml file to use this package for google login:


dependencies:
  google_login: ^1.0.2


Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add google_login

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  google_login: ^1.0.2

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:google_login/google_login.dart'; 

Download details:

Author: Deepanshi-Badwaya

Source: https://github.com/Deepanshi-Badwaya/google_login

#flutter #firebase 

A Flutter Package for Google Login using Firebase
1.75 GEEK