Skip to content

Commit cacb7b9

Browse files
authored
šŸ› Fix the confirm button is missing on iOS in SpecialPickerType.noPreview (#114)
1 parent 2178f54 commit cacb7b9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ā€Žlib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,15 @@ class DefaultAssetPickerBuilderDelegate
526526
centerTitle: isAppleOS,
527527
title: pathEntitySelector(context),
528528
leading: backButton(context),
529-
actions: !isAppleOS && (isPreviewEnabled || !isSingleAssetMode)
529+
// Condition for displaying the confirm button:
530+
// - On Android, show if preview is enabled or if multi asset mode.
531+
// If no preview and single asset mode, do not show confirm button,
532+
// because any click on an asset selects it.
533+
// - On iOS, show if no preview and multi asset mode. This is because for iOS
534+
// the [bottomActionBar] has the confirm button, but if no preview,
535+
// [bottomActionBar] is not displayed.
536+
actions: (!isAppleOS || !isPreviewEnabled) &&
537+
(isPreviewEnabled || !isSingleAssetMode)
530538
? <Widget>[confirmButton(context)]
531539
: null,
532540
actionsPadding: const EdgeInsets.only(right: 14.0),

0 commit comments

Comments
Ā (0)