Commit 5b92317969851df3caac4bc93743d48cc632e2b0

Authored by 吴启风
1 parent 5b87e560

feat:导航栏优化

lib/pages/practice/widgets/practice_header_widget.dart
... ... @@ -3,7 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
3 3 import 'package:wow_english/common/extension/string_extension.dart';
4 4  
5 5 class PracticeHeaderWidget extends StatelessWidget {
6   - const PracticeHeaderWidget({super.key, required this.onTap,this.title = ''});
  6 + const PracticeHeaderWidget({super.key, required this.onTap, this.title = ''});
7 7  
8 8 final Function() onTap;
9 9  
... ... @@ -12,24 +12,23 @@ class PracticeHeaderWidget extends StatelessWidget {
12 12 @override
13 13 Widget build(BuildContext context) {
14 14 return Container(
15   - color: Colors.white,
16   - height: 60.h,
17   - child: AppBar(
18   - leading: IconButton(
19   - icon: Image.asset(
20   - 'back_around'.assetPng,
21   - width: 40,
22   - height: 40,
  15 + color: Colors.white,
  16 + height: kToolbarHeight,
  17 + child: AppBar(
  18 + leading: IconButton(
  19 + icon: Image.asset(
  20 + 'back_around'.assetPng,
  21 + width: 40,
  22 + height: 40,
  23 + ),
  24 + onPressed: () {
  25 + onTap();
  26 + },
23 27 ),
24   - onPressed: () {
25   - onTap();
26   - },
27   - ),
28   - centerTitle: true,
29   - title: IntrinsicWidth(
30   - child: Container(
  28 + centerTitle: true,
  29 + title: Container(
31 30 height: 40.h,
32   - padding: EdgeInsets.symmetric(horizontal: 27.w),
  31 + padding: EdgeInsets.symmetric(horizontal: 27.w, vertical: 6.h),
33 32 decoration: BoxDecoration(
34 33 color: const Color(0xFF00B6F1),
35 34 borderRadius: BorderRadius.circular(20.r),
... ... @@ -38,18 +37,11 @@ class PracticeHeaderWidget extends StatelessWidget {
38 37 color: const Color(0xFF333333),
39 38 ),
40 39 ),
41   - child: Center(
42   - child: Text(
  40 + child: Text(
43 41 title,
44   - style: TextStyle(
45   - fontSize: 15.sp,
46   - color: Colors.white
47   - ),
  42 + style: TextStyle(fontSize: 15.sp, color: Colors.white),
48 43 ),
49   - )
50   - ),
51   - )
52   - )
53   - );
  44 + ),
  45 + ));
54 46 }
55   -}
56 47 \ No newline at end of file
  48 +}
... ...
lib/pages/reading/reading_page.dart
... ... @@ -77,7 +77,7 @@ class _ReadingPage extends StatelessWidget {
77 77 }),
78 78 Container(
79 79 color: Colors.transparent,
80   - height: 60.h,
  80 + height: kToolbarHeight,
81 81 child: Row(
82 82 mainAxisAlignment: MainAxisAlignment.spaceBetween,
83 83 children: [
... ... @@ -96,8 +96,8 @@ class _ReadingPage extends StatelessWidget {
96 96 },
97 97 icon: Image.asset(
98 98 'back_around'.assetPng,
99   - width: 40,
100   - height: 40,
  99 + width: 40.w,
  100 + height: 40.h,
101 101 )),
102 102 ),
103 103 Container(
... ...
lib/pages/reading/widgets/reading_header_widget.dart
... ... @@ -14,7 +14,7 @@ class ReadingHeaderWidget extends StatelessWidget {
14 14 Widget build(BuildContext context) {
15 15 return Container(
16 16 color: Colors.white,
17   - height: 60.h,
  17 + height: kToolbarHeight,
18 18 child: Row(
19 19 mainAxisAlignment: MainAxisAlignment.spaceBetween,
20 20 children: [
... ... @@ -26,8 +26,8 @@ class ReadingHeaderWidget extends StatelessWidget {
26 26 },
27 27 icon: Image.asset(
28 28 'back_around'.assetPng,
29   - width: 40,
30   - height: 40,
  29 + width: 40.w,
  30 + height: 40.h,
31 31 )),
32 32 ),
33 33 Container(
... ...
lib/pages/video/lookvideo/widgets/video_opera_widget.dart
... ... @@ -74,8 +74,8 @@ class _VideoOperaWidgetState extends State<VideoOperaWidget> {
74 74 },
75 75 child: Image.asset(
76 76 'back_around'.assetPng,
77   - height: 40,
78   - width: 40
  77 + height: 40.h,
  78 + width: 40.w
79 79 ),
80 80 ),
81 81 18.horizontalSpace,
... ...