opt.: use ValueBuilder

This commit is contained in:
lollipopkit
2023-06-05 16:39:54 +08:00
parent 88cc6542a9
commit d66e570e01
13 changed files with 264 additions and 191 deletions

View File

@@ -6,8 +6,22 @@ import 'package:xterm/core.dart';
class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
VirtualKeyboard();
bool ctrl = false;
bool alt = false;
bool _ctrl = false;
bool get ctrl => _ctrl;
set ctrl(bool value) {
if (value != _ctrl) {
_ctrl = value;
notifyListeners();
}
}
bool _alt = false;
bool get alt => _alt;
set alt(bool value) {
if (value != _alt) {
_alt = value;
notifyListeners();
}
}
final _setting = locator<SettingStore>();