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

discontinued
outdated

Manage authentication with firebase in an extremely simple way

flutter_firebase_extra #

Manage user auth in minutes. This package uses (provider package)

AUTH Basic ussage #

  1. (Add firebase to your flutter app)

  2. Your app must be a child of 'ChangeNotifierProvider'

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(),
    );
  }
}
  1. The parent page manages the screen shown in each of the authentication states
class ParentPage extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return AuthManagerWidget(
      splashScreen: MySplashScreen(), //optional
      introductionScreen: MyIntroductionScreen(), //optional, user not logged
      loginScreen: MyLoginScreen(), // user not logged, the introduction has been completed
      mainScreen: MyMainScreen(), // user logged (email, google, apple or anonymous)
    );
  }
}
  1. Set introduction as completed
AuthState authState = Provider.of(context);
authState.setIntroductionCompleted(true);
  1. Prebuilt 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",
          );
        },
      )
  1. Logout
AuthState authState = Provider.of(context);
authState.signOut();
0
likes
0
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

Manage authentication with firebase in an extremely simple way

Homepage
Repository (GitHub)
View/report issues

License

unknown (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