[英]How to add description below ListTile Widget in flutter?
I am using Wordpair class to generate random words in flutter. 我正在使用Wordpair类在flutter中生成随机单词。 I have this widget 我有这个小部件
Widget _buildRow(WordPair pair){
return ListTile(
title: Text(
pair.first,
//pair.asCamelCase,
style: _biggerFont,
),
);
} }
How do I add another text widget to describe these words below ListTile widget? 如何在ListTile小部件下面添加另一个文本小部件来描述这些单词?
Widget _buildRow(WordPair pair){
return ListTile(
title: Text(
pair.first,
//pair.asCamelCase,
style: _biggerFont,
),
subtitle: Text("description goes here")
);
Assuming pair
contains the word and description, you have 假设pair
包含单词和描述,你有
subtitle: Text(pair.second)
NOTE: this assumes the description is shown just below the text inside the ListTile
and is very brief to avoid overflow. 注意:这假设描述显示在ListTile
内的文本正下方,并且非常简短以避免溢出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.