WidgetTrait class
Describes a widget regarding its layout specific properties.
Constructors
-
WidgetTrait.new({required TargetId targetId, String? id, List<
TraitAssert> asserts = const [], List<WidgetTrait> descendants = const []}) - Creates an instance of WidgetTrait.
-
WidgetTrait.withParents(List<
ComposeTargetId> parentIds, {required TargetId targetId, String? id, List<TraitAssert> asserts = const [], List<WidgetTrait> descendants = const []}) -
Creates an instance of WidgetTrait as a descendant of parents defined
represented by
parentIds
.factory
Properties
-
asserts
→ List<
TraitAssert> -
List of assertions on the target.
final
-
descendants
↔ List<
WidgetTrait> -
Traits of widgets which are descendants of the here targeted widget.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Returns the ID of this trait.
no setter
- isRoot → bool
-
Returns whether this is a root element.
no setter
- parent → WidgetTrait?
-
Parent trait.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - targetId → TargetId
-
final
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