Skip to content
On this page

MapView

A provider-independent map surface with optional SDK adapters.

MapView in FluttyUIMapView in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

MapView

const MapView({
  super.key,
  required this.provider,
  required this.initialCamera,
  this.controller,
  this.markers = const [],
  this.pointsOfInterest = const [],
  this.routes = const [],
  this.heatmap,
  this.clustering,
  this.clusterBuilder,
  this.onClusterTap,
  this.trackedEntities = const [],
  this.initialFollowEntityId,
  this.onFollowChanged,
  this.initialSelectedPoiId,
  this.onPoiSelected,
  this.popupBuilder,
  this.closePopupOnMapTap = true,
  this.overlays = const [],
  this.borderRadius = 24,
  this.showCompass = true,
  this.compassAlignment = Alignment.topRight,
  this.compassPadding = const EdgeInsets.all(12),
  this.onCameraChanged,
  this.onTap,
  this.onError,
  this.loadingBuilder,
});
ParameterTypeRequiredDefault
keyKey?Nonull
providerMapProviderYes—
initialCameraMapCameraYes—
controllerMapController?Nonull
markersList<MapMarker>Noconst []
pointsOfInterestList<MapPoi>Noconst []
routesList<MapRoute>Noconst []
heatmapMapHeatmap?Nonull
clusteringMapClusterOptions?Nonull
clusterBuilderWidget Function(BuildContext, MapCluster, VoidCallback zoomIn)?Nonull
onClusterTapValueChanged<MapCluster>?Nonull
trackedEntitiesList<MapTrackedEntity>Noconst []
initialFollowEntityIdString?Nonull
onFollowChangedValueChanged<String?>?Nonull
initialSelectedPoiIdString?Nonull
onPoiSelectedValueChanged<MapPoi?>?Nonull
popupBuilderWidget Function(BuildContext context, MapPoi poi, VoidCallback close)?Nonull
closePopupOnMapTapboolNotrue
overlaysList<MapOverlay>Noconst []
borderRadiusdoubleNo24
showCompassboolNotrue
compassAlignmentAlignmentNoAlignment.topRight
compassPaddingEdgeInsetsNoconst EdgeInsets.all(12)
onCameraChangedValueChanged<MapCamera>?Nonull
onTapValueChanged<GeoPoint>?Nonull
onErrorValueChanged<Object>?Nonull
loadingBuilderWidgetBuilder?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/maps/map_view/map_view.dart

This reference is generated from the MapView declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI