toJson static method
Creates Map
from Class Object
Implementation
static MapEntry<String, dynamic> toJson(StorageEntryTypeV9 entryType) {
switch (entryType.kind) {
case 'Plain':
return MapEntry('Plain', (entryType as StorageEntryTypeV9_Plain).value);
case 'Map':
return MapEntry('Map', (entryType as StorageEntryTypeV9_Map).toJson());
case 'DoubleMap':
return MapEntry(
'DoubleMap', (entryType as StorageEntryTypeV9_DoubleMap).toJson());
default:
throw UnexpectedTypeException('Unexpected type: ${entryType.kind}');
}
}