SuggestionStyleHook class
Hook configuration for suggestion addition and deletion styles.
- Inheritance
-
- Object
- RenderStyleHook
- SuggestionStyleHook
Constructors
- SuggestionStyleHook({String additionTag = 'suggestion_addition', String deletionTag = 'suggestion_deletion', String strikethroughTag = 'strikethrough', SuggestionTextStyleResolver additionStyleResolver = defaultAdditionStyleResolver, SuggestionTextStyleResolver deletionStyleResolver = defaultDeletionStyleResolver, Color? additionBackgroundColor, Color? deletionBackgroundColor, Color? additionColor, Color? deletionColor})
-
const
Properties
- additionBackgroundColor → Color?
-
Custom addition background color override (optional).
final
- additionColor → Color?
-
Custom addition highlight color override (optional).
final
- additionStyleResolver → SuggestionTextStyleResolver
-
Resolver hook for suggested addition text styling.
final
- additionTag → String
-
Style tag string for suggested additions (default: 'suggestion_addition').
final
- deletionBackgroundColor → Color?
-
Custom deletion background color override (optional).
final
- deletionColor → Color?
-
Custom deletion highlight color override (optional).
final
- deletionStyleResolver → SuggestionTextStyleResolver
-
Resolver hook for suggested deletion text styling.
final
- deletionTag → String
-
Style tag string for suggested deletions (default: 'suggestion_deletion').
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strikethroughTag → String
-
Style tag string for strikethrough (default: 'strikethrough').
final
Methods
-
appliesTo(
List< String> ? styles, Fragment fragment) → bool -
Returns true if this hook should handle or transform styles for
fragment.override -
applyAddition(
List< String> styles) → void -
Apply addition style tag to
styles. -
applyDeletion(
List< String> styles) → void -
Apply deletion style tag to
styles. -
buildNodeOverlayWidgets(
FNode node, {required BuildContext context, required FluentDocument document}) → List< Widget> -
Builds overlay widgets for Widget-rendered nodes (e.g. FluentImage).
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSuggestionStyles(
List< String> styles) → void -
Remove suggestion style tags from
styles. -
resolveCellBackgroundColor(
FluentCell cell, {BuildContext? context, required FluentDocument document, required bool isResized}) → Color? -
Resolves background color for painting FluentCell canvas in tables.
override
-
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.
override
-
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
Static Methods
-
defaultAdditionStyleResolver(
TextStyle baseStyle, {required bool isDark, Fragment? fragment}) → TextStyle - Default addition style resolver hook.
-
defaultDeletionStyleResolver(
TextStyle baseStyle, {required bool isDark, Fragment? fragment}) → TextStyle - Default deletion style resolver hook.