cofounderella/lib/components/text_bold.dart

33 lines
696 B
Dart

import 'package:flutter/material.dart';
/// Text in bold.
///
/// Unless specified otherwise, the default settings will be
/// fontSize: [18] and fontWeight: [FontWeight.bold].
class TextBold extends StatelessWidget {
final String text;
final double? fontSize;
final FontWeight? fontWeight;
final TextAlign? textAlign;
const TextBold({
super.key,
required this.text,
this.fontSize = 18,
this.fontWeight = FontWeight.bold,
this.textAlign,
});
@override
Widget build(BuildContext context) {
return Text(
text,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: fontSize,
),
textAlign: textAlign,
);
}
}