refactor: delete all deprecated attributes#176
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR refactors ChangesBottomPicker API refactor and example demo
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/bottom_picker.dart`:
- Around line 775-785: The currentValue getter in bottom_picker.dart falls back
to _selectedDateTime for range picker types, but rangeDate and rangeTime use
_selectedFirstDateTime and _selectedSecondDateTime instead. Update currentValue
to explicitly handle the range picker cases in BottomPickerType so it does not
return an unset field, either by returning an appropriate range value or by
preventing currentValue from being used for range flows; also make sure any
existing getters like currentFirstDateTime and currentSecondDateTime are the
intended accessors for range pickers.
- Around line 803-808: The _selectedItemIndex, _selectedItem, _selectedDateTime,
_selectedTimerDuration, _selectedSecondDateTime, and _selectedFirstDateTime
fields are mutable runtime selection state and should live in BottomPickerState
rather than BottomPicker. Move the selection tracking into the state class and
update the relevant selection handlers in BottomPickerState so currentValue and
submit callbacks read from state instead of widget fields. Remove any writing
back into widget and make sure the state persists across rebuilds so selections
do not reset when BottomPicker is recreated.
- Around line 1046-1051: The selected-date update logic in
CupertinoDatePickerWidget is filtering calendarDays twice, which can leave
_selectedDateTime out of sync with the visible wheel state; remove the early
return in the date assignment path and rely on the widget’s existing
calendarDays enforcement/snapping behavior instead. Keep the update in the code
path that assigns widget._selectedDateTime so the picker always tracks the
displayed date, and use the existing DateTime.weekday mapping directly since it
already matches fullWeek.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 255dceec-e75a-48ca-9f63-b725625e9a32
📒 Files selected for processing (7)
analysis_options.yamlexample/lib/example_widget.dartexample/lib/main.dartlib/bottom_picker.dartlib/widgets/close_icon.dartlib/widgets/year_picker.darttest/simple_bottom_picker_test.dart
💤 Files with no reviewable changes (1)
- lib/widgets/close_icon.dart
1e7ea33 to
fac757e
Compare
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes