flutter_auth_buttons 0.2.1

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

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

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.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: () {}),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_auth_buttons: ^0.2.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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.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]
38
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6
  • Flutter: 0.11.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

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
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test