scale method
Scales the fields of this FTypography by the given fields.
const typography = FTypography(
sm: TextStyle(fontSize: 10),
base: TextStyle(fontSize: 20),
);
final scaled = typography.scale(sizeScalar: 1.5);
print(scaled.sm.fontSize); // 15
print(scaled.base.fontSize); // 30
Implementation
@useResult
FTypography scale({double sizeScalar = 1}) => FTypography(
defaultFontFamily: defaultFontFamily,
xs: _scaleTextStyle(style: xs, sizeScalar: sizeScalar),
sm: _scaleTextStyle(style: sm, sizeScalar: sizeScalar),
base: _scaleTextStyle(style: base, sizeScalar: sizeScalar),
lg: _scaleTextStyle(style: lg, sizeScalar: sizeScalar),
xl: _scaleTextStyle(style: xl, sizeScalar: sizeScalar),
xl2: _scaleTextStyle(style: xl2, sizeScalar: sizeScalar),
xl3: _scaleTextStyle(style: xl3, sizeScalar: sizeScalar),
xl4: _scaleTextStyle(style: xl4, sizeScalar: sizeScalar),
xl5: _scaleTextStyle(style: xl5, sizeScalar: sizeScalar),
xl6: _scaleTextStyle(style: xl6, sizeScalar: sizeScalar),
xl7: _scaleTextStyle(style: xl7, sizeScalar: sizeScalar),
xl8: _scaleTextStyle(style: xl8, sizeScalar: sizeScalar),
);