mirror of
https://github.com/flutter/packages.git
synced 2025-06-18 04:33:52 +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:
@ -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;
|
||||
|
Reference in New Issue
Block a user