Merge pull request #174 from cypherstack/staging

Staging
This commit is contained in:
Diego Salazar 2022-10-27 16:49:41 -06:00 committed by GitHub
commit 13d081c7cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
182 changed files with 45691 additions and 11893 deletions

View file

@ -8,16 +8,39 @@ jobs:
- name: Prepare repository
uses: actions/checkout@v3
with:
flutter-version: '3.0.5'
flutter-version: '3.3.4'
channel: 'stable'
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Setup | Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
components: clippy
- name: Checkout submodules
run: git submodule update --init --recursive
- name: install dependencies
run: |
cargo install cargo-ndk
rustup target add x86_64-unknown-linux-gnu
sudo apt install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm
sudo apt install -y debhelper libclang-dev cargo rustc opencl-headers libssl-dev ocl-icd-opencl-dev
sudo apt install -y libc6-dev-i386
sudo apt install -y build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config llvm
sudo apt install -y build-essential debhelper cmake libclang-dev libncurses5-dev clang libncursesw5-dev cargo rustc opencl-headers libssl-dev pkg-config ocl-icd-opencl-dev
sudo apt install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless
- name: Build Lelantus
run: |
cd crypto_plugins/flutter_liblelantus/scripts/linux/
./build_all.sh
- name: Build Monero
run: |
cd crypto_plugins/flutter_libmonero/scripts/linux/
./build_monero_all.sh
- name: Build Epic Cash
run: |
cd crypto_plugins/flutter_libepiccash/scripts/linux/
./build_all.sh
- name: Get dependencies
run: flutter pub get
- name: Create temp files
@ -27,48 +50,36 @@ jobs:
$encodedBytes = [System.Convert]::FromBase64String($env:CHANGE_NOW);
Set-Content $secretFileExchange -Value $encodedBytes -AsByteStream;
$secretFileExchangeHash = Get-FileHash $secretFileExchange;
Write-Output "::set-output name=SECRET_FILE_EXCHANGE::$secretFileExchange";
Write-Output "::set-output name=SECRET_FILE_EXCHANGE_HASH::$($secretFileExchangeHash.Hash)";
Write-Output "Secret file $secretFileExchange has hash $($secretFileExchangeHash.Hash)";
$secretFileBitcoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart";
$encodedBytes = [System.Convert]::FromBase64String($env:BITCOIN_TEST);
Set-Content $secretFileBitcoin -Value $encodedBytes -AsByteStream;
$secretFileBitcoinHash = Get-FileHash $secretFileBitcoin;
Write-Output "::set-output name=SECRET_FILE_BITCOIN::$secretFileBitcoin";
Write-Output "::set-output name=SECRET_FILE_BITCOIN_HASH::$($secretFileBitcoinHash.Hash)";
Write-Output "Secret file $secretFileBitcoin has hash $($secretFileBitcoinHash.Hash)";
$secretFileDogecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart";
$encodedBytes = [System.Convert]::FromBase64String($env:DOGECOIN_TEST);
Set-Content $secretFileDogecoin -Value $encodedBytes -AsByteStream;
$secretFileDogecoinHash = Get-FileHash $secretFileDogecoin;
Write-Output "::set-output name=SECRET_FILE_DOGECOIN::$secretFileDogecoin";
Write-Output "::set-output name=SECRET_FILE_DOGECOIN_HASH::$($secretFileDogecoinHash.Hash)";
Write-Output "Secret file $secretFileDogecoin has hash $($secretFileDogecoinHash.Hash)";
$secretFileFiro = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/firo/firo_wallet_test_parameters.dart";
$encodedBytes = [System.Convert]::FromBase64String($env:FIRO_TEST);
Set-Content $secretFileFiro -Value $encodedBytes -AsByteStream;
$secretFileFiroHash = Get-FileHash $secretFileFiro;
Write-Output "::set-output name=SECRET_FILE_FIRO::$secretFileFiro";
Write-Output "::set-output name=SECRET_FILE_FIRO_HASH::$($secretFileFiroHash.Hash)";
Write-Output "Secret file $secretFileFiro has hash $($secretFileFiroHash.Hash)";
$secretFileBitcoinCash = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart";
$encodedBytes = [System.Convert]::FromBase64String($env:BITCOINCASH_TEST);
Set-Content $secretFileBitcoinCash -Value $encodedBytes -AsByteStream;
$secretFileBitcoinCashHash = Get-FileHash $secretFileBitcoinCash;
Write-Output "::set-output name=SECRET_FILE_BITCOINCASH::$secretFileBitcoinCash";
Write-Output "::set-output name=SECRET_FILE_BITCOINCASH_HASH::$($secretFileBitcoinCashHash.Hash)";
Write-Output "Secret file $secretFileBitcoinCash has hash $($secretFileBitcoinCashHash.Hash)";
$secretFileNamecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/namecoin/namecoin_wallet_test_parameters.dart";
$encodedBytes = [System.Convert]::FromBase64String($env:NAMECOIN_TEST);
Set-Content $secretFileNamecoin -Value $encodedBytes -AsByteStream;
$secretFileNamecoinHash = Get-FileHash $secretFileNamecoin;
Write-Output "::set-output name=SECRET_FILE_NAMECOIN::$secretFileNamecoin";
Write-Output "::set-output name=SECRET_FILE_NAMECOIN_HASH::$($secretFileNamecoinHash.Hash)";
Write-Output "Secret file $secretFileNamecoin has hash $($secretFileNamecoinHash.Hash)";
shell: pwsh
@ -91,18 +102,18 @@ jobs:
file: coverage/lcov.info
- name: Delete temp files
run: |
Remove-Item -Path $env:CHANGE_NOW;
Remove-Item -Path $env:BITCOIN_TEST;
Remove-Item -Path $env:DOGECOIN_TEST;
Remove-Item -Path $env:FIRO_TEST;
Remove-Item -Path $env:BITCOINCASH_TEST;
Remove-Item -Path $env:NAMECOIN_TEST;
$secretFileExchange = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "lib/external_api_keys.dart";
$secretFileBitcoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart";
$secretFileDogecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart";
$secretFileFiro = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/firo/firo_wallet_test_parameters.dart";
$secretFileBitcoinCash = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart";
$secretFileNamecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/namecoin/namecoin_wallet_test_parameters.dart";
Remove-Item -Path $secretFileExchange;
Remove-Item -Path $secretFileBitcoin;
Remove-Item -Path $secretFileDogecoin;
Remove-Item -Path $secretFileFiro;
Remove-Item -Path $secretFileBitcoinCash;
Remove-Item -Path $secretFileNamecoin;
shell: pwsh
if: always()
env:
CHANGE_NOW: ${{ steps.secret-file1.outputs.SECRET_FILE_EXCHANGE }}
BITCOIN_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_BITCOIN }}
DOGECOIN_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_DOGECOIN }}
FIRO_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_FIRO }}
BITCOINCASH_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_BITCOINCASH }}
NAMECOIN_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_NAMECOIN }}

1
.gitignore vendored
View file

@ -49,3 +49,4 @@ coverage
scripts/**/build
/lib/external_api_keys.dart
/test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart
/test/services/coins/namecoin/namecoin_wallet_test_parameters.dart.txt

View file

@ -20,6 +20,7 @@
<application
android:name="${applicationName}"
android:label="Stack Wallet"
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:fullBackupContent="false">

View file

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.20'
repositories {
google()
jcenter()

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

6
assets/svg/Button.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8 KiB

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.44444 2.21973C2.09618 2.21973 1 3.31591 1 4.66417V15.6642C1 17.0124 2.09618 18.1086 3.44444 18.1086H10.1667L9.75799 19.3308H7.11111C6.43507 19.3308 5.88889 19.877 5.88889 20.5531C5.88889 21.2291 6.43507 21.7753 7.11111 21.7753H16.8889C17.5649 21.7753 18.1111 21.2291 18.1111 20.5531C18.1111 19.877 17.5649 19.3308 16.8889 19.3308H14.242L13.8333 18.1086H20.5556C21.9038 18.1086 23 17.0124 23 15.6642V4.66417C23 3.31591 21.9038 2.21973 20.5556 2.21973H3.44444ZM20.5556 4.66417V13.2197H3.44444V4.66417H20.5556Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 641 B

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.8242 1H4.44922C2.93027 1 1.69922 2.23105 1.69922 3.75V20.25C1.69922 21.7689 2.93027 23 4.44922 23H16.8242C18.3432 23 19.5742 21.7689 19.5742 20.25V3.75C19.5742 2.23105 18.341 1 16.8242 1ZM10.6367 6.5C12.1557 6.5 13.3867 7.73105 13.3867 9.25C13.3867 10.7689 12.1557 12 10.6367 12C9.1182 12 7.88672 10.7689 7.88672 9.25C7.88672 7.73105 9.11992 6.5 10.6367 6.5ZM14.7617 17.5H6.51172C6.13359 17.5 5.82422 17.1906 5.82422 16.8125C5.82422 14.9133 7.3625 13.375 9.26172 13.375H12.0117C13.9101 13.375 15.4492 14.9141 15.4492 16.8125C15.4492 17.1906 15.1398 17.5 14.7617 17.5ZM21.6367 3.75H20.9492V7.875H21.6367C22.0148 7.875 22.3242 7.56563 22.3242 7.1875V4.4375C22.3242 4.05766 22.0148 3.75 21.6367 3.75ZM21.6367 9.25H20.9492V13.375H21.6367C22.0148 13.375 22.3242 13.0656 22.3242 12.6875V9.9375C22.3242 9.55937 22.0148 9.25 21.6367 9.25ZM21.6367 14.75H20.9492V18.875H21.6367C22.0164 18.875 22.3242 18.5672 22.3242 18.1875V15.4375C22.3242 15.0594 22.0148 14.75 21.6367 14.75Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,24 @@
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5863_29353)">
<rect width="200" height="162" rx="8" fill="#2A2D34"/>
<rect x="10" y="10" width="180" height="20" rx="2" fill="#444953"/>
<rect x="16" y="16" width="106" height="8" rx="1" fill="#7E8692"/>
<rect x="10" y="40" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="46" width="106" height="8" rx="1" fill="#575C63"/>
<rect x="10" y="62" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="68" width="106" height="8" rx="1" fill="#575C63"/>
<rect x="10" y="84" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="90" width="106" height="8" rx="1" fill="#575C63"/>
<rect x="10" y="106" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="112" width="106" height="8" rx="1" fill="#575C63"/>
<rect x="10" y="128" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="134" width="106" height="8" rx="1" fill="#575C63"/>
<rect x="10" y="150" width="180" height="20" rx="2" fill="#333942"/>
<rect x="16" y="156" width="106" height="8" rx="1" fill="#575C63"/>
</g>
<defs>
<clipPath id="clip0_5863_29353">
<rect width="200" height="162" rx="8" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<path d="M23.659 10.0005C24.8164 10.0005 25.7475 10.9367 25.7475 12.1005V13.483C26.8701 13.623 27.9926 13.973 29.089 14.2792C30.2029 14.5855 30.8555 15.7405 30.5423 16.8605C30.2377 17.9805 29.089 18.6367 27.9752 18.3217C27.1485 18.0942 26.3218 17.8492 25.4777 17.683C24.2073 17.438 22.7279 17.5517 21.5358 18.0767C20.4654 18.5405 19.5865 19.6605 20.7961 20.4392C21.9448 21.183 23.3893 21.4805 24.6772 21.8567C26.1913 22.2855 28.1144 22.8367 29.5589 23.8255C31.4386 25.1205 32.3175 27.2205 31.8998 29.478C31.5082 31.6567 29.994 33.0917 28.184 33.8267C27.4357 34.133 26.609 34.2467 25.7475 34.4217V35.9005C25.7475 37.0642 24.8164 38.0005 23.659 38.0005C22.5017 38.0005 21.5706 37.0642 21.5706 35.9005L21.4923 34.2117C20.1696 33.8967 18.7947 33.4417 17.4372 32.9955C16.3407 32.628 15.749 31.438 16.1058 30.3442C16.4713 29.2417 17.5764 28.6467 18.7425 29.0055C20.0738 29.443 21.4313 29.968 22.8063 30.178C24.4509 30.423 25.7649 30.2742 26.6264 29.9242C27.7838 29.4605 28.332 28.078 27.2007 27.2905C26.0347 26.4942 24.5379 26.1792 23.2065 25.803C21.7446 25.383 19.9259 24.8667 18.551 23.983C16.6627 22.7667 15.7055 20.7367 16.1145 18.5055C16.4974 16.3792 18.142 14.9705 19.8737 14.218C20.4045 13.9905 20.9788 13.8067 21.4923 13.6667V12.1005C21.4923 10.9367 22.5017 10.0005 23.5807 10.0005H23.659Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.69844 6.70024C9.61406 3.78461 14.325 3.77055 17.2594 6.65336L15.3281 8.57993C15.0047 8.90336 14.9109 9.38618 15.0844 9.80805C15.2578 10.2299 15.6703 10.5018 16.125 10.5018H21.7266H22.125C22.7484 10.5018 23.25 10.0002 23.25 9.3768V3.3768C23.25 2.92211 22.9781 2.50961 22.5563 2.33618C22.1344 2.16274 21.6516 2.25649 21.3281 2.57993L19.3781 4.52993C15.2719 0.475238 8.65781 0.489301 4.575 4.5768C3.43125 5.72055 2.60625 7.06586 2.1 8.50492C1.82344 9.28774 2.23594 10.1409 3.01406 10.4174C3.79219 10.694 4.65 10.2815 4.92656 9.50336C5.2875 8.48149 5.87344 7.52055 6.69844 6.70024ZM0.75 14.6268V14.9831V15.0159V20.6268C0.75 21.0815 1.02187 21.494 1.44375 21.6674C1.86562 21.8409 2.34844 21.7471 2.67188 21.4237L4.62187 19.4737C8.72812 23.5284 15.3422 23.5143 19.425 19.4268C20.5688 18.2831 21.3984 16.9377 21.9047 15.5034C22.1812 14.7206 21.7687 13.8674 20.9906 13.5909C20.2125 13.3143 19.3547 13.7268 19.0781 14.5049C18.7172 15.5268 18.1313 16.4877 17.3063 17.3081C14.3906 20.2237 9.67969 20.2377 6.74531 17.3549L8.67188 15.4237C8.99531 15.1002 9.08906 14.6174 8.91562 14.1956C8.74219 13.7737 8.32969 13.5018 7.875 13.5018H2.26875H2.23594H1.875C1.25156 13.5018 0.75 14.0034 0.75 14.6268Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,3 @@
<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.875 3.12012C7.63555 3.12012 8.25 2.50566 8.25 1.74512C8.25 0.98457 7.63555 0.370117 6.875 0.370117H4.125C1.84766 0.370117 0 2.21777 0 4.49512V15.4951C0 17.7725 1.84766 19.6201 4.125 19.6201H6.875C7.63555 19.6201 8.25 19.0057 8.25 18.2451C8.25 17.4846 7.63555 16.8701 6.875 16.8701H4.125C3.36445 16.8701 2.75 16.2557 2.75 15.4951V4.49512C2.75 3.73457 3.36445 3.12012 4.125 3.12012H6.875ZM21.6777 10.7428C21.884 10.5494 22 10.2787 22 9.99512C22 9.71152 21.884 9.44082 21.6777 9.24746L15.4902 3.40371C15.1895 3.12012 14.7512 3.04277 14.373 3.20605C13.9949 3.36934 13.75 3.74316 13.75 4.15137V7.24512H8.25C7.48945 7.24512 6.875 7.85957 6.875 8.62012V11.3701C6.875 12.1307 7.48945 12.7451 8.25 12.7451H13.75V15.8389C13.75 16.2514 13.9949 16.6209 14.373 16.7842C14.7512 16.9475 15.1895 16.8701 15.4902 16.5865L21.6777 10.7428Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 954 B

View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<g clip-path="url(#clip0_5784_28907)">
<path d="M29.602 20.0474C30.0832 20.0474 30.477 20.3954 30.477 20.9067V21.0786H33.102C33.5832 21.0786 33.977 21.4267 33.977 21.938C33.977 22.4106 33.5832 22.7974 33.102 22.7974H33.0145L32.9445 22.9907C32.5551 24.0048 31.9601 24.9931 31.2076 25.8009C31.247 25.8224 31.2863 25.8095 31.3257 25.8696L32.1526 26.3552C32.5682 26.6001 32.6995 27.1286 32.4501 27.5368C32.2051 27.945 31.667 28.0739 31.2513 27.829L30.4245 27.3435C30.232 27.2274 30.0001 27.1071 29.8513 26.9782C29.392 27.3005 28.8932 27.5798 28.3682 27.8118L28.2063 27.8806C27.7645 28.0739 27.2482 27.8763 27.0513 27.4423C26.8545 27.0083 27.0557 26.5013 27.4976 26.3079L27.6551 26.2392C27.9351 26.1146 28.2063 25.9384 28.4645 25.8181L27.9351 25.2938C27.5895 24.9587 27.5895 24.4173 27.9351 24.0821C28.2763 23.7427 28.8276 23.7427 29.1688 24.0821L29.8076 24.7052L29.8338 24.6923C30.3763 24.1681 30.8182 23.5149 31.1376 22.7587H26.452C25.9313 22.7587 25.577 22.4106 25.577 21.8993C25.577 21.4267 25.9313 21.0399 26.452 21.0399H28.727V20.8681C28.727 20.3954 29.0813 20.0087 29.602 20.0087V20.0474ZM17.002 23.0208L17.8332 24.8599H16.1313L17.002 23.0208ZM10.002 18.5005C10.002 16.9815 11.2554 15.7505 12.802 15.7505H35.202C36.7463 15.7505 38.002 16.9815 38.002 18.5005V29.5005C38.002 31.0173 36.7463 32.2505 35.202 32.2505H12.802C11.2554 32.2505 10.002 31.0173 10.002 29.5005V18.5005ZM24.002 29.5005H35.202V18.5005H24.002V29.5005ZM17.8026 20.5587C17.6626 20.2493 17.3476 20.0474 17.002 20.0474C16.6563 20.0474 16.3413 20.2493 16.2013 20.5587L13.4022 26.7462C13.2062 27.1415 13.4048 27.6872 13.8467 27.8806C14.2881 28.0739 14.8057 27.8763 15.0026 27.4423L15.392 26.5399H18.612L19.0013 27.4423C19.1982 27.8763 19.7145 28.0739 20.1563 27.8806C20.5982 27.6872 20.7995 27.1415 20.6026 26.7462L17.8026 20.5587Z" fill="#232323"/>
</g>
<defs>
<clipPath id="clip0_5784_28907">
<rect width="28" height="22" fill="white" transform="translate(10.002 13.0005)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,24 @@
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5887_94222)">
<rect width="200" height="162" rx="8" fill="#E8EAEC"/>
<rect x="10" y="10" width="180" height="20" rx="2" fill="#DBDDE1"/>
<rect x="16" y="16" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="40" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="46" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="62" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="68" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="84" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="90" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="106" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="112" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="128" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="134" width="106" height="8" rx="1" fill="#C4C8CC"/>
<rect x="10" y="150" width="180" height="20" rx="2" fill="#FEFEFE"/>
<rect x="16" y="156" width="106" height="8" rx="1" fill="#C4C8CC"/>
</g>
<defs>
<clipPath id="clip0_5887_94222">
<rect width="200" height="162" rx="8" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<g clip-path="url(#clip0_5764_28774)">
<path d="M24 10.9995C28.2589 10.9995 31.7143 14.254 31.7143 18.2687V20.6918H32.5714C34.4625 20.6918 36 22.1406 36 23.9226V33.6149C36 35.3969 34.4625 36.8457 32.5714 36.8457H15.4286C13.5348 36.8457 12 35.3969 12 33.6149V23.9226C12 22.1406 13.5348 20.6918 15.4286 20.6918H16.2857V18.2687C16.2857 14.254 19.7411 10.9995 24 10.9995ZM24 14.2303C21.6321 14.2303 19.7143 16.0385 19.7143 18.2687V20.6918H28.2857V18.2687C28.2857 16.0385 26.3679 14.2303 24 14.2303ZM25.7143 27.1534C25.7143 26.2598 24.9482 25.538 24 25.538C23.0518 25.538 22.2857 26.2598 22.2857 27.1534V30.3841C22.2857 31.2776 23.0518 31.9995 24 31.9995C24.9482 31.9995 25.7143 31.2776 25.7143 30.3841V27.1534Z" fill="#232323"/>
</g>
<defs>
<clipPath id="clip0_5764_28774">
<rect width="24" height="25.8462" fill="white" transform="translate(12 10.9995)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<path d="M34.5 25.5H13.5C12.6741 25.5 12 26.1741 12 27V33C12 33.8259 12.6741 34.5 13.5 34.5H34.5C35.3259 34.5 36 33.8259 36 33V27C36 26.175 35.325 25.5 34.5 25.5ZM28.5 31.125C27.8789 31.125 27.375 30.6211 27.375 30C27.375 29.3789 27.8789 28.875 28.5 28.875C29.1211 28.875 29.625 29.3789 29.625 30C29.625 30.6211 29.1234 31.125 28.5 31.125ZM31.5 31.125C30.8789 31.125 30.375 30.6211 30.375 30C30.375 29.3789 30.8789 28.875 31.5 28.875C32.1211 28.875 32.625 29.3789 32.625 30C32.625 30.6211 32.1234 31.125 31.5 31.125ZM34.5 13.5H13.5C12.6741 13.5 12 14.1741 12 15V21C12 21.8259 12.6741 22.5 13.5 22.5H34.5C35.3259 22.5 36 21.8259 36 21V15C36 14.1741 35.325 13.5 34.5 13.5ZM28.5 19.125C27.8789 19.125 27.375 18.6211 27.375 18C27.375 17.3789 27.8813 16.875 28.5 16.875C29.1187 16.875 29.625 17.3812 29.625 18C29.625 18.6188 29.1234 19.125 28.5 19.125ZM31.5 19.125C30.8789 19.125 30.375 18.6211 30.375 18C30.375 17.3789 30.8813 16.875 31.5 16.875C32.1187 16.875 32.625 17.3812 32.625 18C32.625 18.6188 32.1234 19.125 31.5 19.125Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<path d="M32.25 17.5031V15.75C32.25 14.9217 32.9203 14.25 33.75 14.25C34.5797 14.25 35.25 14.9217 35.25 15.75V21C35.25 21.8297 34.5797 22.5 33.75 22.5H32.5219C32.4984 22.5 32.475 22.5 32.4516 22.5H28.5C27.6703 22.5 27 21.8297 27 21C27 20.1703 27.6703 19.5 28.5 19.5H30C28.6313 17.6766 26.4516 16.5 23.9578 16.5C20.7375 16.5 17.9578 18.5859 16.9266 21.5016C16.6505 22.2797 15.7931 22.6922 15.0122 22.4156C14.2313 22.1391 13.8216 21.2391 14.0977 20.4984C15.5386 16.4241 19.425 13.5 23.9578 13.5C27.3469 13.5 30.2859 15.0666 32.25 17.5031ZM14.25 33.75C13.4217 33.75 12.75 33.0797 12.75 32.25V27C12.75 26.1703 13.4217 25.5 14.25 25.5H19.5C20.3297 25.5 21 26.1703 21 27C21 27.8297 20.3297 28.5 19.5 28.5H17.9578C19.3687 30.3234 21.5484 31.5 24 31.5C27.2625 31.5 30.0422 29.4141 31.0734 26.4984C31.35 25.7203 32.2078 25.3078 32.9859 25.5844C33.7688 25.8609 34.1766 26.7188 33.9 27.5016C32.4609 31.575 28.575 34.5 24 34.5C20.6531 34.5 17.6719 32.9344 15.75 30.4969V32.25C15.75 33.0797 15.0783 33.75 14.25 33.75Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

