Map<String, Object?> toMap() { var map = <String, Object?> { "total": total, "last": last, "plus": plus, "timestamp": timestamp, }; if (id != null) { map["id"] = id; } return map; }