buildSocialButton method

Widget buildSocialButton(
  1. SocialAuthProviderElement social,
  2. bool showTitle
)

Implementation

Widget buildSocialButton(SocialAuthProviderElement social, bool showTitle) {
  return switch (social.socialAuthProvider) {
    SocialAuthProvider.google => GoogleButton(
        onTap: social.onTap,
        showTitle: showTitle,
      ),
    SocialAuthProvider.appleId => AppleButton(
        onTap: social.onTap,
        showTitle: showTitle,
      ),
    SocialAuthProvider.facebook => FacebookButton(
        onTap: social.onTap,
        showTitle: showTitle,
      ),
    SocialAuthProvider.x => XButton(
        onTap: social.onTap,
        showTitle: showTitle,
      ),
  };
}