11
assets/svg/sun-circle.svg Normal file
View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
<g clip-path="url(#clip0_5813_29015)">
<path d="M16.5734 18.4328C16.8289 18.6892 17.1657 18.8173 17.5015 18.8173C17.8373 18.8173 18.1758 18.6898 18.4328 18.4328C18.9455 17.9201 18.9455 17.0897 18.4328 16.5773L15.9555 14.0999C15.4445 13.5872 14.6123 13.5872 14.0994 14.0999C13.5864 14.6126 13.5867 15.443 14.0994 15.956L16.5734 18.4328ZM24 16.125C24.7246 16.125 25.3125 15.5371 25.3125 14.8125V11.3125C25.3125 10.5879 24.7273 10 24 10C23.2727 10 22.6875 10.5879 22.6875 11.3125V14.8125C22.6875 15.5398 23.2781 16.125 24 16.125ZM16.125 24C16.125 23.2754 15.5371 22.6875 14.8125 22.6875H11.3125C10.5879 22.6875 10 23.2781 10 24C10 24.7219 10.5879 25.3125 11.3125 25.3125H14.8125C15.5398 25.3125 16.125 24.7273 16.125 24ZM30.4969 18.8156C30.8327 18.8156 31.1695 18.6874 31.4249 18.4311L33.8995 15.9549C34.4122 15.4422 34.4122 14.6117 33.8995 14.0988C33.3868 13.5858 32.5548 13.5861 32.0434 14.0988L29.5688 16.575C29.0561 17.0877 29.0561 17.9181 29.5688 18.4306C29.8242 18.6898 30.1633 18.8156 30.4969 18.8156ZM24 31.875C23.2754 31.875 22.6875 32.4629 22.6875 33.1875V36.6875C22.6875 37.4148 23.2781 38 24 38C24.7219 38 25.3125 37.4121 25.3125 36.6875V33.1875C25.3125 32.4656 24.7273 31.875 24 31.875ZM16.5734 29.5672L14.0988 32.0434C13.5861 32.5561 13.5861 33.3866 14.0988 33.8995C14.3552 34.1559 14.6911 34.284 15.0269 34.284C15.3627 34.284 15.6995 34.1559 15.9549 33.8995L18.4295 31.4233C18.9422 30.9106 18.9422 30.0802 18.4295 29.5677C17.9168 29.0553 17.0875 29.0531 16.5734 29.5672ZM36.6875 22.6875H33.1875C32.4629 22.6875 31.875 23.2754 31.875 24C31.875 24.7246 32.4629 25.3125 33.1875 25.3125H36.6875C37.4148 25.3125 38 24.7273 38 24C38 23.2727 37.4148 22.6875 36.6875 22.6875ZM31.4266 29.5672C30.9156 29.0545 30.0834 29.0547 29.5705 29.5674C29.0575 30.0801 29.0578 30.9105 29.5705 31.4229L32.0451 33.8992C32.3006 34.1555 32.6373 34.2837 32.9731 34.2837C33.3089 34.2837 33.6447 34.1555 33.9012 33.8992C34.4139 33.3865 34.4139 32.556 33.9012 32.0431L31.4266 29.5672ZM24 17.875C20.6148 17.875 17.875 20.6148 17.875 24C17.875 27.383 20.617 30.125 24 30.125C27.383 30.125 30.125 27.383 30.125 24C30.125 20.6148 27.3852 17.875 24 17.875Z" fill="#232323"/>
</g>
<defs>
<clipPath id="clip0_5813_29015">
<rect width="28" height="28" fill="white" transform="translate(10 10)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.25 2.83008C21.0105 2.83008 21.625 3.4165 21.625 4.1396C21.625 4.8627 21.0105 5.44913 20.25 5.44913H4.4375C4.05766 5.44913 3.75 5.74377 3.75 6.10389C3.75 6.46401 4.05766 6.75865 4.4375 6.75865H20.25C21.7668 6.75865 23 7.93313 23 9.3777V18.5444C23 19.9889 21.7668 21.1634 20.25 21.1634H3.75C2.23105 21.1634 1 19.9889 1 18.5444V5.44913C1 4.00251 2.23105 2.83008 3.75 2.83008H20.25ZM18.875 15.2706C19.6355 15.2706 20.25 14.6854 20.25 13.961C20.25 13.2367 19.6355 12.6515 18.875 12.6515C18.1145 12.6515 17.5 13.2367 17.5 13.961C17.5 14.6854 18.1145 15.2706 18.875 15.2706Z" fill="#232323"/>
</svg>

After

Width:  |  Height:  |  Size: 702 B

@ -1 +1 @@
Subproject commit f74f31e2f3b4a7c11907ae5df6cd38505cd25897
Subproject commit 51f74f05d465a92e0118cf7c2bcfb049df21af42

View file

@ -243,7 +243,7 @@ SPEC CHECKSUMS:
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_libepiccash: 36241aa7d3126f6521529985ccb3dc5eaf7bb317
flutter_libmonero: da68a616b73dd0374a8419c684fa6b6df2c44ffe
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743

View file

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@ -198,6 +198,7 @@
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 4DQKUWSG6C;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
};
};
@ -451,6 +452,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 79;
DEVELOPMENT_TEAM = 4DQKUWSG6C;
ENABLE_BITCODE = NO;
@ -509,6 +512,7 @@
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -635,6 +639,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 79;
DEVELOPMENT_TEAM = 4DQKUWSG6C;
ENABLE_BITCODE = NO;
@ -693,6 +699,7 @@
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -711,6 +718,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 79;
DEVELOPMENT_TEAM = 4DQKUWSG6C;
ENABLE_BITCODE = NO;
@ -769,6 +778,7 @@
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View file

