llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
176 stars 68 forks source link

app_links_platform_interface: 1.0.1 - method_channel_applinks.dart throws no such method #18

Closed m-skolnick closed 2 years ago

m-skolnick commented 2 years ago

Device: Android

The following code causes an exception to be thrown

    final _applinks = AppLinks();

    final _initialRoute = await _applinks.getInitialAppLink();

method_channel_applinks.dart throws no such method at

 @override
  Future<String?> getInitialAppLinkString() async {
    final link = await _method.invokeMethod(_getInitialAppLinkMethod);
    return link.isNotEmpty ? link : null;
  }
llfbandit commented 2 years ago

Did you try to clean your project? I guess I pushed my pubspec.lock with relative path. Don't know if this will help...

m-skolnick commented 2 years ago

Yes. Flutter clean does not solve it.

I did a little deeper debugging. Here's what I found:

Screen Shot 2022-04-28 at 1 20 42 PM

I'm not sure why the getInitialAppLink method cannot be found though.

llfbandit commented 2 years ago

Arf yes, I get it. Pushing new version as soon as possible.

m-skolnick commented 2 years ago

Thank you! No rush. We'll just pin to app_links_platform_interface: 1.0.0 for now :)

Have a wonderful day!

llfbandit commented 2 years ago

app_links_platform_interface "1.0.2" has been released to fix this null pointer.