photo_preview_tip_dialog.dart 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. void photoPreviewTipDialog({VoidCallback? clickCallback}) {
  8. const tag = 'photoPreviewTipDialog';
  9. SmartDialog.show(
  10. tag: tag,
  11. backType: SmartBackType.block,
  12. clickMaskDismiss: false,
  13. maskColor: ColorName.black70,
  14. builder: (_) {
  15. return SizedBox(
  16. width: 360.w,
  17. child: Column(
  18. mainAxisAlignment: MainAxisAlignment.center,
  19. children: [
  20. Assets.images.iconPhotoPreviewTip
  21. .image(width: 360.w, height: 314.h),
  22. SizedBox(height: 66.h),
  23. GestureDetector(
  24. onTap: () {
  25. clickCallback?.call();
  26. SmartDialog.dismiss(tag: tag);
  27. },
  28. child: Container(
  29. width: 134.w,
  30. height: 40.h,
  31. decoration: ShapeDecoration(
  32. color: Color(0xFF0279FB),
  33. shape: RoundedRectangleBorder(
  34. borderRadius: BorderRadius.circular(10.r),
  35. ),
  36. ),
  37. child: Center(
  38. child: Text(
  39. 'Try Clean-up',
  40. textAlign: TextAlign.center,
  41. style: TextStyle(
  42. color: Colors.white,
  43. fontSize: 16.sp,
  44. fontWeight: FontWeight.w500,
  45. ),
  46. ),
  47. ),
  48. ),
  49. )
  50. ],
  51. ),
  52. );
  53. });
  54. }