StreamMessageLayoutResolver<S> class

Resolves style properties from an ordered list of style sources for a given StreamMessageLayoutData.

{@tool snippet}

final resolve = StreamMessageLayoutResolver<StreamMessageBubbleStyle>(
  layout,
  [widgetStyle, themeStyle, defaults],
);

final color = resolve((s) => s?.backgroundColor);
final side = resolve.maybeResolve((s) => s?.side);

{@end-tool}

See also:

Constructors

StreamMessageLayoutResolver(StreamMessageLayoutData _layout, List<S?> _styles)
Creates a resolver that cascades through styles in order.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call<T extends Object>(StreamMessageLayoutProperty<T?>? getProperty(S? style)) → T
Resolves the first non-null value for getProperty across all style sources.
maybeResolve<T extends Object>(StreamMessageLayoutProperty<T?>? getProperty(S? style)) → T?
Resolves the first non-null value for getProperty across all style sources, returning null if none is found.
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