getKeyframeOrder static method

dynamic getKeyframeOrder(
  1. dynamic times
)

Implementation

static getKeyframeOrder(times) {
  compareTime(i, j) {
    return times[i] - times[j];
  }

  var n = times.length;
  var result = List<int>.filled(n, 0);
  for (var i = 0; i != n; ++i) {
    result[i] = i;
  }

  result.sort((a, b) {
    return compareTime(a, b);
  });

  return result;
}