Closed mustafaskyer closed 2 years ago
Released in 4.3.0 🚀
@andreialecu thank you for your work. But there's a problem. With this, the tab orders on the header are reversed. Also the indicator is moving with respect to rtl. However actual rendered tab orders did not change. Ex:
initial page is page 1
normal LTR: Header: page1 | page2 | page3 Render: page1 | page2 | page3
RTL: Header: page3 | page2 | page1 (<-- indicator moves this way) Render: page1 | page2 | page3 (but this stays the same)
Rendered page orders should be reversed too. In order to fix it, I have to give my tabs in reversed order,
if (!isRTL) return tabRoutes; else return tabRoutes.reverse();
and then use it.
As well as giving MaterialTabBar a conditional style, which gives flexDirection row or row-reverse accordingly. For my app to align rendered pages as in order of 3 | 2 | 1 too.
So please, include this behavior in RTL too. More important, when I do these changes, the indicator gets reversed once more because of my additions above yours outside the package, and gets outside of screen with it's intended animation leftwards.
Would you like to open a PR with the fix?
what => fix invisible indicator in RTL mode why => Tab bar indicator not works as expected in RTL mode how => just added v.x * -1 in RTL mode, otherwise will be v.x