Document flavor-specific web resources

Open Beginner friendly
#14,165 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
dart, flutter
Domain
cli, documentation

Research direction

Start with the existing web guide on docs.flutter.dev and the Flutter CLI documentation for flutter run and flutter build web; the issue does not name specific files. Explain the web/flavors/<flavor>/ structure, how flavor-specific files override shared resources, and how resources fall back to web/. Done when the guide covers both example commands and the override and fallback behavior.

Written by the indexing model from the issue text.

Description

act.await-dev-pr co.request d.new-feature dev.flavors e1-hours p2-medium st.blocked t.cli-tools target.web
Related code pull request or issue

https://github.com/flutter/flutter/pull/197545

Feature summary

The proposed support for flavor-specific web resources introduces a new directory convention for customizing web resources using the existing --flavor argument.

If accepted, the documentation should cover the web/flavors/<flavor>/ directory structure, resource overrides and fallback behavior, and usage with flutter run and flutter build web.

Type of documentation needed
  • New conceptual page or guide
  • Update to an existing guide on docs.flutter.dev
  • Cookbook recipe or practical code sample
  • CLI or tooling documentation
  • Platform support or integration guide
  • Breaking change migration guide
Code snippet or usage example

Example directory structure:

web/
  index.html
  manifest.json
  icons/
  flavors/
    staging/
      index.html
      manifest.json
    production/
      manifest.json

Running or building with a specific flavor:

flutter run -d chrome --flavor staging
flutter build web --flavor production

Files under web/flavors/<flavor>/ override files at the corresponding paths in web/. Resources without a flavor-specific override fall back to the shared directory.

Additional context or resources
  • Related feature request: flutter/flutter#141371.
  • Additional design details: flutter/rfc#49.
Dominant language
Dart
Stars
3.1k
Forks
3.5k
Avg merge
2d 10h
Merged PRs (30d)
88

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flutter/website

All issues in flutter/website

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.