CustomStyleHook class

A lightweight, functional implementation of RenderStyleHook.

Inheritance

Constructors

CustomStyleHook({required bool appliesToPredicate(List<String>? styles, Fragment fragment), required TextStyle resolver(TextStyle baseStyle, {required FluentDocument? document, required Fragment fragment, required bool isDark, required List<String> styles})})
const

Properties

appliesToPredicate bool Function(List<String>? styles, Fragment fragment)
final
hashCode int
The hash code for this object.
no setterinherited
resolver TextStyle Function(TextStyle baseStyle, {required FluentDocument? document, required Fragment fragment, required bool isDark, required List<String> styles})
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appliesTo(List<String>? styles, Fragment fragment) bool
Returns true if this hook should handle or transform styles for fragment.
override
buildNodeOverlayWidgets(FNode node, {required BuildContext context, required FluentDocument document}) List<Widget>
Builds overlay widgets for Widget-rendered nodes (e.g. FluentImage).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveCellBackgroundColor(FluentCell cell, {BuildContext? context, required FluentDocument document, required bool isResized}) Color?
Resolves background color for painting FluentCell canvas in tables.
inherited
resolveHrStyle(HorizontalRule node, {BuildContext? context, required FluentDocument document, required bool isSelected}) → ({Color? bgTint, Border? border, Color? hrColor})?
Resolves background tint, line color, and border for HorizontalRule.
inherited
resolveStyle(TextStyle baseStyle, {required bool isDark, required Fragment fragment, required List<String> styles, required FluentDocument? document}) TextStyle
Resolves and returns the transformed TextStyle for fragment.
override
toString() String
A string representation of this object.
inherited

Operators

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