|
|
@@ -18,7 +18,13 @@ import 'keyboard_tutorial_android_view_controller.dart';
|
|
|
/// 键盘教程页-Android平台
|
|
|
class KeyboardTutorialAndroidView
|
|
|
extends BaseView<KeyboardTutorialAndroidViewController> {
|
|
|
- const KeyboardTutorialAndroidView({super.key});
|
|
|
+ KeyboardTutorialAndroidView({
|
|
|
+ super.key,
|
|
|
+ required bool checkTutorialComplete,
|
|
|
+ }) {
|
|
|
+ // 更新值
|
|
|
+ controller.setCheckTutorialComplete(checkTutorialComplete);
|
|
|
+ }
|
|
|
|
|
|
@override
|
|
|
Color backgroundColor() {
|
|
|
@@ -29,13 +35,15 @@ class KeyboardTutorialAndroidView
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
return AppLifecycleWidget(
|
|
|
onAppLifecycleCallback: (isForeground) async {
|
|
|
- // 步骤都做完了,则跳转去键盘引导页
|
|
|
- if (await controller.checkHasComplete()) {
|
|
|
- return;
|
|
|
- }
|
|
|
- // 未完成,则每次切换到前台时,重新检查设置,更新按钮状态
|
|
|
if (isForeground) {
|
|
|
+ // 未完成,则每次切换到前台时,重新检查设置,更新按钮状态
|
|
|
controller.checkSetting();
|
|
|
+ // 步骤都做完了,则跳转去键盘引导页
|
|
|
+ if (controller.checkTutorialComplete.value) {
|
|
|
+ if (await controller.checkHasComplete()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
child: Stack(
|
|
|
@@ -128,9 +136,11 @@ class KeyboardTutorialAndroidView
|
|
|
enable: !controller.isKeyboardEnable.value,
|
|
|
StringName.tutorialEnableKeyboardStep,
|
|
|
onPressed: () {
|
|
|
- // 已启用,不响应点击
|
|
|
- if (controller.isKeyboardEnable.value) {
|
|
|
- return;
|
|
|
+ if (controller.checkTutorialComplete.value) {
|
|
|
+ // 已启用,不响应点击
|
|
|
+ if (controller.isKeyboardEnable.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
// 去启用键盘
|
|
|
controller.goEnableKeyboard();
|
|
|
@@ -153,9 +163,11 @@ class KeyboardTutorialAndroidView
|
|
|
enable: isHighlightBtn,
|
|
|
StringName.tutorialEnableFloatingBallStep,
|
|
|
onPressed: () {
|
|
|
- // 已获取,不响应点击
|
|
|
- if (controller.isFloatingWindowEnable.value) {
|
|
|
- return;
|
|
|
+ if (controller.checkTutorialComplete.value) {
|
|
|
+ // 已获取,不响应点击
|
|
|
+ if (controller.isFloatingWindowEnable.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
// 去启用悬浮球
|
|
|
controller.jumpFloatingWindowSetting();
|