import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:keyboard/base/base_page.dart';
import '../../../router/app_pages.dart';
import '../../../widget/platform_util.dart';
import 'android/keyboard_tutorial_video_android_view.dart';
import 'ios/keyboard_tutorial_video_ios_view.dart';
import 'keyboard_tutorial_video_controller.dart';

/// 键盘使用教程-视频引导页
class KeyboardTutorialVideoPage
    extends BasePage<KeyboardTutorialVideoController> {
  const KeyboardTutorialVideoPage({super.key});

  static void start() {
    Get.toNamed(RoutePath.keyboardTutorialVideo);
  }

  @override
  bool immersive() {
    // 开启沉浸式
    return true;
  }

  @override
  backgroundColor() {
    return Colors.transparent;
  }

  @override
  Widget buildBody(BuildContext context) {
    if (PlatformUtil.isIOS) {
      return KeyboardTutorialVideoIosView();
    } else {
      return KeyboardTutorialVideoAndroidView();
    }
  }
}
