Skip to content

Add setDirection method to platform view channel#85

Merged
JSUYA merged 1 commit intoflutter-tizen:masterfrom
seungsoo47:dev.platformviewchannel.250416
Apr 23, 2025
Merged

Add setDirection method to platform view channel#85
JSUYA merged 1 commit intoflutter-tizen:masterfrom
seungsoo47:dev.platformviewchannel.250416

Conversation

@seungsoo47
Copy link
Contributor

No description provided.

@JSUYA JSUYA self-requested a review April 16, 2025 08:28
@JSUYA
Copy link
Member

JSUYA commented Apr 17, 2025

Can you share some example code where and how this method is used? It seems that setLayoutDirection is only used in Android views and iOS UIViews.

@seungsoo47
Copy link
Contributor Author

Can you share some example code where and how this method is used? It seems that setLayoutDirection is only used in Android views and iOS UIViews.

Yes, you are correct.
The 'setDirection' method channel is used to set the text direction (LTR or RTL) and is passed from the setLayoutDirection() function.
The setLayoutDirection() function is called from didChangeDependencies() and didUpdateWidget() in platform_view.dart.
This method channel has been defined and implemented on both the Flutter and native sides quite a while ago.
(However, it's unclear why this method channel was missing in our embedder.)
In this patch, I have added only the part that calls the method channel.

Additionally, based on the current check, there doesn't seem to be a direct API to call setDirection.
If you'd like, it might be helpful to directly modify didChangeDependencies() and didUpdateWidget() for testing.
However, it seems there are bugs in these two functions, so it might not be an easy task.

@JSUYA JSUYA merged commit 576a413 into flutter-tizen:master Apr 23, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants