Which Widget Should You Use?
flutter_tex gives you three widgets depending on whether you need a single formula, a mixed text paragraph, or a rich HTML document:
Feature Comparison
| Feature | Math2SVG |
TeXWidget |
TeXView |
|---|---|---|---|
| Underlying Engine | Pure Flutter (flutter_svg) |
Pure Flutter (flutter_svg + RichText) |
WebView (Mobile/macOS) / iframe (Web) |
| Best For | Standalone formulas, equation items | Sentences and paragraphs with math | Full articles, quiz questions, HTML/JS |
| Input Formats | LaTeX, MathML, AsciiMath | LaTeX mixed with plain text | HTML with TeX, Markdown, Media |
| List Performance | High (cached SVGs, fast scrolling) | High (cached SVGs, fast scrolling) | Heavy (do not spawn dozens in a ListView) |
| Custom Styling | formulaWidgetBuilder (colors, size) |
Builders for inline, display, and text | TeXViewStyle & custom CSS |
| Interactivity | Standard Flutter gestures (GestureDetector) |
Standard Flutter gestures | TeXViewInkWell tap callbacks & ripples |