rerender method
void
rerender(
- dynamic fn()
If this widget has setup a runtime context then call setState which will trigger a rebuild If it hasn't then the whole screen will be re-built to force the update to become visible to the user Obviously rebuilding the screen is more expensive so most widgets should provide a TinkWidgetRuntimeContext when in runtime mode.
Implementation
void rerender(Function() fn) {
if (currentRuntimeCtx == null) {
emit(TinkRebuildScreen(fn).asEvent);
} else {
currentRuntimeCtx?.setState(fn);
}
}