used expression functions where possible

This commit is contained in:
shilangyu 2020-09-08 16:38:59 +02:00
parent 81b10cf3e3
commit 8eb31434e2
1 changed files with 2 additions and 6 deletions

View File

@ -178,9 +178,7 @@ class _AccountsConfigAddInstanceDialog extends HookWidget {
actions: <Widget>[
FlatButton(
child: Text('Cancel'),
onPressed: () {
Navigator.of(context).pop();
},
onPressed: () => Navigator.of(context).pop(),
),
FlatButton(
child: !loading.value ? Text('Add') : CircularProgressIndicator(),
@ -252,9 +250,7 @@ class _AccountsConfigAddAccountDialog extends HookWidget {
actions: <Widget>[
FlatButton(
child: Text('Cancel'),
onPressed: () {
Navigator.of(context).pop();
},
onPressed: () => Navigator.of(context).pop(),
),
FlatButton(
child: !loading.value ? Text('Add') : CircularProgressIndicator(),