Commit 8d1f93b4c16608fc229d0f9ea3ea82f813872377
1 parent
48a1b645
feat:隐藏组件优化
Showing
3 changed files
with
7 additions
and
7 deletions
lib/pages/home/widgets/home_tab_header_widget.dart
... | ... | @@ -122,8 +122,8 @@ class HomeTabHeaderWidget extends StatelessWidget { |
122 | 122 | } |
123 | 123 | }, |
124 | 124 | icon: Image.asset('listen'.assetPng)), |
125 | - Visibility( | |
126 | - visible: !AppConfigHelper.shouldHidePay(), | |
125 | + Offstage( | |
126 | + offstage: AppConfigHelper.shouldHidePay(), | |
127 | 127 | child: IconButton( |
128 | 128 | onPressed: () { |
129 | 129 | if (actionTap != null) { | ... | ... |
lib/pages/moduleSelect/widgets/BaseHomeHeaderWidget.dart
... | ... | @@ -78,8 +78,8 @@ class BaseHomeHeaderWidget extends StatelessWidget { |
78 | 78 | textAlign: TextAlign.left, |
79 | 79 | style: TextStyle(color: Colors.white, fontSize: 30.0), |
80 | 80 | )), |
81 | - Visibility( | |
82 | - visible: !AppConfigHelper.shouldHidePay(), | |
81 | + Offstage( | |
82 | + offstage: AppConfigHelper.shouldHidePay(), | |
83 | 83 | child: Row(children: <Widget>[ |
84 | 84 | Image( |
85 | 85 | width: 20.0.w, | ... | ... |
lib/pages/user/user_page.dart
1 | 1 | import 'package:flutter/material.dart'; |
2 | 2 | import 'package:flutter_bloc/flutter_bloc.dart'; |
3 | 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
4 | +import 'package:wow_english/common/core/app_config_helper.dart'; | |
4 | 5 | import 'package:wow_english/common/core/app_consts.dart'; |
5 | 6 | import 'package:wow_english/common/core/assets_const.dart'; |
6 | 7 | import 'package:wow_english/common/core/user_util.dart'; |
... | ... | @@ -145,9 +146,8 @@ class _UserView extends StatelessWidget { |
145 | 146 | ), |
146 | 147 | ), |
147 | 148 | 12.verticalSpace, |
148 | - // todo 为了过审,把测试账号兑换功能下掉 | |
149 | 149 | Offstage( |
150 | - offstage: UserUtil.getUser()?.phoneNum == '17730280759', | |
150 | + offstage: AppConfigHelper.shouldHidePay(), | |
151 | 151 | child: OutlinedButton( |
152 | 152 | onPressed: () => pushNamed(AppRouteName.exLesson), |
153 | 153 | style: normalButtonStyle, |
... | ... | @@ -157,7 +157,7 @@ class _UserView extends StatelessWidget { |
157 | 157 | )), |
158 | 158 | ), |
159 | 159 | Offstage( |
160 | - offstage: UserUtil.getUser()?.phoneNum == '17730280759', | |
160 | + offstage: AppConfigHelper.shouldHidePay(), | |
161 | 161 | child: 12.verticalSpace, |
162 | 162 | ), |
163 | 163 | OutlinedButton( | ... | ... |