Skip to content

Commit f7f6f42

Browse files
committed
Devine only one BasemapGalleryItem constructor
1 parent f69d4a8 commit f7f6f42

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

lib/src/basemap_gallery/basemap_gallery_item.dart

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,12 @@ part of '../../arcgis_maps_toolkit.dart';
2222
/// - If `thumbnail`/`tooltip` overrides are provided and valid, they are used.
2323
/// - Otherwise, fall back to the basemap's associated [Item] (if present).
2424
final class BasemapGalleryItem {
25-
/// Creates a [BasemapGalleryItem] with a [Basemap].
26-
///
27-
/// If the [Basemap] has an associated [Item] with a thumbnail and
28-
/// description, they are used for [thumbnail] and [tooltip].
29-
BasemapGalleryItem({required Basemap basemap})
30-
: _basemap = basemap,
31-
_thumbnailOverride = null,
32-
_tooltipOverride = null {
33-
_recomputeDerivedFields();
34-
unawaited(_loadBasemapAndThumbnailIfNeeded());
35-
}
36-
37-
/// Creates a [BasemapGalleryItem] with optional thumbnail and tooltip
38-
/// overrides.
25+
/// Creates a [BasemapGalleryItem].
3926
///
4027
/// If [thumbnail] or [tooltip] are not provided (or are empty for [tooltip]),
4128
/// values from the basemap's associated [Item] are used as fallbacks.
42-
BasemapGalleryItem.withOverrides(
43-
Basemap basemap, {
29+
BasemapGalleryItem({
30+
required Basemap basemap,
4431
LoadableImage? thumbnail,
4532
String? tooltip,
4633
}) : _basemap = basemap,

0 commit comments

Comments
 (0)