A Flutter based Cwtch UI.
This README covers build instructions, for information on Cwtch itself please go to https://cwtch.im
First you will need a valid flutter sdk installation
flutter pub get to fetch dependencies.
You will probably want to disable Analytics on the Flutter Tool:
flutter config --no-analytics
Building on Linux (for Linux)
fetch-libcwtch-go.shlibCwtch-go to fetch a prebuild version of
fetch-tor.shand/or ensure that
flutter run -d linux
Building on Windows (for Windows)
fetch-libcwtch-go.ps1to fetch a prebuild version of
fetch-tor-win.ps1to fetch Tor for windows
flutter run -d windows
Building on Linux/Windows (for Android)
- Follow the steps above to fetch
tor(these will fetch Android versions of these binaries also)
flutter runwith an Android phone connect via USB (or some other valid debug mode)
Known Platform Issues
- Windows: Flutter engine has a known bug around the Right Shift key being sticky. We have implemented a partial workaround, if this happens, tap left shift and it will reset.
Adding a new string
Strings are managed directly from our Lokalise(url?) project. Keys should be valid Dart variable names in lowerCamelCase. After adding a new key and providing/obtaining translations for it, follow the next step to update your local copy.
Only Open Privacy staff members can update translations.
In Lokalise, hit Download and make sure:
- Format is set to "Flutter (.arb)
- Output filename is set to
- Empty translations is set to "Replace with base language"
Build, download and unzip the output, overwriting
lib/l10n. The next time Flwtch is built, Flutter will notice the changes and update
app_localizations.dart accordingly (thanks to
Adding a language
If a new language has been added to the Lokalise project, two additional manual steps need to be done:
- Create a new key called
localeXXfor the name of the language
- Add it to the settings pane by updating
Then rebuild as normal.
Using a string
Any widget underneath the main MaterialApp should be able to:
and then use:
generate: true in
pubspec.yaml, the Flutter build process checks
l10n.yaml for input/output filenames.