Skip to content

Conversation

@anushkavidanage
Copy link
Collaborator

Pull Request Details

What issue does this PR address

  • GrantPermissionUi() for a specific resource with the resource as a directory

Associated Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist

Complete the check-list below to ensure your branch is ready for PR.

  • Screenshots included in linked issue #
  • Changes adhere to the style and coding guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue #
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

Once PR discussion is complete and reviewers have approved:

  • Merge dev into the this branch
  • Resolve any conflicts
  • Add a one line summary into the CHANGELOG.md
  • Push to the git repository and review
  • Merge the PR into dev

Copy link
Collaborator

@cdawei cdawei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, thanks @anushkavidanage. We just have to save one line of code to pass the lint check :-)

@anushkavidanage anushkavidanage merged commit f1620c6 into dev Nov 16, 2025
20 checks passed
@anushkavidanage anushkavidanage deleted the av/484_grant_permission_to_dir branch November 16, 2025 21:29
@srodriguez142857
Copy link
Collaborator

Hi @anushkavidanage and @cdawei.

I'm unsure if the following is the functionality to be tested.
In the Example App, I went to the "Demonstrating data sharing functionality" as shown below:

Option: Add/Delete Permissions from any Resource
image

I have only the following comment about this page:

image

Everything else is okay.


On the other hand, if I click on the option "Add/Delete Permissions from a Specific Resource", I get an error/exception:

image image
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following StateError was thrown building FutureBuilder<List<dynamic>>(dirty, state:
_FutureBuilderState<List<dynamic>>#2c672):
Bad state: No element

The relevant error-causing widget was:
  FutureBuilder<List<dynamic>>
  FutureBuilder:file:///E:/_temp/_VSCode/Workspace/anusii/solidpod/lib/src/solid/grant_permission_ui.dart:534:13

When the exception was thrown, this was the stack:
#0      List.first (dart:core-patch/growable_array.dart:352:5)
#1      GrantPermissionUiState.build.<anonymous closure> (package:solidpod/src/solid/grant_permission_ui.dart:537:36)
#2      _FutureBuilderState.build (package:flutter/src/widgets/async.dart:625:55)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:5833:27)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5723:15)
#5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5884:11)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:5435:7)
#7      BuildScope._tryRebuild (package:flutter/src/widgets/framework.dart:2695:15)
#8      BuildScope._flushDirtyElements (package:flutter/src/widgets/framework.dart:2752:11)
#9      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3056:18)
#10     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1259:21)
#11     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:495:5)
#12     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1434:15)
#13     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1347:9)
#14     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200:5)
#15     _invoke (dart:ui/hooks.dart:330:13)
#16     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:444:5)
#17     _drawFrame (dart:ui/hooks.dart:302:31)

════════════════════════════════════════════════════════════════════════════════════════════════════

Should this be expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants