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

[BUG] wrong photo selected on IOS #560

Closed
heshesh2010 opened this issue Mar 5, 2024 · 3 comments · Fixed by #561
Closed

[BUG] wrong photo selected on IOS #560

heshesh2010 opened this issue Mar 5, 2024 · 3 comments · Fixed by #561
Labels
s: bug Something isn't working. ⏳WEEK This issue is scheduled to be solved within one week.

Comments

@heshesh2010
Copy link

heshesh2010 commented Mar 5, 2024

Hi ,

using latest version wechat_assets_picker: ^9.0.0
when I select the ' check button ' in photo grid picker every things working as expected , but when I press on the photo item without ' check icon ' I got other photo rather than I actually pressed

see this screencast video : https://drive.google.com/file/d/1cl7a28hXgcCD3StAIvpHlwux7b-4oUKb/view?usp=sharing

note : i'm using change profile photo logic , so when user pick only one image I pass this first index photo to other class to crop it.

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.2, on macOS 14.3.1 23D60 darwin-x64, locale en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.86.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

code :

Future<dynamic> pickMultipleImage(context) async {
    //  List<XFile>? pickedFile;

    try {
      final List<AssetEntity>? result = await AssetPicker.pickAssets(
        context,
        pickerConfig: const AssetPickerConfig(
          maxAssets: 1,
          //  gridThumbSize: 200,
          requestType: RequestType.image,
          specialPickerType: SpecialPickerType.noPreview,
          //  selectedAssets: _images,
        ),
      );
      if ((result ?? []).isNotEmpty) { 
// here the result list has only one image selected is different from I saw in preview when I didn't hit check button . 

        CroppedFile? file = await ImageCropper().cropImage(
            cropStyle: CropStyle.circle,
            uiSettings: [
              AndroidUiSettings(
                showCropGrid: false,
                hideBottomControls: false,
                toolbarTitle: "crop_image".tr,
                toolbarColor: Colors.white,
                toolbarWidgetColor: Colors.black,
                cropFrameColor: Colors.white,
                cropGridColor: Colors.white,
                statusBarColor: Colors.black,
                initAspectRatio: CropAspectRatioPreset.original,
                lockAspectRatio: false,
              ),
              IOSUiSettings(aspectRatioLockEnabled: true)
            ],
            sourcePath: (await (result!.first.file))!.path);

        if (file != null) {
          selectedProfileImagePath.value = file.path;

          isProfilePhotoChosen.value = true;
        }
      }
      //   return;
    } catch (e) {
      print(e);
    }
  }
@heshesh2010 heshesh2010 added the await investigate The issue is waiting for further investigation. label Mar 5, 2024
@AlexV525
Copy link
Member

AlexV525 commented Mar 6, 2024

Didn't reproduce with the latest example.

@heshesh2010
Copy link
Author

Didn't reproduce with the latest example.

tested on the example and still produce

see. https://drive.google.com/file/d/1tLnQEw3eEJ0tCPYezeOXQMAyadrATRkT/view?usp=sharing

@AlexV525 AlexV525 added s: bug Something isn't working. ⏳WEEK This issue is scheduled to be solved within one week. and removed await investigate The issue is waiting for further investigation. labels Mar 6, 2024
@heshesh2010
Copy link
Author

@AlexV525 , thanks .

I see u have fixed the bug , when it will be live 9.0.1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: bug Something isn't working. ⏳WEEK This issue is scheduled to be solved within one week.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants