@@ -14,45 +14,45 @@ import 'package:supabase_flutter/supabase_flutter.dart';
1414
1515extension on OAuthProvider {
1616 IconData get iconData => switch (this ) {
17- OAuthProvider .apple => FontAwesomeIcons .apple,
18- OAuthProvider .azure => FontAwesomeIcons .microsoft,
19- OAuthProvider .bitbucket => FontAwesomeIcons .bitbucket,
20- OAuthProvider .discord => FontAwesomeIcons .discord,
21- OAuthProvider .facebook => FontAwesomeIcons .facebook,
22- OAuthProvider .figma => FontAwesomeIcons .figma,
23- OAuthProvider .github => FontAwesomeIcons .github,
24- OAuthProvider .gitlab => FontAwesomeIcons .gitlab,
25- OAuthProvider .google => FontAwesomeIcons .google,
26- OAuthProvider .linkedin => FontAwesomeIcons .linkedin,
27- OAuthProvider .slack => FontAwesomeIcons .slack,
28- OAuthProvider .spotify => FontAwesomeIcons .spotify,
29- OAuthProvider .twitch => FontAwesomeIcons .twitch,
30- OAuthProvider .twitter => FontAwesomeIcons .xTwitter,
31- _ => Icons .close,
32- };
17+ OAuthProvider .apple => FontAwesomeIcons .apple,
18+ OAuthProvider .azure => FontAwesomeIcons .microsoft,
19+ OAuthProvider .bitbucket => FontAwesomeIcons .bitbucket,
20+ OAuthProvider .discord => FontAwesomeIcons .discord,
21+ OAuthProvider .facebook => FontAwesomeIcons .facebook,
22+ OAuthProvider .figma => FontAwesomeIcons .figma,
23+ OAuthProvider .github => FontAwesomeIcons .github,
24+ OAuthProvider .gitlab => FontAwesomeIcons .gitlab,
25+ OAuthProvider .google => FontAwesomeIcons .google,
26+ OAuthProvider .linkedin => FontAwesomeIcons .linkedin,
27+ OAuthProvider .slack => FontAwesomeIcons .slack,
28+ OAuthProvider .spotify => FontAwesomeIcons .spotify,
29+ OAuthProvider .twitch => FontAwesomeIcons .twitch,
30+ OAuthProvider .twitter => FontAwesomeIcons .xTwitter,
31+ _ => Icons .close,
32+ };
3333
3434 Color get btnBgColor => switch (this ) {
35- OAuthProvider .apple => Colors .black,
36- OAuthProvider .azure => Colors .blueAccent,
37- OAuthProvider .bitbucket => Colors .blue,
38- OAuthProvider .discord => Colors .purple,
39- OAuthProvider .facebook => const Color (0xFF3b5998 ),
40- OAuthProvider .figma => const Color .fromRGBO (241 , 77 , 27 , 1 ),
41- OAuthProvider .github => Colors .black,
42- OAuthProvider .gitlab => Colors .deepOrange,
43- OAuthProvider .google => Colors .white,
44- OAuthProvider .kakao => const Color (0xFFFFE812 ),
45- OAuthProvider .keycloak => const Color .fromRGBO (0 , 138 , 170 , 1 ),
46- OAuthProvider .linkedin => const Color .fromRGBO (0 , 136 , 209 , 1 ),
47- OAuthProvider .notion => const Color .fromRGBO (69 , 75 , 78 , 1 ),
48- OAuthProvider .slack => const Color .fromRGBO (74 , 21 , 75 , 1 ),
49- OAuthProvider .spotify => Colors .green,
50- OAuthProvider .twitch => Colors .purpleAccent,
51- OAuthProvider .twitter => Colors .black,
52- OAuthProvider .workos => const Color .fromRGBO (99 , 99 , 241 , 1 ),
53- // ignore: unreachable_switch_case
54- _ => Colors .black,
55- };
35+ OAuthProvider .apple => Colors .black,
36+ OAuthProvider .azure => Colors .blueAccent,
37+ OAuthProvider .bitbucket => Colors .blue,
38+ OAuthProvider .discord => Colors .purple,
39+ OAuthProvider .facebook => const Color (0xFF3b5998 ),
40+ OAuthProvider .figma => const Color .fromRGBO (241 , 77 , 27 , 1 ),
41+ OAuthProvider .github => Colors .black,
42+ OAuthProvider .gitlab => Colors .deepOrange,
43+ OAuthProvider .google => Colors .white,
44+ OAuthProvider .kakao => const Color (0xFFFFE812 ),
45+ OAuthProvider .keycloak => const Color .fromRGBO (0 , 138 , 170 , 1 ),
46+ OAuthProvider .linkedin => const Color .fromRGBO (0 , 136 , 209 , 1 ),
47+ OAuthProvider .notion => const Color .fromRGBO (69 , 75 , 78 , 1 ),
48+ OAuthProvider .slack => const Color .fromRGBO (74 , 21 , 75 , 1 ),
49+ OAuthProvider .spotify => Colors .green,
50+ OAuthProvider .twitch => Colors .purpleAccent,
51+ OAuthProvider .twitter => Colors .black,
52+ OAuthProvider .workos => const Color .fromRGBO (99 , 99 , 241 , 1 ),
53+ // ignore: unreachable_switch_case
54+ _ => Colors .black,
55+ };
5656
5757 String get labelText =>
5858 'Continue with ${name [0 ].toUpperCase ()}${name .substring (1 )}' ;
@@ -214,16 +214,16 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
214214 void initState () {
215215 super .initState ();
216216 localization = widget.localization;
217- _gotrueSubscription = Supabase .instance.client.auth.onAuthStateChange
218- .listen ((data) {
219- final session = data.session;
220- if (session != null && mounted) {
221- widget.onSuccess.call (session);
222- if (widget.showSuccessSnackBar) {
223- context.showSnackBar (localization.successSignInMessage);
224- }
225- }
226- });
217+ _gotrueSubscription =
218+ Supabase .instance.client.auth.onAuthStateChange .listen ((data) {
219+ final session = data.session;
220+ if (session != null && mounted) {
221+ widget.onSuccess.call (session);
222+ if (widget.showSuccessSnackBar) {
223+ context.showSnackBar (localization.successSignInMessage);
224+ }
225+ }
226+ });
227227 }
228228
229229 @override
@@ -315,7 +315,7 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
315315 final iosClientId = googleAuthConfig? .iosClientId;
316316 final shouldPerformNativeGoogleSignIn =
317317 (webClientId != null && ! kIsWeb && Platform .isAndroid) ||
318- (iosClientId != null && ! kIsWeb && Platform .isIOS);
318+ (iosClientId != null && ! kIsWeb && Platform .isIOS);
319319 if (shouldPerformNativeGoogleSignIn) {
320320 await _nativeGoogleSignIn (
321321 webClientId: webClientId,
@@ -329,7 +329,7 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
329329 if (socialProvider == OAuthProvider .apple) {
330330 final shouldPerformNativeAppleSignIn =
331331 (isNativeAppleAuthEnabled && ! kIsWeb && Platform .isIOS) ||
332- (isNativeAppleAuthEnabled && ! kIsWeb && Platform .isMacOS);
332+ (isNativeAppleAuthEnabled && ! kIsWeb && Platform .isMacOS);
333333 if (shouldPerformNativeAppleSignIn) {
334334 await _nativeAppleSignIn ();
335335 return ;
0 commit comments