EditorController class final

Top bar widget controller if not provided by the user it will use the default one

Constructors

EditorController({String storyId = '', CropGridStyle cropGridStyle = const CropGridStyle(), TrimSliderStyle trimSliderStyle = const TrimSliderStyle(borderRadius: 12, onTrimmedColor: Color(0xFFEB671B), onTrimmingColor: Color(0xFFEB671B), lineColor: Color(0xFFEB671B)), Duration maxVideoDuration = const Duration(seconds: 30), Duration minVideoDuration = const Duration(seconds: 5), dynamic onElementDeleted(StoryElement)?, Duration maxAudioDuration = const Duration(seconds: 30), Duration minAudioDuration = const Duration(seconds: 5), bool isNeedToShowCameraPicker = true, bool isNeedVideoCameraPicker = true, PickerStyle? stylePicker, CameraStyle? cameraStylePicker, VoidCallback? onCameraPermissionDeniedCallback})
Constructor

Properties

assets → ValueNotifier<List<StoryElement>>
Assets list
final
audioIsPlaying → ValueNotifier<bool>
Is audio playing notifier If you have audio in story you can control it
final
cameraStylePicker → CameraStyle?
final
cropGridStyle → CropGridStyle
Crop grid style
final
hashCode → int
The hash code for this object.
no setterinherited
isAvailableToAddVideo → bool
isAvailableToAddVideo getter
no setter
isContainsAudio → bool
Check if the assets contains audio
no setter
isContainsVideo → bool
Check if the assets contains video
no setter
isNeedToShowCameraPicker → bool
Picker Stule
final
isNeedVideoCameraPicker → bool
final
isShowingOverlay → ValueNotifier<bool>
Is showing overlay notifier
final
maxAudioDuration ↔ Duration
Max audio duration allowed
getter/setter pair
maxVideoDuration → Duration
Max video duration allowed
final
minAudioDuration ↔ Duration
Min audio duration allowed
getter/setter pair
minVideoDuration → Duration
Min video duration allowed
final
onCameraPermissionDeniedCallback → VoidCallback?
final
onElementDeleted → dynamic Function(StoryElement)?
Element deleted callback.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedFilter → ValueNotifier<ColorFilterGenerator>
Selected filter notifier
final
selectedItem → ValueNotifier<StoryElement?>
Selected item notifier
final
storyModel → StoryModel
Story model getter
no setter
stylePicker → PickerStyle?
final
trimSliderStyle → TrimSliderStyle
Trim slider style
final

Methods

addCustomAsset({XFile? file, String? url, required CustomAssetType type, String uniqueId = '', Widget customWidgetBuilder(BuildContext context, dynamic onPlay(), dynamic onPause(), ValueNotifier<bool> isPlay)?}) → Future<bool>
Add Custom file widget asset
addCustomWidgetAsset(Widget widget, {String? customWidgetId, String customWidgetPayload = '', String customWidgetUniqueID = ''}) → void
Add custom widget to assets
addImage(BuildContext context) → Future<void>
Open assets picker
addText() → void
Add text element to the editor
checkDeleteElement(StoryElement storyElement, Size screen) → void
delete StoryElement from assets when it's out of the screen
complete() → Future<StoryModel>
Complete editing and return the story model
dispose() → void
Dispose the controller
editText(StoryElement storyElement) → void
Edit text element
muteVideo() → void
Mute story video
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openFilter() → void
Toggle filter selector
removeElement(StoryElement element) → void
Remove element from assets
removeElementByUniqueID(String uniqueID) → void
Remove element from assets
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited