bool

withComposing

})

return

super

buildTextSpan

style:

TextStyle

color:

highlightColor

),

withComposing:

withComposing

);

And users of the controller would need to pass the color
when creating the controller.

With the BuildContext parameter available,
the HighlightTextEditingController can directly access
Theme.accentColor using Theme.of(BuildContext):

class

HighlightTextEditingController

extends

TextEditingController

@override

TextSpan

buildTextSpan

({

required

BuildContext

context

TextStyle

style