flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Proposal to add Option for RTL in _AutocompleteOptions

Open 1075dn opened this issue 4 years ago • 5 comments
trafficstars

Currently, when using the Autocomplete widget, the autocomplete options are aligned to the left-hand side (even when wrapped in a Directionality), unless you explicitly use the optionsViewBuilder parameter to build your own right-aligned autocomplete option widget. I think this can easily be fixed on this line in src/material/autocomplete.dart Thanks so much!

1075dn avatar Nov 01 '21 17:11 1075dn

This Text widget does not inherit the TextDirection from the Directionality my Autocomplete is wrapped in.

1075dn avatar Nov 01 '21 18:11 1075dn

Bump?

1075dn avatar Nov 09 '22 20:11 1075dn

This issue is missing a priority label. Please set a priority label when adding the triaged-design label.

flutter-triage-bot[bot] avatar Apr 10 '24 02:04 flutter-triage-bot[bot]

CC @justinmc

HansMuller avatar Apr 10 '24 18:04 HansMuller

This should be fixed in https://github.com/flutter/flutter/pull/143249.

Notice how the code has changed since this bug was filed and we now set the alignment based on the TextDirection:

https://github.com/flutter/flutter/blob/aff5477dadb02a23df1129fbb47397fb452cfbe2/packages/flutter/lib/src/material/autocomplete.dart#L185-L188

But there's still some weirdness in positioning in the Overlay that's being cleaned up in https://github.com/flutter/flutter/pull/143249.

justinmc avatar Apr 10 '24 23:04 justinmc

This appears to already be fixed on master if I'm not misunderstanding. I will add a test for it in https://github.com/flutter/flutter/pull/143249 and close this issue when it merges.

justinmc avatar Jun 07 '24 20:06 justinmc