I am trying to take a markdown file, contents.md, and then display that on a page in my app, but I want to be able to use the reference links that I have added that point to different files, chapter1.md, chapter2.md, chapter3.md, and so on. I have been able to display markdown formatted from contents.md, but the links don't work.
Widget build(BuildContext context) {
return Scaffold(appBar: AppBar(title: Text("Flutter Markdown"),),
body: FutureBuilder(
future: rootBundle.loadString("assets/manual/contents.md"),
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
if (snapshot.hasData) {
return Markdown(data: snapshot.data);
}
return Center(
child: CircularProgressIndicator(),
);
}),
);
}
Is there a way to do it? Because Google hasn't helped at all and I am seriously doubting that it is possible.