fontStyle property
Implementation
@override
FontStyle get fontStyle {
// Get style from self or closest parent if specified style property is not set
// due to style inheritance.
if (_fontStyle == null && getParentRenderStyle() != null) {
return getParentRenderStyle()!.fontStyle;
}
// The root element has no fontWeight, and the fontWeight is initial.
return _fontStyle ?? FontStyle.normal;
}
set
fontStyle
(FontStyle? value)
Implementation
set fontStyle(FontStyle? value) {
if (_fontStyle == value) return;
_fontStyle = value;
// Update all the children text with specified style property not set due to style inheritance.
_markChildrenTextNeedsLayout(this, FONT_STYLE);
}