Blame view

lib/pages/practice/widgets/practice_header_widget.dart 1.37 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(
5b923179   吴启风   feat:导航栏优化
15
16
17
18
19
20
21
22
23
24
25
26
          color: Colors.white,
          height: kToolbarHeight,
          child: AppBar(
            leading: IconButton(
              icon: Image.asset(
                'back_around'.assetPng,
                width: 40,
                height: 40,
              ),
              onPressed: () {
                onTap();
              },
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
27
            ),
5b923179   吴启风   feat:导航栏优化
28
29
            centerTitle: true,
            title: Container(
98670c0d   吴启风   feat:练习顶部页码居中显示
30
                height: 40.h,
5b923179   吴启风   feat:导航栏优化
31
                padding: EdgeInsets.symmetric(horizontal: 27.w, vertical: 6.h),
98670c0d   吴启风   feat:练习顶部页码居中显示
32
33
34
35
36
37
38
                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和部分逻辑
39
                ),
5b923179   吴启风   feat:导航栏优化
40
                child: Text(
98670c0d   吴启风   feat:练习顶部页码居中显示
41
                    title,
5b923179   吴启风   feat:导航栏优化
42
                    style: TextStyle(fontSize: 15.sp, color: Colors.white),
98670c0d   吴启风   feat:练习顶部页码居中显示
43
                  ),
5b923179   吴启风   feat:导航栏优化
44
45
                ),
          ));
624214d0   liangchengyou   feat:看题选字/选图UI和部分逻辑
46
    }
5b923179   吴启风   feat:导航栏优化
47
  }