How to Repack a Flutter Plugins to use for Flutter Web?

Issue

for this specific case, I’m trying to use Provider on Flutter Web,

but I’m sure that this will not be the last flutter package

that I will use on flutter web, so I’m trying to understand

how to solve this as a generic situation.

I came across this question :

Using flutter mobile packages in flutter web

and this answer:

you can also use libraries that are referencing Flutter framework that was repackaged for flutter_web. Like provider was forked [link]. You only can’t use plugins atm.

For my understanding the suggested procedure is

  1. Fork
  2. Repack
  3. Import

While “Fork” is straight forward, feel the need to ask:

  • How to Repack a Flutter Plugins to use for Flutter Web?

since this time I got lucky and Kevin already did the repacking

Thank you in advance

Solution

got the answer here

just

  • clone the repository you want to use,
  • copy the files in your project
  • fix the errors

then everything should work

Answered By – Francesco Iapicca

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *