encode method
Implementation
@override
Future<Map<String, dynamic>> encode(dynamic content) async {
if (content is! String) {
throw FormatException('Content must be String, got ${content.runtimeType}');
}
return {
'content': Uint8List.fromList(utf8.encode(content)),
'parameters': {'encoding': 'UTF-8'},
};
}