Reputation: 17108
I want to set maximum 2 line in my Text widget and also need to set "..."(ellipse) at the end of line
Container(
height: 100,
alignment: Alignment.topLeft,
child: Text("${news.newsDetails}"),
)
Upvotes: 3
Views: 4026
Reputation: 7990
use maxLines
and overflow
Text(
'${model.title}',
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
Upvotes: 5