Flutter: Can I put Math equations inside a Text Widget
707
Take a look at Flutter Tex
It is a Flutter Package to render Mathematics / Maths, Physics and Chemistry, Statistics Equations and expressions based on LaTeX, TeX, and MathML with HTML and JavaScript support.
Here's an example with both Tex
& Text
together
For following code visit here -
Author by
netset123
Updated on December 30, 2022Comments
-
netset123 over 1 year
I'm trying to make a math quiz game and I need to have the non-math text in a custom font while the math equations get displayed normally.
Note: the math equations that i'm trying to display are Extremely Simple
I'm using flutter_math_fork which is a fork of flutter_math, if there is any better alternatives that can do what i want please till me.
So is there a way to do something like that, for example:
Text("${Math.tex("2^{5}")} This is a Normal Text", style: TextStyle(fontFamily:"Custom Font")
Thank you for your time.
-
netset123 almost 3 yearsThis is Amazing!. Thank you so much.