Skip to content

Commit

Permalink
enhancement: allow user to decide launch mode (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
FatumaA authored Sep 7, 2024
1 parent 457096f commit 1d7c37c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/components/supa_socials_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ class SupaSocialsAuth extends StatefulWidget {
/// Localization for the form
final SupaSocialsAuthLocalization localization;

/// Custom LaunchMode support
final LaunchMode authScreenLaunchMode;

const SupaSocialsAuth({
super.key,
this.nativeGoogleAuthConfig,
Expand All @@ -139,6 +142,7 @@ class SupaSocialsAuth extends StatefulWidget {
this.scopes,
this.queryParams,
this.localization = const SupaSocialsAuthLocalization(),
this.authScreenLaunchMode = LaunchMode.platformDefault,
});

@override
Expand Down Expand Up @@ -265,7 +269,6 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
width: 48,
height: 48,
);

foregroundColor = Colors.black;
backgroundColor = Colors.white;
overlayColor = Colors.white;
Expand Down Expand Up @@ -354,6 +357,7 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
redirectTo: widget.redirectUrl,
scopes: widget.scopes?[socialProvider],
queryParams: widget.queryParams?[socialProvider],
authScreenLaunchMode: widget.authScreenLaunchMode,
);
} on AuthException catch (error) {
if (widget.onError == null && context.mounted) {
Expand Down

0 comments on commit 1d7c37c

Please sign in to comment.