fontStyle property

  1. @override
FontStyle get fontStyle
override

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 && parent != null) {
    return parent!.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.
  _markChildrenTextNeedsPaint(renderBoxModel!, FONT_STYLE);
}