factory LegacyFilter.fromJson(Map<String, dynamic> json) => LegacyFilter( filterType: json.containsKey("filterType") ? (json["filterType"] as int) : 0, );