SvgTheme constructor

const SvgTheme({
  1. Color currentColor = const Color(0xFF000000),
  2. double fontSize = 14,
  3. double? xHeight,
})

Instantiates an SVG theme with the currentColor and fontSize.

Defaults the fontSize to 14.

Implementation

// WARNING WARNING WARNING
// If this codebase ever decides to default the font size to something off the
// BuildContext, caching logic will have to be updated. The font size can
// temporarily and unexpectedly change during route transitions in common
// patterns used in `MaterialApp`. This busts caching and destroys
// performance.
const SvgTheme({
  this.currentColor = const Color(0xFF000000),
  this.fontSize = 14,
  double? xHeight,
}) : xHeight = xHeight ?? fontSize / 2;