boringdeveloper / FlutterSwitch

A Custom Switch package created for Flutter.
https://pub.dev/packages/flutter_switch
BSD 3-Clause "New" or "Revised" License
78 stars 65 forks source link

Missing RTL support #46

Open Harishwarrior opened 2 years ago

Harishwarrior commented 2 years ago

Describe the bug When changing language to Arabic or any RTL language the text overlaps with button.

To Reproduce Steps to reproduce the behavior:

  1. Set language to Arabic
  2. Toggle the switch
  3. The text in the toggle will overflow with button.

Expected behavior It should follow RTL layout.

Screenshots Screenshot_20211123-161424.jpg

Smartphone (please complete the following information):

Additional context Screenshot_20211123-161538.jpg

In LTR everything looks fine.

lukehutch commented 6 months ago

I need this too -- the drawing direction should be switched if:

Directionality.of(context) == TextDirection.rtl