DeepArController class
Controls all interaction with DeepAR Sdk.
Constructors
Properties
- aspectRatio → double
-
Aspect ratio of the preview image
no setter
- cameraDirection → CameraDirection
-
Get current camera direction as
CameraDirection.front
orCameraDirection.rear
no setter - flashState → bool
-
Get current flash state as
FlashState.on
orFlashState.off
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasPermission → bool
-
If the user has allowed required camera permissions
no setter
- imageDimensions → Size
-
Size of the preview image
no setter
- isInitialized → bool
-
Return true if the camera preview is initialized
no setter
- isRecording → bool
-
Return true if the recording is in progress.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildPreview(
{Function? oniOSViewCreated}) → Widget - Builds and returns the DeepAR Camera Preview.
-
changeParameter(
{required String gameObject, required String component, required String parameter, dynamic newParameter}) → Future< void> - Changes a node or component newParameter.
-
destroy(
) → Future< void> - Releases all resources required by DeepAR.
-
fireTrigger(
{required String trigger}) → Future< void> - Fire named trigger of an fbx animation set on the currently loaded effect.
-
flipCamera(
) → Future< CameraDirection> - Flips Camera and return the current direction
-
initialize(
{required String? androidLicenseKey, required String? iosLicenseKey, Resolution resolution = Resolution.high}) → Future< bool> - Initializes the DeepAR SDK with license keys and asks for required camera and microphone permissions. Returns false if fails to initialize.
-
moveGameObject(
{required String selectedGameObjectName, required String targetGameObjectName}) → Future< void> - Moves the selected game object from its current position in a tree and sets it as a direct child of a target game object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
showColliders(
{required bool enabled}) → Future< void> - Display physics colliders preview on screen.
-
showStats(
{required bool enabled}) → Future< void> - Display debugging stats on screen.
-
simulatePhysics(
{required bool enabled}) → Future< void> - Enable or disable global physics simulation.
-
startVideoRecording(
) → Future< void> - Starts recording video
-
stopVideoRecording(
) → Future< File> - Stop recording video
-
switchEffect(
String? effect) → Future< String?> -
Switch DeepAR with the passed
effect
path from assets -
switchEffectWithSlot(
{required String slot, required String path, String? targetGameObject, int? face}) → Future< void> - Load contents of a DeepAR Studio file as an effect/filter in the scene
-
switchFaceMask(
String? mask) → Future< String?> -
Switch DeepAR with the passed
mask
path from assets -
switchFilter(
String? filter) → Future< String?> -
Switch DeepAR with the passed
filter
path from assets -
takeScreenshot(
) → Future< File> - Takes picture of the current frame and returns a File
-
toggleFlash(
) → Future< bool> - Toggles flash and returns its status
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited