feat: profile page

This commit is contained in:
efrilm
2025-08-12 21:20:20 +07:00
parent f0dac56802
commit 9458de5059
10 changed files with 669 additions and 2 deletions
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import '../../../../common/theme/theme.dart';
class ProfileSwitchTile extends StatelessWidget {
final IconData icon;
final String title;
final String? subtitle;
final bool value;
final ValueChanged<bool> onChanged;
const ProfileSwitchTile({
super.key,
required this.icon,
required this.title,
this.subtitle,
required this.value,
required this.onChanged,
});
@override
Widget build(BuildContext context) {
return ListTile(
leading: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: AppColor.primary.withOpacity(0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(icon, color: AppColor.primary, size: 20),
),
title: Text(
title,
style: AppStyle.lg.copyWith(
fontWeight: FontWeight.w500,
color: AppColor.textPrimary,
),
),
subtitle: subtitle != null
? Text(
subtitle!,
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
)
: null,
trailing: Switch(
value: value,
onChanged: onChanged,
activeColor: AppColor.primary,
),
);
}
}