flutter_native_device_orientation icon indicating copy to clipboard operation
flutter_native_device_orientation copied to clipboard

Added web support

Open mwoelk opened this issue 1 year ago • 6 comments

Added support for flutter web.

Currently when using this plugin directly on web it just crashes. Instead of checking for web use I thought it would be better to open a PR and make this plugin compatible with web as well:

Logic based on https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation See also: https://caniuse.com/screen-orientation

If browser support is not given, then we fall back to the provided defaultOrientation.

Looking forward to your feedback/suggestions.

mwoelk avatar Feb 19 '24 12:02 mwoelk