Blame view

lib/pages/practice/widgets/practice_header_widget.dart 1.45 KB
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
1
2
3
4
5
  import 'package:flutter/material.dart';
  import 'package:flutter_screenutil/flutter_screenutil.dart';
  import 'package:wow_english/common/extension/string_extension.dart';
  
  class PracticeHeaderWidget extends StatelessWidget {
5b923179   吴启风   feat:导航栏优化
6
    const PracticeHeaderWidget({super.key, required this.onTap, this.title = ''});
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
7
8
9
10
11
12
13
14
  
    final Function() onTap;
  
    final String title;
  
    @override
    Widget build(BuildContext context) {
      return Container(
82c8633c   biao   音频添加 页面优化
15
          color: Colors.transparent,
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
16
          height: kToolbarHeight + 3.h,
5b923179   吴启风   feat:导航栏优化
17
          child: AppBar(
82c8633c   biao   音频添加 页面优化
18
            backgroundColor: Colors.transparent,
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
19
20
            leading: GestureDetector(
              child: Image.asset(
5b923179   吴启风   feat:导航栏优化
21
                'back_around'.assetPng,
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
22
23
                width: 40.w,
                height: 40.h,
5b923179   吴启风   feat:导航栏优化
24
              ),
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
25
              onTap: () => {onTap()},
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
26
            ),
5b923179   吴启风   feat:导航栏优化
27
28
            centerTitle: true,
            title: Container(
82c8633c   biao   音频添加 页面优化
29
              height: 20.h,
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
30
31
32
33
34
35
36
37
38
              width: 100.w, // 容器宽度
              // padding: EdgeInsets.symmetric(horizontal: 27.w, vertical: 10.h),
              alignment: Alignment.center,
              decoration: BoxDecoration(
                color: const Color(0xFF00B6F1),
                borderRadius: BorderRadius.circular(20.r),
                border: Border.all(
                  width: 1.0,
                  color: const Color(0xFF333333),
5b923179   吴启风   feat:导航栏优化
39
                ),
f29687b2   biao   修复iOS偶现按钮消失问题,练习页...
40
41
42
43
44
45
              ),
              child: Text(
                title,
                style: TextStyle(fontSize: 15.sp, color: Colors.white),
              ),
            ),
5b923179   吴启风   feat:导航栏优化
46
          ));
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
47
    }
5b923179   吴启风   feat:导航栏优化
48
  }