Skip to content

Commit

Permalink
Merge pull request #155 from alexrintt/#150
Browse files Browse the repository at this point in the history
See #150
  • Loading branch information
alexrintt authored Feb 16, 2024
2 parents 36ebf78 + d483635 commit 5c8b8bd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
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

0 comments on commit 5c8b8bd

Please sign in to comment.