Fix label and hint text overlap in CustomTextField#136
Fix label and hint text overlap in CustomTextField#136SHUBHAM-410 wants to merge 1 commit intoAOSSIE-Org:mainfrom
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.
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.
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.