Last updated:
0 purchases
flutter platform versioning
Flutter Platform Versioning #
2023 © Bikramaditya Meher
Flutter Platform Versioning is a command-line tool to set different versions for different platforms in a Flutter project.
Installation #
Add the following to your pubspec.yaml file under dev_dependencies:
dev_dependencies:
flutter_platform_versioning: ^1.0.0
copied to clipboard
Then run:
flutter pub get
copied to clipboard
Usage #
To use Flutter Platform Versioning, run the following command in the root of your Flutter project:
flutter pub run flutter_platform_versioning:fpv
copied to clipboard
This will display the help and available options.
Options #
--init: Initialize Flutter Platform Versioning (creates if not there flutter_platform_versioning.yaml).
--update: Update all platform versions.
--remove: Remove Flutter Platform Versioning (deletes flutter_platform_versioning.yaml) and replace with pubspec.yaml version.
--all: Set version for all platforms.
-p, --path: Specify the path for the config file.
-a, --android: Set the Flutter Android version.
-i, --ios: Set the Flutter iOS version.
-m, --macos: Set the Flutter macOS version.
-w, --windows: Set the Flutter Windows version.
-h, --help: Prints out available command usages.
Examples #
Initialize Flutter Platform Versioning:
flutter pub run flutter_platform_versioning:fpv --init
copied to clipboard
Update all platform versions:
flutter pub run flutter_platform_versioning:fpv --update
copied to clipboard
Remove Flutter Platform Versioning and replace with pubspec.yaml version:
flutter pub run flutter_platform_versioning:fpv --remove
copied to clipboard
Set version for all platforms:
flutter pub run flutter_platform_versioning:fpv --all 2.0.0+1
copied to clipboard
Set version for a specific platform "Android" :
flutter pub run flutter_platform_versioning:fpv -a 2.0.0+1
copied to clipboard
Contributing #
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.