widget_previews library

The Flutter widget preview annotations and data classes.

To use, import package:flutter/widget_previews.dart.

See flutter.dev/to/widget-previews for more details on getting started with widget previews.

Classes

MultiPreview
The base class used to define a custom 'multi-preview' annotation.
Preview
Annotation used to mark functions that return a widget preview.
PreviewBuilder
A utility class used to build a Preview instance.
PreviewLocalizationsData
A collection of localization objects and callbacks for use in widget previews.
PreviewThemeData
A collection of ThemeData and CupertinoThemeData instances for use in widget previews.

Typedefs

PreviewLocalizations = PreviewLocalizationsData Function()
Signature for callbacks that build localization data used when creating a Preview.
PreviewTheme = PreviewThemeData Function()
Signature for callbacks that build theming data used when creating a Preview.
WidgetWrapper = Widget Function(Widget)
Signature for callbacks that wrap a Widget with another Widget when creating a Preview.