import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/data/sign_info.dart'; import 'package:huixiang/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, this.day,this.integral); @override State createState() { return _IntegralVip(); } } class _IntegralVip extends State { @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.symmetric( vertical: 16.h,horizontal: 16.w, ), child: Row( children: [ MImage( widget.userinfo?.headimg ?? "", width: 50, height: 50, isCircle: true, fit: BoxFit.cover, errorSrc: "assets/image/default_user.webp", fadeSrc: "assets/image/default_user.webp", ), Expanded( child: Container( margin: EdgeInsets.only(left: 15.w), height: 53.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, ), ), Text( "明日签到可获得${widget.integral}积分", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, color: Colors.white, ), ), ], ), ), flex: 1, ), Container( margin: EdgeInsets.only(left: 15.w), height: 50.h, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ SvgPicture.asset( "assets/svg/qiandao.svg", width: 20, height: 20, ), SizedBox( width:6.w, ), Text( widget.userinfo?.points ?? "", style: TextStyle( fontSize: 14.sp, color: Colors.white, fontWeight: FontWeight.bold, ), ), ], ), ), ], ), ); } }