Mason Hooks Flutter
This package contains a collection of post-gen and pre-gen hooks that can be used with the Mason CLI to generate Flutter projects.
Pre Gen Hooks
- get_app_name: Get the app name from the pubspec.yaml and add it to the HookContext
Post Gen Hooks
- add_android_manifest_permissions: Add permissions to the AndroidManifest.xml
- add_android_compile_options: Add compile options to the build.gradle
- add_android_default_config: Add default config to the build.gradle
- add_dependencies: Add dependencies and dev_dependencies to the pubspec.yaml
- add_import_statements: Add import statements a specific file
- add_ios_info_plist_keys: Add keys to the Info.plist
- add_main_dart_code: Add code to the main.dart
- add_podfile_code: Add code to the Podfile
- add_podfile_runner_code: Add code to the Podfile for the runner target
- add_web_index_body: Add code to the index.html body
- add_web_index_head: Add code to the index.html head
- set_android_min_sdk_version: Set the minSdkVersion in the AndroidManifest.xml
- set_android_compile_sdk_version: Set the minCompileSdkVersion in the AndroidManifest.xml
- set_android_target_sdk_version: Set the targetSdkVersion in the AndroidManifest.xml
- format_code: Format the code in a specific file
- replace_code_between_tags: Replace code between tags in a specific file
- alphabetize_pubspec: Alphabetize the dependencies and dev_dependencies in the pubspec.yaml