File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
packages/firebase_dart_flutter Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import 'package:platform_info/platform_info.dart' as platform_info;
14
14
import 'package:logging/logging.dart' ;
15
15
import 'package:flutter_apns_only/flutter_apns_only.dart' ;
16
16
import 'package:crypto/crypto.dart' ;
17
+ import 'package:app_links/app_links.dart' ;
17
18
18
19
class FacebookAuthHandler extends DirectAuthHandler {
19
20
FacebookAuthHandler () : super (FacebookAuthProvider .PROVIDER_ID );
@@ -265,7 +266,13 @@ class DeepLinkRetriever with WidgetsBindingObserver {
265
266
final StreamController <Uri > _controller = StreamController .broadcast ();
266
267
267
268
DeepLinkRetriever ._() {
268
- WidgetsFlutterBinding .ensureInitialized ().addObserver (this );
269
+ if (! kIsWeb && ! platform_info.Platform .instance.mobile) {
270
+ AppLinks ().uriLinkStream.listen ((uri) {
271
+ didPushRouteInformation (RouteInformation (uri: uri));
272
+ });
273
+ } else {
274
+ WidgetsFlutterBinding .ensureInitialized ().addObserver (this );
275
+ }
269
276
}
270
277
271
278
static final DeepLinkRetriever instance = DeepLinkRetriever ._();
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ dependencies:
22
22
logging : ^1.0.2
23
23
flutter_apns_only : ^1.0.0
24
24
crypto : ^3.0.3
25
+ app_links : ^6.3.3
25
26
26
27
dev_dependencies :
27
28
flutter_test :
You can’t perform that action at this time.
0 commit comments