Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageIndicator stays ltr even if you change app directionality to rtl #22

Open
mohammadamirnm opened this issue Mar 5, 2020 · 0 comments

Comments

@mohammadamirnm
Copy link

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,
                    ),
                  ),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant