hwidget top-level constant

FunctionalWidget const hwidget

A decorator for functions to generate a HookWidget.

HookWidget must be installed as a separate dependency:

dependencies:
  flutter_hooks: any

The name of the generated widget is the name of the decorated function, with an uppercase as first letter.

Implementation

const FunctionalWidget hwidget = FunctionalWidget(
  widgetType: FunctionalWidgetType.hook,
);