tripSection method

Column tripSection()

Implementation

Column tripSection() {

  const   TextStyle lightTextStyle = TextStyle(
    fontSize: 10,
    fontWeight: FontWeight.w400,
    color: ColorHelper.neutralLightText,
  );

  return Column(
    children: [
      Text(
        travelTime,
        style: lightTextStyle
      ),
      4.SpaceX,
      SizedBox(
        width: 116,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SvgPicture.asset(
              'assets/flight_search/departure.svg',
              width: 15,
              height: 15,
              colorFilter: const ColorFilter.mode(
                ColorHelper.neutralLightText,
                BlendMode.srcIn,
              ),
            ),
            Flexible(
              flex: 1,
              child: _dottedLine(),
            ),
            for (var i = 0; i < numberOfStops; i++) ...[
              SvgPicture.asset(
                'assets/flight_search/stop.svg',
                width: 6,
                height: 6,
              ),
              Flexible(
                flex: 1,
                child: _dottedLine(),
              ),
            ],
            SvgPicture.asset(
              'assets/flight_search/arrival.svg',
              width: 15,
              height: 15,
              colorFilter: const ColorFilter.mode(
                ColorHelper.neutralLightText,
                BlendMode.srcIn,
              ),
            ),
          ],
        ),
      ),
      4.SpaceX,
      Row(
        children: [
          Text(
              numberOfStops == 0 ? 'Non-Stop' : '$numberOfStops stops',
              style: lightTextStyle
          ),
          if (layoverDuration != null && numberOfStops != 0) ...[
            Container(
              width: 0.5,
              height: 12,
              color: ColorHelper.genericBorderColor,
              margin: const EdgeInsets.symmetric(horizontal: 4),
            ),
            Text(
                layoverDuration!,
                style: lightTextStyle
            ),
          ]
        ],
      ),
    ],
  );
}