transparency method

Widget transparency(
  1. BuildContext context
)

Implementation

Widget transparency(BuildContext context) {
  return Container(
    constraints: context.x > 1100
        ? BoxConstraints(maxWidth: 1100)
        : BoxConstraints(maxWidth: context.x),
    child: context.x > 1100
        ? Row(
            children: [
              Image.asset(
                'assets/global_impact/transparency.webp',
                // height: 250.dp,
              ),
              Spacer(),
              Container(
                height: context.x > 1100 ? 250.dp : 280.dp,
                width: context.x > 1100 ? null : 250.dp,
                decoration: BoxDecoration(
                    color: ColorHelper.lightBackground3,
                    borderRadius: BorderRadius.circular(8.dp)),
                // margin: EdgeInsets.fromLTRB(context.x>1600?20.dp:30.dp, 0, context.x>3000?0:context.x>1600?20.dp:35.dp, 0),
                padding: EdgeInsets.symmetric(
                    horizontal: context.x > 1600 ? 12.dp : 18.dp,
                    vertical: context.x > 1600 ? 10.dp : 14.dp),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      'Transparency',
                      style: TextStyle(
                        fontSize: 25.dp,
                        fontWeight: FontWeight.w600,
                        color: ColorHelper.black03,
                        fontFamily: "PlayFairDisplay",
                      ),
                    ),
                    7.dp.SpaceX,
                    context.x > 1100
                        ? Text(
                            'Every contribution we and you\nmake is secured and tracked\npublic via blockchain,\nguaranteeing 100% transparency,\ntraceability, and impact— ensuring\nevery cent directly supports the\nenvironmental initiative.',
                            textAlign: TextAlign.left,
                            style: TextStyle(
                                fontSize: context.x < 430 ? 13.dp : 15.dp,
                                fontWeight: FontWeight.w400,
                                color: ColorHelper.neutralMediumText,
                                fontFamily: "SFProDisplay",
                                height: 1.7),
                          )
                        : Flexible(
                            child: Text(
                              'Every contribution we and you make is secured and tracked public via blockchain, guaranteeing 100% transparency, traceability, and impact— ensuring every cent directly supports the environmental initiative.',
                              textAlign: TextAlign.left,
                              style: TextStyle(
                                  fontSize: context.x < 430 ? 13.dp : 15.dp,
                                  fontWeight: FontWeight.w400,
                                  color: ColorHelper.neutralMediumText,
                                  fontFamily: "SFProDisplay",
                                  height: 1.7),
                              softWrap: true,
                              overflow: TextOverflow.visible,
                            ),
                          ),
                  ],
                ),
              )
            ],
          )
        : Padding(
            padding: const EdgeInsets.symmetric(horizontal: 12),
            child: ResponsiveGridRow(children: [
              ResponsiveGridCol(
                  lg: 12,
                  md: 12,
                  sm: 12,
                  xs: 12,
                  child: Padding(
                    padding: const EdgeInsets.only(bottom: 18),
                    child: Image.asset(
                      'assets/global_impact/transparency-mob.webp',
                      height: 250,
                      fit: BoxFit.fill,
                    ),
                  )),
              ResponsiveGridCol(
                  lg: 12,
                  md: 12,
                  sm: 12,
                  xs: 12,
                  child: Container(
                    height: 184.dp,
                    decoration: BoxDecoration(
                        color: ColorHelper.lightBackground3,
                        borderRadius: BorderRadius.circular(8.dp)),
                    // margin: EdgeInsets.fromLTRB(26.dp, 30.dp, 0, 0),
                    padding:
                        EdgeInsets.symmetric(horizontal: 28, vertical: 16),
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          'Transparency',
                          style: TextStyle(
                            fontSize: 22,
                            fontWeight: FontWeight.w600,
                            color: ColorHelper.black03,
                            fontFamily: "PlayFairDisplay",
                          ),
                        ),
                        7.dp.SpaceX,
                        Text(
                          'Every contribution we and you make is secured and tracked public via blockchain, guaranteeing 100% transparency, traceability, and impact— ensuring every cent directly supports the environmental initiative.',
                          textAlign: TextAlign.left,
                          style: TextStyle(
                              fontSize: 16,
                              fontWeight: FontWeight.w400,
                              color: ColorHelper.neutralMediumText,
                              fontFamily: "SFProDisplay",
                              height: 1.7),
                        )
                      ],
                    ),
                  ))
            ]),
          ),
  );
}