WidgetSpec class final
The declaration of one widget type.
- Annotations
-
- @immutable
Constructors
-
WidgetSpec(String type, {required List<
PropDef< props, ChildModel children = ChildModel.none, List<Object?> >String> slots = const [], bool decorated = false, List<PropDef< childFields = const [], ChildFitRule? childFits, String doc = '', List<Object?> >EventSpec> events = const [], List<String> states = const [], bool hugs = false, bool fillsWidth = false}) -
const
Properties
-
childFields
→ List<
PropDef< Object?> > -
What this widget reads from each child's layout to place it: Flutter's
parent data (
Positionedin a stack,Flexible/Alignin a flex). The fields areLayoutFields; a child's panel shows them as its placement, chosen by its parent.final - childFits → ChildFitRule?
-
Which size fits a child may take (null:
defaultChildFits); seechildFitOptions.final - children → ChildModel
-
final
- decorated → bool
-
Has a box decoration (fills, strokes, radius, effects).
final
- doc → String
-
final
-
events
→ List<
EventSpec> -
The events it fires (a component's
widget.events): what a call's{"type": "event", "event": "<key>"}reactions handle. Empty for the core's widgets, whose events are triggers.final - fillsWidth → bool
-
With no width written it fills its parent's, and with no height it
hugs (a progress bar, a list tile, a table, a chart): complete with
nothing written, like a control that hugs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hugs → bool
-
A control (a button, a chip, a spinner): a node of it that gives no
layout.widthorlayout.heighthugs its content on that axis (the default control's size) instead of being 0 (zero_size).final -
props
→ List<
PropDef< Object?> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ List<
String> -
Named slots this widget takes (
body,leading...).final -
states
→ List<
String> -
The
WidgetStates (by name:hovered,focused,pressed,selected,disabled) its own look draws with nothing styled, as a Flutter button's defaultButtonStyleresolves them: a boundselectedon it shows without astates.selectedpatch.final - type → String
-
The node
type.final
Methods
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited