frosty/lib/widgets/section_header.dart
2022-05-26 20:00:42 -04:00

30 lines
707 B
Dart

import 'package:flutter/material.dart';
class SectionHeader extends StatelessWidget {
final String text;
final EdgeInsets padding;
final double? fontSize;
const SectionHeader(
this.text, {
Key? key,
this.padding = const EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
this.fontSize,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: padding,
child: Text(
text.toUpperCase(),
style: TextStyle(
color: DefaultTextStyle.of(context).style.color?.withOpacity(0.8),
fontSize: fontSize,
fontWeight: FontWeight.w600,
letterSpacing: 0.5,
),
),
);
}
}