renderPreview static method
Renders a preview of the Markdown content
Implementation
static Widget renderPreview(String data, {double maxHeight = 200}) {
return Container(
constraints: BoxConstraints(maxHeight: maxHeight),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[300]!),
borderRadius: BorderRadius.circular(4),
),
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8),
child: MarkdownWidget(
data: data,
config: MarkdownConfig.defaultConfig,
),
),
),
);
}