MisterJimson/flutter_keyboard_visibility

Exception thrown when listening to keyboardVisibilityController.onChange

Opened this issue · 0 comments

Describe the bug
When running the app with a .listen call to keyboardVisibilityController.onChange, this exception is thrown:

════════ Exception caught by services library ══════════════════════════════════
The following MissingPluginException was thrown while activating platform stream on channel flutter_keyboard_visibility:
MissingPluginException(No implementation found for method listen on channel flutter_keyboard_visibility)

When the exception was thrown, this was the stack:
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:320:7)
platform_channel.dart:320

#1 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:664:9)
platform_channel.dart:664

════════════════════════════════════════════════════════════════════════════════

To Reproduce
Steps to reproduce the behavior:

  1. Create new flutter project
  2. Install the package
  3. Try to listen to keyboardVisibilityController.onChange

Expected behavior
I would expect the exception not to be thrown and the listener to react accordingly.

Info (please complete the following information):
flutter_keyboard_visibility version:

5.4.1

Reproducible on platforms (Android, iOS, etc):

Android and iOS simulators/physical

flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.2, on Microsoft Windows [Version 10.0.19045.3693], locale en-CH)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.2)
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.85.0)
[√] Connected device (4 available)
[√] Network resources