cwidget top-level constant

FunctionalWidget const cwidget

A decorator for functions to generate a ConsumerWidget.

ConsumerWidget must be installed as a separate dependency:

dependencies:
  riverpod: any

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

Implementation

const FunctionalWidget cwidget = FunctionalWidget(
  widgetType: FunctionalWidgetType.consumer,
);