pharmacy_mobile/lib/widgets/text_widget.dart
2025-01-31 11:21:11 +08:00

21 lines
649 B
Dart

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class TextWidget extends StatelessWidget {
final String text;
final double? size;
final double? opacity;
final bool? bold;
const TextWidget({super.key, required this.text, this.size, this.opacity, this.bold});
@override
Widget build(BuildContext context) {
return Text(text,
style: GoogleFonts.outfit(
textStyle: TextStyle(
color: Color.fromRGBO(255, 255, 255, opacity ?? 1),
fontSize: size ?? 32,
fontWeight: bold == true ? FontWeight.bold : FontWeight.normal)));
}
}