getCameraPosition method
Implementation
@override
Future<CameraPosition?> getCameraPosition() async {
Map<dynamic, dynamic>? arguments = await methodChannel
.invokeMapMethod(SeeSoPluginMethod.GET_CAMERA_POSITION.name);
if (arguments != null) {
String modelName =
arguments[SeeSoPluginArgumentKey.MODEL_NAME.name] as String;
double screenWidth =
arguments[SeeSoPluginArgumentKey.SCREEN_WIDTH.name] as double;
double screenHeight =
arguments[SeeSoPluginArgumentKey.SCREEN_WIDTH.name] as double;
double screenOriginX =
arguments[SeeSoPluginArgumentKey.SCREEN_WIDTH.name] as double;
double screenOriginY =
arguments[SeeSoPluginArgumentKey.SCREEN_WIDTH.name] as double;
bool cameraOnLongerAxis =
arguments[SeeSoPluginArgumentKey.CAMERA_ON_LONGER_AXIS.name] as bool;
return CameraPosition(
modelName: modelName,
screenWidth: screenWidth,
screenHeight: screenHeight,
screenOriginX: screenOriginX,
screenOriginY: screenOriginY,
cameraOnLongerAxis: cameraOnLongerAxis);
}
return null;
}