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 has no effect on TextSpan's text style cascading: in a TextSpan tree, a TextSpan's text style can be combined with that of an ancestor TextSpan 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;