37 lines
843 B
Dart
37 lines
843 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SectionHeader extends StatelessWidget {
|
|
final String text;
|
|
final EdgeInsets? padding;
|
|
final double? fontSize;
|
|
final bool showDivider;
|
|
|
|
const SectionHeader(
|
|
this.text, {
|
|
super.key,
|
|
this.padding,
|
|
this.fontSize,
|
|
this.showDivider = false,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
if (showDivider) const Divider(),
|
|
Padding(
|
|
padding: padding ?? const EdgeInsets.fromLTRB(16, 16, 16, 4),
|
|
child: Text(
|
|
text,
|
|
style: TextStyle(
|
|
fontSize: fontSize ?? 16,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|