flutter_firebase_extra 0.2.1 copy "flutter_firebase_extra: ^0.2.1" to clipboard
flutter_firebase_extra: ^0.2.1 copied to clipboard

discontinued
outdated

Manage authentication with firebase in an extremely simple way

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_firebase_extra/flutter_firebase_extra.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<AuthState>(
      child: MaterialApp(
        home: ParentPage(),
      ),
      create: (_) => AuthState(splashScreenDurationMillis: 2000),
    );
  }
}

class ParentPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return AuthManagerWidget(
      splashScreen: Scaffold(
        backgroundColor: Colors.black,
        body: Center(child: Text("Splash Screen", style: TextStyle(fontSize: 40, color: Colors.white),),),
      ),
      loginScreen: LoginScreen(
        backgroundColor: Colors.purple,
        expandedWidget: Center(
          child: Container(
            height: 200,
            width: 300,
            color: Colors.red,
          ),
        ),
        emailLogin: (context) {
          return EmailLoginScreen(
            appBar: AppBar(
              title: Text("MyApp Login"),
            ),
            mainColor: Colors.blue,
            privacyUrl: "https://www.myprivacyurl.com",
            termsUrl: "https://mytermsurl.com",
          );
        },
      ),
      mainScreen: Builder(
        builder: (BuildContext context) {
          AuthState authState = Provider.of(context);

          return Scaffold(
            backgroundColor: Colors.blue,
            body: Center(
              child: RaisedButton(
                onPressed: () {
                  authState.signOut();
                },
                child: Text('Sign out'),
              ),
            ),
          );
        },
      ),
    );
  }
}
0
likes
40
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Manage authentication with firebase in an extremely simple way

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

apple_sign_in, firebase_auth, flutter, flutter_markdown, google_sign_in, provider, shared_preferences, shimmer, url_launcher

More

Packages that depend on flutter_firebase_extra