main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.red),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - ListTile Remove Padding")
),
body: bodyContent()
),
),
);
}
bodyContent(){
return Center(
child: ListView.builder(
itemCount: 75,
itemBuilder: (context,index){
return Card(
child: ListTile(
title: Text("${index+1}. I am a title"),
subtitle: const Text("I am a subtitle"),
trailing: const Icon(Icons.check_circle),
contentPadding: EdgeInsets.zero
)
);
}
)
);
}
More flutter tutorials
- flutter – ListTile border
- flutter – ListTile border bottom
- flutter – ListTile border radius
- flutter – Space between ListTile leading and title
- flutter – ListTile background color
- flutter – ListTile divider
- flutter – ListTile divide tiles
- flutter – ListTile shape
- flutter – ListTile separator
- flutter – How to use Table
- flutter – Random number in range
- flutter – Random material color
- flutter – Random material color with shade
- flutter – Random bool custom probability
- flutter – How to generate random uuid