makeStaticTick static method

List<int> makeStaticTick(
  1. int upper,
  2. int len
)

Implementation

static List<int> makeStaticTick(int upper, int len) {
  if (upper <= len) {
    return List<int>.generate(upper, (i) => i + 1);
  }
  var d = upper / len;
  var l = List<int>.generate(len, (i) => i + 1);
  return l.map((v) {
    var _ = v * d;
    return _.round();
  }).toList();
}