suragch / mongol

Mongolian vertical script widgets for Flutter apps
https://pub.dev/packages/mongol
BSD 3-Clause "New" or "Revised" License
70 stars 15 forks source link

Flutter 3.16 breaking changes #47

Closed suragch closed 8 months ago

suragch commented 9 months ago

Flutter 3.16 breaks the following files:

Satsrag commented 9 months ago

@suragch Are you solving this now? If not, I will try it this week.

suragch commented 9 months ago

@Satsrag I started working on it. Give me a few more days. It was a bigger job than I expected at first.

Satsrag commented 9 months ago

👌thank you

suragch commented 8 months ago

@Satsrag I've pushed the changes of the things I've been working on. The compile time errors are gone. Unfortunately, I broke everything at runtime. 😭

The rest of this week I am going to be busy with other things. If you have time, you can take a look at it. Or if it is easier, you can start at the last good commit and try your own approach.

Satsrag commented 8 months ago

👌Yes, I will try it.

Satsrag commented 8 months ago

@suragch The text field seems working now. Please review this. However, the previous issues still exist.

suragch commented 8 months ago

@Satsrag Nice! Thanks for fixing the crash!

There are a couple more problems I think we should fix before publishing, though. One is that MongolText resizes to get smaller but it doesn't resize to get larger. You can see this in the following animation:

mongol_text

Also the line spacing has changed. This is the old one:

image

But this is the current one:

Screenshot 2023-12-18 at 10 45 17

If you can work on it let me know. Otherwise I should have time to work on it this week.

Satsrag commented 8 months ago

I may not have time this week. There should be time on weekends. You can work on it if you have time. If some work remains until the weekend, I will have a try.

suragch commented 8 months ago

Ok, great. I'll see what I can do during the week and pass it to you this weekend if I don't finish before then.

suragch commented 8 months ago

Well, I didn't find the problems, but I added another example to the demo app called MongolTextPainter:

Screenshot 2023-12-22 at 11 09 30

This seems to show that MongolTextPainter is not the problem, at least not for the line spacing.

@Satsrag I won't work on this during the weekend so feel free to make any changes. I'll take another look at it next week.

Satsrag commented 8 months ago

@suragch Yes, I'll have a try this weekend.

Satsrag commented 8 months ago

@suragch, I fixed the issue about doesn't resize larger. But I am not sure that is the right solution. Please have a review this

The line spacing, I think we should not solve it. Its performance is similar to the Text widget. default_line_space

After setting the style: TextStyle(height: 1): 1_height

suragch commented 8 months ago

@Satsrag Thank you for all of your work on this! I've published the package as 7.0.0 now. But I also created issues #48 and #49 to track progress on issues related to this change.

There were three breaking tests that I "fixed" by adjusting the height numbers. I think two of the breaks were related to #49 since multiline text now defaults to the parent height rather than the longest line height like it was before.