FontVariation constructor

const FontVariation(
  1. String axis,
  2. double value

Creates a FontVariation object, which can be added to a TextStyle to change the variable attributes of a font.

axis is the four-character tag that identifies the design axis. OpenType lists the currently registered axis tags.

value is the value that the axis will be set to. The behavior depends on how the font implements the axis.


const FontVariation(
) : assert(axis.length == 4, 'Axis tag must be exactly four characters long.'),
    assert(value >= -32768.0 && value < 32768.0, 'Value must be representable as a signed 16.16 fixed-point number, i.e. it must be in this range: -32768.0 ≤ value < 32768.0');