toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() {
  final conf = <String, Object?>{
    'id': id,
    'boundaries': boundaries,
    'contexts': contexts?.map((e) => e.toMap()).toList(),
    'player': player?.toMap(),
    'pings': pings,
    'pingInterval': pingInterval,
    'maxPausedPings': maxPausedPings,
    'session': session
  };
  conf.removeWhere((key, value) => value == null);
  return conf;
}