41 lines
837 B
Dart
41 lines
837 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../utils/colors.dart';
|
|
|
|
class TextCustom extends StatelessWidget {
|
|
final text;
|
|
final size;
|
|
final color;
|
|
final fontWeight;
|
|
final textAlign;
|
|
final maxLines;
|
|
final underscore;
|
|
|
|
TextCustom({
|
|
required this.text,
|
|
this.size = 16.0,
|
|
this.color = PaletteColors.primaryColor,
|
|
this.fontWeight = FontWeight.normal,
|
|
this.textAlign = TextAlign.start,
|
|
this.maxLines = 1,
|
|
this.underscore,
|
|
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text(
|
|
text,
|
|
overflow: TextOverflow.ellipsis,
|
|
textAlign: textAlign,
|
|
style: TextStyle(
|
|
color: color,
|
|
fontSize: size,
|
|
fontWeight: fontWeight,
|
|
decoration: underscore,
|
|
decorationThickness: 4
|
|
),
|
|
maxLines: maxLines,
|
|
);
|
|
}
|
|
} |