After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 747 B |
@ -0,0 +1,113 @@
|
||||
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 InviteSuccessDialog extends StatefulWidget { |
||||
final String invite; |
||||
|
||||
InviteSuccessDialog(this.invite); |
||||
|
||||
@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: 61, |
||||
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:"前进麦味10元代金劵一张", |
||||
style: TextStyle(color: Color(0xFF32A060),fontSize: 14.sp,fontWeight: MyFontWeight.regular), |
||||
), |
||||
] |
||||
),), |
||||
SizedBox(height: 13,), |
||||
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, |
||||
callback: () { |
||||
SmartDialog.dismiss(); |
||||
}, |
||||
), |
||||
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, |
||||
),) |
||||
|
||||
],), |
||||
], |
||||
); |
||||
} |
||||
} |