After i set 'enable: false' i can't see the others lines if a text has more than 9 lines. I need set 'enable:false' because i don't want user edit text in this TextField. I tried use SigleChildScrollView, but it didn't work...
Container(
child: SingleChildScrollView(
child: TextField(
enabled: false,
keyboardType: TextInputType.multiline,
maxLines: 9,
controller: chatController,
decoration: InputDecoration(
hintText: "Chat...",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(15.0),
),
),
),
),
),
make readOnly: true now you can't edit the field and still you can scroll the field.
TextFormField( enabled: true, readOnly: true, initialValue: 'initial value', )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With