Bon checkpoint + refactoring
This commit is contained in:
38
lib/presentation/widgets/expandable_section_card.dart
Normal file
38
lib/presentation/widgets/expandable_section_card.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user