Map<String, dynamic> toMapiOS() { final Map<String, dynamic> map = { "url": url, }; if (subdomains.isNotEmpty) { map.putIfAbsent("subdomains", () => subdomains); } return map; }