WebTrit/webtrit_phone

WebTrit Phone application

前往 github 下载
WebTrit/webtrit_phone

webtrit_phone

WebTrit Phone application.

Variables

Dart define

  • WEBTRIT_APP_ID_SUFFIX - suffix added to applicationId (with value com.webtrit.app) on Android and to CFBundleIdentifier (with value com.webtrit.app) on iOS (default is empty)
  • WEBTRIT_APP_LINK_DOMAIN - domain used to set up Android app links and iOS universal links (to generate the required .well-known files, use the assetlinks-generate command from webtrit_phone_tools
  • WEBTRIT_APP_NAME (default WebTrit)
  • WEBTRIT_APP_DESCRIPTION (default is empty)
  • WEBTRIT_APP_CORE_URL (optional)
  • WEBTRIT_APP_DEMO_CORE_URL (default http://localhost:4000)
  • WEBTRIT_APP_PERIODIC_POLLING (default true)
  • WEBTRIT_APP_DEBUG_LEVEL (default INFO)
  • WEBTRIT_APP_DATABASE_LOG_STATEMENTS (default false)

Default build variables located in dart_define.json and could be add to flutter run or build with --dart-define-from-file=dart_define.json parameter.

Environment

  • WEBTRIT_ANDROID_RELEASE_UPLOAD_KEYSTORE_PATH - path to folder structure created by keystore-generate command of webtrit_phone_tools (KeystoreGenerator)

Build

Android

Command line example:

WEBTRIT_ANDROID_RELEASE_UPLOAD_KEYSTORE_PATH=<path for KeystoreGenerator created folder structure> && \
flutter build appbundle --dart-define-from-file=dart_define.json

iOS

Command line example:

flutter build ipa --dart-define-from-file=dart_define.json

Web

Command line example:

flutter build web --dart-define-from-file=dart_define.json
  
dart run tool/extenvsubst.dart dart_define.json build/web/index.html

Renaming

To rename the default fields for each platform project within the WebTrit Phone application, the package_rename package can be used.

Localizely

Preparation

Workflow

Follow these steps according to your specific activity to manage the localization of your application efficiently.

Developing

  1. Add, update, or remove the necessary key(s) in lib/l10n/arb/app_en.arb.
  2. Push the key(s) to Localizely using the command: localizely-cli push.
  3. If necessary, translate the key(s) on the Localizely platform, ensuring to remove helper tags from the key(s).
  4. Pull the key(s) from Localizely using the command: localizely-cli pull.
  5. Generate the localizations with the command: flutter gen-l10n.
  6. Commit the changes.

Refinement

  1. Pull the key(s) from Localizely using the command: localizely-cli pull.
  2. Generate the localizations with the command: flutter gen-l10n.
  3. Commit the changes.

Adding a New Locale

  1. Add the new locale to the download files list in localizely.yml.
  2. Insert locale_<locale code> in lib/l10n/arb/app_en.arb.
  3. Push the newly added key to Localizely using the command: localizely-cli push.
  4. Translate the added key on the Localizely platform, remembering to remove helper tags from the key(s).
  5. Pull the newly added key from Localizely using the command: localizely-cli pull.
  6. Generate the localizations with the command: flutter gen-l10n.
  7. Commit the changes.

Contributing

Contributions are always welcome!

License

MIT LICENSE

Acknowledgments

This project is tested with BrowserStack.

与 WebTrit/webtrit_phone 相关优秀项目推荐下载