Convert error dialogs to lowercase

This commit is contained in:
Vishnu Mohandas 2021-01-08 22:36:52 +05:30
parent 8f17f3d4bf
commit e86e38739a
5 changed files with 13 additions and 14 deletions

View file

@ -52,8 +52,8 @@ class UserService {
} else if (response.statusCode == 403) {
showErrorDialog(
context,
"Please wait...",
"We are currently not accepting new registrations. You have been added to the waitlist and we will let you know once we are ready for you.",
"please wait...",
"we are currently not accepting new registrations. you have been added to the waitlist and we will let you know once we are ready for you.",
);
}
} else {
@ -114,7 +114,7 @@ class UserService {
);
} else {
showErrorDialog(
context, "Oops.", "Verification failed, please try again.");
context, "oops", "verification failed, please try again");
}
});
}

View file

@ -181,8 +181,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
onPressed: _email != null && _name != null
? () {
if (!isValidEmail(_email)) {
showErrorDialog(context, "Invalid email address",
"Please enter a valid email address.");
showErrorDialog(context, "invalid email address",
"please enter a valid email address.");
return;
}
_config.setEmail(_email);

View file

@ -118,8 +118,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
? () {
if (_passwordController1.text !=
_passwordController2.text) {
showErrorDialog(context, "Uhm...",
"The passwords you entered don't match.");
showErrorDialog(context, "uhm...",
"the passwords you entered don't match");
} else {
_showPasswordConfirmationDialog();
}

View file

@ -149,15 +149,15 @@ class _SharingDialogState extends State<SharingDialog> {
String publicKey,
}) async {
if (!isValidEmail(email)) {
showErrorDialog(context, "Invalid email address",
"Please enter a valid email address.");
showErrorDialog(context, "invalid email address",
"please enter a valid email address.");
return;
} else if (email == Configuration.instance.getEmail()) {
showErrorDialog(context, "Oops", "You cannot share with yourself.");
showErrorDialog(context, "oops", "you cannot share with yourself");
return;
} else if (widget.collection.sharees.any((user) => user.email == email)) {
showErrorDialog(
context, "Oops", "You're already sharing this with " + email + ".");
context, "oops", "you're already sharing this with " + email);
return;
}
if (publicKey == null) {

View file

@ -27,7 +27,7 @@ void showErrorDialog(BuildContext context, String title, String content) {
content: Text(content),
actions: [
FlatButton(
child: Text("OK"),
child: Text("ok"),
onPressed: () {
Navigator.of(context).pop();
},
@ -44,6 +44,5 @@ void showErrorDialog(BuildContext context, String title, String content) {
}
void showGenericErrorDialog(BuildContext context) {
showErrorDialog(
context, "Oops.", "Sorry, something went wrong. Please try again.");
showErrorDialog(context, "something went wrong", "please try again.");
}