onInitialize method
dynamic
onInitialize({})
Function to initialize the platform-specific AR view. Can be used to initially set or update session settings.
customPlaneTexturePath
refers to flutter assets from the app that is calling this function, NOT to assets within this plugin. Make sure
the assets are correctly registered in the pubspec.yaml of the parent app (e.g. the ./example app in this plugin's repo)
Implementation
onInitialize({
bool showAnimatedGuide = true,
bool showFeaturePoints = false,
bool showPlanes = true,
String? customPlaneTexturePath,
bool showWorldOrigin = false,
bool handleTaps = true,
bool handlePans = false, // nodes are not draggable by default
bool handleRotation = false, // nodes can not be rotated by default
}) {
_channel.invokeMethod<void>('init', {
'showAnimatedGuide': showAnimatedGuide,
'showFeaturePoints': showFeaturePoints,
'planeDetectionConfig': planeDetectionConfig.index,
'showPlanes': showPlanes,
'customPlaneTexturePath': customPlaneTexturePath,
'showWorldOrigin': showWorldOrigin,
'handleTaps': handleTaps,
'handlePans': handlePans,
'handleRotation': handleRotation,
});
}