Skip to content

☂️ Migrate samples to 'quickstart' format, update and deprecate samples as necessary #2409

Open
@ericwindmill

Description

@ericwindmill

In order to reduce maintenance costs and improve DX of this repo, I plan on updating and/or deprecating a majority of the samples.

After the changes, samples will fall into two categories:

  • quickstarts - the minimum required code needed to demo a specific feature or API.
  • demo apps - apps that are explicitly meant to demo Flutter, not a feature.

For more info on sample types, read the contributing docs.

For Googlers with too much time on their hands, read the long version of the motivation at go/dash-sample-code

Motivations

  1. Samples are only useful if they don't require explanation. Far too many of our samples cover topics that are too complex to be useful as samples on their own (i.e. add_to_app samples). Flutter developers would be better off if complex topics were accompanied by explainer text, as in cookbook recipes or codelabs or reference documentation.
  2. Multi-feature demo apps don't make good samples. Again, far too many of of samples are overly complex, but because we've designed them that way. For example, the deep-linking sample is an entire app that happens to demo deep linking. It should be reduced to it's absolutely necessary parts. Feature-rich apps should have a reason to be feature-rich. For example, the forth-coming date_planner app, which is explicitly being written to be a full demo app.
  3. The samples repo isn't very useful. In the week prior to 11/27, the most visited sample (compass_app) had >1000 unique visitors. In the same week, the accompanying docs had >10k unique visitors. The sample with the most views in the last week that doesn't have accompanying docs was visited a few hundred times.
  4. AI is coming. In the the not-too-distant future, samples will be irrelevant. Now is a great time to start slowly migrating toward a world without samples and preparing our developers for that future.

Proposed updates

The following are all the changes I plan on making.

Changes to existing samples

Samples to add

Samples to deprecate

TBD

  • simplistic_editor - important, but way complex. idk

Repo improvements, etc

Metadata

Metadata

Assignees

Labels

p1proposalPropose a new sample or change to the directorytech-debt

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions