responsive_builder icon indicating copy to clipboard operation
responsive_builder copied to clipboard

Is the package designed for web?

Open AAGUPTA6209 opened this issue 1 year ago • 6 comments

I have been developing a website in flutter using this package. It works well on localhost but fails on github pages. Is there anything I can do to make it compatible with web?

AAGUPTA6209 avatar Jun 24 '23 15:06 AAGUPTA6209

On pub.dev it isn't included but how it seems to work based on screen size it must be compatible. Good question. I hope the package maintainer is okay and be able to clarify this

busslina avatar Nov 18 '23 07:11 busslina

Hi,

We have not code that checks for hosting of anykind, we just use pure Flutter so the package works wherever it's hosted.

There's no way we can write code to make it only work on specific types of hosting, it's all the same to the package.

FilledStacks avatar Nov 20 '23 14:11 FilledStacks

And yes, we use it for web.

I don't actually know what I have to do to get web to show up for the package.

FilledStacks avatar Nov 20 '23 14:11 FilledStacks

And yes, we use it for web.

I don't actually know what I have to do to get web to show up for the package.

Its not listed because have a import in the helpers import 'dart:io';, pub.dev automatically see this import and mark the package as not supported in the web. see: https://dart.dev/tools/pub/pubspec#platforms and https://github.com/imaNNeo/fl_chart/issues/1577#issuecomment-1927379340

hope this helps.

fexd12 avatar Feb 23 '24 14:02 fexd12

Can be deleted that import?

busslina avatar Feb 23 '24 18:02 busslina

We're using that import to determine what platform we're running on, there might be a better way to do that.

You can submit a PR deleting it and I'll approve it.

But yes, we use this on web, it's just not showing in the tags on pub dev.

FilledStacks avatar Mar 26 '24 11:03 FilledStacks