@ -1,9 +1,12 @@
import 'dart:convert';
import 'package:stackwallet/electrumx_rpc/electrumx.dart';
import 'package:stackwallet/hive/db.dart';
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/logger.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:string_validator/string_validator.dart';
class CachedElectrumX {
final ElectrumX? electrumXClient;
@ -94,10 +97,32 @@ class CachedElectrumX {
// update set with new data
if (newSet["setHash"] != "" && set["setHash"] != newSet["setHash"]) {
set["setHash"] = newSet["setHash"];
set["blockHash"] = newSet["blockHash"];
set["setHash"] = !isHexadecimal(newSet["setHash"] as String)
? base64ToReverseHex(newSet["setHash"] as String)
: newSet["setHash"];
set["blockHash"] = !isHexadecimal(newSet["blockHash"] as String)
? base64ToHex(newSet["blockHash"] as String)
: newSet["blockHash"];
for (int i = (newSet["coins"] as List).length - 1; i >= 0; i--) {
set["coins"].insert(0, newSet["coins"][i]);
dynamic newCoin = newSet["coins"][i];
List translatedCoin = [];
translatedCoin.add(!isHexadecimal(newCoin[0] as String)
? base64ToHex(newCoin[0] as String)
: newCoin[0]);
translatedCoin.add(!isHexadecimal(newCoin[1] as String)
? base64ToReverseHex(newCoin[1] as String)
: newCoin[1]);
try {
translatedCoin.add(!isHexadecimal(newCoin[2] as String)
? base64ToHex(newCoin[2] as String)
: newCoin[2]);
} catch (e, s) {
translatedCoin.add(newCoin[2]);
}
translatedCoin.add(!isHexadecimal(newCoin[3] as String)
? base64ToReverseHex(newCoin[3] as String)
: newCoin[3]);
set["coins"].insert(0, translatedCoin);
}
// save set to db
await DB.instance.put<dynamic>(
@ -118,6 +143,17 @@ class CachedElectrumX {
}
}
String base64ToHex(String source) =>
base64Decode(LineSplitter.split(source).join())
.map((e) => e.toRadixString(16).padLeft(2, '0'))
.join();
String base64ToReverseHex(String source) =>
base64Decode(LineSplitter.split(source).join())
.reversed
.map((e) => e.toRadixString(16).padLeft(2, '0'))
.join();
/// Call electrumx getTransaction on a per coin basis, storing the result in local db if not already there.
///
/// ElectrumX api only called if the tx does not exist in local db
@ -189,7 +225,15 @@ class CachedElectrumX {
);
final serials = await client.getUsedCoinSerials(startNumber: startNumber);
cachedSerials.addAll(serials["serials"] as List);
List newSerials = [];
for (var element in (serials["serials"] as List)) {
if (!isHexadecimal(element as String)) {
newSerials.add(base64ToHex(element));
} else {
newSerials.add(element);
}
}
cachedSerials.addAll(newSerials);
await DB.instance.put<dynamic>(
boxName: DB.instance.boxNameUsedSerialsCache(coin: coin),

View file

@ -9,6 +9,7 @@ import 'package:stackwallet/models/node_model.dart';
import 'package:stackwallet/models/notification_model.dart';
import 'package:stackwallet/models/trade_wallet_lookup.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/logger.dart';
@ -142,6 +143,17 @@ class DB {
_loadSharedCoinCacheBoxes(),
]);
_initialized = true;
try {
if (_boxPrefs.get("familiarity") == null) {
await _boxPrefs.put("familiarity", 0);
}
int count = _boxPrefs.get("familiarity") as int;
await _boxPrefs.put("familiarity", count + 1);
Constants.exchangeForExperiencedUsers(count + 1);
} catch (e, s) {
print("$e $s");
}
}
}

View file

@ -68,6 +68,9 @@ final openedFromSWBFileStringStateProvider =
void main() async {
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
GoogleFonts.config.allowRuntimeFetching = false;
if(Platform.isIOS){
Util.libraryPath = await getLibraryDirectory();
}
if (Util.isDesktop) {
setWindowTitle('Stack Wallet');

View file

@ -276,6 +276,12 @@ class ExchangeFormState extends ChangeNotifier {
void _onExchangeRateTypeChanged() {
print("_onExchangeRateTypeChanged");
updateRanges(shouldNotifyListeners: true).then(
(_) => updateEstimate(
shouldNotifyListeners: true,
reversed: reversed,
),
);
}
void _onExchangeTypeChanged() {

View file

@ -90,6 +90,8 @@ class _AddWalletViewState extends State<AddWalletView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchFieldController,
focusNode: _searchFocusNode,
onChanged: (value) {

View file

@ -194,6 +194,8 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onChanged: (string) {
if (string.isEmpty) {
if (_nextEnabled) {

View file

@ -144,6 +144,8 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
Future<void> chooseDate() async {
final height = MediaQuery.of(context).size.height;
final fetchedColor =
Theme.of(context).extension<StackColors>()!.accentColorDark;
// check and hide keyboard
if (FocusScope.of(context).hasFocus) {
FocusScope.of(context).unfocus();
@ -155,8 +157,7 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
initialDate: DateTime.now(),
height: height * 0.5,
theme: ThemeData(
primarySwatch: Util.createMaterialColor(
Theme.of(context).extension<StackColors>()!.accentColorDark),
primarySwatch: Util.createMaterialColor(fetchedColor),
),
//TODO pick a better initial date
// 2007 chosen as that is just before bitcoin launched
@ -272,6 +273,7 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
// if (!isDesktop)
RestoreFromDatePicker(
onTap: chooseDate,
controller: _dateController,
),
// if (isDesktop)

View file

@ -7,6 +7,8 @@ import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
class MobileMnemonicLengthSelector extends ConsumerWidget {
const MobileMnemonicLengthSelector({
Key? key,
@ -19,7 +21,9 @@ class MobileMnemonicLengthSelector extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
return Stack(
children: [
const TextField(
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
// controller: _lengthController,
readOnly: true,
textInputAction: TextInputAction.none,

View file

@ -4,11 +4,17 @@ import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
class RestoreFromDatePicker extends StatefulWidget {
const RestoreFromDatePicker({Key? key, required this.onTap})
: super(key: key);
const RestoreFromDatePicker({
Key? key,
required this.onTap,
required this.controller,
}) : super(key: key);
final VoidCallback onTap;
final TextEditingController controller;
@override
State<RestoreFromDatePicker> createState() => _RestoreFromDatePickerState();
@ -21,22 +27,18 @@ class _RestoreFromDatePickerState extends State<RestoreFromDatePicker> {
@override
void initState() {
onTap = widget.onTap;
_dateController = TextEditingController();
_dateController = widget.controller;
super.initState();
}
@override
void dispose() {
_dateController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.transparent,
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onTap: onTap,
controller: _dateController,
style: STextStyles.field(context),

View file

@ -21,6 +21,8 @@ import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class AddressBookView extends ConsumerStatefulWidget {
const AddressBookView({Key? key, this.coin}) : super(key: key);
@ -198,6 +200,8 @@ class _AddressBookViewState extends ConsumerState<AddressBookView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: (value) {

View file

@ -22,6 +22,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class AddAddressBookEntryView extends ConsumerStatefulWidget {
const AddAddressBookEntryView({
Key? key,
@ -279,6 +281,8 @@ class _AddAddressBookEntryViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: nameController,
focusNode: nameFocusNode,
style: STextStyles.field(context),

View file

@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class EditContactNameEmojiView extends ConsumerStatefulWidget {
const EditContactNameEmojiView({
Key? key,
@ -200,6 +202,8 @@ class _EditContactNameEmojiViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: nameController,
focusNode: nameFocusNode,
style: STextStyles.field(context),

View file

@ -20,6 +20,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class NewContactAddressEntryForm extends ConsumerStatefulWidget {
const NewContactAddressEntryForm({
Key? key,
@ -71,6 +73,8 @@ class _NewContactAddressEntryFormState
return Column(
children: [
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
readOnly: true,
style: STextStyles.field(context),
decoration: InputDecoration(
@ -154,6 +158,8 @@ class _NewContactAddressEntryFormState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
focusNode: addressLabelFocusNode,
controller: addressLabelController,
style: STextStyles.field(context),
@ -197,6 +203,7 @@ class _NewContactAddressEntryFormState
Constants.size.circularBorderRadius,
),
child: TextField(
enableSuggestions: Util.isDesktop ? false : true,
focusNode: addressFocusNode,
controller: addressController,
style: STextStyles.field(context),
@ -324,7 +331,6 @@ class _NewContactAddressEntryFormState
key: const Key("addAddressBookEntryViewAddressField"),
readOnly: false,
autocorrect: false,
enableSuggestions: false,
// inputFormatters: <TextInputFormatter>[
// FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9]{34}")),
// ],

View file

@ -9,6 +9,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class EditTradeNoteView extends ConsumerStatefulWidget {
const EditTradeNoteView({
Key? key,
@ -85,6 +87,8 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _noteController,
style: STextStyles.field(context),
focusNode: noteFieldFocusNode,

View file

@ -16,6 +16,8 @@ import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:tuple/tuple.dart';
import 'package:stackwallet/utilities/util.dart';
class FixedRateMarketPairCoinSelectionView extends ConsumerStatefulWidget {
const FixedRateMarketPairCoinSelectionView({
Key? key,
@ -152,6 +154,8 @@ class _FixedRateMarketPairCoinSelectionViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: filter,

View file

@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class FloatingRateCurrencySelectionView extends StatefulWidget {
const FloatingRateCurrencySelectionView({
Key? key,
@ -108,6 +110,8 @@ class _FloatingRateCurrencySelectionViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: filter,

View file

@ -19,6 +19,7 @@ import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
import 'package:stackwallet/utilities/logger.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
@ -160,6 +161,8 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: amountController,
focusNode: _amountFocusNode,
style: STextStyles.field(context),
@ -209,6 +212,8 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: noteController,
focusNode: _noteFocusNode,
style: STextStyles.field(context),

View file

@ -41,6 +41,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class SendView extends ConsumerStatefulWidget {
const SendView({
Key? key,
@ -885,7 +887,10 @@ class _SendViewState extends ConsumerState<SendView> {
if (coin == Coin.firo)
Stack(
children: [
const TextField(
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions:
Util.isDesktop ? false : true,
readOnly: true,
textInputAction: TextInputAction.none,
),
@ -1061,6 +1066,8 @@ class _SendViewState extends ConsumerState<SendView> {
height: 8,
),
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
@ -1114,6 +1121,8 @@ class _SendViewState extends ConsumerState<SendView> {
),
if (Prefs.instance.externalCalls)
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
@ -1238,6 +1247,8 @@ class _SendViewState extends ConsumerState<SendView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: noteController,
focusNode: _noteFocusNode,
style: STextStyles.field(context),
@ -1283,6 +1294,8 @@ class _SendViewState extends ConsumerState<SendView> {
Stack(
children: [
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: feeController,
readOnly: true,
textInputAction: TextInputAction.none,

View file

@ -1,11 +1,15 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:event_bus/event_bus.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:path_provider/path_provider.dart';
import 'package:stackwallet/models/isar/models/log.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart';
@ -24,6 +28,15 @@ import 'package:stackwallet/widgets/rounded_container.dart';
import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS;
import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS;
import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS;
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/helpers/stack_file_system.dart';
import 'package:stackwallet/utilities/clipboard_interface.dart';
import 'package:stackwallet/utilities/util.dart';
class DebugView extends ConsumerStatefulWidget {
const DebugView({Key? key}) : super(key: key);
@ -217,6 +230,8 @@ class _DebugViewState extends ConsumerState<DebugView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: (newString) {
@ -268,21 +283,77 @@ class _DebugViewState extends ConsumerState<DebugView> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// BlueTextButton(
// text: ref.watch(debugServiceProvider
// .select((value) => value.isPaused))
// ? "Unpause"
// : "Pause",
// onTap: () {
// ref
// .read(debugServiceProvider)
// .togglePauseUiUpdates();
// },
// ),
BlueTextButton(
text: "Save Debug Info to clipboard",
onTap: () async {
try {
final packageInfo =
await PackageInfo.fromPlatform();
final version = packageInfo.version;
final build = packageInfo.buildNumber;
final signature = packageInfo.buildSignature;
final appName = packageInfo.appName;
String firoCommit =
FIRO_VERSIONS.getPluginVersion();
String epicCashCommit =
EPIC_VERSIONS.getPluginVersion();
String moneroCommit =
MONERO_VERSIONS.getPluginVersion();
DeviceInfoPlugin deviceInfoPlugin =
DeviceInfoPlugin();
final deviceInfo =
await deviceInfoPlugin.deviceInfo;
var deviceInfoMap = deviceInfo.toMap();
deviceInfoMap.remove("systemFeatures");
final logs = filtered(
ref.watch(debugServiceProvider.select(
(value) => value.recentLogs)),
_searchTerm)
.reversed
.toList(growable: false);
List errorLogs = [];
for (var log in logs) {
if (log.logLevel == LogLevel.Error ||
log.logLevel == LogLevel.Fatal) {
errorLogs.add(
"${log.logLevel}: ${log.message}");
}
}
final finalDebugMap = {
"version": version,
"build": build,
"signature": signature,
"appName": appName,
"firoCommit": firoCommit,
"epicCashCommit": epicCashCommit,
"moneroCommit": moneroCommit,
"deviceInfoMap": deviceInfoMap,
"errorLogs": errorLogs,
};
Logging.instance.log(
json.encode(finalDebugMap),
level: LogLevel.Info,
printFullLength: true);
const ClipboardInterface clipboard =
ClipboardWrapper();
await clipboard.setData(
ClipboardData(
text: json.encode(finalDebugMap)),
);
} catch (e, s) {
Logging.instance
.log("$e $s", level: LogLevel.Error);
}
},
),
const Spacer(),
BlueTextButton(
text: "Save logs to file",
onTap: () async {
final systemfile = StackFileSystem();
await systemfile.prepareStorage();
Directory rootPath =
(await getApplicationDocumentsDirectory());
@ -309,8 +380,9 @@ class _DebugViewState extends ConsumerState<DebugView> {
} else {
path = await FilePicker.platform
.getDirectoryPath(
dialogTitle: "Choose Backup location",
initialDirectory: dir.path,
dialogTitle: "Choose Log Save Location",
initialDirectory:
systemfile.startPath!.path,
lockParentWindow: true,
);
}
@ -332,9 +404,17 @@ class _DebugViewState extends ConsumerState<DebugView> {
),
));
final filename = await ref
.read(debugServiceProvider)
.exportToFile(path, eventBus);
bool logssaved = true;
var filename;
try {
filename = await ref
.read(debugServiceProvider)
.exportToFile(path, eventBus);
} catch (e, s) {
logssaved = false;
Logging.instance
.log("$e $s", level: LogLevel.Error);
}
shouldPop = true;
@ -346,7 +426,9 @@ class _DebugViewState extends ConsumerState<DebugView> {
showDialog(
context: context,
builder: (context) => StackOkDialog(
title: "Logs saved to",
title: logssaved
? "Logs saved to"
: "Error Saving Logs",
message: "${path!}/$filename",
),
),
@ -356,7 +438,9 @@ class _DebugViewState extends ConsumerState<DebugView> {
showFloatingFlushBar(
type: FlushBarType.info,
context: context,
message: 'Logs file saved',
message: logssaved
? 'Logs file saved'
: "Error Saving Logs",
),
);
}

View file

@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_container.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class BaseCurrencySettingsView extends ConsumerStatefulWidget {
const BaseCurrencySettingsView({Key? key}) : super(key: key);
@ -140,6 +142,8 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: (newString) {

View file

@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_container.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class LanguageSettingsView extends ConsumerStatefulWidget {
const LanguageSettingsView({Key? key}) : super(key: key);
@ -138,6 +140,8 @@ class _LanguageViewState extends ConsumerState<LanguageSettingsView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: (newString) {

View file

@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:uuid/uuid.dart';
import 'package:stackwallet/utilities/util.dart';
enum AddEditNodeViewType { add, edit }
class AddEditNodeView extends ConsumerStatefulWidget {
@ -648,6 +650,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key: const Key("addCustomNodeNodeNameFieldKey"),
readOnly: widget.readOnly,
enabled: enableField(_nameController),
@ -695,6 +699,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key: const Key("addCustomNodeNodeAddressFieldKey"),
readOnly: widget.readOnly,
enabled: enableField(_hostController),
@ -746,6 +752,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key: const Key("addCustomNodeNodePortFieldKey"),
readOnly: widget.readOnly,
enabled: enableField(_portController),
@ -797,6 +805,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _usernameController,
readOnly: widget.readOnly,
enabled: enableField(_usernameController),
@ -844,6 +854,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _passwordController,
readOnly: widget.readOnly,
enabled: enableField(_passwordController),

View file

@ -7,7 +7,10 @@ import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
import 'package:tuple/tuple.dart';
class CoinNodesView extends ConsumerStatefulWidget {
@ -37,69 +40,139 @@ class _CoinNodesViewState extends ConsumerState<CoinNodesView> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(
"${widget.coin.prettyName} nodes",
style: STextStyles.navBarTitle(context),
),
actions: [
Padding(
padding: const EdgeInsets.only(
top: 10,
bottom: 10,
right: 10,
),
child: AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
key: const Key("manageNodesAddNewNodeButtonKey"),
size: 36,
shadows: const [],
color: Theme.of(context).extension<StackColors>()!.background,
icon: SvgPicture.asset(
Assets.svg.plus,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
width: 20,
height: 20,
if (Util.isDesktop) {
return DesktopDialog(
child: Column(
children: [
Row(
children: [
const SizedBox(
width: 32,
),
onPressed: () {
Navigator.of(context).pushNamed(
AddEditNodeView.routeName,
arguments: Tuple4(
AddEditNodeViewType.add,
widget.coin,
null,
CoinNodesView.routeName,
SvgPicture.asset(
Assets.svg.iconFor(coin: widget.coin),
width: 24,
height: 24,
),
const SizedBox(
width: 12,
),
Text(
"${widget.coin.prettyName} nodes",
style: STextStyles.desktopH3(context),
textAlign: TextAlign.center,
),
Expanded(
child: const DesktopDialogCloseButton(),
),
],
),
Padding(
padding: EdgeInsets.only(
left: 32,
right: 32,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"${widget.coin.prettyName} nodes",
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color:
Theme.of(context).extension<StackColors>()!.textDark3,
),
);
},
textAlign: TextAlign.left,
),
RichText(
text: TextSpan(
text: 'Add new nodes',
style:
STextStyles.desktopTextExtraSmall(context).copyWith(
color: Colors.blueAccent,
),
),
),
],
),
),
),
],
),
body: Padding(
padding: const EdgeInsets.only(
top: 12,
left: 12,
right: 12,
const SizedBox(
width: 12,
),
Padding(
padding: const EdgeInsets.all(20),
child: NodesList(
coin: widget.coin,
popBackToRoute: CoinNodesView.routeName,
),
),
],
),
child: SingleChildScrollView(
child: NodesList(
coin: widget.coin,
popBackToRoute: CoinNodesView.routeName,
);
} else {
return Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(
"${widget.coin.prettyName} nodes",
style: STextStyles.navBarTitle(context),
),
actions: [
Padding(
padding: const EdgeInsets.only(
top: 10,
bottom: 10,
right: 10,
),
child: AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
key: const Key("manageNodesAddNewNodeButtonKey"),
size: 36,
shadows: const [],
color: Theme.of(context).extension<StackColors>()!.background,
icon: SvgPicture.asset(
Assets.svg.plus,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
width: 20,
height: 20,
),
onPressed: () {
Navigator.of(context).pushNamed(
AddEditNodeView.routeName,
arguments: Tuple4(
AddEditNodeViewType.add,
widget.coin,
null,
CoinNodesView.routeName,
),
);
},
),
),
),
],
),
body: Padding(
padding: const EdgeInsets.only(
top: 12,
left: 12,
right: 12,
),
child: SingleChildScrollView(
child: NodesList(
coin: widget.coin,
popBackToRoute: CoinNodesView.routeName,
),
),
),
),
);
);
}
}
}

View file

@ -19,6 +19,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:stackwallet/utilities/util.dart';
class AutoBackupView extends ConsumerStatefulWidget {
const AutoBackupView({Key? key}) : super(key: key);
@ -423,6 +425,8 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
height: 10,
),
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key: const Key("backupFrequencyFieldKey"),
controller: frequencyController,
enabled: false,

View file

@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:zxcvbn/zxcvbn.dart';
import 'package:stackwallet/utilities/util.dart';
class CreateAutoBackupView extends ConsumerStatefulWidget {
const CreateAutoBackupView({
Key? key,
@ -146,6 +148,8 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
),
if (!Platform.isAndroid)
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onTap: Platform.isAndroid
? null
: () async {
@ -411,7 +415,9 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
),
Stack(
children: [
const TextField(
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
readOnly: true,
textInputAction: TextInputAction.none,
),

View file

@ -14,6 +14,7 @@ import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
import 'package:stackwallet/utilities/logger.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/progress_bar.dart';
import 'package:stackwallet/widgets/stack_dialog.dart';
@ -129,6 +130,8 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
return Container(
color: Colors.transparent,
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onTap: Platform.isAndroid
? null
: () async {

View file

@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:zxcvbn/zxcvbn.dart';
import '../../../../utilities/util.dart';
class EditAutoBackupView extends ConsumerStatefulWidget {
const EditAutoBackupView({
Key? key,
@ -148,6 +150,8 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
),
if (!Platform.isAndroid)
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onTap: Platform.isAndroid
? null
: () async {
@ -413,7 +417,9 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
),
Stack(
children: [
const TextField(
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
readOnly: true,
textInputAction: TextInputAction.none,
),

View file

@ -687,27 +687,14 @@ abstract class SWB {
uiState?.walletStates = walletStates;
List<Future<bool>> restoreStatuses = [];
final List<Tuple2<dynamic, Manager>> firoWallets = [];
final List<Tuple2<dynamic, Manager>> firoTestnetWallets = [];
final List<Tuple2<dynamic, Manager>> epicCashWallets = [];
// start restoring wallets
for (final tuple in managers) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
if (tuple.item2.coin == Coin.firoTestNet) {
firoTestnetWallets.add(tuple);
continue;
} else if (tuple.item2.coin == Coin.firo) {
firoWallets.add(tuple);
continue;
} else if (tuple.item2.coin == Coin.epicCash) {
epicCashWallets.add(tuple);
continue;
}
restoreStatuses.add(asyncRestore(tuple, uiState, walletsService));
final bools = await asyncRestore(tuple, uiState, walletsService);
restoreStatuses.add(Future(() => bools));
}
// check if cancel was requested and restore previous state
@ -715,153 +702,6 @@ abstract class SWB {
return false;
}
if (firoTestnetWallets.isNotEmpty) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
for (final wallet in firoTestnetWallets) {
uiState?.update(
walletId: wallet.item2.walletId,
restoringStatus: StackRestoringStatus.restoring,
);
}
// try using node from backup first
NodeModel node = nodeService.getPrimaryNodeFor(coin: Coin.firoTestNet) ??
DefaultNodes.getNodeFor(Coin.firoTestNet);
final electrumxNode = ElectrumXNode(
address: node.host,
port: node.port,
name: node.name,
id: node.id,
useSSL: node.useSSL,
);
final failovers = nodeService.failoverNodesFor(coin: Coin.firoTestNet);
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
final cachedClient = CachedElectrumX.from(
node: electrumxNode,
prefs: _prefs,
failovers: failovers
.map(
(e) => ElectrumXNode(
address: e.host,
port: e.port,
name: e.name,
id: e.id,
useSSL: e.useSSL,
),
)
.toList(),
);
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
// Anonymity Set often fails when gathering from the server
const int maxTries = 5;
for (int j = 0; j < maxTries; j++) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
try {
await cachedClient.getAnonymitySet(
groupId: "1",
coin: Coin.firoTestNet,
);
break;
} catch (_) {
continue;
}
}
}
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
if (firoWallets.isNotEmpty) {
for (final wallet in firoWallets) {
uiState?.update(
walletId: wallet.item2.walletId,
restoringStatus: StackRestoringStatus.restoring,
);
}
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
// try using node from backup first
NodeModel node = nodeService.getPrimaryNodeFor(coin: Coin.firo) ??
DefaultNodes.getNodeFor(Coin.firo);
final electrumxNode = ElectrumXNode(
address: node.host,
port: node.port,
name: node.name,
id: node.id,
useSSL: node.useSSL,
);
final failovers = nodeService.failoverNodesFor(coin: Coin.firoTestNet);
final cachedClient = CachedElectrumX.from(
node: electrumxNode,
prefs: _prefs,
failovers: failovers
.map(
(e) => ElectrumXNode(
address: e.host,
port: e.port,
name: e.name,
id: e.id,
useSSL: e.useSSL,
),
)
.toList());
// Anonymity Set often fails when gathering from the server
const int maxTries = 5;
for (int j = 0; j < maxTries; j++) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
try {
await cachedClient.getAnonymitySet(
groupId: "1",
coin: Coin.firo,
);
break;
} catch (_) {
continue;
}
}
}
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
for (final tuple in firoTestnetWallets) {
restoreStatuses.add(asyncRestore(tuple, uiState, walletsService));
}
for (final tuple in firoWallets) {
restoreStatuses.add(asyncRestore(tuple, uiState, walletsService));
}
for (Future<bool> status in restoreStatuses) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
@ -869,13 +709,7 @@ abstract class SWB {
}
await status;
}
for (int i = 0; i < epicCashWallets.length; i++) {
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {
return false;
}
await asyncRestore(epicCashWallets[i], uiState, walletsService);
}
if (!Platform.isLinux) await Wakelock.disable();
// check if cancel was requested and restore previous state
if (_checkShouldCancel(preRestoreState)) {

View file

@ -20,6 +20,8 @@ import 'package:stackwallet/widgets/loading_indicator.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:tuple/tuple.dart';
import 'package:stackwallet/utilities/util.dart';
class RestoreFromFileView extends ConsumerStatefulWidget {
const RestoreFromFileView({Key? key}) : super(key: key);
@ -96,6 +98,8 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
onTap: () async {
try {
await stackFileSystem.prepareStorage();

View file

@ -445,7 +445,7 @@ class _StackRestoreProgressViewState
},
style: Theme.of(context)
.extension<StackColors>()!
.getSecondaryEnabledButtonColor(context),
.getPrimaryEnabledButtonColor(context),
child: Text(
_success ? "OK" : "Cancel restore process",
style: STextStyles.button(context).copyWith(

View file

@ -30,6 +30,8 @@ import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:tuple/tuple.dart';
import 'package:stackwallet/utilities/util.dart';
/// [eventBus] should only be set during testing
class WalletSettingsView extends StatefulWidget {
const WalletSettingsView({
@ -374,6 +376,8 @@ class _EpiBoxInfoFormState extends ConsumerState<EpicBoxInfoForm> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: hostController,
decoration: const InputDecoration(hintText: "Host"),
),
@ -381,6 +385,8 @@ class _EpiBoxInfoFormState extends ConsumerState<EpicBoxInfoForm> {
height: 8,
),
TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: portController,
decoration: const InputDecoration(hintText: "Port"),
keyboardType: const TextInputType.numberWithOptions(),

View file

@ -11,6 +11,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class RenameWalletView extends ConsumerStatefulWidget {
const RenameWalletView({
Key? key,
@ -74,6 +76,8 @@ class _RenameWalletViewState extends ConsumerState<RenameWalletView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _controller,
focusNode: _focusNode,
style: STextStyles.field(context),

View file

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
@ -6,12 +8,17 @@ import 'package:stackwallet/pages_desktop_specific/create_password/create_passwo
import 'package:stackwallet/providers/global/prefs_provider.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import '../hive/db.dart';
import '../providers/global/price_provider.dart';
import '../services/exchange/exchange_data_loading_service.dart';
class StackPrivacyCalls extends ConsumerStatefulWidget {
const StackPrivacyCalls({
Key? key,
@ -160,6 +167,21 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
onPressed: () {
ref.read(prefsChangeNotifierProvider).externalCalls =
isEasy;
DB.instance
.put<dynamic>(
boxName: DB.boxNamePrefs,
key: "externalCalls",
value: isEasy)
.then((_) {
if (isEasy) {
unawaited(
ExchangeDataLoadingService().loadAll(ref));
ref
.read(priceAnd24hChangeNotifierProvider)
.start(true);
}
});
if (!widget.isSettings) {
if (isDesktop) {
Navigator.of(context).pushNamed(

View file

@ -21,6 +21,8 @@ import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/widgets/transaction_card.dart';
import 'package:tuple/tuple.dart';
import 'package:stackwallet/utilities/util.dart';
class AllTransactionsView extends ConsumerStatefulWidget {
const AllTransactionsView({
Key? key,
@ -234,6 +236,8 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _searchController,
focusNode: searchFieldFocusNode,
onChanged: (value) {

View file

@ -9,6 +9,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/utilities/util.dart';
class EditNoteView extends ConsumerStatefulWidget {
const EditNoteView({
Key? key,
@ -87,6 +89,8 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
controller: _noteController,
style: STextStyles.field(context),
focusNode: noteFieldFocusNode,

View file

@ -569,6 +569,8 @@ class _TransactionSearchViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key: const Key("transactionSearchViewAmountFieldKey"),
controller: _amountTextEditingController,
focusNode: amountTextFieldFocusNode,
@ -636,6 +638,8 @@ class _TransactionSearchViewState
Constants.size.circularBorderRadius,
),
child: TextField(
autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true,
key:
const Key("transactionSearchViewKeywordFieldKey"),
controller: _keywordTextEditingController,

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages_desktop_specific/home/desktop_menu.dart';
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
import 'package:stackwallet/route_generator.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
@ -18,6 +19,7 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
int currentViewIndex = 0;
final List<Widget> contentViews = [
const Navigator(
key: Key("desktopStackHomeKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: MyStackView.routeName,
),
@ -30,8 +32,10 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
Container(
color: Colors.orange,
),
Container(
color: Colors.yellow,
const Navigator(
key: Key("desktopSettingHomeKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: DesktopSettingsView.routeName,
),
Container(
color: Colors.blue,
@ -39,9 +43,6 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
Container(
color: Colors.pink,
),
Container(
color: Colors.purple,
),
];
void onMenuSelectionChanged(int newIndex) {
@ -59,6 +60,10 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
DesktopMenu(
onSelectionChanged: onMenuSelectionChanged,
),
Container(
width: 1,
color: Theme.of(context).extension<StackColors>()!.background,
),
Expanded(
child: contentViews[currentViewIndex],
),

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -70,136 +72,197 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
const SizedBox(
height: 60,
),
SizedBox(
width: _width == expandedWidth
? _width - 32 // 16 padding on either side
: _width - 16, // 8 padding on either side
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.walletFa,
width: 20,
height: 20,
Expanded(
child: SizedBox(
width: _width == expandedWidth
? _width - 32 // 16 padding on either side
: _width - 16, // 8 padding on either side
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.walletDesktop,
width: 20,
height: 20,
color: 0 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "My Stack",
value: 0,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
label: "My Stack",
value: 0,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.exchange3,
width: 20,
height: 20,
const SizedBox(
height: 2,
),
label: "Exchange",
value: 1,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.bell,
width: 20,
height: 20,
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.exchangeDesktop,
width: 20,
height: 20,
color: 1 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Exchange",
value: 1,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
label: "Notifications",
value: 2,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.addressBook2,
width: 20,
height: 20,
const SizedBox(
height: 2,
),
label: "Address Book",
value: 3,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.gear,
width: 20,
height: 20,
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.bell,
width: 20,
height: 20,
color: 2 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Notifications",
value: 2,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
label: "Settings",
value: 4,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.messageQuestion,
width: 20,
height: 20,
const SizedBox(
height: 2,
),
label: "Support",
value: 5,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.messageQuestion,
width: 20,
height: 20,
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.addressBookDesktop,
width: 20,
height: 20,
color: 3 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Address Book",
value: 3,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
label: "About",
value: 6,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.messageQuestion,
width: 20,
height: 20,
const SizedBox(
height: 2,
),
label: "Exit",
value: 7,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
],
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.gear,
width: 20,
height: 20,
color: 4 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Settings",
value: 4,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.messageQuestion,
width: 20,
height: 20,
color: 5 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Support",
value: 5,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const SizedBox(
height: 2,
),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.aboutDesktop,
width: 20,
height: 20,
color: 6 == selectedMenuItem
? Theme.of(context)
.extension<StackColors>()!
.textDark
: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "About",
value: 6,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
iconOnly: _width == minimizedWidth,
),
const Spacer(),
DesktopMenuItem(
icon: SvgPicture.asset(
Assets.svg.exitDesktop,
width: 20,
height: 20,
color: Theme.of(context)
.extension<StackColors>()!
.textDark
.withOpacity(0.8),
),
label: "Exit",
value: 7,
group: selectedMenuItem,
onChanged: (_) {
// todo: save stuff/ notify before exit?
exit(0);
},
iconOnly: _width == minimizedWidth,
),
],
),
),
),
const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
const Spacer(),
IconButton(
@ -212,7 +275,7 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
),
),
],
)
),
],
),
),

View file

@ -0,0 +1,110 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/advanced_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/appearance_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/currency_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/language_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/nodes_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/security_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/syncing_preferences_settings.dart';
import 'package:stackwallet/route_generator.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
class DesktopSettingsView extends ConsumerStatefulWidget {
const DesktopSettingsView({Key? key}) : super(key: key);
static const String routeName = "/desktopSettings";
@override
ConsumerState<DesktopSettingsView> createState() =>
_DesktopSettingsViewState();
}
class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
int currentViewIndex = 0;
final List<Widget> contentViews = [
const Navigator(
key: Key("settingsBackupRestoreDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: BackupRestoreSettings.routeName,
), //b+r
const Navigator(
key: Key("settingsSecurityDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: SecuritySettings.routeName,
), //security
const Navigator(
key: Key("settingsCurrencyDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: CurrencySettings.routeName,
), //currency
const Navigator(
key: Key("settingsLanguageDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: LanguageOptionSettings.routeName,
), //language
const Navigator(
key: Key("settingsNodesDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: NodesSettings.routeName,
), //nodes
const Navigator(
key: Key("settingsSyncingPreferencesDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: SyncingPreferencesSettings.routeName,
), //syncing prefs
const Navigator(
key: Key("settingsAppearanceDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: AppearanceOptionSettings.routeName,
), //appearance
const Navigator(
key: Key("settingsAdvancedDesktopKey"),
onGenerateRoute: RouteGenerator.generateRoute,
initialRoute: AdvancedSettings.routeName,
), //advanced
];
void onMenuSelectionChanged(int newIndex) {
setState(() {
currentViewIndex = newIndex;
});
}
@override
Widget build(BuildContext context) {
return DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: DesktopAppBar(
isCompactHeight: true,
leading: Row(
children: [
const SizedBox(
width: 24,
height: 24,
),
Text(
"Settings",
style: STextStyles.desktopH3(context),
)
],
),
),
body: Row(
children: [
SettingsMenu(
onSelectionChanged: onMenuSelectionChanged,
),
Expanded(
child: contentViews[currentViewIndex],
),
],
),
);
}
}

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_view.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart';
@ -37,6 +38,12 @@ class CoinWalletsTable extends ConsumerWidget {
),
WalletInfoRow(
walletId: walletIds[i],
onPressed: () async {
await Navigator.of(context).pushNamed(
DesktopWalletView.routeName,
arguments: walletIds[i],
);
},
),
],
),

View file

@ -0,0 +1,283 @@
import 'package:decimal/decimal.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart';
import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_refresh_button.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/providers/wallet/wallet_balance_toggle_state_provider.dart';
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/enums/wallet_balance_toggle_state.dart';
import 'package:stackwallet/utilities/format.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/animated_text.dart';
class DesktopWalletSummary extends StatefulWidget {
const DesktopWalletSummary({
Key? key,
required this.walletId,
required this.managerProvider,
required this.initialSyncStatus,
}) : super(key: key);
final String walletId;
final ChangeNotifierProvider<Manager> managerProvider;
final WalletSyncStatus initialSyncStatus;
@override
State<DesktopWalletSummary> createState() => _WDesktopWalletSummaryState();
}
class _WDesktopWalletSummaryState extends State<DesktopWalletSummary> {
late final String walletId;
late final ChangeNotifierProvider<Manager> managerProvider;
void showSheet() {
showModalBottomSheet<dynamic>(
backgroundColor: Colors.transparent,
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
builder: (_) => WalletBalanceToggleSheet(walletId: walletId),
);
}
Decimal? _balanceTotalCached;
Decimal? _balanceCached;
@override
void initState() {
walletId = widget.walletId;
managerProvider = widget.managerProvider;
super.initState();
}
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Consumer(
builder: (_, ref, __) {
final Coin coin =
ref.watch(managerProvider.select((value) => value.coin));
final externalCalls = ref.watch(prefsChangeNotifierProvider
.select((value) => value.externalCalls));
Future<Decimal>? totalBalanceFuture;
Future<Decimal>? availableBalanceFuture;
if (coin == Coin.firo || coin == Coin.firoTestNet) {
final firoWallet =
ref.watch(managerProvider.select((value) => value.wallet))
as FiroWallet;
totalBalanceFuture = firoWallet.availablePublicBalance();
availableBalanceFuture = firoWallet.availablePrivateBalance();
} else {
totalBalanceFuture = ref.watch(
managerProvider.select((value) => value.totalBalance));
availableBalanceFuture = ref.watch(managerProvider
.select((value) => value.availableBalance));
}
final locale = ref.watch(localeServiceChangeNotifierProvider
.select((value) => value.locale));
final baseCurrency = ref.watch(prefsChangeNotifierProvider
.select((value) => value.currency));
final priceTuple = ref.watch(priceAnd24hChangeNotifierProvider
.select((value) => value.getPrice(coin)));
final _showAvailable =
ref.watch(walletBalanceToggleStateProvider.state).state ==
WalletBalanceToggleState.available;
return FutureBuilder(
future: _showAvailable
? availableBalanceFuture
: totalBalanceFuture,
builder: (fbContext, AsyncSnapshot<Decimal> snapshot) {
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData &&
snapshot.data != null) {
if (_showAvailable) {
_balanceCached = snapshot.data!;
} else {
_balanceTotalCached = snapshot.data!;
}
}
Decimal? balanceToShow =
_showAvailable ? _balanceCached : _balanceTotalCached;
if (balanceToShow != null) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: showSheet,
child: Row(
children: [
if (coin == Coin.firo ||
coin == Coin.firoTestNet)
Text(
"${_showAvailable ? "Private" : "Public"} Balance",
style: STextStyles.subtitle500(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
),
if (coin != Coin.firo &&
coin != Coin.firoTestNet)
Text(
"${_showAvailable ? "Available" : "Full"} Balance",
style: STextStyles.subtitle500(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
),
const SizedBox(
width: 4,
),
SvgPicture.asset(
Assets.svg.chevronDown,
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
width: 8,
height: 4,
),
],
),
),
FittedBox(
fit: BoxFit.scaleDown,
child: Text(
"${Format.localizedStringAsFixed(
value: balanceToShow,
locale: locale,
decimalPlaces: 8,
)} ${coin.ticker}",
style: STextStyles.desktopH3(context),
),
),
if (externalCalls)
Text(
"${Format.localizedStringAsFixed(
value: priceTuple.item1 * balanceToShow,
locale: locale,
decimalPlaces: 2,
)} $baseCurrency",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textSubtitle1,
),
),
],
);
} else {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: showSheet,
child: Row(
children: [
if (coin == Coin.firo ||
coin == Coin.firoTestNet)
Text(
"${_showAvailable ? "Private" : "Public"} Balance",
style: STextStyles.subtitle500(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
),
if (coin != Coin.firo &&
coin != Coin.firoTestNet)
Text(
"${_showAvailable ? "Available" : "Full"} Balance",
style: STextStyles.subtitle500(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
),
const SizedBox(
width: 4,
),
SvgPicture.asset(
Assets.svg.chevronDown,
width: 8,
height: 4,
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
],
),
),
AnimatedText(
stringsToLoopThrough: const [
"Loading balance ",
"Loading balance. ",
"Loading balance.. ",
"Loading balance..."
],
style: STextStyles.desktopH3(context).copyWith(
fontSize: 24,
color: Theme.of(context)
.extension<StackColors>()!
.textFavoriteCard,
),
),
AnimatedText(
stringsToLoopThrough: const [
"Loading balance ",
"Loading balance. ",
"Loading balance.. ",
"Loading balance..."
],
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textSubtitle1,
),
),
],
);
}
},
);
},
),
],
),
WalletRefreshButton(
walletId: walletId,
initialSyncStatus: widget.initialSyncStatus,
)
],
);
}
}

View file

@ -0,0 +1,526 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_summary.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/receive/desktop_receive.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/send/desktop_send.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class DesktopWalletView extends ConsumerStatefulWidget {
const DesktopWalletView({
Key? key,
required this.walletId,
}) : super(key: key);
static const String routeName = "/desktopWalletView";
final String walletId;
@override
ConsumerState<DesktopWalletView> createState() => _DesktopWalletViewState();
}
class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
late final String walletId;
Future<void> onBackPressed() async {
// TODO log out and close wallet before popping back
Navigator.of(context).pop();
}
@override
void initState() {
walletId = widget.walletId;
super.initState();
}
@override
Widget build(BuildContext context) {
final manager = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(walletId)));
final coin = manager.coin;
final managerProvider = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManagerProvider(walletId)));
return DesktopScaffold(
appBar: DesktopAppBar(
background: Theme.of(context).extension<StackColors>()!.popupBG,
leading: Row(
children: [
const SizedBox(
width: 32,
),
AppBarIconButton(
size: 32,
color: Theme.of(context)
.extension<StackColors>()!
.textFieldDefaultBG,
shadows: const [],
icon: SvgPicture.asset(
Assets.svg.arrowLeft,
width: 18,
height: 18,
color: Theme.of(context)
.extension<StackColors>()!
.topNavIconPrimary,
),
onPressed: onBackPressed,
),
const SizedBox(
width: 15,
),
SvgPicture.asset(
Assets.svg.iconFor(coin: coin),
width: 32,
height: 32,
),
const SizedBox(
width: 12,
),
Text(
manager.walletName,
style: STextStyles.desktopH3(context),
),
],
),
trailing: Row(
children: const [
NetworkInfoButton(),
SizedBox(
width: 32,
),
WalletKeysButton(),
SizedBox(
width: 32,
),
],
),
isCompactHeight: true,
),
body: Padding(
padding: const EdgeInsets.all(24),
child: Column(
children: [
RoundedWhiteContainer(
padding: const EdgeInsets.all(20),
child: Row(
children: [
SvgPicture.asset(
Assets.svg.iconFor(coin: coin),
width: 40,
height: 40,
),
const SizedBox(
width: 10,
),
DesktopWalletSummary(
walletId: walletId,
managerProvider: managerProvider,
initialSyncStatus: ref.watch(managerProvider
.select((value) => value.isRefreshing))
? WalletSyncStatus.syncing
: WalletSyncStatus.synced,
),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// Text(
// "TODO: balance",
// style: STextStyles.desktopH3(context),
// ),
// const SizedBox(
// width: 8,
// ),
// Container(
// color: Colors.red,
// width: 20,
// height: 20,
// ),
// ],
// ),
// Text(
// "todo: fiat balance",
// style:
// STextStyles.desktopTextExtraSmall(context).copyWith(
// color: Theme.of(context)
// .extension<StackColors>()!
// .textSubtitle1,
// ),
// )
// ],
// ),
const Spacer(),
SecondaryButton(
width: 180,
height: 56,
onPressed: () {
// todo: go to wallet initiated exchange
},
label: "Exchange",
icon: Container(
color: Colors.red,
width: 20,
height: 20,
),
)
],
),
),
const SizedBox(
height: 24,
),
Expanded(
child: Row(
children: [
SizedBox(
width: 450,
child: MyWallet(
walletId: walletId,
),
),
const SizedBox(
width: 16,
),
Expanded(
child: RecentDesktopTransactions(),
),
],
),
),
],
),
),
);
}
}
class MyWallet extends StatefulWidget {
const MyWallet({
Key? key,
required this.walletId,
}) : super(key: key);
final String walletId;
@override
State<MyWallet> createState() => _MyWalletState();
}
class _MyWalletState extends State<MyWallet> {
int _selectedIndex = 0;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"My wallet",
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFieldActiveSearchIconLeft,
),
),
const SizedBox(
height: 16,
),
Container(
decoration: BoxDecoration(
color: Theme.of(context).extension<StackColors>()!.popupBG,
borderRadius: BorderRadius.vertical(
top: Radius.circular(
Constants.size.circularBorderRadius,
),
),
),
child: SendReceiveTabMenu(
onChanged: (index) {
setState(() {
_selectedIndex = index;
});
},
),
),
Container(
decoration: BoxDecoration(
color: Theme.of(context).extension<StackColors>()!.popupBG,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(
Constants.size.circularBorderRadius,
),
),
),
child: IndexedStack(
index: _selectedIndex,
children: [
Padding(
key: const Key("desktopSendViewPortKey"),
padding: const EdgeInsets.all(20),
child: DesktopSend(
walletId: widget.walletId,
),
),
Padding(
key: const Key("desktopReceiveViewPortKey"),
padding: const EdgeInsets.all(20),
child: DesktopReceive(
walletId: widget.walletId,
),
),
],
),
),
const Spacer(),
],
);
}
}
class SendReceiveTabMenu extends StatefulWidget {
const SendReceiveTabMenu({
Key? key,
this.initialIndex = 0,
this.onChanged,
}) : super(key: key);
final int initialIndex;
final void Function(int)? onChanged;
@override
State<SendReceiveTabMenu> createState() => _SendReceiveTabMenuState();
}
class _SendReceiveTabMenuState extends State<SendReceiveTabMenu> {
late int _selectedIndex;
void _onChanged(int newIndex) {
if (_selectedIndex != newIndex) {
setState(() {
_selectedIndex = newIndex;
});
widget.onChanged?.call(_selectedIndex);
}
}
@override
void initState() {
_selectedIndex = widget.initialIndex;
super.initState();
}
@override
Widget build(BuildContext context) {
return Row(
children: [
Expanded(
child: GestureDetector(
onTap: () => _onChanged(0),
child: Container(
color: Colors.transparent,
child: Column(
children: [
const SizedBox(
height: 16,
),
Text(
"Send",
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color: _selectedIndex == 0
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Theme.of(context)
.extension<StackColors>()!
.textSubtitle1,
),
),
const SizedBox(
height: 19,
),
Container(
height: 2,
decoration: BoxDecoration(
color: _selectedIndex == 0
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Theme.of(context)
.extension<StackColors>()!
.background,
),
),
],
),
),
),
),
Expanded(
child: GestureDetector(
onTap: () => _onChanged(1),
child: Container(
color: Colors.transparent,
child: Column(
children: [
const SizedBox(
height: 16,
),
Text(
"Receive",
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color: _selectedIndex == 1
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Theme.of(context)
.extension<StackColors>()!
.textSubtitle1,
),
),
const SizedBox(
height: 19,
),
Container(
height: 2,
decoration: BoxDecoration(
color: _selectedIndex == 1
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Theme.of(context)
.extension<StackColors>()!
.background,
),
),
],
),
),
),
),
],
);
}
}
class RecentDesktopTransactions extends StatefulWidget {
const RecentDesktopTransactions({Key? key}) : super(key: key);
@override
State<RecentDesktopTransactions> createState() =>
_RecentDesktopTransactionsState();
}
class _RecentDesktopTransactionsState extends State<RecentDesktopTransactions> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Recent transactions",
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textFieldActiveSearchIconLeft,
),
),
BlueTextButton(
text: "See all",
onTap: () {
// todo: show all txns
},
),
],
),
const SizedBox(
height: 16,
),
Expanded(
child: RoundedWhiteContainer(
padding: const EdgeInsets.all(0),
child: Container(),
),
),
],
);
}
}
class NetworkInfoButton extends StatelessWidget {
const NetworkInfoButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
child: Container(
color: Colors.transparent,
child: Row(
children: [
SvgPicture.asset(
Assets.svg.network,
width: 24,
height: 24,
color:
Theme.of(context).extension<StackColors>()!.accentColorGreen,
),
const SizedBox(
width: 6,
),
Text(
"Synchronised",
style: STextStyles.desktopMenuItemSelected(context),
)
],
),
),
);
}
}
class WalletKeysButton extends StatelessWidget {
const WalletKeysButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
child: Container(
color: Colors.transparent,
child: Row(
children: [
SvgPicture.asset(
Assets.svg.key,
width: 20,
height: 20,
color: Theme.of(context)
.extension<StackColors>()!
.buttonTextSecondary,
),
const SizedBox(
width: 6,
),
Text(
"Wallet keys",
style: STextStyles.desktopMenuItemSelected(context),
)
],
),
),
);
}
}

View file

@ -0,0 +1,236 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/receive_view/generate_receiving_uri_qr_code_view.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/route_generator.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/clipboard_interface.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
import 'package:stackwallet/widgets/custom_loading_overlay.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class DesktopReceive extends ConsumerStatefulWidget {
const DesktopReceive({
Key? key,
required this.walletId,
this.clipboard = const ClipboardWrapper(),
}) : super(key: key);
final String walletId;
final ClipboardInterface clipboard;
@override
ConsumerState<DesktopReceive> createState() => _DesktopReceiveState();
}
class _DesktopReceiveState extends ConsumerState<DesktopReceive> {
late final Coin coin;
late final String walletId;
late final ClipboardInterface clipboard;
Future<void> generateNewAddress() async {
bool shouldPop = false;
unawaited(
showDialog(
context: context,
builder: (_) {
return WillPopScope(
onWillPop: () async => shouldPop,
child: Container(
color: Theme.of(context)
.extension<StackColors>()!
.overlay
.withOpacity(0.5),
child: const CustomLoadingOverlay(
message: "Generating address",
eventBus: null,
),
),
);
},
),
);
await ref
.read(walletsChangeNotifierProvider)
.getManager(walletId)
.generateNewAddress();
shouldPop = true;
if (mounted) {
Navigator.of(context, rootNavigator: true).pop();
}
}
String receivingAddress = "";
@override
void initState() {
walletId = widget.walletId;
coin = ref.read(walletsChangeNotifierProvider).getManager(walletId).coin;
clipboard = widget.clipboard;
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
final address = await ref
.read(walletsChangeNotifierProvider)
.getManager(walletId)
.currentReceivingAddress;
setState(() {
receivingAddress = address;
});
});
super.initState();
}
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
ref.listen(
ref
.read(walletsChangeNotifierProvider)
.getManagerProvider(walletId)
.select((value) => value.currentReceivingAddress),
(previous, next) {
if (next is Future<String>) {
next.then((value) => setState(() => receivingAddress = value));
}
});
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
GestureDetector(
onTap: () {
clipboard.setData(
ClipboardData(text: receivingAddress),
);
showFloatingFlushBar(
type: FlushBarType.info,
message: "Copied to clipboard",
iconAsset: Assets.svg.copy,
context: context,
);
},
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).extension<StackColors>()!.background,
width: 2,
),
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
),
child: RoundedWhiteContainer(
child: Column(
children: [
Row(
children: [
Text(
"Your ${coin.ticker} address",
style: STextStyles.itemSubtitle(context),
),
const Spacer(),
Row(
children: [
SvgPicture.asset(
Assets.svg.copy,
width: 10,
height: 10,
color: Theme.of(context)
.extension<StackColors>()!
.infoItemIcons,
),
const SizedBox(
width: 4,
),
Text(
"Copy",
style: STextStyles.link2(context),
),
],
),
],
),
const SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: Text(
receivingAddress,
style: STextStyles.itemSubtitle12(context),
),
),
],
),
],
),
),
),
),
if (coin != Coin.epicCash)
const SizedBox(
height: 20,
),
if (coin != Coin.epicCash)
SecondaryButton(
height: 56,
onPressed: generateNewAddress,
label: "Generate new address",
),
const SizedBox(
height: 32,
),
Center(
child: QrImage(
data: "${coin.uriScheme}:$receivingAddress",
size: 200,
foregroundColor:
Theme.of(context).extension<StackColors>()!.accentColorDark,
),
),
const SizedBox(
height: 32,
),
Center(
child: BlueTextButton(
text: "Create new QR code",
onTap: () async {
unawaited(
Navigator.of(context).push(
RouteGenerator.getRoute(
shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute,
builder: (_) => GenerateUriQrCodeView(
coin: coin,
receivingAddress: receivingAddress,
),
settings: const RouteSettings(
name: GenerateUriQrCodeView.routeName,
),
),
),
);
},
),
),
],
);
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class AdvancedSettings extends ConsumerStatefulWidget {
const AdvancedSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuAdvanced";
@override
ConsumerState<AdvancedSettings> createState() => _AdvancedSettings();
}
class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleLanguage,
width: 48,
height: 48,
),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Advanced",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nConfigurate these settings only if you know what you are doing!",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: ShowLogsButton(),
),
],
),
],
),
),
),
],
);
}
}
class ShowLogsButton extends ConsumerWidget {
const ShowLogsButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Show logs",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,315 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import '../../../providers/global/prefs_provider.dart';
import '../../../utilities/constants.dart';
import '../../../widgets/custom_buttons/draggable_switch_button.dart';
class AppearanceOptionSettings extends ConsumerStatefulWidget {
const AppearanceOptionSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuAppearance";
@override
ConsumerState<AppearanceOptionSettings> createState() =>
_AppearanceOptionSettings();
}
class _AppearanceOptionSettings
extends ConsumerState<AppearanceOptionSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleSun,
width: 48,
height: 48,
),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.left,
text: TextSpan(
children: [
TextSpan(
text: "Appearances",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nCustomize how your Stack Wallet looks according to your preferences.",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
),
),
],
),
const Padding(
padding: EdgeInsets.all(10.0),
child: Divider(
thickness: 0.5,
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Display favorite wallets",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
SizedBox(
height: 20,
width: 40,
child: DraggableSwitchButton(
isOn: ref.watch(
prefsChangeNotifierProvider
.select((value) => value.showFavoriteWallets),
),
onValueChanged: (newValue) {
ref
.read(prefsChangeNotifierProvider)
.showFavoriteWallets = newValue;
},
),
)
],
),
),
const Padding(
padding: EdgeInsets.all(10.0),
child: Divider(
thickness: 0.5,
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Choose theme",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
],
),
),
const Padding(
padding: EdgeInsets.only(
left: 10,
right: 10,
),
child: ThemeToggle(),
),
],
),
),
),
],
);
}
}
class ThemeToggle extends StatefulWidget {
const ThemeToggle({
Key? key,
}) : super(key: key);
// final bool externalCallsEnabled;
// final void Function(bool)? onChanged;
@override
State<StatefulWidget> createState() => _ThemeToggle();
}
class _ThemeToggle extends State<ThemeToggle> {
// late bool externalCallsEnabled;
@override
Widget build(BuildContext context) {
return Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: RawMaterialButton(
elevation: 0,
hoverColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius * 2,
),
),
onPressed: () {}, //onPressed
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(
left: 24,
),
child: SvgPicture.asset(
Assets.svg.themeLight,
),
),
Padding(
padding: const EdgeInsets.only(
left: 50,
top: 12,
),
child: Text(
"Light",
style:
STextStyles.desktopTextExtraSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
),
)
],
),
// if (externalCallsEnabled)
Positioned(
bottom: 0,
left: 6,
child: SvgPicture.asset(
Assets.svg.checkCircle,
width: 20,
height: 20,
color: Theme.of(context)
.extension<StackColors>()!
.infoItemIcons,
),
),
// if (!externalCallsEnabled)
// Positioned(
// top: 4,
// right: 4,
// child: Container(
// width: 20,
// height: 20,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(1000),
// color: Theme.of(context)
// .extension<StackColors>()!
// .textFieldDefaultBG,
// ),
// ),
// ),
],
),
),
),
const SizedBox(
width: 1,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: RawMaterialButton(
elevation: 0,
hoverColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius * 2,
),
),
onPressed: () {}, //onPressed
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.themeDark,
),
Padding(
padding: const EdgeInsets.only(
left: 50,
top: 12,
),
child: Text(
"Dark",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
),
),
],
),
// if (externalCallsEnabled)
Positioned(
bottom: 0,
left: 0,
child: SvgPicture.asset(
Assets.svg.checkCircle,
width: 20,
height: 20,
color: Theme.of(context)
.extension<StackColors>()!
.infoItemIcons,
),
),
// if (!externalCallsEnabled)
// Positioned(
// top: 4,
// right: 4,
// child: Container(
// width: 20,
// height: 20,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(1000),
// color: Theme.of(context)
// .extension<StackColors>()!
// .textFieldDefaultBG,
// ),
// ),
// ),
],
),
),
),
),
],
);
}
}

