flutter_page_indicator
flutter_page_indicator copied to clipboard
PageIndicator stays ltr even if you change app directionality to rtl
I was trying to create an RTL app, and I needed to swipe from right to left, but the PageIndicator doesn't change to RTL as the PageView child does. I was trying to create an RTL app, and I needed to swipe from right to left, but the PageIndicator doesn't change to RTL as the PageView child does. I was trying to create an RTL app, and I needed to swipe from right to left, but the PageIndicator doesn't change to RTL as the PageView child does.
I did eventually get what I wanted by putting a directionality widget on the PageIndicator widget and also reversing the PageView widget. Still, you could add a feature to your widget for more comfortable use.
Here's the code if you wanted to use it:
Directionality(
textDirection: TextDirection.ltr,
child: PageIndicatorContainer(
child: PageView(
reverse: true,
children: productImages,
),
length: productImages.length,
indicatorColor: ColorPalette.kdisabledColor,
indicatorSelectorColor: ColorPalette.klightPrimarySolid,
),
),