PreConfig constructor
const
PreConfig({
- EdgeInsetsGeometry padding = const EdgeInsets.all(16.0),
- Decoration decoration = const BoxDecoration(color: Color(0xffeff1f3), borderRadius: BorderRadius.all(Radius.circular(8.0))),
- EdgeInsetsGeometry margin = const EdgeInsets.symmetric(vertical: 8.0),
- TextStyle textStyle = const TextStyle(fontSize: 16),
- TextStyle? styleNotMatched,
- Map<
String, TextStyle> theme = a11yLightTheme, - String language = 'dart',
- CodeWrapper? wrapper,
- CodeContentWrapper? contentWrapper,
- CodeBuilder? builder,
- RichTextBuilder? richTextBuilder,
- 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',
);