Fixed some issues on clients modal

This commit is contained in:
Juan Gilsanz Polo 2022-10-18 01:10:54 +02:00
parent 9720643593
commit 7b344aacce

View file

@ -119,10 +119,10 @@ class Client {
factory Client.fromJson(Map<String, dynamic> json) => Client(
name: json["name"],
blockedServices: List<String>.from(json["blocked_services"]),
ids: List<String>.from(json["ids"].map((x) => x)),
tags: List<String>.from(json["tags"].map((x) => x)),
upstreams: List<dynamic>.from(json["upstreams"].map((x) => x)),
blockedServices: json["blocked_services"] != null ? List<String>.from(json["blocked_services"]) : [],
ids: json["ids"] != null ? List<String>.from(json["ids"].map((x) => x)) : [],
tags: json["tags"] != null ? List<String>.from(json["tags"].map((x) => x)) : [],
upstreams: json["upstreams"] != null ? List<dynamic>.from(json["upstreams"].map((x) => x)) : [],
filteringEnabled: json["filtering_enabled"],
parentalEnabled: json["parental_enabled"],
safebrowsingEnabled: json["safebrowsing_enabled"],