-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_text.dart
49 lines (46 loc) · 1.19 KB
/
my_text.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:futara/controller/resources/theme/colors_manager.dart';
class MyText extends StatelessWidget {
final String title;
final Color? color;
final double? fontSize;
final double? letterSpace;
final double? wordSpace;
final String? fontFamily;
final TextAlign? alien;
final TextDecoration? decoration;
final TextOverflow? overflow;
final FontWeight? fontWeight;
final TextStyle? style;
const MyText({
super.key,
required this.title,
this.fontSize,
this.color,
this.style,
this.alien,
this.fontFamily,
this.decoration,
this.letterSpace,
this.wordSpace,
this.overflow,
this.fontWeight,
});
@override
Widget build(BuildContext context) {
return Text(
title.tr(),
textAlign: alien ?? TextAlign.start,
overflow: overflow,
style: style ??
TextStyle(
color: color ?? AppColors.primaryColor,
fontSize: fontSize ?? 16,
decoration: decoration ?? TextDecoration.none,
fontWeight: fontWeight,
fontFamily: fontFamily,
),
);
}
}