Merge pull request #150 from SyncrowIOT/SP-1440-FE-On-routine-creation-edit-Page-When-saving-a-routine-the-confirmation-pop-up-is-not-identical-to-design

Sp 1440 fe on routine creation edit page when saving a routine the confirmation pop up is not identical to design
This commit is contained in:
Faris Armoush
2025-04-21 18:59:37 +03:00
committed by GitHub
4 changed files with 235 additions and 136 deletions

View File

@ -28,32 +28,40 @@ class DialogFooter extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildFooterButton(
context: context,
DialogFooterButton(
text: 'Cancel',
onTap: onCancel,
),
if (isConfirmEnabled) ...[
Container(width: 1, height: 50, color: ColorsManager.greyColor),
_buildFooterButton(
context: context,
DialogFooterButton(
text: 'Confirm',
onTap: onConfirm,
textColor:
isConfirmEnabled ? ColorsManager.primaryColorWithOpacity : Colors.red,
textColor: isConfirmEnabled
? ColorsManager.primaryColorWithOpacity
: Colors.red,
),
],
],
),
);
}
}
Widget _buildFooterButton({
required BuildContext context,
required String text,
required VoidCallback? onTap,
Color? textColor,
}) {
class DialogFooterButton extends StatelessWidget {
const DialogFooterButton({
required this.text,
required this.onTap,
this.textColor,
super.key,
});
final String text;
final VoidCallback? onTap;
final Color? textColor;
@override
Widget build(BuildContext context) {
return Expanded(
child: TextButton(
style: TextButton.styleFrom(

View File

@ -16,6 +16,7 @@ class DialogHeader extends StatelessWidget {
),
Text(
title,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: ColorsManager.primaryColorWithOpacity,
fontWeight: FontWeight.bold,