aliyigitbireroglu/flutter-cupertino-tabbar

Support RTL

Closed this issue · 3 comments

Currently in RTL mode the menu selection and its animation works wrong.

It's related to this line:

Alignment get _alignment => Alignment(-1.0 + widget._valueGetter() / (widget._widgets.length - 1) * 2, 0.0);

It will be fixed by multiply by minus one when we are in RTL mode:

Alignment get _alignment => Alignment(-1 * (-1.0 + widget._valueGetter() / (widget._widgets.length - 1) * 2), 0.0);

I made a PR.

I merged the PR, thank you.