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
911 stars 200 forks source link

No functionality to set the exposure level #373

Closed sc-ot closed 1 year ago

sc-ot commented 1 year ago

Steps to Reproduce

Implement a basic CameraAwesomeBuilder.custom() widget.

aw.CameraAwesomeBuilder.custom(
                                saveConfig:
                                    aw.SaveConfig.photo(pathBuilder: () async {
                                  var dir =
                                      await getApplicationDocumentsDirectory();
                                  String filePath =
                                      "${dir.path}/${DateTime.now().millisecondsSinceEpoch}.jpg";
                                  return filePath;
                                }),
                                builder:
                                    (stateCamera, previewSize, previewRect) {
                                  stateCamera.when(
                                    onPhotoMode: (photoCameraState) {
                                      if (state.photoCameraState == null) {
                                        context.read<CameraBloc>().add(
                                            CameraEventInitializeCamera(
                                                photoCameraState:
                                                    photoCameraState));
                                      }
                                    },
                                  );
                                  return Container();
                                },
                                aspectRatio: aw.CameraAspectRatios.ratio_4_3,
                                previewFit: aw.CameraPreviewFit.fitWidth,
                              ),
                            ),

Expected results

A method on a controller, on a stateobject, a parameter inside the constructors from CameraAwesuomBuilder. I couldn't find any possibility to change the expose level (since i saw it from the list on pub.dev)

image

Actual results

-

About your device

Brand Model OS
Samsung Galaxy Tab S6 Lite 13

Your flutter version

Flutter 3.12.0-8.0.pre.5 • channel main • https://github.com/flutter/flutter.git Framework • revision b83f762dd5 (8 days ago) • 2023-06-21 06:28:40 -0400 Engine • revision f973fb4636 Tools • Dart 3.1.0 (build 3.1.0-235.0.dev) • DevTools 2.24.0

istornz commented 1 year ago

Hello @sc-ot,

You can use the method: setBrightness() 👍

sc-ot commented 1 year ago

Hey @istornz, thx for the quick response. Can you give me an example on which object i have to call this method?

I tried to call it on the stateCamera and photoCameraState objects, but it looks like this method doesnt exists ... (i get following error in my IDE: "The method setBrightness" isn't defined for the type 'PhotoCameraState' ..

Im using camerawesome: ^1.4.0 in my project.

sc-ot commented 1 year ago

Ah, i found it ... i have to call it on the SensorConfig inside the state, thanks!

istornz commented 1 year ago

Perfect ! I close the issue, feel free to reopen it if any :)