auth_buttons 1.0.1 copy "auth_buttons: ^1.0.1" to clipboard
auth_buttons: ^1.0.1 copied to clipboard

outdated

Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks like Google, Facebook, Apple and Twitter.

example/lib/main.dart

import 'package:auth_buttons/auth_buttons.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool isLoading = false;

  @override
  Widget build(BuildContext context) {
    const String appName = 'Auth Buttons Example';
    const bool darkMode = false;
    const AuthButtonType buttonType = AuthButtonType.secondary;
    const AuthIconType authIconType = AuthIconType.outlined;
    return MaterialApp(
      title: appName,
      home: Scaffold(
        appBar: AppBar(
          title: const Text(appName),
        ),
        body: Container(
          width: double.infinity,
          color: darkMode ? const Color(0xff303030) : Colors.white,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              GoogleAuthButton(
                onPressed: () {
                  // your implementation
                  setState(() {
                    isLoading = !isLoading;
                  });
                },
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              AppleAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              FacebookAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              GithubAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              MicrosoftAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              TwitterAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              EmailAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
              const Divider(),
              HuaweiAuthButton(
                onPressed: () {},
                darkMode: darkMode,
                isLoading: isLoading,
                style: const AuthButtonStyle(
                  buttonType: buttonType,
                  iconType: authIconType,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
190
likes
0
points
3.49k
downloads

Publisher

unverified uploader

Weekly Downloads

Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks like Google, Facebook, Apple and Twitter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on auth_buttons