When there is more text in my response i cant read it becasue of height chat window. So i want add there a scrollbar .
Flexible(
child: Container(
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 5.0,
offset: Offset(0, 2),
),
],
),
child: SingleChildScrollView( //wrapping the Text widget inside a SingleChildScrollView
child: Text( //neviem preco mi to nefunguje
_response,
style: TextStyle(fontSize: 16.0),
),
),
),
),
The code which i add to show scrollbar is exactly here
child: SingleChildScrollView( //wrapping the Text widget inside a SingleChildScrollView child: Text( //why it os not working ? _response, style: TextStyle(fontSize: 16.0), ), ),
and the result when i resize chatbot is still not scrollable text …
The result you can see in the image .
Thanks everyone.
The code which i add to show scrollbar is exactly here
child: SingleChildScrollView( //wrapping the Text widget inside a SingleChildScrollView child: Text( //why it os not working ? _response, style: TextStyle(fontSize: 16.0), ), ),
Iwas expecting that when i resize chat window there will be scrollbar which i can use and reat whole text.
2
Answers
When i set fixed height i can see finally scrollbar but it is not good looking here is the code
I try it make auto resizable like this but i cant see no scroolbar again
Every time when a want it have flexible it is not working . I cant read whole text i see no scrollbar. Fixed height show scrollbar i can read whole text but it is not good looking .
Add :
in Scaffold: