| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.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 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 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(
- width: 1.sw,
- margin: EdgeInsets.symmetric(horizontal: 42.w),
- child: Stack(
- children: [
- IntrinsicHeight(
- child: Column(
- children: [
- 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)
- ),
- ),
- ),
- SizedBox(
- height: 20.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),
- ),
- )
- ],
- ),
- );
- }
- }
|