BasemapGallery class final
The BasemapGallery widget displays a collection of basemaps from one of:
- ArcGIS Online,
- a user-defined portal,
- or an array of custom BasemapGalleryItem objects.
Overview
The BasemapGallery widget enables users to browse a collection of
basemaps and apply a selected BasemapGalleryItem to a connected GeoModel (such as an
ArcGISMap or ArcGISScene) via a BasemapGalleryController.
Features
- Displays basemaps as BasemapGalleryItem objects in a grid or list layout.
- Option to automatically switch the layout based on available width using the BasemapGalleryViewStyle enum.
- Displays a name and thumbnail for each basemap.
- Shows selection state and exposes selection events via the controller.
- Can be configured to automatically change the basemap of a geo model based on user selection.
Usage
A BasemapGallery widget is created with the following parameters:
- controller: A property for the controller that contains state data for this widget.
The widget can be inserted into a widget tree by calling the constructor and supplying a BasemapGalleryController with an associated GeoModel (i.e. ArcGISMap or ArcGISScene).
@override
Widget build(BuildContext context) {
return BasemapGallery(
controller: BasemapGalleryController(geoModel: map),
);
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BasemapGallery
Constructors
- BasemapGallery({required BasemapGalleryController controller, Key? key})
-
Creates a BasemapGallery widget.
const
Properties
- controller → BasemapGalleryController
-
The controller containing the state data and properties for this BasemapGallery.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BasemapGallery> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited