photo_preview_tip_dialog.dart 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import 'package:clean/resource/assets.gen.dart';
  2. import 'package:clean/resource/colors.gen.dart';
  3. import 'package:flutter/Material.dart';
  4. import 'package:flutter/cupertino.dart';
  5. import 'package:flutter_screenutil/flutter_screenutil.dart';
  6. import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
  7. import '../data/consts/event_report_id.dart';
  8. import '../handler/event_handler.dart';
  9. void photoPreviewTipDialog({VoidCallback? clickCallback}) {
  10. EventHandler.report(EventId.event_04000);
  11. const tag = 'photoPreviewTipDialog';
  12. SmartDialog.show(
  13. tag: tag,
  14. backType: SmartBackType.block,
  15. onDismiss: () {
  16. clickCallback?.call();
  17. },
  18. clickMaskDismiss: true,
  19. maskColor: ColorName.black70,
  20. builder: (_) {
  21. return SizedBox(
  22. width: 360.w,
  23. child: Column(
  24. mainAxisAlignment: MainAxisAlignment.center,
  25. children: [
  26. Assets.images.iconPhotoPreviewTip
  27. .image(width: 360.w, height: 314.h),
  28. SizedBox(height: 66.h),
  29. GestureDetector(
  30. onTap: () {
  31. clickCallback?.call();
  32. SmartDialog.dismiss(tag: tag);
  33. },
  34. child: Container(
  35. width: 134.w,
  36. height: 40.h,
  37. decoration: ShapeDecoration(
  38. color: Color(0xFF0279FB),
  39. shape: RoundedRectangleBorder(
  40. borderRadius: BorderRadius.circular(10.r),
  41. ),
  42. ),
  43. child: Center(
  44. child: Text(
  45. 'Try Clean-up',
  46. textAlign: TextAlign.center,
  47. style: TextStyle(
  48. color: Colors.white,
  49. fontSize: 16.sp,
  50. fontWeight: FontWeight.w500,
  51. ),
  52. ),
  53. ),
  54. ),
  55. )
  56. ],
  57. ),
  58. );
  59. });
  60. }