hydra 2.0.1
hydra: ^2.0.1 copied to clipboard
Flutter widget which helps building responsive widgets.
2.0.1 #
HydraBuilderruns its builder only when the breakpoint changes, not on every change of the screen sizeHydraScoperesolves the breakpoint once, from the screen size at its place in the tree; widgets and values below it rebuild only when the breakpoint changes. AMediaQuerywith a different size below a scope needs aHydraScopeof its ownHydraScopeis now aStatelessWidget;HydraScope.of(context)is unchanged,HydraScope.breakpointOf(context)is new- Added
HydraGrid.builderfor lazily built grids - Added
maintainStatetoHydraVisibilityto keep a hidden child alive - Added
HydraResolver.resolveValueAtto resolve by breakpoint instead of width
2.0.0 #
- Breaking:
behaviourofHydraWidget,HydraValueandcontext.hydra<T>()is now optional and falls back to the nearestHydraScope. Thebehaviourfields are nullable as a result - code reading e.g.widget.behaviour.breakpointSmallneeds a null check - Breaking:
HydraWidget.widgetsis now a getter; the alternatives are available asmini,small,mediumandlarge - Added
HydraScopeto configure the behaviour once for a whole subtree - Added
HydraBuilderto build one widget tree from the current breakpoint - Added
Breakpoint.current(context)for direct access to the active breakpoint - Added
HydraVisibilityto show a widget only within a range of breakpoints - Added
HydraGrid, a grid with a column count per breakpoint - Added
HydraTransition(fade,scale,sizeor a custom builder) and thetransitionparameter ofHydraWidgetandHydraVisibilityfor animated breakpoint changes - Added
HydraBehaviour.bootstrap(),HydraBehaviour.tailwind()andHydraBehaviour.cupertino()presets HydraBehaviournow has value equalityHydraTransitiontakes analignmentfor variants of different sizeHydraResolver.of(context)resolves the scoped behaviour;resolveValuethrowsHydraNoValueExceptionwithout any value- New showcase example app and README animation; the example uses
package:material_ui
1.2.0 #
- Added
HydraValue<T>for responsive values without widgets - Added
context.hydra<T>()extension for inline responsive values - Added
HydraResolverwith shared breakpoint resolution logic - Refactored
HydraWidgetto useHydraResolverinternally (no breaking changes) - Updated README with new features and code examples
1.1.4 #
- Use
MediaQuery.sizeOfinstead ofMediaQuery.ofto reduce unnecessary rebuilds - Migrated from
flutter_lintstovery_good_analysisfor stricter linting - Added
HydraBehaviourunit tests for full Codecov coverage
1.1.3 #
- Added Codecov integration for test coverage reporting
- Achieved 100% test coverage with widget build test
- Improved README with Hydra mythology intro and "Why Hydra?" section
1.1.2 #
- Removed
dartdoc_options.yamlthat referenced unnamed library, fixing pub.dev doc generation - Fixed dartdoc warnings by qualifying field references in
{@macro}template - Added
build/anddoc/to.pubignore
1.1.1 #
- Fixed
dartdoc_options.yamlsyntax causing pub.dev documentation generation to fail
1.1.0 #
- Breaking: Default breakpoints changed from 90/400/800 to 600/900/1200
- Added
HydraBehaviour.material()preset with Material Design breakpoints (600/840/1200) - Exported
Breakpointenum as public API - Rewrote README with installation guide, code examples, and badges
1.0.0 #
- Breaking: Removed unused
HydraNeckclass - Breaking: Removed commented-out
BreakpointExtension - Breaking: Minimum SDK constraint is now
>=3.5.0 - Migrated to null safety
- Replaced deprecated
pedanticwithflutter_lints - Made
HydraBehaviournamed constructorsconst - Made
HydraHeadconstructorsconst - Made
HydraNoWidgetExceptionconstwithfinalmessage - Used switch expressions and collection-if in
HydraWidget - Fixed bug in
chooseAvailableWidgetwhere filter was always true - Updated example app to modern Flutter conventions
- Added
topicstopubspec.yamlfor pub.dev discoverability
0.1.0 #
- Initial version of this package