captionStyle static method

TextStyle captionStyle(
  1. BuildContext context, {
  2. Color? foreColor,
})

Creates a caption text style from the theme.

Parameters:

  • context: The build context to access theme data
  • foreColor: Optional foreground color. Defaults to grey

Returns a TextStyle suitable for caption text.

Implementation

static TextStyle captionStyle(BuildContext context, {Color? foreColor}) {
  Color fc = foreColor ?? Colors.grey.shade600;
  return Theme.of(context).textTheme.bodyMedium!.copyWith(color: fc);
}