flutterfire_ui 0.4.0 copy "flutterfire_ui: ^0.4.0" to clipboard
flutterfire_ui: ^0.4.0 copied to clipboard

discontinued
outdated

UI library built on top of firebase services

FlutterFire UI #

pub package

Installation #

flutter pub add flutterfire_ui

Getting Started #

To get started with FlutterFire UI, please explore the widget catalog, the storybook and see the documentation.

Usage #

Here's a quick example that shows how to build a SignInScreen and ProfileScreen in your app

import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutterfire_ui/auth.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    const providerConfigs = [EmailProviderConfiguration()];

    return MaterialApp(
      initialRoute: FirebaseAuth.instance.currentUser == null ? '/sign-in' : '/profile',
      routes: {
        '/sign-in': (context) {
          return SignInScreen(
            providerConfigs: providerConfigs,
            actions: [
              AuthStateChangeAction<SignedIn>((context, state) {
                Navigator.pushReplacementNamed(context, '/profile');
              }),
            ],
          );
        },
        '/profile': (context) {
          return ProfileScreen(
            providerConfigs: providerConfigs,
            actions: [
              SignedOutAction((context) {
                Navigator.pushReplacementNamed(context, '/sign-in');
              }),
            ],
          );
        },
      },
    );
  }
}

Learn more in the Integrating your first screen section of the documentation

Issues and feedback #

Please file FlutterFire UI specific issues, bugs, or feature requests in our issue tracker.

To contribute a change to this plugin, please review our contribution guide and open a pull request.