From 21b5f93c687a20fad3e38cd7e630ebde1915b714 Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Sun, 18 Aug 2024 08:43:45 -0400 Subject: [PATCH] dart formatting --- lib/src/editor/spellchecker/simple_spellchecker_impl.dart | 7 ++++--- lib/src/editor/spellchecker/spellchecker_service.dart | 5 +++-- lib/src/editor/widgets/text/text_line.dart | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/src/editor/spellchecker/simple_spellchecker_impl.dart b/lib/src/editor/spellchecker/simple_spellchecker_impl.dart index aa26b108..117ec2be 100644 --- a/lib/src/editor/spellchecker/simple_spellchecker_impl.dart +++ b/lib/src/editor/spellchecker/simple_spellchecker_impl.dart @@ -4,7 +4,7 @@ import 'package:simple_spell_checker/simple_spell_checker.dart'; import 'spellchecker_service.dart'; -/// SimpleSpellCheckerImpl is a simple spell checker for get +/// SimpleSpellCheckerImpl is a simple spell checker for get /// all words divide on different objects if them are wrong or not class SimpleSpellCheckerImpl extends SpellcheckerService { SimpleSpellCheckerImpl({required super.language}) @@ -12,9 +12,10 @@ class SimpleSpellCheckerImpl extends SpellcheckerService { language: language, safeDictionaryLoad: true, ); + /// [SimpleSpellChecker] comes from the package [simple_spell_checker] /// that give us all necessary methods for get our spans with highlighting - /// where needed + /// where needed final SimpleSpellChecker checker; @override @@ -32,7 +33,7 @@ class SimpleSpellCheckerImpl extends SpellcheckerService { @override void dispose({bool onlyPartial = false}) { - if(onlyPartial) { + if (onlyPartial) { checker.disposeControllers(); return; } diff --git a/lib/src/editor/spellchecker/spellchecker_service.dart b/lib/src/editor/spellchecker/spellchecker_service.dart index 74195a7a..495a28dd 100644 --- a/lib/src/editor/spellchecker/spellchecker_service.dart +++ b/lib/src/editor/spellchecker/spellchecker_service.dart @@ -6,9 +6,10 @@ abstract class SpellcheckerService { SpellcheckerService({required this.language}); final String language; + /// dispose all the resources used for SpellcheckerService - /// - /// if [onlyPartial] is true just dispose a part of the SpellcheckerService + /// + /// if [onlyPartial] is true just dispose a part of the SpellcheckerService /// (this comes from the implementation) /// /// if [onlyPartial] is false dispose all resources diff --git a/lib/src/editor/widgets/text/text_line.dart b/lib/src/editor/widgets/text/text_line.dart index 9c56dde5..f1f30b2e 100644 --- a/lib/src/editor/widgets/text/text_line.dart +++ b/lib/src/editor/widgets/text/text_line.dart @@ -404,7 +404,10 @@ class _TextLineState extends State { } } - if (!isLink && !widget.readOnly && !widget.line.style.attributes.containsKey('code-block') && !kIsWeb) { + if (!isLink && + !widget.readOnly && + !widget.line.style.attributes.containsKey('code-block') && + !kIsWeb) { final service = SpellcheckerServiceProvider.instance; final spellcheckedSpans = service.fetchSpellchecker(textNode.value); if (spellcheckedSpans != null && spellcheckedSpans.isNotEmpty) {