didvan-app/lib/widgets/didvan/text.dart

32 lines
653 B
Dart

import 'package:didvan/config/design_config.dart';
import 'package:flutter/material.dart';
class DidvanText extends StatelessWidget {
final TextStyle style;
final String text;
final Color? color;
final FontWeight? fontWeight;
final double? fontSize;
const DidvanText(
this.text, {
Key? key,
this.style = DesignConfig.body1TextStyle,
this.color,
this.fontSize,
this.fontWeight,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Text(
text,
style: style.copyWith(
color: color,
fontWeight: fontWeight,
fontSize: fontSize,
),
);
}
}