refactor: Magic numbers

This commit is contained in:
Krille Fear 2021-10-26 18:47:05 +02:00
commit f114d545f7
8 changed files with 63 additions and 54 deletions

View file

@ -155,10 +155,7 @@ class _KeyVerificationPageState extends State<KeyVerificationDialog> {
);
buttons.add(AdaptiveFlatButton(
label: L10n.of(context).submit,
onPressed: () {
input = textEditingController.text;
checkInput(input);
},
onPressed: () => checkInput(textEditingController.text),
));
buttons.add(AdaptiveFlatButton(
label: L10n.of(context).skip,
@ -207,11 +204,9 @@ class _KeyVerificationPageState extends State<KeyVerificationDialog> {
buttons.add(AdaptiveFlatButton(
label: L10n.of(context).reject,
textColor: Colors.red,
onPressed: () {
widget.request.rejectVerification().then((_) {
Navigator.of(context, rootNavigator: false).pop();
});
},
onPressed: () => widget.request
.rejectVerification()
.then((_) => Navigator.of(context, rootNavigator: false).pop()),
));
buttons.add(AdaptiveFlatButton(
label: L10n.of(context).accept,