BasemapGalleryController.withPortal constructor

BasemapGalleryController.withPortal(
  1. Portal portal, {
  2. GeoModel? geoModel,
})

Creates a BasemapGalleryController using basemaps from the provided Portal. Provide a GeoModel to automatically apply the BasemapGalleryController.currentBasemap to the respective map or scene.

If the portal is valid, the controller fetches basemaps from the portal asynchronously and populates the gallery.

Implementation

BasemapGalleryController.withPortal(Portal portal, {this._geoModel})
  : _portal = portal {
  _initFromGeoModel();
  unawaited(_populateFromPortal());
}