TeXView
This is an advanced widget, based on webview_flutter_plus, engineered for a rich user experience. It excels at rendering complex mathematical equations and offers a flexible environment for dynamic content through its support for:
- Inline HTML: Directly embed and render HTML content.
- JavaScript: Execute custom scripts for interactive elements.
- Markdown: Display text with Markdown formatting.
Caution
Avoid using multiple TeXView instances on a single page. It's based on a webview and it can lead to performance issues. Instead, use TeXWidget or Math2SVG for multiple TeX elements.
API Usage
childrenA list ofTeXViewWidget-
heightOffsetHeight offset to be added to the rendered height. -
TeXViewWidgetsTeXViewDocumentHolds TeX data by using a raw string e.g.r"""$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$<br> """You can also put HTML and Javascript code in it.TeXViewMarkdownHolds markdown data.TeXViewContainerHolds a singleTeXViewWidgetwith styling.TeXViewImagerenders image from assets or network.TeXViewColumnholds a list ofTeXViewWidgetvertically.TeXViewInkWellfor listening tap events..TeXViewDetailslike html<details>.
-
TeXViewStyle()You can style each and everything usingTeXViewStyle()or by using customCSScode byTeXViewStyle.fromCSS()where you can pass hard coded String containing CSS code. For more information please check the example. -
loadingWidgetBuilderShows a loading widget before rendering completes. -
onRenderFinishedCallback with the rendered page height, when TEX rendering finishes.