CurrentLocationLayer class
A layer for current location marker in FlutterMap
.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CurrentLocationLayer
Constructors
-
CurrentLocationLayer.new({Key? key, LocationMarkerStyle style = const LocationMarkerStyle(), Stream<
LocationMarkerPosition?> ? positionStream, Stream<LocationMarkerHeading?> ? headingStream, FocalPoint focalPoint = const FocalPoint(), Stream<double?> ? alignPositionStream, AlignOnUpdate alignPositionOnUpdate = AlignOnUpdate.never, Stream<void> ? alignDirectionStream, AlignOnUpdate alignDirectionOnUpdate = AlignOnUpdate.never, Duration alignPositionAnimationDuration = const Duration(milliseconds: 200), Curve alignPositionAnimationCurve = Curves.fastOutSlowIn, Duration alignDirectionAnimationDuration = const Duration(milliseconds: 120), Curve alignDirectionAnimationCurve = Curves.easeOut, Duration moveAnimationDuration = const Duration(milliseconds: 200), Curve moveAnimationCurve = Curves.fastOutSlowIn, Duration rotateAnimationDuration = const Duration(milliseconds: 120), Curve rotateAnimationCurve = Curves.easeOut, LocationMarkerIndicators indicators = const LocationMarkerIndicators()}) -
Create a CurrentLocationLayer.
const
Properties
- alignDirectionAnimationCurve → Curve
-
The curve of the animation of turning the map to align the heading.
Default to Curves.easeInOut.
final
- alignDirectionAnimationDuration → Duration
-
The duration of the animation of turning the map to align the heading.
Default to 50ms.
final
- alignDirectionOnUpdate → AlignOnUpdate
-
When should the plugin rotate the map to keep the heading upward. Default
to AlignOnUpdate.never.
final
-
alignDirectionStream
→ Stream<
void> ? -
A stream that emits an 'align direction event'. Emit an event to this
stream to align the marker direction upwards. Defaults to null.
final
- alignPositionAnimationCurve → Curve
-
The curve of the animation of following the map to the current location.
Default to Curves.fastOutSlowIn.
final
- alignPositionAnimationDuration → Duration
-
The duration of the animation of following the map to the current
location. Default to 200ms.
final
- alignPositionOnUpdate → AlignOnUpdate
-
When should the map follow current location. Default to
AlignOnUpdate.never.
final
-
alignPositionStream
→ Stream<
double?> ? -
A stream that emits an 'align position event'. Emit an event with a
optional zoom level to this stream to align the marker position to the
focal point at the specified zoom level. If null is emitted, the zoom
level remains unchanged. Defaults to null.
final
- focalPoint → FocalPoint
-
A screen point to align the marker when an 'align position event' is
emitted. An 'align position event' is emitted under the following
circumstances:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headingStream
→ Stream<
LocationMarkerHeading?> ? -
A stream that provide heading data for this marker. Defaults to
LocationMarkerDataStreamFactory.fromRotationSensorHeadingStream.
final
- indicators → LocationMarkerIndicators
-
The indicators which will display when in special status.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- moveAnimationCurve → Curve
-
The curve of the marker's move animation. Default to
Curves.fastOutSlowIn.
final
- moveAnimationDuration → Duration
-
The duration of the marker's move animation. Default to 200ms.
final
-
positionStream
→ Stream<
LocationMarkerPosition?> ? -
A stream that provide position data for this marker. Defaults to
LocationMarkerDataStreamFactory.fromGeolocatorPositionStream.
final
- rotateAnimationCurve → Curve
-
The curve of the heading sector rotate animation. Default to
Curves.easeInOut.
final
- rotateAnimationDuration → Duration
-
The duration of the heading sector rotate animation. Default to 50ms.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → LocationMarkerStyle
-
The style to use for this location marker.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CurrentLocationLayer> -
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.
override
-
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