行[图像,文本1,文本2,图像]
这里Text1是名称,Text2是ID,Image固定大小25,需要显示在行尾。
Like This :
Row(
children: [
// text1 will take available space and be truncated with ellipsis
Expanded(
child: Text(
'This is a long text1 that will be truncated with ellipsis',
overflow: TextOverflow.ellipsis, // Adds ellipsis if overflow occurs
style: TextStyle(fontSize: 16),
),
),
SizedBox(width: 10), // Add some spacing between the texts
// text2 will take only the space it needs and display fully
Text(
'Full text2',
style: TextStyle(fontSize: 16),
),
],
)