Update then statement in StatMainCard's onPressed callback

The onPressed callback of StatMainCard's RaisedButton now has a then statement with a more explicit syntax. The getStatistic method of the state object is still being called after the user taps the button.
This commit is contained in:
MohammadTaha Basiri 2024-04-01 19:52:44 +03:30
parent 5ff143add0
commit 0b9e57e654
1 changed files with 3 additions and 1 deletions

View File

@ -233,7 +233,9 @@ class StatMainCard extends StatelessWidget {
'label': statistic.label, 'label': statistic.label,
'title': statistic.title, 'title': statistic.title,
'marked': statistic.marked, 'marked': statistic.marked,
}).then((value) => state.getStatistic()) }).then(
(value) => state.getStatistic(),
)
: null, : null,
child: Padding( child: Padding(
padding: const EdgeInsets.all(4.0), padding: const EdgeInsets.all(4.0),