Blame view

lib/pages/practice/widgets/practice_header_widget.dart 1.46 KB
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  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 {
    const PracticeHeaderWidget({super.key, required this.onTap,this.title = ''});
  
    final Function() onTap;
  
    final String title;
  
    @override
    Widget build(BuildContext context) {
      return Container(
        color: Colors.white,
        height: 60.h,
98670c0d   吴启风   feat:练习顶部页码居中显示
17
18
19
20
21
22
        child: AppBar(
          leading: IconButton(
            icon: Image.asset(
              'back_around'.assetPng,
              width: 40,
              height: 40,
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
23
            ),
98670c0d   吴启风   feat:练习顶部页码居中显示
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
            onPressed: () {
              onTap();
            },
          ),
          centerTitle: true,
          title: IntrinsicWidth(
            child: Container(
                height: 40.h,
                padding: EdgeInsets.symmetric(horizontal: 27.w),
                decoration: BoxDecoration(
                  color: const Color(0xFF00B6F1),
                  borderRadius: BorderRadius.circular(20.r),
                  border: Border.all(
                    width: 1.0,
                    color: const Color(0xFF333333),
                  ),
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
40
                ),
98670c0d   吴启风   feat:练习顶部页码居中显示
41
42
43
44
45
46
47
48
49
                child: Center(
                  child: Text(
                    title,
                    style: TextStyle(
                        fontSize: 15.sp,
                        color: Colors.white
                    ),
                  ),
                )
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
50
            ),
98670c0d   吴启风   feat:练习顶部页码居中显示
51
52
          )
        )
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
53
54
55
      );
    }
  }