[SYNC] Altered the dialog helper to center.
This commit is contained in:
@@ -17,43 +17,68 @@ class AstromicDialogHelper {
|
|||||||
context: context,
|
context: context,
|
||||||
useSafeArea: configuration.safeAreaAware,
|
useSafeArea: configuration.safeAreaAware,
|
||||||
builder: (BuildContext _) {
|
builder: (BuildContext _) {
|
||||||
return Container(
|
return Dialog(
|
||||||
margin: style.placement,
|
backgroundColor: Colors.transparent,
|
||||||
//
|
insetPadding: style.placement?.resolve(style.textDirection) ?? const EdgeInsets.symmetric(horizontal: 40, vertical: 24),
|
||||||
child: Column(
|
child: Stack(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(
|
Container(
|
||||||
mainAxisSize: MainAxisSize.min,
|
width: style.width,
|
||||||
children: <Widget>[
|
padding: style.contentPadding,
|
||||||
Stack(
|
decoration: BoxDecoration(
|
||||||
children: [
|
color: style.backgroundColor,
|
||||||
Container(
|
borderRadius: style.radius,
|
||||||
width: (style.width ?? 0) - ((style.placement?.start ?? 0) + (style.placement?.start ?? 0)),
|
),
|
||||||
//
|
child: contentSection,
|
||||||
padding: style.contentPadding,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: style.backgroundColor,
|
|
||||||
borderRadius: style.radius,
|
|
||||||
),
|
|
||||||
child: contentSection,
|
|
||||||
),
|
|
||||||
if (stackedCloseWidget != null)
|
|
||||||
Positioned.directional(
|
|
||||||
textDirection: style.textDirection,
|
|
||||||
start: style.closeWidgetPlacement?.start,
|
|
||||||
end: style.closeWidgetPlacement?.end,
|
|
||||||
top: style.closeWidgetPlacement?.top,
|
|
||||||
//
|
|
||||||
child: stackedCloseWidget,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
if (stackedCloseWidget != null)
|
||||||
|
Positioned.directional(
|
||||||
|
textDirection: style.textDirection,
|
||||||
|
start: style.closeWidgetPlacement?.start,
|
||||||
|
end: style.closeWidgetPlacement?.end,
|
||||||
|
top: style.closeWidgetPlacement?.top,
|
||||||
|
child: stackedCloseWidget,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// Container(
|
||||||
|
// margin: style.placement,
|
||||||
|
// //
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: <Widget>[
|
||||||
|
// Row(
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: <Widget>[
|
||||||
|
// Stack(
|
||||||
|
// children: [
|
||||||
|
// Container(
|
||||||
|
// width: (style.width ?? 0) - ((style.placement?.start ?? 0) + (style.placement?.start ?? 0)),
|
||||||
|
// //
|
||||||
|
// padding: style.contentPadding,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: style.backgroundColor,
|
||||||
|
// borderRadius: style.radius,
|
||||||
|
// ),
|
||||||
|
// child: contentSection,
|
||||||
|
// ),
|
||||||
|
// if (stackedCloseWidget != null)
|
||||||
|
// Positioned.directional(
|
||||||
|
// textDirection: style.textDirection,
|
||||||
|
// start: style.closeWidgetPlacement?.start,
|
||||||
|
// end: style.closeWidgetPlacement?.end,
|
||||||
|
// top: style.closeWidgetPlacement?.top,
|
||||||
|
// //
|
||||||
|
// child: stackedCloseWidget,
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user