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
910 stars 199 forks source link

Wrong ratio, no padding on the last version 2.0.0+1 #416

Closed slkmikhail closed 6 months ago

slkmikhail commented 7 months ago

Steps to Reproduce

  @override
  Widget build(BuildContext context) {
    return CameraAwesomeBuilder.custom(
      sensorConfig: SensorConfig.single(aspectRatio: CameraAspectRatios.ratio_1_1),
      saveConfig: SaveConfig.photo(mirrorFrontCamera: true),
      enablePhysicalButton: true,
      previewAlignment: Alignment.topCenter,
      previewFit: CameraPreviewFit.fitWidth,
      previewPadding: const EdgeInsets.symmetric(horizontal: 16),
      progressIndicator: const CameraProgressIndicator(),
      builder: (cameraState, cameraPreview) {
        return cameraState.when(
          onPreparingCamera: (_) => const CameraProgressIndicator(),
          onPhotoMode: (photoCameraState) {
            return widget.actionsLayoutBuilder(photoCameraState, cameraPreview);
          },
        );
      },
    );
  }

Expected results

Camera preview ratio must be ratio_1_1 Camera preview padding must be 16 by horizontal

Everything was ok on the dev version - ^2.0.0-dev.1 2023-11-24

Actual results

ratio 4:3, no padding

image

About your device

android any

Your flutter version

Flutter 3.13.9 • channel stable • https://github.com/flutter/flutter.git Framework • revision d211f42860 (4 weeks ago) • 2023-10-25 13:42:25 -0700 Engine • revision 0545f8705d Tools • Dart 3.1.5 • DevTools 2.25.0

g-apparence commented 7 months ago

Ok padding has been forgotten in the last rework. Will fix that

slkmikhail commented 7 months ago

Ok padding has been forgotten in the last rework. Will fix that

What about ratio 1:1, are you gonna fix it?

FYI enablePhysicalButton: true - doesn't work at least Samsung devices

ZYLIM0702 commented 7 months ago

Yes, i faced this issue too and also the preview is always align to the top and even change ratio, the preview still the same. Any solution ?

g-apparence commented 7 months ago

Ok padding has been forgotten in the last rework. Will fix that

What about ratio 1:1, are you gonna fix it?

Yes; ratio 1:1 is actually not existing on Android and iOS. So we have to crop when you select it. Will fix that.

dgigantino commented 6 months ago

Any chance to see this fixed, or maybe a workaround in the meanwhile? I'm facing the same issue with padding.

g-apparence commented 6 months ago

This has been fixed. #431

AlexPopaUpcode commented 1 day ago

the padding is still not working