znjameswu / flutter_math

Math rendering and editing in pure Flutter.
https://znjameswu.github.io/flutter_math_demo/
Apache License 2.0
123 stars 52 forks source link

No such method error on not passing textstyle parameter . #20

Closed rutvik110 closed 3 years ago

rutvik110 commented 3 years ago

Steps to recreate the issue

1.While creating the Math.tex() instance,don't pass the textstyle parameter.

Solution:

1)In the Math.tex() method when we are returning the Math object ,check if textstyle is null or not and if it's then assign a default textstyle to it. 2)In the build method where we are are initializing the options ,in the MathOptions object check if textstyle is null before getting it's color value and if it's then assign some default color to it.

rutvik110 commented 3 years ago

Closing this issue as pull request for this is already submitted.