common_authentication 0.0.2 copy "common_authentication: ^0.0.2" to clipboard
common_authentication: ^0.0.2 copied to clipboard

Allow common authentication by firebase auth for all platforms

Allow common authentication by firebase auth for all platforms

Features #

  • Login by Google on Mobile, Desktop and Web.

Getting started #

List prerequisites and provide or point to information on how to start using the package.

Usage #

Include short and useful examples for package users. Add longer examples to /example folder.

1- In yout app add Auth bloc

 return MultiBlocProvider(
  providers: [
      create: (_) => AuthBloc(),
  child: MaterialApp(..),


class LoginPage extends StatefulWidget {
  final SignInGoogleQueryParameters? queryParameters;

  const LoginPage({Key? key, this.queryParameters}) : super(key: key);

  State<LoginPage> createState() => _LoginPageState();

class _LoginPageState extends State<LoginPage> {
  void initState() {
  Widget build(BuildContext context) {
    return BlocListener<AuthBloc, AuthState>(
             listener: (context, state) {
              if (state is AuthLoggedInState) {
                      child: const GoogleSignInButton(),