|
|
@ -1,4 +1,6 @@ |
|
|
|
|
|
import 'package:cached_network_image/cached_network_image.dart'; |
|
|
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|
|
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/controller/global.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/pay_fail_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/pay_fail_page.dart'; |
|
|
@ -30,6 +32,7 @@ class _VipPageState extends State<VipPage> { |
|
|
|
|
|
|
|
|
int payActive = 0; |
|
|
int payActive = 0; |
|
|
|
|
|
|
|
|
|
|
|
final userData = GlobalData().userData.obs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
@ -89,17 +92,32 @@ class _VipPageState extends State<VipPage> { |
|
|
children: [ |
|
|
children: [ |
|
|
Row( |
|
|
Row( |
|
|
children: [ |
|
|
children: [ |
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesUserAvatar, |
|
|
|
|
|
width: 60.w, |
|
|
|
|
|
height: 60.w, |
|
|
|
|
|
|
|
|
ClipRRect( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(60.w)), |
|
|
|
|
|
child: (userData.value?.profilePhoto?.isNotEmpty ?? false) ? CachedNetworkImage( |
|
|
|
|
|
imageUrl: "${userData.value?.profilePhoto ?? ""}?x-oss-process=image/format,webp/resize,w_120", |
|
|
|
|
|
width: 60.w, |
|
|
|
|
|
height: 60.w, |
|
|
|
|
|
imageBuilder: (context, imageProvider) => Container( |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
image: DecorationImage( |
|
|
|
|
|
image: imageProvider, |
|
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
) : Image.asset( |
|
|
|
|
|
Assets.imagesUserAvatar, |
|
|
|
|
|
width: 60.w, |
|
|
|
|
|
height: 60.w, |
|
|
|
|
|
) |
|
|
), |
|
|
), |
|
|
SizedBox(width: 15.w,), |
|
|
SizedBox(width: 15.w,), |
|
|
Column( |
|
|
Column( |
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
children: [ |
|
|
children: [ |
|
|
Text( |
|
|
Text( |
|
|
"用户昵称", |
|
|
|
|
|
|
|
|
userData.value?.nickName ?? "", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 18.w, |
|
|
fontSize: 18.w, |
|
|
fontWeight: FontWeight.w700 |
|
|
fontWeight: FontWeight.w700 |
|
|
@ -154,220 +172,149 @@ class _VipPageState extends State<VipPage> { |
|
|
child: Container( |
|
|
child: Container( |
|
|
width: 375.w, |
|
|
width: 375.w, |
|
|
height: 821.h - 270.w, |
|
|
height: 821.h - 270.w, |
|
|
padding: EdgeInsetsGeometry.symmetric( |
|
|
|
|
|
vertical: 22.w, |
|
|
|
|
|
horizontal: 13.w |
|
|
|
|
|
), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
|
|
top: Radius.circular(18.w) |
|
|
|
|
|
), |
|
|
|
|
|
color: Colors.white |
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
|
|
top: Radius.circular(18.w) |
|
|
|
|
|
), |
|
|
|
|
|
color: Colors.white |
|
|
), |
|
|
), |
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
|
child: Container( |
|
|
|
|
|
padding: EdgeInsetsGeometry.symmetric( |
|
|
|
|
|
vertical: 22.w, |
|
|
|
|
|
horizontal: 13.w |
|
|
|
|
|
), |
|
|
|
|
|
child: Column( |
|
|
children: [ |
|
|
children: [ |
|
|
VipItem(active: vipActive, index: 0,).onTap((){ |
|
|
|
|
|
vipActive = 0; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
VipItem(active: vipActive, index: 0,).onTap((){ |
|
|
|
|
|
vipActive = 0; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
VipItem(active: vipActive, index: 1,).onTap((){ |
|
|
|
|
|
vipActive = 1; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
VipItem(active: vipActive, index: 1,).onTap((){ |
|
|
|
|
|
vipActive = 1; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
VipItem(active: vipActive, index: 2,).onTap((){ |
|
|
|
|
|
vipActive = 2; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
VipItem(active: vipActive, index: 2,).onTap((){ |
|
|
|
|
|
vipActive = 2; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 12.w,), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 12.w,), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
|
Checkbox( |
|
|
|
|
|
value: checked, |
|
|
|
|
|
onChanged: (value) { |
|
|
|
|
|
checked = value ?? false; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
Checkbox( |
|
|
|
|
|
value: checked, |
|
|
|
|
|
onChanged: (value) { |
|
|
|
|
|
checked = value ?? false; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
activeColor: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
|
|
side: const BorderSide(color: Colors.grey), |
|
|
|
|
|
shape: const CircleBorder(), |
|
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
activeColor: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
|
|
side: const BorderSide(color: Colors.grey), |
|
|
|
|
|
shape: const CircleBorder(), |
|
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
|
|
|
|
|
), |
|
|
|
|
|
Text( |
|
|
|
|
|
"我已阅读并同意《会员购买协议》", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(189, 189, 189, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
Text( |
|
|
|
|
|
"我已阅读并同意《会员购买协议》", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
color: const Color.fromRGBO(189, 189, 189, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 25.w,), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Text( |
|
|
|
|
|
"会员专属特权", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 17.w, |
|
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
|
color: const Color.fromRGBO(54, 0, 115, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 18.w,), |
|
|
|
|
|
Container( |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
horizontal: 18.w |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
...vipPrivilege.map((e){ |
|
|
|
|
|
return VipPrivilege(img: e["img"], label: e["label"]); |
|
|
|
|
|
}) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 15.w,), |
|
|
|
|
|
Container( |
|
|
|
|
|
height: 60.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
vertical: 19.w, |
|
|
|
|
|
horizontal: 18.w |
|
|
|
|
|
), |
|
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
bottom: 10.w |
|
|
|
|
|
), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesVipChat, |
|
|
|
|
|
width: 34.w, |
|
|
|
|
|
|
|
|
SizedBox(height: 25.w,), |
|
|
|
|
|
Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Text( |
|
|
|
|
|
"会员专属特权", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 17.w, |
|
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
|
color: const Color.fromRGBO(54, 0, 115, 1) |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 18.w,), |
|
|
|
|
|
Container( |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
horizontal: 18.w |
|
|
), |
|
|
), |
|
|
SizedBox(width: 16.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"【聊天券】立即得70张,后续每天领7张,共280张", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
height: 60.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
vertical: 19.w, |
|
|
|
|
|
horizontal: 18.w |
|
|
|
|
|
), |
|
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
bottom: 10.w |
|
|
|
|
|
), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesVipMessage, |
|
|
|
|
|
width: 34.w, |
|
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
...vipPrivilege.map((e){ |
|
|
|
|
|
return VipPrivilege(img: e["img"], label: e["label"]); |
|
|
|
|
|
}) |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
SizedBox(width: 16.w,), |
|
|
|
|
|
Text( |
|
|
|
|
|
"【消息回执】消息已读!看到了~", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
Spacer(), |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
SizedBox(height: 15.w,), |
|
|
Container( |
|
|
Container( |
|
|
width: 86.w, |
|
|
|
|
|
height: 30.w, |
|
|
|
|
|
|
|
|
height: 60.w, |
|
|
padding: EdgeInsets.symmetric( |
|
|
padding: EdgeInsets.symmetric( |
|
|
horizontal: 9.w |
|
|
|
|
|
|
|
|
vertical: 19.w, |
|
|
|
|
|
horizontal: 18.w |
|
|
|
|
|
), |
|
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
bottom: 10.w |
|
|
), |
|
|
), |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.all(Radius.circular(30.w)), |
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
width: 1, |
|
|
|
|
|
color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)), |
|
|
|
|
|
color: payActive == 0 ? |
|
|
|
|
|
const Color.fromRGBO(117, 98, 249, .07) : |
|
|
|
|
|
const Color.fromRGBO(247, 247, 247, 1) |
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
), |
|
|
), |
|
|
child: Row( |
|
|
child: Row( |
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
children: [ |
|
|
Image.asset( |
|
|
Image.asset( |
|
|
Assets.imagesWechatPay, |
|
|
|
|
|
width: 17.w, |
|
|
|
|
|
|
|
|
Assets.imagesVipChat, |
|
|
|
|
|
width: 34.w, |
|
|
), |
|
|
), |
|
|
|
|
|
SizedBox(width: 16.w,), |
|
|
Text( |
|
|
Text( |
|
|
"微信支付", |
|
|
|
|
|
|
|
|
"【聊天券】立即得70张,后续每天领7张,共280张", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
), |
|
|
), |
|
|
) |
|
|
) |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
).onTap((){ |
|
|
|
|
|
payActive = 0; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
), |
|
|
Container( |
|
|
Container( |
|
|
width: 80.w, |
|
|
|
|
|
height: 30.w, |
|
|
|
|
|
|
|
|
height: 60.w, |
|
|
padding: EdgeInsets.symmetric( |
|
|
padding: EdgeInsets.symmetric( |
|
|
horizontal: 12.w |
|
|
|
|
|
|
|
|
vertical: 19.w, |
|
|
|
|
|
horizontal: 18.w |
|
|
|
|
|
), |
|
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
bottom: 10.w |
|
|
), |
|
|
), |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.all(Radius.circular(30.w)), |
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
width: 1, |
|
|
|
|
|
color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)), |
|
|
|
|
|
color: payActive == 1 ? |
|
|
|
|
|
const Color.fromRGBO(117, 98, 249, .07) : |
|
|
|
|
|
const Color.fromRGBO(247, 247, 247, 1) |
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
color: const Color.fromRGBO(117, 98, 249, .1) |
|
|
), |
|
|
), |
|
|
child: Row( |
|
|
child: Row( |
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
children: [ |
|
|
Image.asset( |
|
|
Image.asset( |
|
|
Assets.imagesAliPay, |
|
|
|
|
|
width: 17.w, |
|
|
|
|
|
|
|
|
Assets.imagesVipMessage, |
|
|
|
|
|
width: 34.w, |
|
|
), |
|
|
), |
|
|
|
|
|
SizedBox(width: 16.w,), |
|
|
Text( |
|
|
Text( |
|
|
"支付宝", |
|
|
|
|
|
|
|
|
"【消息回执】消息已读!看到了~", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 11.w, |
|
|
fontSize: 11.w, |
|
|
fontWeight: FontWeight.w500 |
|
|
fontWeight: FontWeight.w500 |
|
|
@ -375,44 +322,118 @@ class _VipPageState extends State<VipPage> { |
|
|
) |
|
|
) |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
).onTap((){ |
|
|
|
|
|
payActive = 1; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 86.w, |
|
|
|
|
|
height: 30.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
horizontal: 9.w |
|
|
|
|
|
), |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(30.w)), |
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
width: 1, |
|
|
|
|
|
color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)), |
|
|
|
|
|
color: payActive == 0 ? |
|
|
|
|
|
const Color.fromRGBO(117, 98, 249, .07) : |
|
|
|
|
|
const Color.fromRGBO(247, 247, 247, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesWechatPay, |
|
|
|
|
|
width: 17.w, |
|
|
|
|
|
), |
|
|
|
|
|
Text( |
|
|
|
|
|
"微信支付", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
).onTap((){ |
|
|
|
|
|
payActive = 0; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 161.w, |
|
|
|
|
|
height: 45.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(45.w)), |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.centerLeft, // 90deg: 从左到右 |
|
|
|
|
|
end: Alignment.centerRight, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(131, 89, 255, 1), // 起点颜色 |
|
|
|
|
|
Color.fromRGBO(77, 127, 231, 1), // 中间颜色 |
|
|
|
|
|
Color.fromRGBO(61, 138, 224, 1), // 终点颜色 |
|
|
|
|
|
], |
|
|
|
|
|
stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Text( |
|
|
|
|
|
"立即开通", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 18.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 80.w, |
|
|
|
|
|
height: 30.w, |
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
horizontal: 12.w |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
).onTap((){ |
|
|
|
|
|
Get.to(() => PayFailPage()); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(30.w)), |
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
width: 1, |
|
|
|
|
|
color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)), |
|
|
|
|
|
color: payActive == 1 ? |
|
|
|
|
|
const Color.fromRGBO(117, 98, 249, .07) : |
|
|
|
|
|
const Color.fromRGBO(247, 247, 247, 1) |
|
|
|
|
|
), |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Image.asset( |
|
|
|
|
|
Assets.imagesAliPay, |
|
|
|
|
|
width: 17.w, |
|
|
|
|
|
), |
|
|
|
|
|
Text( |
|
|
|
|
|
"支付宝", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 11.w, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
).onTap((){ |
|
|
|
|
|
payActive = 1; |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: 161.w, |
|
|
|
|
|
height: 45.w, |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(45.w)), |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.centerLeft, // 90deg: 从左到右 |
|
|
|
|
|
end: Alignment.centerRight, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(131, 89, 255, 1), // 起点颜色 |
|
|
|
|
|
Color.fromRGBO(77, 127, 231, 1), // 中间颜色 |
|
|
|
|
|
Color.fromRGBO(61, 138, 224, 1), // 终点颜色 |
|
|
|
|
|
], |
|
|
|
|
|
stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
child: Center( |
|
|
|
|
|
child: Text( |
|
|
|
|
|
"立即开通", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 18.w, |
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
).onTap((){ |
|
|
|
|
|
Get.to(() => PayFailPage()); |
|
|
|
|
|
}) |
|
|
|
|
|
], |
|
|
|
|
|
) |
|
|
], |
|
|
], |
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
@ -442,7 +463,6 @@ class _VipItemState extends State<VipItem> { |
|
|
height: 120.h, |
|
|
height: 120.h, |
|
|
padding: EdgeInsets.only( |
|
|
padding: EdgeInsets.only( |
|
|
top: 16.w, |
|
|
top: 16.w, |
|
|
bottom: 21.w |
|
|
|
|
|
), |
|
|
), |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
borderRadius: BorderRadius.all(Radius.circular(18.w)), |
|
|
borderRadius: BorderRadius.all(Radius.circular(18.w)), |
|
|
|