ScrollDanmakuPainter constructor

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

Implementation

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