saFlash method
- covariant MissileSite sm,
- SamReq req
MS.saFlash action handler.
The covariant keyword is used to inform Dart that sm
will be a subclass of
SamModel
and not SamModel
specifically.
We use this to increment distressedCtr
which the getSiteHeader render logic
has a computed dependency on and therefore this widget only will be re-rendered.
We use the req.render = true
statement as by default actions do not request a render operation.
Implementation
void saFlash(covariant MissileSite sm, SamReq req) {
sm.setHot("distressedCtr",(sm.getHot("distressedCtr") as int) + 1);
req.render = true;
//assert(log("_saFlash action taken"));
}