Allow users to create samples using flutter create. (#23584)

This adds flutter create --sample which allows users to execute a command which will create a working sample app from samples embedded in the API docs.

The command looks something like this:

flutter create --sample=chip.DeletableChipAttributes.onDeleted mysample
This commit is contained in:
Greg Spencer
2018-10-30 16:01:14 -07:00
committed by GitHub
parent 4559ae1a6b
commit f9c6f30576
4 changed files with 214 additions and 28 deletions

View File

@@ -20,7 +20,7 @@
</div>
<div class="snippet" id="longSnippet" hidden>
<div class="snippet-description">To create a sample project with this code snippet, run:<br/>
<span class="snippet-create-command">flutter create --snippet={{id}} mysample</span>
<span class="snippet-create-command">flutter create --sample={{id}} mysample</span>
</div>
<div class="copyable-container">
<button class="copy-button-overlay copy-button" title="Copy to clipboard"