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] Limited permission overlay does not show up when paired with maxAssets: maxAssetsCount: 1 and specialPickerType: SpecialPickerType.noPreview #618

Closed
Dimilkalathiya opened this issue Aug 21, 2024 · 1 comment
Labels
s: bug Something isn't working. s: UI This issue is related with UI or layout.

Comments

@Dimilkalathiya
Copy link

Dimilkalathiya commented Aug 21, 2024

Describe the bug
Limited permission overlay does not show up when paired with maxAssets: maxAssetsCount: 1 and specialPickerType: SpecialPickerType.noPreview

How to reproduce
Execute below mentioned code:

AssetPicker.pickAssets(
          context,
          pickerConfig: AssetPickerConfig(
            maxAssets: 1,
            requestType: RequestType.image,
            specialPickerType: SpecialPickerType.noPreview,
          ),
        );

Steps to reproduce the behavior:

  1. Execute above mentioned code on IOS device
  2. Provide limited permission and select few assets and continue
  3. Limited access overlay is not visible

Expected behavior

  • Limited access overlay should be visible depending on permission and should not be influenced by above mentioned parameters

Screenshots

  1. with maxAssets: maxAssetsCount: 1 and specialPickerType: SpecialPickerType.noPreview:
Screenshot 2024-08-21 at 7 51 21 PM
  1. if either of value is changed (eg: changing maxAssets: maxAssetsCount: 2 OR removing optional property specialPickerType: SpecialPickerType.noPreview):
Screenshot 2024-08-21 at 7 52 08 PM

Version information

  • Device: iPhone 15 pro (simulator)
  • OS: iOS 17.5
  • Package Version: 9.2.1
  • Flutter Version: 3.24.0

Additional context

Culprit:

For android:

if (isPreviewEnabled || !isSingleAssetMode)
bottomActionBar(context),

For IOS:

if (isPreviewEnabled || !isSingleAssetMode)
Positioned.fill(top: null, child: bottomActionBar(context)),

Solution:
Updating condition would probably fix issue:

if (isPreviewEnabled || !isSingleAssetMode || permissionNotifier.value == PermissionState.limited)

Questions:

  1. Is above mentioned code there for specific reason or to avoid any issue?
  2. If this is not expected behaviour please ping me i can generate PR :)
@Dimilkalathiya Dimilkalathiya added the await investigate The issue is waiting for further investigation. label Aug 21, 2024
@AlexV525 AlexV525 added s: bug Something isn't working. s: UI This issue is related with UI or layout. and removed await investigate The issue is waiting for further investigation. labels Aug 22, 2024
@AlexV525
Copy link
Member

AlexV525 commented Sep 16, 2024

Hi @Dimilkalathiya. Thank you for your report and the PR. I've setup another change request to cover more details and cases, could you review it? #627

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. s: UI This issue is related with UI or layout.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants