ComponentPreview class final

A named parameter set a component renders with alone (Flutter's @Preview(name:, size:)): {"name": "Team, annual", "size": [432, 760], "props": {...}}.

Annotations
  • @immutable

Constructors

ComponentPreview({String name = '', double? width, double? height, Json props = const {}})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
height → double?
The size to render at; null: the root's design size.
final
name → String
final
props → Json
The parameters, as a call's props (literal JSON).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double?
The size to render at; null: the root's design size.
final

Methods

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

Operators

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

Static Methods

fromJson(Object? json) → ComponentPreview?