fluttercommunity / wakelock_plus

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, Linux, and web.
BSD 3-Clause "New" or "Revised" License
71 stars 54 forks source link

PlatformException in web realease builds #58

Open roman423 opened 6 months ago

roman423 commented 6 months ago

Error:

PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.wakelock_plus_platform_interface.WakelockPlusApi.isEnabled"., null, null)`

Code:

FutureBuilder(
              future: WakelockPlus.enabled,
              builder: (context, snapshot) {

Description: The error only occur in release not dev environment.

Environment:

wakelock_plus: 1.2.5
wakelock_plus_platform_interface: 1.2.1
Flutter 3.19.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 54e66469a9 (3 weeks ago) • 2024-04-17 13:08:03 -0700
Engine • revision c4cd48e186
Tools • Dart 3.3.4 
diegotori commented 6 months ago

Please run flutter pub upgrade to ensure that all transient dependencies are upgraded as well.

roman423 commented 6 months ago

My dependencies are uptodate