Skip to content

Instantly share code, notes, and snippets.

@Hiteshpatel10
Last active March 6, 2024 07:53
Show Gist options
  • Save Hiteshpatel10/7c1da9d61d429b5a9351a422a234bb16 to your computer and use it in GitHub Desktop.
Save Hiteshpatel10/7c1da9d61d429b5a9351a422a234bb16 to your computer and use it in GitHub Desktop.
The SocialLoginTwoView widget in Flutter displays a screen with circular elevated buttons for various social login options, including Google, Facebook, GitHub, WhatsApp, and LinkedIn. Each button features the respective platform's logo
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
// Outh Icons
// http://tinyurl.com/social-login-one-assets
class SocialLoginTwoView extends StatelessWidget {
const SocialLoginTwoView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Center(
child: Wrap(
runSpacing: 12,
spacing: 12,
children: [
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFDF4931),
minimumSize: const Size(64, 64),
shape: const CircleBorder(),
),
onPressed: () {},
child: SvgPicture.asset(
"assets/social_login/google.svg",
height: 24,
width: 24,
),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF3A579B),
minimumSize: const Size(64, 64),
shape: const CircleBorder(),
),
onPressed: () {},
child: SvgPicture.asset(
"assets/social_login/facebook.svg",
height: 24,
width: 24,
),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF202020),
minimumSize: const Size(64, 64),
shape: const CircleBorder(),
),
onPressed: () {},
child: SvgPicture.asset(
"assets/social_login/github.svg",
height: 24,
width: 24,
),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF075E55),
minimumSize: const Size(64, 64),
shape: const CircleBorder(),
),
onPressed: () {},
child: SvgPicture.asset(
"assets/social_login/whatsapp.svg",
height: 24,
width: 24,
),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF0184DF),
minimumSize: const Size(64, 64),
shape: const CircleBorder(),
),
onPressed: () {},
child: SvgPicture.asset(
"assets/social_login/linkedin.svg",
height: 24,
width: 24,
),
),
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment