Spaces:
Configuration error
Configuration error
File size: 1,173 Bytes
78013c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | import 'package:flutter/material.dart';
import 'package:smart_attendance_app/app/theme.dart';
/// Section header for grouping menu items and content areas.
/// Replaces _SectionHeader in profile, notifications, and other screens.
class SectionHeader extends StatelessWidget {
final String title;
final IconData? icon;
final Color? color;
final Widget? trailing;
const SectionHeader({
super.key,
required this.title,
this.icon,
this.color,
this.trailing,
});
@override
Widget build(BuildContext context) {
final displayColor = color ?? SasColors.textMuted;
return Row(
children: [
if (icon != null) ...[
Icon(icon, size: 16, color: displayColor),
const SizedBox(width: 6),
],
Expanded(
child: Text(
icon != null ? title : title.toUpperCase(),
style: TextStyle(
color: displayColor,
fontSize: icon != null ? 13 : 11,
fontWeight: FontWeight.w700,
letterSpacing: icon != null ? 0 : 1.2,
),
),
),
if (trailing != null) trailing!,
],
);
}
}
|