snapshot method
Takes a photo of the AR view.
Implementation
Future<void> snapshot() async {
final Uint8List? image = await controller.takeSnapshot();
if (image == null) return;
if (_o.haptics) unawaited(HapticFeedback.mediumImpact());
if (widget.onSnapshot != null) {
widget.onSnapshot!(image);
} else if (_o.shareSnapshots) {
await UShare.bytes(image, name: "ar_${DateTime.now().millisecondsSinceEpoch}.jpg", mimeType: "image/jpeg");
}
}