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
+105 -111
View File
@@ -19,28 +19,28 @@ void main() {
testWidgets('horizontal drag adjusts the sidebar slot size', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
));
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.sidebar,
axis: Axis.horizontal,
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
),
);
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(arrangement: arr, slot: Slots.sidebar, axis: Axis.horizontal),
),
),
),
));
);
await tester.pumpAndSettle();
final center = tester.getCenter(find.byType(DragResizeHandle));
final gesture = await tester.startGesture(center, kind: PointerDeviceKind.mouse);
@@ -53,28 +53,28 @@ void main() {
testWidgets('contextPanel drag inverts the delta sign', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
));
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.contextPanel,
axis: Axis.horizontal,
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
),
);
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(arrangement: arr, slot: Slots.contextPanel, axis: Axis.horizontal),
),
),
),
));
);
await tester.pumpAndSettle();
final center = tester.getCenter(find.byType(DragResizeHandle));
final gesture = await tester.startGesture(center, kind: PointerDeviceKind.mouse);
@@ -86,28 +86,26 @@ void main() {
testWidgets('exposes a slider Semantics node with the current size', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 240),
],
));
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 240)],
),
);
final semHandle = tester.ensureSemantics();
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.sidebar,
axis: Axis.horizontal,
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(arrangement: arr, slot: Slots.sidebar, axis: Axis.horizontal),
),
),
),
));
);
await tester.pumpAndSettle();
final data = tester.getSemantics(find.byType(DragResizeHandle));
expect(data.label, 'Sidebar width');
@@ -120,28 +118,26 @@ void main() {
testWidgets('contextPanel slider Semantics label matches the slot', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 320),
],
));
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 320)],
),
);
final semHandle = tester.ensureSemantics();
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.contextPanel,
axis: Axis.horizontal,
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(arrangement: arr, slot: Slots.contextPanel, axis: Axis.horizontal),
),
),
),
));
);
await tester.pumpAndSettle();
final data = tester.getSemantics(find.byType(DragResizeHandle));
expect(data.label, 'Context panel width');
@@ -162,28 +158,26 @@ void main() {
testWidgets('vertical-axis handle uses arrow up/down shortcuts and "height" label', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.workspace, position: SlotPosition.center, defaultSize: 300),
],
));
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [LayoutSlot(slot: Slots.workspace, position: SlotPosition.center, defaultSize: 300)],
),
);
final semHandle = tester.ensureSemantics();
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 200,
height: 40,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.workspace,
axis: Axis.vertical,
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 200,
height: 40,
child: DragResizeHandle(arrangement: arr, slot: Slots.workspace, axis: Axis.vertical),
),
),
),
));
);
await tester.pumpAndSettle();
final data = tester.getSemantics(find.byType(DragResizeHandle));
// Custom (non-sidebar, non-contextPanel) slots fall through to
@@ -194,28 +188,28 @@ void main() {
testWidgets('hovered state flips the line colour without throwing', (tester) async {
final arr = LayoutArrangement();
arr.applyPreset(const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
));
await tester.pumpWidget(harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(
arrangement: arr,
slot: Slots.sidebar,
axis: Axis.horizontal,
arr.applyPreset(
const LayoutPresetContribution(
id: 'test-preset',
displayName: 'Test',
slots: [
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 200),
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 200),
],
),
);
await tester.pumpWidget(
harness(
f,
Center(
child: SizedBox(
width: 40,
height: 200,
child: DragResizeHandle(arrangement: arr, slot: Slots.sidebar, axis: Axis.horizontal),
),
),
),
));
);
await tester.pumpAndSettle();
// Hover over the handle.
final gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
+4 -21
View File
@@ -3,18 +3,8 @@ import 'package:clide/kernel/kernel.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
TabContribution _tab({
required String id,
required SlotId slot,
int priority = 0,
}) =>
TabContribution(
id: id,
slot: slot,
title: id,
priority: priority,
build: (_) => const SizedBox.shrink(),
);
TabContribution _tab({required String id, required SlotId slot, int priority = 0}) =>
TabContribution(id: id, slot: slot, title: id, priority: priority, build: (_) => const SizedBox.shrink());
void main() {
group('PanelRegistry', () {
@@ -23,10 +13,7 @@ void main() {
setUp(() => r = PanelRegistry());
test('registerSlot creates an empty mount list', () {
r.registerSlot(const SlotDefinition(
id: Slots.sidebar,
position: SlotPosition.left,
));
r.registerSlot(const SlotDefinition(id: Slots.sidebar, position: SlotPosition.left));
expect(r.definitionFor(Slots.sidebar)!.position, SlotPosition.left);
expect(r.contributionsFor(Slots.sidebar), isEmpty);
});
@@ -65,11 +52,7 @@ void main() {
});
test('contributing a non-slot contribution is a no-op for slots', () {
r.contribute(CommandContribution(
id: 'c',
command: 'c',
run: (_) async => throw UnimplementedError(),
));
r.contribute(CommandContribution(id: 'c', command: 'c', run: (_) async => throw UnimplementedError()));
expect(r.tabsFor(Slots.sidebar), isEmpty);
});
@@ -7,12 +7,7 @@ import 'package:clide/kernel/kernel.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
TabContribution _tab(String id, SlotId slot) => TabContribution(
id: id,
slot: slot,
title: id.toUpperCase(),
build: (_) => const SizedBox.shrink(),
);
TabContribution _tab(String id, SlotId slot) => TabContribution(id: id, slot: slot, title: id.toUpperCase(), build: (_) => const SizedBox.shrink());
void main() {
group('snapshotViewPanes', () {
@@ -42,11 +37,13 @@ void main() {
});
test('active follows the kernel activeTab; visible follows the arrangement', () {
arrangement.applyPreset(const LayoutPresetContribution(
id: 'test',
displayName: 'Test',
slots: [LayoutSlot(slot: Slots.workspace, position: SlotPosition.center, visible: true)],
));
arrangement.applyPreset(
const LayoutPresetContribution(
id: 'test',
displayName: 'Test',
slots: [LayoutSlot(slot: Slots.workspace, position: SlotPosition.center, visible: true)],
),
);
panels.contribute(_tab('claude', Slots.workspace));
panels.contribute(_tab('editor', Slots.workspace));
panels.activateTab(Slots.workspace, 'editor');