Skip to content

Commit

Permalink
chore: update twitter branding, add new social providers (#62)
Browse files Browse the repository at this point in the history
* chore: update twitter with new branding

* chore: add assets

* enhancement: update colors, add social providers

* refactor the switch
  • Loading branch information
FatumaA authored Jan 2, 2024
1 parent 4b1a740 commit e983606
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 6 deletions.
Binary file added assets/logos/kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/keycloak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/notion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/workOS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 73 additions & 5 deletions lib/src/components/supa_socials_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ enum SocialProviders {
),
slack(
iconData: FontAwesomeIcons.slack,
btnBgColor: Colors.deepPurple,
btnBgColor: Color.fromRGBO(74, 21, 75, 1),
provider: OAuthProvider.slack,
),
spotify(
Expand All @@ -62,10 +62,40 @@ enum SocialProviders {
btnBgColor: Colors.purpleAccent,
provider: OAuthProvider.twitch,
),
twitter(
iconData: FontAwesomeIcons.twitter,
btnBgColor: Color(0xFF1DA1F2),
x(
iconData: FontAwesomeIcons.xTwitter,
btnBgColor: Colors.black,
provider: OAuthProvider.twitter,
),
figma(
iconData: FontAwesomeIcons.figma,
btnBgColor: Color.fromRGBO(241, 77, 27, 1),
provider: OAuthProvider.figma,
),
notion(
iconData: FontAwesomeIcons.x,
btnBgColor: Color.fromRGBO(69, 75, 78, 1),
provider: OAuthProvider.notion,
),
kakao(
iconData: FontAwesomeIcons.kaaba,
btnBgColor: Colors.black,
provider: OAuthProvider.kakao,
),
keycloak(
iconData: FontAwesomeIcons.xTwitter,
btnBgColor: Color.fromRGBO(0, 138, 170, 1),
provider: OAuthProvider.keycloak,
),
workOS(
iconData: FontAwesomeIcons.xTwitter,
btnBgColor: Color.fromRGBO(99, 99, 241, 1),
provider: OAuthProvider.workos,
),
linkedIn(
iconData: FontAwesomeIcons.linkedin,
btnBgColor: Color.fromRGBO(0, 136, 209, 1),
provider: OAuthProvider.linkedin,
);

const SocialProviders({
Expand Down Expand Up @@ -184,7 +214,6 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
color: iconColor,
),
);

if (socialProvider == SocialProviders.google && coloredBg) {
iconWidget = Image.asset(
'assets/logos/google_light.png',
Expand All @@ -198,6 +227,45 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
overlayColor = Colors.white;
}

switch (socialProvider) {
case SocialProviders.notion:
iconWidget = Image.asset(
'assets/logos/notion.png',
package: 'supabase_auth_ui',
width: 48,
height: 48,
);
break;
case SocialProviders.kakao:
iconWidget = Image.asset(
'assets/logos/kakao.png',
package: 'supabase_auth_ui',
width: 48,
height: 48,
);
break;
case SocialProviders.keycloak:
iconWidget = Image.asset(
'assets/logos/keycloak.png',
package: 'supabase_auth_ui',
width: 48,
height: 48,
);
break;
case SocialProviders.workOS:
iconWidget = Image.asset(
'assets/logos/workOS.png',
package: 'supabase_auth_ui',
color: coloredBg ? Colors.white : null,
width: 48,
height: 48,
);
break;
default:
// Handle other cases or provide a default behavior.
break;
}

onAuthButtonPressed() async {
try {
await supabase.auth.signInWithOAuth(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ dev_dependencies:

flutter:
assets:
- assets/logos/google_light.png
- assets/logos/

0 comments on commit e983606

Please sign in to comment.