sign in buttons
a flutter plugin for generating sign in buttons for different social media accounts.
getting started
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'
usage example
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');
})
mini button
signinbutton.mini(
buttontype: buttontype.github,
onpressed: () {},
),
other properties
- btntext
- btncolor
- btntextcolor
- elevation
- shape
- width // you can change the value of width when the text size becomes too small.
- padding // padding value is automatically adjusted according to the button size. you can give a value if you want
Comments are closed.