flutter-form-builder-ecosystem / form_builder_image_picker

Images picker field for FlutterFormBuilder. Get images from gallery or camera
https://pub.dev/packages/form_builder_image_picker
BSD 3-Clause "New" or "Revised" License
33 stars 61 forks source link

Unable to use "prefferedCameraDevice" as i want to use only front camera. #55

Closed faisalmushtaq007 closed 1 month ago

faisalmushtaq007 commented 1 year ago

Is there an existing issue for this?

Package/Plugin version

4.0.0

Platforms

Flutter doctor

Flutter doctor ``` [✓] Flutter (Channel stable, 3.10.5, on macOS 14.0 23A344 darwin-arm64, locale en-IN) • Flutter version 3.10.5 on channel stable at /Users/lelafeitsolutions/Documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 796c8ef792 (4 months ago), 2023-06-13 15:51:02 -0700 • Engine revision 45f6e00911 • Dart version 3.0.5 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/lelafeitsolutions/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS ✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development. Download at: https://developer.apple.com/xcode/download/ Or install Xcode via the App Store. Once installed, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) [✓] VS Code (version 1.75.1) • VS Code at /Users/lelafeitsolutions/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.74.0 [✓] Connected device (3 available) • CPH2487 (mobile) • d61e2731 • android-arm64 • Android 13 (API 33) • macOS (desktop) • macos • darwin-arm64 • macOS 14.0 23A344 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.96 [✓] Network resources • All expected network resources are available. ```

Minimal code example

Code sample ``` SizedBox( width: 400, height: 100, child: FormBuilderImagePicker( name: 'photo', preferredCameraDevice: CameraDevice.front, availableImageSources: const [ImageSourceOption.camera], validator: FormBuilderValidators.compose([ FormBuilderValidators.required(), ]), backgroundColor: Helper.primary, iconColor: Colors.white, decoration: const InputDecoration( labelText: 'Capture Photo', labelStyle: TextStyle(color: Colors.white), ), maxImages: 1, onSaved: (newValue) { if (newValue != null && newValue.length == 1) { formNotifier.setPhoto(newValue.first); } }, ), ), ```

Current Behavior

i am still getting rear camera which i dont want.

Expected Behavior

i want to get only front camera or atleast when user opens the camera, it should be front one

Steps To Reproduce

simply use my code snippet

Aditional information

No response

deandreamatias commented 2 months ago

Hi! You can try only with de image_picker package to verify if the error is the same? Thanks

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 7 days with no activity.