getBodyStyle static method

TextStyle getBodyStyle(
  1. BuildContext context,
  2. BodySize bodySize
)

Implementation

static TextStyle getBodyStyle(BuildContext context, BodySize bodySize) {
  final TextTheme textTheme = Theme.of(context).textTheme;

  switch (bodySize) {
    case BodySize.large:
      return textTheme.bodyLarge!;
    case BodySize.small:
      return textTheme.bodySmall!;
  }
}