import 'package:clean/resource/assets.gen.dart'; import 'package:clean/resource/colors.gen.dart'; import 'package:flutter/Material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; void photoPreviewTipDialog({VoidCallback? clickCallback}) { const tag = 'photoPreviewTipDialog'; SmartDialog.show( tag: tag, backType: SmartBackType.block, onDismiss: () { clickCallback?.call(); }, clickMaskDismiss: true, maskColor: ColorName.black70, builder: (_) { return SizedBox( width: 360.w, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Assets.images.iconPhotoPreviewTip .image(width: 360.w, height: 314.h), SizedBox(height: 66.h), GestureDetector( onTap: () { clickCallback?.call(); SmartDialog.dismiss(tag: tag); }, child: Container( width: 134.w, height: 40.h, decoration: ShapeDecoration( color: Color(0xFF0279FB), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.r), ), ), child: Center( child: Text( 'Try Clean-up', textAlign: TextAlign.center, style: TextStyle( color: Colors.white, fontSize: 16.sp, fontWeight: FontWeight.w500, ), ), ), ), ) ], ), ); }); }