mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This converts existing ## Sample code samples to {@tool sample}...{@end-tool} form. Also: 1. Fixed a minor bug in analyze-sample-code.dart 2. Made the snippet tool only insert descriptions if the description is non-empty. 3. Moved the Card diagram to before the code sample.
17 lines
623 B
HTML
17 lines
623 B
HTML
{@inject-html}
|
|
<div class="snippet-buttons">
|
|
<button id="shortSnippetButton" selected>Sample</button>
|
|
</div>
|
|
<div class="snippet-container">
|
|
<div class="snippet">{{description}}
|
|
<div class="copyable-container">
|
|
<button class="copy-button-overlay copy-button" title="Copy to clipboard"
|
|
onclick="copyTextToClipboard(findSiblingWithId(this, 'sample-code'));">
|
|
<i class="material-icons copy-image">assignment</i>
|
|
</button>
|
|
<pre class="language-{{language}}" id="sample-code"><code class="language-{{language}}">{{code}}</code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{@end-inject-html}
|