toJson method Null safety
Implementation
String toJson() {
return "{"
"\"sourceIp\":\"$sourceIp\","
"\"userAgent\":\"$userAgent\","
"\"geolocation\":\"$geolocation\","
"\"referer\":\"$referer\"}";
}
String toJson() {
return "{"
"\"sourceIp\":\"$sourceIp\","
"\"userAgent\":\"$userAgent\","
"\"geolocation\":\"$geolocation\","
"\"referer\":\"$referer\"}";
}