feat: detail product dialog
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user