Map<String, dynamic> toJson() { final markerName = this.markerName; final details = this.details; return { 'markerName': markerName, if (details != null) 'details': details, }; }