Skip to content

Enable custom "flutter create" templates #77104

@Hixie

Description

@Hixie

It would be interesting to enable the creation of custom templates usable with flutter create, which don't require that the templates be actually in our repo. For example, if Rive wanted to create a template that showed off how to use Rive animations in Flutter, they could do so without having to land code in the flutter/flutter repo. (VGV have done something similar: https://verygood.ventures/blog/flutter-starter-app-very-good-core-cli)

Should we enable anyone to create a template, or should we have an allowlist? There's a risk of people tricking people into running hostile code if we allow anyone to host templates. We could have two tiers, one for template sets whose creators we trust, and one which gets a big warning.

How do we identify templates? We could do it by URL, or by some well-established pattern e.g. domain:path, like example.com:demoapp which expands to example.com/.flutter-templates/demoapp.zip or some such.

How do we host templates? zip files?

How do we avoid having to include redundant files? e.g. it'd be nice if most templates could be just lib/main.dart and pubspec.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamwould require significant investmentA PR would not be accepted without a plan for ongoing support

    Type

    No type

    Projects

    Status

    Planned Q3

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions