mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-04 02:11:26 +03:00
fix msgbox hasCancel and home id editor focus problem
This commit is contained in:
@@ -61,19 +61,22 @@ Future<T> showAlertDialog<T>(BuildContext context, BuildAlertDailog build,
|
||||
}
|
||||
|
||||
void msgbox(String type, String title, String text, BuildContext context,
|
||||
[hasCancel = false]) {
|
||||
[bool hasCancel]) {
|
||||
if (hasCancel == null) {
|
||||
hasCancel = type != 'error';
|
||||
}
|
||||
showAlertDialog(
|
||||
context,
|
||||
(_) => Tuple3(Text(title), Text(text), [
|
||||
hasCancel
|
||||
? Spacer()
|
||||
: FlatButton(
|
||||
? FlatButton(
|
||||
textColor: MyTheme.accent,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text('Cancel'),
|
||||
),
|
||||
)
|
||||
: Spacer(),
|
||||
FlatButton(
|
||||
textColor: MyTheme.accent,
|
||||
onPressed: () {
|
||||
|
||||
Reference in New Issue
Block a user