CustomAlertDialog default BoxConstraints
This commit is contained in:
parent
deedac3497
commit
d11ae197f3
@ -561,6 +561,7 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
required this.content,
|
||||
this.actions,
|
||||
this.contentPadding,
|
||||
this.contentBoxConstraints = const BoxConstraints(maxWidth: 500),
|
||||
this.onSubmit,
|
||||
this.onCancel})
|
||||
: super(key: key);
|
||||
@ -569,6 +570,7 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
final Widget content;
|
||||
final List<Widget>? actions;
|
||||
final double? contentPadding;
|
||||
final BoxConstraints contentBoxConstraints;
|
||||
final Function()? onSubmit;
|
||||
final Function()? onCancel;
|
||||
|
||||
@ -600,7 +602,8 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
title: title,
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: contentPadding ?? 25, vertical: 10),
|
||||
content: content,
|
||||
content:
|
||||
ConstrainedBox(constraints: contentBoxConstraints, child: content),
|
||||
actions: actions,
|
||||
),
|
||||
);
|
||||
@ -645,9 +648,7 @@ void msgBox(
|
||||
}
|
||||
dialogManager.show((setState, close) => CustomAlertDialog(
|
||||
title: _msgBoxTitle(title),
|
||||
content: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 500),
|
||||
child: Text(translate(text), style: const TextStyle(fontSize: 15))),
|
||||
content: Text(translate(text), style: const TextStyle(fontSize: 15)),
|
||||
actions: buttons,
|
||||
onSubmit: hasOk ? submit : null,
|
||||
onCancel: hasCancel == true ? cancel : null,
|
||||
|
@ -570,6 +570,8 @@ class FileModel extends ChangeNotifier {
|
||||
Text(title)
|
||||
],
|
||||
),
|
||||
contentBoxConstraints:
|
||||
BoxConstraints(minHeight: 100, minWidth: 400, maxWidth: 400),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@ -627,6 +629,8 @@ class FileModel extends ChangeNotifier {
|
||||
Text(title)
|
||||
],
|
||||
),
|
||||
contentBoxConstraints:
|
||||
BoxConstraints(minHeight: 100, minWidth: 400, maxWidth: 400),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
@ -268,6 +268,7 @@ class FfiModel with ChangeNotifier {
|
||||
if (isPeerAndroid) {
|
||||
_touchMode = true;
|
||||
if (parent.target != null &&
|
||||
parent.target!.connType == ConnType.defaultConn &&
|
||||
parent.target!.ffiModel.permissions['keyboard'] != false) {
|
||||
Timer(
|
||||
const Duration(milliseconds: 100),
|
||||
|
Loading…
Reference in New Issue
Block a user