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

See #150 #155

Merged
merged 2 commits into from
Feb 16, 2024
Merged
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
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/lib/screens/file_explorer/file_explorer_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class _FileExplorerCardState extends State<FileExplorerCard> {
if (_expanded) ...[
_buildThumbnail(size: 50),
_buildDocumentMetadata(),
_buildAvailableActions()
_buildAvailableActions(),
] else
_buildDocumentSimplifiedTile(),
],
Expand Down
2 changes: 1 addition & 1 deletion example/lib/screens/file_explorer/file_explorer_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class _FileExplorerPageState extends State<FileExplorerPage> {
_buildDocumentList()
else
_buildEmptyFolderWarning(),
]
],
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions example/lib/screens/granted_uris/granted_uri_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _GrantedUriCardState extends State<GrantedUriCard> {
ActionButton(
'Open file picker here',
onTap: () => openDocumentTree(initialUri: widget.permissionUri.uri),
)
),
];
}

Expand Down Expand Up @@ -193,7 +193,7 @@ class _GrantedUriCardState extends State<GrantedUriCard> {
didUpdateDocument: (updatedDocumentFile) {
documentFile = updatedDocumentFile;
},
)
),
],
);
}
Expand Down
10 changes: 9 additions & 1 deletion lib/src/common/functional_extender.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ extension FunctionalExtender<T> on T? {
T? takeIf(bool Function(T) f) {
final T? self = this;

return self != null && f(self) ? self : null;
if (self == null) {
return null;
}

if (f(self)) {
return self;
}

return null;
}
}

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: shared_storage
description: "Flutter plugin to work with external storage and privacy-friendly APIs."
version: 0.8.0
version: 0.8.1
homepage: https://github.com/alexrintt/shared-storage
repository: https://github.com/alexrintt/shared-storage
issue_tracker: https://github.com/alexrintt/shared-storage/issues
Expand Down
Loading