37 lines
759 B
Dart
37 lines
759 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/utils/color_palette.dart';
|
|
|
|
class TextDefault extends StatelessWidget {
|
|
|
|
String text;
|
|
double fontSize;
|
|
Color color;
|
|
FontWeight fontWeigth;
|
|
TextAlign textAlign;
|
|
int maxLines;
|
|
|
|
TextDefault({
|
|
required this.text,
|
|
this.fontSize = 20.0,
|
|
this.color = ColorPalette.gray,
|
|
this.fontWeigth = FontWeight.normal,
|
|
this.textAlign = TextAlign.start,
|
|
this.maxLines = 1
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text(
|
|
text,
|
|
textAlign: textAlign,
|
|
maxLines: maxLines,
|
|
style: TextStyle(
|
|
fontSize: fontSize,
|
|
fontWeight: fontWeigth,
|
|
color: color,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
);
|
|
}
|
|
}
|