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

Hardcoded directionality #1

Open
MuKhAlm opened this issue May 23, 2024 · 2 comments
Open

Hardcoded directionality #1

MuKhAlm opened this issue May 23, 2024 · 2 comments
Assignees

Comments

@MuKhAlm
Copy link

MuKhAlm commented May 23, 2024

The directionality of the child widget is left to right. And it "seemingly" cannot be changed.

@sjhorn sjhorn self-assigned this May 26, 2024
@sjhorn
Copy link
Owner

sjhorn commented May 26, 2024

@MuKhAlm I updated the example to demonstrate this library supports right to left and left to right with a click.

Please let me know if this is still an issue.

@MuKhAlm
Copy link
Author

MuKhAlm commented May 28, 2024

@sjhorn Thank you for your response. Unfortunately, I cannot say that it's the Widgets fault or mine but for some reason it still doesn't work for me.

Here is my build method. The Placeholder ends up on the left side of the screen even though the inspector shows that SingleChildTwoDimensionalScrollView has more space to the right of the Placeholder.

@override
  Widget build(BuildContext context) {
    return Directionality(
      textDirection: TextDirection.rtl,
      child: Scaffold(
        appBar: AppBar(
          title: const Text("My app"),
        body: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisSize: MainAxisSize.min,
          children: [
            SizedBox(width: 10),
            Expanded(
              child: Scrollbar(
                controller: scrollController,
                child: SingleChildTwoDimensionalScrollView(
                  child: Placeholder(),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }

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

2 participants