labelStyle function

TextStyle? labelStyle(
  1. BuildContext context,
  2. bool enabled
)

This centralizes the style calculations for field labels, used by almost all widgets in this package

Implementation

TextStyle? labelStyle(BuildContext context, bool enabled) {
  var theme = Theme.of(context);
  var style = theme.textTheme.subtitle1;
  if (!enabled) style = style?.copyWith(color: theme.disabledColor);
  return style;
}