fix on loading
This commit is contained in:
parent
16218a731b
commit
1d7933621d
@ -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);
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,7 @@ void initializeCursorAndCanvas() async {
|
||||
}
|
||||
|
||||
String translate(String name) {
|
||||
if (name.startsWith('Failed') && name.contains(':')) {
|
||||
if (name.startsWith('Failed to') && name.contains(': ')) {
|
||||
return name.split(': ').map((x) => translate(x)).join(': ');
|
||||
}
|
||||
var a = 'translate';
|
||||
|
Loading…
x
Reference in New Issue
Block a user