getCustomText function

Widget getCustomText(
  1. String text, {
  2. Color? color,
  3. int maxLine = 1,
  4. TextAlign align = TextAlign.start,
  5. FontWeight weight = FontWeight.w400,
  6. double? size,
})

Implementation

Widget getCustomText(
  String text, {
  Color? color,
  int maxLine = 1,
  TextAlign align = TextAlign.start,
  FontWeight weight = FontWeight.w400,
  double? size,
}) {
  return Text(
    text,
    overflow: TextOverflow.ellipsis,
    style: TextStyle(
      decoration: TextDecoration.none,
      fontSize: size ?? MahasDimensions.getInputTextSize(),
      fontStyle: FontStyle.normal,
      color: color ?? MahasColors.blackColor,
      fontFamily: MahasHelper.assetImagePath,
      fontWeight: weight,
    ),
    maxLines: maxLine,
    textAlign: align,
  );
}