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

375 lines
8.6 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2024-06-17 19:51:31 +05:30
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:tanami_app/core/styles/app_color.dart';
class TextWidget {
//Text Size 11
Widget text11W400(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 11.sp,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-06-06 11:05:45 +05:30
Widget text11W500(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 11.sp,
fontWeight: FontWeight.w500,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-06-10 18:49:10 +05:30
Widget text11W700(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 11.sp,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-10 18:49:10 +05:30
}
//Text Size 12
Widget text12W400(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite,
),
);
}
Widget text12W500(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 12.sp,
fontWeight: FontWeight.w500,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-06-11 16:53:29 +05:30
Widget text12W700(String text,
{Color? clr, TextDecoration? txtDec, Color? decClr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 12.sp,
decorationColor: decClr ?? AppColor.plainWhite,
decoration: txtDec ?? TextDecoration.none,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
}
//Text Size 13
2024-07-03 18:46:18 +05:30
Widget text13W400(String text, {Color? clr, TextAlign? txtAlign}) {
return Text(
text,
textAlign: txtAlign ?? TextAlign.start,
style: GoogleFonts.dmSans(
fontSize: 13,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-07-11 20:16:37 +05:30
Widget text13W500(String text, {Color? clr, FontStyle? fontStyle}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
2024-07-11 20:16:37 +05:30
fontStyle: fontStyle ?? FontStyle.normal,
2024-06-18 19:21:53 +05:30
fontSize: 13,
fontWeight: FontWeight.w500,
color: clr ?? AppColor.plainWhite,
),
);
}
//Text Size 14
Widget text14W400(
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
int? maxLine,
TextOverflow? txtOverflow,
}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
textAlign: txtAlign ?? TextAlign.center,
maxLines: maxLine ?? 20,
overflow: txtOverflow ?? TextOverflow.ellipsis,
style: GoogleFonts.dmSans(
fontSize: 14.sp,
fontWeight: FontWeight.w400,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-05-31 17:01:48 +05:30
Widget text14W500(
2024-05-28 16:35:33 +05:30
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
2024-05-28 16:35:33 +05:30
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite,
),
);
2024-05-28 16:35:33 +05:30
}
2024-06-06 11:05:45 +05:30
Widget text14W600(
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-06 11:05:45 +05:30
}
2024-05-31 17:01:48 +05:30
Widget text14W700(String text,
{Color? clr, TextDecoration? textDecoration, TextAlign? txtAlign}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 14.sp,
fontWeight: FontWeight.w700,
decoration: textDecoration ?? TextDecoration.none,
color: clr ?? AppColor.plainWhite,
),
);
}
//Text Size 15
Widget text15W400(
String text, {
Color? clr,
TextDecoration? textDecoration,
TextAlign? txtAlign,
}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
textAlign: txtAlign ?? TextAlign.center,
style: GoogleFonts.dmSans(
decoration: textDecoration ?? TextDecoration.none,
decorationColor: clr ?? AppColor.plainWhite,
fontSize: 15.sp,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-05-31 17:01:48 +05:30
Widget text15W500(
2024-05-28 16:35:33 +05:30
String text, {
Color? clr,
TextDecoration? textDecoration,
2024-05-28 16:35:33 +05:30
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
textAlign: TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 15.sp,
decorationColor: AppColor.hintTextColor,
decoration: textDecoration ?? TextDecoration.none,
fontWeight: FontWeight.w500,
color: clr ?? AppColor.plainWhite,
),
);
}
Widget text15W700(
2024-05-28 16:35:33 +05:30
String text, {
Color? clr,
TextDecoration? textDecoration,
2024-07-22 18:40:32 +05:30
TextAlign? textAlign,
2024-05-28 16:35:33 +05:30
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
2024-07-22 18:40:32 +05:30
textAlign: textAlign ?? TextAlign.center,
2024-06-17 19:51:31 +05:30
style: GoogleFonts.dmSans(
fontSize: 15.sp,
decorationColor: AppColor.hintTextColor,
decoration: textDecoration ?? TextDecoration.none,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
2024-05-28 16:35:33 +05:30
}
//Text Size 17
Widget text17W600(
String text, {
Color? clr,
TextDecoration? textDecoration,
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
textAlign: TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 17.sp,
decorationColor: AppColor.hintTextColor,
decoration: textDecoration ?? TextDecoration.none,
fontWeight: FontWeight.w600,
color: clr ?? AppColor.plainWhite,
),
);
}
Widget text17W700(
String text, {
Color? clr,
TextDecoration? textDecoration,
2024-07-26 12:03:47 +05:30
TextAlign? txtAlign,
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
2024-07-26 12:03:47 +05:30
textAlign: txtAlign ?? TextAlign.center,
2024-06-17 19:51:31 +05:30
style: GoogleFonts.dmSans(
fontSize: 17.sp,
decorationColor: AppColor.hintTextColor,
decoration: textDecoration ?? TextDecoration.none,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-06-07 18:41:41 +05:30
//Text Size 18
Widget text18W700(
String text, {
Color? clr,
TextDecoration? textDecoration,
}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
textAlign: TextAlign.center,
style: GoogleFonts.dmSans(
fontSize: 18.sp,
decorationColor: AppColor.hintTextColor,
decoration: textDecoration ?? TextDecoration.none,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-07 18:41:41 +05:30
}
//Text Size 22
2024-06-10 18:49:10 +05:30
Widget text22W400(String text, {Color? clr}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 22.sp,
fontWeight: FontWeight.w400,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-10 18:49:10 +05:30
}
2024-05-31 17:01:48 +05:30
Widget text22W700(String text, {Color? clr}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 22.sp,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-05-28 16:35:33 +05:30
2024-06-17 19:51:31 +05:30
Widget text22W900(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 22.sp,
fontWeight: FontWeight.w900,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-14 17:54:15 +05:30
}
2024-05-28 16:35:33 +05:30
//Text Size 20
2024-07-22 18:40:32 +05:30
Widget text20W700(String text, {Color? clr, TextAlign? txtAlign}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
2024-07-22 18:40:32 +05:30
textAlign: txtAlign ?? TextAlign.start,
2024-06-17 19:51:31 +05:30
style: GoogleFonts.dmSans(
fontSize: 20.sp,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
2024-05-28 16:35:33 +05:30
}
2024-06-17 13:25:36 +05:30
Widget text20W900(String text, {Color? clr}) {
2024-06-18 19:21:53 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 20,
fontWeight: FontWeight.w900,
color: clr ?? AppColor.plainWhite,
),
);
2024-06-17 13:25:36 +05:30
}
//Text Size 28
Widget text28W700(String text, {Color? clr}) {
2024-06-17 19:51:31 +05:30
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 28.sp,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
}
2024-07-22 18:40:32 +05:30
//Text Size 32
Widget text32W700(String text, {Color? clr}) {
return Text(
text,
style: GoogleFonts.dmSans(
fontSize: 32.sp,
fontWeight: FontWeight.w700,
color: clr ?? AppColor.plainWhite,
),
);
}
}