button static method

TextStyle button(
  1. BuildContext context
)

A text style for the app's button text.

The button text style is used for the app's buttons and is typically displayed in a medium font size.

Implementation

static TextStyle button(BuildContext context) => TextStyle(
  // The font size is set to 16sp which is a medium font size.
  fontSize: 16.sp,
  // The font weight is set to w500 which makes the text thicker and more
  // prominent than the normal font weight.
  fontWeight: FontWeight.w500,
  // 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,
);