-
Notifications
You must be signed in to change notification settings - Fork 189
Fix Flutter constant naming: CHUNK_SIZE to chunkSize #1208
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
Conversation
Changed CHUNK_SIZE constant to chunkSize in Flutter templates to follow Dart's lowerCamelCase naming convention for constants, addressing the constant_identifier_names lint warning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Warning Rate limit exceeded@ChiragAgg5k has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 10 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughPublic constant identifiers were renamed from
Pre-merge checks and finishing touches✅ Passed checks (3 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
templates/flutter/lib/src/client.dart.twig
(1 hunks)templates/flutter/lib/src/client_browser.dart.twig
(3 hunks)templates/flutter/lib/src/client_io.dart.twig
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: build (8.3, Python312)
- GitHub Check: build (8.3, Ruby31)
- GitHub Check: build (8.3, Android5Java17)
- GitHub Check: build (8.3, WebChromium)
- GitHub Check: build (8.3, AppleSwift56)
- GitHub Check: build (8.3, WebNode)
- GitHub Check: build (8.3, Python311)
- GitHub Check: build (8.3, Swift56)
- GitHub Check: build (8.3, Ruby27)
- GitHub Check: build (8.3, Node20)
- GitHub Check: build (8.3, KotlinJava17)
- GitHub Check: build (8.3, Node18)
- GitHub Check: build (8.3, KotlinJava8)
- GitHub Check: build (8.3, Android14Java17)
- GitHub Check: build (8.3, DotNet90)
- GitHub Check: build (8.3, DotNet80)
- GitHub Check: swift (server)
- GitHub Check: kotlin (server)
- GitHub Check: apple (client)
- GitHub Check: android (client)
🔇 Additional comments (5)
templates/flutter/lib/src/client.dart.twig (1)
13-13
: LGTM! Constant rename follows Dart conventions.The renaming from
CHUNK_SIZE
tochunkSize
correctly follows Dart's lowerCamelCase naming convention for constants, eliminating theconstant_identifier_names
lint warning.Note: This is a breaking change for any code that directly references
Client.CHUNK_SIZE
. Users of the generated SDK will need to update toClient.chunkSize
.templates/flutter/lib/src/client_browser.dart.twig (2)
19-19
: LGTM! Constant declaration updated consistently.The constant declaration has been correctly renamed from
CHUNK_SIZE
tochunkSize
, consistent with the parentClient
class.
133-133
: LGTM! All usages updated consistently.All references to the constant in the
chunkedUpload
method have been correctly updated to usechunkSize
:
- Line 133: Size comparison for single-shot vs. chunked upload
- Line 157: Resume offset calculation
- Line 163: Chunk end index calculation
- Line 171: Content-Range header calculation
- Line 178: Offset advancement
The logic remains unchanged; only the identifier has been renamed.
Also applies to: 157-157, 163-163, 171-171, 178-178
templates/flutter/lib/src/client_io.dart.twig (2)
25-25
: LGTM! Constant declaration updated consistently.The constant declaration has been correctly renamed from
CHUNK_SIZE
tochunkSize
, consistent with the parentClient
class and the siblingClientBrowser
class.
247-247
: LGTM! All usages updated consistently across both code paths.All references to the constant in the
chunkedUpload
method have been correctly updated to usechunkSize
:
- Line 247: Size comparison for single-shot vs. chunked upload
- Line 279: Resume offset calculation
- Line 292: Chunk end index calculation (bytes path)
- Line 296: Chunk read size (file path)
- Line 304: Content-Range header calculation
- Line 311: Offset advancement
Both code paths (file.bytes and file.path) have been updated consistently. The logic remains unchanged; only the identifier has been renamed.
Also applies to: 279-279, 292-292, 296-296, 304-304, 311-311
Summary
CHUNK_SIZE
constant tochunkSize
in Flutter SDK templates to follow Dart's lowerCamelCase naming conventionconstant_identifier_names
lint warningWhy This Change is Needed
According to the Dart Style Guide, constants should use lowerCamelCase naming:
The current
CHUNK_SIZE
constant uses SCREAMING_CAPS, which was an older convention. Modern Dart code should usechunkSize
instead.Files Changed
templates/flutter/lib/src/client.dart.twig
templates/flutter/lib/src/client_browser.dart.twig
templates/flutter/lib/src/client_io.dart.twig
Impact
This change affects the generated Flutter SDK and will eliminate the
constant_identifier_names
lint warnings in the generated code.🤖 Generated with Claude Code
Summary by CodeRabbit