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:
@@ -19,13 +19,7 @@ class LayoutArrangement extends ChangeNotifier {
|
||||
_focusModeSnapshot = null;
|
||||
_focusModeSlot = null;
|
||||
for (final slot in preset.slots) {
|
||||
_state[slot.slot] = _SlotState(
|
||||
position: slot.position,
|
||||
size: slot.defaultSize,
|
||||
minSize: slot.minSize,
|
||||
maxSize: slot.maxSize,
|
||||
visible: slot.visible,
|
||||
);
|
||||
_state[slot.slot] = _SlotState(position: slot.position, size: slot.defaultSize, minSize: slot.minSize, maxSize: slot.maxSize, visible: slot.visible);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -131,26 +125,15 @@ class LayoutArrangement extends ChangeNotifier {
|
||||
|
||||
void registerSlotsInto(PanelRegistry registry, LayoutPresetContribution preset) {
|
||||
for (final slot in preset.slots) {
|
||||
registry.registerSlot(SlotDefinition(
|
||||
id: slot.slot,
|
||||
position: slot.position,
|
||||
defaultSize: slot.defaultSize,
|
||||
minSize: slot.minSize,
|
||||
maxSize: slot.maxSize,
|
||||
));
|
||||
registry.registerSlot(
|
||||
SlotDefinition(id: slot.slot, position: slot.position, defaultSize: slot.defaultSize, minSize: slot.minSize, maxSize: slot.maxSize),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class _SlotState {
|
||||
const _SlotState({
|
||||
required this.position,
|
||||
this.size,
|
||||
this.minSize,
|
||||
this.maxSize,
|
||||
this.visible = true,
|
||||
this.collapsed = false,
|
||||
});
|
||||
const _SlotState({required this.position, this.size, this.minSize, this.maxSize, this.visible = true, this.collapsed = false});
|
||||
|
||||
final SlotPosition position;
|
||||
final double? size;
|
||||
@@ -159,14 +142,7 @@ class _SlotState {
|
||||
final bool visible;
|
||||
final bool collapsed;
|
||||
|
||||
_SlotState copyWith({
|
||||
SlotPosition? position,
|
||||
double? size,
|
||||
double? minSize,
|
||||
double? maxSize,
|
||||
bool? visible,
|
||||
bool? collapsed,
|
||||
}) {
|
||||
_SlotState copyWith({SlotPosition? position, double? size, double? minSize, double? maxSize, bool? visible, bool? collapsed}) {
|
||||
return _SlotState(
|
||||
position: position ?? this.position,
|
||||
size: size ?? this.size,
|
||||
|
||||
@@ -12,13 +12,7 @@ import 'package:flutter/widgets.dart';
|
||||
/// coarse step). Exposes a `slider` Semantics node so screen readers
|
||||
/// announce the current width.
|
||||
class DragResizeHandle extends StatefulWidget {
|
||||
const DragResizeHandle({
|
||||
super.key,
|
||||
required this.arrangement,
|
||||
required this.slot,
|
||||
required this.axis,
|
||||
this.thickness = DragResizeHandle.defaultThickness,
|
||||
});
|
||||
const DragResizeHandle({super.key, required this.arrangement, required this.slot, required this.axis, this.thickness = DragResizeHandle.defaultThickness});
|
||||
|
||||
final LayoutArrangement arrangement;
|
||||
final SlotId slot;
|
||||
@@ -155,11 +149,7 @@ class _BumpIntent extends Intent {
|
||||
/// delta = right/down. Context-panel sits on the right edge of the
|
||||
/// app, so we flip the sign there — right-arrow should *shrink* it,
|
||||
/// matching how dragging the left-edge handle rightward works.
|
||||
double bumpedSlotSize({
|
||||
required SlotId slot,
|
||||
required double current,
|
||||
required double rawDelta,
|
||||
}) {
|
||||
double bumpedSlotSize({required SlotId slot, required double current, required double rawDelta}) {
|
||||
final delta = slot == Slots.contextPanel ? -rawDelta : rawDelta;
|
||||
return current + delta;
|
||||
}
|
||||
|
||||
@@ -11,41 +11,13 @@ import 'package:clide/kernel/src/panels/slot_id.dart';
|
||||
/// context 420 (drag 220–420)
|
||||
/// statusbar 26 (fixed height strip)
|
||||
LayoutPresetContribution classicPreset() => const LayoutPresetContribution(
|
||||
id: 'builtin.default-layout.classic',
|
||||
displayName: 'Classic',
|
||||
slots: [
|
||||
LayoutSlot(
|
||||
slot: Slots.sidebar,
|
||||
position: SlotPosition.left,
|
||||
defaultSize: 400,
|
||||
minSize: 180,
|
||||
maxSize: 400,
|
||||
),
|
||||
LayoutSlot(
|
||||
slot: Slots.workspace,
|
||||
position: SlotPosition.center,
|
||||
),
|
||||
LayoutSlot(
|
||||
slot: Slots.contextPanel,
|
||||
position: SlotPosition.right,
|
||||
defaultSize: 420,
|
||||
minSize: 220,
|
||||
maxSize: 1000,
|
||||
),
|
||||
LayoutSlot(
|
||||
slot: Slots.dock,
|
||||
position: SlotPosition.bottom,
|
||||
defaultSize: 200,
|
||||
minSize: 100,
|
||||
maxSize: 600,
|
||||
visible: false,
|
||||
),
|
||||
LayoutSlot(
|
||||
slot: Slots.statusbar,
|
||||
position: SlotPosition.bottom,
|
||||
defaultSize: 26,
|
||||
minSize: 26,
|
||||
maxSize: 26,
|
||||
),
|
||||
],
|
||||
);
|
||||
id: 'builtin.default-layout.classic',
|
||||
displayName: 'Classic',
|
||||
slots: [
|
||||
LayoutSlot(slot: Slots.sidebar, position: SlotPosition.left, defaultSize: 400, minSize: 180, maxSize: 400),
|
||||
LayoutSlot(slot: Slots.workspace, position: SlotPosition.center),
|
||||
LayoutSlot(slot: Slots.contextPanel, position: SlotPosition.right, defaultSize: 420, minSize: 220, maxSize: 1000),
|
||||
LayoutSlot(slot: Slots.dock, position: SlotPosition.bottom, defaultSize: 200, minSize: 100, maxSize: 600, visible: false),
|
||||
LayoutSlot(slot: Slots.statusbar, position: SlotPosition.bottom, defaultSize: 26, minSize: 26, maxSize: 26),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -4,13 +4,7 @@ import 'package:flutter/foundation.dart';
|
||||
|
||||
@immutable
|
||||
class SlotDefinition {
|
||||
const SlotDefinition({
|
||||
required this.id,
|
||||
required this.position,
|
||||
this.defaultSize,
|
||||
this.minSize,
|
||||
this.maxSize,
|
||||
});
|
||||
const SlotDefinition({required this.id, required this.position, this.defaultSize, this.minSize, this.maxSize});
|
||||
|
||||
final SlotId id;
|
||||
final SlotPosition position;
|
||||
|
||||
@@ -20,13 +20,7 @@ List<ViewPane> snapshotViewPanes(PanelRegistry panels, LayoutArrangement arrange
|
||||
final activeId = panels.activeTabIn(slot.id);
|
||||
final visible = arrangement.isVisible(slot.id);
|
||||
for (final tab in panels.tabsFor(slot.id)) {
|
||||
out.add(ViewPane(
|
||||
id: tab.id,
|
||||
slot: slot.id.value,
|
||||
title: tab.title,
|
||||
active: tab.id == activeId,
|
||||
visible: visible,
|
||||
));
|
||||
out.add(ViewPane(id: tab.id, slot: slot.id.value, title: tab.title, active: tab.id == activeId, visible: visible));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
|
||||
Reference in New Issue
Block a user