Last active
May 15, 2022 20:19
-
-
Save timfong888/5261221b4dd5e2feabd2b0da95934bc5 to your computer and use it in GitHub Desktop.
Flutter Markdown Custom Widget Code in FF UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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