feat(border): add dashed and dotted borderStyle for container widgets - #2356
Merged
Conversation
…r and BoxController - Introduced BorderStyleComposite to manage border styles (solid, dashed, dotted). - Updated BoxWrapper and EnsembleBoxWrapper to utilize a new _resolveBoxBorder function for border rendering. - Enhanced BoxController to include borderStyle property and corresponding setter. - Implemented DashedBoxBorder class for rendering dashed and dotted borders.
borderStyle style property for container-based widgets (Row, Column, Flex*, and other BoxWrapper widgets) so borders can be solid, dashed, or dotted. This unblocks UI patterns like dashed drop zones without changing existing solid border behavior.
M-Talha4
approved these changes
Aug 27, 2026
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.
Description
Adds a
borderStylestyle property for container-based widgets (Row, Column, Flex*, and other BoxWrapper widgets) so borders can be solid, dashed, or dotted. This unblocks UI patterns like dashed drop zones without changing existing solid border behavior.Related Issue
Fixes #2347
Type of Change
What Has Changed
BorderStyleComposite(type,length,gap) onBoxControllerandHasBorderControllerDashedBoxBorderto paint dashed/dotted outlines (includingborderRadius)BoxWrapper/EnsembleBoxWrapperto resolve solid vs dashed/dotted vs gradient borderssolidkeeps existing behavior;lengthdefaults to 5,gapdefaults to 3Example:
How to Test
borderWidth,borderColor, andborderStyle.type: solid— confirm solid border (same as before).borderStyle.type: dashedwith optionallength/gap— confirm dashed border.borderStyle.type: dotted— confirm dotted border.borderRadiuswith dashed/dotted — confirm corners follow the radius.borderStyle— confirm existing solid border behavior is unchanged.Screenshots / Videos
Checklist
flutter analyzeand addressed any new warningsflutter testand all tests pass