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

Allow preferred size bottom bar #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eimermusic
Copy link

I see a lot of comments wanting to have floating buttons and other UI with this pdf viewer. I see how they would be difficult (impossible?) to implement.

What I did to get space for more actions/icons is to add support for the bottom navigation bar. This can take any widget you like, it doesn't really need to be navigation at such.

Limitation is that this also need to implement the preferredSize interface so that the height can be determined when sizing the native render rect.

Example invokation:

PDFViewerScaffold(
  appBar: buildMyAppBar(),
  bottomNavigationBar: buildMyBottomBar(),
  path: file.path,
)

You can get a sized widget easily by wrapping it:

PreferredSize(
  preferredSize: Size.fromHeight(kToolbarHeight),
  child: ... Bar, Container, anything within reason ...
)

I hope this is not against the principle of this package and that you are ok merging it.

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

Successfully merging this pull request may close these issues.

1 participant