liveShowAlert function
Reads the live showAlert from a parameters object, when it has one.
Implementation
ShowAlert? liveShowAlert(dynamic parameters) {
final reads = <dynamic Function()>[
() => parameters.getUpdatedAllParams().showAlert,
() => parameters.showAlert,
];
for (final read in reads) {
try {
final alert = read();
if (alert is ShowAlert) return alert;
} catch (_) {}
}
return null;
}