[tool] Update to Dart 3 (#6030)

Updates the repo tooling to Dart 3, now that the N-2 version has Dart 3, which allows us to use Dart 3 features (e.g., records) going forward.

To allow the update:
- Removes `break` commands from `switch`es (all done automatically with `dart fix --apply`)
- Replaces mocking of `ProcessResult` with just creating an actual `ProcessResult` since it's a `final` data class and thus can't (but also doesn't need to be) mocked.
This commit is contained in:
stuartmorgan
2024-02-06 11:31:48 -08:00
committed by GitHub
parent 9382257ce7
commit 7403992f15
15 changed files with 70 additions and 99 deletions

View File

@ -306,13 +306,11 @@ String _pluginPlatformSection(
if (support.hasDartCode) {
lines.add(' dartPluginClass: FakeDartPlugin');
}
break;
case platformWeb:
lines.addAll(<String>[
' pluginClass: FakePlugin',
' fileName: ${packageName}_web.dart',
]);
break;
default:
assert(false, 'Unrecognized platform: $platform');
break;