Skip to content
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

refactor!: multiple fixes & additions to NetworkTileProvider (and underlying ImageProvider) #1742

Merged
merged 6 commits into from
Dec 6, 2023

Conversation

JaffaKetchup
Copy link
Member

@JaffaKetchup JaffaKetchup commented Dec 1, 2023

Fixes #1698 (and fixes #1703) as much as possible.

This transitions to a more consistent internal implementation of the FlutterMapNetworkImageProvider, both in that it uses the same asynchronous styles throughout, and follows roughly what is recommended by the ImageProvider documentation.
It also fixes a bug or two, and aims to improve performance as much as is feasibly possible - however, because we cannot depend on dart:io without a lot of extra code, we cannot use some efficiency methods such as consolidate...whatever, but I think there'll be little differences with the tiny images of tiles. An option has been added to just ignore exceptions in the HTTP IO portion of the image provider.

This will be reflected in the CancellableNetworkTileProvider in its v2, by PR fleaflet/flutter_map_cancellable_tile_provider#4.

…till being loaded

Improved error handling
Improved performance
Added `silenceExceptions` parameter
Reduced internal code duplication
Removed lint that was often overridden
JaffaKetchup added a commit to fleaflet/flutter_map_cancellable_tile_provider that referenced this pull request Dec 1, 2023
@JaffaKetchup JaffaKetchup changed the title fix!: general improvements to NetworkTileProvider and custom ImageProvider multi!: general improvements to NetworkTileProvider and custom ImageProvider Dec 1, 2023
@josxha josxha added this to the v6.1 milestone Dec 2, 2023
@JaffaKetchup JaffaKetchup modified the milestones: v6.1, v7.0 Dec 2, 2023
JaffaKetchup added a commit to fleaflet/flutter_map_cancellable_tile_provider that referenced this pull request Dec 2, 2023
Copy link
Contributor

@josxha josxha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tested on windows and web

@JaffaKetchup JaffaKetchup changed the title multi!: general improvements to NetworkTileProvider and custom ImageProvider refactor!: general improvements to NetworkTileProvider and custom ImageProvider Dec 6, 2023
@JaffaKetchup JaffaKetchup changed the title refactor!: general improvements to NetworkTileProvider and custom ImageProvider refactor!: multiple fixes & additions to NetworkTileProvider (and underlying ImageProvider) Dec 6, 2023
@JaffaKetchup JaffaKetchup merged commit 11b43e1 into master Dec 6, 2023
7 checks passed
@JaffaKetchup JaffaKetchup deleted the improve-image-provider branch December 6, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants