Configurable codegen highlight language and file extension

This commit is contained in:
Ankit Mahato
2023-07-20 02:59:20 +05:30
parent bab08769e7
commit e77747df30
2 changed files with 7 additions and 5 deletions

View File

@ -160,7 +160,7 @@ class _ViewCodePaneState extends State<ViewCodePane> {
),
SaveInDownloadsButton(
content: stringToBytes(widget.code),
mimeType: "application/vnd.dart",
ext: widget.codegenLanguage.ext,
showLabel: showLabel,
)
],
@ -175,7 +175,7 @@ class _ViewCodePaneState extends State<ViewCodePane> {
child: CodeGenPreviewer(
code: widget.code,
theme: codeTheme,
language: 'dart',
language: widget.codegenLanguage.codeHighlightLang,
textStyle: kCodeStyle,
),
),