Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
chunhtai committed Mar 6, 2026
commit c58d36a507f82637c1734fd98532675ae0327f68
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ class AccessibilityController extends DevToolsScreenController
ValueListenable<bool> get autoAuditEnabled => _autoAuditEnabled;
final _autoAuditEnabled = ValueNotifier<bool>(false);

Future<void> setTextScaleFactor(double factor) async {
void setTextScaleFactor(double factor) {
_textScaleFactor.value = factor;
// TODO(chunhtai): set text scale factor on device.
}

Future<void> toggleHighContrast(bool enable) async {
void toggleHighContrast(bool enable) {
_highContrastEnabled.value = enable;
// TODO(chunhtai): set high contrast on device.
}

Future<void> toggleAutoAudit(bool enable) async {
void toggleAutoAudit(bool enable) {
_autoAuditEnabled.value = enable;
// TODO(chunhtai): auto run audit when enabled.
}

Future<void> runAudit() async {
void runAudit() {
// TODO(chunhtai): run accessibility audit.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ class _SystemSimulationControls extends StatelessWidget {
return SwitchListTile(
title: const Text('High Contrast Mode'),
value: enabled,
onChanged: (value) =>
unawaited(controller.toggleHighContrast(value)),
onChanged: (value) => controller.toggleHighContrast(value),
);
},
),
Expand All @@ -72,8 +71,7 @@ class _SystemSimulationControls extends StatelessWidget {
max: 3.0,
divisions: 25,
label: factor.toStringAsFixed(1),
onChanged: (value) =>
unawaited(controller.setTextScaleFactor(value)),
onChanged: (value) => controller.setTextScaleFactor(value),
),
],
);
Expand All @@ -100,7 +98,7 @@ class _AuditControls extends StatelessWidget {
child: ElevatedButton.icon(
icon: const Icon(Icons.play_arrow),
label: const Text('Run Audit'),
onPressed: () => unawaited(controller.runAudit()),
onPressed: () => controller.runAudit(),
),
),
const SizedBox(height: denseSpacing),
Expand All @@ -110,8 +108,7 @@ class _AuditControls extends StatelessWidget {
return SwitchListTile(
title: const Text('Auto-run Audit'),
value: enabled,
onChanged: (value) =>
unawaited(controller.toggleAutoAudit(value)),
onChanged: (value) => controller.toggleAutoAudit(value),
);
},
),
Expand Down