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

Change Preview Tab to include Widget with Code View #33

Open
chimon2000 opened this issue Jan 25, 2021 · 6 comments
Open

Change Preview Tab to include Widget with Code View #33

chimon2000 opened this issue Jan 25, 2021 · 6 comments

Comments

@chimon2000
Copy link
Contributor

We have actually started using this and feel like it's a nice feature to bake into dashbook.

Poached from flutter_catelog. It allows developers to view a preview of the widget but then also see the source code for that widget.

Here is the library that we are currently using in tandem with dashbook.

@erickzanardo
Copy link
Member

Dashbook kind of support something similar to that already, you can provide a codelink property when adding the chapter and it will create an icon to top of the page, you can check it working here: https://flame-engine.github.io/flame_example/#/

I think the only difference from what you are suggestion is that it would should the code directly on the page? Maybe on an iframe or webview?

@chimon2000
Copy link
Contributor Author

Yup, that's the only major difference, with the ability to copy the code directly. I can put together a working example if needed.

@emersonsiega
Copy link

I've created a custom decorator with the package widget_with_codeview.

It's very simple.. Just need to add an IconButton to show/hide the code...

@erickzanardo
Copy link
Member

wow, that is such a simple solution! I will try adding something similar on Dashbook

@chimon2000
Copy link
Contributor Author

@erickzanardo wondering if this is something you're still looking to add.

@erickzanardo
Copy link
Member

Hey @chimon2000 ! Yes, definitely, but I am failing to find time to work on that, would you have interest in trying to submit a PR for this? I could try guiding you in case you need assistance.

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