getTextStyle function

TextStyle? getTextStyle(
  1. ThemeData theme,
  2. S360fCheckBoxSize size, {
  3. bool isDisabled = false,
})

Implementation

TextStyle? getTextStyle(
  ThemeData theme,
  S360fCheckBoxSize size, {
  bool isDisabled = false,
}) {
  final textColor =
      isDisabled ? theme.colorScheme.surfaceDim : theme.colorScheme.onSurface;
  switch (size) {
    case S360fCheckBoxSize.medium:
      return theme.textTheme.bodyMedium?.copyWith(
        fontWeight: FontWeight.w600,
        color: textColor,
      );

    case S360fCheckBoxSize.small:
      return theme.textTheme.bodySmall?.copyWith(
        fontWeight: FontWeight.w400,
        color: textColor,
      );
  }
}