resolve method

CodeBlockStyle resolve(
  1. ColorScheme scheme
)

This style with every remaining default filled in.

Implementation

CodeBlockStyle resolve(ColorScheme scheme) {
  return CodeBlockStyle(
    backgroundColor: backgroundColor ?? scheme.surfaceContainer,
    borderColor: borderColor ?? scheme.outlineVariant.withValues(alpha: 0.65),
    borderWidth: borderWidth ?? 1,
    borderRadius: borderRadius ?? const Radius.circular(12),
    padding: padding ?? const EdgeInsets.fromLTRB(16, 10, 16, 16),
    headerPadding: headerPadding ?? const EdgeInsets.fromLTRB(10, 8, 8, 2),
    fontFamily: fontFamily,
    fontFamilyPackage: fontFamilyPackage,
    fontSize: fontSize,
    textColor: textColor,
    showLanguageLabel: showLanguageLabel ?? true,
    languageStyle:
        languageStyle ??
        TextStyle(
          color: scheme.onSurfaceVariant,
          fontSize: 11,
          fontWeight: FontWeight.w600,
          letterSpacing: 0.35,
        ),
    showCopyButton: showCopyButton ?? true,
    copyLabel: copyLabel ?? 'Copy code',
    copiedLabel: copiedLabel ?? 'Copied!',
    highlightWhileStreaming: highlightWhileStreaming ?? true,
  );
}