Skip to content

Add showErrorWhenFocused and fix wrong renderbox size #202

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefanschaller
Copy link

No description provided.

@@ -390,6 +392,9 @@ class Pinput extends StatefulWidget {
/// If true [errorPinTheme] will be applied and [errorText] will be displayed under the Pinput
final bool forceErrorState;

/// If true, the error will also be displayed in the focused state. Otherwise the error is not displayed in the focused state.
final bool showErrorWhenFocused;
Copy link
Owner

Choose a reason for hiding this comment

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

Can't you use the forceErrorState instead?

Copy link
Author

Choose a reason for hiding this comment

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

The default behavior of a normal text field is that the error is displayed even when the user focuses on the field.
In theory, I could also use forceErrorState, but then I would need to handle focus checks manually.
From my perspective, this approach is much easier.

Copy link
Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants