{"id":45066714,"url":"https://github.com/heyteacher/flutter_heyteacher_meta","last_synced_at":"2026-03-06T13:08:23.781Z","repository":{"id":338787710,"uuid":"1087573914","full_name":"heyteacher/flutter_heyteacher_meta","owner":"heyteacher","description":"A Flutter meta project implementing utilities and best practices for Flutter package and app project avoiding Copy \u0026 Paste pattern","archived":false,"fork":false,"pushed_at":"2026-03-04T08:01:43.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T13:57:33.417Z","etag":null,"topics":["dart","fastlane","firebase","firestore","flutter","git","playstore-app"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_heyteacher_meta","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heyteacher.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-01T07:26:18.000Z","updated_at":"2026-03-04T08:02:10.000Z","dependencies_parsed_at":"2026-03-04T10:00:25.215Z","dependency_job_id":null,"html_url":"https://github.com/heyteacher/flutter_heyteacher_meta","commit_stats":null,"previous_names":["heyteacher/flutter_heyteacher_meta"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/heyteacher/flutter_heyteacher_meta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyteacher%2Fflutter_heyteacher_meta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyteacher%2Fflutter_heyteacher_meta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyteacher%2Fflutter_heyteacher_meta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyteacher%2Fflutter_heyteacher_meta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heyteacher","download_url":"https://codeload.github.com/heyteacher/flutter_heyteacher_meta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyteacher%2Fflutter_heyteacher_meta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30175905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T11:48:51.886Z","status":"ssl_error","status_checked_at":"2026-03-06T11:48:51.460Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","fastlane","firebase","firestore","flutter","git","playstore-app"],"created_at":"2026-02-19T11:00:47.171Z","updated_at":"2026-03-06T13:08:23.735Z","avatar_url":"https://github.com/heyteacher.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Heyteacher Meta\n\nA Flutter meta project implementing utilities and best practices for Flutter `package` and `app` project avoiding `Copy \u0026 Paste` pattern.\n\n- environment setup instructions for `app` and `package` projects and `Firebase` setup `app` projects\n- `git` utilities for manage versions and releases\n- release app in `Google Play` and `Firebase App Distribution`\n- integration test and `Firebase Test Lab` utilities\n- backup and restore `Firestore` utilities\n- `localization` setup instructions\n- documentation utilities\n- `Launcher Icon`, `Splash`, `dart builder`, `ffmpeg`, `webcrypto` utilities\n\n## Table of Contents\n\n- [Flutter Heyteacher Meta](#flutter-heyteacher-meta)\n  - [Table of Contents](#table-of-contents)\n  - [Installing](#installing)\n  - [Credits](#credits)\n  - [Requirements](#requirements)\n  - [Environment Setup](#environment-setup)\n    - [Flutter](#flutter)\n    - [Visual Studio Code](#visual-studio-code)\n    - [Android Studio](#android-studio)\n    - [`auto-changelog`](#auto-changelog)\n    - [`FastLane`](#fastlane)\n    - [`nodeJs`](#nodejs)\n    - [Firebase CLI](#firebase-cli)\n  - [Create a flutter project](#create-a-flutter-project)\n    - [Configure `FastLane`](#configure-fastlane)\n  - [`Fastlane` lines for `app` and `package` projects](#fastlane-lines-for-app-and-package-projects)\n    - [doc](#doc)\n    - [docweb](#docweb)\n    - [test](#test)\n    - [checkout](#checkout)\n    - [release](#release)\n    - [github\\_release](#github_release)\n    - [bump](#bump)\n  - [`Fastlane` lines for `app` projects](#fastlane-lines-for-app-projects)\n    - [appbundle](#appbundle)\n    - [integration\\_test](#integration_test)\n    - [testlab](#testlab)\n    - [firestore\\_backup](#firestore_backup)\n    - [firestore\\_restore](#firestore_restore)\n    - [firestore\\_remove\\_backup](#firestore_remove_backup)\n    - [app\\_distribution](#app_distribution)\n    - [playstore](#playstore)\n    - [playstore\\_promote](#playstore_promote)\n    - [buildweb](#buildweb)\n    - [deployweb](#deployweb)\n  - [`git` utilities](#git-utilities)\n    - [`git` conventional commit](#git-conventional-commit)\n    - [avoid commit on `main` branch](#avoid-commit-on-main-branch)\n    - [example: release a patch](#example-release-a-patch)\n  - [`Firebase` setup for `app` flutter project](#firebase-setup-for-app-flutter-project)\n  - [Release app](#release-app)\n    - [Sign app](#sign-app)\n    - [Firebase App Distribution](#firebase-app-distribution)\n    - [Google Play](#google-play)\n  - [Integration Test](#integration-test)\n    - [Firebase Test Lab](#firebase-test-lab)\n  - [`Firestore` backup, restore and Point-in-time recovery](#firestore-backup-restore-and-point-in-time-recovery)\n    - [install `gcloud`](#install-gcloud)\n    - [Restore a Point-in-time Recovery (PITR)](#restore-a-point-in-time-recovery-pitr)\n    - [Backup and Restore database](#backup-and-restore-database)\n  - [Firebase Hosting](#firebase-hosting)\n    - [Deploy default `site`](#deploy-default-site)\n    - [Alternative sites](#alternative-sites)\n  - [`localization` setup](#localization-setup)\n  - [documentation utilities](#documentation-utilities)\n  - [Launcher Icon](#launcher-icon)\n  - [Splash](#splash)\n  - [Dart Builders](#dart-builders)\n  - [`ffmpeg` utilities](#ffmpeg-utilities)\n  - [command-line utility `version`](#command-line-utility-version)\n  - [`webcrypto` setup for tests](#webcrypto-setup-for-tests)\n  \n## Installing\n\n- setup environment following instruction [Environment Setup](#environment-setup)\n\n- install `flutter_heyteacher_meta` as dev package into your `app` or `package` project:\n  \n  ```bash\n  flutter pub add dev:flutter_heyteacher_meta\n  ```\n\n  or add to your `pubspec.yaml`\n\n  ```yaml\n  dev_dependencies:\n    flutter_heyteacher_meta: \n  ```\n\n- follow instuctions in [Configure `FastLane`](#configure-fastlane) in order to configure a `app` or `package` project.\n\n- test all works fine, running `fl` will show command avaiable\n\n## Credits\n\n- [yaml_edit](https://pub.dev/packages/yaml_edit): A library for YAML manipulation while preserving comments\n\n- [very_good_analysis](https://pub.dev/packages/very_good_analysis): This package provides lint rules for Dart and Flutter which are used at `Very Good Ventures`\n\n- [auto-changelog](https://github.com/cookpete/auto-changelog): Command line tool for generating a changelog from git tags and commit history\n\n- [vscode-markdownlint](http://github.com/DavidAnson/vscode-markdownlint): Markdown/CommonMark linting and style checking for Visual Studio Code\n\n- [vscode-markdown](https://github.com/yzhang-gh/vscode-markdown): All you need for Markdown (keyboard shortcuts, table of contents, auto preview and more).\n\n## Requirements\n\n- a shell terminal on `Linux`, `MacOS` or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on `Windows`\n\n- `git` 1.7.2 or later\n\n- a `GitHub` account\n\n- `gh` 2.46.0 or later (GitHub CLI)\n\n- other software and utilities as described in [Environment Setup](#environment-setup)\n\n## Environment Setup\n\nInstructions for setup environment installing all software needed to develop a `Flutter` project.\n\n### Flutter\n\ninstall flutter manually following instructions \u003chttps://docs.flutter.dev/install/quick#install\u003e\n\n- setup your `~/.bashrc` with this env variables\n\n  ```bash\n  # flutter\n  export PATH=/usr/local/flutter/bin:$PATH\n\n  # dart \n  export PATH=\"$HOME/.pub-cache/bin\":$PATH\n\n  # flutter_heyteacher_meta scripts\n  latest_meta_version=`ls $HOME/.pub-cache/hosted/pub.dev | grep flutter_heyteacher_meta |  tail -n 1`\n  project_meta_root=\"$HOME/.pub-cache/hosted/pub.dev/$latest_meta_version\"\n  export PATH=\"$project_meta_root/scripts\":$PATH\n  ```\n\n### Visual Studio Code\n\ninstall `Visual Studio Code` 1.77 or later with the `Flutter extension for VS Code`\n\nYou can configure you `vscode` to execute the [command-line utility `version`](#command-line-utility-version) in order to automatically update build version every run/debug execution of your code:\n\n- install `flutter_heyteacher_meta` package as dev dependency ad described in [Installing](#installing)\n\n- create/modify `.vscode/tasks.json` in the root of your project\n  \n  ```json\n  {\n        \"version\": \"2.0.0\",\n        \"tasks\": [\n                {\n                        \"type\": \"dart\",\n                        \"command\": \"dart\",\n                        \"args\": [\n                                \"run\",\n                                \"flutter_heyteacher_meta:version\",\n                                \"build\"\n                        ],\n                        \"group\": \"build\",\n                        \"problemMatcher\": [],\n                        \"label\": \"dart: run flutter_heyteacher_meta:version build\",\n                        \"detail\": \"increment version build number\",\n                        \"presentation\": {\n                                \"close\": true,\n                                \"echo\": false,\n                                \"reveal\": \"silent\",\n                                \"focus\": false,\n                                \"panel\": \"shared\",\n                                \"showReuseMessage\": false,\n                                \"clear\": false\n                        }\n                }\n        ]\n  }\n  ```\n\n- add `preLaunchTask` in your launch configurations '.vscode/launch.json'\n  \n  ```json\n  ...\n    \n    \"preLaunchTask\": \"dart: run flutter_heyteacher_meta:version build\"\n  ```\n\n### Android Studio\n\n- install  `Android Studio`\n\n- setup your `~/.bashrc` with this env variables and alias\n\n  ```bash\n  #android studio\n  export ANDROID_HOME=\"$HOME/Android/Sdk/\"\n  export PATH=\"${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/\"\n  export PATH=/usr/local/android-studio/jbr/bin/:$PATH\n  ```\n\n### `auto-changelog`\n\n[auto-changelog](https://github.com/cookpete/auto-changelog) is an utility which generate `CHANGELOG.md` automatically based\non `commits`, `pull requests` and `tags`.\n\n- install `npm` as described in [`nodeJs`](#nodejs)\n\n- install `auto-changelog`\n\n  ```bash\n  npm install -g auto-changelog\n  ```\n\n- test the command\n\n  ```bash\n  auto-changelog\n  ```\n\n### `FastLane`\n\n- install rbenv, ruby and bundler\n\n  ```bash\n  brew install rbenv\n  rbenv init\n  rbenv install -l\n  rbenv install 3.4.3\n  rbenv local 3.4.3\n  gem install bundler\n  ```\n\n- create Genfile in project root containing:\n\n  ```bash\n  source \"https://rubygems.org\"\n  gem \"fastlane\"\n  ```\n\n- install fastlane via bundle\n\n  ```bash\n  bundle update\n  ```\n\n- setup your `~/.bash_aliases` with this fl alias\n\n  ```bash\n  # alias for fastlane inside flutter projects\n  alias fl='fl.sh'\n  ```\n\n  `fl` is an alias of `fl.sh` command.\n\n```bash\n#!/bin/bash\n#\n# Run FastLane Lanes.\n#\n# Executed without paramenter show lanes available and documentation \nif [[ -z ${@} ]] \nthen\n    # show lanes avalilable and documentation\n    bundle exec fastlane lanes\nelse\n    # run lane \n    bundle exec fastlane $@\nfi  \n```\n\nthe execution `fl` in root project directory without paramenter show all `lanes` configured and how to use them.\n\n### `nodeJs`\n\n- install `nodeJs`\n  \n  ```bash\n  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\n  nvm install 22\n  ```\n\n### Firebase CLI\n\n- install `firebase-tools`\n\n  ```bash\n  npm install -g firebase-tools\n  ```\n\n## Create a flutter project\n\n- flutter app project:\n\n  ```bash\n  flutter create \u003capp project name\u003e\n  ```\n\n- flutter package projects:\n\n  ```bash\n  flutter create -t package \u003capp project name\u003e\n  ```\n\n### Configure `FastLane`\n\nAfter setup the environment run from root project directory and create the project:\n\n- for flutter packages:\n\n  ```bash\n  configure_flutter_package.sh\n  ```\n\n- for flutter app\n  \n  ```bash\n  configure_flutter_app.sh\n  ```\n  \n  This scripts create a skeleton of `fastlane/metadata` mandatory for release\n  application in `Google Play`. So, before release the application you need to:\n  \n  - edit `fastlane/metadata/android/en-US/title.txt`\n  \n  - edit `fastlane/metadata/android/en-US/short_description.txt`\n  \n  - edit `fastlane/metadata/android/en-US/full_description.txt`\n  \n  - edit `fastlane/metadata/android/en-US/video.txt`\n  \n  - edit `fastlane/metadata/android/en-US/changelogs/default.txt`\n  \n  - edit `fastlane/metadata/android/en-US/images/icon.png`\n  \n  - edit `fastlane/metadata/android/en-US/images/featureGraphic.png`\n  \n  - add screenshots to `fastlane/metadata/android/en-US/images/phoneScreenshots`\n\n  For utilize `Firebase Firestore` backup and restore utilities, edit\n  `./fastlane/Fastfile` uncommenting and setup these environment variable:\n\n  - `google_storage_backup_bucket` the Google Storage backup bucket name\n\n  For utilize `Firebase App Distribution`, edit\n  `./fastlane/Fastfile` uncommenting and setup these environment variable:\n\n  - `firebase_app_distribution_service_credentials_file` the `Firebase App Distribution` service credentials file name\n\n## `Fastlane` lines for `app` and `package` projects\n\nCommon `Fastlane` lines are provided to `app` and `package` projects. In details:\n\n- generate dart documentation\n- checkout and release on `github`\n- run unit test\n\n### doc\n\n```bash\nfl doc\n```\n\nGenerate the `dart` documentation and run webserver on `http://localhost:8080`\n\n### docweb\n\n```bash\nfl docweb\n```\n\nRuns local webserver on `http://localhost:8080`  with `dart` documentation\n\n### test\n\n```bash\nfl test\n```\n\nRun unit tests of the project.\n\n### checkout\n\n```bash\nfl checkout\n```\n\nCheckout the latest remote branch already created remotely (i.e. in `github project` ).\n\nRuns `git fetch` and `git checkout` to the latest branch fetched.\n\n### release\n\n```bash\nfl release semver:major|minor|patch [suffix:\u003cnmenonic_tag_suffix\u003e] [merge:true|false] [github:false|true]\n```\n\nRelease to `main` branch after you commit and push your changes into your branch.\n\n- `semver`: increments the version into `pubspec.yaml` following [Semantic Versioning](https://semver.org/), for example:\n  - `major`: move version from `1.0.0` to `2.0.0`\n  - `minor`: move version from `1.0.0` to `1.1.0`\n  - `patch`: move version from `1.0.0` to `1.0.1`\n- `suffix`: (optional) add a mnemonic suffix to git `tag` greated\n- `merge`: (optional, default `true`) make the marge to `main` branch\n- `github`: (optional, default `false`) create the github release\nand update the `CHANGELOG.md`\n\nThese command make several tasks:\n\n- increments the version into `pubspec.yaml`\n- create a `github release` and update `CHANGELOG.md` (if `github` param is `true)  \n- create a `pull request` and merge changes into `main` branch\n- checkout the `main` branch\n- delete the branch merged (if `merge` param is `true)  \n- create a git `tag`\n\n### github_release\n\n```bash\nfl github_release\n```\n\nCreate a `github release` and update `CHANGELOG.md`\n\n### bump\n\n```bash\nfl bump\n```\n\nCommits `pubspec.lock` and `pubspec.yaml`  without generate a new version and without create a new release.\n\nCreates a `github` release and update `CHANGELOG.md`\n\n## `Fastlane` lines for `app` projects\n\nSpecific `Fastlane` lines are provided for `app`  projects. In details:\n\n- build `AAB`\n- run integration test locally or on `Firebase Test Lab`\n- backup and restore `Firestore` dababase\n- release application in `Google Play` and `Firebase App Distribution`\n- build and release web application in `Firebase Hosting`\n\n### appbundle\n\n```bash\nfl appbundle\n```\n\nClean and build the application.\n\nWhen completed, the `AAB` is generate into `build/app/outputs/bundle/release/app-release.aab`.\n\n### integration_test\n\n```bash\nfl integration_test\n```\n\nRun integration tests of app project.\n\n### testlab\n\n```bash\nfl testlab\n```\n\nRun integration test of app project in `Firebase Test Lab`\n\n### firestore_backup\n\n```bash\nfl firestore_backup [snapshot:YYYY-MM-DDTHH:mm:ss.00Z] [database:\u003cdatabase\u003e]\n```\n\nBackup `Firestore` dababase. if `snapshot` is set, create backup at time specified. If `database` isn't set use `(default)`. For details [`Firestore` backup, restore and Point-in-time recovery](#firestore-backup-restore-and-point-in-time-recovery).\n\n### firestore_restore\n\n```bash\nfl firestore_restore backup:\u003cYYYY-MM-DDTHH:mm:ss_mi\u003e [database:\u003cdatabase\u003e]\n ```\n\nRestore `Firestore` dababase to specified `backup`. If `database` isn't set use `(default)`.\nFor details [`Firestore` backup, restore and Point-in-time recovery](#firestore-backup-restore-and-point-in-time-recovery).\n\n### firestore_remove_backup\n\n```bash\nfl firestore_remove_backup backup:\u003cYYYY-MM-DDTHH:mm:ss_mi\u003e\n```\n\nRemove `Firestore` dababase `backup` specified.\nFor details [`Firestore` backup, restore and Point-in-time recovery](#firestore-backup-restore-and-point-in-time-recovery).\n\n### app_distribution\n\n```bash\nfl app_distribution\n```\n\nBuild the release and publish app in `Google Play` via `Firebase App Distribution`\n\n### playstore\n\n```bash\nfl playstore track:production|beta|alpha|internal [upload_only:true|false]\n```\n\nUpload app in `Google Play` via `supply` on `track`. if `upload_only` is `true` upload app without build. (default `false`)\n\n### playstore_promote\n\n```bash\nfl playstore_promote from_track:beta|alpha|internal to_track:production|beta|alpha|internal\n```\n\nPromote a release in Google Play via `supply` from `from_track` to `to_track`.\n\n### buildweb\n\n```bash\nfl buildweb [version:profile|debug]\n```\n\nBuild web and run local webserver on `http://localhost:8080`\n\n### deployweb\n\n```bash\nfl deployweb [release_type:release|profile|debug]\n```\n\nDeploy web in `Firabase Hosting` with release type `release_type` (default `release`)\n\n## `git` utilities\n\n[checkout](#checkout) and [release](#release) commands with git `hooks` for [`git` conventional commit](#git-conventional-commit) and [avoid commit on `main` branch](#avoid-commit-on-main-branch) helps you to work properly with versions, git branches, git tags and github releases.\n\n[bump](#bump) command commit `pubspec.lock` and `pubspec.yaml`  after a bump version on dependencies without create a new version and without create new release.\n\n### `git` conventional commit\n\nThe commit message should follow che [conventional commit](https://www.conventionalcommits.org/en/v1.0.0) specification:\n\n```text\n\u003ctype\u003e[optional scope]: \u003cdescription\u003e\n```\n\nwhere `\u003ctype\u003e` MUST be one of:\n\n- `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n- `chore`: (updating grunt tasks etc; no production code change)\n- `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n- `docs`: Documentation only changes\n- `feat`: A new feature\n- `fix`: A bug fix\n- `perf`: A code change that improves performance\n- `refactor`: A code change that neither fixes a bug nor adds a feature\n- `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n- `test`: Adding missing tests or correcting existing tests\n\n### avoid commit on `main` branch\n\n`main` branch is the default branch and user cannot be commit directly on it, but only merge are allowed.\n\nIf you try to commit on `main` this message is show\n\n```text\nYou can't commit directly to main branch\n```\n\n### example: release a patch\n\n- if you create an `github issue` and a branch on `github`\n\n  ```bash\n  fl checkout\n  ```\n\n  otherwise create a branch locally and push it to remote\n\n  ```bash\n  git branch hotfix\n  git push -u origin hotfix\n  ```\n\n- make changes to your code, commit and push changes to branch\n  \n  ```bash\n  git add .\n  git commit -m \"fix: fix bug ...\"\n  git push\n  ```\n\n- release the patch merging chenges to `main` branch and create a `github release`\n  \n  ```bash\n  fl release version:patch github:true\n  ```\n\n## `Firebase` setup for `app` flutter project\n\n- login in firebase and install flutterfire\n\n   ```bash\n   firebase login\n   dart pub global activate flutterfire_cli\n   flutterfire configure\n   ```\n\n- add firebase core and other packages\n\n  ```bash\n  flutter pub add firebase_core\n  flutter pub add firebase_auth\n  flutter pub add cloud_firestore\n  flutterfire configure\n  ```\n\n- initialize firestore, and deploy rules and indexes\n\n  ```bash\n  firebase init firestore\n  firebase deploy --only firestore\n  ```\n\n- build and run application created\n\n  ```bash\n  flutter run\n  ```\n\n## Release app\n\n### Sign app\n\n- generate upload keystore\n\n  ```bash\n  mkdir -p ~/.flutter\n  keytool -genkey -v -keystore ~/.flutter/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload\n  ```\n\n- create `android/key.properties` containing:\n\n  ```properties\n  storePassword=\u003cpassword-from-previous-step\u003e\n  keyPassword=\u003cpassword-from-previous-step\u003e\n  keyAlias=upload\n  storeFile=\u003ckeystore-file-location\u003e\n  ```\n\n- configure Gradle following instruction \u003chttps://docs.flutter.dev/deployment/android#configure-signing-in-gradle\u003e\n\n- create the ABB file running `flutter build appbundle`. The file created is located here:\n\n  ```properties\n  build/app/outputs/bundle/release/app-release.aab\n  ```\n\n- extract SHA-1 SHA-256 from keystore\n\n  ```bash\n  keytool -list -v -alias upload -keystore ~/.flutter/upload-keystore.jks\n  ```\n\n  or directly from `app-release.aab`\n\n  ```bash\n  keytool -printcert -jarfile build/app/outputs/bundle/release/app-release.aab \n  ```\n\n- load SHA256 in firebase AppCheck section in (`appcheck/apps`)  (this istruction doesn't work for \u003chttps://firebase.google.com/docs/app-check/android/play-integrity-provider\u003e `Currently, the built-in Play Integrity provider only supports Android apps distributed by Google Play` and \u003chttps://stackoverflow.com/a/78698583/1123065\u003e)\n\n- link Google Cloud project to Google Play console follow istructions \u003chttps://developer.android.com/google/play/integrity/setup\u003e\n\n### Firebase App Distribution\n  \n- follow istructions \u003chttps://firebase.google.com/docs/app-distribution/android/distribute-fastlane?apptype=aab\u003e\n\n- Copy the AppDistribution JSON keys created in google cloud IAM in:\n  \n  ```bash\n  ~/.flutter/\u003cYOUR_PROJECT\u003e-app_distribution.json\n  ```\n\n- setup your `~/.bashrc`\n\n  ```bash\n  # setup for `Firebase App Distribution` in `~/.flutter/` \n  export GOOGLE_APPLICATION_CREDENTIALS=\u003cpath_of_app_distribution_json\u003e\n  ```\n\n- run `firebase login:ci` and copy the token generated\n\n- create the file `~/.flutter/firebase_cli_token.json` and paste the token generate in this json:\n\n  ```json\n  {\n    \"firebase_cli_token\": \"\u003cpaste here token generated by 'firebase login:ci'\u003e\"\n  }\n  ```\n\n- run fastlane\n\n  ```bash\n  fl.sh distribute\n  ```\n\n### Google Play\n\n- create the app and publish for internal test in Google Play following instructions \u003chttps://support.google.com/googleplay/android-developer/answer/9859152?hl=en\u003e\n\n- Link Firebase App Distribution to Google Play account following instructions \u003chttps://support.google.com/firebase/answer/6392038\u003e\n\n- run fastlane\n\n  ```bash\n  ./fl.sh playstore track:production|beta|alpha|internal\n  ```\n\n## Integration Test\n\nFollow the instruction \u003chttps://github.com/flutter/flutter/tree/main/packages/integration_test\u003e\n\nwith this changes:\n\n- `android/gradle/wrapper/gradle-wrapper.properties`\n\n  ```properties\n  - distributionUrl=https\\://services.gradle.org/distributions/gradle-8.3-all.zip\n  + distributionUrl=https\\://services.gradle.org/distributions/gradle-8.9-all.zip\n  ```\n\n- `android/settings.gradle`\n\n  ```properties\n  - id \"com.android.application\" version \"8.1.0\" apply false\n  + id \"com.android.application\" version \"8.7.0\" apply false\n  ```\n\nRun locally on device connected:\n\n```bash\nflutter test integration_test/main.dart\n```\n\nor\n\n```bash\nflutter driver --driver=test_driver/main_test.dart --target=integration_test/main.dart \n```\n\nor with `gradlew`\n\n```bash\n./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../integration_test/main.dart\n```\n\n### Firebase Test Lab\n\n- buid integration test artifacts using scripts `android/firebaseTestLabBuild.sh`, shortcut of:\n\n  ```bash\n  ./gradlew app:assembleAndroidTest\n  ./gradlew app:assembleDebug -Ptarget=`pwd`/../integration_test/main.dart\n  ```\n\n- select device from supported devices:\n\n  ```bash\n  gcloud firebase test android models list \n  ```\n\n- you can filter only virtual devices (hight availability, lower cost):\n\n  ```bash\n  gcloud firebase test android models list --filter=virtual \n  ```\n\n- start test in Firebase Test Lab on the selected device launching gcloud command. For example, run test in Medium Phone virtual with android 13 (version 33):\n\n  ```bash\n  gcloud firebase test android run --type instrumentation --app=../build/app/outputs/apk/debug/app-debug.apk --test=../build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk --device model=MediumPhone.arm,version=33,locale=en,orientation=portrait\n  ```\n\nThe lane `fl testlab` run commands above\n\n## `Firestore` backup, restore and Point-in-time recovery\n\n### install `gcloud`\n\nWith `Google Cloud CLI` you can manage command line `Gogle Cloud` services.\n\n```bash\nsudo apt-get install apt-transport-https ca-certificates gnupg curl\ncurl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg\necho \"deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main\" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list\nsudo apt-get update \u0026\u0026 sudo apt-get install google-cloud-cli\n```\n\ninizialize configuring your project\n\n```bash\ngcloud init\n```\n\ncreate the bucket `\u003cPROJECT_NAME\u003e-backups` which hosts backups here: \u003chttps://console.cloud.google.com/storage/browser\u003e\n\n### Restore a Point-in-time Recovery (PITR)\n\nYou can restore the database snapshot since last 15 days specifying `snapshot-time` in ISO 8601 format.\n\n```bash\nfl firestore_backup snapshot:\u003cYYYY-MM-DDTHH:mm:ss.00Z\u003e\n# restore the backup \u003cYYYY-MM-DDTHH:mm:ss_mi\u003e already created\nfl firestore_restore \u003cYYYY-MM-DDTHH:mm:ss_mi\u003e\n```\n\n### Backup and Restore database\n\n- create a backup of current firestore database\n\n  ```bash\n  fl firestore_backup\n  ```\n\n- restore a firestore backup\n\n  ```bash\n  # list all backups\n  fl firestore_restore \n  # restore a backup\n  fl firestore_restore \u003cYYYY-MM-DDTHH:mm:ss_mi\u003e\n  ```\n\n- remove a firestore backup\n\n  ```hash\n  # list all backups\n  fl firestore_restore \n  # remove backup\n  fl firestore_remove_backup \u003cYYYY-MM-DDTHH:mm:ss_mi\u003e\n  ```\n\n## Firebase Hosting\n\nDeploy and publish a flutter web app into `Firebase Hosting`.\n\nDefault `site`:\n\n- Site Id: `\u003cFirebase Project Id\u003e`\n- `Default URL`: `\u003cFirebase Project Id\u003e.web.app` and\n  `\u003cFirebase Project Id\u003e.web.firebaseapp.com/`\n\n### Deploy default `site`\n\n- configure `firebase.json` adding hosting configuration\n  \n  ```json\n    \"hosting\": {\n      \"public\": \"build/web\",\n      \"frameworksBackend\": {\n        \"region\": \"\u003cFirebase Region\u003e\"\n      }\n    }\n  ```\n\n- build web and test locally\n\n  ```bash\n  fl buildweb [--debug:true]\n  ```\n\n- deploy to default `site`\n\n  ```bash\n  firebase deploy --only hosting\n  ```\n  \nDefault `site` cannot be deleted, you can disable entire hosting:\n\n```bash\nfirebase hosting:disable\n```\n\n### Alternative sites\n\n- define the alternative site\n  \n  ```bash\n  firebase target:apply hosting \u003cAlternative Site Id\u003e \u003cAlternative Site Id\u003e\n  ```\n\n- Create the alternative site\n  \n  ```bash\n  firebase hosting:sites:create \u003cAlternative Site Id\u003e\n  ```\n\n- configure `firebase.json` adding `target`\n  \n  ```json\n    \"hosting\": [\n      {\n        \"target\": \"\u003cAlternative Site Id\u003e\",\n        \"public\": \"build/web\",\n        \"frameworksBackend\": {\n          \"region\": \"\u003cFirebase Region\u003e\"\n        }\n      }\n    ]\n  ```\n\n- deploy to the alternative site\n\n  ```bash\n  firebase deploy --only hosting\n  ```\n\nTo list all sites created:\n\n```bash\nfirebase hosting:sites:list\n```\n\nTo delete an alternative site:\n\n```bash\nfirebase hosting:sites:delete \u003cAlternative Site Id\u003e\n```\n\n## `localization` setup\n\n- install packages\n\n  ```bash\n  flutter pub add flutter_localizations --sdk=flutter\n  flutter pub add intl:any\n  ```\n\n- modify `pubspec.yaml` setting flutter artifact generation  \n\n  ```yaml\n  flutter:\n    generate: true\n  ```\n\n- in root project creat `l10n.yaml`\n\n  ```yaml\n  arb-dir: lib/src/l10n\n  template-arb-file: flutter_heyteacher_utils_en.arb\n  output-localization-file: flutter_heyteacher_utils.dart\n  output-class: FlutterHeyteacherUtilsLocalizations\n  output-dir: lib/src/l10n\n  untranslated-messages-file: untranslated-messages.txt\n  ```\n\n- create the `arb` files of your supported languages\n\n  ```bash\n  mkdir lib/l10n\n  touch lib/l10n/flutter_heyteacher_utils_en.arb\n  touch lib/l10n/flutter_heyteacher_utils_it.arb\n  ```\n\n- insert in `flutter_heyteacher_utils_en.arb` the translation\n\n- commit `untranslated-messages.txt` the file containing localized strings to be\n  translated, this file should be always empty\n\n  ```bash\n  git add untranslated-messages.txt\n  git commit -m \"chore: localized strings to be translated, this file should be always empty\"\n  ```\n\n- insert localized string into `flutter_heyteacher_utils_en.arb`\n\n  ```json\n  {\n    \"@@locale\": \"en\",\n    \"userNotAutenticated\": \"User not autenticated\",\n    \"@userNotAutenticated\": {},\n    \"notAuthenticated\": \"Not Authenticated\",\n    \"@notAuthenticated\": {},\n    \"errorOnRetrieveData\": \"Error on retrieve Data\",\n    \"@errorOnRetrieveData\": {},\n    \"timeoutOnRetrieveData\": \"Timeout on retieve data\",\n    \"@timeoutOnRetrieveData\": {}\n  }\n  ```\n\n- regenerate the artifacts\n\n  ```bash\n  flutter pub get\n  ```\n\n- create a file `lib/localizations.dart` containing the export\n\n  ```dart\n  export 'package:flutter_heyteacher_utils/src/l10n/flutter_heyteacher_utils.dart' show FlutterHeyteacherUtilsLocalizations;\n  ```\n\n- add delegate to your app\n\n  ```dart\n  MaterialApp.router(\n    localizationsDelegates: [\n      .\n      .\n      .\n      FlutterHeyteacherUtilsLocalizations.delegate,\n      GlobalMaterialLocalizations.delegate,\n      GlobalWidgetsLocalizations.delegate,\n      GlobalCupertinoLocalizations.delegate,\n    ],\n\n  )\n  ```\n\n- import and use in your code\n\n  ```dart\n  import 'package:flutter_heyteacher_utils/localizations.dart';\n  .\n  .\n  .\n  FlutterHeyteacherUtilsLocalizations.of(context)!.userNotAutenticated\n  ```\n\n## documentation utilities\n\n```bash\nfl doc\n```\n\nGenerates dart documentation, run a local web server on `http://localhost:8080` and open a browser on it.\n\n```bash\nfl docweb\n```\n\nRun a local web server on `http://localhost:8080` and open a browser on project documentation already generatd\n\n## Launcher Icon\n\n- install [flutter_launcher_icons](https://pub.dev/packages/flutter_launcher_icons)\n  \n  ```bash\n  flutter pub add flutter_launcher_icons\n  ```\n  \n- create or modify 'assets/icon/icon.png' and 'assets/icon/background.png'\n\n- add configuration to `pubspec.yaml`\n\n```yaml\nflutter_launcher_icons:\n  android: \"launcher_icon\"\n  ios: false\n  remove_alpha_ios: true\n  image_path: \"assets/icon/icon.png\"\n  min_sdk_android: 21 # android min sdk min:16, default 21\n  adaptive_icon_background: \"assets/icon/background.png\"\n  adaptive_icon_foreground: \"assets/icon/icon.png\"\n  web:\n    generate: true\n    image_path: \"assets/icon/icon.png\"\n    background_color: \"#000000\"\n    theme_color: \"#000000\"\n  windows:\n    generate: true\n    image_path: \"assets/icon/icon.png\"\n    icon_size: 48 # min:48, max:256, default: 48\n  macos:\n    generate: true \n    image_path: \"assets/icon/icon.png\"\n```\n\n- run\n\n  ```bash\n  dart run flutter_launcher_icons\n  ```\n\n## Splash\n\n- install [flutter_native_splash)](https://pub.dev/packages/flutter_native_splash)\n  \n  ```bash\n  flutter pub add flutter_native_splash\n  ```\n\n- create or modify 'assets/splash.png'\n\n add configuration to `pubspec.yaml`\n\n  ```yaml\n  flutter_native_splash:\n  color: \"#000000\"\n  image: assets/splash.png\n  android_12:\n    image: assets/splash.png\n    color: \"#000000\"  \n  ```\n\n- run\n\n  ```bash\n  flutter_splash.sh\n  ```\n\n  an alias of:\n\n  ```bash\n  dart run flutter_native_splash:create\n  ```\n\n## Dart Builders\n\nThe builders like:\n\n- [json_serializable](https://pub.dev/packages/json_serializable)\n- [copy_with_extension](https://pub.dev/packages/copy_with_extension)\n- [mockito](https://pub.dev/packages/mockito)\n\ncan be gererated using script:\n\n```bash\ndart_builders.sh\n```\n\n## `ffmpeg` utilities\n\n`ffmpeg_cmd` is a bash script with utilites for `crop`, `cut`, `estract` and `concat`.\n\n```bash\nffmpeg_cmd.sh\n```\n\nUsage:\n\n- crop\n  \n  `ffmpeg_cmd.sh crop \u003cinput_video\u003e \u003coutput_video\u003e \u003cwidth_in_px\u003e \u003cheight_in_px\u003e \u003cx_in_px\u003e \u003cy_in_px\u003e`\n\n- cut\n  \n  `ffmpeg_cmd.sh cut  \u003cinput_video\u003e \u003coutput_video\u003e \u003cstart_in_sec\u003e \u003cend_in_sec\u003e`\n\n- extract\n  \n  `ffmpeg_cmd.sh extract \u003cinput_video\u003e \u003coutput_video\u003e \u003cstart_in_sec\u003e \u003cend_in_sec\u003e`\n\n- concat\n\n  `ffmpeg_cmd.sh concat \u003cinput_video_1\u003e \u003cinput_video_2\u003e [input_video_3 ...] \u003coutput_video\u003e \u003cfade_duration_in_sec\u003e`\n\n## command-line utility `version`\n\nFrom the root of your project, run:\n\n```bash\ndart run flutter_heyteacher_meta:version major|minor|patch|build|show|show-build [--dry-run]\n```\n\n- `major`,`minor`, `patch` increment the version in your `pubsec.yaml`.\n  `--dry-run` show how the version will be changed without modify `pubsec.yaml`\n\n- `build` set the build version in your `pubsec.yaml`  to `YYMMddHHm` based on\n  the current time.\n  \n- `dry-run` show how the version will be changed without modify `pubsec.yaml`\n\n- `show` print the version in `pubsec.yaml`\n\n- `show-build` print only the build version from `pubsec.yaml`\n\n## `webcrypto` setup for tests\n\nFlutter tests which use `webcrypto` need to be compiled locally running this command:\n\n```bash\nflutter_webcrypto_setup\n```\n\nan alias of:\n\n```bash\ndart run webcrypto:setup\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyteacher%2Fflutter_heyteacher_meta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheyteacher%2Fflutter_heyteacher_meta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyteacher%2Fflutter_heyteacher_meta/lists"}