mirror of
https://github.com/flutter/packages.git
synced 2025-06-08 04:18:49 +08:00
[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:
@ -210,20 +210,16 @@ class VersionCheckCommand extends PackageLoopingCommand {
|
||||
switch (versionState) {
|
||||
case _CurrentVersionState.unchanged:
|
||||
versionChanged = false;
|
||||
break;
|
||||
case _CurrentVersionState.validIncrease:
|
||||
case _CurrentVersionState.validRevert:
|
||||
case _CurrentVersionState.newPackage:
|
||||
versionChanged = true;
|
||||
break;
|
||||
case _CurrentVersionState.invalidChange:
|
||||
versionChanged = true;
|
||||
errors.add('Disallowed version change.');
|
||||
break;
|
||||
case _CurrentVersionState.unknown:
|
||||
versionChanged = false;
|
||||
errors.add('Unable to determine previous version.');
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(await _validateChangelogVersion(package,
|
||||
|
Reference in New Issue
Block a user