hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
969 stars 375 forks source link

We discovered a problem with the flutter web app when we tried to upload the same image several times at the same location. #454

Open gautamchauhan1702 opened 7 months ago

gautamchauhan1702 commented 7 months ago

I've attached a video for a web app. This problem only occurs on the web.

image_cropper : 5.0.0 (Latest version)

[✓] Flutter (Channel stable, 3.13.0, on macOS 13.6 22G120 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.2) [✓] VS Code (version 1.79.2) [✓] Connected device (3 available) [✓] Network resources


final cropped = await ImageCropper().cropImage(
          maxHeight: isShowSquare ? 400 : 250,
          maxWidth: 400,
          sourcePath: imagePath,
          aspectRatioPresets: isShowSquare
              ? [CropAspectRatioPreset.square]
              : [CropAspectRatioPreset.ratio16x9],
          aspectRatio: isShowSquare
              ? const CropAspectRatio(ratioX: 1, ratioY: 1)
              : const CropAspectRatio(ratioX: 16, ratioY: 9),
          uiSettings: [
            AndroidUiSettings(
              toolbarTitle: 'Cropper',
              lockAspectRatio: true,
            ),
            IOSUiSettings(
              title: 'Cropper',
              aspectRatioLockEnabled: true,
            ),
            WebUiSettings(
              context: context,
              enableResize: false,
              presentStyle: CropperPresentStyle.dialog,
              boundary: CroppieBoundary(
                width: 400,
                height: isShowSquare ? 400 : 250,
              ),
              viewPort: CroppieViewPort(
                width: 400,
                height: isShowSquare ? 400 : 200,
                type: isShowSquare ? 'square' : 'rectangle',
              ),
              enableExif: false,
              enableZoom: true,
              showZoomer: true,
              barrierColor: Colors.transparent,
              enforceBoundary: true,
              mouseWheelZoom: false,
            ),
          ],
        );
Illia-Dulebov commented 6 months ago

Having the same issue

TarasBounty commented 6 months ago

Same to me