flet
flet copied to clipboard
Disable text wrapping on multitext TextField
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the requested feature
I want to be able to disable text wrapping on multitext Textfield
Suggest a solution
No response
Screenshots
No response
Additional details
No response
Flutter seems not to have a direct solution for this. However, with the help of this SO thread, I came up with this:
import flet as ft
def main(page: ft.Page):
page.add(
ft.ListView(
expand=True,
horizontal=True,
controls=[
ft.Container(
width=1000,
content=ft.TextField(
hint_text="Enter your text here",
keyboard_type=ft.KeyboardType.MULTILINE,
text_vertical_align=ft.VerticalAlignment.START,
border=ft.InputBorder.UNDERLINE,
filled=True,
fit_parent_size=True,
),
)
],
)
)
ft.app(target=main)
You can't try it right now, as it makes use of a prop which will be available when #4105 gets merged.
You can give the above code a try.