Instantly share code, notes, and snippets.
Created
February 27, 2024 17:03
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save Hiteshpatel10/73fd78417962c6eccb2ff382378c65e7 to your computer and use it in GitHub Desktop.
The SocialLoginOneView Dart class represents a stateless widget for displaying a screen with multiple social login options. It includes buttons for Google, Facebook, GitHub, WhatsApp, and LinkedIn, each accompanied by their respective logos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Oauth svg | |
// http://tinyurl.com/social-login-one-assets | |
class SocialLoginOneView extends StatelessWidget { | |
const SocialLoginOneView({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Padding( | |
padding: const EdgeInsets.symmetric(horizontal: 16), | |
child: Center( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
ElevatedButton( | |
style: ElevatedButton.styleFrom( | |
backgroundColor: const Color(0xFFDF4931), | |
minimumSize: const Size(100, 52), | |
maximumSize: const Size(240, 52), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(8), | |
), | |
), | |
onPressed: () {}, | |
child: Row( | |
children: [ | |
SvgPicture.asset( | |
"assets/social_login/google.svg", | |
height: 24, | |
width: 24, | |
), | |
const SizedBox(width: 12), | |
const Text("Continue with Google",) | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
ElevatedButton( | |
style: ElevatedButton.styleFrom( | |
backgroundColor: const Color(0xFF3A579B), | |
minimumSize: const Size(100, 52), | |
maximumSize: const Size(240, 52), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(8), | |
), | |
), | |
onPressed: () {}, | |
child: Row( | |
children: [ | |
SvgPicture.asset( | |
"assets/social_login/facebook.svg", | |
height: 24, | |
width: 24, | |
), | |
const SizedBox(width: 12), | |
const Text("Continue with Facebook") | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
ElevatedButton( | |
style: ElevatedButton.styleFrom( | |
backgroundColor: const Color(0xFF202020), | |
minimumSize: const Size(100, 52), | |
maximumSize: const Size(240, 52), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(8), | |
), | |
), | |
onPressed: () {}, | |
child: Row( | |
children: [ | |
SvgPicture.asset( | |
"assets/social_login/github.svg", | |
height: 24, | |
width: 24, | |
), | |
const SizedBox(width: 12), | |
const Text("Continue with GitHub") | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
ElevatedButton( | |
style: ElevatedButton.styleFrom( | |
backgroundColor: const Color(0xFF075E55), | |
minimumSize: const Size(100, 52), | |
maximumSize: const Size(240, 52), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(8), | |
), | |
), | |
onPressed: () {}, | |
child: Row( | |
children: [ | |
SvgPicture.asset( | |
"assets/social_login/whatsapp.svg", | |
height: 24, | |
width: 24, | |
), | |
const SizedBox(width: 12), | |
const Text("Continue with WhatsApp") | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
ElevatedButton( | |
style: ElevatedButton.styleFrom( | |
backgroundColor: const Color(0xFF0184DF), | |
minimumSize: const Size(100, 52), | |
maximumSize: const Size(240, 52), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(8), | |
), | |
), | |
onPressed: () {}, | |
child: Row( | |
children: [ | |
SvgPicture.asset( | |
"assets/social_login/linkedin.svg", | |
height: 24, | |
width: 24, | |
), | |
const SizedBox(width: 12), | |
const Text("Continue with LinkedIn") | |
], | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment