NZMarkdownStyle class

NZMarkdownStyle 用于配置 NZMarkdown 组件的视觉样式。

通过这个类你可以自定义 Markdown 渲染时的标题颜色、字体大小、间距等。

Constructors

NZMarkdownStyle({TextStyle? h1, TextStyle? h2, TextStyle? h3, TextStyle? p, TextStyle? code, TextStyle? blockquote, Color? codeBackground, Color? blockquoteBorderColor, EdgeInsets? padding})
创建一个自定义的 Markdown 样式配置。
const
NZMarkdownStyle.defaultStyle(BuildContext context)
默认样式工厂方法,根据当前的 BuildContext 自动生成适配主题的样式。
factory

Properties

blockquote TextStyle?
引用块的文本样式 (> Blockquote)
final
blockquoteBorderColor Color?
引用块左侧边框的颜色
final
code TextStyle?
代码块及行内代码的字体样式
final
codeBackground Color?
代码块及行内代码的背景颜色
final
h1 TextStyle?
一级标题样式 (# Heading 1)
final
h2 TextStyle?
二级标题样式 (## Heading 2)
final
h3 TextStyle?
三级标题样式 (### Heading 3)
final
hashCode int
The hash code for this object.
no setterinherited
p TextStyle?
普通段落文本样式
final
padding EdgeInsets?
整个 Markdown 组件的内边距
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({TextStyle? h1, TextStyle? h2, TextStyle? h3, TextStyle? p, TextStyle? code, TextStyle? blockquote, Color? codeBackground, Color? blockquoteBorderColor, EdgeInsets? padding}) NZMarkdownStyle
拷贝并生成新的样式
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited