RTextFieldResolvedTokens
Logoheadless

RTextFieldResolvedTokens final#

final class RTextFieldResolvedTokens

Resolved visual tokens for TextField rendering.

These are the final computed values that a renderer uses. Token resolution flow: spec + states → resolver → tokens → renderer.

All fields are required to ensure preset interoperability.

Constructors#

RTextFieldResolvedTokens() const#

const RTextFieldResolvedTokens({ required dynamic containerPadding, required dynamic containerBackgroundColor, required dynamic containerBorderColor, required dynamic containerBorderRadius, required double containerBorderWidth, required double containerElevation, required Duration containerAnimationDuration, required dynamic labelStyle, required dynamic labelColor, required dynamic helperStyle, required dynamic helperColor, required dynamic errorStyle, required dynamic errorColor, required double messageSpacing, required dynamic textStyle, required dynamic textColor, required dynamic placeholderStyle, required dynamic placeholderColor, required dynamic cursorColor, required dynamic selectionColor, required double disabledOpacity, required dynamic iconColor, required double iconSpacing, required dynamic minSize, })
Implementation
const RTextFieldResolvedTokens({
  // Container
  required this.containerPadding,
  required this.containerBackgroundColor,
  required this.containerBorderColor,
  required this.containerBorderRadius,
  required this.containerBorderWidth,
  required this.containerElevation,
  required this.containerAnimationDuration,
  // Label / Helper / Error
  required this.labelStyle,
  required this.labelColor,
  required this.helperStyle,
  required this.helperColor,
  required this.errorStyle,
  required this.errorColor,
  required this.messageSpacing,
  // Input
  required this.textStyle,
  required this.textColor,
  required this.placeholderStyle,
  required this.placeholderColor,
  required this.cursorColor,
  required this.selectionColor,
  required this.disabledOpacity,
  // Icons / Slots
  required this.iconColor,
  required this.iconSpacing,
  // Sizing
  required this.minSize,
});

Properties#

containerAnimationDuration final#

final Duration containerAnimationDuration
Implementation
final Duration containerAnimationDuration;

containerBackgroundColor final#

final dynamic containerBackgroundColor
Implementation
final Color containerBackgroundColor;

containerBorderColor final#

final dynamic containerBorderColor
Implementation
final Color containerBorderColor;

containerBorderRadius final#

final dynamic containerBorderRadius
Implementation
final BorderRadius containerBorderRadius;

containerBorderWidth final#

final double containerBorderWidth
Implementation
final double containerBorderWidth;

containerElevation final#

final double containerElevation
Implementation
final double containerElevation;

containerPadding final#

final dynamic containerPadding
Implementation
final EdgeInsetsGeometry containerPadding;

cursorColor final#

final dynamic cursorColor
Implementation
final Color cursorColor;

disabledOpacity final#

final double disabledOpacity
Implementation
final double disabledOpacity;

errorColor final#

final dynamic errorColor
Implementation
final Color errorColor;

errorStyle final#

final dynamic errorStyle
Implementation
final TextStyle errorStyle;

hashCode no setter override#

int get hashCode

The hash code for this object.

A hash code is a single integer which represents the state of the object that affects operator == comparisons.

All objects have hash codes. The default hash code implemented by Object represents only the identity of the object, the same way as the default operator == implementation only considers objects equal if they are identical (see identityHashCode).

If operator == is overridden to use the object state instead, the hash code must also be changed to represent that state, otherwise the object cannot be used in hash based data structures like the default Set and Map implementations.

Hash codes must be the same for objects that are equal to each other according to operator ==. The hash code of an object should only change if the object changes in a way that affects equality. There are no further requirements for the hash codes. They need not be consistent between executions of the same program and there are no distribution guarantees.

Objects that are not equal are allowed to have the same hash code. It is even technically allowed that all instances have the same hash code, but if clashes happen too often, it may reduce the efficiency of hash-based data structures like HashSet or HashMap.

If a subclass overrides hashCode, it should override the operator == operator as well to maintain consistency.

Implementation
@override
int get hashCode => Object.hashAll([
      containerPadding,
      containerBackgroundColor,
      containerBorderColor,
      containerBorderRadius,
      containerBorderWidth,
      containerElevation,
      containerAnimationDuration,
      labelStyle,
      labelColor,
      helperStyle,
      helperColor,
      errorStyle,
      errorColor,
      messageSpacing,
      textStyle,
      textColor,
      placeholderStyle,
      placeholderColor,
      cursorColor,
      selectionColor,
      disabledOpacity,
      iconColor,
      iconSpacing,
      minSize,
    ]);

helperColor final#

final dynamic helperColor
Implementation
final Color helperColor;

helperStyle final#

