LocationMarkerLayerOptions constructor

LocationMarkerLayerOptions({
  1. Key? key,
  2. Stream<LocationMarkerPosition>? positionStream,
  3. Stream<LocationMarkerHeading>? headingStream,
  4. Widget marker = const DefaultLocationMarker(),
  5. Size markerSize = const Size(20, 20),
  6. MarkerDirection markerDirection = MarkerDirection.top,
  7. bool showAccuracyCircle = true,
  8. Color accuracyCircleColor = const Color.fromARGB(0x18, 0x21, 0x96, 0xF3),
  9. bool showHeadingSector = true,
  10. double headingSectorRadius = 60,
  11. Color headingSectorColor = const Color.fromARGB(0xCC, 0x21, 0x96, 0xF3),
  12. @Deprecated('`markerAnimationDuration` is split into `moveAnimationDuration` and `rotateAnimationDuration`') Duration markerAnimationDuration = const Duration(milliseconds: 200),
  13. Duration? moveAnimationDuration,
  14. Duration? rotateAnimationDuration,
  15. Curve moveAnimationCurve = Curves.fastOutSlowIn,
  16. Curve rotateAnimationCurve = Curves.easeInOut,
  17. Stream<void>? rebuild,
})

Create a LocationMarkerLayerOptions.

Implementation

LocationMarkerLayerOptions({
  Key? key,
  Stream<LocationMarkerPosition>? positionStream,
  Stream<LocationMarkerHeading>? headingStream,
  this.marker = const DefaultLocationMarker(),
  this.markerSize = const Size(20, 20),
  this.markerDirection = MarkerDirection.top,
  this.showAccuracyCircle = true,
  this.accuracyCircleColor = const Color.fromARGB(0x18, 0x21, 0x96, 0xF3),
  this.showHeadingSector = true,
  this.headingSectorRadius = 60,
  this.headingSectorColor = const Color.fromARGB(0xCC, 0x21, 0x96, 0xF3),
  @Deprecated(
    '`markerAnimationDuration` is split into `moveAnimationDuration` and `rotateAnimationDuration`',
  )
      Duration markerAnimationDuration = const Duration(milliseconds: 200),
  Duration? moveAnimationDuration,
  Duration? rotateAnimationDuration,
  this.moveAnimationCurve = Curves.fastOutSlowIn,
  this.rotateAnimationCurve = Curves.easeInOut,
  Stream<void>? rebuild,
})  : positionStream = positionStream ??
          const LocationMarkerDataStreamFactory().geolocatorPositionStream(),
      headingStream = headingStream ??
          const LocationMarkerDataStreamFactory().compassHeadingStream(),
      moveAnimationDuration =
          moveAnimationDuration ?? markerAnimationDuration,
      rotateAnimationDuration =
          rotateAnimationDuration ?? markerAnimationDuration,
      super(
        key: key,
        rebuild: rebuild,
      );