Skip to content

Instantly share code, notes, and snippets.

@guilhermecarvalhocarneiro
Created November 15, 2021 18:59
Show Gist options
  • Save guilhermecarvalhocarneiro/784a49eb2ac57526a4ef56e718f9a44b to your computer and use it in GitHub Desktop.
Save guilhermecarvalhocarneiro/784a49eb2ac57526a4ef56e718f9a44b to your computer and use it in GitHub Desktop.
Widget _buildPDFGrid(List<LaudoExameModel> pdf) {
return ListView.builder(
shrinkWrap: true,
// physics: NeverScrollableScrollPhysics(),
primary: false,
itemCount: pdf.length,
itemBuilder: (BuildContext context, int index) {
final _pdf = pdf[index];
return Container(
height: 160,
child: Card(
child: PDF(
enableSwipe: false,
swipeHorizontal: false,
).cachedFromUrl(
_pdf.arquivo,
placeholder: (double progress) => Center(child: Text('$progress %')),
errorWidget: (dynamic error) => Container(),
),
),
);
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment