inherit property

bool inherit

Whether null values in this TextStyle can be replaced with their value in another TextStyle using merge.

The merge operation is not commutative: the inherit value of the method argument decides whether the two TextStyles can be combined together. If it is false, the method argument TextStyle will be returned. Otherwise, the combining is allowed, and the returned TextStyle inherits the inherit value from the method receiver.

This property does not affect the text style inheritance in an InlineSpan tree: an InlineSpan's text style is merged with that of an ancestor InlineSpan if it has unspecified fields, regardless of its inherit value.

Properties that don't have explicit values or other default values to fall back to will revert to the defaults: white in color, a font size of 14 pixels, in a sans-serif font face.

See also:


final bool inherit;