flutter markdown renderer
a markdown renderer for flutter. it supports the original format, but no inline html.
getting started
using the markdown widget is simple, just pass in the source markdown as a string:
new markdown(data: markdownsource);
if you do not want the padding or scrolling behavior, use the markdownbody instead:
new markdownbody(data: markdownsource);
by default, markdown uses the formatting from the current material design theme, but it’s possible to create your own custom styling. use the markdownstyle class to pass in your own style. if you don’t want to use markdown outside of material design, use the markdownraw class.
image support
the img
tag only supports the following image locations. it specifically does not support image locations referring to bundled assets.
- from the network: use a url prefixed by either
http://
orhttps://
. - from local files on the device: use an absolute path to the file, for example by concatenating the file name with the path returned by a known storage location, such as those provided by the
path_provider
plugin.
Comments are closed.