loadStylePack method
- String styleURI,
- StylePackLoadOptions loadOptions,
- OnStylePackLoadProgressListener? progressListener
Loads a new style package or updates the existing one.
If a style package with the given id already exists, it is updated with
the values provided to the given loadOptions. The missing resources get
loaded and the expired resources get updated.
If there are no values provided to the given loadOptions, the existing
style package gets refreshed: the missing resources get loaded and the
expired resources get updated.
A failed load request can be reattempted with another loadStylePack call.
If the style cannot be fetched for any reason, the load request is terminated. If the style is fetched but loading some of the style package resources fails, the load request proceeds trying to load the remaining style package resources.
styleURI: The URI of the style package's associated style.
loadOptions: The style package load options.
progressListener: Invoked when loading progress is updated.
Implementation
Future<StylePack> loadStylePack(
String styleURI,
StylePackLoadOptions loadOptions,
OnStylePackLoadProgressListener? progressListener,
) => _impl.loadStylePack(styleURI, loadOptions, progressListener);