Added placeholder support for tile loading #1849
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This update introduces customizable loading placeholders for the Tile widget, offering both a default grid and the option to use a custom widget as a placeholder. The feature is controlled by the showPlaceholder boolean parameter within TileLayer. When showPlaceholder is true, developers can either rely on the default grid or specify their own widget to be displayed during tile loading. This addition significantly improves the app's visual feedback during slow loading times.
Key Changes:
showPlaceholder Parameter: Determines whether any placeholder is shown during tile loading. A false value results in no placeholder, maintaining a clean but potentially empty tile space during load.
Custom Placeholder Widget: When showPlaceholder is true, and a custom widget is provided via the placeholder parameter, this widget will be displayed as the loading indicator. This allows for unique, app-specific loading visuals.
Default Grid Placeholder: In the absence of a custom widget (with showPlaceholder set to true), a default grid serves as the loading indicator, enhancing the user's awareness of the loading process without overwhelming the visual experience.
Benefits:
Improved User Experience: Offers immediate visual feedback during tile loading, enhancing the perception of responsiveness, especially in low bandwidth scenarios.
Flexibility and Customization: Developers can customize tile loading experience with custom placeholders.