70 lines
1.8 KiB
Dart
70 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../core/components/spaces.dart';
|
|
import '../../../core/constants/colors.dart';
|
|
|
|
class ReportMenu extends StatelessWidget {
|
|
final String label;
|
|
final String subtitle;
|
|
final IconData icon;
|
|
final VoidCallback onPressed;
|
|
final bool isActive;
|
|
|
|
const ReportMenu({
|
|
super.key,
|
|
required this.label,
|
|
required this.onPressed,
|
|
required this.isActive,
|
|
required this.subtitle,
|
|
required this.icon,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onPressed,
|
|
child: Container(
|
|
padding: const EdgeInsets.all(12.0),
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
right: BorderSide(
|
|
color: isActive ? AppColors.primary : Colors.transparent,
|
|
width: 4.0,
|
|
),
|
|
),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
size: 24.0,
|
|
color: isActive ? AppColors.primary : AppColors.grey,
|
|
),
|
|
const SpaceWidth(12),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
label,
|
|
style: const TextStyle(
|
|
fontSize: 16.0,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 4.0),
|
|
Text(
|
|
subtitle,
|
|
style:
|
|
const TextStyle(fontSize: 14.0, color: AppColors.grey),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|