Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
slkmikhail opened this issue Nov 24, 2023 · 7 comments
Closed

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

slkmikhail opened this issue Nov 24, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@slkmikhail
Copy link

slkmikhail commented Nov 24, 2023

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

@slkmikhail slkmikhail changed the title Wrong ration, no padding on the last version 2.0.0+1 Wrong ratio, no padding on the last version 2.0.0+1 Nov 24, 2023
@g-apparence
Copy link
Collaborator

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

@slkmikhail
Copy link
Author

slkmikhail commented Nov 28, 2023

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
Copy link

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
Copy link
Collaborator

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.

@g-apparence g-apparence added the bug Something isn't working label Nov 29, 2023
@dgigantino
Copy link

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

@g-apparence
Copy link
Collaborator

This has been fixed. #431

@AlexPopaUpcode
Copy link

the padding is still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants