Code Monkey home page Code Monkey logo

flutter_auth_buttons's Introduction

auth_buttons

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: ^0.0.5
  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;

Overview

There are two style you can choose between them:

  1. Default
  2. Icon
  3. Secondary

Note: all api is documented click Ctrl + Q to read the docs if you are using Android Studio or Intellij Idea on Visual Studio Code just hover over.

default-light

This is happen if you know you some property, other way click Ctrl + space then Ctrl + Q double click and the result will be like so. default-light

Using

You need to use just the following code:

Default style

GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
),

default-light

GoogleAuthButton(
  onPressed: () {},
  darkMode: true,
),

default-dark

Icon Style

GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle.icon,
),

light-icon

GoogleAuthButton(
  onPressed: () {},
  darkMode: true,
  style: AuthButtonStyle.icon,
),

dark-icon

Secondary Style

GoogleAuthButton(
  onPressed: () {},
  darkMode: false,
  style: AuthButtonStyle.secondary,
),

light-icon

GoogleAuthButton(
  onPressed: () {},
  darkMode: true,
  style: AuthButtonStyle.icon,
),

dark-icon

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(
  onPressed: () {},
  buttonColor: Colors.white,
  splashColor: Colors.grey,
  elevation: 2.0,
  borderRadius: 8.0,
  padding: EdgeInsets.all(8.0),
  text: 'Sign in with Google',
  textStyle: TextStyle(
    color: Colors.black,
    fontSize: 18,
    fontWeight: FontWeight.bold,
    letterSpacing: 0.50,
  ),
  darkMode: false,
  borderColor: Colors.red,
  borderWidth: 2.0,
  style: AuthButtonStyle.secondary,
  width: 280.0,
  height: 50.0,
  iconSize: 35.0,
  separator: 10.0,
  rtl: false,
  iconBackground: Colors.transparent,
),

return up

flutter_auth_buttons's People

Contributors

elbeicktalat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.