You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Googlers with too much time on their hands, read the long version of the motivation at go/dash-sample-code
Motivations
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.
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.
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.
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
compass_app - migrate to flutter website repository
ios-app-clip - migrate to website to accompany existing docs, create ticket to ensure the documentation page sufficient (or deprecate if the sample doesn't add anything)
add-to-app - There should only be one add-to-app quickstarts that demos the recommended way to add Flutter to an ios or android app. More explanation in ticket.
Experimental directory - deprecate all. The samples repo should represent the SDK right now. Samples demoing future features should remain as PRs until the sample passes CI on the stable channel
provider_counter and provider_shopper - 3P libraries shouldn't be documented here unless they're filling a gap in the Flutter SDK and not sufficiently documented elsewhere
Veggie seasons - deprecate in favor of wondrous, date_planner, etc. This was written to have a demo app in the Apple app store, but it hasn't been in the app store for a long time.
Adds a README as a breadcrumb with the history of the sample as well as links to some relevant resources.
Part of dart-lang/sdk#56835
Contributes to #2409
ericwindmill
changed the title
Samples audit - Increase overall quality and maintainability of the samples repo.
☂️ Migrate samples to 'quickstart' format, update and deprecate samples as necessary
Nov 26, 2024
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:
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
Proposed updates
The following are all the changes I plan on making.
Changes to existing samples
Samples to add
Samples to deprecate
TBD
Repo improvements, etc
The text was updated successfully, but these errors were encountered: