mrcendre / motion

A Flutter plugin to apply a gyroscope-based motion effect to widgets.
GNU General Public License v3.0
39 stars 15 forks source link

MacOS / Linux / Windows Support? #7

Closed jtkeyva closed 1 year ago

jtkeyva commented 2 years ago

Hello,

Thanks for this! The hover_effect package is pretty old with no null safety so this is a welcome addition and even better, the gyroscope support!!

Any plans to support the other platforms?

mrcendre commented 1 year ago

Hi @jtkeyva, thanks a lot for your feedback !

Since the first version of Motion, desktop platforms are supported. Instead of using the gyroscope events (typically only available on mobile platforms) to calculate the effect, it uses the mouse's hover movements on the widget. Thus, the effect is only achieved when the mouse enters the widget, and stops when the mouse leaves it. The transitions for these enter/leave events are designed to be as smooth as possible.

So far, it has been tested on the web and macOS. Let me know if some other desktop platform is broken.

jtkeyva commented 1 year ago

Awesome! In pub.dev it only states android, ios, web so figured it wasn't supported elsewhere.