breakify 0.3.0
breakify: ^0.3.0 copied to clipboard
Responsive widgets and utilities for Flutter applications.
0.3.0 #
Breakify 0.3.0 contains breaking changes in the grid widgets and introduces
the experimental BreakifyNavbar.
Breaking changes #
- Replaced the
equalHeightboolean ofBreakifyGridandBreakifyResponsiveGridwith a nullableheightModeof the newBreakifyHeightModeenum, exported frompackage:breakify/breakify.dart.equalHeight: true→heightMode: BreakifyHeightMode.equalInRow(identical behavior).equalHeight: false→heightMode: null(default); items keep usingchildAspectRatio.
- When
heightModeis notnull,childAspectRatiois ignored. - Raised the minimum supported version to Flutter
3.27.0(BreakifyNavbarusesColor.withValues).
Added #
BreakifyPanelLayout.reverse(defaultfalse): in horizontal mode, puts the secondary panels on the left and the main panel on the right without reversing the order ofsecondaryPanels.BreakifyPanelLayout.secondaryDirection(defaultAxis.vertical): withAxis.horizontal, the secondary panels are placed in aRowwith equal shares of width in horizontal mode.CrossAxisAlignment.stretchis applied asstartin thatRowbecause its height is unbounded.- Example screen for
reverseandsecondaryDirection, reachable from the BreakifyPanelLayout section of the example app. BreakifyAdaptativeLayout.order: optionalBreakifyLayoutOrderwithlayoutBelow/layoutAbovedistributions chosen from the configuredbreakpoint. Templates (BreakifyLayoutTemplate):inRow,inColumn,twoRows,twoColumnsandcustom(left:, right:), which uses indices of the originalchildrenlist. Two-group templates split children in order: the firstceil(n / 2)in the first group. Invalidcustomindices (out of range, repeated, missing, empty groups) throw in debug mode. Whenorderisnullthe behavior is unchanged. Known limitation: group heights are not equalized, so a child in a shorter group (e.g. an image) keeps its own height unless it sizes itself, optionally withcrossAxisAlignment: CrossAxisAlignment.stretch.- Example screen "Layout Order" for
BreakifyAdaptativeLayout, and README (EN/ES) documentation fororder. - Added the opt-in
childScaleproperty to the experimentalBreakifySectionto visually scale its child without changing its layout size. BreakifyNavbar.logoMaxHeight(default 80): the logo is no longer constrained to the barheight, so taller images (up to 80 px) are shown at their size instead of being squeezed to 64.BreakifyNavbar(experimental, API may change): responsive navbar that shows its items inline from a breakpoint and a hamburger menu below it, withBreakifyNavbarItem,BreakifyNavbarMenuType(dropdown,drawer),BreakifyNavbarScrollBehavior(static,fixed,hideOnScroll) andBreakifyNavbarDrawerSide. See the class documentation for limitations.BreakifyHeightMode.equal: every item has exactly the same height, the tallest of the whole grid.SpacerandExpandedare supported.BreakifyHeightMode.equalInRow: every item in a row matches that row's tallest item; rows may differ.SpacerandExpandedare supported.BreakifyHeightMode.natural: every item keeps its natural height, aligned to the top of its row.SpacerandExpandedare not supported because the height is unbounded.- Example screen "Raw Equal (experimental)" with unstyled, very uneven cards, a mode selector and a configurable number of cards.
Performance #
equalInRowandnaturalbuild rows lazily.equalmeasures one row at a time and discards it, caches the shared height until the width, columns, spacing or children change, and keeps only the visible rows alive. In a local benchmark (3 columns, debug VM) with 2000 cards it went from 130,044 to 655 live elements, and rebuilds at the same width from ~18.6 ms to ~0.6 ms. The first render improved (~1346 ms to ~825 ms), but a continuous width change costs more (~576 ms to ~754 ms) because every row is measured again.- Each row now includes
mainSpacingbelow it inequalmode, so the total scroll extent is onemainSpacinglonger.
Documentation #
- Added a "Latest Important Updates" section to
README.mdandREADME.es.mddescribingheightModeand how to migrate. - Grid documentation now refers to
heightModeinstead ofequalHeight. - Updated the equal-height example screens to show every mode.
0.2.2 #
- Fixed
equalHeightrow layout inBreakifyGridandBreakifyResponsiveGrid: rows now use a dedicated render object that measures once and lays children out with a tight height, soSpacerandExpandedinside cards work. Children that cannot report intrinsic dimensions (such asLayoutBuilder) remain unsupported. - Added an equal-height example with
Spacer,Expanded, incomplete rows and a comparison withequalHeight: false. - Split the
BreakifyResponsiveGridexample into Basic and Equal Height screens, matching theBreakifyGridexample. - Added the experimental
BreakifySectionwidget for page and landing-page sections, with an optional background, alignment, responsivepaddingandminHeight, andfullViewport. Its API may change in future releases. - Added a
BreakifySectionexample to the example app.
0.2.1 #
- Fixed breakpoint resolution so each configured breakpoint is active at its exact minimum width, including custom configurations.
- Improved
BreakifyResponsiveGriddocumentation and coverage for automatic local-width column calculation, spacing, limits, and unbounded constraints. - Added opt-in
equalHeightsupport toBreakifyResponsiveGrid, reusing the existing equal-height row layout. - Added the new Breakify logo and Brix mascot assets to the project identity.
- Updated
BreakifyDebugBannerto resolve its breakpoint from local layout constraints, with a global-width fallback for unbounded layouts. - Added new UI elements and improved the example application to provide a more complete demonstration of Breakify's features.
0.2.0 #
- Added
BreakifyPanelLayoutfor responsive main-and-secondary panel layouts. - Added
BreakifyResponsiveGridfor automatic column calculation based on available width, including a finite fallback for unbounded width. - Added local and global visibility modes to
BreakifyVisibility. - Expanded the example app and widget test coverage for the new functionality.
- Expanded the English and Spanish documentation with the new APIs, layout behavior, responsive modes, and configuration details.
0.1.1 #
BreakifyAdaptativeLayout: addedstretchChildren, which stretches children to share the same width when the layout is displayed as aColumn. This mirrors the existingdistributeEvenlybehavior, which already did the equivalent for theRowlayout.BreakifyGrid: addedequalHeight, which makes every item in a row match the height of the tallest item in that row (and, as a side effect of the row layout, the same width as well). Intended for grids with items of varying intrinsic height. Currently only supported withAxis.vertical.BreakifyGridandBreakifyListView: fixed horizontal scrolling (scrollDirection: Axis.horizontal). Both widgets now correctly detect unbounded constraints along the active scroll axis instead of always checking height, andBreakifyGrid'schildAspectRatiois now correctly resolved as width / height regardless of scroll direction.- New README with explanatory images for each breakpoint, plus a Spanish
translation (
README.es.md). - New, complete example app covering all widgets, including horizontal scrolling for BreakifyGrid and BreakifyListView.
- All existing functionality is preserved; the new options are opt-in and do not change the default behavior of existing widgets.
0.1.0 #
- Initial release.
- Responsive breakpoints.
- Responsive values.
- Fluid responsive values.
- Responsive container.
- Responsive layout.
- Responsive grid.
- Responsive list view.
- Responsive visibility.
- Debug banner.