StaticMap class Null safety

Widget for displaying static map. It uses widget.



StaticMap({Key? key, required String googleApiKey, double? width, double? height, List<Marker>? markers, Location? center, int? zoom, MapScale? scale, MapImageFormat? format, StaticMapType? maptype, String? mapId, List<Path>? paths, String? language, String? region, String? signature, List<MapStyle>? styles, bool scaleToDevicePixelRatio = true})


center Location?
Defines the center of the map, equidistant from all edges of the map.
format MapImageFormat?
Defines the format of the resulting image. By default, the Maps Static API creates PNG images. There are several possible formats including GIF, JPEG and PNG types. Which format you use depends on how you intend to present the image. JPEG typically provides greater compression, while GIF and PNG provide greater detail.
googleApiKey String
Allows you to monitor your application's API usage in the Google Cloud Platform Console, and ensures that Google can contact you about your application if necessary
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
height double?
This parameter is affected by the scale parameter, the final output height is the product of the height and scale values [...]
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
language String?
Defines the language to use for display of labels on map tiles. Note that this parameter is only supported for some country tiles; if the specific language requested is not supported for the tile set, then the default language for that tileset will be used.
mapId String?
maptype StaticMapType?
Defines the type of map to construct. There are several possible maptype values, including roadmap, satellite, hybrid, and terrain.
markers List<Marker>?
paths List<Path>?
region String?
Defines the appropriate borders to display, based on geo-political sensitivities. Accepts a region code specified as a two-character ccTLD ('top-level domain') value
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scale MapScale?
Affects the number of pixels that are returned. scale=2 returns twice as many pixels as scale=1 while retaining the same coverage area and level of detail (i.e. the contents of the map don't change). This is useful when developing for high-resolution displays, or when generating a map for printing. The default value is 1. Accepted values are 2 and 4.
scaleToDevicePixelRatio bool
If it is set to true, scale will be changed automaticly according to device pixel ratio
signature String?
Signature is used to verify that any site generating requests using your API key is authorized to do so. Requests without a digital signature might fail
styles List<MapStyle>?
width double?
This parameter is affected by the scale parameter, the final output width is the product of the width and scale values [...]
zoom int?
Defines the zoom level of the map, which determines the magnification level of the map. This parameter takes a numerical value corresponding to the zoom level of the region desired.


build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree. [...]
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel =}) String
A string representation of this object. [...]
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited