bracket_view 1.0.0
bracket_view: ^1.0.0 copied to clipboard
A reusable tournament bracket widget with scroll-driven animations and responsive layout.
1.0.0 #
First stable release.
Highlights #
- BREAKING (from 0.1.0):
BracketMatch.winnerSideis nowBracketWinnerSide?enum (teamA/teamB) instead ofString? BracketMatchLegmodel andBracketMatch.legsfor optional per-leg metadata (label, score, date, venue)BracketMatch.hasMultipleLegsconvenience getterBracketTheme.previousRoundPeek,teamLogoTheme,chipHeight,chipPadding,chipTextStyle- Custom snap physics with stiffer spring for responsive chip-tap navigation
- Force
ClampingScrollPhysicsparent — fixes slow snap animation on iOS - Instant
jumpToon chip tap for zero-lag round switching - Demo GIF added to README
- Unit + widget test suite (17 cases)
- Example app: switchable UCL (two-leg with leg picker bottom sheet) vs World Cup 2022 (single-leg with AET/penalties)
0.2.1 #
- README: restore Screenshots section (images exist), remove Demo placeholder (gif not yet available)
- No code changes
0.2.0 #
This release consolidates several internal iterations into the next pub.dev
release after 0.1.0. Highlights:
Breaking changes #
BracketMatch.winnerSideis now aBracketWinnerSide?enum (teamA/teamB) instead ofString?. Replace'A'/'B'withBracketWinnerSide.teamA/BracketWinnerSide.teamB.
New features #
- Loser strikethrough works for level scores (e.g. 1-1 decided on penalties) when
winnerSideis set explicitly BracketMatchLegmodel andBracketMatch.legsfor optional per-leg metadata (label, score, date, venue), plusBracketMatch.hasMultipleLegsBracketTheme.previousRoundPeek— controls how much of the previous round peeks from the left edge when snapped (default 32.0)BracketTheme.teamLogoTheme(TeamLogoTheme) — customize avatar background, fallback icon/color, size, border radius, border, and padding without a customteamImageBuilderBracketTheme.chipHeight,chipPadding,chipTextStylefor chip customization (and tighter defaults: height 38→32, padding 14→10, fontSize 11)
Behavior & fixes #
- Replace manual snap detection with custom
ScrollPhysicsthat snaps natively on fling/drag, mirroringPageView(velocity-aware) - First round now snaps to offset 0 so the leading 16px padding is visible
- Fix snap-to-round position accuracy (no more off-by-padding errors)
- Fix card animation: focused round displays compact, next rounds show bracket-aligned preview
- Fix
_snappedIndexgetting stuck during left scroll — active tab now updates correctly - Fix last round (Final) being unreachable with proper
previousRoundPeekdue to insufficient trailing space - Fix bracket positions cascading incorrectly when parent rounds are compact
- Fix vertical scroll jank when flinging fast — body now rebuilds via
AnimatedBuilderlistening to the horizontal scroll controller - Replace card
GestureDetectorwithInkWellfor gesture-cooperative tap handling + ripple - More breathing room between chip bar, round date label, and the first match card
Docs & tooling #
scoreA/scoreBdoc-string clarified to cover both single-leg full-time scores and two-leg aggregateslibrary;directive added tolib/bracket_view.dartso the doc comment is no longer dangling (clears the analyzer info on pub.dev)flutter_lintsadded to the example app- Example: switchable datasets (UCL two-leg with leg picker bottom sheet vs World Cup 2022 single-leg with AET/penalties)
- Add unit + widget test suite under
test/
0.1.0 #
- Initial release
- Horizontal scroll bracket with snap-to-round behavior
- Scroll-driven card position animation (bracket-aligned ↔ compact)
- Connector lines between rounds (Type A fixed + Type B animated)
- Responsive layout: scroll mode on mobile, full bracket on desktop
- Round chip selector with auto-scroll
- Customizable theme via
BracketTheme - Custom
matchCardBuilderandteamImageBuildersupport - Web support with drag-to-scroll
- Generic models:
BracketMatch,BracketRound,BracketTeam