37 lines
777 B
Dart
37 lines
777 B
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;
|
|
final TextAlign textAlign;
|
|
final int? maxLine;
|
|
|
|
const DidvanText(
|
|
this.text, {
|
|
Key? key,
|
|
this.style,
|
|
this.color,
|
|
this.fontSize,
|
|
this.fontWeight,
|
|
this.textAlign = TextAlign.right,
|
|
this.maxLine,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text(
|
|
text,
|
|
style: (style ?? Theme.of(context).textTheme.bodyText2)!.copyWith(
|
|
color: color,
|
|
fontWeight: fontWeight,
|
|
fontSize: fontSize,
|
|
),
|
|
textAlign: textAlign,
|
|
maxLines: maxLine,
|
|
);
|
|
}
|
|
}
|