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

Auto initialization & web support issue #12

Closed vatsaltanna closed 1 year ago

vatsaltanna commented 1 year ago

Although this PR is trying to fix some runtime issues that certain users encountered, these fixes should be performed by developers consuming the package. Enforcing them would take decisions that a developer expects to take himself/herself.

Also, the title is misleading as it claims to add "Auto initialization" but also adds web detection that would override the filter quality behavior, and impacts transitive dependencies with no good reason.

Unfortunately, I have to close this PR as not actionable. Thanks for your contribution anyways !

IMPORTANT NOTE :

If you would still like to have these changes in your application, please do not republish the package under a different name like some people do. Instead, depend on your own GitHub fork in the pubspec.yaml, like so :

dependencies:
     motion:
       git:
         url: git://github.com/vatsaltanna/motion.git
         ref: my-auto-initialization-branch

I have created this PR as I wanted to use this package in one of the other package. we can not use github fork inside a publishable package.

mrcendre commented 1 year ago

I have created this PR as I wanted to use this package in one of the other package. we can not use github fork inside a publishable package.

@vatsaltanna Thank you again for contributing to the package. However, motion provides a front-end UI component designed to be embedded directly into Flutter applications, not packages. If yours depends on a certain version of motion, it will lock consumers of your package to a certain version of motion, until you publish a version that upgrades its dependency, and so on...

If you still want to add it in your package's dependencies, in your specific case, you have at least three other options :

  1. Depend on the original motion and implement these specific web fix and auto-initialization behaviors inside of your package.
  2. Do not publish your package, and use the git: type dependencies in both your package's and app's pubspec.yaml.
  3. Host a private pub.dev mirror, on which you can publish any forked package you want. This is especially useful for sharing packages within an organization.

Please always keep in mind that if a package does not have a unique identity and does not bring any new/significant features, it really shouldn't be published on pub.dev and/or republished to be maintained by others without consent from the original author.

Thank you very much for your interest in motion and good luck with your projects !