toMap method
Converts this model to the Map expected by Flutter.
Implementation
Map<String, dynamic> toMap() {
return {
'direction': direction.index,
'sendEncodings':
sendEncodings.map((encoding) => encoding.toMap()).toList()
};
}