final dynamic helperStyle
Implementation
final TextStyle helperStyle;

iconColor final#

final dynamic iconColor
Implementation
final Color iconColor;

iconSpacing final#

final double iconSpacing
Implementation
final double iconSpacing;

labelColor final#

final dynamic labelColor
Implementation
final Color labelColor;

labelStyle final#

final dynamic labelStyle
Implementation
final TextStyle labelStyle;

messageSpacing final#

final double messageSpacing
Implementation
final double messageSpacing;

minSize final#

final dynamic minSize
Implementation
final Size minSize;

placeholderColor final#

final dynamic placeholderColor
Implementation
final Color placeholderColor;

placeholderStyle final#

final dynamic placeholderStyle
Implementation
final TextStyle placeholderStyle;

runtimeType no setter inherited#

Type get runtimeType

A representation of the runtime type of the object.

Inherited from Object.

Implementation
external Type get runtimeType;

selectionColor final#

final dynamic selectionColor
Implementation
final Color selectionColor;

textColor final#

final dynamic textColor
Implementation
final Color textColor;

textStyle final#

final dynamic textStyle
Implementation
final TextStyle textStyle;

Methods#

noSuchMethod() inherited#

dynamic noSuchMethod(Invocation invocation)

Invoked when a nonexistent method or property is accessed.

A dynamic member invocation can attempt to call a member which doesn't exist on the receiving object. Example:

dynamic object = 1;
object.add(42); // Statically allowed, run-time error

This invalid code will invoke the noSuchMethod method of the integer 1 with an Invocation representing the .add(42) call and arguments (which then throws).

Classes can override noSuchMethod to provide custom behavior for such invalid dynamic invocations.

A class with a non-default noSuchMethod invocation can also omit implementations for members of its interface. Example:

class MockList<T> implements List<T> {
  noSuchMethod(Invocation invocation) {
    log(invocation);
    super.noSuchMethod(invocation); // Will throw.
  }
}
void main() {
  MockList().add(42);
}

This code has no compile-time warnings or errors even though the MockList class has no concrete implementation of any of the List interface methods. Calls to List methods are forwarded to noSuchMethod, so this code will log an invocation similar to Invocation.method(#add, [42]) and then throw.

If a value is returned from noSuchMethod, it becomes the result of the original invocation. If the value is not of a type that can be returned by the original invocation, a type error occurs at the invocation.

The default behavior is to throw a NoSuchMethodError.

Inherited from Object.

Implementation
@pragma("vm:entry-point")
@pragma("wasm:entry-point")
external dynamic noSuchMethod(Invocation invocation);

toString() inherited#

String toString()

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.

Inherited from Object.

Implementation
external String toString();

Operators#

operator ==() override#

bool operator ==(Object other)

The equality operator.

The default behavior for all Objects is to return true if and only if this object and other are the same object.

Override this method to specify a different equality relation on a class. The overriding method must still be an equivalence relation. That is, it must be:

  • Total: It must return a boolean for all arguments. It should never throw.

  • Reflexive: For all objects o, o == o must be true.

  • Symmetric: For all objects o1 and o2, o1 == o2 and o2 == o1 must either both be true, or both be false.

  • Transitive: For all objects o1, o2, and o3, if o1 == o2 and o2 == o3 are true, then o1 == o3 must be true.

The method should also be consistent over time, so whether two objects are equal should only change if at least one of the objects was modified.

If a subclass overrides the equality operator, it should override the hashCode method as well to maintain consistency.

Implementation
@override
bool operator ==(Object other) {
  if (identical(this, other)) return true;
  return other is RTextFieldResolvedTokens &&
      other.containerPadding == containerPadding &&
      other.containerBackgroundColor == containerBackgroundColor &&
      other.containerBorderColor == containerBorderColor &&
      other.containerBorderRadius == containerBorderRadius &&
      other.containerBorderWidth == containerBorderWidth &&
      other.containerElevation == containerElevation &&
      other.containerAnimationDuration == containerAnimationDuration &&
      other.labelStyle == labelStyle &&
      other.labelColor == labelColor &&
      other.helperStyle == helperStyle &&
      other.helperColor == helperColor &&
      other.errorStyle == errorStyle &&
      other.errorColor == errorColor &&
      other.messageSpacing == messageSpacing &&
      other.textStyle == textStyle &&
      other.textColor == textColor &&
      other.placeholderStyle == placeholderStyle &&
      other.placeholderColor == placeholderColor &&
      other.cursorColor == cursorColor &&
      other.selectionColor == selectionColor &&
      other.disabledOpacity == disabledOpacity &&
      other.iconColor == iconColor &&
      other.iconSpacing == iconSpacing &&
      other.minSize == minSize;
}