enable method

Future<void> enable()

Switches it on, remembering the value it had unless an earlier switch-on is still unrestored.

Implementation

Future<void> enable() async {
  if (!pending) {
    final prior = await _settings(['get', 'system', 'show_touches']);
    _saved
      ..parent.createSync(recursive: true)
      ..writeAsStringSync(jsonEncode({'prior': prior}));
  }
  await _settings(['put', 'system', 'show_touches', '1']);
}