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.subtitle1?.copyWith(
      color:
          (value == null) ? theme.hintColor : theme.textTheme.subtitle1?.color);
  if (!enabled) style = style?.copyWith(color: theme.disabledColor);
  return style;
}