Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds DartPad option to the DartDoc snippet generator. (#39924)
- Loading branch information
1 parent
440a911
commit 6919777
Showing
9 changed files
with
129 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{@inject-html} | ||
<a name="{{id}}"></a> | ||
<div class="anchor-container"> | ||
<a class="anchor-button-overlay anchor-button" title="Copy link to clipboard" | ||
onmouseenter="fixHref(this, '{{id}}');" | ||
onclick="fixHref(this, '{{id}}'); copyStringToClipboard(this.href);" | ||
href="#"> | ||
<i class="material-icons copy-image">link</i> | ||
</a> | ||
</div> | ||
<div class="snippet-buttons"> | ||
<script>var visibleSnippet{{serial}} = "longSnippet{{serial}}";</script> | ||
<button id="longSnippet{{serial}}Button" | ||
onclick="visibleSnippet{{serial}} = showSnippet('longSnippet{{serial}}', visibleSnippet{{serial}});" | ||
selected> | ||
Interactive App | ||
</button> | ||
<button id="shortSnippet{{serial}}Button" | ||
onclick="visibleSnippet{{serial}} = showSnippet('shortSnippet{{serial}}', visibleSnippet{{serial}});"> | ||
Sample code | ||
</button> | ||
</div> | ||
<div class="snippet-container"> | ||
<div class="snippet" id="longSnippet{{serial}}"> | ||
<iframe class="snippet-dartpad" src="https://dartpad.dev/embed-flutter.html?split=60&run=true&sample_id={{id}}"></iframe> | ||
</div> | ||
<div class="snippet" id="shortSnippet{{serial}}" hidden> | ||
{{description}} | ||
<div class="copyable-container"> | ||
<button class="copy-button-overlay copy-button" title="Copy to clipboard" | ||
onclick="copyTextToClipboard(visibleSnippet{{serial}});"> | ||
<i class="material-icons copy-image">assignment</i> | ||
</button> | ||
<pre class="language-{{language}}"><code class="language-{{language}}">{{code}}</code></pre> | ||
</div> | ||
</div> | ||
</div> | ||
{@end-inject-html} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters