Repository navigation
feat(wave): support independent corner radii - #8
Merged
Merged
Conversation
There was a problem hiding this comment.
1 issue found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="lib/src/distortion_wave/distortion_wave.dart">
<violation number="1" location="lib/src/distortion_wave/distortion_wave.dart:154">
P3: This nullable property is missing `defaultValue: null`, unlike `source`, `style` and `progress` above it. Add it so unset radii are omitted from diagnostics output.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| DiagnosticsProperty<WaveSource>('source', source, defaultValue: null), | ||
| ) | ||
| ..add(EnumProperty<WaveType>('type', type, defaultValue: null)) | ||
| ..add(DiagnosticsProperty<BorderRadius>('cornerRadii', cornerRadii)) |
There was a problem hiding this comment.
P3: This nullable property is missing defaultValue: null, unlike source, style and progress above it. Add it so unset radii are omitted from diagnostics output.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At lib/src/distortion_wave/distortion_wave.dart, line 154:
<comment>This nullable property is missing `defaultValue: null`, unlike `source`, `style` and `progress` above it. Add it so unset radii are omitted from diagnostics output.</comment>
<file context>
@@ -144,6 +151,7 @@ class DistortionWave extends StatefulWidget {
DiagnosticsProperty<WaveSource>('source', source, defaultValue: null),
)
..add(EnumProperty<WaveType>('type', type, defaultValue: null))
+ ..add(DiagnosticsProperty<BorderRadius>('cornerRadii', cornerRadii))
..add(DiagnosticsProperty<WaveStyle>('style', style, defaultValue: null))
..add(DoubleProperty('progress', progress, defaultValue: null));
</file context>
Suggested change
| ..add(DiagnosticsProperty<BorderRadius>('cornerRadii', cornerRadii)) | |
| ..add( | |
| DiagnosticsProperty<BorderRadius>( | |
| 'cornerRadii', | |
| cornerRadii, | |
| defaultValue: null, | |
| ), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inset waves can take a different radius for each corner. Vance can give the paywall wave its sheet’s top corners and the device’s bottom corners.
Changes
DistortionWave.cornerRadiiand pass it to the wave renderer. Default geometry and style still apply when the property is omitted.Testing
dart format --output=none --set-exit-if-changed .flutter analyze --no-pub --fatal-infosdart pub publish --dry-runreported zero warnings.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds
DistortionWave.cornerRadiiso inset surfaces can use different corner radii per corner, for example a paywall wave with the sheet's top corners and the device's bottom corners.WaveGlow.cornerRadius; omitting the property keeps existing geometry and style behavior.Written for commit 9138f9d. Summary will update on new commits.