A Flutter plugin for generating sign in buttons for different social media accounts.
You must add the library as a dependency to your project.
dependencies:
sign_button: ^1.0.1
You should then run flutter packages get
Now in your Dart code, you can use:
import 'package:sign_button/sign_button.dart'
It very simple!
SignInButton(
buttonType: ButtonType.google,
onPressed: () {
print('click');
})
ButtonSize
SignInButton(
buttonType: ButtonType.google,
buttonSize: ButtonSize.large, // small(default), medium, large
onPressed: () {
print('click');
})
ImagePosition
SignInButton(
imagePosition: ImagePosition.left, // left or right
buttonType: ButtonType.google,
onPressed: () {
print('click');
})
Customized button
SignInButton(
buttonType: ButtonType.pinterest,
imagePosition: ImagePosition.right,
//[buttonSize] You can also use this in combination with [width]. Increases the font and icon size of the button.
buttonSize: ButtonSize.large,
btnTextColor: Colors.grey,
btnColor: Colors.white,
width: 140,
//[width] Use if you change the text value.
btnText: 'Pinterest',
onPressed: () {
print('click');
})
SignInButton.mini(
buttonType: ButtonType.github,
onPressed: () {},
),
Author: emreesen27
Source Code: https://github.com/emreesen27/Flutter-Sign-in-Button
#flutter #dart #mobile-apps