Open yottaline opened 2 years ago
i also face the same issue please if you find problem fix tag me
i also face the same issue please if you find problem fix tag me
@MohamadSuhiebAjaj
Just wrap the nav with a Directionality widget to keep it ltr whatever your app ltr or rtl and reverse the items or keep it as it is
I want to help, I found the fix like this for RTL support :
from this :
double getPosition(int i) {
int itemCnt = widget.activeIcons.length;
return i / itemCnt + (1 / itemCnt) / 2;
}
to this :
double getPosition(int i) {
int itemCnt = widget.activeIcons.length;
double basePosition = i / itemCnt;
if (Directionality.of(context) == TextDirection.rtl) {
return ((1 - basePosition) - (1 / itemCnt) / 2);
} else {
return basePosition + (1 / itemCnt) / 2;
}
}
How to make the navbar supports RTL direction?