toMap method

JsonMap toMap()

Converts to a JSON-serializable map.

Implementation

JsonMap toMap() => {
      if (from != null) 'from': from!.toIso8601String(),
      if (to != null) 'to': to!.toIso8601String(),
      if (minAccuracy != null) 'minAccuracy': minAccuracy,
      if (maxAccuracy != null) 'maxAccuracy': maxAccuracy,
      if (isMoving != null) 'isMoving': isMoving,
      if (bounds != null) 'bounds': bounds!.toMap(),
      if (limit != null) 'limit': limit,
      'offset': offset,
      'sortOrder': sortOrder.name,
    };