hydra library

Flutter widget which helps building responsive widgets.

Classes

HydraBehaviour
HydraBehaviour defines behaviour for HydraWidget.
HydraBuilder
HydraBuilder builds a single widget tree that adapts to the current Breakpoint, instead of swapping whole widgets like HydraWidget.
HydraGrid
HydraGrid is a grid whose column count depends on the current breakpoint.
HydraHead
HydraHead pairs a widget with a breakpoint to define which device type the widget is intended for.
HydraLayoutScope
HydraLayoutScope resolves the breakpoint from the space its parent gives it instead of the screen size - like a container query in CSS.
HydraResolver
Shared breakpoint resolution logic used by both HydraWidget and HydraValue.
HydraScope
HydraScope provides a default HydraBehaviour to all Hydra widgets and values below it, so the behaviour is configured once instead of on every usage.
HydraSliverGrid
HydraSliverGrid is the sliver of HydraGrid, for a grid inside a CustomScrollView next to other slivers.
HydraTransition
HydraTransition describes how HydraWidget and HydraVisibility animate from one widget to another when the breakpoint changes.
HydraValue<T>
HydraValue resolves a value of type T based on the current screen breakpoint, using the same logic as HydraWidget.
HydraVisibility
HydraVisibility shows its child only within a range of breakpoints.
HydraWidget
HydraWidget is a StatelessWidget that selects which widget to display based on the current screen size and behaviour configuration.

Enums

Breakpoint
Breakpoint is used to distinguish between several device types.

Extensions

HydraContext on BuildContext
Extension on BuildContext for convenient responsive value resolution.

Constants

kLargeBP → const double
Breakpoint to distinguish the width of the device.
kMediumBP → const double
Breakpoint to distinguish the width of the device.
kSmallBP → const double
Breakpoint to distinguish the width of the device.

Typedefs

HydraWidgetBuilder = Widget Function(BuildContext context, Breakpoint breakpoint)
Signature of the callback used by HydraBuilder.

Exceptions / Errors

HydraNoValueException
Exception thrown when no value was provided to a HydraValue.
HydraNoWidgetException
Exception that was thrown when no widget was provided to a HydraWidget.