toMap method
Implementation
Map<String, dynamic> toMap() {
dynamic hostedMap;
try {
hostedMap = jsonDecode(hosted);
} catch (_) {}
return {
name: {
'hosted': hostedMap ?? hosted,
if (version != null) 'version': version,
},
};
}