From da86831328e49278ce313cf71e9cb3a1b2f938cd Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 18:22:59 +0200 Subject: [PATCH 1/6] move implementation into the src folder --- lib/languagetool_textfield.dart | 36 +++++++++---------- .../client/language_tool_client.dart | 4 +-- .../controllers/language_tool_controller.dart | 24 ++++++------- lib/{ => src}/core/enums/delay_type.dart | 0 lib/{ => src}/core/enums/mistake_type.dart | 0 lib/{ => src}/core/langtool_images.dart | 0 lib/{ => src}/core/model/category.dart | 0 .../core/model/language_tool_raw.dart | 0 lib/{ => src}/core/model/match.dart | 4 +-- lib/{ => src}/core/model/replacement.dart | 0 lib/{ => src}/core/model/rule.dart | 4 +-- lib/{ => src}/domain/highlight_style.dart | 0 .../domain/language_check_service.dart | 4 +-- lib/{ => src}/domain/mistake.dart | 2 +- lib/{ => src}/domain/typedefs.dart | 6 ++-- lib/{ => src}/domain/writing_mistake.dart | 2 +- .../debounce_lang_tool_service.dart | 6 ++-- .../implementations/lang_tool_service.dart | 10 +++--- .../throttling_lang_tool_service.dart | 6 ++-- .../language_tool_text_field.dart | 6 ++-- lib/{ => src}/utils/closed_range.dart | 0 .../utils/extensions/string_extension.dart | 0 .../utils/keep_latest_response_service.dart | 0 lib/{ => src}/utils/mistake_popup.dart | 12 +++---- .../utils/popup_overlay_renderer.dart | 0 lib/{ => src}/utils/result.dart | 0 26 files changed, 63 insertions(+), 63 deletions(-) rename lib/{ => src}/client/language_tool_client.dart (92%) rename lib/{ => src}/core/controllers/language_tool_controller.dart (93%) rename lib/{ => src}/core/enums/delay_type.dart (100%) rename lib/{ => src}/core/enums/mistake_type.dart (100%) rename lib/{ => src}/core/langtool_images.dart (100%) rename lib/{ => src}/core/model/category.dart (100%) rename lib/{ => src}/core/model/language_tool_raw.dart (100%) rename lib/{ => src}/core/model/match.dart (92%) rename lib/{ => src}/core/model/replacement.dart (100%) rename lib/{ => src}/core/model/rule.dart (88%) rename lib/{ => src}/domain/highlight_style.dart (100%) rename lib/{ => src}/domain/language_check_service.dart (78%) rename lib/{ => src}/domain/mistake.dart (94%) rename lib/{ => src}/domain/typedefs.dart (67%) rename lib/{ => src}/domain/writing_mistake.dart (92%) rename lib/{ => src}/implementations/debounce_lang_tool_service.dart (79%) rename lib/{ => src}/implementations/lang_tool_service.dart (74%) rename lib/{ => src}/implementations/throttling_lang_tool_service.dart (80%) rename lib/{ => src}/presentation/language_tool_text_field.dart (93%) rename lib/{ => src}/utils/closed_range.dart (100%) rename lib/{ => src}/utils/extensions/string_extension.dart (100%) rename lib/{ => src}/utils/keep_latest_response_service.dart (100%) rename lib/{ => src}/utils/mistake_popup.dart (95%) rename lib/{ => src}/utils/popup_overlay_renderer.dart (100%) rename lib/{ => src}/utils/result.dart (100%) diff --git a/lib/languagetool_textfield.dart b/lib/languagetool_textfield.dart index 780083a..6379dc5 100644 --- a/lib/languagetool_textfield.dart +++ b/lib/languagetool_textfield.dart @@ -1,20 +1,20 @@ library languagetool_textfield; -export 'client/language_tool_client.dart'; -export 'core/controllers/language_tool_controller.dart'; -export 'core/enums/delay_type.dart'; -export 'core/model/category.dart'; -export 'core/model/language_tool_raw.dart'; -export 'core/model/match.dart'; -export 'core/model/replacement.dart'; -export 'core/model/rule.dart'; -export 'domain/highlight_style.dart'; -export 'domain/language_check_service.dart'; -export 'domain/mistake.dart'; -export 'domain/writing_mistake.dart'; -export 'implementations/debounce_lang_tool_service.dart'; -export 'implementations/lang_tool_service.dart'; -export 'implementations/throttling_lang_tool_service.dart'; -export 'presentation/language_tool_text_field.dart'; -export 'utils/mistake_popup.dart'; -export 'utils/popup_overlay_renderer.dart'; +export 'src/client/language_tool_client.dart'; +export 'src/core/controllers/language_tool_controller.dart'; +export 'src/core/enums/delay_type.dart'; +export 'src/core/model/category.dart'; +export 'src/core/model/language_tool_raw.dart'; +export 'src/core/model/match.dart'; +export 'src/core/model/replacement.dart'; +export 'src/core/model/rule.dart'; +export 'src/domain/highlight_style.dart'; +export 'src/domain/language_check_service.dart'; +export 'src/domain/mistake.dart'; +export 'src/domain/writing_mistake.dart'; +export 'src/implementations/debounce_lang_tool_service.dart'; +export 'src/implementations/lang_tool_service.dart'; +export 'src/implementations/throttling_lang_tool_service.dart'; +export 'src/presentation/language_tool_text_field.dart'; +export 'src/utils/mistake_popup.dart'; +export 'src/utils/popup_overlay_renderer.dart'; diff --git a/lib/client/language_tool_client.dart b/lib/src/client/language_tool_client.dart similarity index 92% rename from lib/client/language_tool_client.dart rename to lib/src/client/language_tool_client.dart index 48e70a9..af62e3a 100644 --- a/lib/client/language_tool_client.dart +++ b/lib/src/client/language_tool_client.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'package:http/http.dart' as http; -import 'package:languagetool_textfield/core/model/language_tool_raw.dart'; -import 'package:languagetool_textfield/domain/writing_mistake.dart'; +import 'package:languagetool_textfield/src/core/model/language_tool_raw.dart'; +import 'package:languagetool_textfield/src/domain/writing_mistake.dart'; /// Class to interact with the LanguageTool API. /// diff --git a/lib/core/controllers/language_tool_controller.dart b/lib/src/core/controllers/language_tool_controller.dart similarity index 93% rename from lib/core/controllers/language_tool_controller.dart rename to lib/src/core/controllers/language_tool_controller.dart index cd1bb8d..1aa9bed 100644 --- a/lib/core/controllers/language_tool_controller.dart +++ b/lib/src/core/controllers/language_tool_controller.dart @@ -3,18 +3,18 @@ import 'dart:math'; import 'package:collection/collection.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:languagetool_textfield/client/language_tool_client.dart'; -import 'package:languagetool_textfield/core/enums/delay_type.dart'; -import 'package:languagetool_textfield/core/enums/mistake_type.dart'; -import 'package:languagetool_textfield/domain/highlight_style.dart'; -import 'package:languagetool_textfield/domain/language_check_service.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/implementations/debounce_lang_tool_service.dart'; -import 'package:languagetool_textfield/implementations/lang_tool_service.dart'; -import 'package:languagetool_textfield/implementations/throttling_lang_tool_service.dart'; -import 'package:languagetool_textfield/utils/closed_range.dart'; -import 'package:languagetool_textfield/utils/keep_latest_response_service.dart'; -import 'package:languagetool_textfield/utils/mistake_popup.dart'; +import 'package:languagetool_textfield/src/client/language_tool_client.dart'; +import 'package:languagetool_textfield/src/core/enums/delay_type.dart'; +import 'package:languagetool_textfield/src/core/enums/mistake_type.dart'; +import 'package:languagetool_textfield/src/domain/highlight_style.dart'; +import 'package:languagetool_textfield/src/domain/language_check_service.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/implementations/debounce_lang_tool_service.dart'; +import 'package:languagetool_textfield/src/implementations/lang_tool_service.dart'; +import 'package:languagetool_textfield/src/implementations/throttling_lang_tool_service.dart'; +import 'package:languagetool_textfield/src/utils/closed_range.dart'; +import 'package:languagetool_textfield/src/utils/keep_latest_response_service.dart'; +import 'package:languagetool_textfield/src/utils/mistake_popup.dart'; /// A TextEditingController with overrides buildTextSpan for building /// marked TextSpans with tap recognizer diff --git a/lib/core/enums/delay_type.dart b/lib/src/core/enums/delay_type.dart similarity index 100% rename from lib/core/enums/delay_type.dart rename to lib/src/core/enums/delay_type.dart diff --git a/lib/core/enums/mistake_type.dart b/lib/src/core/enums/mistake_type.dart similarity index 100% rename from lib/core/enums/mistake_type.dart rename to lib/src/core/enums/mistake_type.dart diff --git a/lib/core/langtool_images.dart b/lib/src/core/langtool_images.dart similarity index 100% rename from lib/core/langtool_images.dart rename to lib/src/core/langtool_images.dart diff --git a/lib/core/model/category.dart b/lib/src/core/model/category.dart similarity index 100% rename from lib/core/model/category.dart rename to lib/src/core/model/category.dart diff --git a/lib/core/model/language_tool_raw.dart b/lib/src/core/model/language_tool_raw.dart similarity index 100% rename from lib/core/model/language_tool_raw.dart rename to lib/src/core/model/language_tool_raw.dart diff --git a/lib/core/model/match.dart b/lib/src/core/model/match.dart similarity index 92% rename from lib/core/model/match.dart rename to lib/src/core/model/match.dart index 5af21bf..1b905f3 100644 --- a/lib/core/model/match.dart +++ b/lib/src/core/model/match.dart @@ -1,5 +1,5 @@ -import 'package:languagetool_textfield/core/model/replacement.dart'; -import 'package:languagetool_textfield/core/model/rule.dart'; +import 'package:languagetool_textfield/src/core/model/replacement.dart'; +import 'package:languagetool_textfield/src/core/model/rule.dart'; /// Object that stores information about matched mistakes. class Match { diff --git a/lib/core/model/replacement.dart b/lib/src/core/model/replacement.dart similarity index 100% rename from lib/core/model/replacement.dart rename to lib/src/core/model/replacement.dart diff --git a/lib/core/model/rule.dart b/lib/src/core/model/rule.dart similarity index 88% rename from lib/core/model/rule.dart rename to lib/src/core/model/rule.dart index 7a4bdd5..785b5d9 100644 --- a/lib/core/model/rule.dart +++ b/lib/src/core/model/rule.dart @@ -1,5 +1,5 @@ -import 'package:languagetool_textfield/core/enums/mistake_type.dart'; -import 'package:languagetool_textfield/core/model/category.dart'; +import 'package:languagetool_textfield/src/core/enums/mistake_type.dart'; +import 'package:languagetool_textfield/src/core/model/category.dart'; /// Object that stores information about the rule (description, type, etc). class Rule { diff --git a/lib/domain/highlight_style.dart b/lib/src/domain/highlight_style.dart similarity index 100% rename from lib/domain/highlight_style.dart rename to lib/src/domain/highlight_style.dart diff --git a/lib/domain/language_check_service.dart b/lib/src/domain/language_check_service.dart similarity index 78% rename from lib/domain/language_check_service.dart rename to lib/src/domain/language_check_service.dart index 2cac080..6bb796c 100644 --- a/lib/domain/language_check_service.dart +++ b/lib/src/domain/language_check_service.dart @@ -1,5 +1,5 @@ -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/utils/result.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/utils/result.dart'; /// A base language check service. abstract class LanguageCheckService { diff --git a/lib/domain/mistake.dart b/lib/src/domain/mistake.dart similarity index 94% rename from lib/domain/mistake.dart rename to lib/src/domain/mistake.dart index 7719e03..d54746f 100644 --- a/lib/domain/mistake.dart +++ b/lib/src/domain/mistake.dart @@ -1,4 +1,4 @@ -import 'package:languagetool_textfield/core/enums/mistake_type.dart'; +import 'package:languagetool_textfield/src/core/enums/mistake_type.dart'; /// A data model class that stores information about a single writing mistake. class Mistake { diff --git a/lib/domain/typedefs.dart b/lib/src/domain/typedefs.dart similarity index 67% rename from lib/domain/typedefs.dart rename to lib/src/domain/typedefs.dart index 598bbdd..de210f9 100644 --- a/lib/domain/typedefs.dart +++ b/lib/src/domain/typedefs.dart @@ -1,7 +1,7 @@ import 'package:flutter/widgets.dart'; -import 'package:languagetool_textfield/core/controllers/language_tool_controller.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/utils/popup_overlay_renderer.dart'; +import 'package:languagetool_textfield/src/core/controllers/language_tool_controller.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/utils/popup_overlay_renderer.dart'; /// Callback used to build popup body typedef MistakeBuilderCallback = Widget Function({ diff --git a/lib/domain/writing_mistake.dart b/lib/src/domain/writing_mistake.dart similarity index 92% rename from lib/domain/writing_mistake.dart rename to lib/src/domain/writing_mistake.dart index fd55829..e9aaf67 100644 --- a/lib/domain/writing_mistake.dart +++ b/lib/src/domain/writing_mistake.dart @@ -1,4 +1,4 @@ -import 'package:languagetool_textfield/core/enums/mistake_type.dart'; +import 'package:languagetool_textfield/src/core/enums/mistake_type.dart'; /// Object that stores information about a single writing mistake. class WritingMistake { diff --git a/lib/implementations/debounce_lang_tool_service.dart b/lib/src/implementations/debounce_lang_tool_service.dart similarity index 79% rename from lib/implementations/debounce_lang_tool_service.dart rename to lib/src/implementations/debounce_lang_tool_service.dart index ec03d37..bcac7fe 100644 --- a/lib/implementations/debounce_lang_tool_service.dart +++ b/lib/src/implementations/debounce_lang_tool_service.dart @@ -1,6 +1,6 @@ -import 'package:languagetool_textfield/domain/language_check_service.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/utils/result.dart'; +import 'package:languagetool_textfield/src/domain/language_check_service.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/utils/result.dart'; import 'package:throttling/throttling.dart'; /// A language check service with debouncing. diff --git a/lib/implementations/lang_tool_service.dart b/lib/src/implementations/lang_tool_service.dart similarity index 74% rename from lib/implementations/lang_tool_service.dart rename to lib/src/implementations/lang_tool_service.dart index c71ce6a..9cd9e9c 100644 --- a/lib/implementations/lang_tool_service.dart +++ b/lib/src/implementations/lang_tool_service.dart @@ -1,8 +1,8 @@ -import 'package:languagetool_textfield/client/language_tool_client.dart'; -import 'package:languagetool_textfield/domain/language_check_service.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/domain/writing_mistake.dart'; -import 'package:languagetool_textfield/utils/result.dart'; +import 'package:languagetool_textfield/src/client/language_tool_client.dart'; +import 'package:languagetool_textfield/src/domain/language_check_service.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/domain/writing_mistake.dart'; +import 'package:languagetool_textfield/src/utils/result.dart'; /// An implementation of language check service with language tool service. class LangToolService extends LanguageCheckService { diff --git a/lib/implementations/throttling_lang_tool_service.dart b/lib/src/implementations/throttling_lang_tool_service.dart similarity index 80% rename from lib/implementations/throttling_lang_tool_service.dart rename to lib/src/implementations/throttling_lang_tool_service.dart index 5b851d0..872374d 100644 --- a/lib/implementations/throttling_lang_tool_service.dart +++ b/lib/src/implementations/throttling_lang_tool_service.dart @@ -1,6 +1,6 @@ -import 'package:languagetool_textfield/domain/language_check_service.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/utils/result.dart'; +import 'package:languagetool_textfield/src/domain/language_check_service.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/utils/result.dart'; import 'package:throttling/throttling.dart'; /// A language check service with debouncing. diff --git a/lib/presentation/language_tool_text_field.dart b/lib/src/presentation/language_tool_text_field.dart similarity index 93% rename from lib/presentation/language_tool_text_field.dart rename to lib/src/presentation/language_tool_text_field.dart index 78c7b27..9fce27b 100644 --- a/lib/presentation/language_tool_text_field.dart +++ b/lib/src/presentation/language_tool_text_field.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:languagetool_textfield/core/controllers/language_tool_controller.dart'; -import 'package:languagetool_textfield/utils/mistake_popup.dart'; -import 'package:languagetool_textfield/utils/popup_overlay_renderer.dart'; +import 'package:languagetool_textfield/src/core/controllers/language_tool_controller.dart'; +import 'package:languagetool_textfield/src/utils/mistake_popup.dart'; +import 'package:languagetool_textfield/src/utils/popup_overlay_renderer.dart'; /// A TextField widget that checks the grammar using the given /// [LanguageToolController] diff --git a/lib/utils/closed_range.dart b/lib/src/utils/closed_range.dart similarity index 100% rename from lib/utils/closed_range.dart rename to lib/src/utils/closed_range.dart diff --git a/lib/utils/extensions/string_extension.dart b/lib/src/utils/extensions/string_extension.dart similarity index 100% rename from lib/utils/extensions/string_extension.dart rename to lib/src/utils/extensions/string_extension.dart diff --git a/lib/utils/keep_latest_response_service.dart b/lib/src/utils/keep_latest_response_service.dart similarity index 100% rename from lib/utils/keep_latest_response_service.dart rename to lib/src/utils/keep_latest_response_service.dart diff --git a/lib/utils/mistake_popup.dart b/lib/src/utils/mistake_popup.dart similarity index 95% rename from lib/utils/mistake_popup.dart rename to lib/src/utils/mistake_popup.dart index f36a074..fff7e3c 100644 --- a/lib/utils/mistake_popup.dart +++ b/lib/src/utils/mistake_popup.dart @@ -2,12 +2,12 @@ import 'dart:math'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:languagetool_textfield/core/controllers/language_tool_controller.dart'; -import 'package:languagetool_textfield/core/langtool_images.dart'; -import 'package:languagetool_textfield/domain/mistake.dart'; -import 'package:languagetool_textfield/domain/typedefs.dart'; -import 'package:languagetool_textfield/utils/extensions/string_extension.dart'; -import 'package:languagetool_textfield/utils/popup_overlay_renderer.dart'; +import 'package:languagetool_textfield/src/core/controllers/language_tool_controller.dart'; +import 'package:languagetool_textfield/src/core/langtool_images.dart'; +import 'package:languagetool_textfield/src/domain/mistake.dart'; +import 'package:languagetool_textfield/src/domain/typedefs.dart'; +import 'package:languagetool_textfield/src/utils/extensions/string_extension.dart'; +import 'package:languagetool_textfield/src/utils/popup_overlay_renderer.dart'; /// Builder class that uses specified [popupRenderer] and [mistakeBuilder] /// to create mistake popup diff --git a/lib/utils/popup_overlay_renderer.dart b/lib/src/utils/popup_overlay_renderer.dart similarity index 100% rename from lib/utils/popup_overlay_renderer.dart rename to lib/src/utils/popup_overlay_renderer.dart diff --git a/lib/utils/result.dart b/lib/src/utils/result.dart similarity index 100% rename from lib/utils/result.dart rename to lib/src/utils/result.dart From ec124bc673a0171db808df0fb49e00d021f978ba Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 18:23:15 +0200 Subject: [PATCH 2/6] update solid_lints dependency --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ed96e8a..d42d62d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - solid_lints: ^0.0.14 + solid_lints: ^0.1.2 flutter: uses-material-design: true From 399f55a481ee6bf8977bb713b811732f864b4af3 Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 19:47:54 +0200 Subject: [PATCH 3/6] update CI/CD DCM action --- .github/workflows/code_check.yaml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/code_check.yaml b/.github/workflows/code_check.yaml index fcb5809..4530b5f 100644 --- a/.github/workflows/code_check.yaml +++ b/.github/workflows/code_check.yaml @@ -23,24 +23,14 @@ jobs: - name: Get dependencies run: flutter pub get - - name: Setup Dart Code Metrics - run: dart pub get dart_code_metrics + - name: Dart Code Metrics + uses: solid-software/dart-code-metrics-action@bb6c6b9b92f6adbd2b77fd83747a85f1f1be17ca + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + fatal_warnings: true + fatal_style: true + folders: "lib" - - name: Run Dart Code Metrics - run: | - dirs_to_analyze="" - if [ -d lib ]; then dirs_to_analyze+=" lib"; fi - if [ -d test ]; then dirs_to_analyze+=" test"; fi - if [ -d example ]; then dirs_to_analyze+=" example"; fi - if [ dirs_to_analyze != "" ] - then - dart run dart_code_metrics:metrics \ - analyze \ - $dirs_to_analyze \ - --fatal-warnings \ - --fatal-performance \ - --fatal-style - fi - name: Check formatting run: dart format . --set-exit-if-changed From b10b94ea9ec99ccf423c15fef8c8a8df50b622f3 Mon Sep 17 00:00:00 2001 From: Daniil Marchenko <145997968+solid-daniilmarchenko@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:34:42 +0200 Subject: [PATCH 4/6] Update code_check.yaml --- .github/workflows/code_check.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code_check.yaml b/.github/workflows/code_check.yaml index 4530b5f..350e3df 100644 --- a/.github/workflows/code_check.yaml +++ b/.github/workflows/code_check.yaml @@ -23,14 +23,9 @@ jobs: - name: Get dependencies run: flutter pub get - - name: Dart Code Metrics - uses: solid-software/dart-code-metrics-action@bb6c6b9b92f6adbd2b77fd83747a85f1f1be17ca - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - fatal_warnings: true - fatal_style: true - folders: "lib" - + - name: Custom lint + run: dart run custom_lint + - name: Check formatting run: dart format . --set-exit-if-changed From 2d27903a0c867fe977a14cfd05d4990dba14a455 Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 20:52:36 +0200 Subject: [PATCH 5/6] ignore some lints --- example/lib/main.dart | 2 ++ lib/src/implementations/debounce_lang_tool_service.dart | 1 + lib/src/implementations/throttling_lang_tool_service.dart | 1 + 3 files changed, 4 insertions(+) diff --git a/example/lib/main.dart b/example/lib/main.dart index 0f8e3d7..8f7ec40 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,3 +1,5 @@ +// ignore_for_file: prefer_match_file_name + import 'package:flutter/material.dart'; import 'package:languagetool_textfield/languagetool_textfield.dart'; diff --git a/lib/src/implementations/debounce_lang_tool_service.dart b/lib/src/implementations/debounce_lang_tool_service.dart index bcac7fe..e7fc013 100644 --- a/lib/src/implementations/debounce_lang_tool_service.dart +++ b/lib/src/implementations/debounce_lang_tool_service.dart @@ -21,6 +21,7 @@ class DebounceLangToolService extends LanguageCheckService { Future>?> findMistakes(String text) async => await debouncing.debounce(() => baseService.findMistakes(text)); + // ignore: proper_super_calls @override Future dispose() async { debouncing.close(); diff --git a/lib/src/implementations/throttling_lang_tool_service.dart b/lib/src/implementations/throttling_lang_tool_service.dart index 872374d..dfa6868 100644 --- a/lib/src/implementations/throttling_lang_tool_service.dart +++ b/lib/src/implementations/throttling_lang_tool_service.dart @@ -22,6 +22,7 @@ class ThrottlingLangToolService extends LanguageCheckService { Future>?> findMistakes(String text) async => throttling.throttle(() => baseService.findMistakes(text)); + // ignore: proper_super_calls @override Future dispose() async { throttling.close(); From 30fdc293f15242d913889d2a31eb8e9fc3c30366 Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 21:09:27 +0200 Subject: [PATCH 6/6] prefer match file name --- example/lib/main.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 8f7ec40..da7d074 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,3 @@ -// ignore_for_file: prefer_match_file_name - import 'package:flutter/material.dart'; import 'package:languagetool_textfield/languagetool_textfield.dart'; @@ -12,7 +10,7 @@ void main() { } /// Example App main page -// ignore: prefer-match-file-name +// ignore: prefer_match_file_name class App extends StatefulWidget { /// Example app constructor const App({super.key});