wrongPasswordDialog

This commit is contained in:
open-trade 2020-11-16 22:12:32 +08:00
parent eb1720c0cd
commit b195b649a3

View File

@ -117,10 +117,14 @@ void dismissLoading() {
EasyLoading.dismiss();
}
void enterPasswordDialog(String id, BuildContext context) {
void showSuccess(String text) {
EasyLoading.showSuccess(text);
}
AlertDialog enterPasswordDialog(String id, BuildContext context) {
var ffi = Provider.of<FfiModel>(context);
var remember = ffi.getByName("remember", arg: id) == "true";
AlertDialog(
return AlertDialog(
title: Text('Please enter your password'),
contentPadding: EdgeInsets.zero,
content: Column(
@ -157,3 +161,26 @@ void enterPasswordDialog(String id, BuildContext context) {
],
);
}
AlertDialog wrongPasswordDialog(String id, BuildContext context) {
return AlertDialog(
title: Text('Please enter your password'),
contentPadding: EdgeInsets.zero,
content: Text('Do you want to enter again?'),
actions: [
FlatButton(
textColor: MyTheme.accent,
onPressed: () => Navigator.pop(context),
child: Text('Cancel'),
),
FlatButton(
textColor: MyTheme.accent,
onPressed: () {
Navigator.pop(context);
enterPasswordDialog(id, context);
},
child: Text('Retry'),
),
],
);
}