Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
|
- 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();
- }
- }
- }
|