Code Monkey home page Code Monkey logo

flutter-sign-in-button's Introduction

A Flutter plugin for iOS and Android for generating signin buttons for different social media account.

Feedback and Pull Requests are most welcome!

Installation

Add to pubspec.yaml.

dependencies:
  ...
  flutter_signin_button: ^2.0.0

Usage Example

import flutter_signin_button.dart

import 'package:flutter_signin_button/flutter_signin_button.dart';

For built-in buttons.

SignInButton(
  Buttons.Google,
  onPressed: () {},
)

// with custom text
SignInButton(
  Buttons.Google,
  text: "Sign up with Google",
  onPressed: () {},
)

For mini buttons.

SignInButton(
  Buttons.Facebook,
  mini: true,
  onPressed: () {},
)

For self-build buttons.

SignInButtonBuilder(
  text: 'Sign in with Email',
  icon: Icons.email,
  onPressed: () {},
  backgroundColor: Colors.blueGrey.shade700,
)

Built-in Buttons contain

enum Buttons {
  Apple,
  AppleDark,
  Email,
  Google,
  GoogleDark,
  Facebook,
  FacebookNew,
  GitHub,
  LinkedIn,
  Pinterest,
  Tumblr,
  Twitter
}

Refer to example folder and the source code for more information.

flutter-sign-in-button's People

Contributors

adamsmaka avatar adeolaex avatar champ96k avatar david-mccoy avatar gersur avatar hrhldt avatar josephchenghmlet avatar livelikecounter avatar matthiasbruns avatar narciero avatar salehhub avatar samlythemanly avatar silfalion avatar tariq86 avatar thexxturboxx avatar tilk48 avatar zaynjarvis avatar zirho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flutter-sign-in-button's Issues

Apple Button has no Splash

The Buttons.Apple button has no visible splash, I assume because of it's white background and the splash is set by default to Colors.white30.

Tested on web only

ScaffoldMessenger doesnt show up

Hi there, I'm trying to show ScaffoldMessenger in onPressed but not working. Is this a bug or my mistake?

SignInButton( Buttons.GoogleDark, elevation: 10, text: "Google", onPressed: () async { ScaffoldMessenger.of(ctx).showSnackBar( SnackBar( content: const Text('Message.'), ), ); }, )

Apple Button No Icon

Hello,
I tried to add the Apple button and AppleDark but unfortunately the Apple logo is not displayed.
Checking the code the icons are missing.
Is it wanted?

Google and Facebook small button is not working

Hello
When i use mini: true then it generate following error
Google and FacebookNew buttons do not support mini mode
'package:flutter_signin_button/button_view.dart':
Failed assertion: line 47 pos 13: 'mini != true ||
!(button == Buttons.Google ||
button == Buttons.GoogleDark ||
button == Buttons.FacebookNew)'

Google Sign In Button larger than the rest when using padding

Setup 5 different Sign In buttons, one of them being Google.
Specify the same padding for each Sign In Button, let's say: const EdgeInsets.symmetric(vertical: 10);

Notice how the Google button is larger than the rest. I would expect each SignInButton to be the same size.

(I'm sure it has something to do with the fact that Google is the only button using an image, not Font Awesome.)

Disable button when onPressed is null

Third party auth providers are asynchronous and I want to disable the button while work is being performed to sign in the user. Flutter disables a button when its onPressed field is null. Could we have a similar feature?

Thank you

Facebook Icon

the facebbok icon is not showing in my button
image
instead the icons, it apears a box with an X

Buttons.Email onPressed needs changing

For all other buttons like Buttons.Google, the onPressed method works fine. but not for Buttons.Email.

after looking at source problem is in button_view.dart file

at line 39

onPressed: () {},

onPressed is defined... it should be like the others

onPressed: onPressed,

Widget key is not set on SignInButtonBuilder

The constructor for SignInButtonBuilder never sets the widget's key, making it difficult to use these widgets in integration tests. Here is the constructor in button_builder.dart:

  SignInButtonBuilder({
    Key key,
    @required this.backgroundColor,

This key is never used. Later in the build method, the inherited widget's key is passed to the MaterialButton. Unfortunately, this key is null as it was never set in the constructor.

  Widget build(BuildContext context) {
    return MaterialButton(
      key: key,
      minWidth: mini ? width ?? 35.0 : null,

Actually, you do not want the SignInButtonBuilder widget and the MaterialButton to have the same key since these keys should be unique. It should be fine is just set this key in the MaterialButton.

Uniform size of sign in buttons

Thanks for awesome package. I think it would look better if the buttons have similar size (height and width). Currently Google sign in button is very big compared to others.

Logo isn't affected by rounded border shape

When using a signin button with the shape set to RoundedRectangleBorder, the shape does not affect the logo of the auth provider.

SignInButton(
    theme.brightness == Brightness.light ? Buttons.Google : Buttons.GoogleDark,
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
)

signin_button

in some case title not fitted with width

in some case title not fitted with width like that after translated the sign-in with google in some language the text was bigger than normal so there is two Solutions one make a builder Creator for button for pass widget instead string and handle this issue or make text fitted

There is no way to align text to center as its a string not the widget.

Hi there, so I was using the button to save time and there's a requirement that the text should be in the center rather than on the side. How can we align it to the center as there is no option of aligning it to the center?

please add a widget instead of String text in the ButtonBuilder function so we can add whatever the text-style we want and whatever the color or anything we want.

image

mini buttton google?

When i put facebook button mini are okay, but why not with google?? I have a error ...regards..

Google Sign in Button doesnt not use Materialbutton (SignInButtonBuilder)

This is kinda big for accessibility reasons. It would be nice if the google sign in button inherited from material button so it all login buttons in a ButtonTheme

The licensing for the google button explicitly states you can scale to as large as you want, just that aspect ration must be contained.

editing: It appears to be a bug within the google button container, it doesn't resize according to any theme.

Apple Icon missing

I'm running 1.1.0 and I get a "?" instead of the apple logo. Is there a configuration for this that's not described?

Implement CI/CD

Implement continuous integration to perform flutter pub pub publish

How to install?

I've never installed a flutter plugin from source, it would be nice if an installation tutorial was written or add it to the flutter repo

Google icon shifted to left comparing to others

This is a purely visual issue. When you have several buttons, one after another, you can see that the Google icon is shifted a few pixels to the left, comparing to other icons. Ideally, all the icons should be aligned to the center of the logo. Could you adjust the padding/margin?

you can see it clearly this screenshot:

Screenshot

widget breaks when font scaling is enabled on device

My work around is to wrap it in media query, be nice if I didn't have to do this

MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 1), child: SignInButton( Buttons.GoogleDark, onPressed: () async { _signInWithGoogle(widget.bloc!.auth); }, ), ),

Target URI Doesn't exist

I was about to try the plugin, i have imported to my project through the pubsec packages get, but when i try to import to the script it doesn't work, i receive the error: Target of URI doesn't exist: 'package:flutter_signin_button/flutter_signin_button.dart'. (uri_does_not_exist at [comunidade_reino] lib\screens\choose_login_screen.dart:2), i could use some help here, some one know how to fix it?

Google icon

Facebook for example looks fine, when you do a long press the icon is included on its button but this effect doesn't work like that for Google. It looks like a different button inside the login button

Untitled-2

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.