opt: adjust msgbox text width, passwordDialog support enter && esc

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-29 10:48:27 +08:00
parent 9d8032e5e7
commit 172091602a
2 changed files with 21 additions and 13 deletions

View File

@@ -642,7 +642,9 @@ void msgBox(
}
dialogManager.show((setState, close) => CustomAlertDialog(
title: _msgBoxTitle(title),
content: Text(translate(text), style: const TextStyle(fontSize: 15)),
content: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 500),
child: Text(translate(text), style: const TextStyle(fontSize: 15))),
actions: buttons,
onSubmit: hasOk ? submit : null,
onCancel: hasCancel == true ? cancel : null,