getCameraPosition method

  1. @override
Future<CameraPosition?> getCameraPosition()
override

Implementation

@override
Future<CameraPosition?> getCameraPosition() async {
  final methodname = EyedidMethodName.getCameraPosition.name;
  try {
    Map<dynamic, dynamic>? cameraPositionMap =
        await methodChannel.invokeMethod(methodname);
    if (cameraPositionMap != null) {
      final position = _generateCameraPositionWithMap(cameraPositionMap);
      return position;
    }
  } catch (e) {
    if (kDebugMode) {
      print('Error fetching camera position: $e');
    }
  }
  return null;
}