"how to put two trailing icons in list tile flutter" Code Answer's
You're definitely familiar with the best coding language Dart that developers use to develop their projects and they get all their queries like "how to put two trailing icons in list tile flutter" answered properly. Developers are finding an appropriate answer about how to put two trailing icons in list tile flutter related to the Dart coding language. By visiting this online portal developers get answers concerning Dart codes question like how to put two trailing icons in list tile flutter. Enter your desired code related query in the search bar and get every piece of information about Dart code related question on how to put two trailing icons in list tile flutter.
how to put two trailing icons in list tile flutter
Adding mainAxisSize: MainAxisSize.min to the Row() instance fixes the issue.
flutter listtile height
class CustomListItem extends StatelessWidget {
const CustomListItem({
this.thumbnail,
this.title,
this.user,
this.viewCount,
});
final Widget thumbnail;
final String title;
final String user;
final int viewCount;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 2,
child: thumbnail,
),
Expanded(
flex: 3,
child: _VideoDescription(
title: title,
user: user,
viewCount: viewCount,
),
),
const Icon(
Icons.more_vert,
size: 16.0,
),
],
),
);
}
}
class _VideoDescription extends StatelessWidget {
const _VideoDescription({
Key key,
this.title,
this.user,
this.viewCount,
}) : super(key: key);
final String title;
final String user;
final int viewCount;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.fromLTRB(5.0, 0.0, 0.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.0,
),
),
const Padding(padding: EdgeInsets.symmetric(vertical: 2.0)),
Text(
user,
style: const TextStyle(fontSize: 10.0),
),
const Padding(padding: EdgeInsets.symmetric(vertical: 1.0)),
Text(
'$viewCount views',
style: const TextStyle(fontSize: 10.0),
),
],
),
);
}
}
// ...
Widget build(BuildContext context) {
return ListView(
padding: const EdgeInsets.all(8.0),
itemExtent: 106.0,
children: <CustomListItem>[
CustomListItem(
user: 'Flutter',
viewCount: 999000,
thumbnail: Container(
decoration: const BoxDecoration(color: Colors.blue),
),
title: 'The Flutter YouTube Channel',
),
CustomListItem(
user: 'Dash',
viewCount: 884000,
thumbnail: Container(
decoration: const BoxDecoration(color: Colors.yellow),
),
title: 'Announcing Flutter 1.0',
),
],
);
}
Source: api.flutter.dev
All those coders who are working on the Dart based application and are stuck on how to put two trailing icons in list tile flutter can get a collection of related answers to their query. Programmers need to enter their query on how to put two trailing icons in list tile flutter related to Dart code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about how to put two trailing icons in list tile flutter for the programmers working on Dart code while coding their module. Coders are also allowed to rectify already present answers of how to put two trailing icons in list tile flutter while working on the Dart language code. Developers can add up suggestions if they deem fit any other answer relating to "how to put two trailing icons in list tile flutter". Visit this developer's friendly online web community, CodeProZone, and get your queries like how to put two trailing icons in list tile flutter resolved professionally and stay updated to the latest Dart updates.