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:
+10
-21
@@ -16,23 +16,12 @@ enum PaneKind {
|
||||
String get wire => name;
|
||||
|
||||
static PaneKind parse(String s) {
|
||||
return PaneKind.values.firstWhere(
|
||||
(v) => v.wire == s,
|
||||
orElse: () => throw ArgumentError.value(s, 'kind', 'unknown pane kind'),
|
||||
);
|
||||
return PaneKind.values.firstWhere((v) => v.wire == s, orElse: () => throw ArgumentError.value(s, 'kind', 'unknown pane kind'));
|
||||
}
|
||||
}
|
||||
|
||||
class Pane {
|
||||
Pane({
|
||||
required this.id,
|
||||
required this.kind,
|
||||
required this.pid,
|
||||
required this.argv,
|
||||
this.cwd,
|
||||
this.title,
|
||||
this.isClosed = false,
|
||||
});
|
||||
Pane({required this.id, required this.kind, required this.pid, required this.argv, this.cwd, this.title, this.isClosed = false});
|
||||
|
||||
final String id;
|
||||
final PaneKind kind;
|
||||
@@ -47,12 +36,12 @@ class Pane {
|
||||
bool isClosed;
|
||||
|
||||
Map<String, Object?> toJson() => {
|
||||
'id': id,
|
||||
'kind': kind.wire,
|
||||
'pid': pid,
|
||||
'argv': argv,
|
||||
if (cwd != null) 'cwd': cwd,
|
||||
if (title != null) 'title': title,
|
||||
'closed': isClosed,
|
||||
};
|
||||
'id': id,
|
||||
'kind': kind.wire,
|
||||
'pid': pid,
|
||||
'argv': argv,
|
||||
if (cwd != null) 'cwd': cwd,
|
||||
if (title != null) 'title': title,
|
||||
'closed': isClosed,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -52,36 +52,17 @@ class PaneRegistry {
|
||||
'COLORTERM': 'truecolor',
|
||||
'LANG': 'en_US.UTF-8',
|
||||
'LC_ALL': 'en_US.UTF-8',
|
||||
if (env != null) ...env,
|
||||
...?env,
|
||||
};
|
||||
|
||||
final session = NativePty.start(
|
||||
executable: executable,
|
||||
arguments: arguments,
|
||||
columns: cols,
|
||||
rows: rows,
|
||||
workingDirectory: cwd,
|
||||
environment: fullEnv,
|
||||
);
|
||||
final pane = Pane(
|
||||
id: id,
|
||||
kind: kind,
|
||||
pid: session.pid,
|
||||
argv: argv,
|
||||
cwd: cwd,
|
||||
title: title,
|
||||
);
|
||||
final session = NativePty.start(executable: executable, arguments: arguments, columns: cols, rows: rows, workingDirectory: cwd, environment: fullEnv);
|
||||
final pane = Pane(id: id, kind: kind, pid: session.pid, argv: argv, cwd: cwd, title: title);
|
||||
_panes[id] = pane;
|
||||
_sessions[id] = session;
|
||||
|
||||
_emit('pane.spawned', id, pane.toJson());
|
||||
|
||||
_subs[id] = session.output.listen(
|
||||
(bytes) => _emit('pane.output', id, {
|
||||
'bytes_b64': base64Encode(bytes),
|
||||
}),
|
||||
onDone: () => _onExit(pane),
|
||||
);
|
||||
_subs[id] = session.output.listen((bytes) => _emit('pane.output', id, {'bytes_b64': base64Encode(bytes)}), onDone: () => _onExit(pane));
|
||||
|
||||
return pane;
|
||||
}
|
||||
@@ -136,11 +117,6 @@ class PaneRegistry {
|
||||
}
|
||||
|
||||
void _emit(String kind, String id, Map<String, Object?> data) {
|
||||
events.emit(IpcEvent(
|
||||
subsystem: 'pane',
|
||||
kind: kind,
|
||||
timestamp: DateTime.now().toUtc(),
|
||||
data: {'id': id, ...data},
|
||||
));
|
||||
events.emit(IpcEvent(subsystem: 'pane', kind: kind, timestamp: DateTime.now().toUtc(), data: {'id': id, ...data}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
library;
|
||||
|
||||
class ViewPane {
|
||||
const ViewPane({
|
||||
required this.id,
|
||||
required this.slot,
|
||||
required this.title,
|
||||
required this.active,
|
||||
required this.visible,
|
||||
});
|
||||
const ViewPane({required this.id, required this.slot, required this.title, required this.active, required this.visible});
|
||||
|
||||
/// Stable contribution id (e.g. `claude`, `files`, `editor`) — the same id
|
||||
/// `pane.focus` would target.
|
||||
@@ -36,13 +30,5 @@ class ViewPane {
|
||||
/// Whether the tab's slot is currently visible (not collapsed/hidden).
|
||||
final bool visible;
|
||||
|
||||
Map<String, Object?> toJson() => {
|
||||
'id': id,
|
||||
'kind': 'view',
|
||||
'slot': slot,
|
||||
'title': title,
|
||||
'active': active,
|
||||
'visible': visible,
|
||||
'source': 'ui',
|
||||
};
|
||||
Map<String, Object?> toJson() => {'id': id, 'kind': 'view', 'slot': slot, 'title': title, 'active': active, 'visible': visible, 'source': 'ui'};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user