chore: adopt Dart 3.9 toolchain — honest floor + tall-style reformat (T-353)

Raise the declared minimums in pubspec.yaml to what our deps already
require: Flutter >=3.35.0 / Dart >=3.9.0 (was 3.19.0 / 3.5.0). alchemist
0.12 needs Flutter 3.32; Dart 3.9 first ships in Flutter 3.35, so 3.35 is
the binding floor. Pin the exact build toolchain in .fvmrc (Flutter
3.44.1).

Moving to the Dart 3.9 language level switches `dart format` to the new
"tall" style and enables two new lints. This commit is the resulting
mechanical churn, isolated from any behaviour change:
  - whole-tree `dart format` reformat (tall style)
  - `dart fix` for unnecessary_underscores + use_null_aware_elements

No runtime behaviour change; `make test` green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-11 12:11:53 +02:00
co-authored by Claude Opus 4.8
parent bcea5f15b7
commit 6d0ebab721
444 changed files with 7587 additions and 12849 deletions
+3 -13
View File
@@ -24,19 +24,12 @@ class FakeDaemonClient extends DaemonClient {
}
@override
Future<IpcResponse> request(
String cmd, {
Map<String, Object?> args = const {},
}) async {
Future<IpcResponse> request(String cmd, {Map<String, Object?> args = const {}}) async {
final stub = _stubs[cmd];
if (stub != null) return stub(args);
return IpcResponse.err(
id: '',
error: IpcError(
code: IpcExitCode.notFound,
kind: IpcErrorKind.notFound,
message: 'no stub for $cmd',
),
error: IpcError(code: IpcExitCode.notFound, kind: IpcErrorKind.notFound, message: 'no stub for $cmd'),
);
}
@@ -46,10 +39,7 @@ class FakeDaemonClient extends DaemonClient {
notifyListeners();
}
void stub(
String cmd,
Future<IpcResponse> Function(Map<String, Object?>) handler,
) {
void stub(String cmd, Future<IpcResponse> Function(Map<String, Object?>) handler) {
_stubs[cmd] = handler;
}
}
+2 -6
View File
@@ -9,11 +9,7 @@ import 'package:alchemist/alchemist.dart';
AlchemistConfig clideGoldenConfig() {
return const AlchemistConfig(
theme: null, // we're not using Material ThemeData
platformGoldensConfig: PlatformGoldensConfig(
enabled: true,
),
ciGoldensConfig: CiGoldensConfig(
enabled: false,
),
platformGoldensConfig: PlatformGoldensConfig(enabled: true),
ciGoldensConfig: CiGoldensConfig(enabled: false),
);
}
+3 -12
View File
@@ -34,7 +34,7 @@ class KernelFixture {
preloadNamespaces: preloadNamespaces ?? catalogs.keys.toList(),
defaultLocale: defaultLocale,
initialLocale: initialLocale,
daemonClientFactory: (log, events, _, __) {
daemonClientFactory: (log, events, _, _) {
fake = FakeDaemonClient(log: log, events: events);
return fake!;
},
@@ -45,11 +45,7 @@ class KernelFixture {
// ~10 minutes (T-280); `existsSync` opens no native port, so it's safe.
onValidateProject: onValidateProject ?? _walkForGitRoot,
);
return KernelFixture._(
services: services,
ipc: fake!,
tempDir: tempDir,
);
return KernelFixture._(services: services, ipc: fake!, tempDir: tempDir);
}
Future<void> dispose() async {
@@ -100,10 +96,5 @@ ThemeDefinition _miniTheme() {
'error': Color(0xFFF06C6F),
'info': Color(0xFF00A3D2),
};
return const ThemeDefinition(
name: 'test',
displayName: 'Test',
dark: true,
palette: Palette(palette),
);
return const ThemeDefinition(name: 'test', displayName: 'Test', dark: true, palette: Palette(palette));
}
+5 -15
View File
@@ -21,14 +21,7 @@ Widget harness(KernelFixture fixture, Widget child) {
controller: fixture.services.theme,
child: MediaQuery(
data: const MediaQueryData(),
child: Overlay(
initialEntries: [
OverlayEntry(
canSizeOverlay: true,
builder: (_) => child,
),
],
),
child: Overlay(initialEntries: [OverlayEntry(canSizeOverlay: true, builder: (_) => child)]),
),
),
),
@@ -45,12 +38,7 @@ Widget harness(KernelFixture fixture, Widget child) {
/// with [child] (the trigger) placed at [alignment]. Set
/// `tester.view.physicalSize = size` to match (the default 800×600 matches the
/// default test view, so no setup is needed unless you change [size]).
Widget anchoredHarness(
KernelFixture fixture,
Widget child, {
Size size = const Size(800, 600),
Alignment alignment = Alignment.topLeft,
}) {
Widget anchoredHarness(KernelFixture fixture, Widget child, {Size size = const Size(800, 600), Alignment alignment = Alignment.topLeft}) {
return Directionality(
textDirection: TextDirection.ltr,
child: ClideKernel(
@@ -61,7 +49,9 @@ Widget anchoredHarness(
data: MediaQueryData(size: size),
child: Overlay(
initialEntries: [
OverlayEntry(builder: (_) => Align(alignment: alignment, child: child)),
OverlayEntry(
builder: (_) => Align(alignment: alignment, child: child),
),
],
),
),