photo_delete_finish_dialog.dart 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import 'package:clean/module/main/main_view.dart';
  2. import 'package:clean/resource/assets.gen.dart';
  3. import 'package:clean/resource/colors.gen.dart';
  4. import 'package:flutter/Material.dart';
  5. import 'package:flutter/cupertino.dart';
  6. import 'package:flutter_screenutil/flutter_screenutil.dart';
  7. import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
  8. import 'package:lottie/lottie.dart';
  9. import 'package:get/get.dart';
  10. import 'package:clean/router/app_pages.dart';
  11. void photoDeleteFinishDialog() {
  12. const tag = 'photoDeleteFinishDialog';
  13. // 300ms后关闭弹窗
  14. Future.delayed(Duration(milliseconds: 1500), () {
  15. SmartDialog.dismiss(tag: tag);
  16. // 回到首页
  17. Get.until((route) => Get. currentRoute ==RoutePath.mainTab);
  18. });
  19. SmartDialog.show(
  20. tag: tag,
  21. backType: SmartBackType.block,
  22. clickMaskDismiss: false,
  23. maskColor: ColorName.black,
  24. builder: (_) {
  25. return Container(
  26. height: double.infinity,
  27. width: double.infinity,
  28. child: Stack(
  29. children: [
  30. Positioned(
  31. top: 176.h,
  32. left: 0,
  33. right: 0,
  34. child: Column(
  35. children: [
  36. Column(
  37. crossAxisAlignment: CrossAxisAlignment.center,
  38. mainAxisAlignment: MainAxisAlignment.center,
  39. children: [
  40. Assets.images.iconPreviewSwiperEndFinish.image(
  41. width: 180.w,
  42. height: 180.w,
  43. ),
  44. Text(
  45. 'Perfect!',
  46. textAlign: TextAlign.center,
  47. style: TextStyle(
  48. color: Colors.white,
  49. fontSize: 32.sp,
  50. fontWeight: FontWeight.w700,
  51. ),
  52. ),
  53. SizedBox(height: 16.h),
  54. SizedBox(
  55. child: Row(
  56. mainAxisAlignment: MainAxisAlignment.center,
  57. children: [
  58. Container(
  59. clipBehavior: Clip.antiAlias,
  60. decoration: BoxDecoration(),
  61. child: Assets
  62. .images.iconPreviewSwiperEndFirework
  63. .image(
  64. width: 40.w,
  65. height: 40.w,
  66. ),
  67. ),
  68. SizedBox(width: 4.w),
  69. Text(
  70. 'Photos Removed',
  71. textAlign: TextAlign.center,
  72. style: TextStyle(
  73. color: Colors.white.withValues(alpha: 0.8),
  74. fontSize: 16.sp,
  75. fontWeight: FontWeight.w400,
  76. ),
  77. ),
  78. SizedBox(width: 4.w),
  79. Container(
  80. clipBehavior: Clip.antiAlias,
  81. decoration: BoxDecoration(),
  82. child: Assets
  83. .images.iconPreviewSwiperEndFirework
  84. .image(
  85. width: 40.w,
  86. height: 40.w,
  87. ),
  88. ),
  89. ],
  90. ),
  91. ),
  92. ],
  93. ),
  94. ],
  95. )),
  96. IgnorePointer(
  97. child: Assets.images.bgPreviewSwiperEndFirework.image(
  98. width: 360.w,
  99. height: 234.h,
  100. ),
  101. ),
  102. ],
  103. ),
  104. );
  105. });
  106. }