toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> map = {};
  if (id != null) {
    map['_id'] = id;
  }
  if (rid != null) {
    map['rid'] = rid;
  }
  if (updatedAt != null) {
    map['_updatedAt'] = updatedAt!.toIso8601String();
  }
  if (t != null) {
    map['t'] = t;
  }
  if (msgs != null) {
    map['msgs'] = msgs;
  }
  if (ts != null) {
    map['ts'] = ts!.toIso8601String();
  }
  if (lm != null) {
    map['lm'] = lm!.toIso8601String();
  }

  if (topic != null) {
    map['topic'] = topic;
  }

  return map;
}