feat: Add support for dynamic Flutter build arguments #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces a major enhancement by adding support for dynamic
flutter build windowsarguments. Users can now pass arguments like--obfuscate,--split-debug-info, and--dart-definedirectly through theinno_buildcommand line.This resolves the limitation of the previous implementation, which only supported
--debugand--releaseflags, and enables users to leverage the full power of Flutter's build capabilities for professional production builds.Outline of the changes
FlutterBuilderRefactored: TheFlutterBuilderservice is no longer limited to a few fixed parameters. It now accepts aMap<String, dynamic>of arguments, which it dynamically appends to theflutter buildcommand.InnoBuildclass now intelligently collects all Flutter-related arguments passed to the CLI and forwards them to theFlutterBuilder._flutterBuildOptions, has been added to make it trivial to add support for new Flutter arguments in the future without changing the core logic.ArgParserhas been updated to officially support:--obfuscate--split-debug-info=<path>--dart-define=<key=value>(can be used multiple times)--target=<path>How to use
After these changes, users can build their applications with advanced options:
Example 1: Build with obfuscation
This contribution significantly increases the utility and professionalism of the package.