Skip to content

Commit

Permalink
Format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarski committed Apr 26, 2023
1 parent a36e2f6 commit 92e31e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions example/lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class _AppState extends State<App> {
return Material(
child: LanguageToolTextField(
langService: _debouncedLangService,
style: TextStyle(),
decoration: InputDecoration(),
style: const TextStyle(),
decoration: const InputDecoration(),
mistakeBuilder: () {
return Container();
},
Expand Down
6 changes: 3 additions & 3 deletions lib/implementations/debounce_lang_tool_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class DebounceLangToolService extends LanguageCheckService {
) : debouncing = Debouncing(duration: debouncingDuration);

@override
Future<List<Mistake>> findMistakes(String text)async {
final value = await debouncing.debounce(() {
Future<List<Mistake>> findMistakes(String text) async {
final value = await debouncing.debounce(() {
return baseService.findMistakes(text);
}) as List<Mistake>?;

return value ?? [];
return value ?? [];
}
}
4 changes: 3 additions & 1 deletion lib/presentation/language_tool_text_field.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:languagetool_textfield/domain/language_check_service.dart';

Expand Down Expand Up @@ -33,7 +35,7 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {

Future<void> _check(String text) async {
final list = await widget.langService.findMistakes(text);
print(list);
log(list.toString());
}

@override
Expand Down

0 comments on commit 92e31e5

Please sign in to comment.