firebase_auth_handler 0.0.1 copy "firebase_auth_handler: ^0.0.1" to clipboard
firebase_auth_handler: ^0.0.1 copied to clipboard

A Flutter package that simplifies authentication state management and handles navigation to different pages based on whether the user is logged in or not.

This package provides an Auth widget that seamlessly integrates with Firebase Authentication to manage user login state. It allows developers to specify custom UI for both logged in and not logged in states, making it easy to navigate users to appropriate pages or screens.

Features #

  1. Seamless integration with Firebase Authentication.
  2. Customizable UI based on authentication state.
  3. Handles navigation to appropriate screens based on user login status.

Getting started #

flutter pub add firebase_auth_handler

Usage #

To use this package, include the Auth widget in your app and provide builders for logged in and not logged in states.

import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_auth_handler/firebase_auth_handler.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Auth(
        loggedInBuilder: (context) => HomePage(), // Widget for logged in state
        notLoggedInBuilder: (context) => LoginPage(), // Widget for not logged in state
      ),
    );
  }
}
1
likes
120
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that simplifies authentication state management and handles navigation to different pages based on whether the user is logged in or not.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

firebase_auth, flutter

More

Packages that depend on firebase_auth_handler