DesignExamples class

Provide examples based on a specific constructor. The generated examples will be displayed as subsections following the section of the constructor widget designer.

Example: used on a ctor to create an example

class Avatar extends StatelessWidget { final String uri;

@DesignExamples( examples: DesignExample( title: 'An example', description: 'This is an example', builder: _$AvatarParamBuilder(uri: 'https://example.com/image'), ), , ) const Avatar({ required this.uri, this.radius = 30.0, Key? key, }) : super(key: key); }

Constructors

DesignExamples({required List<DesignExample> examples})
Default constructor
const

Properties

examples List<DesignExample>
A set of examples using the annotated constructor.
final
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