import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/round_button.dart'; class SignInWidget extends StatefulWidget { final String day; final String integral; SignInWidget(this.day, this.integral); @override State createState() { return _SignInWidget(); } } class _SignInWidget extends State { @override Widget build(BuildContext context) { return Container( width: 222.w, height: 275.h * AppUtils.textScale(context), child: Stack( children: [ Positioned( left: 2.w, right: 2.w, bottom: 0, top: 65.h, child: Container( width: 218.w, height: 210.h * AppUtils.textScale(context), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8.w), ), padding: EdgeInsets.only(top: 45.h), child: Container( padding: EdgeInsets.symmetric(vertical: 10.h), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( S.of(context).qiandaowancheng, style: TextStyle( color: Color(0xFF353535), fontSize: 16.sp, fontWeight: MyFontWeight.medium, ), ), Text( S.of(context).ninyilianxuqiandaotian(widget.day), style: TextStyle( color: Color(0xFF353535), fontSize: 14.sp, fontWeight: MyFontWeight.regular, ), ), Text( S.of(context).jiajifen(widget.integral), style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, ), ), RoundButton( text: S.of(context).queren, textColor: Colors.white, width: 130.w, padding: EdgeInsets.symmetric(vertical: 6.h), fontSize: 16.sp, fontWeight: MyFontWeight.semi_bold, backgroup: Color(0xFF32A060), radius: 4.w, callback: () { SmartDialog.dismiss(); }, ), ], ), ), ), ), Positioned( top: 0, child: Container( child: Image.asset( "assets/image/icon_sign_ok.png", fit: BoxFit.contain, width: 223.w, height: 110.h * AppUtils.textScale(context), ), ), ), ], ), ); } }