generate method

  1. @override
Widget generate(
  1. Context context
)
override

Implementation

@override
Widget generate(Context context) {
  var c = Condition(step < 0
      ? _countScore.isBiggerOrEqual(score)
      : _countScore.isSmallerOrEqual(score));
  var gr = Group(filename: 'foreach', children: [
    then(_countScore),
    step < 0 ? _countScore.subtract(-step) : _countScore.add(step),
    Execute(
      If: c,
      location: translate,
      children: [
        File.recursive(),
      ],
    ),
  ]);

  return For.of([
    _countScore.set(from),
    If(
      step < 0 ? _countScore.isBigger(score) : _countScore.isSmaller(score),
      then: [gr],
    ),
  ]);
}