Skip to content

Commit c2da5b6

Browse files
reactor: allow changing language tool service and throttling duration
1 parent 3e4a011 commit c2da5b6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/src/wrappers/in_memory_dictionary_language_check_service.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ class InMemoryDictionaryLanguageCheckService
2727
/// The [getDictionary] callback is required and will be called for every check operation.
2828
/// The service delegates checking to an internal LanguageToolService and then filters
2929
/// the results based on the returned dictionary.
30-
InMemoryDictionaryLanguageCheckService({required this.getDictionary})
31-
: super(
32-
LanguageToolService(LanguageToolClient()),
33-
const Duration(milliseconds: 250),
30+
InMemoryDictionaryLanguageCheckService({
31+
required this.getDictionary,
32+
LanguageCheckService? languageToolService,
33+
Duration? throttlingDuration,
34+
}) : super(
35+
languageToolService ?? LanguageToolService(LanguageToolClient()),
36+
throttlingDuration ?? const Duration(milliseconds: 250),
3437
);
3538

3639
@override

0 commit comments

Comments
 (0)