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
+39 -35
View File
@@ -19,22 +19,22 @@ Map<String, Object?> _file(String path) => {'path': path, 'hunks': const []};
/// A file with rename metadata and a hunk carrying one of each line kind, so
/// the view exercises `_FileDiff` meta, `_HunkView`, and `_DiffLineRow`.
Map<String, Object?> _richFile() => {
'path': 'lib/c.dart',
'renamed': true,
'oldPath': 'lib/old.dart',
'additions': 2,
'removals': 1,
'hunks': [
{
'header': '@@ -1,2 +1,3 @@',
'lines': [
{'kind': 'context', 'text': 'kept', 'oldLineNo': 1, 'newLineNo': 1},
{'kind': 'addition', 'text': 'new line', 'newLineNo': 2},
{'kind': 'removal', 'text': 'gone line', 'oldLineNo': 2},
],
},
'path': 'lib/c.dart',
'renamed': true,
'oldPath': 'lib/old.dart',
'additions': 2,
'removals': 1,
'hunks': [
{
'header': '@@ -1,2 +1,3 @@',
'lines': [
{'kind': 'context', 'text': 'kept', 'oldLineNo': 1, 'newLineNo': 1},
{'kind': 'addition', 'text': 'new line', 'newLineNo': 2},
{'kind': 'removal', 'text': 'gone line', 'oldLineNo': 2},
],
};
},
],
};
bool _textIs(Object? w, String s) => w is ClideText && w.data == s;
bool _textHas(Object? w, String s) => w is ClideText && w.data.contains(s);
@@ -52,10 +52,11 @@ void main() {
bus = DaemonBus();
ipc = FakeDaemonClient(log: Logger(), events: bus);
ipc.stub(
'git.diff',
(_) async => _ok({
'diffs': [_file('lib/a.dart'), _file('lib/b.dart')]
}));
'git.diff',
(_) async => _ok({
'diffs': [_file('lib/a.dart'), _file('lib/b.dart')],
}),
);
c = DiffController(ipc: ipc, events: bus);
});
@@ -94,10 +95,11 @@ void main() {
testWidgets('renders hunk header, each diff line kind, and rename meta', (tester) async {
ipc.stub(
'git.diff',
(_) async => _ok({
'diffs': [_richFile()]
}));
'git.diff',
(_) async => _ok({
'diffs': [_richFile()],
}),
);
await c.load();
await tester.pumpWidget(harness(f, DiffView(controller: c)));
await tester.pumpAndSettle();
@@ -111,13 +113,14 @@ void main() {
testWidgets('renders new/deleted/binary metadata and skips hunks for binary', (tester) async {
ipc.stub(
'git.diff',
(_) async => _ok({
'diffs': [
{'path': 'img.png', 'new': true, 'binary': true, 'hunks': const []},
{'path': 'gone.txt', 'deleted': true, 'hunks': const []},
]
}));
'git.diff',
(_) async => _ok({
'diffs': [
{'path': 'img.png', 'new': true, 'binary': true, 'hunks': const []},
{'path': 'gone.txt', 'deleted': true, 'hunks': const []},
],
}),
);
await c.load();
await tester.pumpWidget(harness(f, DiffView(controller: c)));
await tester.pumpAndSettle();
@@ -129,11 +132,12 @@ void main() {
testWidgets('renders the error message when git.diff fails', (tester) async {
ipc.stub(
'git.diff',
(_) async => IpcResponse.err(
id: '',
error: IpcError(code: IpcExitCode.toolError, kind: IpcErrorKind.toolError, message: 'boom'),
));
'git.diff',
(_) async => IpcResponse.err(
id: '',
error: IpcError(code: IpcExitCode.toolError, kind: IpcErrorKind.toolError, message: 'boom'),
),
);
await c.load();
await tester.pumpWidget(harness(f, DiffView(controller: c)));
await tester.pumpAndSettle();