talk_add_template_popup.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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:
  29. Assets.images.iconTriangular.image(width: 18.w, height: 8.w),
  30. ),
  31. ),
  32. Container(
  33. height: 58.h,
  34. width: 146.w,
  35. decoration: BoxDecoration(
  36. color: ColorName.colorPrimary,
  37. borderRadius: BorderRadius.circular(8.w),
  38. ),
  39. child: Center(
  40. child: Text(
  41. StringName.talkTemplateAddPopupContentTxt.tr,
  42. style: TextStyle(fontSize: 14.sp, color: Colors.white),
  43. ),
  44. ),
  45. )
  46. ],
  47. );
  48. },
  49. );
  50. }