splitReviewStrip function

Widget splitReviewStrip(
  1. ReviewFacts facts, {
  2. required String? reference,
  3. required ({Color highlight, bool noSound}) look,
  4. String? counter,
})

A faixa da revelação: o veredito (facts) e o que mudou com o acorde de referência (reference). counter é o contador da pergunta revelada; look traz a cor do acerto e se o aviso de "sem som" aparece.

Implementation

Widget splitReviewStrip(
  ReviewFacts facts, {
  required String? reference,
  required ({Color highlight, bool noSound}) look,
  String? counter,
}) {
  final (:highlight, :noSound) = look;
  return Builder(
    builder: (context) {
      final t = context.zt;
      return Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          _titleLine(
            Text(
              facts.title,
              style: t.text.section.copyWith(
                color: facts.first ? highlight : t.colors.ink,
              ),
            ),
            counter,
          ),
          const ZGap(ZSpace.xxs),
          Text(
            [facts.sentence, ?reference].join(' '),
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
            style: t.text.caption.copyWith(color: t.colors.ink),
          ),
          if (noSound) noSoundNote(),
        ],
      );
    },
  );
}