frosty/lib/widgets/section_header.dart

42 lines
953 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class SectionHeader extends StatelessWidget {
final String text;
final EdgeInsets padding;
2022-05-26 20:00:42 -04:00
final double? fontSize;
final bool showDivider;
const SectionHeader(
this.text, {
Key? key,
this.padding = const EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
2022-05-26 20:00:42 -04:00
this.fontSize,
this.showDivider = false,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: padding,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
text.toUpperCase(),
style: TextStyle(
fontSize: fontSize,
fontWeight: FontWeight.w600,
letterSpacing: 0.8,
),
),
if (showDivider)
const Divider(
height: 10.0,
thickness: 1.0,
),
],
),
);
}
}