I'm trying to get the placeholder text in a CupertinoTextField
to wrap to the next line, rather than being cut off with an ellipsis.
When I set maxLines
to a value (e.g. 5), the placeholder text wraps. However, I want the TextField to expand with the user's input, so I need to set maxLines
to null.
return CupertinoTextField(
controller: _textController,
autofocus: true,
placeholder:
"This is a very long placeholder text that should wrap to the next line.",
maxLines: null,
);
Is there a workaround to get the placeholder text to wrap?