flutter
flutter copied to clipboard
Proposal to add Option for RTL in _AutocompleteOptions
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!
This Text widget does not inherit the TextDirection from the Directionality my Autocomplete is wrapped in.
Bump?
This issue is missing a priority label. Please set a priority label when adding the triaged-design label.
CC @justinmc
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.
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.