member_evaluation_pop_up_dialog.dart 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. import 'package:get/get.dart';
  5. import 'package:get/get_core/src/get_main.dart';
  6. import 'package:location/utils/common_expand.dart';
  7. import '../../resource/assets.gen.dart';
  8. class MemberEvaluationPopUpDialog {
  9. static void show({
  10. VoidCallback? cancelOnTap,
  11. VoidCallback? confirmOnTap,}) {
  12. Get.dialog(
  13. SimpleDialog(
  14. titlePadding: EdgeInsets.zero,
  15. contentPadding: EdgeInsets.zero,
  16. insetPadding: EdgeInsets.zero,
  17. backgroundColor:Colors.transparent,
  18. children: [
  19. MemberPaymentCompletedTipView(
  20. cancelOnTap: () {
  21. Get.back();
  22. cancelOnTap!();
  23. },
  24. confirmOnTap: confirmOnTap)
  25. ],
  26. )
  27. );
  28. }
  29. }
  30. class MemberPaymentCompletedTipView extends StatefulWidget {
  31. final VoidCallback? cancelOnTap;
  32. final VoidCallback? confirmOnTap;
  33. const MemberPaymentCompletedTipView({
  34. super.key,
  35. this.cancelOnTap,
  36. required this.confirmOnTap,
  37. });
  38. @override
  39. State<MemberPaymentCompletedTipView> createState() => _MemberPaymentCompletedTipViewState();
  40. }
  41. class _MemberPaymentCompletedTipViewState extends State<MemberPaymentCompletedTipView> {
  42. @override
  43. Widget build(BuildContext context) {
  44. // TODO: implement build
  45. return Container(
  46. width: 1.sw,
  47. margin: EdgeInsets.symmetric(horizontal: 42.w),
  48. child: Stack(
  49. children: [
  50. IntrinsicHeight(
  51. child: Column(
  52. children: [
  53. Container(
  54. decoration: BoxDecoration(
  55. color: Colors.transparent,
  56. image: DecorationImage(
  57. image: Assets.images.iconMemberContactClickHelp.provider(),
  58. fit: BoxFit.fill,
  59. )
  60. ),
  61. child: Column(
  62. children: [
  63. SizedBox(
  64. height: 183.w,
  65. ),
  66. GestureDetector(
  67. onTap: () {
  68. Get.back();
  69. widget.confirmOnTap!();
  70. },
  71. child: Container(
  72. decoration: BoxDecoration(
  73. gradient: LinearGradient(
  74. begin: Alignment.centerLeft, // 90度相当于从左到右
  75. end: Alignment.centerRight,
  76. colors: [
  77. Color(0xFF7B7DFF), // #7B7DFF
  78. Color(0xFF6365FF), // #6365FF
  79. ],
  80. stops: [0.0, 1.0],
  81. // 从0%到100%
  82. ),
  83. borderRadius: BorderRadius.circular(40.w / 2.0),
  84. ),
  85. margin: EdgeInsets.symmetric(horizontal: 20.w),
  86. height: 40.w,
  87. alignment: Alignment.center,
  88. child: Text("立即邀请",
  89. style: TextStyle(
  90. fontSize: 14.sp,
  91. color: '#FFFFFF'.color,
  92. fontWeight: FontWeight.w500)
  93. ),
  94. ),
  95. ),
  96. SizedBox(
  97. height: 20.w,
  98. ),
  99. ],
  100. ),
  101. )
  102. ],
  103. ),
  104. ),
  105. Positioned(
  106. top: 41.w,
  107. right: 16.w,
  108. width: 20.w,
  109. height: 20.w,
  110. child: GestureDetector(
  111. onTap: widget.cancelOnTap,
  112. child: Assets.images.iconMemberContactClickHelpClose.image(width: 20.w, height: 20.w),
  113. ),
  114. )
  115. ],
  116. ),
  117. );
  118. }
  119. }