toMap method

JsonMap toMap()

Converts to a JSON-serializable map.

Implementation

JsonMap toMap() => {
      'location': location.toMap(),
      if (previousLocation != null)
        'previousLocation': previousLocation!.toMap(),
      'factors': factors.map((f) => f.name).toList(),
      'confidence': confidence,
      'wasBlocked': wasBlocked,
      'timestamp': timestamp.toIso8601String(),
      'details': details,
    };