Step class

Represents a single step within a Steps container.

This component renders an <li> element. Its appearance can be modified with color styles (e.g., Step.primary to mark it as completed) and its counter can be customized with the dataContent property or a StepIcon.

Inheritance

Constructors

Step(List<Component>? children, {String? dataContent, String tag = 'li', List<StepStyling>? style, String? id, String? classes, Styles? css, Map<String, String>? attributes, Map<String, List<UiEventHandler>>? eventHandlers, Component? child, Key? key})
Creates a single Step component.
const

Properties

baseClass String
Gets the base CSS class for this component (e.g., "btn" for a button).
no setter
child → Component?
A single child component to be rendered. Mutually exclusive with children.
finalinherited
children List<Component>?
The list of child components to be rendered within this component. Mutually exclusive with child.
finalinherited
classes String?
A string of additional, space-separated CSS classes to apply directly. This is an escape hatch for utilities not yet abstracted by deepyr or for applying styles to primitive Jaspr components.
finalinherited
combinedClasses String
Computes the combined string of CSS classes to be applied to the component's root element.
no setterinherited
componentAttributes Map<String, String>
Gets the final map of HTML attributes for the component.
no setterinherited
css → Styles?
A Jaspr Styles object for applying inline CSS to the root element.
finalinherited
dataContent String?
A string to be displayed inside the step marker, overriding the default number. This is rendered as a data-content attribute in the HTML.
final
eventHandlers Map<String, List<UiEventHandler>>
A map for custom or less common event handlers. The key is the event name (e.g., "focus", "blur"), and the value is a list of handlers.
finalinherited
eventMap Map<String, EventCallback>
Constructs the map of event handlers for the underlying DomComponent.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String?
The HTML id for the root element.
finalinherited
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
onChange UiInputEventHandler?
finalinherited
onClick UiMouseEventHandler?
finalinherited
onInput UiInputEventHandler?
finalinherited
onKeyDown UiKeyboardEventHandler?
finalinherited
onKeyUp UiKeyboardEventHandler?
finalinherited
onMouseEnter UiMouseEventHandler?
finalinherited
onMouseLeave UiMouseEventHandler?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style List<Styling>?
A list of type-safe Styling instances (general or component-specific utility classes) to apply for styling.
finalinherited
tag String
The HTML tag for the root element of this component (e.g., "div", "button").
finalinherited
userProvidedAttributes Map<String, String>
Gets the attributes directly provided by the user when the component was instantiated. Returns an empty map if no attributes were provided.
no setterinherited

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
inherited
configureAttributes(UiComponentAttributes attributes) → void
Configures component-specific HTML attributes.
override
copyWith({String? id, String? classes, Styles? css, Map<String, String>? attributes, Map<String, List<UiEventHandler>>? eventHandlers, Key? key}) Step
An abstract method that concrete components must implement to create a copy of themselves with new values.
override
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
mergeClasses(String? originalClasses, String? newClasses) String?
Merges two CSS class strings, safely handling null or empty inputs.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

accent → const StepStyle
Accent color for the step. step-accent
error → const StepStyle
Error color for the step. step-error
info → const StepStyle
Info color for the step. step-info
neutral → const StepStyle
Neutral color for the step. step-neutral
primary → const StepStyle
Primary color, often used to indicate a completed or active step. step-primary
secondary → const StepStyle
Secondary color for the step. step-secondary
success → const StepStyle
Success color for the step. step-success
warning → const StepStyle
Warning color for the step. step-warning