Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 1 | {@inject-html} |
Greg Spencer | 67ee3e1 | 2019-07-10 16:48:20 -0700 | [diff] [blame] | 2 | <a name="{{id}}"></a> |
| 3 | <div class="anchor-container"> |
| 4 | <a class="anchor-button-overlay anchor-button" title="Copy link to clipboard" |
| 5 | onmouseenter="fixHref(this, '{{id}}');" |
| 6 | onclick="fixHref(this, '{{id}}'); copyStringToClipboard(this.href);" |
| 7 | href="#"> |
| 8 | <i class="material-icons copy-image">link</i> |
| 9 | </a> |
| 10 | </div> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 11 | <div class="snippet-buttons"> |
Greg Spencer | 262f12b | 2019-02-15 07:48:49 -0800 | [diff] [blame] | 12 | <script>var visibleSnippet{{serial}} = "shortSnippet{{serial}}";</script> |
| 13 | <button id="shortSnippet{{serial}}Button" |
| 14 | onclick="visibleSnippet{{serial}} = showSnippet('shortSnippet{{serial}}', visibleSnippet{{serial}});" |
| 15 | selected>Sample</button> |
| 16 | <button id="longSnippet{{serial}}Button" |
| 17 | onclick="visibleSnippet{{serial}} = showSnippet('longSnippet{{serial}}', visibleSnippet{{serial}});">Sample in an App</button> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 18 | </div> |
| 19 | <div class="snippet-container"> |
Greg Spencer | 262f12b | 2019-02-15 07:48:49 -0800 | [diff] [blame] | 20 | <div class="snippet" id="shortSnippet{{serial}}"> |
Greg Spencer | a6e9011 | 2018-11-07 20:35:10 -0800 | [diff] [blame] | 21 | {{description}} |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 22 | <div class="copyable-container"> |
| 23 | <button class="copy-button-overlay copy-button" title="Copy to clipboard" |
Greg Spencer | 262f12b | 2019-02-15 07:48:49 -0800 | [diff] [blame] | 24 | onclick="copyTextToClipboard(visibleSnippet{{serial}});"> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 25 | <i class="material-icons copy-image">assignment</i> |
| 26 | </button> |
Greg Spencer | 094f93d | 2018-11-07 08:29:14 -0800 | [diff] [blame] | 27 | <pre class="language-{{language}}"><code class="language-{{language}}">{{code}}</code></pre> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 28 | </div> |
| 29 | </div> |
Greg Spencer | 262f12b | 2019-02-15 07:48:49 -0800 | [diff] [blame] | 30 | <div class="snippet" id="longSnippet{{serial}}" hidden> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 31 | <div class="snippet-description">To create a sample project with this code snippet, run:<br/> |
Greg Spencer | f9c6f30 | 2018-10-30 16:01:14 -0700 | [diff] [blame] | 32 | <span class="snippet-create-command">flutter create --sample={{id}} mysample</span> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 33 | </div> |
| 34 | <div class="copyable-container"> |
| 35 | <button class="copy-button-overlay copy-button" title="Copy to clipboard" |
Greg Spencer | 262f12b | 2019-02-15 07:48:49 -0800 | [diff] [blame] | 36 | onclick="copyTextToClipboard(visibleSnippet{{serial}});"> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 37 | <i class="material-icons copy-image">assignment</i> |
| 38 | </button> |
Greg Spencer | 094f93d | 2018-11-07 08:29:14 -0800 | [diff] [blame] | 39 | <pre class="language-{{language}}"><code class="language-{{language}}">{{app}}</code></pre> |
Greg Spencer | 65d3ddd | 2018-10-23 13:50:24 -0700 | [diff] [blame] | 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | {@end-inject-html} |