Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The package is available from

## 1.1 Consolidate Android Login

+ Add sharing permission recipientType callback [1.0.25 20260728 jesscmoore]
+ Support webid editing to link a another Pod [1.0.24 20260726 jesscmoore]
+ Bug fix auto-login when no domain folder on server [1.0.23 20260729 gjw]
+ Add webid to profile [1.0.22 20260726 jesscmoore]
Expand Down
14 changes: 14 additions & 0 deletions lib/src/widgets/grant_permission_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ class GrantPermissionForm extends StatefulWidget {

final VoidCallback? onPermissionGranted;

/// Callback called when permissions are granted successfully, with the
/// [RecipientType] and resource names that were just granted. Fires
/// alongside [onPermissionGranted] — added so callers can distinguish a
/// public/authenticated-user grant from an individual/group grant, which
/// the plain [onPermissionGranted] cannot do.

final void Function(RecipientType recipientType, List<String> resourceNames)?
onRecipientTypeGranted;

/// Optional human-readable name for the resource, used in notification
/// messages sent to recipients upon successful permission granting.

Expand All @@ -159,6 +168,7 @@ class GrantPermissionForm extends StatefulWidget {
required this.updatePermissionGrantedFunction,
this.dataFilesMap = const {},
this.onPermissionGranted,
this.onRecipientTypeGranted,
this.resourceDisplayName,
this.inviteConfig,
});
Expand Down Expand Up @@ -635,6 +645,10 @@ class _GrantPermissionFormState extends State<GrantPermissionForm> {

// Trigger the onPermissionGranted callback if provided
widget.onPermissionGranted?.call();
widget.onRecipientTypeGranted?.call(
selectedRecipientType,
widget.resourceNames,
);
} else if (result == SolidFunctionCallStatus.fail) {
if (!context.mounted) return;
await showGrantPermissionErrorDialog(
Expand Down
8 changes: 8 additions & 0 deletions lib/src/widgets/grant_permission_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class GrantPermissionUi extends StatefulWidget {
this.buttonColor,
this.customAppBar,
this.onPermissionGranted,
this.onRecipientTypeGranted,
this.onNavigateBack,
this.resourceDisplayName,
this.shareButtonColor,
Expand Down Expand Up @@ -191,6 +192,13 @@ class GrantPermissionUi extends StatefulWidget {

final VoidCallback? onPermissionGranted;

/// Callback called when permissions are granted successfully, with the
/// [RecipientType] and resource names that were just granted. See
/// [GrantPermissionForm.onRecipientTypeGranted].

final void Function(RecipientType recipientType, List<String> resourceNames)?
onRecipientTypeGranted;

/// Callback function called when navigating back from the screen.

final VoidCallback? onNavigateBack;
Expand Down
1 change: 1 addition & 0 deletions lib/src/widgets/grant_permission_ui_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ class GrantPermissionUiState extends State<GrantPermissionUi>
isFile: getIsFile(),
dataFilesMap: widget.dataFilesMap,
onPermissionGranted: widget.onPermissionGranted,
onRecipientTypeGranted: widget.onRecipientTypeGranted,
resourceDisplayName: widget.resourceDisplayName,
buttonColor:
widget.shareButtonColor ?? widget.buttonColor,
Expand Down
11 changes: 11 additions & 0 deletions lib/src/widgets/share_resource_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ library;

import 'package:flutter/material.dart';

import 'package:solidpod/solidpod.dart' show RecipientType;

import 'package:solidui/src/utils/solid_alert.dart';
import 'package:solidui/src/widgets/grant_permission_form.dart';
import 'package:solidui/src/widgets/solid_invite_others_models.dart';
Expand Down Expand Up @@ -108,6 +110,13 @@ class ShareResourceButton extends StatefulWidget {

final VoidCallback? onPermissionGranted;

/// Callback called when permissions are granted successfully, with the
/// [RecipientType] and resource names that were just granted. See
/// [GrantPermissionForm.onRecipientTypeGranted].

final void Function(RecipientType recipientType, List<String> resourceNames)?
onRecipientTypeGranted;

/// Optional human-readable name for the resource, used in notification
/// messages sent to recipients upon successful permission granting.

Expand Down Expand Up @@ -138,6 +147,7 @@ class ShareResourceButton extends StatefulWidget {
required this.isFile,
this.dataFilesMap = const {},
this.onPermissionGranted,
this.onRecipientTypeGranted,
this.resourceDisplayName,
this.buttonColor,
this.inviteConfig,
Expand Down Expand Up @@ -225,6 +235,7 @@ class _ShareResourceButtonState extends State<ShareResourceButton> {
dataFilesMap: widget.dataFilesMap,
updatePermissionGrantedFunction: _updatePermissionGrantedStatus,
onPermissionGranted: widget.onPermissionGranted,
onRecipientTypeGranted: widget.onRecipientTypeGranted,
resourceDisplayName: widget.resourceDisplayName,
inviteConfig: widget.inviteConfig,
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: solidui
description: 'A UI library for building Solid applications with Flutter.'
version: 1.0.24
version: 1.0.25
homepage: https://github.com/anusii/solidui

# Scaffold a new Solid Pod file-browser app (a pod browser, with navigation
Expand Down
53 changes: 53 additions & 0 deletions templates/solidui/.gitignore.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# Claude
.claude/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
/coverage/
/test/widget_test.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# Public/auth user index file - config
support/index_account_credentials.json
support/*.json
Loading
Loading