Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions packages/supabase_flutter/lib/src/supabase_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,7 @@ class SupabaseAuth with WidgetsBindingObserver {
_initialDeeplinkIsHandled = true;

try {
Uri? uri;
try {
// before app_links 6.0.0
uri = await (_appLinks as dynamic).getInitialAppLink();
} on NoSuchMethodError catch (_) {
// The AppLinks package contains the initial link in the uriLinkStream
// starting from version 6.0.0. Before this version, getting the
// initial link was done with getInitialAppLink. Being in this catch
// handler means we are in at least version 6.0.0, meaning we do not
// need to handle the initial link manually.
//
// app_links claims that the initial link will be included in the
// `uriLinkStream`, but that is not the case for web
if (kIsWeb) {
uri = await (_appLinks as dynamic).getInitialLink();
}
}
final uri = await _appLinks.getInitialAppLink();
if (uri != null) {
await _handleDeeplink(uri);
}
Expand Down Expand Up @@ -376,4 +360,4 @@ extension GoTrueClientSignInProvider on GoTrueClient {
);
return result;
}
}
}
2 changes: 1 addition & 1 deletion packages/supabase_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
flutter: '>=3.19.0'

dependencies:
app_links: '>=3.5.0 <7.0.0'
app_links: ^4.0.0
async: ^2.11.0
crypto: ^3.0.2
flutter:
Expand Down
Loading