View file

@ -0,0 +1,282 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:url_launcher/url_launcher.dart';
class BackupRestoreSettings extends ConsumerStatefulWidget {
const BackupRestoreSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuBackupRestore";
@override
ConsumerState<BackupRestoreSettings> createState() =>
_BackupRestoreSettings();
}
class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.backupAuto,
width: 48,
height: 48,
),
Center(
child: Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Auto Backup",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
"else on the internet before. Your password is not stored.",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
TextSpan(
text:
"\n\nFor more information, please see our website ",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
TextSpan(
text: "stackwallet.com",
style: STextStyles.richLink(context)
.copyWith(fontSize: 14),
recognizer: TapGestureRecognizer()
..onTap = () {
launchUrl(
Uri.parse("https://stackwallet.com/"),
mode: LaunchMode.externalApplication,
);
},
),
],
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: AutoBackupButton(),
),
],
),
],
),
),
),
const SizedBox(
height: 25,
),
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.backupAdd,
width: 48,
height: 48,
alignment: Alignment.topLeft,
),
Center(
child: Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Manual Backup",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nCreate manual backup to easily transfer your data between devices. "
"You will create a backup file that can be later used in the Restore option. "
"Use a strong password to encrypt your data.",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
],
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: ManualBackupButton(),
),
],
),
],
),
),
),
const SizedBox(
height: 25,
),
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.backupRestore,
width: 48,
height: 48,
alignment: Alignment.topLeft,
),
Center(
child: Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Restore Backup",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
"and wallet preferences.",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
],
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: ManualBackupButton(),
),
],
),
],
),
),
),
],
);
}
}
class AutoBackupButton extends ConsumerWidget {
const AutoBackupButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Enable auto backup",
style: STextStyles.button(context),
),
),
);
}
}
class ManualBackupButton extends ConsumerWidget {
const ManualBackupButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Create manual backup",
style: STextStyles.button(context),
),
),
);
}
}
class RestoreBackupButton extends ConsumerWidget {
const RestoreBackupButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Restore backup",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,102 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class CurrencySettings extends ConsumerStatefulWidget {
const CurrencySettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuCurrency";
@override
ConsumerState<CurrencySettings> createState() => _CurrencySettings();
}
class _CurrencySettings extends ConsumerState<CurrencySettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleDollarSign,
width: 48,
height: 48,
),
Center(
child: Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Currency",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nProtect your Stack Wallet with a strong password. Stack Wallet does not store "
"your password, and is therefore NOT able to restore it. Keep your password safe and secure.",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
],
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: NewPasswordButton(),
),
],
),
],
),
),
),
],
);
}
}
class NewPasswordButton extends ConsumerWidget {
const NewPasswordButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Set up new password",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,73 @@
import 'package:flutter/material.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
class EnableBackupDialog extends StatelessWidget {
const EnableBackupDialog({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return DesktopDialog(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.all(32),
child: Text(
"Enable Auto Backup",
style: STextStyles.desktopH3(context),
textAlign: TextAlign.center,
),
),
const DesktopDialogCloseButton(),
],
),
const SizedBox(
height: 30,
),
Text(
"To enable Auto Backup, you need to create a backup file.",
style: STextStyles.desktopTextSmall(context).copyWith(
color: Theme.of(context).extension<StackColors>()!.textDark3,
),
textAlign: TextAlign.center,
),
const Spacer(),
Padding(
padding: const EdgeInsets.all(32),
child: Row(
children: [
Expanded(
child: SecondaryButton(
label: "Cancel",
onPressed: () {
Navigator.of(context).pop();
},
),
),
const SizedBox(
width: 16,
),
Expanded(
child: PrimaryButton(
label: "Continue",
onPressed: () {
// Navigator.of(context).pop();
// onConfirm.call();
},
),
)
],
),
),
],
),
);
}
}

