passengerTypeCheckbox method

Widget passengerTypeCheckbox(
  1. String value,
  2. String title,
  3. String subtitle,
  4. String type,
  5. SubscriptionsController controller,
)

Implementation

Widget passengerTypeCheckbox(
    String value,
    String title,
    String subtitle,
    String type,
    SubscriptionsController controller,
    ) {
  return Container(
    margin: EdgeInsets.all(6.dp),
    child: Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        InkWell(
          onTap: () {
            controller.type.value = type;
          },
          child: Container(
            height: 24.dp,
            width: 24.dp,
            decoration: BoxDecoration(
              border: Border.all(
                color: ColorHelper.primaryBlue,
                width: 2.dp,
              ),
              borderRadius: BorderRadius.circular(5.dp),
            ),
            child: Icon(
              Icons.check,
              size: 14.dp,
              color: value == type
                  ? ColorHelper.primaryBlue
                  : Colors.transparent,
            ),
          ),
        ),
        10.dp.SpaceY,
        Flexible(
          child: Wrap(
            runSpacing: 4.dp,
            crossAxisAlignment: WrapCrossAlignment.center,
            children: [
              Text(
                title,
                style: TextStyle(
                  fontSize: 16.dp,
                  fontWeight: FontWeight.w500,
                  color: ColorHelper.black03,
                ),
              ),
              2.dp.SpaceY,
              Text(
                subtitle,
                style: TextStyle(
                  fontSize: 12.dp,
                  fontWeight: FontWeight.w400,
                  color: ColorHelper.neutralLightText,
                ),
              ),
            ],
          ),
        ),
      ],
    ),
  );
}