CurrentLocationLayer constructor

CurrentLocationLayer({
  1. Key? key,
  2. LocationMarkerStyle style = const LocationMarkerStyle(),
  3. Stream<LocationMarkerPosition?>? positionStream,
  4. Stream<LocationMarkerHeading?>? headingStream,
  5. CustomPoint<num> followScreenPoint = const CustomPoint(0.0, 0.0),
  6. CustomPoint<num> followScreenPointOffset = const CustomPoint(0.0, 0.0),
  7. Stream<double?>? followCurrentLocationStream,
  8. Stream<void>? turnHeadingUpLocationStream,
  9. FollowOnLocationUpdate followOnLocationUpdate = FollowOnLocationUpdate.never,
  10. TurnOnHeadingUpdate turnOnHeadingUpdate = TurnOnHeadingUpdate.never,
  11. Duration followAnimationDuration = const Duration(milliseconds: 200),
  12. Curve followAnimationCurve = Curves.fastOutSlowIn,
  13. Duration turnAnimationDuration = const Duration(milliseconds: 200),
  14. Curve turnAnimationCurve = Curves.easeInOut,
  15. Duration moveAnimationDuration = const Duration(milliseconds: 200),
  16. Curve moveAnimationCurve = Curves.fastOutSlowIn,
  17. Duration rotateAnimationDuration = const Duration(milliseconds: 200),
  18. Curve rotateAnimationCurve = Curves.easeInOut,
  19. 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();