erluxman/pdf_flutter

How to set the height to fill the remaining space?

Closed this issue · 2 comments

I have a button on my app and I would like to the pdf viewer to fill the remaining space. Because I have another button widget, so I can't use double.infinity for the height. I tried to wrapped the PDF widget in Extended, but it does not make it to fill the remaining height.

For me this works:

var size = MediaQuery.of(context).size;

PDF.network(
        url,
        height: size.height,
        width: size.width,
      );

It's not ideal but it works. Hopefully some day this plugin supports being wrapped in an Expanded Widget.

Thanks for response @devj3ns