New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Caching with multiple tex views on one page #43
Comments
Which version of flutter_tex are you using? This was an issue in the previous versions but this has been resolved. |
Latest (^3.6.1) :) |
Can you share your code from the video?? |
Its a lot of code, I'm giving you the page of it shown in the video, there is data coming from databases and such, I'm not sure it will help you. As you saw in the video, the text views and the tex views would become misaligned, and that is demonstrated around line 220, which shows the text input and the tex output as i detailed in the video. I hope this helps. |
Sorry, but I couldn't get the issue from your code. How to reproduce this issue? Can you show a minimal example of this issue? |
I built a minimal example, however, I wasn't able to replicate the issue. I will do further testing and try to get to the bottom of this. Thank you for your response. In case your wondering, this is what I wrote to test, It doesn't follow the exact structure of my app, but I thought it would cause the issue I was facing, it didn't :( https://pastebin.com/zXRjaGPz |
In your previous code, I found only 1 TeXView. but in the video, there are 3. Can you explain this, please? i.e. Are you using a custom widget of TeXView, without creating separate instances? |
In the original code shown in the video, i was using a listview builder which generated them one after another, in my test code, i just manually copy and pasted a few in their, |
I found an ipad running an older version of my app using tex version ^3.1.3+5, and it ran basically the same code (for that specific screen) back then, compared to what i have now shown in my video. I do not experience any issues with the caching in that version of the app. The only change for the screen since was to adapt the update regarding css styling. I don't know how if anything this helps things, but my code really hasn't changed since that update. For the time being, I might revert back to that version |
Please post your debug info when you open this particular page. |
output when entering the problematic page, this is output from my Samsung s8 https://pastebin.com/0hafWdR9 this is output from pixel 3 emulator https://pastebin.com/cHkXbhnz |
It should work according to this output. Let me do my own testings. can you provide your |
|
Please try with the latest version |
ok, so running the app with the debugger runs and after pressing a few buttons on the problematic page to change the view, the error "Exception has occurred. |
Please try with |
Works like magic - Thanks so much |
Hi,
I have noticed that if you have multiple tex views, initially both views render what's given to them, however after you alter one of them using "setstate" and then alter another, it doesn't render what was given to it, but instead what the previous texview displayed. To show you this, I made a video, there is a text view to display the input to the tex view directly over the tex view. both are given the same variable input, but after a bit, you will see things don't match up. I made a clear video explaining this so I hope you can better understand. Thanks
https://drive.google.com/file/d/10W3EDsEjFtSjgaAOnEfliBBV6xXJTHFP/view?usp=sharing
Text(f), TeXView( showLoadingWidget: true, renderingEngine: TeXViewRenderingEngine .katex(), children: [ TeXViewContainer( children: [ TeXViewTeX( f, style: TeXViewStyle( backgroundColor: dark ? Color( 0xff2f3136) : Colors .white, contentColor: dark ? Colors .white : Colors .black, ), ) ], ), ],
The text was updated successfully, but these errors were encountered: