scale method

ThemeData scale(
  1. BuildContext context
)

Implementation

ThemeData scale(BuildContext context) {
  final double scale = context.responsiveData.scaleFactor;

  if (scale == 1.0) return this;

  final TextTheme scaledTextTheme = textTheme.apply(
    fontSizeFactor: scale,
    displayColor: textTheme.displayLarge?.color,
    bodyColor: textTheme.bodyLarge?.color,
  );

  return copyWith(textTheme: scaledTextTheme);
}