actions method
Implementation
List<Widget> actions(HcUpgradeMessages appMessages) {
final isBlocked = widget.upgrade.blocked();
final showIgnore = isBlocked ? false : widget.showIgnore;
final showLater = isBlocked ? false : widget.showLater;
return <Widget>[
if (showIgnore)
TextButton(
child: Text(
appMessages.message(HcUpgradeMessage.buttonTitleIgnore) ?? ''),
onPressed: () {
// Save the date/time as the last time alerted.
widget.upgrade.saveLastAlerted();
onUserIgnored();
forceRebuild();
}),
if (showLater)
TextButton(
child: Text(
appMessages.message(HcUpgradeMessage.buttonTitleLater) ?? ''),
onPressed: () {
// Save the date/time as the last time alerted.
widget.upgrade.saveLastAlerted();
onUserLater();
forceRebuild();
}),
TextButton(
child: Text(
appMessages.message(HcUpgradeMessage.buttonTitleUpdate) ?? ''),
onPressed: () {
// Save the date/time as the last time alerted.
widget.upgrade.saveLastAlerted();
onUserUpdated();
}),
];
}