|
|
|
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/retrofit/data/login_info.dart';
|
|
|
|
import 'package:huixiang/utils/flutter_utils.dart';
|
|
|
|
import 'package:huixiang/utils/font_weight.dart';
|
|
|
|
import 'package:huixiang/view_widget/round_button.dart';
|
|
|
|
|
|
|
|
class InviteSuccessDialog extends StatefulWidget {
|
|
|
|
final String invite;
|
|
|
|
final InterviewCouponList interviewCouponList;
|
|
|
|
|
|
|
|
InviteSuccessDialog(this.invite,this.interviewCouponList);
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return _InviteSuccessDialog();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class _InviteSuccessDialog extends State<InviteSuccessDialog> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return SimpleDialog(
|
|
|
|
titlePadding: EdgeInsets.all(10),
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
elevation: 0,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Column(children: [
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.only(top:20.h,left: 12,right: 12),
|
|
|
|
margin: EdgeInsets.only(left:60.w,right:60.w),
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.h),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
"assets/image/yq.png",
|
|
|
|
width: 65,
|
|
|
|
height: 65,
|
|
|
|
),
|
|
|
|
SizedBox(height: 9.h,),
|
|
|
|
Text(
|
|
|
|
"邀请完成",
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color(0xFF353535),
|
|
|
|
fontSize: 16.sp,
|
|
|
|
fontWeight: MyFontWeight.medium,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 6.h),
|
|
|
|
RichText(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
text: TextSpan(
|
|
|
|
text:
|
|
|
|
"通过${widget.invite.substring(0, 3)}****${widget.invite.substring(7, 11)}的邀请码完成邀请,获得",
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color(0xFF1A1A1A),
|
|
|
|
fontSize: 14.sp,
|
|
|
|
fontWeight: MyFontWeight.regular,
|
|
|
|
height: 1.5.h),
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text:"${widget.interviewCouponList.storeName}${widget.interviewCouponList.couponName} * ${widget.interviewCouponList.bizType}张",
|
|
|
|
style: TextStyle(color: Color(0xFF32A060),fontSize: 14.sp,fontWeight: MyFontWeight.regular),
|
|
|
|
),
|
|
|
|
]
|
|
|
|
),),
|
|
|
|
SizedBox(height: 13,),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: (){
|
|
|
|
setState(() {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child:RoundButton(
|
|
|
|
text: S.of(context).queren,
|
|
|
|
textColor: Colors.white,
|
|
|
|
width: 130.w,
|
|
|
|
height: 34.h,
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h),
|
|
|
|
fontSize: 16.sp,
|
|
|
|
fontWeight: MyFontWeight.semi_bold,
|
|
|
|
backgroup: Color(0xFF32A060),
|
|
|
|
radius: 4.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height:20),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height:35),
|
|
|
|
GestureDetector(onTap: (){
|
|
|
|
setState(() {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
});
|
|
|
|
},child:Image.asset(
|
|
|
|
"assets/image/yq_qx.png",
|
|
|
|
width: 34,
|
|
|
|
height: 34,
|
|
|
|
),)
|
|
|
|
|
|
|
|
],),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|