TimeBarWidget constructor
const
TimeBarWidget({
- Key? key,
- required List<
RecordSegment> segments, - required int currentTimeMs,
- int totalDurationMs = 86400000,
- int? startTimeMs,
- VideoAreaOption videoAreaOption = const VideoAreaOption(),
- TimeScaleOption timeScaleOption = const TimeScaleOption(),
- MiddleIndicatorOption middleIndicatorOption = const MiddleIndicatorOption(),
- bool showMiddleIndicator = true,
- TimeBarOption timeBarOption = const TimeBarOption(),
- double tickInterval = 10.0,
- ValueChanged<
int> ? onTimeChanged, - ValueChanged<
int> ? onTimeChangeEnd, - double minScale = 0.0000001,
- 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秒
});