import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../../resource/assets.gen.dart';
import '../../../utils/status_bar_util.dart';

/// 键盘教程页的顶部组件
class TutorialHeaderWidget extends StatelessWidget {
  const TutorialHeaderWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      height: 298.h,
      child: Stack(
        alignment: Alignment.center,
        children: [
          // 头像
          Positioned(
            top: 37.5.h,
            bottom: 86.5.h,
            child: Assets.images.iconKeyboardTutorialHeader.image(
              height: 174.h,
              fit: BoxFit.cover,
            ),
          ),
          // 蒙版
          Assets.images.bgKeyboardTutorialHeaderMask.image(
            width: double.infinity,
            height: double.infinity,
          ),
          // 提示语
          Positioned(
            top: 70.h + StatusBarUtil.getStatusBarHeight(context),
            child: Assets.images.iconKeyboardTutorialHeaderSlogan.image(
              width: 200.w,
              height: 73.h,
            ),
          ),
        ],
      ),
    );
  }
}