Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- 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();
- }
- }
- }
|