switchCameraByType method
Implementation
Future<bool> switchCameraByType(RCRTCCameraCaptureCameraType type) async {
if (type == RCRTCCameraCaptureCameraType.Front && !_isFrontCamera) {
_isFrontCamera = await channel.invokeMethod("switchCamera");
} else if (type == RCRTCCameraCaptureCameraType.Back && _isFrontCamera) {
_isFrontCamera = await channel.invokeMethod("switchCamera");
}
return _isFrontCamera;
}