From e97702f7276e3553adb41318efcac685bc045707 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Tue, 17 Oct 2023 11:32:55 +0600 Subject: [PATCH] cleared dart analyze --fatal-infos and checked flutter test --- lib/src/search/controller.dart | 6 +++--- test/src/code/string_get_changed_range_test.dart | 2 +- test/src/folding/parsers/highlight_parser_go_test.dart | 2 +- test/src/folding/parsers/indent_parser_test.dart | 2 +- test/src/history/code_history_controller_test.dart | 2 -- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/src/search/controller.dart b/lib/src/search/controller.dart index b6c24533..511ec21a 100644 --- a/lib/src/search/controller.dart +++ b/lib/src/search/controller.dart @@ -73,7 +73,7 @@ class CodeSearchController extends ChangeNotifier { patternFocusNode.unfocus(); _hidingTimer?.cancel(); - if (returnFocusToCodeField == true) { + if (returnFocusToCodeField) { _codeFieldFocusNode?.requestFocus(); } @@ -160,8 +160,8 @@ class CodeSearchController extends ChangeNotifier { return; } - final shouldDismiss = patternFocusNode.hasFocus == false && - _codeFieldFocusNode?.hasFocus == false; + final shouldDismiss = + !patternFocusNode.hasFocus && _codeFieldFocusNode?.hasFocus == false; if (shouldDismiss) { hideSearch(returnFocusToCodeField: false); diff --git a/test/src/code/string_get_changed_range_test.dart b/test/src/code/string_get_changed_range_test.dart index 362785d5..553601e6 100644 --- a/test/src/code/string_get_changed_range_test.dart +++ b/test/src/code/string_get_changed_range_test.dart @@ -82,7 +82,7 @@ void main() { str1: 'abccde', str2: 'abcde', expected: [TextRange(start: 2, end: 2), TextRange(start: 3, end: 3)], - ) + ), ]; const affinities = [TextAffinity.upstream, TextAffinity.downstream]; diff --git a/test/src/folding/parsers/highlight_parser_go_test.dart b/test/src/folding/parsers/highlight_parser_go_test.dart index e64f247a..2bd76c32 100644 --- a/test/src/folding/parsers/highlight_parser_go_test.dart +++ b/test/src/folding/parsers/highlight_parser_go_test.dart @@ -58,7 +58,7 @@ func ( InvalidFoldableBlock(endLine: 6, type: FBT.braces), InvalidFoldableBlock(endLine: 6, type: FBT.braces), InvalidFoldableBlock(startLine: 6, type: FBT.parentheses), - InvalidFoldableBlock(endLine: 8, type: FBT.braces) + InvalidFoldableBlock(endLine: 8, type: FBT.braces), ]; _Tester.parseAndCheck( mode: go, diff --git a/test/src/folding/parsers/indent_parser_test.dart b/test/src/folding/parsers/indent_parser_test.dart index fb21293c..9fcb803e 100644 --- a/test/src/folding/parsers/indent_parser_test.dart +++ b/test/src/folding/parsers/indent_parser_test.dart @@ -169,7 +169,7 @@ numbers = [1, 5 ]''', expected: [_FB(firstLine: 0, lastLine: 4, type: _T.indent)], - ) + ), ]; for (final example in examples) { diff --git a/test/src/history/code_history_controller_test.dart b/test/src/history/code_history_controller_test.dart index f5faec4a..0841c291 100644 --- a/test/src/history/code_history_controller_test.dart +++ b/test/src/history/code_history_controller_test.dart @@ -76,10 +76,8 @@ void main() { final controller = await pumpController(wt, MethodSnippet.full); await wt.cursorEnd(); - controller.value = controller.value; controller.value = controller.value.typed('a'); controller.value = controller.value.typed('b'); - controller.value = controller.value; controller.foldAt(0); controller.unfoldAt(0);