Making it easier to generate all flutter builds.
This script automates Flutter project builds with flavor and type options. It allows you to customize the number of flavors, flavor names, entry points, and build types.
- Flutter installed and configured.
- Bash shell environment.
fig run flutter-release-builds
demo.mp4
--use-defaults
: Use default values.--no-flavor
: Build without flavors.
- Default:
./release_builds.sh
- For zsh:
sh release_builds.sh
- The script allows you to customize the number of flavors, flavor names, entry points, and build types.
- Use --use-defaults for quick builds with default values.
- Use --no-flavor if you don't want to use flavors. In this case, the script will prompt you to select build types directly.
- The script creates timestamped build directories in the /builds folder.
- Open the latest build directory automatically using open builds/$current_date_time.
This script helps you clean up your Flutter project by removing assets that are no longer referenced in your code.
-
Run the script:
sh remove_unused_assets.sh
-
Enter the location of the assets folder when prompted.
-
The script will search for unused assets in the specified folder and its subdirectories.
-
Unused assets will be deleted.
fig run flutter-remove-unused-assets
-
Make sure to backup your project before running this script.
-
This script assumes your Flutter project is structured with a
lib
folder containing your source code. -
The script checks for references to each asset in the
lib
folder and its subdirectories.
# Enter the location of the assets folder
Enter the location of the assets folder: assets
# Output
Searching for unused assets in assets...
No references found for assets/image.png. Deleting...
No references found for assets/icon.svg. Deleting...
Finished cleaning unused assets.