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

Update web implementation to depend on Dart 3.3 JS interop + the recommended `web` package #26

Closed davidmartos96 closed 8 months ago

davidmartos96 commented 8 months ago

Fixes #24 and #28

The following PR updates de Web code to depend on the enhanced JS interop solution Dart provided in version 3.3+ The js dependency and dart:html are dropped in favor of web and dart:js_interop https://dart.dev/interop/js-interop Migration: https://dart.dev/interop/js-interop/package-web

This seems to be the approach the official plugins are starting to take for the web implementation

davidmartos96 commented 8 months ago

For some strange reason the CI is failing to start the iOS Simulator. Doesn't seem to be anything related to the PR changes, but it worked correctly for a previous run 2 weeks ago.

diegotori commented 8 months ago

@davidmartos96 please re-sync your changes with main's latest ones. Thanks.

vbuberen commented 8 months ago

@diegotori I think you can turn on this option in the repo to get a button to do such syncs yourself as well. Check General section of repository settings and find options Always suggest updating pull request branches:

Screenshot 2024-03-25 at 23 57 47
davidmartos96 commented 8 months ago

@diegotori I think you can turn on this option in the repo to get a button to do such syncs yourself as well. Check General section of repository settings and find options Always suggest updating pull request branches:

Screenshot 2024-03-25 at 23 57 47

I didn't know that was an option in the repo. I was confused that the option to update with master wasn't there.

diegotori commented 8 months ago

LGTM.