ScalingText constructor

ScalingText(
  1. BuildContext context,
  2. Key key, {
  3. required String text,
  4. TextStyle style = const TextStyle(),
  5. double minFontSize = 12,
  6. double maxFontSize = 30,
})

Implementation

ScalingText(
    BuildContext context,
    Key key,
    {
      required String text,
      TextStyle style = const TextStyle(),
      double minFontSize = 12,
      double maxFontSize = 30,
    }) :
    _text = text,
    _style = style,
    _fontSize = _scaleFont(
        minFontSize: minFontSize,
        maxFontSize: maxFontSize,
        height: MediaQuery.of(context).size.height,
        width: MediaQuery.of(context).size.width
    ),
    super(key: key);