TF-4178 Implement create new label

This commit is contained in:
dab246
2025-12-09 14:34:06 +07:00
committed by Dat H. Pham
parent 38c47ca373
commit 6c959fcf81
12 changed files with 163 additions and 39 deletions
@@ -8,6 +8,7 @@ class ModalListActionButtonWidget extends StatelessWidget {
final VoidCallback onNegativeAction;
final VoidCallback onPositiveAction;
final EdgeInsetsGeometry? padding;
final bool isPositiveActionEnabled;
const ModalListActionButtonWidget({
super.key,
@@ -15,6 +16,7 @@ class ModalListActionButtonWidget extends StatelessWidget {
required this.negativeLabel,
required this.onPositiveAction,
required this.onNegativeAction,
this.isPositiveActionEnabled = true,
this.padding,
});
@@ -34,9 +36,13 @@ class ModalListActionButtonWidget extends StatelessWidget {
height: 48,
child: ConfirmDialogButton(
label: positiveLabel,
backgroundColor: AppColor.primaryMain,
textColor: Colors.white,
onTapAction: onPositiveAction,
backgroundColor: isPositiveActionEnabled
? AppColor.primaryMain
: AppColor.profileMenuDivider.withValues(alpha: 0.12),
textColor: isPositiveActionEnabled
? Colors.white
: AppColor.m3SurfaceBackground.withValues(alpha: 0.38),
onTapAction: isPositiveActionEnabled ? onPositiveAction : null,
),
);