flutter_auth_buttons 0.3.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 97

Flutter Auth Buttons #

Flutter widget library containing buttons for authenticating with popular social networks.

These buttons do not contain authentication logic. They are designed to be used with authentication packages, such as firebase_auth. Use the onPressed attribute to capture the button press and call your authentication logic within that.

GoogleSignInButton(onPressed: () {
  // call authentication logic
});

Supported buttons #

Screenshots of the supported buttons are shown below.

Google #

Google suggests two default button styles on it's branding page.

Light button:

Google light button screenshot

Dark button:

Google dark button screenshot

Facebook #

Facebook has fewer guidelines for designing their buttons (see here). This button was designed to match the example given in their documentation.

Facebook button screenshot

Twitter #

Like Facebook, Twitter doesn't prescribe a precise button (see here). This button was designed to match the colours and style used in their example images.

Twitter button screenshot

Usage #

Add flutter_auth_buttons to your pubspec.yaml, then import the Dart file:

import 'package:flutter_auth_buttons/flutter_auth_buttons.dart';

See the documentation for API details.

[0.3.1]

  • Improved package description.

[0.3.0]

  • Added Twitter button.

[0.2.1]

  • Fix bug to prevent buttons from stretching.

[0.2.0]

  • Added Facebook button.

[0.1.0]

  • Added example application.

[0.0.1]

  • Support for Google button.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Button Demo',
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              GoogleSignInButton(onPressed: () {}),
              GoogleSignInButton(onPressed: () {}, darkMode: true),
              FacebookSignInButton(onPressed: () {}),
              TwitterSignInButton(onPressed: () {}),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_auth_buttons: ^0.3.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_auth_buttons/flutter_auth_buttons.dart';
  
Version Uploaded Documentation Archive
0.5.0 Apr 7, 2019 Go to the documentation of flutter_auth_buttons 0.5.0 Download flutter_auth_buttons 0.5.0 archive
0.4.0 Apr 6, 2019 Go to the documentation of flutter_auth_buttons 0.4.0 Download flutter_auth_buttons 0.4.0 archive
0.3.1 Nov 18, 2018 Go to the documentation of flutter_auth_buttons 0.3.1 Download flutter_auth_buttons 0.3.1 archive
0.3.0 Nov 18, 2018 Go to the documentation of flutter_auth_buttons 0.3.0 Download flutter_auth_buttons 0.3.0 archive
0.2.1 Nov 6, 2018 Go to the documentation of flutter_auth_buttons 0.2.1 Download flutter_auth_buttons 0.2.1 archive
0.2.0 Nov 4, 2018 Go to the documentation of flutter_auth_buttons 0.2.0 Download flutter_auth_buttons 0.2.0 archive
0.1.0 Nov 4, 2018 Go to the documentation of flutter_auth_buttons 0.1.0 Download flutter_auth_buttons 0.1.0 archive
0.0.1 Nov 4, 2018 Go to the documentation of flutter_auth_buttons 0.0.1 Download flutter_auth_buttons 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
97
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test