Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set the height to fill the remaining space? #20

Closed
zfc0812 opened this issue Jan 24, 2021 · 2 comments
Closed

How to set the height to fill the remaining space? #20

zfc0812 opened this issue Jan 24, 2021 · 2 comments

Comments

@zfc0812
Copy link

zfc0812 commented Jan 24, 2021

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.

@devj3ns
Copy link
Contributor

devj3ns commented Jan 25, 2021

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.

@erluxman
Copy link
Owner

Thanks for response @devj3ns

@zfc0812 zfc0812 changed the title How to set the height to fill the reminding space? How to set the height to fill the remaining space? Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants