BasemapGalleryController.withItems constructor

BasemapGalleryController.withItems({
  1. required List<BasemapGalleryItem> items,
  2. GeoModel? geoModel,
})

Creates a BasemapGalleryController using the provided custom list of BasemapGalleryItem. Provide a GeoModel to automatically apply the BasemapGalleryController.currentBasemap to the respective map or scene.

Implementation

BasemapGalleryController.withItems({
  required List<BasemapGalleryItem> items,
  this._geoModel,
}) : _portal = null {
  _initFromGeoModel();

  if (items.isEmpty) {
    throw ArgumentError.value(
      items,
      'items',
      'BasemapGalleryController.withItems requires a non-empty list. '
          'Use the unnamed BasemapGalleryController() constructor for defaults.',
    );
  }

  _replaceGalleryItems(items);
}