You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
4.6 KiB
134 lines
4.6 KiB
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<StatefulWidget> createState() { |
|
return _SignInWidget(); |
|
} |
|
|
|
} |
|
|
|
class _SignInWidget extends State<SignInWidget> { |
|
@override |
|
Widget build(BuildContext context) { |
|
return Container( |
|
width: 222.w, |
|
height:320.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:20.h), |
|
child: Container( |
|
padding: EdgeInsets.symmetric(vertical: 10.h), |
|
child: Column( |
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
children: [ |
|
Image.asset( |
|
"assets/image/icon_sign_success.png", |
|
width: 80, |
|
height: 80, |
|
), |
|
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, |
|
), |
|
), |
|
Row( |
|
mainAxisAlignment: MainAxisAlignment.center, |
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
children: [ |
|
Image.asset( |
|
"assets/image/icon_gold_coin.png", |
|
width: 16, |
|
height: 16, |
|
), |
|
SizedBox( |
|
width: 4.h, |
|
), |
|
Text( |
|
S.of(context).jiajifen(widget.integral), |
|
style: TextStyle( |
|
color: Color(0xFFEE9905), |
|
fontSize: 14.sp, |
|
fontWeight: MyFontWeight.semi_bold, |
|
), |
|
), |
|
], |
|
), |
|
// 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), |
|
// ), |
|
// ), |
|
// ), |
|
], |
|
), |
|
); |
|
} |
|
}
|
|
|