Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
- import 'package:flutter/material.dart';
-
- class KeyboardIndexProvider with ChangeNotifier {
- int curKeyboardIndex = -1;
-
- bool soundPlayMode = false;
-
- bool readOnly = true;
-
- init(bool bl) {
- soundPlayMode = bl;
- }
-
- changeSoundPlayMode(bool playmode) {
- soundPlayMode = playmode;
- notifyListeners();
- }
-
- changeReadOnlyKey(bool emoji) {
- readOnly = emoji;
- notifyListeners();
- }
-
- changeSelectIndex(int newIndex) {
- if (newIndex != curKeyboardIndex) {
- curKeyboardIndex = newIndex;
- if (newIndex != 0) {
- readOnly = true;
- }else{
- readOnly = false;
- }
- print('设置当前键盘 $newIndex');
- notifyListeners();
- }
- }
- }
|