Browse Source

[fix]修复按钮溢出问题

zk 1 year ago
parent
commit
45b95592c9
2 changed files with 9 additions and 12 deletions
  1. 8 8
      lib/dialog/talk_delete_dialog.dart
  2. 1 4
      lib/popup/talk_popup.dart

+ 8 - 8
lib/dialog/talk_delete_dialog.dart

@@ -14,14 +14,14 @@ void talkDeleteDialog(String? talkId, String? talkTitle,
     {TalkDeleteBuilder? returnBuilder}) {
     {TalkDeleteBuilder? returnBuilder}) {
   SmartDialog.show(
   SmartDialog.show(
       builder: (_) {
       builder: (_) {
-        return IntrinsicHeight(
-          child: Container(
-            padding: EdgeInsets.all(16.w),
-            width: 280.w,
-            decoration: BoxDecoration(
-              color: Colors.white,
-              borderRadius: BorderRadius.circular(12),
-            ),
+        return Container(
+          padding: EdgeInsets.all(16.w),
+          width: 280.w,
+          decoration: BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.circular(12),
+          ),
+          child: IntrinsicHeight(
             child: Column(
             child: Column(
               children: [
               children: [
                 SizedBox(height: 24.h),
                 SizedBox(height: 24.h),

+ 1 - 4
lib/popup/talk_popup.dart

@@ -15,11 +15,8 @@ void showTalkPopup(Offset offset, Alignment alignment,
     {VoidCallback? onRename, VoidCallback? onDelete}) {
     {VoidCallback? onRename, VoidCallback? onDelete}) {
   SmartDialog.showAttach(
   SmartDialog.showAttach(
     targetContext: null,
     targetContext: null,
-    targetBuilder: (targetOffset, targetSize) {
-      return offset;
-    },
+    targetBuilder: (_, __) => offset,
     animationType: SmartAnimationType.fade,
     animationType: SmartAnimationType.fade,
-    usePenetrate: true,
     clickMaskDismiss: true,
     clickMaskDismiss: true,
     alignment: alignment,
     alignment: alignment,
     maskColor: Colors.transparent,
     maskColor: Colors.transparent,