View file

@ -0,0 +1,105 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class LanguageOptionSettings extends ConsumerStatefulWidget {
const LanguageOptionSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuLanguage";
@override
ConsumerState<LanguageOptionSettings> createState() =>
_LanguageOptionSettings();
}
class _LanguageOptionSettings extends ConsumerState<LanguageOptionSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleLanguage,
width: 48,
height: 48,
),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Language",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nSelect the language of your wallet. We use your system language by default.",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: ChangeLanguageButton(),
),
],
),
],
),
),
),
],
);
}
}
class ChangeLanguageButton extends ConsumerWidget {
const ChangeLanguageButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Change language",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,180 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/providers/global/node_service_provider.dart';
import 'package:stackwallet/providers/global/prefs_provider.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import '../../../pages/settings_views/global_settings_view/manage_nodes_views/coin_nodes_view.dart';
import '../../../utilities/constants.dart';
class NodesSettings extends ConsumerStatefulWidget {
const NodesSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuNodes";
@override
ConsumerState<NodesSettings> createState() => _NodesSettings();
}
class _NodesSettings extends ConsumerState<NodesSettings> {
List<Coin> _coins = [...Coin.values];
@override
void initState() {
_coins = _coins.toList();
_coins.remove(Coin.firoTestNet);
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
bool showTestNet = ref.watch(
prefsChangeNotifierProvider.select((value) => value.showTestNetCoins),
);
List<Coin> coins = showTestNet
? _coins
: _coins.sublist(0, _coins.length - kTestNetCoinCount);
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleNode,
width: 48,
height: 48,
),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Nodes",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text: "\n\nSelect a coin to see nodes",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
),
),
],
),
//TODO: add search bar
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
...coins.map(
(coin) {
final count = ref
.watch(nodeServiceChangeNotifierProvider
.select((value) => value.getNodesFor(coin)))
.length;
return Padding(
padding: const EdgeInsets.all(0),
child: RawMaterialButton(
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
// side: BorderSide(
// color: Theme.of(context)
// .extension<StackColors>()!
// .shadow),
),
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
onPressed: () {
Navigator.of(context).pushNamed(
CoinNodesView.routeName,
arguments: coin,
);
},
child: Padding(
padding: const EdgeInsets.all(
12.0,
),
child: Row(
children: [
Row(
children: [
SvgPicture.asset(
Assets.svg.iconFor(coin: coin),
width: 24,
height: 24,
),
const SizedBox(
width: 12,
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"${coin.prettyName} nodes",
style: STextStyles.titleBold12(
context),
),
Text(
count > 1
? "$count nodes"
: "Default",
style: STextStyles.label(context),
),
],
),
],
),
Expanded(
child: SvgPicture.asset(
Assets.svg.chevronRight,
alignment: Alignment.centerRight,
),
),
],
),
),
),
);
},
),
],
),
),
],
),
),
),
],
);
}
}

View file

@ -0,0 +1,141 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
import '../../../utilities/theme/stack_colors.dart';
import 'enable_backup_dialog.dart';
class SecuritySettings extends ConsumerStatefulWidget {
const SecuritySettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuSecurity";
@override
ConsumerState<SecuritySettings> createState() => _SecuritySettings();
}
class _SecuritySettings extends ConsumerState<SecuritySettings> {
Future<void> enableAutoBackup() async {
// wait for keyboard to disappear
FocusScope.of(context).unfocus();
await Future<void>.delayed(
const Duration(milliseconds: 100),
);
await showDialog<dynamic>(
context: context,
useSafeArea: false,
barrierDismissible: true,
builder: (context) {
return EnableBackupDialog();
},
);
}
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleLock,
width: 48,
height: 48,
),
Center(
child: Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Change Password",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nProtect your Stack Wallet with a strong password. Stack Wallet does not store "
"your password, and is therefore NOT able to restore it. Keep your password safe and secure.",
style:
STextStyles.desktopTextExtraExtraSmall(context),
),
],
),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: NewPasswordButton(),
),
],
),
],
),
),
),
],
);
}
}
class NewPasswordButton extends ConsumerWidget {
const NewPasswordButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
Future<void> enableAutoBackup() async {
// wait for keyboard to disappear
FocusScope.of(context).unfocus();
await Future<void>.delayed(
const Duration(milliseconds: 100),
);
await showDialog<dynamic>(
context: context,
useSafeArea: false,
barrierDismissible: true,
builder: (context) {
return EnableBackupDialog();
},
);
}
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {
enableAutoBackup();
},
child: Text(
"Set up new password",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,200 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu_item.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
class SettingsMenu extends ConsumerStatefulWidget {
const SettingsMenu({
Key? key,
required this.onSelectionChanged,
}) : super(key: key);
final void Function(int)?
onSelectionChanged; //is a function that takes in an int and returns void/.;
static const String routeName = "/settingsMenu";
@override
ConsumerState<ConsumerStatefulWidget> createState() => _SettingsMenuState();
}
class _SettingsMenuState extends ConsumerState<SettingsMenu> {
int selectedMenuItem = 0;
void updateSelectedMenuItem(int index) {
setState(() {
selectedMenuItem = index;
});
widget.onSelectionChanged?.call(index);
}
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 0
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Backup and restore",
value: 0,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 1
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Security",
value: 1,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 2
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Currency",
value: 2,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 3
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Language",
value: 3,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 4
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Nodes",
value: 4,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 5
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Syncing preferences",
value: 5,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 6
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Appearance",
value: 6,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
const SizedBox(
height: 2,
),
SettingsMenuItem(
icon: SvgPicture.asset(
Assets.svg.polygon,
width: 11,
height: 11,
color: selectedMenuItem == 7
? Theme.of(context)
.extension<StackColors>()!
.accentColorBlue
: Colors.transparent,
),
label: "Advanced",
value: 7,
group: selectedMenuItem,
onChanged: updateSelectedMenuItem,
),
],
),
),
],
);
}
}

View file

@ -0,0 +1,106 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class SyncingPreferencesSettings extends ConsumerStatefulWidget {
const SyncingPreferencesSettings({Key? key}) : super(key: key);
static const String routeName = "/settingsMenuSyncingPref";
@override
ConsumerState<SyncingPreferencesSettings> createState() =>
_SyncingPreferencesSettings();
}
class _SyncingPreferencesSettings
extends ConsumerState<SyncingPreferencesSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 30,
),
child: RoundedWhiteContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
Assets.svg.circleArrowRotate,
width: 48,
height: 48,
),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.all(10),
child: RichText(
textAlign: TextAlign.start,
text: TextSpan(
children: [
TextSpan(
text: "Syncing Preferences",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\nSet up your syncing preferences for all wallets in your Stack.",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Padding(
padding: EdgeInsets.all(
10,
),
child: ChangePrefButton(),
),
],
),
],
),
),
),
],
);
}
}
class ChangePrefButton extends ConsumerWidget {
const ChangePrefButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context, WidgetRef ref) {
return SizedBox(
width: 200,
height: 48,
child: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {},
child: Text(
"Change preferences",
style: STextStyles.button(context),
),
),
);
}
}

View file

@ -0,0 +1,58 @@
import 'package:flutter/material.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
class SettingsMenuItem<T> extends StatelessWidget {
const SettingsMenuItem({
Key? key,
required this.icon,
required this.label,
required this.value,
required this.group,
required this.onChanged,
}) : super(key: key);
final Widget icon;
final String label;
final T value;
final T group;
final void Function(T) onChanged;
@override
Widget build(BuildContext context) {
return TextButton(
//if val == group, then button is selected, otherwise unselected
style: value == group
? Theme.of(context)
.extension<StackColors>()!
.getDesktopSettingsButtonColor(context)
: Theme.of(context)
.extension<StackColors>()!
.getDesktopSettingsButtonColor(context),
onPressed: () {
onChanged(value);
},
child: Padding(
padding: EdgeInsets.symmetric(
vertical: 16,
horizontal: 16,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
icon,
const SizedBox(
width: 12,
),
Text(
label,
style: value == group //checks if option is selected
? STextStyles.settingsMenuItemSelected(context)
: STextStyles.settingsMenuItem(context),
),
],
),
),
);
}
}

View file

@ -1,20 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class SettingsView extends ConsumerStatefulWidget {
const SettingsView({Key? key}) : super(key: key);
static const String routeName = "/settingsView";
@override
ConsumerState<SettingsView> createState() => _SettingsView();
}
class _SettingsView extends ConsumerState<SettingsView> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
// TODO: implement build
throw UnimplementedError();
}
}

View file

@ -84,7 +84,18 @@ import 'package:stackwallet/pages/wallet_view/wallet_view.dart';
import 'package:stackwallet/pages/wallets_view/wallets_view.dart';
import 'package:stackwallet/pages_desktop_specific/create_password/create_password_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_view.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/advanced_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/appearance_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/currency_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/language_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/nodes_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/security_settings.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/syncing_preferences_settings.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart';
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
@ -955,12 +966,88 @@ class RouteGenerator {
builder: (_) => const DesktopHomeView(),
settings: RouteSettings(name: settings.name));
case DesktopSettingsView.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const DesktopSettingsView(),
settings: RouteSettings(name: settings.name));
case MyStackView.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const MyStackView(),
settings: RouteSettings(name: settings.name));
case DesktopWalletView.routeName:
if (args is String) {
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => DesktopWalletView(
walletId: args,
),
settings: RouteSettings(
name: settings.name,
),
);
}
return _routeError("${settings.name} invalid args: ${args.toString()}");
case SettingsMenu.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => SettingsMenu(
onSelectionChanged: (int) {},
),
settings: RouteSettings(name: settings.name));
case BackupRestoreSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const BackupRestoreSettings(),
settings: RouteSettings(name: settings.name));
case SecuritySettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const SecuritySettings(),
settings: RouteSettings(name: settings.name));
case CurrencySettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const CurrencySettings(),
settings: RouteSettings(name: settings.name));
case LanguageOptionSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const LanguageOptionSettings(),
settings: RouteSettings(name: settings.name));
case NodesSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const NodesSettings(),
settings: RouteSettings(name: settings.name));
case SyncingPreferencesSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const SyncingPreferencesSettings(),
settings: RouteSettings(name: settings.name));
case AppearanceOptionSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const AppearanceOptionSettings(),
settings: RouteSettings(name: settings.name));
case AdvancedSettings.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const AdvancedSettings(),
settings: RouteSettings(name: settings.name));
// == End of desktop specific routes =====================================
default:

View file

@ -1990,7 +1990,6 @@ class EpicCashWallet extends CoinServiceAPI {
Future<bool> refreshIfThereIsNewData() async {
if (_hasCalledExit) return false;
Logging.instance.log("Can we do this here?", level: LogLevel.Fatal);
// TODO returning true here signals this class to call refresh() after which it will fire an event that notifies the UI that new data has been fetched/found for this wallet
return true;
// TODO: do a quick check to see if there is any new data that would require a refresh

View file

@ -39,6 +39,19 @@ class NodeService extends ChangeNotifier {
key: savedNode.id,
value: defaultNode.copyWith(enabled: savedNode.enabled));
}
// check if a default node is the primary node for the crypto currency
// and update it if needed
final coin = coinFromPrettyName(defaultNode.coinName);
final primaryNode = getPrimaryNodeFor(coin: coin);
if (primaryNode != null && primaryNode.id == defaultNode.id) {
await setPrimaryNodeFor(
coin: coin,
node: defaultNode.copyWith(
enabled: primaryNode.enabled,
),
);
}
}
}

View file

@ -59,6 +59,15 @@ class _SVG {
String txExchangeFailed(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
String get themeLight => "assets/svg/light/light-mode.svg";
String get themeDark => "assets/svg/dark/dark-theme.svg";
String get circleNode => "assets/svg/node-circle.svg";
String get circleSun => "assets/svg/sun-circle.svg";
String get circleArrowRotate => "assets/svg/rotate-circle.svg";
String get circleLanguage => "assets/svg/language-circle.svg";
String get circleDollarSign => "assets/svg/dollar-sign-circle.svg";
String get circleLock => "assets/svg/lock-circle.svg";
String get disableButton => "assets/svg/Button.svg";
String get polygon => "assets/svg/Polygon.svg";
String get personaIncognito => "assets/svg/persona-incognito-1.svg";
String get personaEasy => "assets/svg/persona-easy-1.svg";
@ -130,6 +139,11 @@ class _SVG {
String get anonymize => "assets/svg/tx-icon-anonymize.svg";
String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg";
String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg";
String get addressBookDesktop => "assets/svg/address-book-desktop.svg";
String get exchangeDesktop => "assets/svg/exchange-desktop.svg";
String get aboutDesktop => "assets/svg/about-desktop.svg";
String get walletDesktop => "assets/svg/wallet-desktop.svg";
String get exitDesktop => "assets/svg/exit-desktop.svg";
String get ellipse1 => "assets/svg/Ellipse-43.svg";
String get ellipse2 => "assets/svg/Ellipse-42.svg";

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/util.dart';
class _LayoutSizing {
const _LayoutSizing();
@ -14,7 +15,12 @@ class _LayoutSizing {
abstract class Constants {
static const size = _LayoutSizing();
static final bool enableExchange = !Platform.isIOS;
static void exchangeForExperiencedUsers(int count) {
enableExchange =
Util.isDesktop || Platform.isAndroid || count > 5 || !Platform.isIOS;
}
static bool enableExchange = Util.isDesktop || !Platform.isIOS;
//TODO: correct for monero?
static const int satsPerCoinMonero = 1000000000000;

View file

@ -70,28 +70,24 @@ abstract class DefaultNodes {
isDown: false,
);
// TODO: eventually enable ssl and set scheme to https
// currently get certificate failure
static NodeModel get monero => NodeModel(
host: "http://monero.stackwallet.com",
host: "https://monero.stackwallet.com",
port: 18081,
name: defaultName,
id: _nodeId(Coin.monero),
useSSL: false,
useSSL: true,
enabled: true,
coinName: Coin.monero.name,
isFailover: true,
isDown: false,
);
// TODO: eventually enable ssl and set scheme to https
// currently get certificate failure
static NodeModel get wownero => NodeModel(
host: "http://eu-west-2.wow.xmr.pm",
host: "https://wownero.stackwallet.com",
port: 34568,
name: defaultName,
id: _nodeId(Coin.wownero),
useSSL: false,
useSSL: true,
enabled: true,
coinName: Coin.wownero.name,
isFailover: true,

View file

@ -181,25 +181,32 @@ Coin coinFromPrettyName(String name) {
case "Bitcoin":
case "bitcoin":
return Coin.bitcoin;
case "Bitcoincash":
case "bitcoincash":
case "Bitcoin Cash":
return Coin.bitcoincash;
case "Dogecoin":
case "dogecoin":
return Coin.dogecoin;
case "Epic Cash":
case "epicCash":
return Coin.epicCash;
case "Firo":
case "firo":
return Coin.firo;
case "Monero":
case "monero":
return Coin.monero;
case "Namecoin":
case "namecoin":
return Coin.namecoin;
case "Bitcoin Testnet":
case "tBitcoin":
case "bitcoinTestNet":
@ -208,19 +215,24 @@ Coin coinFromPrettyName(String name) {
case "Bitcoincash Testnet":
case "tBitcoin Cash":
case "Bitcoin Cash Testnet":
case "bitcoincashTestnet":
return Coin.bitcoincashTestnet;
case "Firo Testnet":
case "tFiro":
case "firoTestNet":
return Coin.firoTestNet;
case "Dogecoin Testnet":
case "tDogecoin":
case "dogecoinTestNet":
return Coin.dogecoinTestNet;
case "Wownero":
case "tWownero":
case "wownero":
return Coin.wownero;
default:
throw ArgumentError.value(
name, "name", "No Coin enum value with that prettyName");

View file

@ -679,6 +679,25 @@ class STextStyles {
}
}
static TextStyle desktopTextSmall(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 18,
height: 27 / 18,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).buttonTextPrimaryDisabled,
fontWeight: FontWeight.w500,
fontSize: 18,
height: 27 / 18,
);
}
}
static TextStyle desktopTextExtraSmall(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
@ -793,6 +812,44 @@ class STextStyles {
}
}
static TextStyle settingsMenuItem(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark.withOpacity(0.5),
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textDark.withOpacity(0.5),
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
}
}
static TextStyle settingsMenuItemSelected(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
}
}
static TextStyle stepIndicator(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:

View file

@ -1513,4 +1513,14 @@ class StackColors extends ThemeExtension<StackColors> {
textFieldDefaultBG,
),
);
ButtonStyle? getDesktopSettingsButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
background,
),
overlayColor: MaterialStateProperty.all<Color>(
Colors.transparent,
),
);
}

View file

@ -1,9 +1,14 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
abstract class Util {
static Directory? libraryPath;
static bool get isDesktop {
if(Platform.isIOS && libraryPath != null && !libraryPath!.path.contains("/var/mobile/")){
return true;
}
return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
}

View file

@ -306,10 +306,10 @@ class NodeOptionsSheet extends ConsumerWidget {
style: status == "Connected"
? Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context)
.getPrimaryDisabledButtonColor(context)
: Theme.of(context)
.extension<StackColors>()!
.getPrimaryDisabledButtonColor(context),
.getPrimaryEnabledButtonColor(context),
onPressed: status == "Connected"
? null
: () async {

View file

@ -25,9 +25,13 @@ class WalletInfoRow extends ConsumerWidget {
.watch(walletsChangeNotifierProvider.notifier)
.getManagerProvider(walletId));
return Row(
children: Util.isDesktop
? [
if (Util.isDesktop) {
return GestureDetector(
onTap: onPressed,
child: Container(
color: Colors.transparent,
child: Row(
children: [
Expanded(
flex: 4,
child: Row(
@ -38,11 +42,9 @@ class WalletInfoRow extends ConsumerWidget {
),
Text(
manager.walletName,
style:
STextStyles.desktopTextExtraSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color:
Theme.of(context).extension<StackColors>()!.textDark,
),
),
],
@ -70,29 +72,35 @@ class WalletInfoRow extends ConsumerWidget {
],
),
)
]
: [
WalletInfoCoinIcon(coin: manager.coin),
const SizedBox(
width: 12,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
manager.walletName,
style: STextStyles.titleBold12(context),
),
const SizedBox(
height: 2,
),
WalletInfoRowBalanceFuture(walletId: walletId),
],
),
),
],
);
),
),
);
} else {
return Row(
children: [
WalletInfoCoinIcon(coin: manager.coin),
const SizedBox(
width: 12,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
manager.walletName,
style: STextStyles.titleBold12(context),
),
const SizedBox(
height: 2,
),
WalletInfoRowBalanceFuture(walletId: walletId),
],
),
),
],
);
}
}
}

View file

