|
@@ -1,5 +1,4 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
-import 'package:ftrecruiter/comm/constants/font_constants.dart';
|
|
|
|
|
|
// ignore: slash_for_doc_comments
|
|
|
/**
|
|
@@ -47,8 +46,7 @@ class MyTextView extends StatelessWidget {
|
|
|
bool? isFontRegular;
|
|
|
bool? isFontMedium;
|
|
|
bool? isFontBold;
|
|
|
- bool? isFonTimeNew;
|
|
|
- String? fontFamily;
|
|
|
+ FontWeight? fontWeight;
|
|
|
|
|
|
MyTextView(this.content,
|
|
|
{this.textColor,
|
|
@@ -73,8 +71,9 @@ class MyTextView extends StatelessWidget {
|
|
|
this.isFontRegular,
|
|
|
this.isFontMedium,
|
|
|
this.isFontBold,
|
|
|
- this.isFonTimeNew,
|
|
|
+ this.fontWeight,
|
|
|
this.onClick}) {
|
|
|
+
|
|
|
if (padding != null) {
|
|
|
if (padding != null && padding! > 0) {
|
|
|
paddingLeft = padding;
|
|
@@ -96,17 +95,25 @@ class MyTextView extends StatelessWidget {
|
|
|
onClick ??= () {};
|
|
|
|
|
|
if (isFontLight != null && isFontLight!) {
|
|
|
- fontFamily = FontConstants.FONT_FAMILY_SC_LIGHT;
|
|
|
+
|
|
|
+ fontWeight = FontWeight.w300;
|
|
|
+
|
|
|
} else if (isFontRegular != null && isFontRegular!) {
|
|
|
- fontFamily = FontConstants.FONT_FAMILY_SC_REGULAR;
|
|
|
+
|
|
|
+ fontWeight = FontWeight.w400;
|
|
|
+
|
|
|
} else if (isFontMedium != null && isFontMedium!) {
|
|
|
- fontFamily = FontConstants.FONT_FAMILY_SC_MEDIUM;
|
|
|
+
|
|
|
+ fontWeight = FontWeight.w500;
|
|
|
+
|
|
|
} else if (isFontBold != null && isFontBold!) {
|
|
|
- fontFamily = FontConstants.FONT_FAMILY_SC_BOLD;
|
|
|
- } else if (isFonTimeNew != null && isFonTimeNew!) {
|
|
|
- fontFamily = FontConstants.FONT_FAMILY_TIME_NEW;
|
|
|
- } else {
|
|
|
- fontFamily = null;
|
|
|
+
|
|
|
+ fontWeight = FontWeight.w700;
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ fontWeight = FontWeight.normal;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -127,9 +134,8 @@ class MyTextView extends StatelessWidget {
|
|
|
style: TextStyle(
|
|
|
color: textColor,
|
|
|
fontSize: fontSize ?? 14,
|
|
|
- fontWeight: isBold ?? false ? FontWeight.bold : FontWeight.normal,
|
|
|
+ fontWeight: fontWeight,
|
|
|
overflow: singleLine ?? false ? TextOverflow.ellipsis : TextOverflow.clip,
|
|
|
- fontFamily: fontFamily,
|
|
|
),
|
|
|
),
|
|
|
));
|