generate method
Implementation
@override
Widget generate(Context context) {
var s = Scoreboard(score);
var prev = s['build_number.prev'];
var current = s['build_number'];
return For.of([
prev >> current,
current >> currentVersion,
if (onUpdate != null)
If(
prev < current,
then: onUpdate!,
),
If(
prev > current,
then: [
if (onDowndate != null) ...onDowndate!,
current >> prev,
],
),
if (then != null) then!(current),
prev.reset(),
]);
}