Skip to content

Instantly share code, notes, and snippets.

@Shubham-Narkhede
Created January 24, 2020 03:00
Show Gist options
  • Save Shubham-Narkhede/0de93117a0e9573dd927c48eb491b165 to your computer and use it in GitHub Desktop.
Save Shubham-Narkhede/0de93117a0e9573dd927c48eb491b165 to your computer and use it in GitHub Desktop.
Widget _buildSocialBtn(Function onTap, AssetImage logo) {
return GestureDetector(
onTap: onTap,
child: Container(
height: 60.0,
width: 60.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black26,
offset: Offset(0, 2),
blurRadius: 6.0,
),
],
image: DecorationImage(
image: logo,
),
),
),
);
}
Widget _buildSocialBtnRow() {
return Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
_buildSocialBtn(
() => print('Login with Facebook'),
AssetImage(
'assets/logos/facebook.jpg',
),
),
_buildSocialBtn(
() => print('Login with Google'),
AssetImage(
'assets/logos/google.jpg',
),
),
],
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment