feat: detail product dialog

This commit is contained in:
efrilm
2025-08-01 01:40:33 +07:00
parent f3e6d49a27
commit 7a6da0397b
4 changed files with 177 additions and 87 deletions
+19 -10
View File
@@ -8,13 +8,22 @@ class CustomModalDialog extends StatelessWidget {
final String? subtitle;
final Widget child;
final VoidCallback? onClose;
final double? minWidth;
final double? maxWidth;
final double? minHeight;
final double? maxHeight;
const CustomModalDialog(
{super.key,
required this.title,
this.subtitle,
required this.child,
this.onClose});
const CustomModalDialog({
super.key,
required this.title,
this.subtitle,
required this.child,
this.onClose,
this.minWidth,
this.maxWidth,
this.minHeight,
this.maxHeight,
});
@override
Widget build(BuildContext context) {
@@ -25,10 +34,10 @@ class CustomModalDialog extends StatelessWidget {
),
child: ConstrainedBox(
constraints: BoxConstraints(
minWidth: context.deviceWidth * 0.3,
maxWidth: context.deviceWidth * 0.8,
minHeight: context.deviceHeight * 0.3,
maxHeight: context.deviceHeight * 0.8,
minWidth: minWidth ?? context.deviceWidth * 0.3,
maxWidth: maxWidth ?? context.deviceWidth * 0.8,
minHeight: minHeight ?? context.deviceHeight * 0.3,
maxHeight: maxHeight ?? context.deviceHeight * 0.8,
),
child: IntrinsicWidth(
child: Column(