getFontSize method

double getFontSize(
  1. BuildContext context, {
  2. FastButtonSize? size,
  3. TextStyle? textStyle,
})

Implementation

double getFontSize(
  BuildContext context, {
  FastButtonSize? size,
  TextStyle? textStyle,
}) {
  if (textStyle != null && textStyle.fontSize != null) {
    return textStyle.fontSize!;
  }

  if (size != null) return size.spec.fontSize;

  return kFastFontSize16;
}