36 lines
871 B
Dart
36 lines
871 B
Dart
import 'package:flutter/material.dart';
|
|
import '../theme/app_theme.dart';
|
|
|
|
class SectionHeader extends StatelessWidget {
|
|
const SectionHeader({
|
|
super.key,
|
|
required this.title,
|
|
required this.subtitle,
|
|
this.trailing,
|
|
});
|
|
|
|
final String title;
|
|
final String subtitle;
|
|
final Widget? trailing;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(title, style: Theme.of(context).textTheme.titleLarge),
|
|
const SizedBox(height: AppSpacing.xs),
|
|
Text(subtitle, style: Theme.of(context).textTheme.bodySmall),
|
|
],
|
|
),
|
|
),
|
|
...[trailing].nonNulls,
|
|
],
|
|
);
|
|
}
|
|
}
|