ContentRecorderController class
A controller class responsible for capturing and processing images using an isolated thread for performance improvements.
Constructors
- ContentRecorderController({required ProImageEditorConfigs configs, bool ignoreGeneration = false})
- Constructor to initialize the controller and set up the isolate if not running on the web.
Properties
-
containerKey
↔ GlobalKey<
State< StatefulWidget> > -
A key to identify the container widget for rendering the image.
latefinal
- generateOnlyThumbnail ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
recorderKey
↔ GlobalKey<
State< StatefulWidget> > -
A key to identify the recorder widget for rendering the image.
latefinal
-
recorderStream
↔ StreamController<
Widget?> -
Send widgets to the recorder widget which will draw them.
latefinal
- recordReadyHelper ↔ Completer
-
A helper to ensure the widget is drawed.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addEmptyScreenshot(
{required List< ThreadCaptureState> screenshots}) → void - Adds an empty screenshot to the provided list of screenshots.
-
captureFinalScreenshot(
{required ImageInfos imageInfos, required ThreadCaptureState? backgroundScreenshot, Widget? widget, BuildContext? context, Uint8List? originalImageBytes, Size? targetSize}) → Future< Uint8List?> - Captures the final screenshot based on the provided parameters.
-
captureFromWidget(
Widget widget, {required ImageInfos imageInfos, Size? targetSize, OutputFormat? format, dynamic onImageCaptured(Image?)?, bool stateHistroyScreenshot = false, String? id}) → Future< Uint8List?> - Capture an invisible widget.
-
captureImage(
{required ImageInfos imageInfos, required List< ThreadCaptureState> screenshots, Size? targetSize, Widget? widget}) → void - Capture an image of the current editor state in an isolate.
-
chooseCaptureMode(
{required Image image, required String id, OutputFormat? format}) → Future< Uint8List?> - Selects the appropriate capture mode based on the platform and configuration.
-
destroy(
) → Future< void> - Destroys the isolate and closes the receive port if not running on the web.
-
getOriginalImage(
{required ImageInfos imageInfos}) → Future< Image> - Retrieves the original image based on the provided image information.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited