getTextThemeForSection method

AnsiTextTheme getTextThemeForSection(
  1. LoggerTheme theme,
  2. LogLevel level,
  3. LogSection section
)

Implementation

AnsiTextTheme getTextThemeForSection(
    final LoggerTheme theme, final LogLevel level, final LogSection section) {
  final AnsiColor foregroundColor = theme.colorMap[level] ?? AnsiColor.none;
  return theme.sectionThemeMap[section]?.textTheme.copyWith
          .foregroundColor(foregroundColor) ??
      AnsiTextTheme(foregroundColor: foregroundColor);
}