Instance class abstract

An Instance specifies a code element like Container(). Instance is used to specify and generate code structures so the Widgetbook can be created an tested easily.

Inheritance
Implementers
Annotations
  • @immutable

Constructors

Instance({required String name, required List<Property> properties, List<String> genericParameters = const <String>[], String? namedConstructor, bool trailingComma = true})
Create a new instance of Instance
const

Properties

genericParameters → List<String>
final
hashCode → int
The hash code for this object.
no setteroverride
name → String
The name for the instance. This is basically the class name of the instance.
final
namedConstructor → String?
Identifier of named constructor
final
properties → List<Property>
The properties which are defined by the instance.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trailingComma → bool
Specifies if a trailing comma should be inserted into the code. This leads to better code formatting.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCode() → String
Transforms the BaseInstance or its implementation into Code (a String)
override
toString() → String
A string representation of this object.
override

Operators

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