|
|
@ -8,119 +8,86 @@ import '../../utils/toast/cloud_toast.dart';
|
|
|
|
class AppDialog extends Dialog {
|
|
|
|
class AppDialog extends Dialog {
|
|
|
|
final String title;
|
|
|
|
final String title;
|
|
|
|
final String confirm; //按钮文字
|
|
|
|
final String confirm; //按钮文字
|
|
|
|
// final String content; //内容
|
|
|
|
|
|
|
|
// final bool? showCancel;
|
|
|
|
|
|
|
|
// final OnDialogClickListener? clickListener;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const AppDialog( // this.showCancel,
|
|
|
|
const AppDialog({
|
|
|
|
// this.clickListener,
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Key? key,
|
|
|
|
Key? key,
|
|
|
|
this.title = "恭喜您获得会员体验卡",
|
|
|
|
this.title = "恭喜您获得会员体验卡",
|
|
|
|
this.confirm = "立即领取",
|
|
|
|
this.confirm = "立即领取",
|
|
|
|
// this.content = "内容",
|
|
|
|
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
return Center(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 95.w,vertical: 452.w),
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
image:
|
|
|
|
left: 100.w,
|
|
|
|
DecorationImage(image: AssetImage(Assets.images.bouncedbg.path))),
|
|
|
|
right: 100.w,
|
|
|
|
child: Column(
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
32.hb,
|
|
|
|
image: DecorationImage(
|
|
|
|
Text(
|
|
|
|
image: AssetImage(
|
|
|
|
title,
|
|
|
|
Assets.images.bouncedbg.path,
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 36.sp,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
80.hb,
|
|
|
|
),
|
|
|
|
_getVip(),
|
|
|
|
child: Column(
|
|
|
|
218.hb,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
72.wb,
|
|
|
|
title,
|
|
|
|
_getText("接听发送"),
|
|
|
|
style: TextStyle(
|
|
|
|
64.wb,
|
|
|
|
fontSize: 36.sp,
|
|
|
|
_getText("拒接发送"),
|
|
|
|
),
|
|
|
|
64.wb,
|
|
|
|
),
|
|
|
|
_getText("提升形象"),
|
|
|
|
60.hb,
|
|
|
|
],
|
|
|
|
_getVip(),
|
|
|
|
),
|
|
|
|
200.hb,
|
|
|
|
50.hb,
|
|
|
|
Row(
|
|
|
|
_getBotton(confirm, context),
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
72.wb,
|
|
|
|
|
|
|
|
_getText("接听发送"),
|
|
|
|
|
|
|
|
64.wb,
|
|
|
|
|
|
|
|
_getText("拒接发送"),
|
|
|
|
|
|
|
|
64.wb,
|
|
|
|
|
|
|
|
_getText("提升形象"),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
50.hb,
|
|
|
|
|
|
|
|
_getBotton(confirm, context),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
/**/
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// Stack(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Align(
|
|
|
|
|
|
|
|
// child: Image.asset(
|
|
|
|
|
|
|
|
// Assets.images.bouncedbg.path,
|
|
|
|
|
|
|
|
// width: 560.w,
|
|
|
|
|
|
|
|
// height: 720.w,
|
|
|
|
|
|
|
|
// fit: BoxFit.fill,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Positioned(
|
|
|
|
|
|
|
|
// top: 64.w,
|
|
|
|
|
|
|
|
// left: 100.w,
|
|
|
|
|
|
|
|
// child: Text(
|
|
|
|
|
|
|
|
// title,
|
|
|
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
|
|
|
// fontSize: 36.sp,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// Positioned(top: 108.w, left: 96.w, child: _getVip()),
|
|
|
|
|
|
|
|
// Positioned(
|
|
|
|
|
|
|
|
// child: Row(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// _getText("接听发送"),
|
|
|
|
|
|
|
|
// 64.wb,
|
|
|
|
|
|
|
|
// _getText("拒接发送"),
|
|
|
|
|
|
|
|
// 64.wb,
|
|
|
|
|
|
|
|
// _getText("提升形象"),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// Positioned(child: _getBotton(confirm, context)),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_getBotton(String bContent, context) {
|
|
|
|
_getBotton(String bContent, context) {
|
|
|
|
return GestureDetector(
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () async{
|
|
|
|
onTap: () async {
|
|
|
|
var res=await apiClient.request(API.app.trialVip);
|
|
|
|
var res = await apiClient.request(API.app.trialVip);
|
|
|
|
if(res.code==0){
|
|
|
|
if (res.code == 0) {
|
|
|
|
// showDialog(context: context, builder: (context){
|
|
|
|
|
|
|
|
// return const AppDialog();
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
CloudToast.show(res.msg);
|
|
|
|
CloudToast.show(res.msg);
|
|
|
|
// BoxShadow.show(res.msg);
|
|
|
|
} else {
|
|
|
|
} else{
|
|
|
|
|
|
|
|
CloudToast.show(res.msg);
|
|
|
|
CloudToast.show(res.msg);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 64.w),
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 64.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 155.w,vertical: 28.w),
|
|
|
|
width: 500.w,
|
|
|
|
height: 88.w,
|
|
|
|
height: 88.w,
|
|
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(12.w),
|
|
|
|
borderRadius: BorderRadius.circular(12.w),
|
|
|
|
gradient: const LinearGradient(
|
|
|
|
gradient: const LinearGradient(
|
|
|
|
colors: [Color(0xFFFFEAB0), Color(0xFFFFF6D8)],
|
|
|
|
colors: [Color(0xFFFFEAB0), Color(0xFFFFF6D8)],
|
|
|
|
end: Alignment.centerLeft,
|
|
|
|
end: Alignment.centerLeft,
|
|
|
|
begin: Alignment.centerRight)),
|
|
|
|
begin: Alignment.centerRight,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
bContent,
|
|
|
|
bContent,
|
|
|
|
style: TextStyle(fontSize: 28.sp,fontWeight:FontWeight.bold),
|
|
|
|
style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -136,42 +103,47 @@ _getText(String content) {
|
|
|
|
_getVip() {
|
|
|
|
_getVip() {
|
|
|
|
return SizedBox(
|
|
|
|
return SizedBox(
|
|
|
|
width: 370.w,
|
|
|
|
width: 370.w,
|
|
|
|
height: 100.w,
|
|
|
|
height: 110.w,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text.rich(TextSpan(children: [
|
|
|
|
Text.rich(
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: "03",
|
|
|
|
children: [
|
|
|
|
style: TextStyle(
|
|
|
|
TextSpan(
|
|
|
|
|
|
|
|
text: "03",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
|
|
|
|
fontSize: 56.sp,
|
|
|
|
|
|
|
|
fontFamily: "BlackItalic",
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
|
|
|
|
TextSpan(
|
|
|
|
|
|
|
|
text: "天",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
fontSize: 56.sp,
|
|
|
|
fontSize: 24.sp,
|
|
|
|
fontFamily: "BlackItalic",
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
],
|
|
|
|
text: "天",
|
|
|
|
),
|
|
|
|
style: TextStyle(
|
|
|
|
),
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
|
|
|
// height: 1.0,
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
])),
|
|
|
|
|
|
|
|
const Spacer(),
|
|
|
|
const Spacer(),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
"VIP",
|
|
|
|
"VIP",
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: const Color(0xFFE7F3FF),
|
|
|
|
color: const Color(0xFFE7F3FF),
|
|
|
|
fontSize: 32.sp,
|
|
|
|
fontSize: 32.sp,
|
|
|
|
fontFamily: "BlackItalic",
|
|
|
|
fontFamily: "BlackItalic",
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
@ -180,14 +152,8 @@ _getVip() {
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
color: const Color(0xFFFFEAB0),
|
|
|
|
fontSize: 24.sp,
|
|
|
|
fontSize: 24.sp,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// abstract class OnDialogClickListener {
|
|
|
|
|
|
|
|
// void onConfirm();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// void onCancel();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|