WidgetRecorderController class
Simple controller for recording widgets
Constructors
- WidgetRecorderController({dynamic onComplete(String path)?, dynamic onError(String path)?, bool recordAudio = false, Widget permissionDeniedDialog(BuildContext context, VoidCallback openSettings)?, bool showTouches = false, TouchVisualizationConfig touchConfig = const TouchVisualizationConfig(), String? customSavePath})
Properties
- customSavePath → String?
-
Custom save directory path (optional)
If null, uses temporary directory
final
- fps ← int
-
Set frames per second (default: 60)
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRecording → bool
-
Check if currently recording (video or GIF)
no setter
- isRecordingGif → bool
-
Check if currently recording GIF specifically
no setter
- onComplete → dynamic Function(String path)?
-
final
- onError → dynamic Function(String path)?
-
final
- permissionDeniedDialog → Widget Function(BuildContext context, VoidCallback openSettings)?
-
final
- recordAudio → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showTouches → bool
-
Enable touch visualization during recording
final
- touchConfig → TouchVisualizationConfig
-
Configuration for touch visualization
final
Methods
-
applyVideoQuality(
VideoQuality quality) → void - Apply a video quality preset
-
captureScreenshot(
{ImageFormat format = ImageFormat.png, int quality = 100, double pixelRatio = 3.0}) → Future< String?> - Capture a single screenshot of the widget
-
dispose(
) → void -
exportAsGif(
{Duration duration = const Duration(seconds: 3), GifQuality quality = GifQuality.medium}) → Future< String?> - Export widget as animated GIF
-
hasPermission(
) → Future< bool> - Check if microphone permission is granted
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openSettings(
) → Future< void> - Open app settings (useful when permission is permanently denied)
-
requestPermission(
) → Future< bool> - Request microphone permission (returns true if granted)
-
start(
{Duration? countdown, dynamic onTick(int remainingSeconds)?}) → Future< void> - Start recording the widget with optional countdown
-
startGifRecording(
{GifQuality quality = GifQuality.medium}) → Future< void> - Start recording frames for GIF export (manual control)
-
startWithCountdown(
{int countdownSeconds = 3, dynamic onTick(int remainingSeconds)?}) → Future< void> - Start recording with countdown
-
stop(
) → Future< String?> - Stop recording and get the video file path
-
stopGifRecording(
{GifQuality quality = GifQuality.medium}) → Future< String?> - Stop GIF recording and export the file
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited