here my code:
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.95,
height: MediaQuery.of(context).size.height * 0.6,
child: StickyHeadersTable(
columnsLength: numeroColonne,
rowsLength: listImpiantiPerGriglia.length,
columnsTitleBuilder: (i) {
return Container(
alignment: const Alignment(0, 0),
height: altezzaCella,
width: larghezzaCella,
child: Text(
attivita.titoliColonne[i],
),
);
},
rowsTitleBuilder: (i) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
titoliRigheRagsoc[i],
),
);
},
cellDimensions: CellDimensions.fixed(
contentCellWidth: larghezzaCella,
contentCellHeight: altezzaCella,
stickyLegendWidth: larghezzaLegend,
stickyLegendHeight: altezzaCella),
contentCellBuilder: (i, j) {
return Container(
alignment: const Alignment(0, 0),
height: altezzaCella,
width: larghezzaCella,
child: Text(
matriceCelle[j][i],
),
);
},
),
),
I solved my question. My error was to calculate altezzacella and larghezzaCella in proportion to di dimensions of the screen.