PreConfig constructor

const PreConfig({
  1. EdgeInsetsGeometry padding = const EdgeInsets.all(16.0),
  2. Decoration decoration = const BoxDecoration(color: Color(0xffeff1f3), borderRadius: BorderRadius.all(Radius.circular(8.0))),
  3. EdgeInsetsGeometry margin = const EdgeInsets.symmetric(vertical: 8.0),
  4. TextStyle textStyle = const TextStyle(fontSize: 16),
  5. TextStyle? styleNotMatched,
  6. Map<String, TextStyle> theme = a11yLightTheme,
  7. String language = 'dart',
  8. CodeWrapper? wrapper,
  9. CodeContentWrapper? contentWrapper,
  10. CodeBuilder? builder,
  11. RichTextBuilder? richTextBuilder,
  12. bool wrapCode = false,
})

Implementation

const PreConfig({
  this.padding = const EdgeInsets.all(16.0),
  this.decoration = const BoxDecoration(
    color: Color(0xffeff1f3),
    borderRadius: BorderRadius.all(Radius.circular(8.0)),
  ),
  this.margin = const EdgeInsets.symmetric(vertical: 8.0),
  this.textStyle = const TextStyle(fontSize: 16),
  this.styleNotMatched,
  this.theme = a11yLightTheme,
  this.language = 'dart',
  this.wrapper,
  this.contentWrapper,
  this.builder,
  this.richTextBuilder,
  this.wrapCode = false,
}) : assert(
        (builder != null ? 1 : 0) +
                (wrapper != null ? 1 : 0) +
                (contentWrapper != null ? 1 : 0) <=
            1,
        'At most one of builder, wrapper, or contentWrapper can be non-null',
      );