toJson method
Creates Map
from Class Object
Implementation
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['name'] = name;
final localStorage = storage?.toJson();
data['storage'] = localStorage != null ? Option.some(localStorage) : None;
final localCalls = calls?.toJson();
data['calls'] = localCalls != null ? Option.some(localCalls) : None;
final localEvents = events?.toJson();
data['events'] = localEvents != null ? Option.some(localEvents) : None;
data['constants'] = constants
.map((PalletConstantMetadataV14 value) => value.toJson())
.toList(growable: false);
final localErrors = errors?.toJson();
data['errors'] = localErrors != null ? Option.some(localErrors) : None;
data['index'] = index;
return data;
}