@ -6,6 +6,8 @@ import FlutterMacOS
import Foundation
import connectivity_plus_macos
import device_info_plus
import devicelocale
import flutter_libepiccash
import flutter_local_notifications
import flutter_secure_storage_macos
@ -21,6 +23,8 @@ import window_size
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
FlutterLibepiccashPlugin.register(with: registry.registrar(forPlugin: "FlutterLibepiccashPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))

101
macos/Podfile.lock Normal file
View file

@ -0,0 +1,101 @@
PODS:
- connectivity_plus_macos (0.0.1):
- FlutterMacOS
- ReachabilitySwift
- flutter_libepiccash (0.0.1):
- FlutterMacOS
- flutter_local_notifications (0.0.1):
- FlutterMacOS
- flutter_secure_storage_macos (3.3.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- isar_flutter_libs (1.0.0):
- FlutterMacOS
- package_info_plus_macos (0.0.1):
- FlutterMacOS
- path_provider_macos (0.0.1):
- FlutterMacOS
- ReachabilitySwift (5.0.0)
- share_plus_macos (0.0.1):
- FlutterMacOS
- shared_preferences_macos (0.0.1):
- FlutterMacOS
- stack_wallet_backup (0.0.1):
- FlutterMacOS
- url_launcher_macos (0.0.1):
- FlutterMacOS
- wakelock_macos (0.0.1):
- FlutterMacOS
- window_size (0.0.2):
- FlutterMacOS
DEPENDENCIES:
- connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`)
- flutter_libepiccash (from `Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos`)
- flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- isar_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos`)
- package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`)
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
- shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`)
- stack_wallet_backup (from `Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`)
- window_size (from `Flutter/ephemeral/.symlinks/plugins/window_size/macos`)
SPEC REPOS:
trunk:
- ReachabilitySwift
EXTERNAL SOURCES:
connectivity_plus_macos:
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos
flutter_libepiccash:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos
flutter_local_notifications:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos
flutter_secure_storage_macos:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
FlutterMacOS:
:path: Flutter/ephemeral
isar_flutter_libs:
:path: Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos
package_info_plus_macos:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos
path_provider_macos:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
share_plus_macos:
:path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos
shared_preferences_macos:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos
stack_wallet_backup:
:path: Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos
url_launcher_macos:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
wakelock_macos:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos
window_size:
:path: Flutter/ephemeral/.symlinks/plugins/window_size/macos
SPEC CHECKSUMS:
connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308
flutter_libepiccash: b33f7396504712b513b8ff019a3f6f3bdae54cfb
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
flutter_secure_storage_macos: 6ceee8fbc7f484553ad17f79361b556259df89aa
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
isar_flutter_libs: 1948109973b6c2e46d6196b1537688a36a6edeac
package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727
stack_wallet_backup: 6ebc60b1bdcf11cf1f1cbad9aa78332e1e15778c
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
COCOAPODS: 1.11.3

View file

@ -26,6 +26,7 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
36299DF6FDF6725B2B9C51D5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -54,7 +55,7 @@
/* Begin PBXFileReference section */
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "firo_wallet.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = firo_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@ -66,8 +67,12 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
937DF254AD7EDA15AFE96BD9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
BC4589C48A71C3A1A477DD76 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
EA2D897BC13EBFB1DE697D5C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -75,6 +80,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
36299DF6FDF6725B2B9C51D5 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -99,6 +105,7 @@
33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
9000119722579F22067B9BC0 /* Pods */,
);
sourceTree = "<group>";
};
@ -145,9 +152,21 @@
path = Runner;
sourceTree = "<group>";
};
9000119722579F22067B9BC0 /* Pods */ = {
isa = PBXGroup;
children = (
EA2D897BC13EBFB1DE697D5C /* Pods-Runner.debug.xcconfig */,
937DF254AD7EDA15AFE96BD9 /* Pods-Runner.release.xcconfig */,
BC4589C48A71C3A1A477DD76 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -159,11 +178,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
DF80A3E256A63BF2D2008937 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
8D7CC24E5AE846869656D4D1 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -270,6 +291,45 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
8D7CC24E5AE846869656D4D1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
DF80A3E256A63BF2D2008937 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */

View file

@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View file

@ -7,28 +7,28 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "46.0.0"
version: "47.0.0"
analyzer:
dependency: "direct dev"
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "4.6.0"
version: "4.7.0"
animations:
dependency: "direct main"
description:
name: animations
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.7"
another_flushbar:
dependency: "direct main"
description:
name: another_flushbar
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.29"
version: "1.12.29"
app_settings:
dependency: "direct main"
description:
@ -56,7 +56,7 @@ packages:
name: asn1lib
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
async:
dependency: transitive
description:
@ -134,14 +134,14 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.3.1"
build_config:
dependency: transitive
description:
name: build_config
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.1"
build_daemon:
dependency: transitive
description:
@ -155,21 +155,21 @@ packages:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
version: "2.0.10"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.11"
version: "2.3.0"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "7.2.3"
version: "7.2.6"
built_collection:
dependency: transitive
description:
@ -183,7 +183,7 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.3.3"
version: "8.4.1"
characters:
dependency: transitive
description:
@ -218,7 +218,7 @@ packages:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.3.0"
collection:
dependency: transitive
description:
@ -246,21 +246,21 @@ packages:
name: connectivity_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.4"
version: "1.2.6"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.2"
connectivity_plus_web:
dependency: transitive
description:
name: connectivity_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.3"
version: "1.2.5"
connectivity_plus_windows:
dependency: transitive
description:
@ -282,6 +282,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
cross_file:
dependency: transitive
description:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3+2"
crypto:
dependency: "direct main"
description:
@ -296,6 +303,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.2"
cw_core:
dependency: "direct main"
description:
@ -337,7 +351,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.3"
version: "2.2.4"
dartx:
dependency: transitive
description:
@ -358,21 +372,35 @@ packages:
name: decimal
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
version: "2.3.0"
dependency_validator:
dependency: "direct dev"
description:
name: dependency_validator
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.0"
version: "3.2.2"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "7.0.1"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.1"
devicelocale:
dependency: "direct main"
description:
name: devicelocale
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2"
version: "0.5.5"
dropdown_button2:
dependency: "direct main"
description:
@ -428,7 +456,7 @@ packages:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.1"
version: "5.2.1"
fixnum:
dependency: transitive
description:
@ -494,14 +522,14 @@ packages:
name: flutter_local_notifications
url: "https://pub.dartlang.org"
source: hosted
version: "9.6.1"
version: "9.9.1"
flutter_local_notifications_linux:
dependency: transitive
description:
name: flutter_local_notifications_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0+1"
version: "0.5.1"
flutter_local_notifications_platform_interface:
dependency: transitive
description:
@ -515,21 +543,21 @@ packages:
name: flutter_mobx
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6+1"
version: "2.0.6+4"
flutter_native_splash:
dependency: "direct main"
description:
name: flutter_native_splash
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.4"
version: "2.2.9"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
version: "2.0.7"
flutter_riverpod:
dependency: "direct main"
description:
@ -543,28 +571,28 @@ packages:
name: flutter_rounded_date_picker
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
flutter_secure_storage:
dependency: "direct main"
description:
name: flutter_secure_storage
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.2"
version: "5.1.2"
flutter_secure_storage_linux:
dependency: transitive
description:
name: flutter_secure_storage_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
flutter_secure_storage_macos:
dependency: transitive
description:
name: flutter_secure_storage_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
flutter_secure_storage_platform_interface:
dependency: transitive
description:
@ -599,7 +627,7 @@ packages:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1+1"
version: "1.1.5"
flutter_test:
dependency: "direct dev"
description: flutter
@ -678,13 +706,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.4"
version: "0.13.5"
http_multi_server:
dependency: transitive
description:
@ -698,14 +733,14 @@ packages:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
version: "4.0.2"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.0"
version: "3.2.2"
import_sorter:
dependency: "direct dev"
description:
@ -766,7 +801,7 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.0"
version: "4.7.0"
jsonrpc2:
dependency: "direct main"
description:
@ -794,7 +829,7 @@ packages:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.10.0"
lints:
dependency: transitive
description:
@ -815,14 +850,14 @@ packages:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.1.0"
lottie:
dependency: "direct main"
description:
name: lottie
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.4.2"
matcher:
dependency: transitive
description:
@ -857,7 +892,7 @@ packages:
name: mobx
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7+4"
version: "2.1.1"
mockingjay:
dependency: "direct dev"
description:
@ -871,7 +906,7 @@ packages:
name: mockito
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
version: "5.3.2"
mocktail:
dependency: transitive
description:
@ -941,14 +976,14 @@ packages:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.0.6"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
path:
dependency: transitive
description:
@ -962,14 +997,14 @@ packages:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
path_provider:
dependency: "direct main"
description:
@ -983,14 +1018,14 @@ packages:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.16"
version: "2.0.20"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.10"
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
@ -1011,49 +1046,49 @@ packages:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
version: "2.0.5"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.3"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "10.0.0"
version: "10.1.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
url: "https://pub.dartlang.org"
source: hosted
version: "10.0.0"
version: "10.2.0"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.4"
version: "9.0.7"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.7.0"
version: "3.9.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
version: "0.1.2"
petitparser:
dependency: transitive
description:
@ -1074,14 +1109,14 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.3"
pointycastle:
dependency: "direct main"
description:
name: pointycastle
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.0"
version: "3.6.2"
pool:
dependency: transitive
description:
@ -1109,14 +1144,14 @@ packages:
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
qr:
dependency: transitive
description:
@ -1131,13 +1166,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
rational:
dependency: transitive
description:
@ -1172,21 +1200,21 @@ packages:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.4"
version: "0.27.5"
share_plus:
dependency: "direct main"
description:
name: share_plus
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.10"
version: "4.5.3"
share_plus_linux:
dependency: transitive
description:
name: share_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
share_plus_macos:
dependency: transitive
description:
@ -1200,14 +1228,14 @@ packages:
name: share_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.3"
version: "3.1.1"
share_plus_web:
dependency: transitive
description:
name: share_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.1.0"
share_plus_windows:
dependency: transitive
description:
@ -1228,7 +1256,7 @@ packages:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.12"
version: "2.0.14"
shared_preferences_ios:
dependency: transitive
description:
@ -1256,7 +1284,7 @@ packages:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
shared_preferences_web:
dependency: transitive
description:
@ -1277,7 +1305,7 @@ packages:
name: shelf
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.4.0"
shelf_packages_handler:
dependency: transitive
description:
@ -1310,21 +1338,21 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.2"
version: "1.2.6"
source_helper:
dependency: transitive
description:
name: source_helper
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2"
version: "1.3.3"
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
source_maps:
dependency: transitive
description:
@ -1375,14 +1403,21 @@ packages:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
string_validator:
dependency: "direct main"
description:
name: string_validator
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
sync_http:
dependency: transitive
description:
@ -1424,7 +1459,7 @@ packages:
name: time
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
timezone:
dependency: transitive
description:
@ -1459,7 +1494,7 @@ packages:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.1"
typed_data:
dependency: transitive
description:
@ -1480,14 +1515,14 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
version: "6.1.6"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
version: "6.0.19"
url_launcher_ios:
dependency: transitive
description:
@ -1515,14 +1550,14 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.12"
version: "2.0.13"
url_launcher_windows:
dependency: transitive
description:
@ -1585,14 +1620,14 @@ packages:
name: wakelock_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.2.1"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
web_socket_channel:
dependency: transitive
description:
@ -1613,14 +1648,14 @@ packages:
name: webkit_inspection_protocol
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "3.0.1"
window_size:
dependency: "direct main"
description:
@ -1636,7 +1671,7 @@ packages:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+1"
version: "0.2.0+2"
xml:
dependency: transitive
description:

View file

@ -115,6 +115,7 @@ dependencies:
wakelock: ^0.6.2
intl: ^0.17.0
devicelocale: ^0.5.0
device_info_plus: ^7.0.1
keyboard_dismisser: ^3.0.0
another_flushbar: ^1.10.28
tuple: ^2.0.0
@ -132,6 +133,7 @@ dependencies:
isar: 3.0.0-dev.10
isar_flutter_libs: 3.0.0-dev.10 # contains the binaries
dropdown_button2: 1.7.2
string_validator: ^0.3.0
dev_dependencies:
flutter_test:
@ -292,6 +294,20 @@ flutter:
- assets/svg/Polygon.svg
- assets/svg/persona-easy-1.svg
- assets/svg/persona-incognito-1.svg
- assets/svg/Button.svg
- assets/svg/lock-circle.svg
- assets/svg/dollar-sign-circle.svg
- assets/svg/language-circle.svg
- assets/svg/rotate-circle.svg
- assets/svg/sun-circle.svg
- assets/svg/node-circle.svg
- assets/svg/dark/dark-theme.svg
- assets/svg/light/light-mode.svg
- assets/svg/address-book-desktop.svg
- assets/svg/about-desktop.svg
- assets/svg/exchange-desktop.svg
- assets/svg/wallet-desktop.svg
- assets/svg/exit-desktop.svg
# coin icons
- assets/svg/coin_icons/Bitcoin.svg
- assets/svg/coin_icons/Bitcoincash.svg

View file

@ -1,7 +1,8 @@
// Mocks generated by Mockito 5.2.0 from annotations
// Mocks generated by Mockito 5.3.2 from annotations
// in stackwallet/test/cached_electrumx_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:ui' as _i9;
@ -23,8 +24,17 @@ import 'package:stackwallet/utilities/prefs.dart' as _i5;
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {}
class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
_FakeDecimal_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumX].
///
@ -35,187 +45,346 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
}
@override
set failovers(List<_i3.ElectrumXNode>? _failovers) =>
super.noSuchMethod(Invocation.setter(#failovers, _failovers),
returnValueForMissingStub: null);
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter(
#failovers,
_failovers,
),
returnValueForMissingStub: null,
);
@override
int get currentFailoverIndex =>
(super.noSuchMethod(Invocation.getter(#currentFailoverIndex),
returnValue: 0) as int);
int get currentFailoverIndex => (super.noSuchMethod(
Invocation.getter(#currentFailoverIndex),
returnValue: 0,
) as int);
@override
set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod(
Invocation.setter(#currentFailoverIndex, _currentFailoverIndex),
returnValueForMissingStub: null);
Invocation.setter(
#currentFailoverIndex,
_currentFailoverIndex,
),
returnValueForMissingStub: null,
);
@override
String get host =>
(super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String);
String get host => (super.noSuchMethod(
Invocation.getter(#host),
returnValue: '',
) as String);
@override
int get port =>
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL =>
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
as bool);
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request(
{String? command,
List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60),
String? requestID,
int? retries = 2}) =>
_i4.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60),
String? requestID,
int? retries = 2,
}) =>
(super.noSuchMethod(
Invocation.method(#request, [], {
Invocation.method(
#request,
[],
{
#command: command,
#args: args,
#connectionTimeout: connectionTimeout,
#requestID: requestID,
#retries: retries
}),
returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);
#retries: retries,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest(
{String? command,
Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60),
int? retries = 2}) =>
_i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
(super.noSuchMethod(
Invocation.method(#batchRequest, [], {
#command: command,
#args: args,
#connectionTimeout: connectionTimeout,
#retries: retries
}),
returnValue: Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]))
as _i4.Future<List<Map<String, dynamic>>>);
Invocation.method(
#batchRequest,
[],
{
#command: command,
#args: args,
#connectionTimeout: connectionTimeout,
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<bool> ping({String? requestID, int? retryCount = 1}) =>
_i4.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
(super.noSuchMethod(
Invocation.method(
#ping, [], {#requestID: requestID, #retryCount: retryCount}),
returnValue: Future<bool>.value(false)) as _i4.Future<bool>);
Invocation.method(
#ping,
[],
{
#requestID: requestID,
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
as _i4.Future<Map<String, dynamic>>);
Invocation.method(
#getBlockHeadTip,
[],
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(#getServerFeatures, [], {#requestID: requestID}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i4
.Future<Map<String, dynamic>>);
Invocation.method(
#getServerFeatures,
[],
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({String? rawTx, String? requestID}) =>
_i4.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(#broadcastTransaction, [],
{#rawTx: rawTx, #requestID: requestID}),
returnValue: Future<String>.value('')) as _i4.Future<String>);
Invocation.method(
#broadcastTransaction,
[],
{
#rawTx: rawTx,
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance(
{String? scripthash, String? requestID}) =>
_i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(#getBalance, [],
{#scripthash: scripthash, #requestID: requestID}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
as _i4.Future<Map<String, dynamic>>);
Invocation.method(
#getBalance,
[],
{
#scripthash: scripthash,
#requestID: requestID,
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory(
{String? scripthash, String? requestID}) =>
_i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(#getHistory, [],
{#scripthash: scripthash, #requestID: requestID}),
returnValue: Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]))
as _i4.Future<List<Map<String, dynamic>>>);
Invocation.method(
#getHistory,
[],
{
#scripthash: scripthash,
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{Map<String, List<dynamic>>? args}) =>
{required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod(
Invocation.method(#getBatchHistory, [], {#args: args}),
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{})) as _i4
.Future<Map<String, List<Map<String, dynamic>>>>);
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs(
{String? scripthash, String? requestID}) =>
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(
#getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}),
returnValue: Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[])) as _i4
.Future<List<Map<String, dynamic>>>);
Invocation.method(
#getUTXOs,
[],
{
#scripthash: scripthash,
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}),
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{})) as _i4
.Future<Map<String, List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction(
{String? txHash, bool? verbose = true, String? requestID}) =>
{required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod(
Invocation.method(#getTransaction, [],
{#txHash: txHash, #verbose: verbose, #requestID: requestID}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
as _i4.Future<Map<String, dynamic>>);
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet(
{String? groupId = r'1',
String? blockhash = r'',
String? requestID}) =>
_i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(#getAnonymitySet, [], {
#groupId: groupId,
#blockhash: blockhash,
#requestID: requestID
}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
as _i4.Future<Map<String, dynamic>>);
Invocation.method(
#getTransaction,
[],
{
#txHash: txHash,
#verbose: verbose,
#requestID: requestID,
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getMintData({dynamic mints, String? requestID}) =>
_i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(
#getMintData, [], {#mints: mints, #requestID: requestID}),
returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);
Invocation.method(
#getAnonymitySet,
[],
{
#groupId: groupId,
#blockhash: blockhash,
#requestID: requestID,
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getUsedCoinSerials(
{String? requestID, int? startNumber}) =>
_i4.Future<dynamic> getMintData({
dynamic mints,
String? requestID,
}) =>
(super.noSuchMethod(
Invocation.method(#getUsedCoinSerials, [],
{#requestID: requestID, #startNumber: startNumber}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
as _i4.Future<Map<String, dynamic>>);
Invocation.method(
#getMintData,
[],
{
#mints: mints,
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
(super.noSuchMethod(
Invocation.method(
#getUsedCoinSerials,
[],
{
#requestID: requestID,
#startNumber: startNumber,
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method(#getLatestCoinId, [], {#requestID: requestID}),
returnValue: Future<int>.value(0)) as _i4.Future<int>);
Invocation.method(
#getLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => (super
.noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}),
returnValue:
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i4
.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) =>
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#estimateFee, [], {#requestID: requestID, #blocks: blocks}),
returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0()))
as _i4.Future<_i2.Decimal>);
Invocation.method(
#getFeeRate,
[],
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
(super.noSuchMethod(
Invocation.method(
#estimateFee,
[],
{
#requestID: requestID,
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this,
Invocation.method(
#estimateFee,
[],
{
#requestID: requestID,
#blocks: blocks,
},
),
)),
) as _i4.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(#relayFee, [], {#requestID: requestID}),
returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0()))
as _i4.Future<_i2.Decimal>);
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this,
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
}
/// A class which mocks [Prefs].
@ -227,192 +396,317 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs {
}
@override
bool get isInitialized =>
(super.noSuchMethod(Invocation.getter(#isInitialized), returnValue: false)
as bool);
bool get isInitialized => (super.noSuchMethod(
Invocation.getter(#isInitialized),
returnValue: false,
) as bool);
@override
int get lastUnlockedTimeout => (super
.noSuchMethod(Invocation.getter(#lastUnlockedTimeout), returnValue: 0)
as int);
int get lastUnlockedTimeout => (super.noSuchMethod(
Invocation.getter(#lastUnlockedTimeout),
returnValue: 0,
) as int);
@override
set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod(
Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout),
returnValueForMissingStub: null);
Invocation.setter(
#lastUnlockedTimeout,
lastUnlockedTimeout,
),
returnValueForMissingStub: null,
);
@override
int get lastUnlocked =>
(super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0)
as int);
int get lastUnlocked => (super.noSuchMethod(
Invocation.getter(#lastUnlocked),
returnValue: 0,
) as int);
@override
set lastUnlocked(int? lastUnlocked) =>
super.noSuchMethod(Invocation.setter(#lastUnlocked, lastUnlocked),
returnValueForMissingStub: null);
set lastUnlocked(int? lastUnlocked) => super.noSuchMethod(
Invocation.setter(
#lastUnlocked,
lastUnlocked,
),
returnValueForMissingStub: null,
);
@override
int get currentNotificationId =>
(super.noSuchMethod(Invocation.getter(#currentNotificationId),
returnValue: 0) as int);
int get currentNotificationId => (super.noSuchMethod(
Invocation.getter(#currentNotificationId),
returnValue: 0,
) as int);
@override
List<String> get walletIdsSyncOnStartup =>
(super.noSuchMethod(Invocation.getter(#walletIdsSyncOnStartup),
returnValue: <String>[]) as List<String>);
List<String> get walletIdsSyncOnStartup => (super.noSuchMethod(
Invocation.getter(#walletIdsSyncOnStartup),
returnValue: <String>[],
) as List<String>);
@override
set walletIdsSyncOnStartup(List<String>? walletIdsSyncOnStartup) =>
super.noSuchMethod(
Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup),
returnValueForMissingStub: null);
Invocation.setter(
#walletIdsSyncOnStartup,
walletIdsSyncOnStartup,
),
returnValueForMissingStub: null,
);
@override
_i6.SyncingType get syncType =>
(super.noSuchMethod(Invocation.getter(#syncType),
returnValue: _i6.SyncingType.currentWalletOnly) as _i6.SyncingType);
_i6.SyncingType get syncType => (super.noSuchMethod(
Invocation.getter(#syncType),
returnValue: _i6.SyncingType.currentWalletOnly,
) as _i6.SyncingType);
@override
set syncType(_i6.SyncingType? syncType) =>
super.noSuchMethod(Invocation.setter(#syncType, syncType),
returnValueForMissingStub: null);
set syncType(_i6.SyncingType? syncType) => super.noSuchMethod(
Invocation.setter(
#syncType,
syncType,
),
returnValueForMissingStub: null,
);
@override
bool get wifiOnly =>
(super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false)
as bool);
bool get wifiOnly => (super.noSuchMethod(
Invocation.getter(#wifiOnly),
returnValue: false,
) as bool);
@override
set wifiOnly(bool? wifiOnly) =>
super.noSuchMethod(Invocation.setter(#wifiOnly, wifiOnly),
returnValueForMissingStub: null);
set wifiOnly(bool? wifiOnly) => super.noSuchMethod(
Invocation.setter(
#wifiOnly,
wifiOnly,
),
returnValueForMissingStub: null,
);
@override
bool get externalCalls =>
(super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false)
as bool);
@override
set externalCalls(bool? eCalls) =>
super.noSuchMethod(Invocation.setter(#externalCalls, eCalls),
returnValueForMissingStub: null);
@override
bool get showFavoriteWallets =>
(super.noSuchMethod(Invocation.getter(#showFavoriteWallets),
returnValue: false) as bool);
bool get showFavoriteWallets => (super.noSuchMethod(
Invocation.getter(#showFavoriteWallets),
returnValue: false,
) as bool);
@override
set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod(
Invocation.setter(#showFavoriteWallets, showFavoriteWallets),
returnValueForMissingStub: null);
Invocation.setter(
#showFavoriteWallets,
showFavoriteWallets,
),
returnValueForMissingStub: null,
);
@override
String get language =>
(super.noSuchMethod(Invocation.getter(#language), returnValue: '')
as String);
String get language => (super.noSuchMethod(
Invocation.getter(#language),
returnValue: '',
) as String);
@override
set language(String? newLanguage) =>
super.noSuchMethod(Invocation.setter(#language, newLanguage),
returnValueForMissingStub: null);
set language(String? newLanguage) => super.noSuchMethod(
Invocation.setter(
#language,
newLanguage,
),
returnValueForMissingStub: null,
);
@override
String get currency =>
(super.noSuchMethod(Invocation.getter(#currency), returnValue: '')
as String);
String get currency => (super.noSuchMethod(
Invocation.getter(#currency),
returnValue: '',
) as String);
@override
set currency(String? newCurrency) =>
super.noSuchMethod(Invocation.setter(#currency, newCurrency),
returnValueForMissingStub: null);
set currency(String? newCurrency) => super.noSuchMethod(
Invocation.setter(
#currency,
newCurrency,
),
returnValueForMissingStub: null,
);
@override
_i7.ExchangeRateType get exchangeRateType =>
(super.noSuchMethod(Invocation.getter(#exchangeRateType),
returnValue: _i7.ExchangeRateType.estimated) as _i7.ExchangeRateType);
_i7.ExchangeRateType get exchangeRateType => (super.noSuchMethod(
Invocation.getter(#exchangeRateType),
returnValue: _i7.ExchangeRateType.estimated,
) as _i7.ExchangeRateType);
@override
set exchangeRateType(_i7.ExchangeRateType? exchangeRateType) =>
super.noSuchMethod(Invocation.setter(#exchangeRateType, exchangeRateType),
returnValueForMissingStub: null);
super.noSuchMethod(
Invocation.setter(
#exchangeRateType,
exchangeRateType,
),
returnValueForMissingStub: null,
);
@override
bool get useBiometrics =>
(super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false)
as bool);
bool get useBiometrics => (super.noSuchMethod(
Invocation.getter(#useBiometrics),
returnValue: false,
) as bool);
@override
set useBiometrics(bool? useBiometrics) =>
super.noSuchMethod(Invocation.setter(#useBiometrics, useBiometrics),
returnValueForMissingStub: null);
set useBiometrics(bool? useBiometrics) => super.noSuchMethod(
Invocation.setter(
#useBiometrics,
useBiometrics,
),
returnValueForMissingStub: null,
);
@override
bool get hasPin =>
(super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false)
as bool);
bool get hasPin => (super.noSuchMethod(
Invocation.getter(#hasPin),
returnValue: false,
) as bool);
@override
set hasPin(bool? hasPin) =>
super.noSuchMethod(Invocation.setter(#hasPin, hasPin),
returnValueForMissingStub: null);
set hasPin(bool? hasPin) => super.noSuchMethod(
Invocation.setter(
#hasPin,
hasPin,
),
returnValueForMissingStub: null,
);
@override
bool get showTestNetCoins =>
(super.noSuchMethod(Invocation.getter(#showTestNetCoins),
returnValue: false) as bool);
bool get showTestNetCoins => (super.noSuchMethod(
Invocation.getter(#showTestNetCoins),
returnValue: false,
) as bool);
@override
set showTestNetCoins(bool? showTestNetCoins) =>
super.noSuchMethod(Invocation.setter(#showTestNetCoins, showTestNetCoins),
returnValueForMissingStub: null);
set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod(
Invocation.setter(
#showTestNetCoins,
showTestNetCoins,
),
returnValueForMissingStub: null,
);
@override
bool get isAutoBackupEnabled =>
(super.noSuchMethod(Invocation.getter(#isAutoBackupEnabled),
returnValue: false) as bool);
bool get isAutoBackupEnabled => (super.noSuchMethod(
Invocation.getter(#isAutoBackupEnabled),
returnValue: false,
) as bool);
@override
set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod(
Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled),
returnValueForMissingStub: null);
Invocation.setter(
#isAutoBackupEnabled,
isAutoBackupEnabled,
),
returnValueForMissingStub: null,
);
@override
set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod(
Invocation.setter(#autoBackupLocation, autoBackupLocation),
returnValueForMissingStub: null);
Invocation.setter(
#autoBackupLocation,
autoBackupLocation,
),
returnValueForMissingStub: null,
);
@override
_i8.BackupFrequencyType get backupFrequencyType =>
(super.noSuchMethod(Invocation.getter(#backupFrequencyType),
returnValue: _i8.BackupFrequencyType.everyTenMinutes)
as _i8.BackupFrequencyType);
_i8.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod(
Invocation.getter(#backupFrequencyType),
returnValue: _i8.BackupFrequencyType.everyTenMinutes,
) as _i8.BackupFrequencyType);
@override
set backupFrequencyType(_i8.BackupFrequencyType? backupFrequencyType) =>
super.noSuchMethod(
Invocation.setter(#backupFrequencyType, backupFrequencyType),
returnValueForMissingStub: null);
Invocation.setter(
#backupFrequencyType,
backupFrequencyType,
),
returnValueForMissingStub: null,
);
@override
set lastAutoBackup(DateTime? lastAutoBackup) =>
super.noSuchMethod(Invocation.setter(#lastAutoBackup, lastAutoBackup),
returnValueForMissingStub: null);
set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod(
Invocation.setter(
#lastAutoBackup,
lastAutoBackup,
),
returnValueForMissingStub: null,
);
@override
bool get hideBlockExplorerWarning =>
(super.noSuchMethod(Invocation.getter(#hideBlockExplorerWarning),
returnValue: false) as bool);
bool get hideBlockExplorerWarning => (super.noSuchMethod(
Invocation.getter(#hideBlockExplorerWarning),
returnValue: false,
) as bool);
@override
set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) =>
super.noSuchMethod(
Invocation.setter(
#hideBlockExplorerWarning, hideBlockExplorerWarning),
returnValueForMissingStub: null);
Invocation.setter(
#hideBlockExplorerWarning,
hideBlockExplorerWarning,
),
returnValueForMissingStub: null,
);
@override
bool get gotoWalletOnStartup =>
(super.noSuchMethod(Invocation.getter(#gotoWalletOnStartup),
returnValue: false) as bool);
bool get gotoWalletOnStartup => (super.noSuchMethod(
Invocation.getter(#gotoWalletOnStartup),
returnValue: false,
) as bool);
@override
set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod(
Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup),
returnValueForMissingStub: null);
Invocation.setter(
#gotoWalletOnStartup,
gotoWalletOnStartup,
),
returnValueForMissingStub: null,
);
@override
set startupWalletId(String? startupWalletId) =>
super.noSuchMethod(Invocation.setter(#startupWalletId, startupWalletId),
returnValueForMissingStub: null);
set startupWalletId(String? startupWalletId) => super.noSuchMethod(
Invocation.setter(
#startupWalletId,
startupWalletId,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
bool get externalCalls => (super.noSuchMethod(
Invocation.getter(#externalCalls),
returnValue: false,
) as bool);
@override
_i4.Future<void> init() => (super.noSuchMethod(Invocation.method(#init, []),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i4.Future<void>);
set externalCalls(bool? externalCalls) => super.noSuchMethod(
Invocation.setter(
#externalCalls,
externalCalls,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i4.Future<void> init() => (super.noSuchMethod(
Invocation.method(
#init,
[],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
@override
_i4.Future<void> incrementCurrentNotificationIndex() => (super.noSuchMethod(
Invocation.method(#incrementCurrentNotificationIndex, []),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i4.Future<void>);
Invocation.method(
#incrementCurrentNotificationIndex,
[],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) =>
super.noSuchMethod(Invocation.method(#addListener, [listener]),
returnValueForMissingStub: null);
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) =>
super.noSuchMethod(Invocation.method(#removeListener, [listener]),
returnValueForMissingStub: null);
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(
#dispose,
[],
),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(
#notifyListeners,
[],
),
returnValueForMissingStub: null,
);
}

View file

@ -1,7 +1,8 @@
// Mocks generated by Mockito 5.2.0 from annotations
// Mocks generated by Mockito 5.3.2 from annotations
// in stackwallet/test/electrumx_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i3;
import 'dart:ui' as _i8;
@ -22,8 +23,17 @@ import 'package:stackwallet/utilities/prefs.dart' as _i4;
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeDuration_0 extends _i1.Fake implements Duration {}
class _FakeDuration_0 extends _i1.SmartFake implements Duration {
_FakeDuration_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [JsonRPC].
///
@ -34,37 +44,68 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC {
}
@override
bool get useSSL =>
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
as bool);
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
set useSSL(bool? _useSSL) =>
super.noSuchMethod(Invocation.setter(#useSSL, _useSSL),
returnValueForMissingStub: null);
set useSSL(bool? _useSSL) => super.noSuchMethod(
Invocation.setter(
#useSSL,
_useSSL,
),
returnValueForMissingStub: null,
);
@override
String get host =>
(super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String);
String get host => (super.noSuchMethod(
Invocation.getter(#host),
returnValue: '',
) as String);
@override
set host(String? _host) => super.noSuchMethod(Invocation.setter(#host, _host),
returnValueForMissingStub: null);
set host(String? _host) => super.noSuchMethod(
Invocation.setter(
#host,
_host,
),
returnValueForMissingStub: null,
);
@override
int get port =>
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
set port(int? _port) => super.noSuchMethod(Invocation.setter(#port, _port),
returnValueForMissingStub: null);
set port(int? _port) => super.noSuchMethod(
Invocation.setter(
#port,
_port,
),
returnValueForMissingStub: null,
);
@override
Duration get connectionTimeout =>
(super.noSuchMethod(Invocation.getter(#connectionTimeout),
returnValue: _FakeDuration_0()) as Duration);
Duration get connectionTimeout => (super.noSuchMethod(
Invocation.getter(#connectionTimeout),
returnValue: _FakeDuration_0(
this,
Invocation.getter(#connectionTimeout),
),
) as Duration);
@override
set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod(
Invocation.setter(#connectionTimeout, _connectionTimeout),
returnValueForMissingStub: null);
Invocation.setter(
#connectionTimeout,
_connectionTimeout,
),
returnValueForMissingStub: null,
);
@override
_i3.Future<dynamic> request(String? jsonRpcRequest) =>
(super.noSuchMethod(Invocation.method(#request, [jsonRpcRequest]),
returnValue: Future<dynamic>.value()) as _i3.Future<dynamic>);
_i3.Future<dynamic> request(String? jsonRpcRequest) => (super.noSuchMethod(
Invocation.method(
#request,
[jsonRpcRequest],
),
returnValue: _i3.Future<dynamic>.value(),
) as _i3.Future<dynamic>);
}
/// A class which mocks [Prefs].
@ -76,192 +117,317 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs {
}
@override
bool get isInitialized =>
(super.noSuchMethod(Invocation.getter(#isInitialized), returnValue: false)
as bool);
bool get isInitialized => (super.noSuchMethod(
Invocation.getter(#isInitialized),
returnValue: false,
) as bool);
@override
int get lastUnlockedTimeout => (super
.noSuchMethod(Invocation.getter(#lastUnlockedTimeout), returnValue: 0)
as int);
int get lastUnlockedTimeout => (super.noSuchMethod(
Invocation.getter(#lastUnlockedTimeout),
returnValue: 0,
) as int);
@override
set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod(
Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout),
returnValueForMissingStub: null);
Invocation.setter(
#lastUnlockedTimeout,
lastUnlockedTimeout,
),
returnValueForMissingStub: null,
);
@override
int get lastUnlocked =>
(super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0)
as int);
int get lastUnlocked => (super.noSuchMethod(
Invocation.getter(#lastUnlocked),
returnValue: 0,
) as int);
@override
set lastUnlocked(int? lastUnlocked) =>
super.noSuchMethod(Invocation.setter(#lastUnlocked, lastUnlocked),
returnValueForMissingStub: null);
set lastUnlocked(int? lastUnlocked) => super.noSuchMethod(
Invocation.setter(
#lastUnlocked,
lastUnlocked,
),
returnValueForMissingStub: null,
);
@override
int get currentNotificationId =>
(super.noSuchMethod(Invocation.getter(#currentNotificationId),
returnValue: 0) as int);
int get currentNotificationId => (super.noSuchMethod(
Invocation.getter(#currentNotificationId),
returnValue: 0,
) as int);
@override
List<String> get walletIdsSyncOnStartup =>
(super.noSuchMethod(Invocation.getter(#walletIdsSyncOnStartup),
returnValue: <String>[]) as List<String>);
List<String> get walletIdsSyncOnStartup => (super.noSuchMethod(
Invocation.getter(#walletIdsSyncOnStartup),
returnValue: <String>[],
) as List<String>);
@override
set walletIdsSyncOnStartup(List<String>? walletIdsSyncOnStartup) =>
super.noSuchMethod(
Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup),
returnValueForMissingStub: null);
Invocation.setter(
#walletIdsSyncOnStartup,
walletIdsSyncOnStartup,
),
returnValueForMissingStub: null,
);
@override
_i5.SyncingType get syncType =>
(super.noSuchMethod(Invocation.getter(#syncType),
returnValue: _i5.SyncingType.currentWalletOnly) as _i5.SyncingType);
_i5.SyncingType get syncType => (super.noSuchMethod(
Invocation.getter(#syncType),
returnValue: _i5.SyncingType.currentWalletOnly,
) as _i5.SyncingType);
@override
set syncType(_i5.SyncingType? syncType) =>
super.noSuchMethod(Invocation.setter(#syncType, syncType),
returnValueForMissingStub: null);
set syncType(_i5.SyncingType? syncType) => super.noSuchMethod(
Invocation.setter(
#syncType,
syncType,
),
returnValueForMissingStub: null,
);
@override
bool get wifiOnly =>
(super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false)
as bool);
bool get wifiOnly => (super.noSuchMethod(
Invocation.getter(#wifiOnly),
returnValue: false,
) as bool);
@override
set wifiOnly(bool? wifiOnly) =>
super.noSuchMethod(Invocation.setter(#wifiOnly, wifiOnly),
returnValueForMissingStub: null);
set wifiOnly(bool? wifiOnly) => super.noSuchMethod(
Invocation.setter(
#wifiOnly,
wifiOnly,
),
returnValueForMissingStub: null,
);
@override
bool get externalCalls =>
(super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false)
as bool);
@override
set externalCalls(bool? eCalls) =>
super.noSuchMethod(Invocation.setter(#externalCalls, eCalls),
returnValueForMissingStub: null);
@override
bool get showFavoriteWallets =>
(super.noSuchMethod(Invocation.getter(#showFavoriteWallets),
returnValue: false) as bool);
bool get showFavoriteWallets => (super.noSuchMethod(
Invocation.getter(#showFavoriteWallets),
returnValue: false,
) as bool);
@override
set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod(
Invocation.setter(#showFavoriteWallets, showFavoriteWallets),
returnValueForMissingStub: null);
Invocation.setter(
#showFavoriteWallets,
showFavoriteWallets,
),
returnValueForMissingStub: null,
);
@override
String get language =>
(super.noSuchMethod(Invocation.getter(#language), returnValue: '')
as String);
String get language => (super.noSuchMethod(
Invocation.getter(#language),
returnValue: '',
) as String);
@override
set language(String? newLanguage) =>
super.noSuchMethod(Invocation.setter(#language, newLanguage),
returnValueForMissingStub: null);
set language(String? newLanguage) => super.noSuchMethod(
Invocation.setter(
#language,
newLanguage,
),
returnValueForMissingStub: null,
);
@override
String get currency =>
(super.noSuchMethod(Invocation.getter(#currency), returnValue: '')
as String);
String get currency => (super.noSuchMethod(
Invocation.getter(#currency),
returnValue: '',
) as String);
@override
set currency(String? newCurrency) =>
super.noSuchMethod(Invocation.setter(#currency, newCurrency),
returnValueForMissingStub: null);
set currency(String? newCurrency) => super.noSuchMethod(
Invocation.setter(
#currency,
newCurrency,
),
returnValueForMissingStub: null,
);
@override
_i6.ExchangeRateType get exchangeRateType =>
(super.noSuchMethod(Invocation.getter(#exchangeRateType),
returnValue: _i6.ExchangeRateType.estimated) as _i6.ExchangeRateType);
_i6.ExchangeRateType get exchangeRateType => (super.noSuchMethod(
Invocation.getter(#exchangeRateType),
returnValue: _i6.ExchangeRateType.estimated,
) as _i6.ExchangeRateType);
@override
set exchangeRateType(_i6.ExchangeRateType? exchangeRateType) =>
super.noSuchMethod(Invocation.setter(#exchangeRateType, exchangeRateType),
returnValueForMissingStub: null);
super.noSuchMethod(
Invocation.setter(
#exchangeRateType,
exchangeRateType,
),
returnValueForMissingStub: null,
);
@override
bool get useBiometrics =>
(super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false)
as bool);
bool get useBiometrics => (super.noSuchMethod(
Invocation.getter(#useBiometrics),
returnValue: false,
) as bool);
@override
set useBiometrics(bool? useBiometrics) =>
super.noSuchMethod(Invocation.setter(#useBiometrics, useBiometrics),
returnValueForMissingStub: null);
set useBiometrics(bool? useBiometrics) => super.noSuchMethod(
Invocation.setter(
#useBiometrics,
useBiometrics,
),
returnValueForMissingStub: null,
);
@override
bool get hasPin =>
(super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false)
as bool);
bool get hasPin => (super.noSuchMethod(
Invocation.getter(#hasPin),
returnValue: false,
) as bool);
@override
set hasPin(bool? hasPin) =>
super.noSuchMethod(Invocation.setter(#hasPin, hasPin),
returnValueForMissingStub: null);
set hasPin(bool? hasPin) => super.noSuchMethod(
Invocation.setter(
#hasPin,
hasPin,
),
returnValueForMissingStub: null,
);
@override
bool get showTestNetCoins =>
(super.noSuchMethod(Invocation.getter(#showTestNetCoins),
returnValue: false) as bool);
bool get showTestNetCoins => (super.noSuchMethod(
Invocation.getter(#showTestNetCoins),
returnValue: false,
) as bool);
@override
set showTestNetCoins(bool? showTestNetCoins) =>
super.noSuchMethod(Invocation.setter(#showTestNetCoins, showTestNetCoins),
returnValueForMissingStub: null);
set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod(
Invocation.setter(
#showTestNetCoins,
showTestNetCoins,
),
returnValueForMissingStub: null,
);
@override
bool get isAutoBackupEnabled =>
(super.noSuchMethod(Invocation.getter(#isAutoBackupEnabled),
returnValue: false) as bool);
bool get isAutoBackupEnabled => (super.noSuchMethod(
Invocation.getter(#isAutoBackupEnabled),
returnValue: false,
) as bool);
@override
set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod(
Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled),
returnValueForMissingStub: null);
Invocation.setter(
#isAutoBackupEnabled,
isAutoBackupEnabled,
),
returnValueForMissingStub: null,
);
@override
set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod(
Invocation.setter(#autoBackupLocation, autoBackupLocation),
returnValueForMissingStub: null);
Invocation.setter(
#autoBackupLocation,
autoBackupLocation,
),
returnValueForMissingStub: null,
);
@override
_i7.BackupFrequencyType get backupFrequencyType =>
(super.noSuchMethod(Invocation.getter(#backupFrequencyType),
returnValue: _i7.BackupFrequencyType.everyTenMinutes)
as _i7.BackupFrequencyType);
_i7.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod(
Invocation.getter(#backupFrequencyType),
returnValue: _i7.BackupFrequencyType.everyTenMinutes,
) as _i7.BackupFrequencyType);
@override
set backupFrequencyType(_i7.BackupFrequencyType? backupFrequencyType) =>
super.noSuchMethod(
Invocation.setter(#backupFrequencyType, backupFrequencyType),
returnValueForMissingStub: null);
Invocation.setter(
#backupFrequencyType,
backupFrequencyType,
),
returnValueForMissingStub: null,
);
@override
set lastAutoBackup(DateTime? lastAutoBackup) =>
super.noSuchMethod(Invocation.setter(#lastAutoBackup, lastAutoBackup),
returnValueForMissingStub: null);
set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod(
Invocation.setter(
#lastAutoBackup,
lastAutoBackup,
),
returnValueForMissingStub: null,
);
@override
bool get hideBlockExplorerWarning =>
(super.noSuchMethod(Invocation.getter(#hideBlockExplorerWarning),
returnValue: false) as bool);
bool get hideBlockExplorerWarning => (super.noSuchMethod(
Invocation.getter(#hideBlockExplorerWarning),
returnValue: false,
) as bool);
@override
set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) =>
super.noSuchMethod(
Invocation.setter(
#hideBlockExplorerWarning, hideBlockExplorerWarning),
returnValueForMissingStub: null);
Invocation.setter(
#hideBlockExplorerWarning,
hideBlockExplorerWarning,
),
returnValueForMissingStub: null,
);
@override
bool get gotoWalletOnStartup =>
(super.noSuchMethod(Invocation.getter(#gotoWalletOnStartup),
returnValue: false) as bool);
bool get gotoWalletOnStartup => (super.noSuchMethod(
Invocation.getter(#gotoWalletOnStartup),
returnValue: false,
) as bool);
@override
set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod(
Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup),
returnValueForMissingStub: null);
Invocation.setter(
#gotoWalletOnStartup,
gotoWalletOnStartup,
),
returnValueForMissingStub: null,
);
@override
set startupWalletId(String? startupWalletId) =>
super.noSuchMethod(Invocation.setter(#startupWalletId, startupWalletId),
returnValueForMissingStub: null);
set startupWalletId(String? startupWalletId) => super.noSuchMethod(
Invocation.setter(
#startupWalletId,
startupWalletId,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners =>
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
as bool);
bool get externalCalls => (super.noSuchMethod(
Invocation.getter(#externalCalls),
returnValue: false,
) as bool);
@override
_i3.Future<void> init() => (super.noSuchMethod(Invocation.method(#init, []),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
set externalCalls(bool? externalCalls) => super.noSuchMethod(
Invocation.setter(
#externalCalls,
externalCalls,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i3.Future<void> init() => (super.noSuchMethod(
Invocation.method(
#init,
[],
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
@override
_i3.Future<void> incrementCurrentNotificationIndex() => (super.noSuchMethod(
Invocation.method(#incrementCurrentNotificationIndex, []),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
Invocation.method(
#incrementCurrentNotificationIndex,
[],
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) =>
super.noSuchMethod(Invocation.method(#addListener, [listener]),
returnValueForMissingStub: null);
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) =>
super.noSuchMethod(Invocation.method(#removeListener, [listener]),
returnValueForMissingStub: null);
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
returnValueForMissingStub: null);
void dispose() => super.noSuchMethod(
Invocation.method(
#dispose,
[],
),
returnValueForMissingStub: null,
);
@override
void notifyListeners() =>
super.noSuchMethod(Invocation.method(#notifyListeners, []),
returnValueForMissingStub: null);
void notifyListeners() => super.noSuchMethod(
Invocation.method(
#notifyListeners,
[],
),
returnValueForMissingStub: null,
);
}

View file

@ -1,7 +1,8 @@
// Mocks generated by Mockito 5.2.0 from annotations
// Mocks generated by Mockito 5.3.2 from annotations
// in stackwallet/test/flutter_secure_storage_interface_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i3;
import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i2;
@ -16,18 +17,69 @@ import 'package:mockito/mockito.dart' as _i1;
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeIOSOptions_0 extends _i1.Fake implements _i2.IOSOptions {}
class _FakeIOSOptions_0 extends _i1.SmartFake implements _i2.IOSOptions {
_FakeIOSOptions_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeAndroidOptions_1 extends _i1.Fake implements _i2.AndroidOptions {}
class _FakeAndroidOptions_1 extends _i1.SmartFake
implements _i2.AndroidOptions {
_FakeAndroidOptions_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeLinuxOptions_2 extends _i1.Fake implements _i2.LinuxOptions {}
class _FakeLinuxOptions_2 extends _i1.SmartFake implements _i2.LinuxOptions {
_FakeLinuxOptions_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeWindowsOptions_3 extends _i1.Fake implements _i2.WindowsOptions {}
class _FakeWindowsOptions_3 extends _i1.SmartFake
implements _i2.WindowsOptions {
_FakeWindowsOptions_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeWebOptions_4 extends _i1.Fake implements _i2.WebOptions {}
class _FakeWebOptions_4 extends _i1.SmartFake implements _i2.WebOptions {
_FakeWebOptions_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMacOsOptions_5 extends _i1.Fake implements _i2.MacOsOptions {}
class _FakeMacOsOptions_5 extends _i1.SmartFake implements _i2.MacOsOptions {
_FakeMacOsOptions_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FlutterSecureStorage].
///
@ -39,41 +91,69 @@ class MockFlutterSecureStorage extends _i1.Mock
}
@override
_i2.IOSOptions get iOptions =>
(super.noSuchMethod(Invocation.getter(#iOptions),
returnValue: _FakeIOSOptions_0()) as _i2.IOSOptions);
_i2.IOSOptions get iOptions => (super.noSuchMethod(
Invocation.getter(#iOptions),
returnValue: _FakeIOSOptions_0(
this,
Invocation.getter(#iOptions),
),
) as _i2.IOSOptions);
@override
_i2.AndroidOptions get aOptions =>
(super.noSuchMethod(Invocation.getter(#aOptions),
returnValue: _FakeAndroidOptions_1()) as _i2.AndroidOptions);
_i2.AndroidOptions get aOptions => (super.noSuchMethod(
Invocation.getter(#aOptions),
returnValue: _FakeAndroidOptions_1(
this,
Invocation.getter(#aOptions),
),
) as _i2.AndroidOptions);
@override
_i2.LinuxOptions get lOptions =>
(super.noSuchMethod(Invocation.getter(#lOptions),
returnValue: _FakeLinuxOptions_2()) as _i2.LinuxOptions);
_i2.LinuxOptions get lOptions => (super.noSuchMethod(
Invocation.getter(#lOptions),
returnValue: _FakeLinuxOptions_2(
this,
Invocation.getter(#lOptions),
),
) as _i2.LinuxOptions);
@override
_i2.WindowsOptions get wOptions =>
(super.noSuchMethod(Invocation.getter(#wOptions),
returnValue: _FakeWindowsOptions_3()) as _i2.WindowsOptions);
_i2.WindowsOptions get wOptions => (super.noSuchMethod(
Invocation.getter(#wOptions),
returnValue: _FakeWindowsOptions_3(
this,
Invocation.getter(#wOptions),
),
) as _i2.WindowsOptions);
@override
_i2.WebOptions get webOptions =>
(super.noSuchMethod(Invocation.getter(#webOptions),
returnValue: _FakeWebOptions_4()) as _i2.WebOptions);
_i2.WebOptions get webOptions => (super.noSuchMethod(
Invocation.getter(#webOptions),
returnValue: _FakeWebOptions_4(
this,
Invocation.getter(#webOptions),
),
) as _i2.WebOptions);
@override
_i2.MacOsOptions get mOptions =>
(super.noSuchMethod(Invocation.getter(#mOptions),
returnValue: _FakeMacOsOptions_5()) as _i2.MacOsOptions);
_i2.MacOsOptions get mOptions => (super.noSuchMethod(
Invocation.getter(#mOptions),
returnValue: _FakeMacOsOptions_5(
this,
Invocation.getter(#mOptions),
),
) as _i2.MacOsOptions);
@override
_i3.Future<void> write(
{String? key,
String? value,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
_i3.Future<void> write({
required String? key,
required String? value,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(#write, [], {
Invocation.method(
#write,
[],
{
#key: key,
#value: value,
#iOptions: iOptions,
@ -81,108 +161,138 @@ class MockFlutterSecureStorage extends _i1.Mock
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
#wOptions: wOptions,
},
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
@override
_i3.Future<String?> read(
{String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
_i3.Future<String?> read({
required String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(#read, [], {
Invocation.method(
#read,
[],
{
#key: key,
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue: Future<String?>.value()) as _i3.Future<String?>);
#wOptions: wOptions,
},
),
returnValue: _i3.Future<String?>.value(),
) as _i3.Future<String?>);
@override
_i3.Future<bool> containsKey(
{String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
_i3.Future<bool> containsKey({
required String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(#containsKey, [], {
Invocation.method(
#containsKey,
[],
{
#key: key,
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue: Future<bool>.value(false)) as _i3.Future<bool>);
#wOptions: wOptions,
},
),
returnValue: _i3.Future<bool>.value(false),
) as _i3.Future<bool>);
@override
_i3.Future<void> delete(
{String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
_i3.Future<void> delete({
required String? key,
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(#delete, [], {
Invocation.method(
#delete,
[],
{
#key: key,
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
#wOptions: wOptions,
},
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
@override
_i3.Future<Map<String, String>> readAll(
{_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
_i3.Future<Map<String, String>> readAll({
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(#readAll, [], {
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue:
Future<Map<String, String>>.value(<String, String>{}))
as _i3.Future<Map<String, String>>);
@override
_i3.Future<void> deleteAll(
{_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions}) =>
(super.noSuchMethod(
Invocation.method(#deleteAll, [], {
Invocation.method(
#readAll,
[],
{
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions
}),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
#wOptions: wOptions,
},
),
returnValue: _i3.Future<Map<String, String>>.value(<String, String>{}),
) as _i3.Future<Map<String, String>>);
@override
_i3.Future<void> deleteAll({
_i2.IOSOptions? iOptions,
_i2.AndroidOptions? aOptions,
_i2.LinuxOptions? lOptions,
_i2.WebOptions? webOptions,
_i2.MacOsOptions? mOptions,
_i2.WindowsOptions? wOptions,
}) =>
(super.noSuchMethod(
Invocation.method(
#deleteAll,
[],
{
#iOptions: iOptions,
#aOptions: aOptions,
#lOptions: lOptions,
#webOptions: webOptions,
#mOptions: mOptions,
#wOptions: wOptions,
},
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
}

View file

@ -1,7 +1,8 @@
// Mocks generated by Mockito 5.2.0 from annotations
// Mocks generated by Mockito 5.3.2 from annotations
// in stackwallet/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:convert' as _i5;
import 'dart:typed_data' as _i4;
@ -18,9 +19,18 @@ import 'package:mockito/mockito.dart' as _i2;
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeHiveList_0<E extends _i1.HiveObjectMixin> extends _i2.Fake
implements _i3.HiveList<E> {}
class _FakeHiveList_0<E extends _i1.HiveObjectMixin> extends _i2.SmartFake
implements _i3.HiveList<E> {
_FakeHiveList_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [BinaryReader].
///
@ -31,95 +41,188 @@ class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader {
}
@override
int get availableBytes =>
(super.noSuchMethod(Invocation.getter(#availableBytes), returnValue: 0)
as int);
int get availableBytes => (super.noSuchMethod(
Invocation.getter(#availableBytes),
returnValue: 0,
) as int);
@override
int get usedBytes =>
(super.noSuchMethod(Invocation.getter(#usedBytes), returnValue: 0)
as int);
int get usedBytes => (super.noSuchMethod(
Invocation.getter(#usedBytes),
returnValue: 0,
) as int);
@override
void skip(int? bytes) => super.noSuchMethod(Invocation.method(#skip, [bytes]),
returnValueForMissingStub: null);
void skip(int? bytes) => super.noSuchMethod(
Invocation.method(
#skip,
[bytes],
),
returnValueForMissingStub: null,
);
@override
int readByte() =>
(super.noSuchMethod(Invocation.method(#readByte, []), returnValue: 0)
as int);
int readByte() => (super.noSuchMethod(
Invocation.method(
#readByte,
[],
),
returnValue: 0,
) as int);
@override
_i4.Uint8List viewBytes(int? bytes) =>
(super.noSuchMethod(Invocation.method(#viewBytes, [bytes]),
returnValue: _i4.Uint8List(0)) as _i4.Uint8List);
_i4.Uint8List viewBytes(int? bytes) => (super.noSuchMethod(
Invocation.method(
#viewBytes,
[bytes],
),
returnValue: _i4.Uint8List(0),
) as _i4.Uint8List);
@override
_i4.Uint8List peekBytes(int? bytes) =>
(super.noSuchMethod(Invocation.method(#peekBytes, [bytes]),
returnValue: _i4.Uint8List(0)) as _i4.Uint8List);
_i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod(
Invocation.method(
#peekBytes,
[bytes],
),
returnValue: _i4.Uint8List(0),
) as _i4.Uint8List);
@override
int readWord() =>
(super.noSuchMethod(Invocation.method(#readWord, []), returnValue: 0)
as int);
int readWord() => (super.noSuchMethod(
Invocation.method(
#readWord,
[],
),
returnValue: 0,
) as int);
@override
int readInt32() =>
(super.noSuchMethod(Invocation.method(#readInt32, []), returnValue: 0)
as int);
int readInt32() => (super.noSuchMethod(
Invocation.method(
#readInt32,
[],
),
returnValue: 0,
) as int);
@override
int readUint32() =>
(super.noSuchMethod(Invocation.method(#readUint32, []), returnValue: 0)
as int);
int readUint32() => (super.noSuchMethod(
Invocation.method(
#readUint32,
[],
),
returnValue: 0,
) as int);
@override
int readInt() =>
(super.noSuchMethod(Invocation.method(#readInt, []), returnValue: 0)
as int);
int readInt() => (super.noSuchMethod(
Invocation.method(
#readInt,
[],
),
returnValue: 0,
) as int);
@override
double readDouble() =>
(super.noSuchMethod(Invocation.method(#readDouble, []), returnValue: 0.0)
as double);
double readDouble() => (super.noSuchMethod(
Invocation.method(
#readDouble,
[],
),
returnValue: 0.0,
) as double);
@override
bool readBool() =>
(super.noSuchMethod(Invocation.method(#readBool, []), returnValue: false)
as bool);
bool readBool() => (super.noSuchMethod(
Invocation.method(
#readBool,
[],
),
returnValue: false,
) as bool);
@override
String readString(
[int? byteCount,
_i5.Converter<List<int>, String>? decoder =
const _i5.Utf8Decoder()]) =>
(super.noSuchMethod(Invocation.method(#readString, [byteCount, decoder]),
returnValue: '') as String);
String readString([
int? byteCount,
_i5.Converter<List<int>, String>? decoder = const _i5.Utf8Decoder(),
]) =>
(super.noSuchMethod(
Invocation.method(
#readString,
[
byteCount,
decoder,
],
),
returnValue: '',
) as String);
@override
_i4.Uint8List readByteList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readByteList, [length]),
returnValue: _i4.Uint8List(0)) as _i4.Uint8List);
_i4.Uint8List readByteList([int? length]) => (super.noSuchMethod(
Invocation.method(
#readByteList,
[length],
),
returnValue: _i4.Uint8List(0),
) as _i4.Uint8List);
@override
List<int> readIntList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readIntList, [length]),
returnValue: <int>[]) as List<int>);
List<int> readIntList([int? length]) => (super.noSuchMethod(
Invocation.method(
#readIntList,
[length],
),
returnValue: <int>[],
) as List<int>);
@override
List<double> readDoubleList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readDoubleList, [length]),
returnValue: <double>[]) as List<double>);
List<double> readDoubleList([int? length]) => (super.noSuchMethod(
Invocation.method(
#readDoubleList,
[length],
),
returnValue: <double>[],
) as List<double>);
@override
List<bool> readBoolList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readBoolList, [length]),
returnValue: <bool>[]) as List<bool>);
List<bool> readBoolList([int? length]) => (super.noSuchMethod(
Invocation.method(
#readBoolList,
[length],
),
returnValue: <bool>[],
) as List<bool>);
@override
List<String> readStringList(
[int? length,
_i5.Converter<List<int>, String>? decoder =
const _i5.Utf8Decoder()]) =>
(super.noSuchMethod(Invocation.method(#readStringList, [length, decoder]),
returnValue: <String>[]) as List<String>);
List<String> readStringList([
int? length,
_i5.Converter<List<int>, String>? decoder = const _i5.Utf8Decoder(),
]) =>
(super.noSuchMethod(
Invocation.method(
#readStringList,
[
length,
decoder,
],
),
returnValue: <String>[],
) as List<String>);
@override
List<dynamic> readList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readList, [length]),
returnValue: <dynamic>[]) as List<dynamic>);
List<dynamic> readList([int? length]) => (super.noSuchMethod(
Invocation.method(
#readList,
[length],
),
returnValue: <dynamic>[],
) as List<dynamic>);
@override
Map<dynamic, dynamic> readMap([int? length]) =>
(super.noSuchMethod(Invocation.method(#readMap, [length]),
returnValue: <dynamic, dynamic>{}) as Map<dynamic, dynamic>);
Map<dynamic, dynamic> readMap([int? length]) => (super.noSuchMethod(
Invocation.method(
#readMap,
[length],
),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) =>
(super.noSuchMethod(Invocation.method(#readHiveList, [length]),
returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>())
as _i3.HiveList<_i1.HiveObjectMixin>);
(super.noSuchMethod(
Invocation.method(
#readHiveList,
[length],
),
returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>(
this,
Invocation.method(
#readHiveList,
[length],
),
),
) as _i3.HiveList<_i1.HiveObjectMixin>);
}
/// A class which mocks [BinaryWriter].
@ -131,93 +234,197 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter {
}
@override
void writeByte(int? byte) =>
super.noSuchMethod(Invocation.method(#writeByte, [byte]),
returnValueForMissingStub: null);
void writeByte(int? byte) => super.noSuchMethod(
Invocation.method(
#writeByte,
[byte],
),
returnValueForMissingStub: null,
);
@override
void writeWord(int? value) =>
super.noSuchMethod(Invocation.method(#writeWord, [value]),
returnValueForMissingStub: null);
void writeWord(int? value) => super.noSuchMethod(
Invocation.method(
#writeWord,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeInt32(int? value) =>
super.noSuchMethod(Invocation.method(#writeInt32, [value]),
returnValueForMissingStub: null);
void writeInt32(int? value) => super.noSuchMethod(
Invocation.method(
#writeInt32,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeUint32(int? value) =>
super.noSuchMethod(Invocation.method(#writeUint32, [value]),
returnValueForMissingStub: null);
void writeUint32(int? value) => super.noSuchMethod(
Invocation.method(
#writeUint32,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeInt(int? value) =>
super.noSuchMethod(Invocation.method(#writeInt, [value]),
returnValueForMissingStub: null);
void writeInt(int? value) => super.noSuchMethod(
Invocation.method(
#writeInt,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeDouble(double? value) =>
super.noSuchMethod(Invocation.method(#writeDouble, [value]),
returnValueForMissingStub: null);
void writeDouble(double? value) => super.noSuchMethod(
Invocation.method(
#writeDouble,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeBool(bool? value) =>
super.noSuchMethod(Invocation.method(#writeBool, [value]),
returnValueForMissingStub: null);
void writeBool(bool? value) => super.noSuchMethod(
Invocation.method(
#writeBool,
[value],
),
returnValueForMissingStub: null,
);
@override
void writeString(String? value,
{bool? writeByteCount = true,
_i5.Converter<String, List<int>>? encoder =
const _i5.Utf8Encoder()}) =>
void writeString(
String? value, {
bool? writeByteCount = true,
_i5.Converter<String, List<int>>? encoder = const _i5.Utf8Encoder(),
}) =>
super.noSuchMethod(
Invocation.method(#writeString, [value],
{#writeByteCount: writeByteCount, #encoder: encoder}),
returnValueForMissingStub: null);
Invocation.method(
#writeString,
[value],
{
#writeByteCount: writeByteCount,
#encoder: encoder,
},
),
returnValueForMissingStub: null,
);
@override
void writeByteList(List<int>? bytes, {bool? writeLength = true}) =>
void writeByteList(
List<int>? bytes, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(
#writeByteList, [bytes], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeByteList,
[bytes],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeIntList(List<int>? list, {bool? writeLength = true}) =>
void writeIntList(
List<int>? list, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(#writeIntList, [list], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeIntList,
[list],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeDoubleList(List<double>? list, {bool? writeLength = true}) =>
void writeDoubleList(
List<double>? list, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(
#writeDoubleList, [list], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeDoubleList,
[list],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeBoolList(List<bool>? list, {bool? writeLength = true}) =>
void writeBoolList(
List<bool>? list, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(
#writeBoolList, [list], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeBoolList,
[list],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeStringList(List<String>? list,
{bool? writeLength = true,
_i5.Converter<String, List<int>>? encoder =
const _i5.Utf8Encoder()}) =>
void writeStringList(
List<String>? list, {
bool? writeLength = true,
_i5.Converter<String, List<int>>? encoder = const _i5.Utf8Encoder(),
}) =>
super.noSuchMethod(
Invocation.method(#writeStringList, [list],
{#writeLength: writeLength, #encoder: encoder}),
returnValueForMissingStub: null);
Invocation.method(
#writeStringList,
[list],
{
#writeLength: writeLength,
#encoder: encoder,
},
),
returnValueForMissingStub: null,
);
@override
void writeList(List<dynamic>? list, {bool? writeLength = true}) =>
void writeList(
List<dynamic>? list, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(#writeList, [list], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeList,
[list],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeMap(Map<dynamic, dynamic>? map, {bool? writeLength = true}) =>
void writeMap(
Map<dynamic, dynamic>? map, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(#writeMap, [map], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeMap,
[map],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void writeHiveList(_i3.HiveList<_i1.HiveObjectMixin>? list,
{bool? writeLength = true}) =>
void writeHiveList(
_i3.HiveList<_i1.HiveObjectMixin>? list, {
bool? writeLength = true,
}) =>
super.noSuchMethod(
Invocation.method(
#writeHiveList, [list], {#writeLength: writeLength}),
returnValueForMissingStub: null);
Invocation.method(
#writeHiveList,
[list],
{#writeLength: writeLength},
),
returnValueForMissingStub: null,
);
@override
void write<T>(T? value, {bool? writeTypeId = true}) => super.noSuchMethod(
Invocation.method(#write, [value], {#writeTypeId: writeTypeId}),
returnValueForMissingStub: null);
void write<T>(
T? value, {
bool? writeTypeId = true,
}) =>
super.noSuchMethod(
Invocation.method(
#write,
[value],
{#writeTypeId: writeTypeId},
),
returnValueForMissingStub: null,
);
}

Some files were not shown because too many files have changed in this diff Show more