Open droidluv opened 4 years ago
I just looked at the PR's, because I was thinking of making one and found somebody has already beat me to it, and that fix was forked over and is now available over here https://github.com/MisterJimson/flutter_keyboard_visibility and this is the working fine!
The issue is due to the fact that the Firebase Messaging plugin is creating a headless isolate (not associated to a view or activity) which results in the call to registerWith() method with a null activity.
registrar.activity().getApplication().registerActivityLifecycleCallbacks(instance);
@droidluv I can confirm that fixed it for me. It was the facebook_login plugin that messed it up.
Any plan on fixing this? Same issue.
the crash happens in line 107 of https://github.com/adee42/flutter_keyboard_visibility/blob/master/android/src/main/java/com/github/adee42/keyboardvisibility/KeyboardVisibilityPlugin.java
at registrar.activity().getApplication().registerActivityLifecycleCallbacks(instance); where registrar.activity() return null because registration is happening in Application class, can you have a null check set for this.