Skip to content

Commit 1d7c37c

Browse files
authored
enhancement: allow user to decide launch mode (#110)
1 parent 457096f commit 1d7c37c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/components/supa_socials_auth.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ class SupaSocialsAuth extends StatefulWidget {
125125
/// Localization for the form
126126
final SupaSocialsAuthLocalization localization;
127127

128+
/// Custom LaunchMode support
129+
final LaunchMode authScreenLaunchMode;
130+
128131
const SupaSocialsAuth({
129132
super.key,
130133
this.nativeGoogleAuthConfig,
@@ -139,6 +142,7 @@ class SupaSocialsAuth extends StatefulWidget {
139142
this.scopes,
140143
this.queryParams,
141144
this.localization = const SupaSocialsAuthLocalization(),
145+
this.authScreenLaunchMode = LaunchMode.platformDefault,
142146
});
143147

144148
@override
@@ -265,7 +269,6 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
265269
width: 48,
266270
height: 48,
267271
);
268-
269272
foregroundColor = Colors.black;
270273
backgroundColor = Colors.white;
271274
overlayColor = Colors.white;
@@ -354,6 +357,7 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
354357
redirectTo: widget.redirectUrl,
355358
scopes: widget.scopes?[socialProvider],
356359
queryParams: widget.queryParams?[socialProvider],
360+
authScreenLaunchMode: widget.authScreenLaunchMode,
357361
);
358362
} on AuthException catch (error) {
359363
if (widget.onError == null && context.mounted) {

0 commit comments

Comments
 (0)