frosty/lib/widgets/section_header.dart

31 lines
646 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:frosty/main.dart';
class SectionHeader extends StatelessWidget {
final String text;
final EdgeInsets? padding;
2022-05-26 20:00:42 -04:00
final double? fontSize;
const SectionHeader(
this.text, {
Key? key,
this.padding,
2022-05-26 20:00:42 -04:00
this.fontSize,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: padding ?? const EdgeInsets.fromLTRB(16, 30, 16, 5),
child: Text(
text,
style: TextStyle(
color: purple,
fontSize: fontSize ?? 16,
fontWeight: FontWeight.w600,
),
),
);
}
}