Skip to content

Instantly share code, notes, and snippets.

@timfong888
Last active May 15, 2022 20:19
Show Gist options
  • Save timfong888/5261221b4dd5e2feabd2b0da95934bc5 to your computer and use it in GitHub Desktop.
Save timfong888/5261221b4dd5e2feabd2b0da95934bc5 to your computer and use it in GitHub Desktop.
Flutter Markdown Custom Widget Code in FF UI
import 'package:flutter_markdown/flutter_markdown.dart';
class MarkdownCustomWidget extends StatefulWidget {
const MarkdownCustomWidget({Key{NULL_SAFE_QUESTION_SENTINEL} key ,
this.width,
this.height,
this.markdownData, }) : super(key: key);
final double{NULL_SAFE_QUESTION_SENTINEL} width;
final double{NULL_SAFE_QUESTION_SENTINEL} height;
final String{NULL_SAFE_QUESTION_SENTINEL} markdownData;
@override
_MarkdownCustomWidgetState createState() => _MarkdownCustomWidgetState();
}
class _MarkdownCustomWidgetState extends State<MarkdownCustomWidget> {
@override
Widget build(BuildContext context) {
return Container(child: Markdown(data: widget.markdownData));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment