shareBenefit method

Widget shareBenefit(
  1. BuildContext context
)

Implementation

Widget shareBenefit(BuildContext context) {
  print(context.y);
  return Container(
    constraints: context.x > 1100
        ? BoxConstraints(maxWidth: 1100)
        : BoxConstraints(maxWidth: context.x),
    padding: EdgeInsets.symmetric(horizontal: context.isMobile ? 12 : 0),
    child: Column(
      children: [
        ResponsiveGridRow(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            ResponsiveGridCol(
                lg: 5,
                md: 5,
                sm: 7,
                xs: 12,
                child: Padding(
                    padding:
                        EdgeInsets.only(bottom: context.y < 940 ? 39 : 0),
                    child: Image.asset(
                        'assets/global_impact/share_benefits.webp'))),
            ResponsiveGridCol(
                lg: 7,
                md: 7,
                sm: 8,
                xs: 12,
                child: Padding(
                  padding: EdgeInsets.only(left: context.x < 768?0:context.x < 940 ? 20 : 45.dp),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      RichText(
                        text: TextSpan(
                          style: TextStyle(
                            fontSize: context.x < 768
                                ? 28
                                : context.x > 1600
                                    ? 35.dp
                                    : 37.dp,
                            fontWeight: FontWeight.w600,
                            fontFamily: "PlayFairDisplay",
                            height: 1.0,
                          ),
                          children: [
                            TextSpan(
                              text: 'Share ',
                              style: TextStyle(
                                color: ColorHelper.textDark,
                              ),
                            ),
                            WidgetSpan(
                              alignment: PlaceholderAlignment.baseline,
                              baseline: TextBaseline
                                  .alphabetic, // Ensures proper alignment
                              child: Baseline(
                                baseline: 0,
                                baselineType: TextBaseline.alphabetic,
                                child: GradientText(
                                  'Your Benefits ',
                                  style: TextStyle(
                                    fontSize: context.x < 768
                                        ? 28
                                        : context.x > 1600
                                            ? 35.dp
                                            : 37.dp,
                                    fontWeight: FontWeight.w600,
                                    fontFamily: "PlayFairDisplay",
                                    height: 1.0,
                                  ),
                                  gradientDirection: GradientDirection.ltr,
                                  colors: ColorHelper.gradientTextColors,
                                ),
                              ),
                            ),
                            TextSpan(
                              text: 'Program',
                              style: TextStyle(
                                color: ColorHelper.textDark,
                              ),
                            ),
                          ],
                        ),
                      ),
                      context.isMobile ? 17.SpaceX : 20.dp.SpaceX,
                      Text(
                        context.x > 1100
                            ? 'NEOPASS is committed to making a difference through its “Share Your\nBenefits” Program. By booking with us, you’re not just traveling—you’re\ncontributing to a brighter future. Every booking supports our missions,\nand we invite you to amplify your impact by sharing a portion of your\nsavings or NEO-Miles to this vital cause. As a company, we proudly\nshare a portion of our profits to further missions and achieve more\ntogether.'
                            : 'NEOPASS is committed to making a difference through its “Share Your Benefits” Program. By booking with us, you’re not just traveling—you’re contributing to a brighter future. Every booking supports our missions, and we invite you to amplify your impact by sharing a portion of your savings or NEO-Miles to this vital cause. As a company, we proudly share a portion of our profits to further missions and achieve more together.',
                        style: TextStyle(
                            fontSize: 16.dp,
                            fontWeight: FontWeight.w400,
                            color: ColorHelper.textDarkMed,
                            fontFamily: "SFProDisplay",
                            height: 1.3),
                        textAlign: TextAlign.left,
                      ),
                      context.isPhone ? 9.SpaceX : 20.dp.SpaceX,
                      InkWell(
                        onTap: () {
                          goto(Routes.DASHBOARD_BENEFITS);
                        },
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: [
                            Text(
                              'Go To Shared Benefits',
                              style: TextStyle(
                                fontSize: 16.dp,
                                fontWeight: FontWeight.w500,
                                color: ColorHelper.primaryColor2,
                                fontFamily: "SFProDisplay",
                              ),
                            ),
                            SvgPicture.asset(
                              'assets/home/arrowup.svg',
                              colorFilter: const ColorFilter.mode(
                                ColorHelper.primaryColor2,
                                BlendMode.srcIn,
                              ),
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                )),
          ],
        ),
      ],
    ),
  );
}