Skip to content

Commit 7169962

Browse files
committed
update
1 parent 681e1bc commit 7169962

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

packages/devtools_app/lib/src/screens/accessibility/accessibility_controller.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ class AccessibilityController extends DevToolsScreenController
2727
ValueListenable<bool> get autoAuditEnabled => _autoAuditEnabled;
2828
final _autoAuditEnabled = ValueNotifier<bool>(false);
2929

30-
Future<void> setTextScaleFactor(double factor) async {
30+
void setTextScaleFactor(double factor) {
3131
_textScaleFactor.value = factor;
3232
// TODO(chunhtai): set text scale factor on device.
3333
}
3434

35-
Future<void> toggleHighContrast(bool enable) async {
35+
void toggleHighContrast(bool enable) {
3636
_highContrastEnabled.value = enable;
3737
// TODO(chunhtai): set high contrast on device.
3838
}
3939

40-
Future<void> toggleAutoAudit(bool enable) async {
40+
void toggleAutoAudit(bool enable) {
4141
_autoAuditEnabled.value = enable;
4242
// TODO(chunhtai): auto run audit when enabled.
4343
}
4444

45-
Future<void> runAudit() async {
45+
void runAudit() {
4646
// TODO(chunhtai): run accessibility audit.
4747
}
4848
}

packages/devtools_app/lib/src/screens/accessibility/accessibility_controls.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class _SystemSimulationControls extends StatelessWidget {
5353
return SwitchListTile(
5454
title: const Text('High Contrast Mode'),
5555
value: enabled,
56-
onChanged: (value) =>
57-
unawaited(controller.toggleHighContrast(value)),
56+
onChanged: (value) => controller.toggleHighContrast(value),
5857
);
5958
},
6059
),
@@ -72,8 +71,7 @@ class _SystemSimulationControls extends StatelessWidget {
7271
max: 3.0,
7372
divisions: 25,
7473
label: factor.toStringAsFixed(1),
75-
onChanged: (value) =>
76-
unawaited(controller.setTextScaleFactor(value)),
74+
onChanged: (value) => controller.setTextScaleFactor(value),
7775
),
7876
],
7977
);
@@ -100,7 +98,7 @@ class _AuditControls extends StatelessWidget {
10098
child: ElevatedButton.icon(
10199
icon: const Icon(Icons.play_arrow),
102100
label: const Text('Run Audit'),
103-
onPressed: () => unawaited(controller.runAudit()),
101+
onPressed: () => controller.runAudit(),
104102
),
105103
),
106104
const SizedBox(height: denseSpacing),
@@ -110,8 +108,7 @@ class _AuditControls extends StatelessWidget {
110108
return SwitchListTile(
111109
title: const Text('Auto-run Audit'),
112110
value: enabled,
113-
onChanged: (value) =>
114-
unawaited(controller.toggleAutoAudit(value)),
111+
onChanged: (value) => controller.toggleAutoAudit(value),
115112
);
116113
},
117114
),

0 commit comments

Comments
 (0)