toMap method
- EnumMethod? enumMethod,
Converts instance to a map.
Implementation
Map<String, dynamic> toMap({EnumMethod? enumMethod}) {
return {
"dataTypes": dataTypes
?.map(
(e) => switch (enumMethod ?? EnumMethod.nativeValue) {
EnumMethod.nativeValue => e.toNativeValue(),
EnumMethod.value => e.toValue(),
EnumMethod.name => e.name(),
},
)
.toList(),
"displayName": displayName,
};
}