pinnedBodyOf function
A pergunta (ou a revelação) em tela fixa, em coluna (E25, decisão do autor:
botões fixos no rodapé e só a partitura rola): o cabeçalho em cima (header),
a partitura na altura que sobra (score) e as respostas embaixo (bottom).
Quem passa header e bottom os faz Column(mainAxisSize: min).
Implementation
Widget pinnedBodyOf({
required Widget header,
required Widget score,
required Widget bottom,
}) {
return Builder(
builder: (context) {
final t = context.zt;
return Padding(
padding: EdgeInsets.fromLTRB(
t.space.l,
t.space.l,
t.space.l,
t.space.m,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
header,
const ZGap(ZSpace.m),
Expanded(child: score),
const ZGap(ZSpace.m),
bottom,
],
),
);
},
);
}