flutter_page_indicator icon indicating copy to clipboard operation
flutter_page_indicator copied to clipboard

PageIndicator stays ltr even if you change app directionality to rtl

Open mohammadamirnm opened this issue 4 years ago • 0 comments

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.

Screen-Recording-1398-12-15-at-1

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,
                    ),
                  ),

mohammadamirnm avatar Mar 05 '20 07:03 mohammadamirnm