mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix on loading
This commit is contained in:
@@ -39,29 +39,32 @@ void showLoading(String text, BuildContext context) {
|
||||
return;
|
||||
}
|
||||
EasyLoading.showWidget(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(child: CircularProgressIndicator()),
|
||||
SizedBox(height: 20),
|
||||
Center(
|
||||
child:
|
||||
Text(Translator.call(text), style: TextStyle(fontSize: 15))),
|
||||
SizedBox(height: 20),
|
||||
Center(
|
||||
child: TextButton(
|
||||
style: flatButtonStyle,
|
||||
onPressed: () {
|
||||
// with out loadingCancelCallback, we can see unexpected input password
|
||||
// dialog shown in home, no clue why, so use this as workaround
|
||||
// why no such issue on android?
|
||||
if (loadingCancelCallback != null) loadingCancelCallback();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(Translator.call('Cancel'),
|
||||
style: TextStyle(color: MyTheme.accent))))
|
||||
],
|
||||
),
|
||||
Container(
|
||||
constraints: BoxConstraints(maxWidth: 300),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(child: CircularProgressIndicator()),
|
||||
SizedBox(height: 20),
|
||||
Center(
|
||||
child: Text(Translator.call(text),
|
||||
style: TextStyle(fontSize: 15))),
|
||||
SizedBox(height: 20),
|
||||
Center(
|
||||
child: TextButton(
|
||||
style: flatButtonStyle,
|
||||
onPressed: () {
|
||||
// with out loadingCancelCallback, we can see unexpected input password
|
||||
// dialog shown in home, no clue why, so use this as workaround
|
||||
// why no such issue on android?
|
||||
if (loadingCancelCallback != null)
|
||||
loadingCancelCallback();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(Translator.call('Cancel'),
|
||||
style: TextStyle(color: MyTheme.accent))))
|
||||
],
|
||||
)),
|
||||
maskType: EasyLoadingMaskType.black);
|
||||
}
|
||||
|
||||
@@ -138,18 +141,20 @@ void msgbox(String type, String title, String text, BuildContext context,
|
||||
}));
|
||||
}
|
||||
EasyLoading.showWidget(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(Translator.call(title), style: TextStyle(fontSize: 21)),
|
||||
SizedBox(height: 20),
|
||||
Text(Translator.call(text), style: TextStyle(fontSize: 15)),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: buttons,
|
||||
)
|
||||
],
|
||||
),
|
||||
Container(
|
||||
constraints: BoxConstraints(maxWidth: 300),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(Translator.call(title), style: TextStyle(fontSize: 21)),
|
||||
SizedBox(height: 20),
|
||||
Text(Translator.call(text), style: TextStyle(fontSize: 15)),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: buttons,
|
||||
)
|
||||
],
|
||||
)),
|
||||
maskType: EasyLoadingMaskType.black);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user