Skip to content

RTL: Dial code “+” renders on the wrong side in Arabic (should stay on the left) #67

@aradhwan

Description

@aradhwan

Summary

In RTL locales (e.g., Arabic), the dial code plus sign + is rendered on the right side of the digits (e.g., 971+) instead of the left (e.g., +971). This appears in the country selection dialog. Please see the attached screenshot for an example.

Package version

  • country_code_picker: 3.4.0

Environment

  • Flutter: 3.35.1
  • Dart: 3.9.0
  • Platform: Android & iOS
  • Locale(s): ar, ar_AE (reproducible with any RTL locale)

Steps to reproduce

  1. Run the example app or any app using SelectionDialog under an RTL locale (e.g., Arabic).
  2. Open the country selection dialog.
  3. Observe some dial codes render as CountryName 971+ rather than CountryName +971.

Expected behavior

  • The dial code should always render LTR so the + remains to the left of the digits, e.g. +971.

Actual behavior

  • In RTL, the dial code renders as if it were RTL, causing the + to flip to the end.

Root cause

  • Unicode bidi rules cause the + and digits to be reordered in RTL contexts. The dial code segment needs explicit LTR direction.

Attachments

  • Screenshot(s):
Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions