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] Catured image not show when configured filter options #630

Open
RubyRook opened this issue Sep 21, 2024 · 4 comments
Open

[BUG] Catured image not show when configured filter options #630

RubyRook opened this issue Sep 21, 2024 · 4 comments
Labels
await investigate The issue is waiting for further investigation. p: iOS This issue only happens on iOS platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working. s: UI This issue is related with UI or layout.

Comments

@RubyRook
Copy link

Describe the bug
After take photo and confirm, image show it the list but list start reload and no new capture image show in the list

Steps to reproduce the behavior:

  1. Set filterOptions: FilterOptionGroup(containsPathModified: true)
  2. Open flutter_wechat_assets_picker
  3. Take photo and confirm
IMG_0416.MP4

Version information

  • Device: iPhone 13 pro and 7 plus (physical device)
  • OS: 18.0 and 15.7.1
  • Package Version: 9.2.2
  • Flutter Version: 3.19.6
@RubyRook RubyRook added the await investigate The issue is waiting for further investigation. label Sep 21, 2024
@AlexV525
Copy link
Member

Is this reproducible without explicit configurations?

@RubyRook
Copy link
Author

Everything work normally when i don't config filterOptions.

@AlexV525 AlexV525 changed the title [BUG] Cature image not show [BUG] Catured image not show when configured filter options Sep 23, 2024
@AlexV525
Copy link
Member

Did you also use the example with the modification to reproduce this?

@RubyRook
Copy link
Author

I just try simple usage:

This one without filterOptions work well:

AssetPicker.pickAssets(
    context,
    pickerConfig: AssetPickerConfig(
      specialItemBuilder: (context, path, length) {
        if (path?.isAll != true) return null;

        return Semantics(
          button: true,
          label: pickerTextDelegate.sActionUseCameraHint,
          onTapHint: pickerTextDelegate.sActionUseCameraHint,
          child: GestureDetector(
            behavior: HitTestBehavior.opaque,
            onTap: () async {
              bool permission = await HelperPermission.instance.camera.request();
              if (permission == false) return;

              if (context.mounted) {
                await CameraPicker.pickFromCamera(
                  context,
                  locale: const Locale('en', ''),
                  pickerConfig: const CameraPickerConfig(enableRecording: false,),
                );
              }
            },
            child: const Center(
              child: Icon(Icons.camera_enhance, size: 42.0),
            ),
          ),
        );
      },
      specialItemPosition: SpecialItemPosition.prepend,
    ),
  );

This one with filterOptions not show capture image:

await AssetPicker.pickAssets(
    context,
    pickerConfig: AssetPickerConfig(
      specialItemBuilder: (context, path, length) {
        if (path?.isAll != true) return null;

        return Semantics(
          button: true,
          label: pickerTextDelegate.sActionUseCameraHint,
          onTapHint: pickerTextDelegate.sActionUseCameraHint,
          child: GestureDetector(
            behavior: HitTestBehavior.opaque,
            onTap: () async {
              bool permission = await HelperPermission.instance.camera.request();
              if (permission == false) return;

              if (context.mounted) {
                await CameraPicker.pickFromCamera(
                  context,
                  locale: const Locale('en', ''),
                  pickerConfig: const CameraPickerConfig(enableRecording: false,),
                );
              }
            },
            child: const Center(
              child: Icon(Icons.camera_enhance, size: 42.0),
            ),
          ),
        );
      },
      specialItemPosition: SpecialItemPosition.prepend,
      filterOptions: FilterOptionGroup(containsPathModified: true),
    ),
  );

@AlexV525 AlexV525 added s: bug Something isn't working. r: photo_manager Related to the photo_manager package. p: iOS This issue only happens on iOS platform. s: UI This issue is related with UI or layout. labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
await investigate The issue is waiting for further investigation. p: iOS This issue only happens on iOS platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working. s: UI This issue is related with UI or layout.
Projects
None yet
Development

No branches or pull requests

2 participants