-
-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix FileTileProvider to work on the web #1170
Conversation
Thanks for this - I saw your note on the other PR. Just running checks now, should be able to review tomorrow or soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Haven't fully tested, but it doesn't look like it should cause any problems. If it's not too much of a hassle, can you remove the 'Podfile', as it's unrelated to this commit (I think)? Otherwise I'm happy to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit undecided on this one, as not enough experience on the flutter web side to know what's best. It doesn't feel like the Podfile is needed as previously mentioned, so I think that could go.
Regarding the other bits, something "feels" odd about having a FileTileProvider that uses a NetworkImage...but I can understand why the web makes this a bit messy. Wouldn't one simply not use it, or does it create an error when building for the web (again, I'm not so familiar with that)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @ibrierley also said, please remove the 'Podfile' as it is not directly related to this PR.
If you can also explain why NetworkImage
is used, that would be good: I'm assuming that is just how the Flutter framework works, but I might be wrong.
The browser can not access file system directly it can accept blobs so in flutter web you have to load the image using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and that explanation makes sense. @ibrierley?
Yeah, I think I'm happy with that, and I think it's all straightforward enough to amend should a better strategy evolve with the web stuff. Will give a retest and merge if all still looks ok. |
All good on Android and Web for me. |
This pr create two files
file_tile_provider_io.dart
andfile_tile_provider_web.dart
and export the right one