Commit 0596f520a31534153b8237c725482906c4e90ccb

Authored by 吴启风
1 parent 75e0dcd2

feat:课程首页按钮尺寸调整

lib/pages/module/course_module_page.dart
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:flutter_bloc/flutter_bloc.dart'; 2 import 'package:flutter_bloc/flutter_bloc.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 -import 'package:wow_english/common/extension/string_extension.dart';  
5 import 'package:wow_english/common/widgets/we_app_bar.dart'; 4 import 'package:wow_english/common/widgets/we_app_bar.dart';
6 import 'package:wow_english/models/course_module_entity.dart'; 5 import 'package:wow_english/models/course_module_entity.dart';
7 import 'package:wow_english/route/route.dart'; 6 import 'package:wow_english/route/route.dart';
lib/pages/unit/widget/home_tab_header_widget.dart
@@ -53,42 +53,6 @@ class HomeTabHeaderWidget extends StatelessWidget { @@ -53,42 +53,6 @@ class HomeTabHeaderWidget extends StatelessWidget {
53 ), 53 ),
54 ), 54 ),
55 ), 55 ),
56 - // GestureDetector(  
57 - // onTap: () => actionTap?.call(HeaderActionType.user),  
58 - // child: Container(  
59 - // decoration: BoxDecoration(  
60 - // border: Border.all(  
61 - // width: 1.0,  
62 - // color: const Color(0xFF140C10),  
63 - // ),  
64 - // borderRadius: BorderRadius.circular(21),  
65 - // ),  
66 - // child: CircleAvatar(  
67 - // radius: 21,  
68 - // backgroundImage: ImageUtil.getImageProviderOnDefault(UserUtil.getUser()?.avatarUrl),  
69 - // ),  
70 - // ),  
71 - // ),  
72 - // GestureDetector(  
73 - // onTap: () {  
74 - // if (actionTap != null) {  
75 - // actionTap!(HeaderActionType.user);  
76 - // }  
77 - // },  
78 - // child: Container(  
79 - // margin: const EdgeInsets.only(left: 7),  
80 - // padding: const EdgeInsets.all(4.0),  
81 - // decoration: BoxDecoration(  
82 - // color: Colors.white,  
83 - // borderRadius: BorderRadius.circular(2),  
84 - // border: Border.all(width: 1.0, color: const Color(0xFF140C10), style: BorderStyle.solid),  
85 - // ),  
86 - // child: Text(  
87 - // UserUtil.getUser()?.name ?? '未登录',  
88 - // style: TextStyle(color: const Color(0xFF333333), fontSize: 16.sp),  
89 - // ),  
90 - // ),  
91 - // ),  
92 20.horizontalSpace, 56 20.horizontalSpace,
93 Expanded( 57 Expanded(
94 child: Text( 58 child: Text(
@@ -97,36 +61,37 @@ class HomeTabHeaderWidget extends StatelessWidget { @@ -97,36 +61,37 @@ class HomeTabHeaderWidget extends StatelessWidget {
97 textAlign: TextAlign.left, 61 textAlign: TextAlign.left,
98 style: const TextStyle(color: Colors.white, fontSize: 30.0), 62 style: const TextStyle(color: Colors.white, fontSize: 30.0),
99 )), 63 )),
100 - // IconButton(  
101 - // onPressed: () {  
102 - // if (actionTap != null) {  
103 - // actionTap!(HeaderActionType.video);  
104 - // }  
105 - // },  
106 - // icon: Image.asset('video'.assetPng)),  
107 - IconButton(  
108 - onPressed: () { 64 + GestureDetector(
  65 + onTap: () {
109 if (actionTap != null) { 66 if (actionTap != null) {
110 actionTap!(HeaderActionType.phase); 67 actionTap!(HeaderActionType.phase);
111 - }  
112 - },  
113 - icon: Image.asset('home'.assetPng)),  
114 - IconButton(  
115 - onPressed: () {  
116 - if (actionTap != null) {  
117 - actionTap!(HeaderActionType.listen);  
118 - } 68 + };
119 }, 69 },
120 - icon: Image.asset('listen'.assetPng)), 70 + child: Image(image: AssetImage('home'.assetPng),
  71 + width: 36.0.w, height: 36.0.h, fit: BoxFit.contain)
  72 + ),
  73 + 8.horizontalSpace,
  74 + GestureDetector(
  75 + onTap: () {
  76 + if (actionTap != null) {
  77 + actionTap!(HeaderActionType.listen);
  78 + };
  79 + },
  80 + child: Image(image: AssetImage('listen'.assetPng),
  81 + width: 36.0.w, height: 36.0.h, fit: BoxFit.contain)
  82 + ),
  83 + 8.horizontalSpace,
121 Offstage( 84 Offstage(
122 offstage: AppConfigHelper.shouldHidePay(), 85 offstage: AppConfigHelper.shouldHidePay(),
123 - child: IconButton(  
124 - onPressed: () { 86 + child: GestureDetector(
  87 + onTap: () {
125 if (actionTap != null) { 88 if (actionTap != null) {
126 actionTap!(HeaderActionType.shop); 89 actionTap!(HeaderActionType.shop);
127 - } 90 + };
128 }, 91 },
129 - icon: Image.asset('shop'.assetPng)), 92 + child: Image(image: AssetImage('shop'.assetPng),
  93 + width: 36.0.w, height: 36.0.h, fit: BoxFit.contain)
  94 + ),
130 ), 95 ),
131 ScreenUtil().bottomBarHeight.horizontalSpace, 96 ScreenUtil().bottomBarHeight.horizontalSpace,
132 ], 97 ],