From 1afcea3cf13871bfab2601d56b6bc2a933ea9102 Mon Sep 17 00:00:00 2001 From: "very-good-code-bot[bot]" <269805761+very-good-code-bot[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:53:05 +0000 Subject: [PATCH 1/4] chore: upgrade to Flutter 3.44 and Dart 3.12 Closes #1597 Co-authored-by: dashboard --- .github/workflows/bump_templates.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/pub_publish.yaml | 2 +- .github/workflows/spdx_license.yaml | 4 +-- .github/workflows/spdx_license_bot.yaml | 2 +- .github/workflows/test_optimizer.yaml | 4 +-- .github/workflows/very_good_cli.yaml | 2 +- bricks/test_optimizer/hooks/pubspec.yaml | 2 +- e2e/pubspec.yaml | 2 +- .../test/async_main/fixture/pubspec.yaml | 2 +- .../compilation_error/fixture/pubspec.yaml | 2 +- .../fixture/pubspec.yaml | 2 +- pubspec.yaml | 2 +- .../create/commands/app_ui_package_test.dart | 2 +- .../create/commands/dart_cli_test.dart | 2 +- .../create/commands/dart_package_test.dart | 2 +- .../create/commands/docs_site_test.dart | 2 +- .../create/commands/flame_game_test.dart | 2 +- .../create/commands/flutter_app_test.dart | 2 +- .../create/commands/flutter_package_test.dart | 2 +- .../create/commands/flutter_plugin_test.dart | 2 +- .../commands/packages/commands/get_test.dart | 36 +++++++++---------- tool/spdx_license/hooks/pubspec.yaml | 2 +- tool/spdx_license/pubspec.yaml | 2 +- 24 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/bump_templates.yaml b/.github/workflows/bump_templates.yaml index 79aa886c6..d571c7c1a 100644 --- a/.github/workflows/bump_templates.yaml +++ b/.github/workflows/bump_templates.yaml @@ -14,7 +14,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: - sdk: "3.11.0" + sdk: "3.12.0" - name: Install mason run: dart pub global activate mason_cli diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f1b6e6856..7e64efa7d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -55,7 +55,7 @@ jobs: - name: 🐦 Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: "3.41.x" + flutter-version: "3.44.x" - name: Install LCOV run: sudo apt-get install -y lcov diff --git a/.github/workflows/pub_publish.yaml b/.github/workflows/pub_publish.yaml index b395aa3a0..052422edb 100644 --- a/.github/workflows/pub_publish.yaml +++ b/.github/workflows/pub_publish.yaml @@ -17,7 +17,7 @@ jobs: - name: 🎯 Setup Dart uses: dart-lang/setup-dart@v1 with: - sdk: "3.11.0" + sdk: "3.12.0" - name: 📦 Install Dependencies run: dart pub get - name: 📢 Publish diff --git a/.github/workflows/spdx_license.yaml b/.github/workflows/spdx_license.yaml index 9b96e62e3..28b477bfc 100644 --- a/.github/workflows/spdx_license.yaml +++ b/.github/workflows/spdx_license.yaml @@ -36,7 +36,7 @@ jobs: - name: 🎯 Setup Dart uses: dart-lang/setup-dart@v1 with: - sdk: "3.11.0" + sdk: "3.12.0" - name: 📦 Install Dependencies run: dart pub get @@ -71,7 +71,7 @@ jobs: - name: 🎯 Setup Dart uses: dart-lang/setup-dart@v1 with: - sdk: "3.11.0" + sdk: "3.12.0" - name: 📦 Install Dependencies run: dart pub get diff --git a/.github/workflows/spdx_license_bot.yaml b/.github/workflows/spdx_license_bot.yaml index b7816cddc..03727d5ff 100644 --- a/.github/workflows/spdx_license_bot.yaml +++ b/.github/workflows/spdx_license_bot.yaml @@ -23,7 +23,7 @@ jobs: - name: 🐦 Setup Flutter uses: subosito/flutter-action@v2.8.0 with: - flutter-version: "3.41.x" + flutter-version: "3.44.x" - name: 📦 Install Dependencies run: dart pub get diff --git a/.github/workflows/test_optimizer.yaml b/.github/workflows/test_optimizer.yaml index 47db5ec3a..201ac3efe 100644 --- a/.github/workflows/test_optimizer.yaml +++ b/.github/workflows/test_optimizer.yaml @@ -24,7 +24,7 @@ jobs: build_hooks: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 with: - dart_sdk: "3.11.0" + dart_sdk: "3.12.0" working_directory: bricks/test_optimizer/hooks verify_bundle: @@ -34,7 +34,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: - sdk: "3.11.0" + sdk: "3.12.0" - name: Install mason run: dart pub global activate mason_cli diff --git a/.github/workflows/very_good_cli.yaml b/.github/workflows/very_good_cli.yaml index 48ab0bc1c..9e029e5c2 100644 --- a/.github/workflows/very_good_cli.yaml +++ b/.github/workflows/very_good_cli.yaml @@ -34,7 +34,7 @@ jobs: - uses: subosito/flutter-action@v2.8.0 with: - flutter-version: "3.41.x" + flutter-version: "3.44.x" - name: Install Dependencies run: flutter pub get diff --git a/bricks/test_optimizer/hooks/pubspec.yaml b/bricks/test_optimizer/hooks/pubspec.yaml index 3f0f6ec14..0d988f749 100644 --- a/bricks/test_optimizer/hooks/pubspec.yaml +++ b/bricks/test_optimizer/hooks/pubspec.yaml @@ -2,7 +2,7 @@ name: hooks publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dependencies: mason: ^0.1.0 diff --git a/e2e/pubspec.yaml b/e2e/pubspec.yaml index ea4046705..3d2ee8eee 100644 --- a/e2e/pubspec.yaml +++ b/e2e/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.1.0+1 publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dev_dependencies: mason: ^0.1.0 diff --git a/e2e/test/commands/test/async_main/fixture/pubspec.yaml b/e2e/test/commands/test/async_main/fixture/pubspec.yaml index dd8032a19..75e08029e 100644 --- a/e2e/test/commands/test/async_main/fixture/pubspec.yaml +++ b/e2e/test/commands/test/async_main/fixture/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.1.0+1 publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dev_dependencies: test: ^1.24.3 diff --git a/e2e/test/commands/test/compilation_error/fixture/pubspec.yaml b/e2e/test/commands/test/compilation_error/fixture/pubspec.yaml index b08b0fe49..46311107f 100644 --- a/e2e/test/commands/test/compilation_error/fixture/pubspec.yaml +++ b/e2e/test/commands/test/compilation_error/fixture/pubspec.yaml @@ -3,7 +3,7 @@ version: 0.1.0+1 publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dev_dependencies: test: ^1.24.3 diff --git a/e2e/test/commands/test/spaced_golden_file_name/fixture/pubspec.yaml b/e2e/test/commands/test/spaced_golden_file_name/fixture/pubspec.yaml index bc205a8c5..5433e14df 100644 --- a/e2e/test/commands/test/spaced_golden_file_name/fixture/pubspec.yaml +++ b/e2e/test/commands/test/spaced_golden_file_name/fixture/pubspec.yaml @@ -3,7 +3,7 @@ description: Fixture for testing golden files with spaced file names. publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index a5775fb01..518c9e9d9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ documentation: https://cli.vgv.dev/docs/overview topics: [cli, codegen, test, template, boilerplate] environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dependencies: args: ^2.6.0 diff --git a/test/src/commands/create/commands/app_ui_package_test.dart b/test/src/commands/create/commands/app_ui_package_test.dart index 6ee276f25..45816338e 100644 --- a/test/src/commands/create/commands/app_ui_package_test.dart +++ b/test/src/commands/create/commands/app_ui_package_test.dart @@ -41,7 +41,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/dart_cli_test.dart b/test/src/commands/create/commands/dart_cli_test.dart index 52af02d32..1be0d559d 100644 --- a/test/src/commands/create/commands/dart_cli_test.dart +++ b/test/src/commands/create/commands/dart_cli_test.dart @@ -42,7 +42,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/dart_package_test.dart b/test/src/commands/create/commands/dart_package_test.dart index 0d589294a..eb64c8b6e 100644 --- a/test/src/commands/create/commands/dart_package_test.dart +++ b/test/src/commands/create/commands/dart_package_test.dart @@ -41,7 +41,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/docs_site_test.dart b/test/src/commands/create/commands/docs_site_test.dart index a69575dd1..52936ccdf 100644 --- a/test/src/commands/create/commands/docs_site_test.dart +++ b/test/src/commands/create/commands/docs_site_test.dart @@ -42,7 +42,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/flame_game_test.dart b/test/src/commands/create/commands/flame_game_test.dart index 306122cfd..5cb87ae3e 100644 --- a/test/src/commands/create/commands/flame_game_test.dart +++ b/test/src/commands/create/commands/flame_game_test.dart @@ -52,7 +52,7 @@ final expectedUsage = [ const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/flutter_app_test.dart b/test/src/commands/create/commands/flutter_app_test.dart index ccaf5ca8e..482dd7e71 100644 --- a/test/src/commands/create/commands/flutter_app_test.dart +++ b/test/src/commands/create/commands/flutter_app_test.dart @@ -45,7 +45,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/flutter_package_test.dart b/test/src/commands/create/commands/flutter_package_test.dart index e7616c54d..b56d0e43f 100644 --- a/test/src/commands/create/commands/flutter_package_test.dart +++ b/test/src/commands/create/commands/flutter_package_test.dart @@ -41,7 +41,7 @@ Run "very_good help" to see global options.''', const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/create/commands/flutter_plugin_test.dart b/test/src/commands/create/commands/flutter_plugin_test.dart index c25666759..4839ba744 100644 --- a/test/src/commands/create/commands/flutter_plugin_test.dart +++ b/test/src/commands/create/commands/flutter_plugin_test.dart @@ -68,7 +68,7 @@ final expectedUsage = [ const pubspec = ''' name: example environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''; void main() { diff --git a/test/src/commands/packages/commands/get_test.dart b/test/src/commands/packages/commands/get_test.dart index fa471cbb5..61301237e 100644 --- a/test/src/commands/packages/commands/get_test.dart +++ b/test/src/commands/packages/commands/get_test.dart @@ -112,7 +112,7 @@ name: example version: 0.1.0 environment: -sdk: ^3.11.0 +sdk: ^3.12.0 ''', ); @@ -162,7 +162,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ 'packages', @@ -190,7 +190,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 ''', ); final result = await commandRunner.run([ @@ -225,7 +225,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); pubspecB ..createSync(recursive: true) @@ -234,7 +234,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -273,7 +273,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); pubspecB ..createSync(recursive: true) @@ -282,7 +282,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -319,7 +319,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); pubspecB ..createSync(recursive: true) @@ -328,7 +328,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -368,7 +368,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); pubspecB ..createSync(recursive: true) @@ -377,7 +377,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -437,7 +437,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); File(path.join(directoryA.path, 'example', 'pubspec.yaml')) @@ -447,7 +447,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -487,7 +487,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); File(path.join(directoryA.path, 'example', 'pubspec.yaml')) @@ -497,7 +497,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ @@ -543,7 +543,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); File(path.join(directoryA.path, 'example', 'pubspec.yaml')) @@ -553,7 +553,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); File(path.join(directoryA.path, 'my_sub_package', 'pubspec.yaml')) @@ -563,7 +563,7 @@ sdk: ^3.11.0 version: 0.1.0 environment: - sdk: ^3.11.0 + sdk: ^3.12.0 '''); final result = await commandRunner.run([ diff --git a/tool/spdx_license/hooks/pubspec.yaml b/tool/spdx_license/hooks/pubspec.yaml index 569b8d363..f4647cc5d 100644 --- a/tool/spdx_license/hooks/pubspec.yaml +++ b/tool/spdx_license/hooks/pubspec.yaml @@ -6,7 +6,7 @@ issue_tracker: https://github.com/VeryGoodOpenSource/very_good_cli/issues publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dependencies: archive: ^4.0.7 diff --git a/tool/spdx_license/pubspec.yaml b/tool/spdx_license/pubspec.yaml index 18f042682..15bd0a15a 100644 --- a/tool/spdx_license/pubspec.yaml +++ b/tool/spdx_license/pubspec.yaml @@ -6,7 +6,7 @@ issue_tracker: https://github.com/VeryGoodOpenSource/very_good_cli/issues publish_to: none environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dev_dependencies: test: ^1.25.2 From 2e8f542213d05dad4584316e12b95d15602df210 Mon Sep 17 00:00:00 2001 From: "very-good-code-bot[bot]" <269805761+very-good-code-bot[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 10:19:57 +0000 Subject: [PATCH 2/4] fix: address review feedback on PR #1604 Co-authored-by: marcossevilla --- lib/src/cli/templates/test_optimizer_bundle.dart | 2 +- site/docs/overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/cli/templates/test_optimizer_bundle.dart b/lib/src/cli/templates/test_optimizer_bundle.dart index dc4e32501..9bb8cdb98 100644 --- a/lib/src/cli/templates/test_optimizer_bundle.dart +++ b/lib/src/cli/templates/test_optimizer_bundle.dart @@ -35,7 +35,7 @@ final testOptimizerBundle = MasonBundle.fromJson({ { "path": "pubspec.yaml", "data": - "bmFtZTogaG9va3MKcHVibGlzaF90bzogbm9uZQoKZW52aXJvbm1lbnQ6CiAgc2RrOiBeMy4xMS4wCgpkZXBlbmRlbmNpZXM6CiAgbWFzb246IF4wLjEuMAogIHBhdGg6IF4xLjguMQoKIyBCZXdhcmU6IG9uIGhvb2tzLCBldmVuIGRldiBkZXBlbmRlbmNpZXMgaGF2ZSB0byBiZSBjb21wYXRpYmxlIHRvIGFsbCBkYXJ0IHZlcnNpb25zIGNvdmVyZWQgYnkKIyB0aGUgc2RrIGNvbnN0cmFpbnRzIGFib3ZlCmRldl9kZXBlbmRlbmNpZXM6CiAgbW9ja3RhaWw6IF4xLjAuMAogIHRlc3Q6IF4xLjI1LjAKICB2ZXJ5X2dvb2RfYW5hbHlzaXM6IF4xMC4yLjAK", + "bmFtZTogaG9va3MKcHVibGlzaF90bzogbm9uZQoKZW52aXJvbm1lbnQ6CiAgc2RrOiBeMy4xMi4wCgpkZXBlbmRlbmNpZXM6CiAgbWFzb246IF4wLjEuMAogIHBhdGg6IF4xLjguMQoKIyBCZXdhcmU6IG9uIGhvb2tzLCBldmVuIGRldiBkZXBlbmRlbmNpZXMgaGF2ZSB0byBiZSBjb21wYXRpYmxlIHRvIGFsbCBkYXJ0IHZlcnNpb25zIGNvdmVyZWQgYnkKIyB0aGUgc2RrIGNvbnN0cmFpbnRzIGFib3ZlCmRldl9kZXBlbmRlbmNpZXM6CiAgbW9ja3RhaWw6IF4xLjAuMAogIHRlc3Q6IF4xLjI1LjAKICB2ZXJ5X2dvb2RfYW5hbHlzaXM6IF4xMC4yLjAK", "type": "text", }, { diff --git a/site/docs/overview.md b/site/docs/overview.md index 0b3eb3dc4..b8b46ebab 100644 --- a/site/docs/overview.md +++ b/site/docs/overview.md @@ -15,7 +15,7 @@ Very Good CLI is a Command-Line Interface that enables you to generate VGV-opini In order to use Very Good CLI you must have [Dart][dart_sdk] and [Flutter][flutter_sdk] installed on your machine. :::info -Very Good CLI requires Dart `">=3.11.0 <4.0.0"` +Very Good CLI requires Dart `">=3.12.0 <4.0.0"` ::: ## Installing From 33a24b6fa32e194cc67afa9381ad88271b204afb Mon Sep 17 00:00:00 2001 From: Marcos Sevilla Date: Wed, 3 Jun 2026 13:06:44 +0200 Subject: [PATCH 3/4] fix: format and analyzer warnings --- lib/src/cli/test_cli_runner.dart | 3 +-- .../commands/packages/commands/check/commands/licenses.dart | 3 +-- lib/src/pubspec_lock/pubspec_lock.dart | 3 +-- tool/spdx_license/hooks/test/pre_gen_test.dart | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/src/cli/test_cli_runner.dart b/lib/src/cli/test_cli_runner.dart index 76ed12793..e3a748319 100644 --- a/lib/src/cli/test_cli_runner.dart +++ b/lib/src/cli/test_cli_runner.dart @@ -25,8 +25,7 @@ enum CoverageCollectionMode { imports, /// Collect coverage from all files in the project. - all - ; + all; /// Parses a string value into a [CoverageCollectionMode]. static CoverageCollectionMode fromString(String value) { diff --git a/lib/src/commands/packages/commands/check/commands/licenses.dart b/lib/src/commands/packages/commands/check/commands/licenses.dart index 74049e05c..32989abea 100644 --- a/lib/src/commands/packages/commands/check/commands/licenses.dart +++ b/lib/src/commands/packages/commands/check/commands/licenses.dart @@ -541,8 +541,7 @@ enum ReporterOutputFormat { /// List all licenses in a CSV format. /// /// Example: very_good_cli,MIT - csv - ; + csv; /// Convenience parsing method from user input. /// diff --git a/lib/src/pubspec_lock/pubspec_lock.dart b/lib/src/pubspec_lock/pubspec_lock.dart index 16431af38..3ea78bd15 100644 --- a/lib/src/pubspec_lock/pubspec_lock.dart +++ b/lib/src/pubspec_lock/pubspec_lock.dart @@ -152,8 +152,7 @@ enum PubspecLockPackageDependencyType { /// See also: /// /// * [Dart's dependency override documentation](https://dart.dev/tools/pub/dependencies#dependency-overrides) - directOverridden._('direct overridden') - ; + directOverridden._('direct overridden'); const PubspecLockPackageDependencyType._(this.value); diff --git a/tool/spdx_license/hooks/test/pre_gen_test.dart b/tool/spdx_license/hooks/test/pre_gen_test.dart index fccc6849f..1ae5b4f13 100644 --- a/tool/spdx_license/hooks/test/pre_gen_test.dart +++ b/tool/spdx_license/hooks/test/pre_gen_test.dart @@ -21,7 +21,7 @@ class _MockLogger extends Mock implements Logger {} class _MockProgress extends Mock implements Progress {} class _TestHookContext implements HookContext { - _TestHookContext({required Logger logger}) : _logger = logger; + _TestHookContext({required this._logger}); final Logger _logger; From 4405697090bafd71ee46245218e4fd6c8f9f58af Mon Sep 17 00:00:00 2001 From: Marcos Sevilla Date: Wed, 3 Jun 2026 17:12:22 +0200 Subject: [PATCH 4/4] chore: use private name params --- lib/src/commands/dart/commands/dart_test_command.dart | 5 ++--- lib/src/commands/test/test.dart | 9 ++++----- lib/src/commands/update.dart | 7 ++++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/src/commands/dart/commands/dart_test_command.dart b/lib/src/commands/dart/commands/dart_test_command.dart index 6c519f3a6..6e9b25efc 100644 --- a/lib/src/commands/dart/commands/dart_test_command.dart +++ b/lib/src/commands/dart/commands/dart_test_command.dart @@ -167,11 +167,10 @@ typedef DartTestCommandCall = class DartTestCommand extends Command { /// {@macro packages_command} DartTestCommand({ - required Logger logger, + required this._logger, DartTestCommandCall? dartTest, DartInstalledCommand? dartInstalled, - }) : _logger = logger, - _dartTest = dartTest ?? Dart.test, + }) : _dartTest = dartTest ?? Dart.test, _dartInstalled = dartInstalled ?? Dart.installed { argParser ..addFlag( diff --git a/lib/src/commands/test/test.dart b/lib/src/commands/test/test.dart index 57d086a66..34bb7d6cd 100644 --- a/lib/src/commands/test/test.dart +++ b/lib/src/commands/test/test.dart @@ -187,12 +187,11 @@ typedef FlutterTestCommand = class TestCommand extends Command { /// {@macro test_command} TestCommand({ - required Logger logger, - @visibleForTesting FlutterInstalledCommand? flutterInstalled, + required this._logger, @visibleForTesting FlutterTestCommand? flutterTest, - }) : _logger = logger, - _flutterInstalled = flutterInstalled ?? Flutter.installed, - _flutterTest = flutterTest ?? Flutter.test { + @visibleForTesting FlutterInstalledCommand? flutterInstalled, + }) : _flutterTest = flutterTest ?? Flutter.test, + _flutterInstalled = flutterInstalled ?? Flutter.installed { argParser ..addFlag( 'coverage', diff --git a/lib/src/commands/update.dart b/lib/src/commands/update.dart index 50f644f3e..3b4f754fc 100644 --- a/lib/src/commands/update.dart +++ b/lib/src/commands/update.dart @@ -11,9 +11,10 @@ import 'package:very_good_cli/src/version.dart'; /// {@endtemplate} class UpdateCommand extends Command { /// {@macro update_command} - UpdateCommand({required Logger logger, PubUpdater? pubUpdater}) - : _logger = logger, - _pubUpdater = pubUpdater ?? PubUpdater(); + UpdateCommand({ + required this._logger, + PubUpdater? pubUpdater, + }) : _pubUpdater = pubUpdater ?? PubUpdater(); final Logger _logger; final PubUpdater _pubUpdater;