showBigHeading method

Widget showBigHeading({
  1. required String name,
  2. int maxLines = 2,
  3. bool softWrap = true,
  4. double? fontSize,
  5. double height = 1,
  6. FontWeight? fontWeight,
  7. String? fontFamily,
  8. TextAlign? textAlign,
  9. Color color = Colors.grey,
})

Creates a large heading text widget with bold styling.

Similar to showHeading but with larger default font size (20px) and bold weight, designed for prominent headings and titles.

Parameters:

  • name: The text content to display.
  • maxLines: Maximum number of lines (defaults to 2).
  • softWrap: Whether the text should break at soft line breaks (defaults to true).
  • fontSize: Font size. Defaults to Utils.appFontFamily.textSize20.
  • height: Line height multiplier (defaults to 1).
  • fontWeight: Font weight. Defaults to FontWeight.bold.
  • fontFamily: Font family. Defaults to Utils.appFontFamily.interSemiBoldFontFamily.
  • textAlign: Text alignment. Defaults to TextAlign.left.
  • color: Text color (defaults to grey).

Returns a Text widget with larger, bolder styling than showHeading.

Example:

showBigHeading(
  name: 'Welcome to App',
  color: Colors.black,
  fontSize: 24,
);

Implementation

Widget showBigHeading(
    {required String name,
    int maxLines = 2,
    bool softWrap = true,
    double? fontSize,
    double height = 1,
    FontWeight? fontWeight,
    String? fontFamily,
    TextAlign? textAlign,
    Color color = Colors.grey}) {
  return Text(
    name,
    softWrap: softWrap,
    maxLines: maxLines,
    style: TextStyle(
      fontSize: fontSize ?? Utils.appFontFamily.textSize20,
      color: color,
      fontWeight: fontWeight ?? FontWeight.bold,
      height: height,
      fontFamily: fontFamily ?? Utils.appFontFamily.interSemiBoldFontFamily,
    ),
    textAlign: TextAlign.left,
  );
}