rflutter_alert
rflutter_alert copied to clipboard
Constraints does not work
When I use the constraints param, it does not take effect and it still takes the content width, looks weird on tablets
Anyone know how to deal with this?
+1
@armandojimenez can you share your constraints added code?
constraints: const BoxConstraints(maxWidth: 400),
Nothing I try works
I was able to fix this by playing around with alertPadding in AlertStyle BoxConstraints width parameters still don't work, but the alert was able to fit full device width. You can control the width using alertPadding parameter in AlertStyle
Alert(
context: context,
style: AlertStyle(
alertPadding: EdgeInsets.symmetric(horizontal: 20),
// minWidth doesn't work
constraints: BoxConstraints(
minHeight: 0.6 * height,
minWidth: 0.9 * width,
),
),
);
I was able to fix this by playing around with alertPadding in AlertStyle BoxConstraints width parameters still don't work, but the alert was able to fit full device width. You can control the width using alertPadding parameter in AlertStyle
Alert( context: context, style: AlertStyle( alertPadding: EdgeInsets.symmetric(horizontal: 20), // minWidth doesn't work constraints: BoxConstraints( minHeight: 0.6 * height, minWidth: 0.9 * width, ), ), );
With this the dialog does not full expand to the content width?
The problem is with tablets, boxConstraints does not work for max height and width
Is this going to be worked on? Its easy reproducible, the constraint param does not work, add a long text to the description param and use a tablet, the dialog will extend the width of the text
Example, the dialog is taking the width of the string passed to desc param, also happens with the title.
my constrain code:
constraints: const BoxConstraints(maxWidth: 400),
Nothing works in terms of param.
Hi,
I have the same issue. BoxContrains is not working
@armandojimenez this will be fixed in next version: V2.0.6