mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 15:28:40 +00:00
39 lines
790 B
Dart
39 lines
790 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
class BetterListTile extends StatelessWidget {
|
|
final IconData icon;
|
|
final String text;
|
|
final Color? color;
|
|
final VoidCallback onTap;
|
|
|
|
const BetterListTile({
|
|
super.key,
|
|
required this.icon,
|
|
required this.text,
|
|
this.color,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
leading: Padding(
|
|
padding: const EdgeInsets.only(
|
|
right: 10,
|
|
left: 19,
|
|
),
|
|
child: FaIcon(
|
|
icon,
|
|
size: 20,
|
|
color: color,
|
|
),
|
|
),
|
|
title: Text(
|
|
text,
|
|
style: TextStyle(color: color),
|
|
),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|