socialButton method
Full-width social login button ("Continue with Google").
Implementation
Widget socialButton({
required Widget icon,
required String label,
required VoidCallback? onTap,
}) {
return SizedBox(
height: 44,
width: double.infinity,
child: DecoratedBox(
decoration: BoxDecoration(
color: theme.socialButtonColor,
borderRadius: BorderRadius.circular(socialButtonRadius),
border: Border.all(color: theme.socialButtonBorderColor),
),
child: buttonInk(
onPressed: onTap,
radius: socialButtonRadius,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 20, height: 20, child: icon),
const SizedBox(width: 10),
Flexible(
child: Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontFamily: fontFamily,
fontSize: 14,
fontWeight: FontWeight.w500,
color: theme.socialButtonTextColor,
),
),
),
],
),
),
),
);
}