25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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();
- }
- }
- }
|