ScrollDanmakuPainter constructor

ScrollDanmakuPainter(
  1. double progress,
  2. List<DanmakuItem> scrollDanmakuItems,
  3. int danmakuDurationInSeconds,
  4. double fontSize,
  5. bool showStroke,
  6. double danmakuHeight,
  7. bool running,
  8. int tick, {
  9. int batchThreshold = 10,
})

Implementation

ScrollDanmakuPainter(
  this.progress,
  this.scrollDanmakuItems,
  this.danmakuDurationInSeconds,
  this.fontSize,
  this.showStroke,
  this.danmakuHeight,
  this.running,
  this.tick, {
  this.batchThreshold = 10, // 默认值为10,可以自行调整
}) : totalDuration = danmakuDurationInSeconds * 1000;