TrimmerWidget constructor
const
TrimmerWidget({
- Key? key,
- required FlutterVideoTrimmer flutterVideoTrimmer,
- ViewerType type = ViewerType.auto,
- double viewerWidth = 400,
- double viewerHeight = 50,
- Duration maxVideoLength = const Duration(milliseconds: 0),
- double paddingFraction = 0.2,
- bool showDuration = true,
- TextStyle durationTextStyle = const TextStyle(color: Colors.white),
- DurationStyle durationStyle = DurationStyle.FORMAT_HH_MM_SS,
- TrimEditorProperties editorProperties = const TrimEditorProperties(),
- TrimmerShapeProps areaProperties = const TrimmerShapeProps(),
- dynamic onChangeStart(
- double startValue
- dynamic onChangeEnd(
- double endValue
- dynamic onChangePlaybackState(
- bool isPlaying
- VoidCallback? onThumbnailLoadingComplete,
A widget to display and interact with a video timeline (thumbnails + scrubber).
Automatically selects between FixedTrimViewer and ScrollableTrimViewer
based on the type and available video length.
Throws an error if type == ViewerType.scrollable and the video
duration is shorter than maxVideoLength + padding.
Implementation
const TrimmerWidget({
super.key,
required this.flutterVideoTrimmer,
this.type = ViewerType.auto,
this.viewerWidth = 400,
this.viewerHeight = 50,
this.maxVideoLength = const Duration(milliseconds: 0),
this.paddingFraction = 0.2,
this.showDuration = true,
this.durationTextStyle = const TextStyle(color: Colors.white),
this.durationStyle = DurationStyle.FORMAT_HH_MM_SS,
this.editorProperties = const TrimEditorProperties(),
this.areaProperties = const TrimmerShapeProps(),
this.onChangeStart,
this.onChangeEnd,
this.onChangePlaybackState,
this.onThumbnailLoadingComplete,
});