getHeaderForLoginRegisterDesign method

Widget getHeaderForLoginRegisterDesign({
  1. required String heading,
  2. required String subHeading,
  3. Color headingTextColor = Colors.black,
  4. Color subHeadingTextColor = Colors.black,
})

Creates a header widget for login/register screens.

Displays a heading and subheading in a column layout with left alignment and configurable padding. Designed for authentication screen headers.

Parameters:

  • heading: The main title text (rendered in bold).
  • subHeading: The descriptive text below the heading (rendered in regular weight).
  • headingTextColor: Color for the heading text (defaults to black).
  • subHeadingTextColor: Color for the subheading text (defaults to black).

Returns a Padding widget containing the header content.

The layout uses:

Example:

getHeaderForLoginRegisterDesign(
  heading: 'Welcome Back',
  subHeading: 'Sign in to continue',
  headingTextColor: Colors.black87,
  subHeadingTextColor: Colors.grey,
);

Implementation

Widget getHeaderForLoginRegisterDesign(
    {required String heading,
    required String subHeading,
    Color headingTextColor = Colors.black,
    Color subHeadingTextColor = Colors.black}) {
  return Padding(
    padding: EdgeInsets.only(
        left: Utils.appConstants.headerLeftPadding,
        right: Utils.appConstants.headerRightPadding),
    child: Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Text(
          heading,
          textAlign: TextAlign.start,
          style: TextStyle(
              fontFamily: Utils.appFontFamily.textMainFontBoldFamily,
              color: headingTextColor,
              fontSize: Utils.appFontFamily.textHeaderFontSize),
        ),
        Utils.commonWidgets
            .addVerticalSpace(Utils.appConstants.zeroPointZeroOne),
        Text(
          subHeading,
          textAlign: TextAlign.start,
          style: TextStyle(
              fontFamily: Utils.appFontFamily.textMainFontRegular,
              color: subHeadingTextColor,
              fontSize: Utils.appFontFamily.textMediumFontSize),
        )
      ],
    ),
  );
}