CurrentLocationLayer constructor
CurrentLocationLayer({
- Key? key,
- LocationMarkerStyle style = const LocationMarkerStyle(),
- Stream<
LocationMarkerPosition?> ? positionStream, - Stream<
LocationMarkerHeading?> ? headingStream, - CustomPoint<
num> followScreenPoint = const CustomPoint(0.0, 0.0), - CustomPoint<
num> followScreenPointOffset = const CustomPoint(0.0, 0.0), - Stream<
double?> ? followCurrentLocationStream, - Stream<
void> ? turnHeadingUpLocationStream, - FollowOnLocationUpdate followOnLocationUpdate = FollowOnLocationUpdate.never,
- TurnOnHeadingUpdate turnOnHeadingUpdate = TurnOnHeadingUpdate.never,
- Duration followAnimationDuration = const Duration(milliseconds: 200),
- Curve followAnimationCurve = Curves.fastOutSlowIn,
- Duration turnAnimationDuration = const Duration(milliseconds: 200),
- Curve turnAnimationCurve = Curves.easeInOut,
- Duration moveAnimationDuration = const Duration(milliseconds: 200),
- Curve moveAnimationCurve = Curves.fastOutSlowIn,
- Duration rotateAnimationDuration = const Duration(milliseconds: 200),
- Curve rotateAnimationCurve = Curves.easeInOut,
- LocationMarkerIndicators indicators = const LocationMarkerIndicators(),
Create a CurrentLocationLayer.
Implementation
CurrentLocationLayer({
super.key,
this.style = const LocationMarkerStyle(),
Stream<LocationMarkerPosition?>? positionStream,
Stream<LocationMarkerHeading?>? headingStream,
this.followScreenPoint = const CustomPoint(0.0, 0.0),
this.followScreenPointOffset = const CustomPoint(0.0, 0.0),
this.followCurrentLocationStream,
this.turnHeadingUpLocationStream,
this.followOnLocationUpdate = FollowOnLocationUpdate.never,
this.turnOnHeadingUpdate = TurnOnHeadingUpdate.never,
this.followAnimationDuration = const Duration(milliseconds: 200),
this.followAnimationCurve = Curves.fastOutSlowIn,
this.turnAnimationDuration = const Duration(milliseconds: 200),
this.turnAnimationCurve = Curves.easeInOut,
this.moveAnimationDuration = const Duration(milliseconds: 200),
this.moveAnimationCurve = Curves.fastOutSlowIn,
this.rotateAnimationDuration = const Duration(milliseconds: 200),
this.rotateAnimationCurve = Curves.easeInOut,
this.indicators = const LocationMarkerIndicators(),
}) : positionStream = positionStream ??
const LocationMarkerDataStreamFactory()
.fromGeolocatorPositionStream(),
headingStream = headingStream ??
const LocationMarkerDataStreamFactory().fromCompassHeadingStream();