https://github.com/udaykumar-dhokia/firebase_auth_handler
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.
https://github.com/udaykumar-dhokia/firebase_auth_handler
firebase firebase-auth flutter package
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/udaykumar-dhokia/firebase_auth_handler
- Owner: udaykumar-dhokia
- License: mit
- Created: 2024-07-18T06:50:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T08:35:22.000Z (almost 2 years ago)
- Last Synced: 2025-06-19T04:03:25.460Z (about 1 year ago)
- Topics: firebase, firebase-auth, flutter, package
- Language: Dart
- Homepage:
- Size: 368 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
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.
```dart
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
),
);
}
}
```