import 'package:flutter/material.dart'; /// A bold section title with a short accent underline beneath its left edge — the /// Grimmory-style marker for "a new block starts here" that replaces a divider line. /// For a titled card use [SectionCard] instead; this is for a bare block of content /// (a chart, a row of tiles, a list) that isn't wrapped in a card of its own. class SectionHeader extends StatelessWidget { const SectionHeader({required this.title, this.trailing, super.key}); final String title; final Widget? trailing; @override Widget build(BuildContext context) { final theme = Theme.of(context); return Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ Text( title, style: theme.textTheme.titleLarge?.copyWith( fontWeight: FontWeight.w800, ), ), const SizedBox(height: 6), Container( width: 28, height: 3, decoration: BoxDecoration( color: theme.colorScheme.primary, borderRadius: BorderRadius.circular(2), ), ), ], ), ), ?trailing, ], ); } }