flutter-autocomplete-textfield
flutter-autocomplete-textfield copied to clipboard
How to make new line from flutter autocomplete textfield
Hi, i have very long text when i input back to autocomplete text field it is on the same line and do not wrap new line. How to make text auto-wrap when it's too long. Thanks all
Hi!
You can use "\n" for new lines. Try this:
itemBuilder: (context, item){
return ListTile(
title: Text("This is a title"),
subtitle: Text("Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit,\nsed do eiusmod tempor\n incididunt ut labore et\n dolore magna aliqua"),
);
},
Check the "\n" in subtitle property.