RangeConfigurable class

A configurable dual-handle range field.

Opens a range prompt with start/end handles bounded by min and max.

RangeConfigurable(
  key: 'budget',
  label: 'Budget Range',
  start: 20,
  end: 80,
  unit: '%',
)
Inheritance

Constructors

RangeConfigurable({required String key, required String label, required num start, required num end, String? description, String? hint, String formatter(RangeValue value)?, String? validator(RangeValue value)?, String? icon, num min = 0, num max = 100, num step = 1, String unit = '%', int width = 28})
Creates a range configurable field.

Properties

defaultTypeIcon → String
The default icon for this configurable type. Override in subclasses to provide a type-specific glyph.
no setteroverride
defaultValue → RangeValue
The original value before any edits.
finalinherited
description → String?
Optional longer description shown as context when editing.
finalinherited
displayValue → String
Formatted string representation of value for display in the list.
no setterinherited
formatter → String Function(RangeValue value)?
Optional display formatter. When provided, displayValue uses this instead of the default toString() representation.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
Optional hint text shown alongside the field.
finalinherited
icon → String?
Custom icon override. When set, typeIcon returns this instead of the subclass default from defaultTypeIcon.
finalinherited
isModified → bool
Whether the current value differs from defaultValue.
no setterinherited
key → String
Unique key used for serialization and lookup.
finalinherited
label → String
Human-readable label shown in the editor list.
finalinherited
max → num
The maximum allowed value.
final
min → num
The minimum allowed value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
step → num
The increment step size.
final
typeIcon → String
Glyph prefix identifying the field type in the list view. Returns the custom icon if set, otherwise defaultTypeIcon.
no setterinherited
unit → String
The unit label shown alongside the values (e.g. '%', 'GB').
final
validator → String? Function(RangeValue value)?
Optional validator. Returns an error message on failure, null on success. Returning '' is also accepted as success for backwards compatibility.
finalinherited
value ↔ RangeValue
The current value of this configurable.
getter/setter pairinherited
width → int
Width of the range slider in characters.
final

Methods

edit(Terminice terminice) → bool
Runs the appropriate terminice prompt to edit this field's value.
override
formatValue() → String
Override in subclasses to provide type-specific formatting.
override
loadJsonValue(dynamic jsonValue) → void
Deserializes and applies a value from a JSON-compatible source.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets value back to defaultValue.
inherited
toJsonValue() → dynamic
Serializes the current value into a JSON-compatible map entry.
override
toString() → String
A string representation of this object.
inherited
trySetValue(RangeValue candidate) → bool
Sets value to candidate only when it passes validation.
inherited
validate() → String?
Validates the current value. Returns null if valid, error message otherwise.
inherited
validationErrorFor(RangeValue candidate) → String?
Validates a candidate value using the shared validator semantics.
inherited

Operators

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