frosty/lib/widgets/section_header.dart

33 lines
778 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class SectionHeader extends StatelessWidget {
final String text;
final EdgeInsets padding;
final double fontSize;
2022-03-30 19:29:51 -04:00
final FontWeight fontWeight;
const SectionHeader(
this.text, {
Key? key,
this.padding = const EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
2022-05-24 18:43:12 -04:00
this.fontSize = 12.0,
this.fontWeight = FontWeight.bold,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: padding,
child: Text(
2022-05-24 18:43:12 -04:00
text.toUpperCase(),
style: TextStyle(
2022-05-24 18:43:12 -04:00
color: DefaultTextStyle.of(context).style.color?.withOpacity(0.8),
fontSize: fontSize,
2022-03-30 19:29:51 -04:00
fontWeight: fontWeight,
2022-05-24 18:43:12 -04:00
letterSpacing: 0.5,
),
),
);
}
}