2025-08-12 21:20:20 +07:00

55 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import '../../../../common/theme/theme.dart';
class ProfileTile extends StatelessWidget {
final IconData icon;
final String title;
final String? subtitle;
final VoidCallback? onTap;
final bool showArrow;
final Color? iconColor;
final Color? textColor;
const ProfileTile({
super.key,
required this.icon,
required this.title,
this.subtitle,
this.onTap,
this.showArrow = true,
this.iconColor,
this.textColor,
});
@override
Widget build(BuildContext context) {
return ListTile(
leading: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: (iconColor ?? AppColor.primary).withOpacity(0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(icon, color: iconColor ?? AppColor.primary, size: 20),
),
title: Text(
title,
style: AppStyle.lg.copyWith(
fontWeight: FontWeight.w500,
color: textColor ?? AppColor.textPrimary,
),
),
subtitle: subtitle != null
? Text(
subtitle!,
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
)
: null,
trailing: showArrow
? Icon(Icons.chevron_right, color: AppColor.textLight, size: 20)
: null,
onTap: onTap,
);
}
}