check method
Checks the errors in text.
Implementation
Future<List<WritingMistake>> check(String text) async {
final result = await http.post(
Uri.https(_url, 'v2/check'),
headers: _headers,
body: {
'text': text,
'language': language,
'enabledOnly': 'false',
'level': 'default',
},
);
final languageToolAnswer = LanguageToolRaw.fromJson(
json.decode(utf8.decode(result.bodyBytes)) as Map<String, dynamic>,
);
return _parseRawAnswer(languageToolAnswer);
}