Did you know?
It's very easy to create and share DartPad examples using GitHub gists.
And you can even embed them on your site. 👍
Here's how. 🧵
First of all, go to gist.github.com to create a public gist with your code:
Then, copy the gist ID from the address bar and use it as an ID parameter in DartPad.
That's it!
You now have a runnable DartPad example that you can share by URL. 👇
Note: DartPad now supports some popular packages such as bloc, riverpod, provider, and some Firebase ones too.
To find out which ones are supported, click on the small info button in the lower right corner: 👇
If you want, you can even embed DartPad inside a web page using an iframe.
This guide on the DartPad wiki explains how:
https://github.com/dart-lang/dart-pad/wiki/Embedding-Guide
For more Flutter tips like this, just follow me: @biz84!
Happy coding!
Found this useful? Show some love and share the original tweet 🙏
Previous | Next |
---|---|
How to Add a Custom Test Timeout in Flutter | Riverpod tip for less boilerplate (Passing Ref) |