Forráskód Böngészése

工作列表 卡片底部按钮组 宽度溢出问题修复

glglove 15 órája%!(EXTRA string=)
szülő
commit
4b97d5c360

+ 4 - 0
packages/cpt_uk/lib/modules/job/job_applied/applied_staff_item.dart

@@ -447,6 +447,7 @@ class AppliedStaffItem extends StatelessWidget {
                         "#FFBB1B",
                       ),
                       radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
                       minWidth: 60,
                       minHeight: 35,
                     ).marginOnly(left: 12),
@@ -466,6 +467,7 @@ class AppliedStaffItem extends StatelessWidget {
                       textColor: ColorConstants.white,
                       backgroundColor: hexToColor("#FFFFBB1B"),
                       radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
                       minWidth: 60,
                       minHeight: 35,
                     ).marginOnly(left: 12),
@@ -486,6 +488,7 @@ class AppliedStaffItem extends StatelessWidget {
                       textColor: ColorConstants.white,
                       backgroundColor: hexToColor("#0AC074"),
                       radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
                       minWidth: 60,
                       minHeight: 35,
                     ).marginOnly(left: 12),
@@ -505,6 +508,7 @@ class AppliedStaffItem extends StatelessWidget {
                       textColor: ColorConstants.white,
                       backgroundColor: hexToColor("#56AAFF"),
                       radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
                       minWidth: 60,
                       minHeight: 35,
                     ).marginOnly(left: 12),

+ 63 - 50
packages/cpt_uk/lib/modules/job/labour_request_list/labour_request_item.dart

@@ -417,6 +417,7 @@ class LabourRequestItem extends StatelessWidget {
                       "#C009FC",
                     ),
                     radius: 17.25,
+                    padding: const EdgeInsets.symmetric(horizontal: 8),
                     minWidth: 60,
                     minHeight: 35,
                   ).marginOnly(left: 12),
@@ -425,71 +426,83 @@ class LabourRequestItem extends StatelessWidget {
                 //详情按钮
                 Visibility(
                   visible: item.actionList?.contains("detail") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onDetailAction?.call();
-                    },
-                    text: "Detail".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor(
-                      "#56AAFF",
-                    ),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onDetailAction?.call();
+                      },
+                      text: "Detail".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor(
+                        "#56AAFF",
+                      ),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //Recall按钮
                 Visibility(
                   visible: item.actionList?.contains("recall") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onRecallAction?.call();
-                    },
-                    text: "Recall".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#FFBB1B"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onRecallAction?.call();
+                      },
+                      text: "Recall".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#FFBB1B"),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //Edit按钮
                 Visibility(
                   visible: item.actionList?.contains("edit") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onEditAction?.call();
-                    },
-                    text: "Edit".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#FFBB1B"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onEditAction?.call();
+                      },
+                      text: "Edit".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#FFBB1B"),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //状态工作流按钮
                 Visibility(
                   visible: item.actionList?.contains("status") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onStatusAction?.call();
-                    },
-                    text: "Status".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#0AC074"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onStatusAction?.call();
+                      },
+                      text: "Status".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#0AC074"),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
               ],
             ).marginOnly(top: 18, bottom: 2),

+ 47 - 38
packages/cpt_uk/lib/modules/review/labour_review_list/labour_review_item.dart

@@ -318,54 +318,63 @@ class LabourReviewItem extends StatelessWidget {
                 //详情按钮
                 Visibility(
                   visible: false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onDetailAction?.call();
-                    },
-                    text: "Detail".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor(
-                      "#56AAFF",
-                    ),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onDetailAction?.call();
+                      },
+                      text: "Detail".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor(
+                        "#56AAFF",
+                      ),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //Edit按钮
                 Visibility(
                   visible: true,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onEditAction?.call();
-                    },
-                    text: "Edit".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#FFBB1B"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onEditAction?.call();
+                      },
+                      text: "Edit".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#FFBB1B"),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //状态工作流按钮
                 Visibility(
                   visible: true,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onStatusAction?.call();
-                    },
-                    text: "Status".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#0AC074"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onStatusAction?.call();
+                      },
+                      text: "Status".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#0AC074"),
+                      radius: 17.25,
+                      padding: const EdgeInsets.symmetric(horizontal: 8),
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
               ],
             ).marginOnly(top: 18, bottom: 2),