[英]there is a block of space i cant seem to figure out how to fix on my ListTile widget for my flutter app, code and photo below
[英]How to add description below ListTile Widget in flutter?
我正在使用Wordpair類在flutter中生成隨機單詞。 我有這個小部件
Widget _buildRow(WordPair pair){
return ListTile(
title: Text(
pair.first,
//pair.asCamelCase,
style: _biggerFont,
),
);
}
如何在ListTile小部件下面添加另一個文本小部件來描述這些單詞?
Widget _buildRow(WordPair pair){
return ListTile(
title: Text(
pair.first,
//pair.asCamelCase,
style: _biggerFont,
),
subtitle: Text("description goes here")
);
假設pair
包含單詞和描述,你有
subtitle: Text(pair.second)
注意:這假設描述顯示在ListTile
內的文本正下方,並且非常簡短以避免溢出。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.