auth_social_buttons 2.0.1 auth_social_buttons: ^2.0.1 copied to clipboard
Material buttons for logging into popular social networks, including Google, Facebook, Twitter and Microsoft.
Flutter Auth Buttons #
This library is now in maintenance mode #
I'm no longer actively using Flutter and don't have the time to keep this library maintained. No further changes will be made.
You are very welcome to fork and maintain this elsewhere. If you do that, please let me know and I can point people there.
Otherwise, there are some other libraries (such as this one) which seem more advanced and could be a good choice.
Flutter widget library containing buttons for authenticating with popular social networks: Apple, Google, Facebook, Twitter and Microsoft.
Usage #
Add auth_social_buttons
to your pubspec.yaml
, then import the Dart file:
import 'package:auth_social_buttons/auth_social_buttons.dart';
Use the onPressed
attribute to capture the button press and call your authentication logic within that. To disable
the button, pass null
or omit the attribute.
FacebookSignInButton(onPressed: () {
// call authentication logic
});
Some buttons have a dark mode. Enable this with the optional parameter:
GoogleSignInButton(
onPressed: () {/* ... */},
darkMode: true, // default: false
)
You can adjust the border-radius of the buttons:
TwitterSignInButton(
onPressed: () {},
borderRadius: 10.0,
)
You can adjust the text style of the buttons:
TwitterSignInButton(
onPressed: () {},
textStyle: TextStyle(fontSize: 20, fontWeight: FontWeight.w700, fontFamily: "Roboto"),
)
You can adjust the splash color of the buttons:
GoogleSignInButton(
onPressed: () {/* ... */},
splashColor: Colors.white,
// setting splashColor to Colors.transparent will remove button ripple effect.
)
Buttons can be stretched like normal Material buttons. By default the button
contents are left-aligned when stretched. You can choose to center the icon and
text using the centered
property.
TwitterSignInButton(
onPressed: () {},
centered: true,
)
See the documentation for API details: https://pub.dartlang.org/documentation/auth_social_buttons/latest/.
Contributions #
Contributions are very welcome. I would recommend discussing large changes in an issue before you spend the time on them.
Good quality pull requests will win you commit rights.