Preview class

Annotation used to mark functions that return a widget preview.

NOTE: this interface is not stable and will change.

Functions annotated with @Preview() must return a WidgetPreview and be public, top-level functions.
link
@Preview()
WidgetPreview widgetPreview() {
  return const WidgetPreview(name: 'Preview 1', child: Text('Foo'));
}

See also:

Constructors

Preview.new()
Annotation used to mark functions that return widget previews.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited