caption static method

TextStyle caption(
  1. BuildContext context
)

A text style for the app's caption text.

The caption text style is used for the app's caption text and is typically displayed in a small font size.

Implementation

static TextStyle caption(BuildContext context) => TextStyle(
  // The font size is set to 12sp which is a very small font size.
  fontSize: 12.sp,
  // The font weight is set to normal which makes the text normal and not
  // thicker or thinner than the default font weight.
  fontWeight: FontWeight.normal,
  // The color is set to the onPrimary color of the theme which is the
  // default color for text on the primary color.
  color: Theme.of(context).colorScheme.onPrimary,
);