-
Notifications
You must be signed in to change notification settings - Fork 70
Fix label and hint text overlap in CustomTextField #136
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
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request applies formatting and indentation improvements across multiple widget definitions in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@lib/widgets/custom_widgets.dart`:
- Line 37: Remove the dead local variable effectiveHintText which is computed as
"label ?? hintText" but never used; update the containing function (where
effectiveHintText is declared alongside label and hintText) by deleting the line
"final String effectiveHintText = label ?? hintText" and leaving usages to
reference hintText (as already changed on line 50), ensuring no other references
to effectiveHintText remain.
| @@ -37,7 +37,7 @@ class CustomTextField extends StatelessWidget { | |||
| final String effectiveHintText = label ?? hintText; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused variable effectiveHintText.
This variable is computed but no longer used after the change on line 50 switched from effectiveHintText to hintText. This is now dead code.
Suggested fix
`@override`
Widget build(BuildContext context) {
- final String effectiveHintText = label ?? hintText;
final IconData? effectivePrefixIcon = icon ?? prefixIcon;
final bool effectiveObscureText = isPassword ?? obscureText;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| final String effectiveHintText = label ?? hintText; | |
| `@override` | |
| Widget build(BuildContext context) { | |
| final IconData? effectivePrefixIcon = icon ?? prefixIcon; | |
| final bool effectiveObscureText = isPassword ?? obscureText; |
🤖 Prompt for AI Agents
In `@lib/widgets/custom_widgets.dart` at line 37, Remove the dead local variable
effectiveHintText which is computed as "label ?? hintText" but never used;
update the containing function (where effectiveHintText is declared alongside
label and hintText) by deleting the line "final String effectiveHintText = label
?? hintText" and leaving usages to reference hintText (as already changed on
line 50), ensuring no other references to effectiveHintText remain.
Closes #135 BUG: TableCalendar Widget Crashes When focusedDay is Out of Range
📝 Description
Fixes the overlapping of the label and hint text in the CustomTextField widget.
The label now properly moves above the input field when text is entered, preventing UI overlap.
🔧 Changes Made
Updated CustomTextField logic in lib/widgets/custom_widgets.dart
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.