From a542102015fa786ec338ab183f2d186722a2b2b3 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Wed, 11 Oct 2023 19:27:18 +0600 Subject: [PATCH 1/8] upgraded for flutter v3.13.6 --- example/pubspec.yaml | 6 +++--- pubspec.yaml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index f06e839f..7b3df00a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -5,18 +5,18 @@ version: 1.0.0+1 environment: sdk: '>=2.17.0 <3.0.0' - flutter: '>=3.0.0' + flutter: ">=3.13.6" dependencies: flutter: { sdk: flutter } flutter_code_editor: { path: ../ } flutter_highlight: ^0.7.0 highlight: ^0.7.0 - http: ^0.13.5 + http: ^1.1.0 dev_dependencies: flutter_test: { sdk: flutter } - total_lints: ^2.17.4 + total_lints: ^3.1.1 flutter: uses-material-design: true diff --git a/pubspec.yaml b/pubspec.yaml index 8d938b2e..7557f56b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,15 +11,15 @@ dependencies: autotrie: ^2.0.0 characters: ^1.2.1 charcode: ^1.3.1 - collection: ^1.16.0 + collection: ^1.18.0 equatable: ^2.0.5 flutter: { sdk: flutter } flutter_highlight: ^0.7.0 highlight: ^0.7.0 - http: ^0.13.5 + http: ^1.1.0 linked_scroll_controller: ^0.2.0 - meta: ^1.7.0 - mocktail: ^0.3.0 + meta: ^1.11.0 + mocktail: ^1.0.1 scrollable_positioned_list: ^0.3.5 tuple: ^2.0.1 url_launcher: ^6.1.8 @@ -27,7 +27,7 @@ dependencies: dev_dependencies: fake_async: ^1.3.1 flutter_test: { sdk: flutter } - total_lints: ^2.18.0 + total_lints: ^3.1.1 flutter: uses-material-design: true From e3fd8b538dd65061d8a83d7902b0e2c3e06cfb7b Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov <31556582+nausharipov@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:39:11 +0600 Subject: [PATCH 2/8] Update dart.yaml: updated flutter_version from 3.10.2 to 3.13.6 --- .github/workflows/dart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yaml b/.github/workflows/dart.yaml index c860f932..2ecb2294 100644 --- a/.github/workflows/dart.yaml +++ b/.github/workflows/dart.yaml @@ -7,7 +7,7 @@ on: branches: [ '**' ] env: - flutter_version: 3.10.2 + flutter_version: 3.13.6 jobs: build: From 3ba151a12d3b7792517b1f1c1062b3cc229e813c Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov <31556582+nausharipov@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:47:47 +0600 Subject: [PATCH 3/8] Update dart.yaml: added flutter clean --- .github/workflows/dart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dart.yaml b/.github/workflows/dart.yaml index 2ecb2294..3e211ae8 100644 --- a/.github/workflows/dart.yaml +++ b/.github/workflows/dart.yaml @@ -29,6 +29,8 @@ jobs: - run: flutter --version + - run: flutter clean + - name: Install Dependencies run: flutter pub get From f573ed82aa43f2ad289e1875461346feb8adbac9 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov <31556582+nausharipov@users.noreply.github.com> Date: Thu, 12 Oct 2023 21:03:59 +0600 Subject: [PATCH 4/8] Update dart.yaml --- .github/workflows/dart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dart.yaml b/.github/workflows/dart.yaml index 3e211ae8..ff7e61fe 100644 --- a/.github/workflows/dart.yaml +++ b/.github/workflows/dart.yaml @@ -34,6 +34,8 @@ jobs: - name: Install Dependencies run: flutter pub get + - run: flutter pub outdated + - name: Analyze run: dart analyze --fatal-infos From 44fbf58cf66b74f8821f2df2678b8a07d08c1738 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Thu, 12 Oct 2023 21:22:34 +0600 Subject: [PATCH 5/8] downgraded meta back to v1.9.1 because of ci workflow --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7557f56b..e648f72a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: highlight: ^0.7.0 http: ^1.1.0 linked_scroll_controller: ^0.2.0 - meta: ^1.11.0 + meta: ^1.9.1 mocktail: ^1.0.1 scrollable_positioned_list: ^0.3.5 tuple: ^2.0.1 From 34f78781ca07e841529ae3b60c4699b8e62d05b9 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Mon, 16 Oct 2023 21:15:41 +0600 Subject: [PATCH 6/8] collection: ^1.17.2 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index e648f72a..9f0c563d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: autotrie: ^2.0.0 characters: ^1.2.1 charcode: ^1.3.1 - collection: ^1.18.0 + collection: ^1.17.2 equatable: ^2.0.5 flutter: { sdk: flutter } flutter_highlight: ^0.7.0 From e97702f7276e3553adb41318efcac685bc045707 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Tue, 17 Oct 2023 11:32:55 +0600 Subject: [PATCH 7/8] 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); From 2bbd1035578ef4f6e4d2a8f9f5f8b05e2756c361 Mon Sep 17 00:00:00 2001 From: Darkhan Nausharipov Date: Tue, 17 Oct 2023 13:07:25 +0600 Subject: [PATCH 8/8] using replacedText instead of self-assignment --- test/src/history/code_history_controller_test.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/src/history/code_history_controller_test.dart b/test/src/history/code_history_controller_test.dart index 0841c291..ee395139 100644 --- a/test/src/history/code_history_controller_test.dart +++ b/test/src/history/code_history_controller_test.dart @@ -76,8 +76,14 @@ void main() { final controller = await pumpController(wt, MethodSnippet.full); await wt.cursorEnd(); + controller.value = controller.value.replacedText( + controller.value.text, + ); controller.value = controller.value.typed('a'); controller.value = controller.value.typed('b'); + controller.value = controller.value.replacedText( + controller.value.text, + ); controller.foldAt(0); controller.unfoldAt(0);