photo_preview_tip_dialog.dart 1.9 KB

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