stop method
请求按下标停止;null 使用 picker、负数取消、越界取余。
例如 controller.stop(1),加速与匀速之外返回 false。
Implementation
bool stop([int? index]) {
if (!phase.value.canStop) {
return false;
}
final sticks = _motion.config.sticks;
final target = index ??
pickIndex(picker, random, sticks,
weight: (s) => s.weight, disabled: (s) => s.disabled);
return commitCommand(_motion.stop(target ?? -1));
}