Skip to main content

hydra 2.0.1 copy "hydra: ^2.0.1" to clipboard
hydra: ^2.0.1 copied to clipboard

Flutter widget which helps building responsive widgets.

2.0.1 #

  • HydraBuilder runs its builder only when the breakpoint changes, not on every change of the screen size
  • HydraScope resolves the breakpoint once, from the screen size at its place in the tree; widgets and values below it rebuild only when the breakpoint changes. A MediaQuery with a different size below a scope needs a HydraScope of its own
  • HydraScope is now a StatelessWidget; HydraScope.of(context) is unchanged, HydraScope.breakpointOf(context) is new
  • Added HydraGrid.builder for lazily built grids
  • Added maintainState to HydraVisibility to keep a hidden child alive
  • Added HydraResolver.resolveValueAt to resolve by breakpoint instead of width

2.0.0 #

  • Breaking: behaviour of HydraWidget, HydraValue and context.hydra<T>() is now optional and falls back to the nearest HydraScope. The behaviour fields are nullable as a result - code reading e.g. widget.behaviour.breakpointSmall needs a null check
  • Breaking: HydraWidget.widgets is now a getter; the alternatives are available as mini, small, medium and large
  • Added HydraScope to configure the behaviour once for a whole subtree
  • Added HydraBuilder to build one widget tree from the current breakpoint
  • Added Breakpoint.current(context) for direct access to the active breakpoint
  • Added HydraVisibility to show a widget only within a range of breakpoints
  • Added HydraGrid, a grid with a column count per breakpoint
  • Added HydraTransition (fade, scale, size or a custom builder) and the transition parameter of HydraWidget and HydraVisibility for animated breakpoint changes
  • Added HydraBehaviour.bootstrap(), HydraBehaviour.tailwind() and HydraBehaviour.cupertino() presets
  • HydraBehaviour now has value equality
  • HydraTransition takes an alignment for variants of different size
  • HydraResolver.of(context) resolves the scoped behaviour; resolveValue throws HydraNoValueException without 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 HydraResolver with shared breakpoint resolution logic
  • Refactored HydraWidget to use HydraResolver internally (no breaking changes)
  • Updated README with new features and code examples

1.1.4 #

  • Use MediaQuery.sizeOf instead of MediaQuery.of to reduce unnecessary rebuilds
  • Migrated from flutter_lints to very_good_analysis for stricter linting
  • Added HydraBehaviour unit 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.yaml that referenced unnamed library, fixing pub.dev doc generation
  • Fixed dartdoc warnings by qualifying field references in {@macro} template
  • Added build/ and doc/ to .pubignore

1.1.1 #

  • Fixed dartdoc_options.yaml syntax 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 Breakpoint enum as public API
  • Rewrote README with installation guide, code examples, and badges

1.0.0 #

  • Breaking: Removed unused HydraNeck class
  • Breaking: Removed commented-out BreakpointExtension
  • Breaking: Minimum SDK constraint is now >=3.5.0
  • Migrated to null safety
  • Replaced deprecated pedantic with flutter_lints
  • Made HydraBehaviour named constructors const
  • Made HydraHead constructors const
  • Made HydraNoWidgetException const with final message
  • Used switch expressions and collection-if in HydraWidget
  • Fixed bug in chooseAvailableWidget where filter was always true
  • Updated example app to modern Flutter conventions
  • Added topics to pubspec.yaml for pub.dev discoverability

0.1.0 #

  • Initial version of this package
2
likes
160
points
153
downloads

Documentation

API reference

Publisher

verified publisherkazhdan.dev

Weekly Downloads

Flutter widget which helps building responsive widgets.

Repository (GitHub)
View/report issues

Topics

#responsive #widget #breakpoint #layout

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hydra