Skip to content

[battery_plus] Platform support for battery_plus in README is wrong #34

@twoelz

Description

@twoelz

about battery_plus support for Linux ( mentioned in: https://github.com/fluttercommunity/plus_plugins#battery_plus )

listening to batteryState works on Android device,

  batteryStateSubscription =
      battery.onBatteryStateChanged.listen((BatteryState state) {
    batteryState = state;
    notifyListeners();
  });

works fine on Android, but in Linux (Ubuntu 20.04) throws missing plugin exceptions:

flutter: ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
flutter: The following MissingPluginException was thrown while activating platform stream on channel
flutter: plugins.flutter.io/charging:
flutter: MissingPluginException(No implementation found for method listen on channel
flutter: plugins.flutter.io/charging)

Here is my flutter doctor -v

Flutter (Channel dev, 1.24.0-3.0.pre, on Linux, locale en_US.UTF-8)
• Flutter version 1.24.0-3.0.pre at /home/thomas/development/flutter
• Framework revision 2783f8e2e1 (5 days ago), 2020-10-22 09:36:06 -0700
• Engine revision defa8be2b1
• Dart version 2.11.0 (build 2.11.0-242.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /home/thomas/Android/Sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /home/thomas/development/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1

[✓] Android Studio
• Android Studio at /home/thomas/development/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /home/thomas/development/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2)
• IntelliJ at /home/thomas/idea-IC/idea-IC-202.6397.94
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin version 202.7206

[✓] Connected device (3 available)
• Linux (desktop) • linux • linux-x64 • Linux
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.83

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions