39 lines
995 B
Dart
39 lines
995 B
Dart
import 'package:flutter/material.dart';
|
|
import '../../../../core/constants/colors.dart';
|
|
|
|
class ExpandableSectionCard extends StatelessWidget {
|
|
final String title;
|
|
final IconData icon;
|
|
final List<Widget> children;
|
|
|
|
const ExpandableSectionCard({
|
|
Key? key,
|
|
required this.title,
|
|
required this.icon,
|
|
required this.children,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
color: AppColors.cardColor,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
elevation: 2,
|
|
child: ExpansionTile(
|
|
title: Text(
|
|
title,
|
|
style: const TextStyle(
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
leading: Icon(icon, color: AppColors.accentColor),
|
|
iconColor: AppColors.accentColor,
|
|
collapsedIconColor: AppColors.accentColor,
|
|
children: children,
|
|
),
|
|
);
|
|
}
|
|
}
|