Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Flavor-Based Assets Support to Spider Package for Flutter #79

Open
mg3994 opened this issue May 1, 2024 · 0 comments
Open

Add Flavor-Based Assets Support to Spider Package for Flutter #79

mg3994 opened this issue May 1, 2024 · 0 comments

Comments

@mg3994
Copy link

mg3994 commented May 1, 2024

I would like to propose an enhancement to the Spider package for Flutter, introducing support for flavor-based assets. Currently, Flutter supports flavoring, allowing developers to build different versions of their app with variations in configurations, such as API endpoints, app icons, and more. However, there's a lack of direct support in Spider for managing assets based on these flavors.

Proposal:
Integrate functionality into Spider to enable developers to specify assets based on different flavors defined in their Flutter projects.

Use Case:
Consider a scenario where an app offers both a free and premium version. Each version may have its own set of assets, such as images, fonts, or configuration files. With flavor-based assets support in Spider, developers could organize their assets more efficiently, making it easier to manage and build multiple versions of their app.

Example:

# Reference :- https://docs.flutter.dev/deployment/flavors
assets:
    - assets/common/
    - path: assets/free/
      flavors:
        - free
    - path: assets/premium/
      flavors:
        - premium

In this example, assets are categorized based on the free and premium flavors. When building the app for each flavor, Spider would automatically include the respective assets, streamlining the development process.

Benefits:

Simplifies asset management for flavor-specific builds.
Enhances code organization and maintainability.
Enables smoother development workflows for apps with multiple flavors.
Implementation Details:

Introduce a mechanism in Spider to parse flavor-specific asset configurations from the pubspec.yaml file.
Modify Spider's asset handling logic to include assets based on the active flavor during the build process.
I believe this enhancement would be valuable for Flutter developers utilizing Spider, providing greater flexibility and efficiency in managing assets across different app flavors.

Thank you for considering this feature request. I'm open to discussing further details and collaborating on its implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant