contentStyle function

TextStyle? contentStyle(
  1. BuildContext context,
  2. dynamic value,
  3. bool enabled
)

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

Implementation

TextStyle? contentStyle(BuildContext context, dynamic value, bool enabled) {
  var theme = Theme.of(context);
  var style = theme.textTheme.titleMedium?.copyWith(
      color:
          (value == null) ? theme.hintColor : theme.textTheme.titleMedium?.color);
  if (!enabled) style = style?.copyWith(color: theme.disabledColor);
  return style;
}