|
|
@@ -1,97 +1,129 @@
|
|
|
+
|
|
|
+import 'package:flutter/cupertino.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
-import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
|
-import 'package:location/resource/assets.gen.dart';
|
|
|
+import 'package:get/get.dart';
|
|
|
+import 'package:get/get_core/src/get_main.dart';
|
|
|
+import 'package:location/utils/common_expand.dart';
|
|
|
|
|
|
+import '../../resource/assets.gen.dart';
|
|
|
|
|
|
class MemberEvaluationPopUpDialog {
|
|
|
- static final String _tag = 'MemberEvaluationPopUpDialog';
|
|
|
-
|
|
|
- static void show(
|
|
|
- {required VoidCallback payClick, required VoidCallback cancelClick}) {
|
|
|
- SmartDialog.show(
|
|
|
- tag: _tag,
|
|
|
- backDismiss: false,
|
|
|
- clickMaskDismiss: false,
|
|
|
- builder: (_) {
|
|
|
- return _MemberEvaluationPopUpDialogWidget(
|
|
|
- payClick: payClick, cancelClick: cancelClick);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- static void dismiss() {
|
|
|
- SmartDialog.dismiss(tag: _tag);
|
|
|
+ static void show({
|
|
|
+ VoidCallback? cancelOnTap,
|
|
|
+ VoidCallback? confirmOnTap,}) {
|
|
|
+ Get.dialog(
|
|
|
+ SimpleDialog(
|
|
|
+ titlePadding: EdgeInsets.zero,
|
|
|
+ contentPadding: EdgeInsets.zero,
|
|
|
+ insetPadding: EdgeInsets.zero,
|
|
|
+ backgroundColor:Colors.transparent,
|
|
|
+ children: [
|
|
|
+ MemberPaymentCompletedTipView(
|
|
|
+ cancelOnTap: () {
|
|
|
+ Get.back();
|
|
|
+ cancelOnTap!();
|
|
|
+ },
|
|
|
+ confirmOnTap: confirmOnTap)
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class _MemberEvaluationPopUpDialogWidget extends Dialog {
|
|
|
- final VoidCallback payClick;
|
|
|
- final VoidCallback cancelClick;
|
|
|
|
|
|
- const _MemberEvaluationPopUpDialogWidget(
|
|
|
- {required this.payClick, required this.cancelClick});
|
|
|
+class MemberPaymentCompletedTipView extends StatefulWidget {
|
|
|
+ final VoidCallback? cancelOnTap;
|
|
|
+ final VoidCallback? confirmOnTap;
|
|
|
+
|
|
|
+
|
|
|
+ const MemberPaymentCompletedTipView({
|
|
|
+ super.key,
|
|
|
+ this.cancelOnTap,
|
|
|
+ required this.confirmOnTap,
|
|
|
+ });
|
|
|
|
|
|
@override
|
|
|
+ State<MemberPaymentCompletedTipView> createState() => _MemberPaymentCompletedTipViewState();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+class _MemberPaymentCompletedTipViewState extends State<MemberPaymentCompletedTipView> {
|
|
|
+ @override
|
|
|
Widget build(BuildContext context) {
|
|
|
+ // TODO: implement build
|
|
|
return Container(
|
|
|
- child: IntrinsicHeight(
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- Stack(
|
|
|
+ width: 1.sw,
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 42.w),
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ IntrinsicHeight(
|
|
|
+ child: Column(
|
|
|
children: [
|
|
|
- AspectRatio(
|
|
|
- aspectRatio: 1110 / 1296,
|
|
|
- child: Assets.images.imgMemberUserCancelsContainer
|
|
|
- .image(width: 301.w)),
|
|
|
- Positioned(
|
|
|
- top: 360.w,
|
|
|
- left: 60.w,
|
|
|
- right: 60.w,
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MemberEvaluationPopUpDialog.dismiss();
|
|
|
- payClick();
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- height: 40.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- gradient: LinearGradient(
|
|
|
- begin: Alignment.centerLeft, // 90度相当于从左到右
|
|
|
- end: Alignment.centerRight,
|
|
|
- colors: [
|
|
|
- Color(0xFF7B7DFF), // #7B7DFF
|
|
|
- Color(0xFF6365FF), // #6365FF
|
|
|
- ],
|
|
|
- stops: [0.0, 1.0],
|
|
|
- // 从0%到100%
|
|
|
+ Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.transparent,
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.iconMemberContactClickHelp.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ height: 183.w,
|
|
|
+ ),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ Get.back();
|
|
|
+ widget.confirmOnTap!();
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ gradient: LinearGradient(
|
|
|
+ begin: Alignment.centerLeft, // 90度相当于从左到右
|
|
|
+ end: Alignment.centerRight,
|
|
|
+ colors: [
|
|
|
+ Color(0xFF7B7DFF), // #7B7DFF
|
|
|
+ Color(0xFF6365FF), // #6365FF
|
|
|
+ ],
|
|
|
+ stops: [0.0, 1.0],
|
|
|
+ // 从0%到100%
|
|
|
+ ),
|
|
|
+ borderRadius: BorderRadius.circular(40.w / 2.0),
|
|
|
+ ),
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 20.w),
|
|
|
+ height: 40.w,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ child: Text("立即邀请",
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.sp,
|
|
|
+ color: '#FFFFFF'.color,
|
|
|
+ fontWeight: FontWeight.w500)
|
|
|
+ ),
|
|
|
),
|
|
|
- borderRadius: BorderRadius.circular(40.w / 2.0),
|
|
|
),
|
|
|
- //getPrimaryBtnDecoration(100.w),
|
|
|
- child: Center(
|
|
|
- child: Text("立即领取",
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 15.sp, color: Colors.white)),
|
|
|
+ SizedBox(
|
|
|
+ height: 20.w,
|
|
|
),
|
|
|
- ),
|
|
|
+ ],
|
|
|
),
|
|
|
- ),
|
|
|
+ )
|
|
|
],
|
|
|
),
|
|
|
- SizedBox(height: 24.w,),
|
|
|
- Center(
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MemberEvaluationPopUpDialog.dismiss();
|
|
|
- cancelClick();
|
|
|
- },
|
|
|
- child: Assets.images.iconMemberRetainClose
|
|
|
- .image(width: 32.w, height: 32.w),
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
+ ),
|
|
|
+ Positioned(
|
|
|
+ top: 41.w,
|
|
|
+ right: 16.w,
|
|
|
+ width: 20.w,
|
|
|
+ height: 20.w,
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: widget.cancelOnTap,
|
|
|
+ child: Assets.images.iconMemberContactClickHelpClose.image(width: 20.w, height: 20.w),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
-}
|
|
|
+}
|