toMap method

JsonMap toMap()

Implementation

JsonMap toMap() => {
      if (tripId != null) 'tripId': tripId,
      'startOnMoving': startOnMoving,
      'startDistanceMeters': startDistanceMeters,
      'startSpeedKph': startSpeedKph,
      'stopOnStationary': stopOnStationary,
      'stopTimeoutMinutes': stopTimeoutMinutes,
      'stationarySpeedKph': stationarySpeedKph,
      'updateIntervalSeconds': updateIntervalSeconds,
      'dwellMinutes': dwellMinutes,
      'route': route.map((point) => point.toMap()).toList(),
      'routeDeviationThresholdMeters': routeDeviationThresholdMeters,
      'routeDeviationCooldownSeconds': routeDeviationCooldownSeconds,
      if (destination != null) 'destination': destination!.toMap(),
      'waypoints': waypoints.map((point) => point.toMap()).toList(),
    };