encointer/encointer-wallet-flutter
Encointer mobile wallet flutter implementation
前往 github 下載Encointer Wallet
Encointer wallet and client for mobile phones
Overview
Requirements
- Dart sdk: “>=3.2.0 <3.0.0”
- flutter: “3.16.3”
- Android: minSdkVersion 17
- iOS: --ios-language swift, Xcode version >= 14.3
Build Instructions
Setup
Ubuntu 22.04
Install Android Studio from snap and set it up as follows:
- Tools > SDK manager > Install SDK Android 8.0 Oreo (not sure if version matters much)
- … Tools > Install SDK commandline tools
- Settings > Plugins > Install Flutter
then:
sudo apt install cmake ninja-build libgtk-3-dev npm build-essentials
./scripts/install_flutter_wrapper.sh
# install project deps (i.e., melos)
.flutter/bin/dart pub get
.flutter/bin/dart melos bootstrap
In studio: under run configurations, add build flavor dev
Now: run!
Windows
Essentially only a project wide flutter installation is needed. A simple trick to install flutter wrapper like above is
to open a Git Bash shell on windows to run the ./scripts/install_flutter_wrapper.sh
. All ./.flutter\bin\dart
commands work from a windows terminal, so the rest of the installation steps are the same.
Additional Info
Flutter wrapper and the .flutter git submodule
This project uses flutter_wrapper. Flutter wrapper is a tool that enables
having the same flutter version across multiple developers. It installs automatically the flutter version form the
pubspec.yml into the .flutter
submodule.
Vscode automatically uses the .flutter
as we have checked in the .vscode
folder. For setting up the Android Studio,
please refer to the documentation.
Linux and MacOs
Linux and MacOs users can simply replace all flutter
CLI commands with ./flutterw
and it will just work.
Windows
In windows, this does unfortunately not work, but .flutter
you can refer to the executables directly with:
./flutter/bin/flutter
and ./flutter/bin/dart
.
Note: On windows, Git fails to update the flutter submodule when it has been changed on remote. This can be fixed with:
git submodule update --init
Run App
Run Android platform
./.flutter\bin\dart melos run run-android
Run IOS platform
./.flutter\bin\dart run melos run-ios
If you have an AVD or real device attached, you can do
./.flutter\bin\flutter run --flavor dev
Build APK
You may build the App with Flutter’s Deployment Documentation.
In order to build a fat APK, you can do
.\.flutter\bin\dart run melos build-apk-fdroid
and find the output in build/app/outputs/apk/fdroid/release/app-fdroid-release.apk
For the play store, an appbundle is preferred:
.\.flutter\bin\dart run melos build-appbundle
and find the output in build/app/outputs/bundle/release/app-release.aab
Dev hints
Flutter version
The following file contains the supported flutter version:
Run tests
- run all tests from the command line:
./flutterw test
- exclude e2e-tests that need a running encointer node:
.\.flutter\bin\dart run melos unit-test-app-exclude-encointer-node-e2e
- run e2e-tests that need a running encointer node:
.\.flutter\bin\dart run melos unit-test-app-with-encointer-node-e2e
Integration tests
- run all integration tests in
test_driver
directory:
Integration test app.dart for Android system
.\.flutter\bin\dart run melos integration-app-test-android
Integration test app.dart for IOS system
.\.flutter\bin\dart run melos integration-app-test-ios
Automated screenshots
- Github actions is used to create automated screenshots for the specified devices there. However, running the integration tests locally will create screenshots for the currently running device.
Android Studio
To run the in Android Studio a build flavor must be specified. Go to Run/Debug configurations and add the build flavor dev
in the appropriate field. Other available values are in the in the android/app/src/build.gradle file.
Developer Remarks
Fmt
dartfmt
lacks config file support, which implies that customizations need to be done by users individually. The default
limit of 80 characters line length conflicts with the deeply nested structure of flutter’s declarative code for designing
widgets. This causes many unwanted linebreaks that reduce the readability of flutter code. Hence, we increase the line
length of the code to 120.
- Settings > Dart > Line length 120.
- Autoformat on save: Settings > Languages and Frameworks > then tick:
Format code on save
,Organize imports on save
. - Format the whole codebase with:
format all Dart code
.\.flutter\bin\dart run melos format
Other fmt hints:
- Define formatting with the help of trailing commas.
- Dartfmt FAQ.
Update generated files.
The flutter build-runner is used to generate repetitive boiler-plate code that is generated based on code annotations,
e.g. @JsonSerializable
or the mobx annotations. Whenever annotations are added, changed or removed, the following
command must be run to update the *.g
files.
.\.flutter\bin\dart run melos run-build-runner
GitHub Actions Hints
IOS
Sometimes after a Github Actions Runner update, the Xcode version is updated, which changes the available IOS runtimes.
This makes the IPad simulator creation fail because our runtime is no longer available. We can simply replace the
runtime with one of the available runtimes printed in the Prepare environment for IOS
stage.
App Release
Pre-release testing
There is quite some manual testing, which we can’t automate currently. Before a release, an issue should be created
based on the Release Testing Rococo
template. It will generate an issue with a task list of the features that need to
be tested. Two things need to be inserted into the template: 1. The commit that is tested. 2. The version that should be
released after testing.
Release flow
- VersionName should follow the semver policy.
- VersionCode should monotonically increase by 1 for every tagged build
AppCenter (Google Play Store & Apple AppStore)
The AppCenter automatically builds and deploys the HEAD of beta
.
git checkout master
git pull
git tag v0.9.0
git push origin v0.9.0
git checkout beta
git merge v0.9.0
git push
F-droid
F-droid triggers builds based on tags. We will use a special tag format for the f-droid releases:, e.g. vx.x.x-fdroid
.
Note: We have a different release branch for f-droid, as we had to use another, less performant scanner library to meet
FOSS constraints.
Acknowledgements
This app has been built based on polkawallet.io
![](/images/banner-woo.jpg)
與 encointer/encointer-wallet-flutter 相關優秀專案推薦下載
AppFlowy
47859
AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
localsend
33797
An open-source cross-platform alternative to AirDrop
spotube
23772
🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
revanced-manager
15035
💊 Application to use ReVanced on Android
gsy_github_app_flutter
14559
Flutter 超完整的开源项目,功能丰富,适合学习和日常使用。GSYGithubApp系列的优势:我们目前已经拥有Flutter、Weex、ReactNative、kotlin 四个版本。 功能齐全,项目框架内技术涉及面广,完成度高,持续维护,配套文章,适合全面学习,对比参考。跨平台的开源Github客户端App,更好的体验,更丰富的功能,旨在更好的日常管理和维护个人Github,提供更好更方便的驾车体验Σ( ̄。 ̄ノ)ノ。同款Weex版本 : https://github.com/CarGuo/GSYGithubAppWeex 、同款React Native版本 : https://github.com/CarGuo/GSYGithubApp 、原生 kotlin 版本 https://github.com/CarGuo/GSYGithubAppKotlin
dio
12249
A powerful HTTP client for Dart and Flutter, which supports global settings, Interceptors, FormData, aborting and canceling a request, files uploading and downloading, requests timeout, custom adapters, etc.
gopeed
11832
A modern download manager that supports all platforms. Built with Golang and Flutter.
bloc
11441
A predictable state management library that helps implement the BLoC design pattern
getx
9899
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
flame
8846
A Flutter based game engine.
flutter_deer
7595
🦌 Flutter 练习项目(包括集成测试、可访问性测试)。内含完整UI设计图,更贴近真实项目的练习。Flutter practice project (including integration testing and accessibility testing). Contains complete UI design drawings for a more realistic practice project.
fish-redux
7343
An assembled flutter application framework.
hiddify-next
7232
Multi-platform auto-proxy client, supporting Sing-box, X-ray, TUIC, Hysteria, Reality, Trojan, SSH etc. It’s an open-source, secure and ad-free.
ente
6686
Fully open source, End to End Encrypted alternative to Google Photos and Apple Photos
fl_chart
6451
FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
pixez-flutter
6360
一个支持免代理直连及查看动图的第三方Pixiv flutter客户端
Flutter-Responsive-Admin-Panel-or-Dashboard
6355
Responsive Admin Panel or Dashboard using Flutter
aidea
6021
AIdea 是一款支持 GPT 以及国产大语言模型通义千问、文心一言等,支持 Stable Diffusion 文生图、图生图、 SDXL1.0、超分辨率、图片上色的全能型 APP。
riverpod
5828
A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
pikapika
5463
美观易用且无广告的漫画和游戏客户端,同时支持MacOS,Windows,Android,iOS。