refactor #171: remove all the deprecated attributes#172
Conversation
|
Warning Review limit reached
Next review available in: 43 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 ignored due to path filters (2)
📒 Files selected for processing (13)
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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
lib/widgets/time_picker.dart (1)
78-86: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
secondIntervalfield is never actually applied — hardcoded to1inbuild().The constructor now accepts and validates
secondInterval(default1, asserted to be a positive divisor of 60), butbuild()passes a literalsecondInterval: 1toCupertinoTimerPickerinstead of thesecondIntervalfield. Any caller supplying a non-defaultsecondInterval(e.g.BottomPickerforwardingwidget.timerSecondsInterval, per the downstream snippet) will silently get seconds selectable at 1-second granularity regardless of what was requested.🐛 Proposed fix
child: CupertinoTimerPicker( itemExtent: itemExtent, mode: mode, onTimerDurationChanged: onChange, minuteInterval: minuteInterval, initialTimerDuration: initialDuration ?? Duration.zero, backgroundColor: Colors.transparent, - secondInterval: 1, + secondInterval: secondInterval, ),🤖 Prompt for 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. In `@lib/widgets/time_picker.dart` around lines 78 - 86, The Cupertino timer picker is ignoring the configurable second interval because build() hardcodes secondInterval to 1. Update the CupertinoTimerPicker call in TimePicker’s build method to pass the TimePicker.secondInterval field instead of a literal, so callers like BottomPicker that forward timerSecondsInterval get the requested granularity.lib/widgets/close_icon.dart (1)
11-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider optional param with default instead of required nullable.
closeIconSizeisrequiredyet nullable, forcing every caller to explicitly passnullto opt into default icon sizing rather than simply omitting the parameter. An optional parameter with a sensible default (e.g.this.closeIconSizedefaulting to24.0, matchingIcon's default) would be more ergonomic and match Flutter conventions.🤖 Prompt for 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. In `@lib/widgets/close_icon.dart` around lines 11 - 19, The CloseIcon constructor currently makes closeIconSize required even though it is nullable, which forces callers to pass null instead of omitting it. Update the CloseIcon class so closeIconSize is optional with a sensible default (for example, 24.0) and keep the sizing logic in CloseIcon consistent with Flutter’s Icon defaults.
🤖 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/widgets/date_picker.dart`:
- Around line 27-31: The doc comment for dateOrder is copied from textStyle and
describes the wrong type. Update the comment above dateOrder in DatePicker to
explain that it controls the ordering of date components via the
DatePickerDateOrder enum, and keep the following textStyle comment focused only
on styling.
In `@lib/widgets/time_picker.dart`:
- Around line 49-67: Add constructor assertions in TimePicker to validate that
initialDuration is aligned with minuteInterval and secondInterval before
reaching CupertinoTimerPicker. In the TimePicker constructor, alongside the
existing minuteInterval and secondInterval checks, assert that
initialDuration?.inMinutes % minuteInterval == 0 and initialDuration?.inSeconds
% secondInterval == 0 when initialDuration is provided, so invalid combinations
fail early with a clear TimePicker-level message.
---
Outside diff comments:
In `@lib/widgets/close_icon.dart`:
- Around line 11-19: The CloseIcon constructor currently makes closeIconSize
required even though it is nullable, which forces callers to pass null instead
of omitting it. Update the CloseIcon class so closeIconSize is optional with a
sensible default (for example, 24.0) and keep the sizing logic in CloseIcon
consistent with Flutter’s Icon defaults.
In `@lib/widgets/time_picker.dart`:
- Around line 78-86: The Cupertino timer picker is ignoring the configurable
second interval because build() hardcodes secondInterval to 1. Update the
CupertinoTimerPicker call in TimePicker’s build method to pass the
TimePicker.secondInterval field instead of a literal, so callers like
BottomPicker that forward timerSecondsInterval get the requested granularity.
🪄 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: 20e69c89-1d7d-4ba0-98c6-b1225532f292
⛔ Files ignored due to path filters (2)
example/pubspec.lockis excluded by!**/*.lockpubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
example/ios/Flutter/AppFrameworkInfo.plistexample/ios/Runner.xcodeproj/project.pbxprojexample/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeexample/ios/Runner/AppDelegate.swiftexample/ios/Runner/Info.plistlib/bottom_picker.dartlib/widgets/bottom_picker_button.dartlib/widgets/close_icon.dartlib/widgets/date_picker.dartlib/widgets/range_picker.dartlib/widgets/simple_picker.dartlib/widgets/time_picker.dartlib/widgets/year_picker.dart
💤 Files with no reviewable changes (2)
- example/ios/Flutter/AppFrameworkInfo.plist
- lib/bottom_picker.dart
chore: update time picker assertions
6e899cc to
ec9cd60
Compare
Summary by CodeRabbit
New Features
Bug Fixes
Documentation