v3.2.0 — bug fixes, new API, CI/CD#132
Merged
Merged
Conversation
- Rewrite content_change tests: replace illegal state.didUpdateWidget() calls with proper TestWidgetScreen+setState so the framework drives the lifecycle naturally - Fix duplicate test name in show_hide tests (shadowed the second case) - Remove unnecessary async from all synchronous unit tests - Add 15 new test cases: standalone badge rendering/onTap/ignorePointer, showBadge:false initial state, BadgePosition factory defaults, Icon content change animation, non-Text/Icon limitation documentation, and issue #114 regression (skip:true — confirms early-return bug in didUpdateWidget loop branch) - Note in PLAN.md: always use GestureDetector (not ElevatedButton) when triggering setState in animation tests to avoid ripple pollution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump flutter_lints ^2.0.1 → ^6.0.0 in main package - Update flutter SDK lower bound from ">=0.2.5" → ">=3.10.0" to match the Dart >=3.0.0 constraint (Dart 3.0 shipped with Flutter 3.10) - Example app: replace discontinued pedantic ^1.11.1 with flutter_lints ^6.0.0, remove unused integration_test dep, bump cupertino_icons to ^1.0.8, add flutter SDK lower bound - Fix 3 use_super_parameters lint warnings in Badge, BadgePositioned, and TestWidgetScreen constructors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bug fixes: - #114: showBadge ignored when loop animation active (didUpdateWidget restructured) - #130: showBadge slow to hide with animation (stop() before reverse()) - #98: border anti-aliasing artifact (border moved into BoxDecoration strokeAlignInside) - #115: animation not re-triggered for custom content (key-based detection) New API: - BadgeStyle.copyWith() covering all 8 fields - BadgePosition.centerStart() and .centerEnd() named constructors - BadgeState.animationController and .appearanceController public getters Code quality: - _BadgeVisual extracted as StatelessWidget (PR #120, reduces rebuilds) - ConstrainedBox + IntrinsicWidth for proportional small badges (PR #111) - BadgeGradient.gradient() asserts document constructor invariants - Example app: 16 lint warnings resolved, pedantic replaced with flutter_lints - README: corrected GIF height, added hide Badge import option Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ci.yml: runs on every PR and push to master (analyze, format check, tests) - publish.yml: publishes to pub.dev on v* tag push using OIDC (no stored secrets) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
showBadgenot respected whenbadgeAnimationis fading on loop #114 (showBadge ignored with loop animation), showBadge is slow to respond to change when animation is on #130 (slow hide), the border not anti-aliasing? #98 (border anti-aliasing), Animation not working #115 (key-based animation re-trigger)BadgeStyle.copyWith(),BadgePosition.centerStart/centerEnd,BadgeState.animationController/appearanceControllerpublic getters_BadgeVisualextracted asStatelessWidget(avoids full subtree rebuild on every opacity tick)ConstrainedBox+IntrinsicWidthkeeps single-character badges proportionalci.yml(analyze + format + tests on every PR),publish.yml(publishes to pub.dev onv*tag via OIDC)integration_testdep, fixed all 16 lint warningsflutter_lints^2.0.1→^6.0.0, Flutter SDK lower bound>=3.10.0Deploying
After merging, publish by pushing a version tag:
The
publish.ymlworkflow will runflutter pub publishautomatically via pub.dev OIDC — no secrets needed, but you must first grant theyako-dev/flutter_badgesrepo publish permission on pub.dev under the package's admin settings.Test plan
flutter test --test-randomize-ordering-seed random— 175 passed, 0 skippedflutter analyze lib/ test/ example/— no issuesdart format --set-exit-if-changed .— clean🤖 Generated with Claude Code