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 +10,21 @@ import '../../helpers/kernel_fixture.dart';
|
||||
import '../../helpers/widget_harness.dart';
|
||||
|
||||
ThemeDefinition _def(String name) => ThemeDefinition(
|
||||
name: name,
|
||||
displayName: name,
|
||||
dark: true,
|
||||
palette: Palette(const {
|
||||
'primary': Color(0xFF00A3D2),
|
||||
'accent': Color(0xFFFA5F8B),
|
||||
'background': Color(0xFF21262F),
|
||||
'surface': Color(0xFF393E48),
|
||||
'panel': Color(0xFF292E38),
|
||||
'foreground': Color(0xFFE2E8F5),
|
||||
'success': Color(0xFF00AB9A),
|
||||
'warning': Color(0xFFD08447),
|
||||
'error': Color(0xFFF06C6F),
|
||||
}),
|
||||
);
|
||||
name: name,
|
||||
displayName: name,
|
||||
dark: true,
|
||||
palette: Palette(const {
|
||||
'primary': Color(0xFF00A3D2),
|
||||
'accent': Color(0xFFFA5F8B),
|
||||
'background': Color(0xFF21262F),
|
||||
'surface': Color(0xFF393E48),
|
||||
'panel': Color(0xFF292E38),
|
||||
'foreground': Color(0xFFE2E8F5),
|
||||
'success': Color(0xFF00AB9A),
|
||||
'warning': Color(0xFFD08447),
|
||||
'error': Color(0xFFF06C6F),
|
||||
}),
|
||||
);
|
||||
|
||||
void main() {
|
||||
group('ThemePickerExtension', () {
|
||||
@@ -59,22 +59,11 @@ void main() {
|
||||
test('default binding ctrl+k is registered', () async {
|
||||
f.services.extensions.register(ThemePickerExtension());
|
||||
await f.services.extensions.activateAll();
|
||||
expect(
|
||||
f.services.keybindings.commandFor(Keybinding.parse('ctrl+k')),
|
||||
'theme.pick',
|
||||
);
|
||||
expect(f.services.keybindings.commandFor(Keybinding.parse('ctrl+k')), 'theme.pick');
|
||||
});
|
||||
|
||||
testWidgets('settings modal lists base themes + a High contrast toggle', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
harness(
|
||||
f,
|
||||
SettingsView(
|
||||
controller: f.services.theme,
|
||||
onDismiss: ([_]) {},
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(harness(f, SettingsView(controller: f.services.theme, onDismiss: ([_]) {})));
|
||||
// Each row renders both displayName and name; displayName==name in
|
||||
// test fixtures so the label appears twice per row.
|
||||
expect(find.text('summer-night'), findsNWidgets(2));
|
||||
@@ -88,15 +77,7 @@ void main() {
|
||||
|
||||
testWidgets('tapping a row calls controller.select + onDismiss', (tester) async {
|
||||
String? dismissed;
|
||||
await tester.pumpWidget(
|
||||
harness(
|
||||
f,
|
||||
SettingsView(
|
||||
controller: f.services.theme,
|
||||
onDismiss: ([v]) => dismissed = v,
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(harness(f, SettingsView(controller: f.services.theme, onDismiss: ([v]) => dismissed = v)));
|
||||
await tester.tap(find.bySemanticsLabel('forest'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(f.services.theme.currentName, 'forest');
|
||||
@@ -105,15 +86,7 @@ void main() {
|
||||
|
||||
testWidgets('Cancel button dismisses without selecting', (tester) async {
|
||||
String? dismissed = 'not-called';
|
||||
await tester.pumpWidget(
|
||||
harness(
|
||||
f,
|
||||
SettingsView(
|
||||
controller: f.services.theme,
|
||||
onDismiss: ([v]) => dismissed = v,
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(harness(f, SettingsView(controller: f.services.theme, onDismiss: ([v]) => dismissed = v)));
|
||||
await tester.tap(find.bySemanticsLabel('Cancel'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(dismissed, isNull);
|
||||
@@ -126,12 +99,7 @@ void main() {
|
||||
late KernelFixture hf;
|
||||
await tester.runAsync(() async => hf = await KernelFixture.create(bundledThemes: [_def('paper'), _def('paper-hc')]));
|
||||
addTearDown(hf.dispose);
|
||||
await tester.pumpWidget(
|
||||
harness(
|
||||
hf,
|
||||
SettingsView(controller: hf.services.theme, onDismiss: ([_]) {}),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(harness(hf, SettingsView(controller: hf.services.theme, onDismiss: ([_]) {})));
|
||||
// Base theme listed once (displayName + muted name); the -hc sibling is
|
||||
// folded into the toggle, not shown as a row.
|
||||
expect(find.text('paper'), findsNWidgets(2));
|
||||
|
||||
Reference in New Issue
Block a user