TimeBarWidget constructor

const TimeBarWidget({
  1. Key? key,
  2. required List<RecordSegment> segments,
  3. required int currentTimeMs,
  4. int totalDurationMs = 86400000,
  5. int? startTimeMs,
  6. VideoAreaOption videoAreaOption = const VideoAreaOption(),
  7. TimeScaleOption timeScaleOption = const TimeScaleOption(),
  8. MiddleIndicatorOption middleIndicatorOption = const MiddleIndicatorOption(),
  9. bool showMiddleIndicator = true,
  10. TimeBarOption timeBarOption = const TimeBarOption(),
  11. double tickInterval = 10.0,
  12. ValueChanged<int>? onTimeChanged,
  13. ValueChanged<int>? onTimeChangeEnd,
  14. double minScale = 0.0000001,
  15. double maxScale = 0.1,
})

Implementation

const TimeBarWidget({
  super.key,
  required this.segments,
  required this.currentTimeMs,
  this.totalDurationMs = 86400000,
  this.startTimeMs,
  this.videoAreaOption = const VideoAreaOption(),
  this.timeScaleOption = const TimeScaleOption(),
  this.middleIndicatorOption = const MiddleIndicatorOption(),
  this.showMiddleIndicator = true,
  this.timeBarOption = const TimeBarOption(),
  this.tickInterval = 10.0,
  this.onTimeChanged,
  this.onTimeChangeEnd,
  this.minScale = 0.0000001, // 约 10px = 24小时
  this.maxScale = 0.1, // 约 10px = 1秒
});