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