analyse_status_dialog.dart 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
  4. import 'package:get/get.dart';
  5. import '../resource/colors.gen.dart';
  6. import '../resource/string.gen.dart';
  7. showAnalyseSuccessDialog({VoidCallback? onViewClick}) async {
  8. const String tag = 'showAnalyseSuccessDialog';
  9. SmartDialog.show(
  10. tag: tag,
  11. permanent: true,
  12. clickMaskDismiss: false,
  13. usePenetrate: true,
  14. maskColor: Colors.transparent,
  15. alignment: const Alignment(0, 0.68),
  16. builder: (_) => GestureDetector(
  17. onTap: () {
  18. onViewClick?.call();
  19. SmartDialog.dismiss(tag: tag, force: true);
  20. },
  21. child: Container(
  22. decoration: BoxDecoration(
  23. color: ColorName.black70,
  24. borderRadius: BorderRadius.circular(8),
  25. ),
  26. padding: EdgeInsets.symmetric(horizontal: 18.w, vertical: 8.w),
  27. child: IntrinsicWidth(
  28. child: Row(
  29. children: [
  30. Text(StringName.talkAnalysisSuccess.tr,
  31. style:
  32. TextStyle(fontSize: 14.sp, color: ColorName.white)),
  33. SizedBox(width: 10.w),
  34. Container(
  35. decoration: BoxDecoration(
  36. color: ColorName.colorPrimary,
  37. borderRadius: BorderRadius.circular(6),
  38. ),
  39. padding: EdgeInsets.symmetric(
  40. horizontal: 12.w, vertical: 6.w),
  41. child: Text(
  42. StringName.talkAnalysisSuccessBtnTxt.tr,
  43. style: TextStyle(
  44. fontSize: 13.sp,
  45. color: ColorName.white,
  46. height: 1),
  47. ))
  48. ],
  49. ),
  50. ),
  51. ),
  52. ));
  53. await Future.delayed(const Duration(seconds: 5));
  54. SmartDialog.dismiss(tag: tag, force: true);
  55. }