Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
906 stars 199 forks source link

AwesomeZoomSelector not working on iOS #458

Open giordy16 opened 3 months ago

giordy16 commented 3 months ago

Steps to Reproduce

I'm trying to use a AwesomeZoomSelector on my custom UI, but a cast exception is thrown only on iPhone. There is a similar issue where a guy has the same problem (last comment): https://github.com/Apparence-io/CamerAwesome/issues/435

Expected results

The zoom values are returned

Actual results

A cast exception is thrown

flutter: type 'int' is not a subtype of type 'double?' in type cast
flutter: Stacktrace: #0      CameraInterface.getMinZoom (package:camerawesome/pigeon.dart:1289:28)
flutter: <asynchronous suspension>
flutter: #1      _AwesomeZoomSelectorState.initAsync (package:camerawesome/src/widgets/zoom/awesome_zoom_selector.dart:27:15)
flutter: <asynchronous suspension>
flutter:

About your device

Brand Model OS
Apple iPhone 14 17.3.1

Your flutter version

Flutter 3.16.8 • channel stable • https://github.com/flutter/flutter.git Framework • revision 67457e669f (2 months ago) • 2024-01-16 16:22:29 -0800 Engine • revision 6e2ea58a5c Tools • Dart 3.2.5 • DevTools 2.28.5

Madnex commented 2 months ago

Having the same issue. Any update on this?

Madnex commented 2 months ago

Actually after digging into the code I found that the AwesomeZoomSelector is only used for Android. For iOS there is the AwesomeSensorTypeSelector. See here how they make the selection.

giordy16 commented 2 months ago

@Madnex Thank you, but I already saw that. I would like to use AwesomeZoomSelector because it displays the current zoom level while zooming, a thing that AwesomeSensorTypeSelector doesn't have.