Browse Source

钱包样式更改

ff_new
w-R 3 years ago
parent
commit
c7a2dbbed3
  1. 184
      lib/mine/mine_view/wallet_coupon_view.dart

184
lib/mine/mine_view/wallet_coupon_view.dart

@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
@ -30,11 +31,8 @@ class _WalletCoupon extends State<WalletCoupon> {
), ),
], ],
), ),
child: Row( child: (Theme.of(context).platform == TargetPlatform.android)
children: [ ? GestureDetector(
Expanded(
flex: 1,
child: GestureDetector(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null || if (value.getString("token") == null ||
@ -46,8 +44,6 @@ class _WalletCoupon extends State<WalletCoupon> {
}); });
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
"assets/image/icon_mine_invoice_assistant.png", "assets/image/icon_mine_invoice_assistant.png",
@ -58,70 +54,128 @@ class _WalletCoupon extends State<WalletCoupon> {
width: 12.w, width: 12.w,
), ),
Expanded( Expanded(
child: Text( child: Column(
S.of(context).lingquanzhongxin, crossAxisAlignment: CrossAxisAlignment.start,
overflow: TextOverflow.ellipsis, children: [
style: TextStyle( Text(
fontWeight: MyFontWeight.medium, S.of(context).lingquanzhongxin,
fontSize: 16.sp, overflow: TextOverflow.ellipsis,
color: Color(0xFF353535), style: TextStyle(
), fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Color(0xFF353535),
),
),
SizedBox(
height: 3,
),
Text(
"联盟下单享不停、海量优惠券等你来领!",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
color: Color(0xFF7B7B7B),
),
),
],
), ),
flex: 1, )
),
], ],
), ))
), : Row(
), children: [
Container( Expanded(
width: 2.w, flex: 1,
height: 32.h, child: GestureDetector(
margin: EdgeInsets.only(left: 20.w, right: 20.w), onTap: () {
color: Color(0xFFF7F7F7), SharedPreferences.getInstance().then((value) {
), if (value.getString("token") == null ||
Expanded( value.getString("token") == "") {
flex: 1, LoginTipsDialog().show(context);
child: GestureDetector( return;
onTap: () { }
SharedPreferences.getInstance().then((value) { Navigator.of(context)
if (value.getString("token") == null || .pushNamed('/router/roll_center_page');
value.getString("token") == "") { });
LoginTipsDialog().show(context); },
return; child: Row(
} mainAxisAlignment: MainAxisAlignment.center,
Navigator.of(context).pushNamed('/router/mine_wallet'); crossAxisAlignment: CrossAxisAlignment.center,
}); children: [
}, Image.asset(
child: Row( "assets/image/icon_mine_invoice_assistant.png",
mainAxisAlignment: MainAxisAlignment.center, width: 48.h,
crossAxisAlignment: CrossAxisAlignment.center, height: 48.h,
children: [ ),
Image.asset( SizedBox(
"assets/image/icon_mine_wallet.png", width: 12.w,
width: 48.h, ),
height: 48.h, Expanded(
), child: Text(
SizedBox( S.of(context).lingquanzhongxin,
width: 12.w, overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Color(0xFF353535),
),
),
flex: 1,
),
],
),
), ),
Expanded( ),
child: Text( Container(
S.of(context).wodeqianbao, width: 2.w,
overflow: TextOverflow.ellipsis, height: 32.h,
style: TextStyle( margin: EdgeInsets.only(left: 20.w, right: 20.w),
fontWeight: MyFontWeight.medium, color: Color(0xFFF7F7F7),
fontSize: 16.sp, ),
color: Color(0xFF353535), Expanded(
), flex: 1,
child: GestureDetector(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/mine_wallet');
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/icon_mine_wallet.png",
width: 48.h,
height: 48.h,
),
SizedBox(
width: 12.w,
),
Expanded(
child: Text(
S.of(context).wodeqianbao,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Color(0xFF353535),
),
),
flex: 1,
),
],
), ),
flex: 1,
), ),
], ),
), ],
), ),
),
],
),
); );
} }
} }

Loading…
Cancel
Save