-
Notifications
You must be signed in to change notification settings - Fork 568
Sharing guide
John Ryan edited this page Feb 18, 2025
·
5 revisions
DartPad uses GitHub gists to publicly share your creations.
DartPad looks for a file named main.dart
within your gist.
To share your code with others:
- Create a gist with a
main.dart
file. - Direct DartPad to the gist ID, without any username specified. For example, to view gist.github.com/5c0e154dd50af4a9ac856908061291bc in DartPad, use the URL dartpad.dev/?id=5c0e154dd50af4a9ac856908061291bc.
Some example gists:
- gist.github.com/4a68e553746602d851ab3da6aeafc3dd
- gist.github.com/a1d5666d6b54a45eb170b897895cf757
Query parameters
-
id
- the Gist ID to load - sample - alias for
id
- sample_id - alias for
id
- channel - the Flutter SDK channel to use (
stable
,beta
, ormain
) - embed - whether to use the embedded layout (
true
orfalse
) - run - whether to run the snippet automatically (
true
orfalse
)
Happy sharing!
DartPad previously supported sharing and updating Gists directly within the DartPad UI. This is no longer supported. To provide feedback on or support for a potential replacement, check out https://github.com/dart-lang/dart-pad/issues/2733.