48 lines
1.3 KiB
Dart
48 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:mobile_monitoring/core/constants/constants.dart';
|
|
import 'package:mobile_monitoring/ui/shared/components/components.dart';
|
|
|
|
class AccountActionsCard extends StatelessWidget {
|
|
final VoidCallback onChangePassword;
|
|
final VoidCallback onLogout;
|
|
|
|
const AccountActionsCard({
|
|
super.key,
|
|
required this.onChangePassword,
|
|
required this.onLogout,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CustomCard(
|
|
elevation: 2,
|
|
borderRadius: 12,
|
|
padding: EdgeInsets.zero,
|
|
child: Column(
|
|
children: [
|
|
const SectionHeader(
|
|
title: 'Aksi Akun',
|
|
showDivider: true,
|
|
),
|
|
ListTile(
|
|
leading: const Icon(Icons.lock_outline, color: AppColors.primaryDark),
|
|
title: const Text('Ubah Password'),
|
|
trailing: const Icon(Icons.chevron_right),
|
|
onTap: onChangePassword,
|
|
),
|
|
const Divider(height: 1),
|
|
ListTile(
|
|
leading: const Icon(Icons.logout, color: AppColors.error),
|
|
title: const Text(
|
|
'Keluar',
|
|
style: TextStyle(color: AppColors.error),
|
|
),
|
|
trailing: const Icon(Icons.chevron_right),
|
|
onTap: onLogout,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|