auth_buttons 2.0.2 copy "auth_buttons: ^2.0.2" to clipboard
auth_buttons: ^2.0.2 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.

auth_buttons #

Github stars Pub Version

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

Installation #

  1. Add this to your packages pubspec.yaml file:
dependencies:
  auth_buttons: <^last>
  1. Install it You can install it from the command line:
$ flutter pub get
  1. Import it Now in Dart code, you can use:
import 'package:auth_buttons/auth_buttons.dart';

Recommendation #

We recommend you to using show special when you want use some button. show help you importing part of library.

import 'package:auth_buttons/auth_buttons.dart'
    show GoogleAuthButton, AuthButtonStyle, AuthButtonType, AuthIconType;

We also recommend you to using the latest version.

Overview #

From the version 2.0.0 disabled state is supported.

  1. Enabled
  2. Disabled

There are three Types you can choose between them:

  1. Default
  2. Icon
  3. Secondary

Using #

Enabled State. #

You need to use just the following code:

Default Type #

GoogleAuthButton(
  onPressed: () {},
  darkMode: false, // if true second example
),
Light Dark
default-button-default-icon dark-default-button-default-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    iconType: AuthIconType.outlined,
  ),
),
Light Dark
default-button-outlined-icon dark-default-button-outlined-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    iconType: AuthIconType.secondary,
  ),
),
Light Dark
default-button-secondary-icon dark-default-button-secondary-icon

Icon Type #

GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.icon,
  ),
),
Light Dark
icon-button-default-icon dark-icon-button-default-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.icon,
    iconType: AuthIconType.outlined,
  ),
),
Light Dark
icon-button-outlined-icon dark-icon-button-outlined-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.icon,
    iconType: AuthIconType.secondary,
  ),
),
Light Dark
icon-button-secondary-icon dark-icon-button-secondary-icon

Secondary Type #

GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.secondary,
  ),
),
Light Dark
secondary-button-default-icon dark-secondary-button-default-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.secondary,
    iconType: AuthIconType.outlined,
  ),
),
Light Dark
secondary-button-outlined-icon dark-secondary-button-outlined-icon
GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle(
    buttonType: AuthButtonType.secondary,
    iconType: AuthIconType.secondary,
  ),
),
Light Dark
secondary-button-secondary-icon dark-secondary-button-secondary-icon

Disabled State #

Light Dark
disabled-buttons dark-disabled-buttons

Do same think with the other buttons, when you want customize any button you can do it just passing a property which you want.

Full property you can passing:

GoogleAuthButton(
  key: const ValueKey<String>(''),
  onPressed: () {},
  onLongPress: () {},
  text: 'Sign in with Google',
  darkMode: false,
  isLoading: isLoading,
  rtl: false,
  style: AuthButtonStyle(
    buttonColor: Colors.white,
    splashColor: Colors.grey.shade100,
    shadowColor: Colors.grey,
    borderColor: Colors.red,
    borderRadius: 8.0,
    borderWidth: 2.0,
    elevation: 2.0,
    width: 280.0,
    height: 50.0,
    separator: 10.0,
    iconSize: 35.0,
    iconBackground: Colors.transparent,
    iconType: AuthIconType.outlined,
    iconColor: Colors.red,
    buttonType: AuthButtonType.secondary,
    padding: const EdgeInsets.all(8.0),
    progressIndicatorColor: Colors.red,
    progressIndicatorValueColor: Colors.amber,
    progressIndicatorStrokeWidth: 2.0,
    textStyle: const TextStyle(
      color: Colors.black,
      fontSize: 18,
      fontWeight: FontWeight.bold,
      letterSpacing: 0.50,
    ),
  ),
),

return up

171
likes
0
pub points
94%
popularity

Publisher

unverified uploader

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, flutter_svg, google_fonts

More

Packages that depend on auth_buttons