|
|
|
@ -4,14 +4,17 @@ import 'package:huixiang/retrofit/data/sign_info.dart';
|
|
|
|
|
import 'package:huixiang/retrofit/data/user_info.dart'; |
|
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
|
|
|
|
|
|
class IntegralVip extends StatefulWidget { |
|
|
|
|
|
|
|
|
|
final SignInfo signInfo; |
|
|
|
|
final UserInfo userinfo; |
|
|
|
|
final rankLevel; |
|
|
|
|
final String day; |
|
|
|
|
final String integral; |
|
|
|
|
|
|
|
|
|
IntegralVip(this.rankLevel, this.signInfo, this.userinfo); |
|
|
|
|
IntegralVip(this.rankLevel, this.signInfo, this.userinfo,this.day,this.integral); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
@ -25,83 +28,119 @@ class _IntegralVip extends State<IntegralVip> {
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h,horizontal: 16.w), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
MImage( |
|
|
|
|
widget.userinfo != null ? widget.userinfo.headimg : "", |
|
|
|
|
width: 50, |
|
|
|
|
height: 50, |
|
|
|
|
isCircle: true, |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
errorSrc: "assets/image/default_user.png", |
|
|
|
|
fadeSrc: "assets/image/default_user.png", |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
flex: 1, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
widget.signInfo != null ? "${widget.signInfo.point}" : "0", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 21.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.only(left: 15.w), |
|
|
|
|
height: 50.h, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).ninyilianxuqiandaotian(widget.day), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).wodejifenzhi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
Text( |
|
|
|
|
"明日签到可获得${widget.integral}积分", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: 2.w, |
|
|
|
|
height: 32.h, |
|
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
flex: 1, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
margin: EdgeInsets.only(left: 15.w), |
|
|
|
|
height: 50.h, |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/icon_gold_coin.png", |
|
|
|
|
width: 20, |
|
|
|
|
height: 20, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width:6.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
(widget?.signInfo?.rank?.rankName != null) |
|
|
|
|
? "${widget.signInfo.rank.rankName.replaceAll("会员", "")}" |
|
|
|
|
: "", |
|
|
|
|
widget?.userinfo?.points ?? "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 21.sp, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).wodehuiyuandengji, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
// Icon( |
|
|
|
|
// Icons.keyboard_arrow_right, |
|
|
|
|
// color: Colors.white, |
|
|
|
|
// size: 15, |
|
|
|
|
// ), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
// Container( |
|
|
|
|
// width: 2.w, |
|
|
|
|
// height: 32.h, |
|
|
|
|
// color: Color(0xFFFFFFFF), |
|
|
|
|
// ), |
|
|
|
|
// Expanded( |
|
|
|
|
// flex: 1, |
|
|
|
|
// child: Column( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// children: [ |
|
|
|
|
// Text( |
|
|
|
|
// (widget?.signInfo?.rank?.rankName != null) |
|
|
|
|
// ? "${widget.signInfo.rank.rankName.replaceAll("会员", "")}" |
|
|
|
|
// : "", |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontWeight: MyFontWeight.medium, |
|
|
|
|
// fontSize: 21.sp, |
|
|
|
|
// color: Colors.white, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// height: 6.h, |
|
|
|
|
// ), |
|
|
|
|
// Row( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// children: [ |
|
|
|
|
// Text( |
|
|
|
|
// S.of(context).wodehuiyuandengji, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 12.sp, |
|
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
|
// color: Color(0xFFF2F2F2), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// // Icon( |
|
|
|
|
// // Icons.keyboard_arrow_right, |
|
|
|
|
// // color: Colors.white, |
|
|
|
|
// // size: 15, |
|
|
|
|
// // ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|