Files
Tanami_App/lib/shared/components/text_widget.dart

90 lines
2.4 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:tanami_app/core/styles/app_color.dart';
class TextWidget {
//Text Size 12
Widget text12W400(String text, {Color? clr}) {
return Text(text,
style: GoogleFonts.dmSans(
fontSize: 12,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite));
}
//Text Size 14
2024-05-28 16:35:33 +05:30
Widget tex14W500(
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
2024-05-28 16:35:33 +05:30
}) {
return Text(text,
textAlign: txtAlign ?? TextAlign.center,
2024-05-28 16:35:33 +05:30
style: GoogleFonts.dmSans(
fontSize: 14,
fontWeight: FontWeight.w500,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite));
}
Widget tex14W700(String text,
{Color? clr, TextDecoration? textDecoration, TextAlign? txtAlign}) {
return Text(text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 14,
fontWeight: FontWeight.w700,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite));
}
//Text Size 15
2024-05-28 16:35:33 +05:30
Widget tex15W500(
String text, {
Color? clr,
}) {
return Text(text,
textAlign: TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 15,
fontWeight: FontWeight.w500,
color: clr ?? AppColor.plainWhite));
}
2024-05-28 16:35:33 +05:30
Widget tex15W400(
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
}) {
return Text(text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
decoration: textDecoration ?? TextDecoration.none,
decorationColor: clr ?? AppColor.plainWhite,
fontSize: 15,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite));
}
//Text Size 22
Widget tex22W700(String text, {Color? clr}) {
return Text(text,
style: GoogleFonts.dmSans(
fontSize: 22,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite));
}
2024-05-28 16:35:33 +05:30
//Text Size 20
Widget tex20W700(String text, {Color? clr}) {
return Text(text,
style: GoogleFonts.dmSans(
fontSize: 20,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite));
}
}