add cancel button for showLoading
This commit is contained in:
parent
035934cd99
commit
795f97c2b6
@ -43,7 +43,28 @@ final ButtonStyle flatButtonStyle = TextButton.styleFrom(
|
|||||||
void showLoading(String text) {
|
void showLoading(String text) {
|
||||||
DialogManager.reset();
|
DialogManager.reset();
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
EasyLoading.show(status: text, maskType: EasyLoadingMaskType.black);
|
EasyLoading.show(
|
||||||
|
indicator: Container(
|
||||||
|
constraints: BoxConstraints(maxWidth: 240),
|
||||||
|
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: () {
|
||||||
|
EasyLoading.dismiss();
|
||||||
|
backToHome();
|
||||||
|
},
|
||||||
|
child: Text(Translator.call('Cancel'),
|
||||||
|
style: TextStyle(color: MyTheme.accent))))
|
||||||
|
])),
|
||||||
|
maskType: EasyLoadingMaskType.black);
|
||||||
}
|
}
|
||||||
|
|
||||||
backToHome() {
|
backToHome() {
|
||||||
|
@ -306,12 +306,16 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
onPressed: changeTouchMode,
|
onPressed: changeTouchMode,
|
||||||
)
|
)
|
||||||
]) +
|
]) +
|
||||||
<Widget>[
|
(isWeb
|
||||||
|
? []
|
||||||
|
: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: Icon(Icons.message),
|
icon: Icon(Icons.message),
|
||||||
onPressed: toggleChatOverlay,
|
onPressed: toggleChatOverlay,
|
||||||
),
|
)
|
||||||
|
]) +
|
||||||
|
[
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: Icon(Icons.more_vert),
|
icon: Icon(Icons.more_vert),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user