apptomate_custom_list_tile 0.0.2
apptomate_custom_list_tile: ^0.0.2 copied to clipboard
A customizable ListTile widget with additional styling options like background color, elevation, shadow, and rounded corners. Built for Flutter applications.
example/lib/main.dart
import 'package:apptomate_custom_list_tile/apptomate_custom_list_tile.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Custom ListTile Example')),
body: ListView(
padding: const EdgeInsets.all(12),
children: [
CustomListTile(
title: 'John Doe',
subtitle: 'Software Developer',
leading: const CircleAvatar(
backgroundImage: AssetImage('assets/images/user.png'),
),
trailing: const Icon(Icons.arrow_forward_ios),
onTap: () {
print('John Doe tapped');
},
elevation: 6.0,
shadowColor: Colors.black45,
),
const SizedBox(height: 10),
CustomListTile(
title: 'Jane Smith',
subtitle: 'Product Manager',
leading: const CircleAvatar(
backgroundImage: NetworkImage(
'https://www.example.com/image.jpg',
),
),
trailing: const Icon(Icons.more_vert),
onTap: () {
print('Jane Smith tapped');
},
backgroundColor: Colors.blueAccent.withOpacity(0.1),
borderRadius: 12.0,
elevation: 8.0,
shadowColor: Colors.blue,
),
const SizedBox(height: 10),
CustomListTile(
title: 'Michael Brown',
subtitle: 'UI/UX Designer',
leading: const Icon(Icons.person),
trailing: const Icon(Icons.edit),
onTap: () {
print('Michael Brown tapped');
},
backgroundColor: Colors.greenAccent.withOpacity(0.1),
borderRadius: 16.0,
elevation: 10.0,
shadowColor: Colors.green,
),
],
),
);
}
}