flutter_myst_markdown

Last updated:

0 purchases

flutter_myst_markdown Image
flutter_myst_markdown Images
Add to Cart

Description:

flutter myst markdown

flutter_myst_markdown #
MyST Markdown for Flutter
Features #

BlockSyntax subclasses of markdown.
MarkdownElementBuilder subclasses of flutter_markdown.

Usage #
Import the packages
import "package:flutter/material.dart";
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_myst_markdown/flutter_myst_markdown.dart';
copied to clipboard
Suppose the markdown text is
const markdownText = """
This is a fenced code block:

```python
print("Hello, world!")
```

This is an executive code block:

```{code-cell} python
1 + 2
```
""";
copied to clipboard
Then
Scaffold(
body: Markdown(
key: const Key("notebook-example"),
data: markdownText,
selectable: true,
builders: {
'code-cell': ExecutiveCodeBuilder(
codeExecutingHandler: (input) async {
return input;
}
),
},
extensionSet: mystMarkdown
)
)
copied to clipboard
Set the codeExecutingHandler by your own.
Note that the ExecutiveCodeBuilder has to be used in Material wrapper such as Scaffold, Card, etc.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.