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

Prevent the user to create a folder with null or an empty string #1095

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

nilsreichardt
Copy link
Member

Description

Before this PR, you could create a folder with an empty string or click the create button when a text field had the value null which caused a null operator exception. This PR fixes the issue by checking if the text is null or empty.

Demo

image

@github-actions
Copy link

github-actions bot commented Sep 25, 2023

Visit the preview URL for this PR (updated for commit 34b9598):

https://sharezone-test--pr1095-prevent-to-empty-tex-nfup9v89.web.app

(expires Sat, 14 Oct 2023 12:54:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

@nilsreichardt nilsreichardt added the build-app-preview A label that can be assigned to a PR to trigger a build of the app preview. label Sep 25, 2023
@Sharezone-Admin
Copy link
Member

Sharezone-Admin commented Sep 25, 2023

⬇️ Generated builds by Codemagic for commit 34b9598 ⬇️

Note: Only Sharezone team members are able to install the iOS app.

iOS Android
image
Download link
image
Download link

/// If [isNullOrEmptyTextAllowed] is `false` and the user submits `null` or an
/// empty text, then the dialog will not be closed and the [onTap] callback
/// will not be called. Instead an error message will be shown.
final bool isNullOrEmptyTextAllowed;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
final bool isNullOrEmptyTextAllowed;
final bool isEmptyAllowed;

I think that this should be still clear but a bit more readable. WDYT?

@nilsreichardt nilsreichardt added this pull request to the merge queue Oct 11, 2023
Merged via the queue into main with commit 0c60138 Oct 11, 2023
23 checks passed
@nilsreichardt nilsreichardt deleted the prevent-to-empty-text branch October 11, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-app-preview A label that can be assigned to a PR to trigger a build of the app preview. ui / ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants