Document flavor-specific web resources

Đang mở Phù hợp với người mới
#14,165 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Bắt đầu với hướng dẫn web hiện có trên docs.flutter.dev và tài liệu Flutter CLI cho flutter run và flutter build web; issue không nêu tệp cụ thể. Giải thích cấu trúc web/flavors/<flavor>/, cách các tệp dành riêng cho flavor ghi đè tài nguyên dùng chung và cách tài nguyên dự phòng về web/. Hoàn tất khi hướng dẫn bao gồm cả hai lệnh ví dụ cùng hành vi ghi đè và dự phòng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Dart
Star
3.1k
Fork
3.5k
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
88

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flutter/website

Tất cả issue của flutter/website

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.