talk_add_template_popup.dart 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import 'package:electronic_assistant/dialog/add_agenda_dialog.dart';
  2. import 'package:electronic_assistant/resource/assets.gen.dart';
  3. import 'package:electronic_assistant/resource/colors.gen.dart';
  4. import 'package:electronic_assistant/resource/string.gen.dart';
  5. import 'package:flutter/cupertino.dart';
  6. import 'package:flutter/material.dart';
  7. import 'package:flutter_screenutil/flutter_screenutil.dart';
  8. import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
  9. import 'package:get/get.dart';
  10. void talkAddTemplatePopup(BuildContext context) {
  11. SmartDialog.showAttach(
  12. targetContext: context,
  13. targetBuilder: (targetOffset, targetSize) =>
  14. targetOffset + const Offset(20, 6),
  15. animationType: SmartAnimationType.fade,
  16. alignment: Alignment.bottomLeft,
  17. keepSingle: true,
  18. usePenetrate: true,
  19. maskColor: Colors.transparent,
  20. clickMaskDismiss: true,
  21. builder: (_) {
  22. return Column(
  23. children: [
  24. SizedBox(
  25. width: 146.w,
  26. child: Align(
  27. alignment: const Alignment(0.4, 0),
  28. child: SizedBox(
  29. height: 8.h,
  30. child: AspectRatio(
  31. aspectRatio: 60 / 24,
  32. child: Assets.images.iconTriangular.image())),
  33. ),
  34. ),
  35. Container(
  36. height: 58.h,
  37. width: 146.w,
  38. decoration: BoxDecoration(
  39. color: ColorName.colorPrimary,
  40. borderRadius: BorderRadius.circular(8.w),
  41. ),
  42. child: Center(
  43. child: Text(
  44. StringName.talkTemplateAddPopupContentTxt.tr,
  45. style: TextStyle(fontSize: 14.sp, color: Colors.white),
  46. ),
  47. ),
  48. )
  49. ],
  50. );
  51. },
  52. );
  53. }