Repository navigation
codelessly_api 5.1.0: badge, chip and segmented button nodes - #35
Merged
Merged
Conversation
Port BadgeNode, ChipNode and SegmentedButtonNode from the unmerged migrate-json-serializable branch onto the 5.x conventions: standard json_serializable with the json_defaults_builder omit-defaults step, Equatable props, copyWith, field access, and Material 3 defaults that follow Flutter 3.47's Badge, chip widgets and SegmentedButton. Fields renamed to their Flutter names keep the branch's JSON keys (dotSize, labelStyle, selectedSegments, selectedColor, unselectedColor), so JSON written with the branch still loads. The segment model is ButtonSegmentModel to avoid clashing with Flutter's ButtonSegment. Register the three types with NodeJsonConverter, port the branch's tests and badge fixtures, and add round-trip and branch-JSON tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY
rayliverified
added a commit
that referenced
this pull request
Oct 13, 2026
Port BadgeNode, ChipNode and SegmentedButtonNode from the unmerged migrate-json-serializable branch onto the 5.x conventions: standard json_serializable with the json_defaults_builder omit-defaults step, Equatable props, copyWith, field access, and Material 3 defaults that follow Flutter 3.47's Badge, chip widgets and SegmentedButton. Fields renamed to their Flutter names keep the branch's JSON keys (dotSize, labelStyle, selectedSegments, selectedColor, unselectedColor), so JSON written with the branch still loads. The segment model is ButtonSegmentModel to avoid clashing with Flutter's ButtonSegment. Register the three types with NodeJsonConverter, port the branch's tests and badge fixtures, and add round-trip and branch-JSON tests.
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.
Ports
BadgeNode,ChipNodeandSegmentedButtonNodefrom themigrate-json-serializablebranch onto 5.0, so CodelesslyEditor can move off that branch.Changes
lib/src/api/nodes/(badge_node.dart,chip_node.dart,segmented_button_node.dart), following the 5.x pattern: json_serializable with default omission,empty()/fromProperties(),copyWith, triggers and property variables.NodeJsonConverterasbadge,chipandsegmentedButton.dotSize→smallSize,labelStyle→textStyleselectedSegments→selected,selectedColor→selectedBackgroundColor,unselectedColor→backgroundColorButtonSegmentModel, to avoid clashing with Flutter'sButtonSegment.textColor,largeSize,maxCountshowCheckmark,checkmarkColor,deleteIconColor,tooltipshowSelectedIcon,selectedIcon,direction,foregroundColor,selectedForegroundColorTesting
package:test.dart test: 155/155 pass.--fatal-infosis clean, andbuild_runnerproduces no diff.Pairs with the CodelesslySDK 7.1.0 PR. Publish this first; SDK 7.1.0 depends on
^5.1.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY
Generated by Claude Code