diff --git a/.gitignore b/.gitignore index 30fb5a6e1..0a8db4dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,13 @@ crypto_plugins/cs_monero/built_outputs crypto_plugins/cs_monero/build crypto_plugins/*.diff /devtools_options.yaml + +# generated interfaces +lib/wl_gen/generated/ + +# normally these aren't ignored but WL changes them... +/linux/flutter/generated_plugin_registrant.cc +/windows/flutter/generated_plugin_registrant.cc +/linux/flutter/generated_plugins.cmake +/windows/flutter/generated_plugins.cmake +/macos/Flutter/GeneratedPluginRegistrant.swift diff --git a/.gitmodules b/.gitmodules index d9a561cc1..d0c1810aa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "crypto_plugins/frostdart"] path = crypto_plugins/frostdart url = https://github.com/cypherstack/frostdart +[submodule "crypto_plugins/flutter_libmwc"] + path = crypto_plugins/flutter_libmwc + url = https://github.com/cypherstack/flutter_libmwc diff --git a/README.md b/README.md index 4c18c3181..70bf3f836 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,32 @@ Stack Wallet is a fully open source cryptocurrency wallet. With an easy to use u ## Feature List Highlights include: -- 11 Different cryptocurrencies: +- 23 Different cryptocurrencies: - [Bitcoin](https://bitcoin.org/en/) + - Bitcoin Frost - [Bitcoin Cash](https://bch.info/en/) + - [Banano](https://banano.cc/) + - [Cardano](https://cardano.org/) + - [Dash](https://www.dash.org/) - [Dogecoin](https://dogecoin.com/) - [Epic Cash](https://linktr.ee/epiccash) + - [MimbleWimbleCoin](https://mwc.mw) - [Ethereum](https://ethereum.org/en/) + - [Ecash](https://e.cash/) + - [Fact0rn](https://www.fact0rn.io/) - [Firo](https://firo.org/) - [Litecoin](https://litecoin.org/) - [Monero](https://www.getmonero.org/) + - [Nano](https://nano.org/) - [Namecoin](https://www.namecoin.org/) - [Particl](https://particl.io/) + - [Peercoin](https://www.peercoin.net/) + - [Salvium](https://salvium.io/) + - [Solana](https://solana.com/) + - [Stellar](https://stellar.org/) + - [Tezos](https://tezos.com/) - [Wownero](https://wownero.org/) + - [Xelis](https://xelis.org/) - All private keys and seeds stay on device and are never shared. - Easy backup and restore feature to save all the information that's important to you. - Trading cryptocurrencies through our partners. @@ -31,8 +45,6 @@ Highlights include: - Open source software. - No ads. -> You can find the roadmap [here](docs/roadmap.md). - ## Building You can look at the [build instructions](docs/building.md) for more details. diff --git a/analysis_options.yaml b/analysis_options.yaml index db030aa14..1252b9a85 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -18,6 +18,8 @@ analyzer: - "crypto_plugins/**" - "bin/cache/**" - "lib/generated_plugin_registrant.dart" + - "lib/wl_gen/generated/**" + - '**/*.template.dart' # For more information see: # https://dart.dev/guides/language/analysis-options#enabling-additional-type-checks diff --git a/android/.gitignore b/android/.gitignore index bb7ef2081..d4a6340b4 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,4 +7,5 @@ gradle-wrapper.jar /key.properties app/upload-keystore-campfire.jks app/upload-keystore-stackwallet.jks -GeneratedPluginRegistrant.java \ No newline at end of file +GeneratedPluginRegistrant.java +/.kotlin/ diff --git a/android/settings.gradle b/android/settings.gradle index 02fb0cfb0..04c37e5f2 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version '8.7.0' apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "org.jetbrains.kotlin.android" version "2.2.20" apply false } include ":app" diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 25e6cb3a3..5a705486d 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 25e6cb3a3e7bee04e425af6beccb47e8d0708fdb +Subproject commit 5a705486d07f13ef0c5a044e7b9588dea4c989ff diff --git a/crypto_plugins/flutter_libmwc b/crypto_plugins/flutter_libmwc new file mode 160000 index 000000000..9df277125 --- /dev/null +++ b/crypto_plugins/flutter_libmwc @@ -0,0 +1 @@ +Subproject commit 9df27712534c7cccedb19376cb0768b6f538cacb diff --git a/crypto_plugins/frostdart b/crypto_plugins/frostdart index 5e8a51592..39171c0f2 160000 --- a/crypto_plugins/frostdart +++ b/crypto_plugins/frostdart @@ -1 +1 @@ -Subproject commit 5e8a51592690650e7ac63fafa81017dfc51ae6d5 +Subproject commit 39171c0f24af01780a14b969051aa1a574961f85 diff --git a/docs/roadmap.md b/docs/roadmap.md deleted file mode 100644 index 384f6f360..000000000 --- a/docs/roadmap.md +++ /dev/null @@ -1,5 +0,0 @@ -# Roadmap - -This document describes the roadmap for the project. It is a living document that will be updated as the project evolves. - -- [ ] Fill in the roadmap \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore index cb9c21eb6..09ddc3777 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside @@ -18,12 +19,14 @@ Flutter/App.framework Flutter/Flutter.framework Flutter/Flutter.podspec Flutter/Generated.xcconfig +Flutter/ephemeral/ Flutter/app.flx Flutter/app.zip Flutter/flutter_assets/ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* +Podfile.lock # Exceptions to above rules. !default.mode1v3 @@ -33,3 +36,5 @@ Runner/GeneratedPluginRegistrant.* # app specific, handled by scripts Runner/Assets.xcassets/LaunchImage.imageset/*.png +/Flutter/ephemeral/flutter_lldb_helper.py +/Flutter/ephemeral/flutter_lldbinit diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index 3f6bee8e7..000000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,257 +0,0 @@ -PODS: - - barcode_scan2 (0.0.1): - - Flutter - - MTBBarcodeScanner - - SwiftProtobuf - - coinlib_flutter (0.5.0): - - Flutter - - FlutterMacOS - - connectivity_plus (0.0.1): - - Flutter - - ReachabilitySwift - - cs_monero_flutter_libs_ios (0.0.1): - - Flutter - - cs_salvium_flutter_libs_ios (0.0.1): - - Flutter - - device_info_plus (0.0.1): - - Flutter - - devicelocale (0.0.1): - - Flutter - - DKImagePickerController/Core (4.3.4): - - DKImagePickerController/ImageDataManager - - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.4) - - DKImagePickerController/PhotoGallery (4.3.4): - - DKImagePickerController/Core - - DKPhotoGallery - - DKImagePickerController/Resource (4.3.4) - - DKPhotoGallery (0.0.17): - - DKPhotoGallery/Core (= 0.0.17) - - DKPhotoGallery/Model (= 0.0.17) - - DKPhotoGallery/Preview (= 0.0.17) - - DKPhotoGallery/Resource (= 0.0.17) - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Core (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Preview - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Model (0.0.17): - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Preview (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Resource - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Resource (0.0.17): - - SDWebImage - - SwiftyGif - - file_picker (0.0.1): - - DKImagePickerController/PhotoGallery - - Flutter - - Flutter (1.0.0) - - flutter_libepiccash (0.0.1): - - Flutter - - flutter_libsparkmobile (0.0.1): - - Flutter - - flutter_local_notifications (0.0.1): - - Flutter - - flutter_native_splash (0.0.1): - - Flutter - - flutter_secure_storage (6.0.0): - - Flutter - - frostdart (0.0.1) - - integration_test (0.0.1): - - Flutter - - isar_flutter_libs (1.0.0): - - Flutter - - local_auth_darwin (0.0.1): - - Flutter - - FlutterMacOS - - MTBBarcodeScanner (5.0.11) - - package_info_plus (0.4.5): - - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - permission_handler_apple (9.3.0): - - Flutter - - ReachabilitySwift (5.0.0) - - SDWebImage (5.13.2): - - SDWebImage/Core (= 5.13.2) - - SDWebImage/Core (5.13.2) - - share_plus (0.0.1): - - Flutter - - "sqlite3 (3.46.0+1)": - - "sqlite3/common (= 3.46.0+1)" - - "sqlite3/common (3.46.0+1)" - - "sqlite3/dbstatvtab (3.46.0+1)": - - sqlite3/common - - "sqlite3/fts5 (3.46.0+1)": - - sqlite3/common - - "sqlite3/perf-threadsafe (3.46.0+1)": - - sqlite3/common - - "sqlite3/rtree (3.46.0+1)": - - sqlite3/common - - sqlite3_flutter_libs (0.0.1): - - Flutter - - "sqlite3 (~> 3.46.0+1)" - - sqlite3/dbstatvtab - - sqlite3/fts5 - - sqlite3/perf-threadsafe - - sqlite3/rtree - - stack_wallet_backup (0.0.1): - - Flutter - - SwiftProtobuf (1.19.0) - - SwiftyGif (5.4.3) - - tor_ffi_plugin (0.0.1): - - Flutter - - url_launcher_ios (0.0.1): - - Flutter - - wakelock_plus (0.0.1): - - Flutter - - xelis_flutter (0.0.1): - - Flutter - -DEPENDENCIES: - - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - - coinlib_flutter (from `.symlinks/plugins/coinlib_flutter/darwin`) - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - - cs_monero_flutter_libs_ios (from `.symlinks/plugins/cs_monero_flutter_libs_ios/ios`) - - cs_salvium_flutter_libs_ios (from `.symlinks/plugins/cs_salvium_flutter_libs_ios/ios`) - - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - - devicelocale (from `.symlinks/plugins/devicelocale/ios`) - - file_picker (from `.symlinks/plugins/file_picker/ios`) - - Flutter (from `Flutter`) - - flutter_libepiccash (from `.symlinks/plugins/flutter_libepiccash/ios`) - - flutter_libsparkmobile (from `.symlinks/plugins/flutter_libsparkmobile/ios`) - - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - - frostdart (from `.symlinks/plugins/frostdart/ios`) - - integration_test (from `.symlinks/plugins/integration_test/ios`) - - isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`) - - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - share_plus (from `.symlinks/plugins/share_plus/ios`) - - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) - - stack_wallet_backup (from `.symlinks/plugins/stack_wallet_backup/ios`) - - tor_ffi_plugin (from `.symlinks/plugins/tor_ffi_plugin/ios`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - - wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`) - - xelis_flutter (from `.symlinks/plugins/xelis_flutter/ios`) - -SPEC REPOS: - trunk: - - DKImagePickerController - - DKPhotoGallery - - MTBBarcodeScanner - - ReachabilitySwift - - SDWebImage - - sqlite3 - - SwiftProtobuf - - SwiftyGif - -EXTERNAL SOURCES: - barcode_scan2: - :path: ".symlinks/plugins/barcode_scan2/ios" - coinlib_flutter: - :path: ".symlinks/plugins/coinlib_flutter/darwin" - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" - cs_monero_flutter_libs_ios: - :path: ".symlinks/plugins/cs_monero_flutter_libs_ios/ios" - cs_salvium_flutter_libs_ios: - :path: ".symlinks/plugins/cs_salvium_flutter_libs_ios/ios" - device_info_plus: - :path: ".symlinks/plugins/device_info_plus/ios" - devicelocale: - :path: ".symlinks/plugins/devicelocale/ios" - file_picker: - :path: ".symlinks/plugins/file_picker/ios" - Flutter: - :path: Flutter - flutter_libepiccash: - :path: ".symlinks/plugins/flutter_libepiccash/ios" - flutter_libsparkmobile: - :path: ".symlinks/plugins/flutter_libsparkmobile/ios" - flutter_local_notifications: - :path: ".symlinks/plugins/flutter_local_notifications/ios" - flutter_native_splash: - :path: ".symlinks/plugins/flutter_native_splash/ios" - flutter_secure_storage: - :path: ".symlinks/plugins/flutter_secure_storage/ios" - frostdart: - :path: ".symlinks/plugins/frostdart/ios" - integration_test: - :path: ".symlinks/plugins/integration_test/ios" - isar_flutter_libs: - :path: ".symlinks/plugins/isar_flutter_libs/ios" - local_auth_darwin: - :path: ".symlinks/plugins/local_auth_darwin/darwin" - package_info_plus: - :path: ".symlinks/plugins/package_info_plus/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - share_plus: - :path: ".symlinks/plugins/share_plus/ios" - sqlite3_flutter_libs: - :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" - stack_wallet_backup: - :path: ".symlinks/plugins/stack_wallet_backup/ios" - tor_ffi_plugin: - :path: ".symlinks/plugins/tor_ffi_plugin/ios" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" - wakelock_plus: - :path: ".symlinks/plugins/wakelock_plus/ios" - xelis_flutter: - :path: ".symlinks/plugins/xelis_flutter/ios" - -SPEC CHECKSUMS: - barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 - coinlib_flutter: 9275e8255ef67d3da33beb6e117d09ced4f46eb5 - connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a - cs_monero_flutter_libs_ios: fd353631682247f72a36493ff060d4328d6f720d - cs_salvium_flutter_libs_ios: f9d6ce540cb34d8cb8641822cf02fa0695a8d405 - device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d - devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926 - DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac - DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49 - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_libepiccash: 36241aa7d3126f6521529985ccb3dc5eaf7bb317 - flutter_libsparkmobile: 6373955cc3327a926d17059e7405dde2fb12f99f - flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 - flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef - flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be - frostdart: 4c72b69ccac2f13ede744107db046a125acce597 - integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 - isar_flutter_libs: fdf730ca925d05687f36d7f1d355e482529ed097 - local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3 - MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 - ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866 - share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 - sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630 - sqlite3_flutter_libs: c00457ebd31e59fa6bb830380ddba24d44fbcd3b - stack_wallet_backup: 5b8563aba5d8ffbf2ce1944331ff7294a0ec7c03 - SwiftProtobuf: 6ef3f0e422ef90d6605ca20b21a94f6c1324d6b3 - SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 - tor_ffi_plugin: d80e291b649379c8176e1be739e49be007d4ef93 - url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe - wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56 - xelis_flutter: a6a1ee1f1e47f5aeb42dc4a5889358b79d8d90fc - -PODFILE CHECKSUM: 57c8aed26fba39d3ec9424816221f294a07c58eb - -COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c53e2b314..9c12df59c 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> Bool { - let dummy = get_mnemonic() - print(dummy) var flutter_native_splash = 1 UIApplication.shared.isStatusBarHidden = false diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h index d95502a5f..7335fdf90 100644 --- a/ios/Runner/Runner-Bridging-Header.h +++ b/ios/Runner/Runner-Bridging-Header.h @@ -1,2 +1 @@ -#import "GeneratedPluginRegistrant.h" -#import "libepic_cash_wallet.h" \ No newline at end of file +#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/lib/app_config.dart b/lib/app_config.dart index 09eeae26f..3004413d2 100644 --- a/lib/app_config.dart +++ b/lib/app_config.dart @@ -1,9 +1,12 @@ +// ignore: unused_import +import 'dart:io'; + import 'wallets/crypto_currency/crypto_currency.dart'; import 'wallets/crypto_currency/intermediate/frost_currency.dart'; part 'app_config.g.dart'; -enum AppFeature { themeSelection, buy, swap } +enum AppFeature { themeSelection, buy, swap, tor } abstract class AppConfig { static const appName = _prefix + _separator + suffix; @@ -74,10 +77,9 @@ abstract class AppConfig { static CryptoCurrency getCryptoCurrencyByPrettyName(final String prettyName) { // trocador hack const hackSplitter = " (Mainnet"; - final name = - prettyName.contains(hackSplitter) - ? prettyName.split(hackSplitter).first.toLowerCase() - : prettyName.replaceAll(" ", "").toLowerCase(); + final name = prettyName.contains(hackSplitter) + ? prettyName.split(hackSplitter).first.toLowerCase() + : prettyName.replaceAll(" ", "").toLowerCase(); try { return coins.firstWhere( diff --git a/lib/db/db_version_migration.dart b/lib/db/db_version_migration.dart index 9c278ff19..ab2b8bcde 100644 --- a/lib/db/db_version_migration.dart +++ b/lib/db/db_version_migration.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../app_config.dart'; diff --git a/lib/db/drift/database.g.dart b/lib/db/drift/database.g.dart index 67660d3a6..dad27aa63 100644 --- a/lib/db/drift/database.g.dart +++ b/lib/db/drift/database.g.dart @@ -12,66 +12,97 @@ class $SparkNamesTable extends SparkNames static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( - 'name', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'UNIQUE NOT NULL COLLATE NOCASE'); - static const VerificationMeta _addressMeta = - const VerificationMeta('address'); + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + $customConstraints: 'UNIQUE NOT NULL COLLATE NOCASE', + ); + static const VerificationMeta _addressMeta = const VerificationMeta( + 'address', + ); @override late final GeneratedColumn address = GeneratedColumn( - 'address', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _validUntilMeta = - const VerificationMeta('validUntil'); + 'address', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + static const VerificationMeta _validUntilMeta = const VerificationMeta( + 'validUntil', + ); @override late final GeneratedColumn validUntil = GeneratedColumn( - 'valid_until', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); - static const VerificationMeta _additionalInfoMeta = - const VerificationMeta('additionalInfo'); + 'valid_until', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + static const VerificationMeta _additionalInfoMeta = const VerificationMeta( + 'additionalInfo', + ); @override late final GeneratedColumn additionalInfo = GeneratedColumn( - 'additional_info', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); + 'additional_info', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); @override - List get $columns => - [name, address, validUntil, additionalInfo]; + List get $columns => [ + name, + address, + validUntil, + additionalInfo, + ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'spark_names'; @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { + VerificationContext validateIntegrity( + Insertable instance, { + bool isInserting = false, + }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('name')) { context.handle( - _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta)); + _nameMeta, + name.isAcceptableOrUnknown(data['name']!, _nameMeta), + ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('address')) { - context.handle(_addressMeta, - address.isAcceptableOrUnknown(data['address']!, _addressMeta)); + context.handle( + _addressMeta, + address.isAcceptableOrUnknown(data['address']!, _addressMeta), + ); } else if (isInserting) { context.missing(_addressMeta); } if (data.containsKey('valid_until')) { context.handle( - _validUntilMeta, - validUntil.isAcceptableOrUnknown( - data['valid_until']!, _validUntilMeta)); + _validUntilMeta, + validUntil.isAcceptableOrUnknown(data['valid_until']!, _validUntilMeta), + ); } else if (isInserting) { context.missing(_validUntilMeta); } if (data.containsKey('additional_info')) { context.handle( + _additionalInfoMeta, + additionalInfo.isAcceptableOrUnknown( + data['additional_info']!, _additionalInfoMeta, - additionalInfo.isAcceptableOrUnknown( - data['additional_info']!, _additionalInfoMeta)); + ), + ); } return context; } @@ -82,14 +113,22 @@ class $SparkNamesTable extends SparkNames SparkName map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SparkName( - name: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}name'])!, - address: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}address'])!, - validUntil: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}valid_until'])!, - additionalInfo: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}additional_info']), + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + address: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}address'], + )!, + validUntil: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}valid_until'], + )!, + additionalInfo: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}additional_info'], + ), ); } @@ -104,11 +143,12 @@ class SparkName extends DataClass implements Insertable { final String address; final int validUntil; final String? additionalInfo; - const SparkName( - {required this.name, - required this.address, - required this.validUntil, - this.additionalInfo}); + const SparkName({ + required this.name, + required this.address, + required this.validUntil, + this.additionalInfo, + }); @override Map toColumns(bool nullToAbsent) { final map = {}; @@ -132,8 +172,10 @@ class SparkName extends DataClass implements Insertable { ); } - factory SparkName.fromJson(Map json, - {ValueSerializer? serializer}) { + factory SparkName.fromJson( + Map json, { + ValueSerializer? serializer, + }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SparkName( name: serializer.fromJson(json['name']), @@ -153,24 +195,26 @@ class SparkName extends DataClass implements Insertable { }; } - SparkName copyWith( - {String? name, - String? address, - int? validUntil, - Value additionalInfo = const Value.absent()}) => - SparkName( - name: name ?? this.name, - address: address ?? this.address, - validUntil: validUntil ?? this.validUntil, - additionalInfo: - additionalInfo.present ? additionalInfo.value : this.additionalInfo, - ); + SparkName copyWith({ + String? name, + String? address, + int? validUntil, + Value additionalInfo = const Value.absent(), + }) => SparkName( + name: name ?? this.name, + address: address ?? this.address, + validUntil: validUntil ?? this.validUntil, + additionalInfo: additionalInfo.present + ? additionalInfo.value + : this.additionalInfo, + ); SparkName copyWithCompanion(SparkNamesCompanion data) { return SparkName( name: data.name.present ? data.name.value : this.name, address: data.address.present ? data.address.value : this.address, - validUntil: - data.validUntil.present ? data.validUntil.value : this.validUntil, + validUntil: data.validUntil.present + ? data.validUntil.value + : this.validUntil, additionalInfo: data.additionalInfo.present ? data.additionalInfo.value : this.additionalInfo, @@ -219,9 +263,9 @@ class SparkNamesCompanion extends UpdateCompanion { required int validUntil, this.additionalInfo = const Value.absent(), this.rowid = const Value.absent(), - }) : name = Value(name), - address = Value(address), - validUntil = Value(validUntil); + }) : name = Value(name), + address = Value(address), + validUntil = Value(validUntil); static Insertable custom({ Expression? name, Expression? address, @@ -238,12 +282,13 @@ class SparkNamesCompanion extends UpdateCompanion { }); } - SparkNamesCompanion copyWith( - {Value? name, - Value? address, - Value? validUntil, - Value? additionalInfo, - Value? rowid}) { + SparkNamesCompanion copyWith({ + Value? name, + Value? address, + Value? validUntil, + Value? additionalInfo, + Value? rowid, + }) { return SparkNamesCompanion( name: name ?? this.name, address: address ?? this.address, @@ -293,103 +338,158 @@ class $MwebUtxosTable extends MwebUtxos final GeneratedDatabase attachedDatabase; final String? _alias; $MwebUtxosTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _outputIdMeta = - const VerificationMeta('outputId'); + static const VerificationMeta _outputIdMeta = const VerificationMeta( + 'outputId', + ); @override late final GeneratedColumn outputId = GeneratedColumn( - 'output_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _addressMeta = - const VerificationMeta('address'); + 'output_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + static const VerificationMeta _addressMeta = const VerificationMeta( + 'address', + ); @override late final GeneratedColumn address = GeneratedColumn( - 'address', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); + 'address', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); static const VerificationMeta _valueMeta = const VerificationMeta('value'); @override late final GeneratedColumn value = GeneratedColumn( - 'value', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); + 'value', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); static const VerificationMeta _heightMeta = const VerificationMeta('height'); @override late final GeneratedColumn height = GeneratedColumn( - 'height', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); - static const VerificationMeta _blockTimeMeta = - const VerificationMeta('blockTime'); + 'height', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + static const VerificationMeta _blockTimeMeta = const VerificationMeta( + 'blockTime', + ); @override late final GeneratedColumn blockTime = GeneratedColumn( - 'block_time', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); - static const VerificationMeta _blockedMeta = - const VerificationMeta('blocked'); + 'block_time', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + static const VerificationMeta _blockedMeta = const VerificationMeta( + 'blocked', + ); @override late final GeneratedColumn blocked = GeneratedColumn( - 'blocked', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: - GeneratedColumn.constraintIsAlways('CHECK ("blocked" IN (0, 1))')); + 'blocked', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("blocked" IN (0, 1))', + ), + ); static const VerificationMeta _usedMeta = const VerificationMeta('used'); @override late final GeneratedColumn used = GeneratedColumn( - 'used', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: - GeneratedColumn.constraintIsAlways('CHECK ("used" IN (0, 1))')); + 'used', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("used" IN (0, 1))', + ), + ); @override - List get $columns => - [outputId, address, value, height, blockTime, blocked, used]; + List get $columns => [ + outputId, + address, + value, + height, + blockTime, + blocked, + used, + ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'mweb_utxos'; @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { + VerificationContext validateIntegrity( + Insertable instance, { + bool isInserting = false, + }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('output_id')) { - context.handle(_outputIdMeta, - outputId.isAcceptableOrUnknown(data['output_id']!, _outputIdMeta)); + context.handle( + _outputIdMeta, + outputId.isAcceptableOrUnknown(data['output_id']!, _outputIdMeta), + ); } else if (isInserting) { context.missing(_outputIdMeta); } if (data.containsKey('address')) { - context.handle(_addressMeta, - address.isAcceptableOrUnknown(data['address']!, _addressMeta)); + context.handle( + _addressMeta, + address.isAcceptableOrUnknown(data['address']!, _addressMeta), + ); } else if (isInserting) { context.missing(_addressMeta); } if (data.containsKey('value')) { context.handle( - _valueMeta, value.isAcceptableOrUnknown(data['value']!, _valueMeta)); + _valueMeta, + value.isAcceptableOrUnknown(data['value']!, _valueMeta), + ); } else if (isInserting) { context.missing(_valueMeta); } if (data.containsKey('height')) { - context.handle(_heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta)); + context.handle( + _heightMeta, + height.isAcceptableOrUnknown(data['height']!, _heightMeta), + ); } else if (isInserting) { context.missing(_heightMeta); } if (data.containsKey('block_time')) { - context.handle(_blockTimeMeta, - blockTime.isAcceptableOrUnknown(data['block_time']!, _blockTimeMeta)); + context.handle( + _blockTimeMeta, + blockTime.isAcceptableOrUnknown(data['block_time']!, _blockTimeMeta), + ); } else if (isInserting) { context.missing(_blockTimeMeta); } if (data.containsKey('blocked')) { - context.handle(_blockedMeta, - blocked.isAcceptableOrUnknown(data['blocked']!, _blockedMeta)); + context.handle( + _blockedMeta, + blocked.isAcceptableOrUnknown(data['blocked']!, _blockedMeta), + ); } else if (isInserting) { context.missing(_blockedMeta); } if (data.containsKey('used')) { context.handle( - _usedMeta, used.isAcceptableOrUnknown(data['used']!, _usedMeta)); + _usedMeta, + used.isAcceptableOrUnknown(data['used']!, _usedMeta), + ); } else if (isInserting) { context.missing(_usedMeta); } @@ -402,20 +502,34 @@ class $MwebUtxosTable extends MwebUtxos MwebUtxo map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return MwebUtxo( - outputId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}output_id'])!, - address: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}address'])!, - value: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}value'])!, - height: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}height'])!, - blockTime: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}block_time'])!, - blocked: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}blocked'])!, - used: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}used'])!, + outputId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}output_id'], + )!, + address: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}address'], + )!, + value: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}value'], + )!, + height: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}height'], + )!, + blockTime: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}block_time'], + )!, + blocked: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}blocked'], + )!, + used: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}used'], + )!, ); } @@ -433,14 +547,15 @@ class MwebUtxo extends DataClass implements Insertable { final int blockTime; final bool blocked; final bool used; - const MwebUtxo( - {required this.outputId, - required this.address, - required this.value, - required this.height, - required this.blockTime, - required this.blocked, - required this.used}); + const MwebUtxo({ + required this.outputId, + required this.address, + required this.value, + required this.height, + required this.blockTime, + required this.blocked, + required this.used, + }); @override Map toColumns(bool nullToAbsent) { final map = {}; @@ -466,8 +581,10 @@ class MwebUtxo extends DataClass implements Insertable { ); } - factory MwebUtxo.fromJson(Map json, - {ValueSerializer? serializer}) { + factory MwebUtxo.fromJson( + Map json, { + ValueSerializer? serializer, + }) { serializer ??= driftRuntimeOptions.defaultSerializer; return MwebUtxo( outputId: serializer.fromJson(json['outputId']), @@ -493,23 +610,23 @@ class MwebUtxo extends DataClass implements Insertable { }; } - MwebUtxo copyWith( - {String? outputId, - String? address, - int? value, - int? height, - int? blockTime, - bool? blocked, - bool? used}) => - MwebUtxo( - outputId: outputId ?? this.outputId, - address: address ?? this.address, - value: value ?? this.value, - height: height ?? this.height, - blockTime: blockTime ?? this.blockTime, - blocked: blocked ?? this.blocked, - used: used ?? this.used, - ); + MwebUtxo copyWith({ + String? outputId, + String? address, + int? value, + int? height, + int? blockTime, + bool? blocked, + bool? used, + }) => MwebUtxo( + outputId: outputId ?? this.outputId, + address: address ?? this.address, + value: value ?? this.value, + height: height ?? this.height, + blockTime: blockTime ?? this.blockTime, + blocked: blocked ?? this.blocked, + used: used ?? this.used, + ); MwebUtxo copyWithCompanion(MwebUtxosCompanion data) { return MwebUtxo( outputId: data.outputId.present ? data.outputId.value : this.outputId, @@ -580,13 +697,13 @@ class MwebUtxosCompanion extends UpdateCompanion { required bool blocked, required bool used, this.rowid = const Value.absent(), - }) : outputId = Value(outputId), - address = Value(address), - value = Value(value), - height = Value(height), - blockTime = Value(blockTime), - blocked = Value(blocked), - used = Value(used); + }) : outputId = Value(outputId), + address = Value(address), + value = Value(value), + height = Value(height), + blockTime = Value(blockTime), + blocked = Value(blocked), + used = Value(used); static Insertable custom({ Expression? outputId, Expression? address, @@ -609,15 +726,16 @@ class MwebUtxosCompanion extends UpdateCompanion { }); } - MwebUtxosCompanion copyWith( - {Value? outputId, - Value? address, - Value? value, - Value? height, - Value? blockTime, - Value? blocked, - Value? used, - Value? rowid}) { + MwebUtxosCompanion copyWith({ + Value? outputId, + Value? address, + Value? value, + Value? height, + Value? blockTime, + Value? blocked, + Value? used, + Value? rowid, + }) { return MwebUtxosCompanion( outputId: outputId ?? this.outputId, address: address ?? this.address, @@ -688,20 +806,22 @@ abstract class _$WalletDatabase extends GeneratedDatabase { List get allSchemaEntities => [sparkNames, mwebUtxos]; } -typedef $$SparkNamesTableCreateCompanionBuilder = SparkNamesCompanion Function({ - required String name, - required String address, - required int validUntil, - Value additionalInfo, - Value rowid, -}); -typedef $$SparkNamesTableUpdateCompanionBuilder = SparkNamesCompanion Function({ - Value name, - Value address, - Value validUntil, - Value additionalInfo, - Value rowid, -}); +typedef $$SparkNamesTableCreateCompanionBuilder = + SparkNamesCompanion Function({ + required String name, + required String address, + required int validUntil, + Value additionalInfo, + Value rowid, + }); +typedef $$SparkNamesTableUpdateCompanionBuilder = + SparkNamesCompanion Function({ + Value name, + Value address, + Value validUntil, + Value additionalInfo, + Value rowid, + }); class $$SparkNamesTableFilterComposer extends Composer<_$WalletDatabase, $SparkNamesTable> { @@ -713,17 +833,24 @@ class $$SparkNamesTableFilterComposer super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnFilters(column)); + column: $table.name, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get address => $composableBuilder( - column: $table.address, builder: (column) => ColumnFilters(column)); + column: $table.address, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get validUntil => $composableBuilder( - column: $table.validUntil, builder: (column) => ColumnFilters(column)); + column: $table.validUntil, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get additionalInfo => $composableBuilder( - column: $table.additionalInfo, - builder: (column) => ColumnFilters(column)); + column: $table.additionalInfo, + builder: (column) => ColumnFilters(column), + ); } class $$SparkNamesTableOrderingComposer @@ -736,17 +863,24 @@ class $$SparkNamesTableOrderingComposer super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnOrderings(column)); + column: $table.name, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get address => $composableBuilder( - column: $table.address, builder: (column) => ColumnOrderings(column)); + column: $table.address, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get validUntil => $composableBuilder( - column: $table.validUntil, builder: (column) => ColumnOrderings(column)); + column: $table.validUntil, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get additionalInfo => $composableBuilder( - column: $table.additionalInfo, - builder: (column) => ColumnOrderings(column)); + column: $table.additionalInfo, + builder: (column) => ColumnOrderings(column), + ); } class $$SparkNamesTableAnnotationComposer @@ -765,26 +899,37 @@ class $$SparkNamesTableAnnotationComposer $composableBuilder(column: $table.address, builder: (column) => column); GeneratedColumn get validUntil => $composableBuilder( - column: $table.validUntil, builder: (column) => column); + column: $table.validUntil, + builder: (column) => column, + ); GeneratedColumn get additionalInfo => $composableBuilder( - column: $table.additionalInfo, builder: (column) => column); + column: $table.additionalInfo, + builder: (column) => column, + ); } -class $$SparkNamesTableTableManager extends RootTableManager< - _$WalletDatabase, - $SparkNamesTable, - SparkName, - $$SparkNamesTableFilterComposer, - $$SparkNamesTableOrderingComposer, - $$SparkNamesTableAnnotationComposer, - $$SparkNamesTableCreateCompanionBuilder, - $$SparkNamesTableUpdateCompanionBuilder, - (SparkName, BaseReferences<_$WalletDatabase, $SparkNamesTable, SparkName>), - SparkName, - PrefetchHooks Function()> { +class $$SparkNamesTableTableManager + extends + RootTableManager< + _$WalletDatabase, + $SparkNamesTable, + SparkName, + $$SparkNamesTableFilterComposer, + $$SparkNamesTableOrderingComposer, + $$SparkNamesTableAnnotationComposer, + $$SparkNamesTableCreateCompanionBuilder, + $$SparkNamesTableUpdateCompanionBuilder, + ( + SparkName, + BaseReferences<_$WalletDatabase, $SparkNamesTable, SparkName>, + ), + SparkName, + PrefetchHooks Function() + > { $$SparkNamesTableTableManager(_$WalletDatabase db, $SparkNamesTable table) - : super(TableManagerState( + : super( + TableManagerState( db: db, table: table, createFilteringComposer: () => @@ -793,73 +938,81 @@ class $$SparkNamesTableTableManager extends RootTableManager< $$SparkNamesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SparkNamesTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value name = const Value.absent(), - Value address = const Value.absent(), - Value validUntil = const Value.absent(), - Value additionalInfo = const Value.absent(), - Value rowid = const Value.absent(), - }) => - SparkNamesCompanion( - name: name, - address: address, - validUntil: validUntil, - additionalInfo: additionalInfo, - rowid: rowid, - ), - createCompanionCallback: ({ - required String name, - required String address, - required int validUntil, - Value additionalInfo = const Value.absent(), - Value rowid = const Value.absent(), - }) => - SparkNamesCompanion.insert( - name: name, - address: address, - validUntil: validUntil, - additionalInfo: additionalInfo, - rowid: rowid, - ), + updateCompanionCallback: + ({ + Value name = const Value.absent(), + Value address = const Value.absent(), + Value validUntil = const Value.absent(), + Value additionalInfo = const Value.absent(), + Value rowid = const Value.absent(), + }) => SparkNamesCompanion( + name: name, + address: address, + validUntil: validUntil, + additionalInfo: additionalInfo, + rowid: rowid, + ), + createCompanionCallback: + ({ + required String name, + required String address, + required int validUntil, + Value additionalInfo = const Value.absent(), + Value rowid = const Value.absent(), + }) => SparkNamesCompanion.insert( + name: name, + address: address, + validUntil: validUntil, + additionalInfo: additionalInfo, + rowid: rowid, + ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, - )); + ), + ); } -typedef $$SparkNamesTableProcessedTableManager = ProcessedTableManager< - _$WalletDatabase, - $SparkNamesTable, - SparkName, - $$SparkNamesTableFilterComposer, - $$SparkNamesTableOrderingComposer, - $$SparkNamesTableAnnotationComposer, - $$SparkNamesTableCreateCompanionBuilder, - $$SparkNamesTableUpdateCompanionBuilder, - (SparkName, BaseReferences<_$WalletDatabase, $SparkNamesTable, SparkName>), - SparkName, - PrefetchHooks Function()>; -typedef $$MwebUtxosTableCreateCompanionBuilder = MwebUtxosCompanion Function({ - required String outputId, - required String address, - required int value, - required int height, - required int blockTime, - required bool blocked, - required bool used, - Value rowid, -}); -typedef $$MwebUtxosTableUpdateCompanionBuilder = MwebUtxosCompanion Function({ - Value outputId, - Value address, - Value value, - Value height, - Value blockTime, - Value blocked, - Value used, - Value rowid, -}); +typedef $$SparkNamesTableProcessedTableManager = + ProcessedTableManager< + _$WalletDatabase, + $SparkNamesTable, + SparkName, + $$SparkNamesTableFilterComposer, + $$SparkNamesTableOrderingComposer, + $$SparkNamesTableAnnotationComposer, + $$SparkNamesTableCreateCompanionBuilder, + $$SparkNamesTableUpdateCompanionBuilder, + ( + SparkName, + BaseReferences<_$WalletDatabase, $SparkNamesTable, SparkName>, + ), + SparkName, + PrefetchHooks Function() + >; +typedef $$MwebUtxosTableCreateCompanionBuilder = + MwebUtxosCompanion Function({ + required String outputId, + required String address, + required int value, + required int height, + required int blockTime, + required bool blocked, + required bool used, + Value rowid, + }); +typedef $$MwebUtxosTableUpdateCompanionBuilder = + MwebUtxosCompanion Function({ + Value outputId, + Value address, + Value value, + Value height, + Value blockTime, + Value blocked, + Value used, + Value rowid, + }); class $$MwebUtxosTableFilterComposer extends Composer<_$WalletDatabase, $MwebUtxosTable> { @@ -871,25 +1024,39 @@ class $$MwebUtxosTableFilterComposer super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get outputId => $composableBuilder( - column: $table.outputId, builder: (column) => ColumnFilters(column)); + column: $table.outputId, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get address => $composableBuilder( - column: $table.address, builder: (column) => ColumnFilters(column)); + column: $table.address, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get value => $composableBuilder( - column: $table.value, builder: (column) => ColumnFilters(column)); + column: $table.value, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get height => $composableBuilder( - column: $table.height, builder: (column) => ColumnFilters(column)); + column: $table.height, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get blockTime => $composableBuilder( - column: $table.blockTime, builder: (column) => ColumnFilters(column)); + column: $table.blockTime, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get blocked => $composableBuilder( - column: $table.blocked, builder: (column) => ColumnFilters(column)); + column: $table.blocked, + builder: (column) => ColumnFilters(column), + ); ColumnFilters get used => $composableBuilder( - column: $table.used, builder: (column) => ColumnFilters(column)); + column: $table.used, + builder: (column) => ColumnFilters(column), + ); } class $$MwebUtxosTableOrderingComposer @@ -902,25 +1069,39 @@ class $$MwebUtxosTableOrderingComposer super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get outputId => $composableBuilder( - column: $table.outputId, builder: (column) => ColumnOrderings(column)); + column: $table.outputId, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get address => $composableBuilder( - column: $table.address, builder: (column) => ColumnOrderings(column)); + column: $table.address, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get value => $composableBuilder( - column: $table.value, builder: (column) => ColumnOrderings(column)); + column: $table.value, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get height => $composableBuilder( - column: $table.height, builder: (column) => ColumnOrderings(column)); + column: $table.height, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get blockTime => $composableBuilder( - column: $table.blockTime, builder: (column) => ColumnOrderings(column)); + column: $table.blockTime, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get blocked => $composableBuilder( - column: $table.blocked, builder: (column) => ColumnOrderings(column)); + column: $table.blocked, + builder: (column) => ColumnOrderings(column), + ); ColumnOrderings get used => $composableBuilder( - column: $table.used, builder: (column) => ColumnOrderings(column)); + column: $table.used, + builder: (column) => ColumnOrderings(column), + ); } class $$MwebUtxosTableAnnotationComposer @@ -954,20 +1135,27 @@ class $$MwebUtxosTableAnnotationComposer $composableBuilder(column: $table.used, builder: (column) => column); } -class $$MwebUtxosTableTableManager extends RootTableManager< - _$WalletDatabase, - $MwebUtxosTable, - MwebUtxo, - $$MwebUtxosTableFilterComposer, - $$MwebUtxosTableOrderingComposer, - $$MwebUtxosTableAnnotationComposer, - $$MwebUtxosTableCreateCompanionBuilder, - $$MwebUtxosTableUpdateCompanionBuilder, - (MwebUtxo, BaseReferences<_$WalletDatabase, $MwebUtxosTable, MwebUtxo>), - MwebUtxo, - PrefetchHooks Function()> { +class $$MwebUtxosTableTableManager + extends + RootTableManager< + _$WalletDatabase, + $MwebUtxosTable, + MwebUtxo, + $$MwebUtxosTableFilterComposer, + $$MwebUtxosTableOrderingComposer, + $$MwebUtxosTableAnnotationComposer, + $$MwebUtxosTableCreateCompanionBuilder, + $$MwebUtxosTableUpdateCompanionBuilder, + ( + MwebUtxo, + BaseReferences<_$WalletDatabase, $MwebUtxosTable, MwebUtxo>, + ), + MwebUtxo, + PrefetchHooks Function() + > { $$MwebUtxosTableTableManager(_$WalletDatabase db, $MwebUtxosTable table) - : super(TableManagerState( + : super( + TableManagerState( db: db, table: table, createFilteringComposer: () => @@ -976,65 +1164,68 @@ class $$MwebUtxosTableTableManager extends RootTableManager< $$MwebUtxosTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$MwebUtxosTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value outputId = const Value.absent(), - Value address = const Value.absent(), - Value value = const Value.absent(), - Value height = const Value.absent(), - Value blockTime = const Value.absent(), - Value blocked = const Value.absent(), - Value used = const Value.absent(), - Value rowid = const Value.absent(), - }) => - MwebUtxosCompanion( - outputId: outputId, - address: address, - value: value, - height: height, - blockTime: blockTime, - blocked: blocked, - used: used, - rowid: rowid, - ), - createCompanionCallback: ({ - required String outputId, - required String address, - required int value, - required int height, - required int blockTime, - required bool blocked, - required bool used, - Value rowid = const Value.absent(), - }) => - MwebUtxosCompanion.insert( - outputId: outputId, - address: address, - value: value, - height: height, - blockTime: blockTime, - blocked: blocked, - used: used, - rowid: rowid, - ), + updateCompanionCallback: + ({ + Value outputId = const Value.absent(), + Value address = const Value.absent(), + Value value = const Value.absent(), + Value height = const Value.absent(), + Value blockTime = const Value.absent(), + Value blocked = const Value.absent(), + Value used = const Value.absent(), + Value rowid = const Value.absent(), + }) => MwebUtxosCompanion( + outputId: outputId, + address: address, + value: value, + height: height, + blockTime: blockTime, + blocked: blocked, + used: used, + rowid: rowid, + ), + createCompanionCallback: + ({ + required String outputId, + required String address, + required int value, + required int height, + required int blockTime, + required bool blocked, + required bool used, + Value rowid = const Value.absent(), + }) => MwebUtxosCompanion.insert( + outputId: outputId, + address: address, + value: value, + height: height, + blockTime: blockTime, + blocked: blocked, + used: used, + rowid: rowid, + ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, - )); + ), + ); } -typedef $$MwebUtxosTableProcessedTableManager = ProcessedTableManager< - _$WalletDatabase, - $MwebUtxosTable, - MwebUtxo, - $$MwebUtxosTableFilterComposer, - $$MwebUtxosTableOrderingComposer, - $$MwebUtxosTableAnnotationComposer, - $$MwebUtxosTableCreateCompanionBuilder, - $$MwebUtxosTableUpdateCompanionBuilder, - (MwebUtxo, BaseReferences<_$WalletDatabase, $MwebUtxosTable, MwebUtxo>), - MwebUtxo, - PrefetchHooks Function()>; +typedef $$MwebUtxosTableProcessedTableManager = + ProcessedTableManager< + _$WalletDatabase, + $MwebUtxosTable, + MwebUtxo, + $$MwebUtxosTableFilterComposer, + $$MwebUtxosTableOrderingComposer, + $$MwebUtxosTableAnnotationComposer, + $$MwebUtxosTableCreateCompanionBuilder, + $$MwebUtxosTableUpdateCompanionBuilder, + (MwebUtxo, BaseReferences<_$WalletDatabase, $MwebUtxosTable, MwebUtxo>), + MwebUtxo, + PrefetchHooks Function() + >; class $WalletDatabaseManager { final _$WalletDatabase _db; diff --git a/lib/db/hive/db.dart b/lib/db/hive/db.dart index be431aba7..3eac4b805 100644 --- a/lib/db/hive/db.dart +++ b/lib/db/hive/db.dart @@ -11,8 +11,8 @@ import 'dart:isolate'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:hive/hive.dart' show Box; -import 'package:hive/src/hive_impl.dart'; +import 'package:hive_ce/src/hive_impl.dart'; +import 'package:hive_ce/hive.dart' show Box; import 'package:mutex/mutex.dart'; import '../../app_config.dart'; diff --git a/lib/db/isar/main_db.dart b/lib/db/isar/main_db.dart index 0a0269025..94f27e1f8 100644 --- a/lib/db/isar/main_db.dart +++ b/lib/db/isar/main_db.dart @@ -9,7 +9,7 @@ */ import 'package:decimal/decimal.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../exceptions/main_db/main_db_exception.dart'; @@ -92,11 +92,10 @@ class MainDB { Future updateWalletInfo(WalletInfo walletInfo) async { try { await isar.writeTxn(() async { - final info = - await isar.walletInfo - .where() - .walletIdEqualTo(walletInfo.walletId) - .findFirst(); + final info = await isar.walletInfo + .where() + .walletIdEqualTo(walletInfo.walletId) + .findFirst(); if (info == null) { throw Exception( "updateWalletInfo() called with new WalletInfo." @@ -189,6 +188,7 @@ class MainDB { } Future> putAddresses(List
addresses) async { + if (addresses.isEmpty) return []; try { return await isar.writeTxn(() async { return await isar.addresses.putAll(addresses); @@ -199,6 +199,7 @@ class MainDB { } Future> updateOrPutAddresses(List
addresses) async { + if (addresses.isEmpty) return []; try { final List ids = []; await isar.writeTxn(() async { @@ -269,6 +270,7 @@ class MainDB { } Future> putTransactions(List transactions) async { + if (transactions.isEmpty) return []; try { return await isar.writeTxn(() async { return await isar.transactions.putAll(transactions); @@ -306,9 +308,11 @@ class MainDB { await isar.utxos.put(utxo); }); - Future putUTXOs(List utxos) => isar.writeTxn(() async { - await isar.utxos.putAll(utxos); - }); + Future putUTXOs(List utxos) => utxos.isEmpty + ? Future.value() + : isar.writeTxn(() async { + await isar.utxos.putAll(utxos); + }); Future updateUTXOs(String walletId, List utxos) async { bool newUTXO = false; @@ -317,11 +321,10 @@ class MainDB { final set = utxos.toSet(); for (final utxo in utxos) { // check if utxo exists in db and update accordingly - final storedUtxo = - await isar.utxos - .where() - .txidWalletIdVoutEqualTo(utxo.txid, utxo.walletId, utxo.vout) - .findFirst(); + final storedUtxo = await isar.utxos + .where() + .txidWalletIdVoutEqualTo(utxo.txid, utxo.walletId, utxo.vout) + .findFirst(); if (storedUtxo != null) { // update @@ -441,8 +444,10 @@ class MainDB { // Future deleteWalletBlockchainData(String walletId) async { final transactionCount = await getTransactions(walletId).count(); - final transactionCountV2 = - await isar.transactionV2s.where().walletIdEqualTo(walletId).count(); + final transactionCountV2 = await isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .count(); final addressCount = await getAddresses(walletId).count(); final utxoCount = await getUTXOs(walletId).count(); // final lelantusCoinCount = @@ -453,41 +458,37 @@ class MainDB { // transactions for (int i = 0; i < transactionCount; i += paginateLimit) { - final txnIds = - await getTransactions( - walletId, - ).offset(i).limit(paginateLimit).idProperty().findAll(); + final txnIds = await getTransactions( + walletId, + ).offset(i).limit(paginateLimit).idProperty().findAll(); await isar.transactions.deleteAll(txnIds); } // transactions V2 for (int i = 0; i < transactionCountV2; i += paginateLimit) { - final txnIds = - await isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .offset(i) - .limit(paginateLimit) - .idProperty() - .findAll(); + final txnIds = await isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .offset(i) + .limit(paginateLimit) + .idProperty() + .findAll(); await isar.transactionV2s.deleteAll(txnIds); } // addresses for (int i = 0; i < addressCount; i += paginateLimit) { - final addressIds = - await getAddresses( - walletId, - ).offset(i).limit(paginateLimit).idProperty().findAll(); + final addressIds = await getAddresses( + walletId, + ).offset(i).limit(paginateLimit).idProperty().findAll(); await isar.addresses.deleteAll(addressIds); } // utxos for (int i = 0; i < utxoCount; i += paginateLimit) { - final utxoIds = - await getUTXOs( - walletId, - ).offset(i).limit(paginateLimit).idProperty().findAll(); + final utxoIds = await getUTXOs( + walletId, + ).offset(i).limit(paginateLimit).idProperty().findAll(); await isar.utxos.deleteAll(utxoIds); } @@ -504,10 +505,9 @@ class MainDB { await isar.writeTxn(() async { const paginateLimit = 50; for (int i = 0; i < addressLabelCount; i += paginateLimit) { - final labelIds = - await getAddressLabels( - walletId, - ).offset(i).limit(paginateLimit).idProperty().findAll(); + final labelIds = await getAddressLabels( + walletId, + ).offset(i).limit(paginateLimit).idProperty().findAll(); await isar.addressLabels.deleteAll(labelIds); } }); @@ -518,10 +518,9 @@ class MainDB { await isar.writeTxn(() async { const paginateLimit = 50; for (int i = 0; i < noteCount; i += paginateLimit) { - final labelIds = - await getTransactionNotes( - walletId, - ).offset(i).limit(paginateLimit).idProperty().findAll(); + final labelIds = await getTransactionNotes( + walletId, + ).offset(i).limit(paginateLimit).idProperty().findAll(); await isar.transactionNotes.deleteAll(labelIds); } }); @@ -531,6 +530,7 @@ class MainDB { List> transactionsData, String walletId, ) async { + if (transactionsData.isEmpty) return; try { await isar.writeTxn(() async { for (final data in transactionsData) { @@ -570,15 +570,15 @@ class MainDB { Future> updateOrPutTransactionV2s( List transactions, ) async { + if (transactions.isEmpty) return []; try { final List ids = []; await isar.writeTxn(() async { for (final tx in transactions) { - final storedTx = - await isar.transactionV2s - .where() - .txidWalletIdEqualTo(tx.txid, tx.walletId) - .findFirst(); + final storedTx = await isar.transactionV2s + .where() + .txidWalletIdEqualTo(tx.txid, tx.walletId) + .findFirst(); Id id; if (storedTx == null) { diff --git a/lib/db/migrate_wallets_to_isar.dart b/lib/db/migrate_wallets_to_isar.dart index 6433799f2..de9cff6dd 100644 --- a/lib/db/migrate_wallets_to_isar.dart +++ b/lib/db/migrate_wallets_to_isar.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../app_config.dart'; import '../models/isar/models/blockchain_data/v2/transaction_v2.dart'; diff --git a/lib/db/special_migrations.dart b/lib/db/special_migrations.dart index 1092cfc1b..84b17518c 100644 --- a/lib/db/special_migrations.dart +++ b/lib/db/special_migrations.dart @@ -1,8 +1,8 @@ import 'dart:io'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:hive/hive.dart' show Box; -import 'package:hive/src/hive_impl.dart'; +import 'package:hive_ce/hive.dart' show Box; +import 'package:hive_ce/src/hive_impl.dart'; import 'package:path_provider/path_provider.dart'; import '../app_config.dart'; @@ -13,10 +13,8 @@ abstract class CampfireMigration { static const _didRunKey = "campfire_one_time_migration_done_key"; static bool get didRun => - DB.instance.get( - boxName: DB.boxNameDBInfo, - key: _didRunKey, - ) as bool? ?? + DB.instance.get(boxName: DB.boxNameDBInfo, key: _didRunKey) + as bool? ?? false; static Future setDidRun() async { diff --git a/lib/db/sqlite/firo_cache.dart b/lib/db/sqlite/firo_cache.dart index c2ebbfe66..9a0d83f6a 100644 --- a/lib/db/sqlite/firo_cache.dart +++ b/lib/db/sqlite/firo_cache.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'dart:isolate'; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart'; import 'package:mutex/mutex.dart'; import 'package:sqlite3/sqlite3.dart'; import 'package:uuid/uuid.dart'; @@ -13,6 +12,7 @@ import '../../utilities/extensions/extensions.dart'; import '../../utilities/logger.dart'; import '../../utilities/stack_file_system.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; +import '../../wl_gen/interfaces/lib_spark_interface.dart'; part 'firo_cache_coordinator.dart'; part 'firo_cache_reader.dart'; @@ -30,12 +30,12 @@ abstract class _FiroCache { static String sparkSetCacheFileName(CryptoCurrencyNetwork network) => network == CryptoCurrencyNetwork.main - ? "spark_set_v$_setCacheVersion.sqlite3" - : "spark_set_v${_setCacheVersion}_${network.name}.sqlite3"; + ? "spark_set_v$_setCacheVersion.sqlite3" + : "spark_set_v${_setCacheVersion}_${network.name}.sqlite3"; static String sparkUsedTagsCacheFileName(CryptoCurrencyNetwork network) => network == CryptoCurrencyNetwork.main - ? "spark_tags_v$_tagsCacheVersion.sqlite3" - : "spark_tags_v${_tagsCacheVersion}_${network.name}.sqlite3"; + ? "spark_tags_v$_tagsCacheVersion.sqlite3" + : "spark_tags_v${_tagsCacheVersion}_${network.name}.sqlite3"; static final Map _setCacheDB = {}; static final Map _usedTagsCacheDB = {}; @@ -65,11 +65,13 @@ abstract class _FiroCache { await StackFileSystem.applicationFiroCacheSQLiteDirectory(); for (final network in networks) { - final sparkSetCacheFile = - File("${sqliteDir.path}/${sparkSetCacheFileName(network)}"); + final sparkSetCacheFile = File( + "${sqliteDir.path}/${sparkSetCacheFileName(network)}", + ); - final sparkUsedTagsCacheFile = - File("${sqliteDir.path}/${sparkUsedTagsCacheFileName(network)}"); + final sparkUsedTagsCacheFile = File( + "${sqliteDir.path}/${sparkUsedTagsCacheFileName(network)}", + ); if (!(await sparkSetCacheFile.exists())) { await _createSparkSetCacheDb(sparkSetCacheFile.path); @@ -91,35 +93,40 @@ abstract class _FiroCache { static Future _deleteAllCache(CryptoCurrencyNetwork network) async { final start = DateTime.now(); - setCacheDB(network).execute( - """ + setCacheDB(network).execute(""" DELETE FROM SparkSet; DELETE FROM SparkCoin; DELETE FROM SparkSetCoins; VACUUM; - """, + """); + await _deleteUsedTagsCache(network); + + Logging.instance.d( + "_deleteAllCache() " + "duration = ${DateTime.now().difference(start)}", ); - usedTagsCacheDB(network).execute( - """ + } + + static Future _deleteUsedTagsCache( + CryptoCurrencyNetwork network, + ) async { + final start = DateTime.now(); + + usedTagsCacheDB(network).execute(""" DELETE FROM SparkUsedCoinTags; VACUUM; - """, - ); + """); Logging.instance.d( - "_deleteAllCache() " + "_deleteUsedTagsCache() " "duration = ${DateTime.now().difference(start)}", ); } static Future _createSparkSetCacheDb(String file) async { - final db = sqlite3.open( - file, - mode: OpenMode.readWriteCreate, - ); + final db = sqlite3.open(file, mode: OpenMode.readWriteCreate); - db.execute( - """ + db.execute(""" CREATE TABLE SparkSet ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, blockHash TEXT NOT NULL, @@ -145,27 +152,21 @@ abstract class _FiroCache { FOREIGN KEY (setId) REFERENCES SparkSet(id), FOREIGN KEY (coinId) REFERENCES SparkCoin(id) ); - """, - ); + """); db.dispose(); } static Future _createSparkUsedTagsCacheDb(String file) async { - final db = sqlite3.open( - file, - mode: OpenMode.readWriteCreate, - ); + final db = sqlite3.open(file, mode: OpenMode.readWriteCreate); - db.execute( - """ + db.execute(""" CREATE TABLE SparkUsedCoinTags ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, tag TEXT NOT NULL UNIQUE, txid TEXT NOT NULL ); - """, - ); + """); db.dispose(); } diff --git a/lib/db/sqlite/firo_cache_coordinator.dart b/lib/db/sqlite/firo_cache_coordinator.dart index 6adeba520..5ecd7534b 100644 --- a/lib/db/sqlite/firo_cache_coordinator.dart +++ b/lib/db/sqlite/firo_cache_coordinator.dart @@ -23,7 +23,13 @@ abstract class FiroCacheCoordinator { } } - static Future clearSharedCache(CryptoCurrencyNetwork network) async { + static Future clearSharedCache( + CryptoCurrencyNetwork network, { + bool clearOnlyUsedTagsCache = false, + }) async { + if (clearOnlyUsedTagsCache) { + return await _FiroCache._deleteUsedTagsCache(network); + } return await _FiroCache._deleteAllCache(network); } @@ -38,9 +44,10 @@ abstract class FiroCacheCoordinator { final setSize = (await setCacheFile.exists()) ? await setCacheFile.length() : 0; - final tagsSize = (await usedTagsCacheFile.exists()) - ? await usedTagsCacheFile.length() - : 0; + final tagsSize = + (await usedTagsCacheFile.exists()) + ? await usedTagsCacheFile.length() + : 0; Logging.instance.d("Spark cache used tags size: $tagsSize"); Logging.instance.d("Spark cache anon set size: $setSize"); @@ -67,16 +74,11 @@ abstract class FiroCacheCoordinator { ) async { await _tagLocks[network]!.protect(() async { final count = await FiroCacheCoordinator.getUsedCoinTagsCount(network); - final unhashedTags = - await client.getSparkUnhashedUsedCoinsTagsWithTxHashes( - startNumber: count, - ); + final unhashedTags = await client + .getSparkUnhashedUsedCoinsTagsWithTxHashes(startNumber: count); if (unhashedTags.isNotEmpty) { await _workers[network]!.runTask( - FCTask( - func: FCFuncName._updateSparkUsedTagsWith, - data: unhashedTags, - ), + FCTask(func: FCFuncName._updateSparkUsedTagsWith, data: unhashedTags), ); } }); @@ -98,9 +100,7 @@ abstract class FiroCacheCoordinator { final prevSize = prevMeta?.size ?? 0; - final meta = await client.getSparkAnonymitySetMeta( - coinGroupId: groupId, - ); + final meta = await client.getSparkAnonymitySetMeta(coinGroupId: groupId); progressUpdated?.call(prevSize, meta.size); @@ -141,9 +141,10 @@ abstract class FiroCacheCoordinator { coins.addAll(data); } - final result = coins - .map((e) => RawSparkCoin.fromRPCResponse(e as List, groupId)) - .toList(); + final result = + coins + .map((e) => RawSparkCoin.fromRPCResponse(e as List, groupId)) + .toList(); await _workers[network]!.runTask( FCTask( @@ -156,7 +157,7 @@ abstract class FiroCacheCoordinator { // =========================================================================== - static Future> getUsedCoinTags( + static Future> getUsedCoinTags( int startNumber, CryptoCurrencyNetwork network, ) async { @@ -164,12 +165,10 @@ abstract class FiroCacheCoordinator { startNumber, db: _FiroCache.usedTagsCacheDB(network), ); - return result.map((e) => e["tag"] as String).toSet(); + return result.map((e) => e["tag"] as String).toList(); } - static Future getUsedCoinTagsCount( - CryptoCurrencyNetwork network, - ) async { + static Future getUsedCoinTagsCount(CryptoCurrencyNetwork network) async { final result = await _Reader._getUsedCoinTagsCount( db: _FiroCache.usedTagsCacheDB(network), ); @@ -195,16 +194,11 @@ abstract class FiroCacheCoordinator { return []; } return result.rows - .map( - (e) => ( - tag: e[0] as String, - txid: e[1] as String, - ), - ) + .map((e) => (tag: e[0] as String, txid: e[1] as String)) .toList(); } - static Future> getUsedCoinTagsFor({ + static Future> getUsedCoinTagsFor({ required String txid, required CryptoCurrencyNetwork network, }) async { @@ -212,7 +206,7 @@ abstract class FiroCacheCoordinator { txid, db: _FiroCache.usedTagsCacheDB(network), ); - return result.map((e) => e["tag"] as String).toSet(); + return result.map((e) => e["tag"] as String).toList(); } static Future checkTagIsUsed( @@ -230,16 +224,17 @@ abstract class FiroCacheCoordinator { String? afterBlockHash, required CryptoCurrencyNetwork network, }) async { - final resultSet = afterBlockHash == null - ? await _Reader._getSetCoinsForGroupId( - groupId, - db: _FiroCache.setCacheDB(network), - ) - : await _Reader._getSetCoinsForGroupIdAndBlockHash( - groupId, - afterBlockHash, - db: _FiroCache.setCacheDB(network), - ); + final resultSet = + afterBlockHash == null + ? await _Reader._getSetCoinsForGroupId( + groupId, + db: _FiroCache.setCacheDB(network), + ) + : await _Reader._getSetCoinsForGroupIdAndBlockHash( + groupId, + afterBlockHash, + db: _FiroCache.setCacheDB(network), + ); return resultSet .map( diff --git a/lib/db/sqlite/firo_cache_writer.dart b/lib/db/sqlite/firo_cache_writer.dart index 63192d964..fadc3eb91 100644 --- a/lib/db/sqlite/firo_cache_writer.dart +++ b/lib/db/sqlite/firo_cache_writer.dart @@ -13,15 +13,11 @@ class FCResult { /// update the sqlite cache /// Expected json format: /// returns true if successful, otherwise some exception -FCResult _updateSparkUsedTagsWith( - Database db, - List> tags, -) { +FCResult _updateSparkUsedTagsWith(Database db, List> tags) { // hash the tags here since this function is called in a background isolate - final hashedTags = LibSpark.hashTags( - base64Tags: tags.map((e) => e[0] as String).toSet(), + final hashedTags = hashTags( + base64Tags: tags.map((e) => e[0] as String).toList(), ).toList(); - if (hashedTags.isEmpty) { // nothing to add, return early return FCResult(success: true); @@ -70,11 +66,7 @@ FCResult _updateSparkAnonSetCoinsWith( FROM SparkSet WHERE blockHash = ? AND setHash = ? AND groupId = ?; """, - [ - meta.blockHash, - meta.setHash, - meta.coinGroupId, - ], + [meta.blockHash, meta.setHash, meta.coinGroupId], ); if (checkResult.isNotEmpty) { diff --git a/lib/electrumx_rpc/electrumx_client.dart b/lib/electrumx_rpc/electrumx_client.dart index befe70fc3..2ef2791cb 100644 --- a/lib/electrumx_rpc/electrumx_client.dart +++ b/lib/electrumx_rpc/electrumx_client.dart @@ -20,6 +20,7 @@ import 'package:event_bus/event_bus.dart'; import 'package:mutex/mutex.dart'; import 'package:stream_channel/stream_channel.dart'; +import '../app_config.dart'; import '../exceptions/electrumx/no_such_transaction.dart'; import '../models/electrumx_response/spark_models.dart'; import '../services/event_bus/events/global/tor_connection_status_changed_event.dart'; @@ -220,46 +221,47 @@ class ElectrumXClient { Future checkElectrumAdapter() async { ({InternetAddress host, int port})? proxyInfo; - // If we're supposed to use Tor... - if (_prefs.useTor) { - // But Tor isn't running... - if (_torService.status != TorConnectionStatus.connected) { - // And the killswitch isn't set... - if (!_prefs.torKillSwitch) { - // Then we'll just proceed and connect to ElectrumX through - // clearnet at the bottom of this function. - Logging.instance.w( - "Tor preference set but Tor is not enabled, killswitch not set," - " connecting to Electrum adapter through clearnet", - ); + if (AppConfig.hasFeature(AppFeature.tor)) { + // If we're supposed to use Tor... + if (_prefs.useTor) { + // But Tor isn't running... + if (_torService.status != TorConnectionStatus.connected) { + // And the killswitch isn't set... + if (!_prefs.torKillSwitch) { + // Then we'll just proceed and connect to ElectrumX through + // clearnet at the bottom of this function. + Logging.instance.w( + "Tor preference set but Tor is not enabled, killswitch not set," + " connecting to Electrum adapter through clearnet", + ); + } else { + // ... But if the killswitch is set, then we throw an exception. + throw Exception( + "Tor preference and killswitch set but Tor is not enabled, " + "not connecting to Electrum adapter", + ); + // TODO [prio=low]: Try to start Tor. + } } else { - // ... But if the killswitch is set, then we throw an exception. - throw Exception( - "Tor preference and killswitch set but Tor is not enabled, " - "not connecting to Electrum adapter", + // Get the proxy info from the TorService. + proxyInfo = _torService.getProxyInfo(); + } + + if (netType == TorPlainNetworkOption.clear) { + _electrumAdapterChannel = null; + await ClientManager.sharedInstance.remove( + cryptoCurrency: cryptoCurrency, ); - // TODO [prio=low]: Try to start Tor. } } else { - // Get the proxy info from the TorService. - proxyInfo = _torService.getProxyInfo(); - } - - if (netType == TorPlainNetworkOption.clear) { - _electrumAdapterChannel = null; - await ClientManager.sharedInstance.remove( - cryptoCurrency: cryptoCurrency, - ); - } - } else { - if (netType == TorPlainNetworkOption.tor) { - _electrumAdapterChannel = null; - await ClientManager.sharedInstance.remove( - cryptoCurrency: cryptoCurrency, - ); + if (netType == TorPlainNetworkOption.tor) { + _electrumAdapterChannel = null; + await ClientManager.sharedInstance.remove( + cryptoCurrency: cryptoCurrency, + ); + } } } - // If the current ElectrumAdapterClient is closed, create a new one. if (getElectrumAdapter() != null && getElectrumAdapter()!.peer.isClosed) { _electrumAdapterChannel = null; @@ -847,9 +849,9 @@ class ElectrumXClient { }) async { Logging.instance.d("attempting to fetch lelantus.getanonymityset..."); await checkElectrumAdapter(); - final Map response = await (getElectrumAdapter() - as FiroElectrumClient) - .getLelantusAnonymitySet(groupId: groupId, blockHash: blockhash); + final Map response = + await (getElectrumAdapter() as FiroElectrumClient) + .getLelantusAnonymitySet(groupId: groupId, blockHash: blockhash); Logging.instance.d("Fetching lelantus.getanonymityset finished"); return response; } @@ -900,8 +902,8 @@ class ElectrumXClient { Future getLelantusLatestCoinId({String? requestID}) async { Logging.instance.d("attempting to fetch lelantus.getlatestcoinid..."); await checkElectrumAdapter(); - final int response = - await (getElectrumAdapter() as FiroElectrumClient).getLatestCoinId(); + final int response = await (getElectrumAdapter() as FiroElectrumClient) + .getLatestCoinId(); Logging.instance.d("Fetching lelantus.getlatestcoinid finished"); return response; } @@ -929,12 +931,12 @@ class ElectrumXClient { try { final start = DateTime.now(); await checkElectrumAdapter(); - final Map response = await (getElectrumAdapter() - as FiroElectrumClient) - .getSparkAnonymitySet( - coinGroupId: coinGroupId, - startBlockHash: startBlockHash, - ); + final Map response = + await (getElectrumAdapter() as FiroElectrumClient) + .getSparkAnonymitySet( + coinGroupId: coinGroupId, + startBlockHash: startBlockHash, + ); Logging.instance.d( "Finished ElectrumXClient.getSparkAnonymitySet(coinGroupId" "=$coinGroupId, startBlockHash=$startBlockHash). " @@ -1025,9 +1027,8 @@ class ElectrumXClient { try { Logging.instance.d("attempting to fetch spark.getsparklatestcoinid..."); await checkElectrumAdapter(); - final int response = - await (getElectrumAdapter() as FiroElectrumClient) - .getSparkLatestCoinId(); + final int response = await (getElectrumAdapter() as FiroElectrumClient) + .getSparkLatestCoinId(); Logging.instance.d("Fetching spark.getsparklatestcoinid finished"); return response; } catch (e, s) { @@ -1045,10 +1046,9 @@ class ElectrumXClient { command: "spark.getmempoolsparktxids", ); - final txids = - List.from( - response as List, - ).map((e) => e.toHexReversedFromBase64).toSet(); + final txids = List.from( + response as List, + ).map((e) => e.toHexReversedFromBase64).toSet(); Logging.instance.d( "Finished ElectrumXClient.getMempoolTxids(). " @@ -1129,7 +1129,7 @@ class ElectrumXClient { "Duration=${DateTime.now().difference(start)}", ); - return tags; + return tags.reversed.toList(); } catch (e, s) { Logging.instance.e(e, error: e, stackTrace: s); rethrow; @@ -1158,10 +1158,8 @@ class ElectrumXClient { return response .map( - (e) => ( - name: e["name"] as String, - address: e["address"] as String, - ), + (e) => + (name: e["name"] as String, address: e["address"] as String), ) .toList(); } else if (response["error"] != null) { diff --git a/lib/main.dart b/lib/main.dart index 0eb4c224c..7bfba70f0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -15,7 +15,6 @@ import 'dart:ui'; import 'package:coinlib_flutter/coinlib_flutter.dart'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:cs_monero/cs_monero.dart' as lib_monero; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -26,9 +25,6 @@ import 'package:keyboard_dismisser/keyboard_dismisser.dart'; import 'package:logger/logger.dart'; import 'package:path_provider/path_provider.dart'; import 'package:window_size/window_size.dart'; -import 'package:xelis_flutter/src/api/api.dart' as xelis_api; -import 'package:xelis_flutter/src/api/logger.dart' as xelis_logging; -import 'package:xelis_flutter/src/frb_generated.dart' as xelis_rust; import 'app_config.dart'; import 'db/db_version_migration.dart'; @@ -79,45 +75,21 @@ import 'wallets/crypto_currency/crypto_currency.dart'; import 'wallets/isar/providers/all_wallets_info_provider.dart'; import 'wallets/wallet/wallet_mixin_interfaces/spark_interface.dart'; import 'widgets/crypto_notifications.dart'; +import 'wl_gen/interfaces/cs_monero_interface.dart'; +import 'wl_gen/interfaces/lib_xelis_interface.dart'; final openedFromSWBFileStringStateProvider = StateProvider( (ref) => null, ); -void startListeningToRustLogs() { - xelis_api.createLogStream().listen( - (logEntry) { - final Level level; - switch (logEntry.level) { - case xelis_logging.Level.error: - level = Level.error; - case xelis_logging.Level.warn: - level = Level.warning; - case xelis_logging.Level.info: - level = Level.info; - case xelis_logging.Level.debug: - level = Level.debug; - case xelis_logging.Level.trace: - level = Level.trace; - } - - Logging.instance.log( - level, - "[Xelis Rust Log] ${logEntry.tag}: ${logEntry.msg}", - ); - }, - onError: (dynamic e) { - Logging.instance.e("Error receiving Xelis Rust logs: $e"); - }, - ); -} - // main() is the entry point to the app. It initializes Hive (local database), // runs the MyApp widget and checks for new users, caching the value in the // miscellaneous box for later use void main(List args) async { // talker.info('initializing Rust lib ...'); - await xelis_rust.RustLib.init(); + if (AppConfig.coins.whereType().isNotEmpty) { + await libXelis.initRustLib(); + } WidgetsFlutterBinding.ensureInitialized(); if (Util.isDesktop && args.length == 2 && args.first == "-d") { @@ -189,7 +161,10 @@ void main(List args) async { DB.instance.hive.registerAdapter(lib_monero_compat.WalletTypeAdapter()); - lib_monero.Logging.useLogger = kDebugMode; + if (AppConfig.coins.whereType().isNotEmpty || + AppConfig.coins.whereType().isNotEmpty) { + csMonero.setUseCsMoneroLoggerInternal(kDebugMode); + } DB.instance.hive.init( (await StackFileSystem.applicationHiveDirectory()).path, @@ -205,11 +180,15 @@ void main(List args) async { debugConsoleLevel: kDebugMode ? Level.trace : null, ); - await xelis_api.setUpRustLogger(); - startListeningToRustLogs(); + if (AppConfig.coins.whereType().isNotEmpty) { + await libXelis.setupRustLogger(); + libXelis.startListeningToRustLogs(); + } - // setup lib spark logging - initSparkLogging(Prefs.instance.logLevel); + if (AppConfig.coins.whereType().isNotEmpty) { + // setup lib spark logging + initSparkLogging(Prefs.instance.logLevel); + } if (AppConfig.appName == "Campfire" && !Util.isDesktop && @@ -217,7 +196,7 @@ void main(List args) async { await CampfireMigration.init(); } - if (kDebugMode) { + if (kDebugMode && !Platform.isIOS) { unawaited( MwebdService.instance .logsStream(CryptoCurrencyNetwork.main) @@ -236,18 +215,19 @@ void main(List args) async { ); } - // TODO: - // This should be moved to happen during the loading animation instead of - // showing a blank screen for 4-10 seconds. - // Some refactoring will need to be done here to make sure we don't make any - // network calls before starting up tor - if (Prefs.instance.useTor) { - TorService.sharedInstance.init( - torDataDirPath: (await StackFileSystem.applicationTorDirectory()).path, - ); - await TorService.sharedInstance.start(); + if (AppConfig.hasFeature(AppFeature.tor)) { + // TODO: + // This should be moved to happen during the loading animation instead of + // showing a blank screen for 4-10 seconds. + // Some refactoring will need to be done here to make sure we don't make any + // network calls before starting up tor + if (Prefs.instance.useTor) { + TorService.sharedInstance.init( + torDataDirPath: (await StackFileSystem.applicationTorDirectory()).path, + ); + await TorService.sharedInstance.start(); + } } - await StackFileSystem.initThemesDir(); await FiroCacheCoordinator.init(); @@ -344,7 +324,6 @@ class MaterialAppWithTheme extends ConsumerStatefulWidget { class _MaterialAppWithThemeState extends ConsumerState with WidgetsBindingObserver { static const platform = MethodChannel("STACK_WALLET_RESTORE"); - final GlobalKey navigatorKey = GlobalKey(); // late final Wallets _wallets; // late final Prefs _prefs; @@ -373,8 +352,9 @@ class _MaterialAppWithThemeState extends ConsumerState Constants.exchangeForExperiencedUsers(familiarity); if (Util.isDesktop) { - _desktopHasPassword = - await ref.read(storageCryptoHandlerProvider).hasPassword(); + _desktopHasPassword = await ref + .read(storageCryptoHandlerProvider) + .hasPassword(); } } @@ -481,14 +461,14 @@ class _MaterialAppWithThemeState extends ConsumerState final brightness = WidgetsBinding.instance.window.platformBrightness; switch (brightness) { case Brightness.dark: - themeId = - ref.read(prefsChangeNotifierProvider).systemBrightnessDarkThemeId; + themeId = ref + .read(prefsChangeNotifierProvider) + .systemBrightnessDarkThemeId; break; case Brightness.light: - themeId = - ref - .read(prefsChangeNotifierProvider) - .systemBrightnessLightThemeId; + themeId = ref + .read(prefsChangeNotifierProvider) + .systemBrightnessLightThemeId; break; } } else { @@ -507,8 +487,9 @@ class _MaterialAppWithThemeState extends ConsumerState ref.read(applicationThemesDirectoryPathProvider.notifier).state = StackFileSystem.themesDir!.path; - ref.read(themeProvider.state).state = - ref.read(pThemeService).getTheme(themeId: themeId)!; + ref.read(themeProvider.state).state = ref + .read(pThemeService) + .getTheme(themeId: themeId)!; if (Platform.isAndroid) { // fetch open file if it exists @@ -532,21 +513,22 @@ class _MaterialAppWithThemeState extends ConsumerState String themeId; switch (WidgetsBinding.instance.window.platformBrightness) { case Brightness.dark: - themeId = - ref.read(prefsChangeNotifierProvider).systemBrightnessDarkThemeId; + themeId = ref + .read(prefsChangeNotifierProvider) + .systemBrightnessDarkThemeId; break; case Brightness.light: - themeId = - ref - .read(prefsChangeNotifierProvider) - .systemBrightnessLightThemeId; + themeId = ref + .read(prefsChangeNotifierProvider) + .systemBrightnessLightThemeId; break; } WidgetsBinding.instance.addPostFrameCallback((_) { if (ref.read(prefsChangeNotifierProvider).enableSystemBrightness) { - ref.read(themeProvider.state).state = - ref.read(pThemeService).getTheme(themeId: themeId)!; + ref.read(themeProvider.state).state = ref + .read(pThemeService) + .getTheme(themeId: themeId)!; } }); }; @@ -659,10 +641,10 @@ class _MaterialAppWithThemeState extends ConsumerState Future goToRestoreSWB(String encrypted) async { if (!ref.read(prefsChangeNotifierProvider).hasPin) { await Navigator.of( - navigatorKey.currentContext!, + ref.read(pNavKey).currentContext!, ).pushNamed(CreatePinView.routeName, arguments: true).then((value) { if (value is! bool || value == false) { - Navigator.of(navigatorKey.currentContext!).pushNamed( + Navigator.of(ref.read(pNavKey).currentContext!).pushNamed( RestoreFromEncryptedStringView.routeName, arguments: encrypted, ); @@ -671,20 +653,19 @@ class _MaterialAppWithThemeState extends ConsumerState } else { unawaited( Navigator.push( - navigatorKey.currentContext!, + ref.read(pNavKey).currentContext!, RouteGenerator.getRoute( shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, - builder: - (_) => LockscreenView( - showBackButton: true, - routeOnSuccess: RestoreFromEncryptedStringView.routeName, - routeOnSuccessArguments: encrypted, - biometricsCancelButtonString: "CANCEL", - biometricsLocalizedReason: - "Authenticate to restore ${AppConfig.appName} backup", - biometricsAuthenticationTitle: - "Restore ${AppConfig.prefix} backup", - ), + builder: (_) => LockscreenView( + showBackButton: true, + routeOnSuccess: RestoreFromEncryptedStringView.routeName, + routeOnSuccessArguments: encrypted, + biometricsCancelButtonString: "CANCEL", + biometricsLocalizedReason: + "Authenticate to restore ${AppConfig.appName} backup", + biometricsAuthenticationTitle: + "Restore ${AppConfig.prefix} backup", + ), settings: const RouteSettings(name: "/swbrestorelockscreen"), ), ), @@ -711,7 +692,7 @@ class _MaterialAppWithThemeState extends ConsumerState return MaterialApp( key: GlobalKey(), - navigatorKey: navigatorKey, + navigatorKey: ref.read(pNavKey), title: AppConfig.appName, onGenerateRoute: RouteGenerator.generateRoute, theme: ThemeData( @@ -808,85 +789,79 @@ class _MaterialAppWithThemeState extends ConsumerState ), ), home: CryptoNotifications( - child: - Util.isDesktop - ? FutureBuilder( - future: loadShared(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done) { - if (_desktopHasPassword) { - String? startupWalletId; - if (ref + child: Util.isDesktop + ? FutureBuilder( + future: loadShared(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + if (_desktopHasPassword) { + String? startupWalletId; + if (ref + .read(prefsChangeNotifierProvider) + .gotoWalletOnStartup) { + startupWalletId = ref .read(prefsChangeNotifierProvider) - .gotoWalletOnStartup) { - startupWalletId = - ref - .read(prefsChangeNotifierProvider) - .startupWalletId; - } - - return DesktopLoginView( - startupWalletId: startupWalletId, - load: () => load(true), - ); - } else { - return const IntroView(); + .startupWalletId; } + + return DesktopLoginView( + startupWalletId: startupWalletId, + load: () => load(true), + ); } else { - return const LoadingView(); + return const IntroView(); } - }, - ) - : FutureBuilder( - future: load(false), - builder: ( - BuildContext context, - AsyncSnapshot snapshot, - ) { - if (snapshot.connectionState == ConnectionState.done) { - // FlutterNativeSplash.remove(); - if (ref.read(pAllWalletsInfo).isNotEmpty || - ref.read(prefsChangeNotifierProvider).hasPin) { - // return HomeView(); - - String? startupWalletId; - if (ref + } else { + return const LoadingView(); + } + }, + ) + : FutureBuilder( + future: load(false), + builder: (BuildContext context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + // FlutterNativeSplash.remove(); + if (ref.read(pAllWalletsInfo).isNotEmpty || + ref.read(prefsChangeNotifierProvider).hasPin) { + // return HomeView(); + + String? startupWalletId; + if (ref + .read(prefsChangeNotifierProvider) + .gotoWalletOnStartup) { + startupWalletId = ref .read(prefsChangeNotifierProvider) - .gotoWalletOnStartup) { - startupWalletId = - ref - .read(prefsChangeNotifierProvider) - .startupWalletId; - } - - return LockscreenView( - isInitialAppLogin: true, - routeOnSuccess: HomeView.routeName, - routeOnSuccessArguments: startupWalletId, - biometricsAuthenticationTitle: - "Unlock ${AppConfig.prefix}", - biometricsLocalizedReason: - "Unlock your ${AppConfig.appName} using biometrics", - biometricsCancelButtonString: "Cancel", - ); - } else { - if (AppConfig.appName == "Campfire" && - !CampfireMigration.didRun && - CampfireMigration.hasOldWallets) { - return const CampfireMigrateView(); - } else { - return const IntroView(); - } + .startupWalletId; } + + return LockscreenView( + isInitialAppLogin: true, + routeOnSuccess: HomeView.routeName, + routeOnSuccessArguments: startupWalletId, + biometricsAuthenticationTitle: + "Unlock ${AppConfig.prefix}", + biometricsLocalizedReason: + "Unlock your ${AppConfig.appName} using biometrics", + biometricsCancelButtonString: "Cancel", + ); } else { - // CURRENTLY DISABLED as cannot be animated - // technically not needed as FlutterNativeSplash will overlay - // anything returned here until the future completes but - // FutureBuilder requires you to return something - return const LoadingView(); + if (AppConfig.appName == "Campfire" && + !CampfireMigration.didRun && + CampfireMigration.hasOldWallets) { + return const CampfireMigrateView(); + } else { + return const IntroView(); + } } - }, - ), + } else { + // CURRENTLY DISABLED as cannot be animated + // technically not needed as FlutterNativeSplash will overlay + // anything returned here until the future completes but + // FutureBuilder requires you to return something + return const LoadingView(); + } + }, + ), ), ); } diff --git a/lib/models/epicbox_config_model.dart b/lib/models/epicbox_config_model.dart index 4d22dadd7..71fe82281 100644 --- a/lib/models/epicbox_config_model.dart +++ b/lib/models/epicbox_config_model.dart @@ -10,7 +10,7 @@ import 'dart:convert'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'epicbox_server_model.dart'; diff --git a/lib/models/epicbox_server_model.dart b/lib/models/epicbox_server_model.dart index 810168943..c0d581673 100644 --- a/lib/models/epicbox_server_model.dart +++ b/lib/models/epicbox_server_model.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part 'type_adaptors/epicbox_server_model.g.dart'; diff --git a/lib/models/exchange/change_now/exchange_transaction.dart b/lib/models/exchange/change_now/exchange_transaction.dart index 1de49bfd0..b5b43ddce 100644 --- a/lib/models/exchange/change_now/exchange_transaction.dart +++ b/lib/models/exchange/change_now/exchange_transaction.dart @@ -9,7 +9,7 @@ */ import 'package:decimal/decimal.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:uuid/uuid.dart'; import 'exchange_transaction_status.dart'; @@ -117,12 +117,11 @@ class ExchangeTransaction { DateTime.tryParse(json["date"] as String? ?? "") ?? DateTime.fromMillisecondsSinceEpoch(0), statusString: json["statusString"] as String? ?? "", - statusObject: - json["statusObject"] is Map - ? ExchangeTransactionStatus.fromJson( - json["statusObject"] as Map, - ) - : null, + statusObject: json["statusObject"] is Map + ? ExchangeTransactionStatus.fromJson( + json["statusObject"] as Map, + ) + : null, ); } catch (e) { rethrow; diff --git a/lib/models/exchange/change_now/exchange_transaction_status.dart b/lib/models/exchange/change_now/exchange_transaction_status.dart index 5a904690f..def02d5fe 100644 --- a/lib/models/exchange/change_now/exchange_transaction_status.dart +++ b/lib/models/exchange/change_now/exchange_transaction_status.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import '../../../utilities/logger.dart'; import 'cn_exchange_transaction_status.dart' @@ -177,14 +177,12 @@ class ExchangeTransactionStatus { toCurrency: json["toCurrency"] as String? ?? "", id: json["id"] as String, updatedAt: json["updatedAt"] as String? ?? "", - expectedSendAmountDecimal: - json["expectedSendAmount"] == null - ? "" - : json["expectedSendAmount"].toString(), - expectedReceiveAmountDecimal: - json["expectedReceiveAmount"] == null - ? "" - : json["expectedReceiveAmount"].toString(), + expectedSendAmountDecimal: json["expectedSendAmount"] == null + ? "" + : json["expectedSendAmount"].toString(), + expectedReceiveAmountDecimal: json["expectedReceiveAmount"] == null + ? "" + : json["expectedReceiveAmount"].toString(), createdAt: json["createdAt"] as String? ?? "", isPartner: json["isPartner"] as bool, depositReceivedAt: json["depositReceivedAt"] as String? ?? "", @@ -194,12 +192,12 @@ class ExchangeTransactionStatus { payoutHash: json["payoutHash"] as String? ?? "", payinExtraId: json["payinExtraId"] as String? ?? "", payoutExtraId: json["payoutExtraId"] as String? ?? "", - amountSendDecimal: - json["amountSend"] == null ? "" : json["amountSend"].toString(), - amountReceiveDecimal: - json["amountReceive"] == null - ? "" - : json["amountReceive"].toString(), + amountSendDecimal: json["amountSend"] == null + ? "" + : json["amountSend"].toString(), + amountReceiveDecimal: json["amountReceive"] == null + ? "" + : json["amountReceive"].toString(), tokensDestination: json["tokensDestination"] as String? ?? "", refundAddress: json["refundAddress"] as String? ?? "", refundExtraId: json["refundExtraId"] as String? ?? "", diff --git a/lib/models/exchange/response_objects/trade.dart b/lib/models/exchange/response_objects/trade.dart index e6f996f9b..1669b94c5 100644 --- a/lib/models/exchange/response_objects/trade.dart +++ b/lib/models/exchange/response_objects/trade.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import '../../../services/exchange/change_now/change_now_exchange.dart'; import '../change_now/cn_exchange_transaction.dart'; @@ -226,10 +226,9 @@ class Trade { timestamp: exTx.date, updatedAt: DateTime.tryParse(exTx.statusObject!.updatedAt) ?? exTx.date, payInCurrency: exTx.fromCurrency, - payInAmount: - exTx.statusObject!.amountSendDecimal.isEmpty - ? exTx.statusObject!.expectedSendAmountDecimal - : exTx.statusObject!.amountSendDecimal, + payInAmount: exTx.statusObject!.amountSendDecimal.isEmpty + ? exTx.statusObject!.expectedSendAmountDecimal + : exTx.statusObject!.amountSendDecimal, payInAddress: exTx.payinAddress, payInNetwork: "", payInExtraId: exTx.payinExtraId, diff --git a/lib/models/exchange/response_objects/trade.g.dart b/lib/models/exchange/response_objects/trade.g.dart index 12d77bd83..c0c54c487 100644 --- a/lib/models/exchange/response_objects/trade.g.dart +++ b/lib/models/exchange/response_objects/trade.g.dart @@ -8,7 +8,7 @@ part of 'trade.dart'; class TradeAdapter extends TypeAdapter { @override - final int typeId = 22; + final typeId = 22; @override Trade read(BinaryReader reader) { diff --git a/lib/models/isar/exchange_cache/currency.dart b/lib/models/isar/exchange_cache/currency.dart index 67a7f4098..f450535cb 100644 --- a/lib/models/isar/exchange_cache/currency.dart +++ b/lib/models/isar/exchange_cache/currency.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../app_config.dart'; import '../../../services/exchange/change_now/change_now_exchange.dart'; diff --git a/lib/models/isar/exchange_cache/currency.g.dart b/lib/models/isar/exchange_cache/currency.g.dart index 89d93a11d..20865c68c 100644 --- a/lib/models/isar/exchange_cache/currency.g.dart +++ b/lib/models/isar/exchange_cache/currency.g.dart @@ -27,53 +27,34 @@ const CurrencySchema = CollectionSchema( name: r'externalId', type: IsarType.string, ), - r'image': PropertySchema( - id: 2, - name: r'image', - type: IsarType.string, - ), + r'image': PropertySchema(id: 2, name: r'image', type: IsarType.string), r'isAvailable': PropertySchema( id: 3, name: r'isAvailable', type: IsarType.bool, ), - r'isFiat': PropertySchema( - id: 4, - name: r'isFiat', - type: IsarType.bool, - ), + r'isFiat': PropertySchema(id: 4, name: r'isFiat', type: IsarType.bool), r'isStackCoin': PropertySchema( id: 5, name: r'isStackCoin', type: IsarType.bool, ), - r'name': PropertySchema( - id: 6, - name: r'name', - type: IsarType.string, - ), - r'network': PropertySchema( - id: 7, - name: r'network', - type: IsarType.string, - ), + r'name': PropertySchema(id: 6, name: r'name', type: IsarType.string), + r'network': PropertySchema(id: 7, name: r'network', type: IsarType.string), r'rateType': PropertySchema( id: 8, name: r'rateType', type: IsarType.byte, enumMap: _CurrencyrateTypeEnumValueMap, ), - r'ticker': PropertySchema( - id: 9, - name: r'ticker', - type: IsarType.string, - ), + r'ticker': PropertySchema(id: 9, name: r'ticker', type: IsarType.string), r'tokenContract': PropertySchema( id: 10, name: r'tokenContract', type: IsarType.string, - ) + ), }, + estimateSize: _currencyEstimateSize, serialize: _currencySerialize, deserialize: _currencyDeserialize, @@ -90,7 +71,7 @@ const CurrencySchema = CollectionSchema( name: r'exchangeName', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'ticker_exchangeName_name': IndexSchema( @@ -113,7 +94,7 @@ const CurrencySchema = CollectionSchema( name: r'name', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'isStackCoin': IndexSchema( @@ -126,16 +107,17 @@ const CurrencySchema = CollectionSchema( name: r'isStackCoin', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _currencyGetId, getLinks: _currencyGetLinks, attach: _currencyAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _currencyEstimateSize( @@ -200,7 +182,7 @@ Currency _currencyDeserialize( network: reader.readString(offsets[7]), rateType: _CurrencyrateTypeValueEnumMap[reader.readByteOrNull(offsets[8])] ?? - SupportedRateType.fixed, + SupportedRateType.fixed, ticker: reader.readString(offsets[9]), tokenContract: reader.readStringOrNull(offsets[10]), ); @@ -233,7 +215,8 @@ P _currencyDeserializeProp

( return (reader.readString(offset)) as P; case 8: return (_CurrencyrateTypeValueEnumMap[reader.readByteOrNull(offset)] ?? - SupportedRateType.fixed) as P; + SupportedRateType.fixed) + as P; case 9: return (reader.readString(offset)) as P; case 10: @@ -243,11 +226,7 @@ P _currencyDeserializeProp

( } } -const _CurrencyrateTypeEnumValueMap = { - 'fixed': 0, - 'estimated': 1, - 'both': 2, -}; +const _CurrencyrateTypeEnumValueMap = {'fixed': 0, 'estimated': 1, 'both': 2}; const _CurrencyrateTypeValueEnumMap = { 0: SupportedRateType.fixed, 1: SupportedRateType.estimated, @@ -285,10 +264,7 @@ extension CurrencyQueryWhereSort on QueryBuilder { extension CurrencyQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -314,8 +290,10 @@ extension CurrencyQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -323,8 +301,10 @@ extension CurrencyQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -339,239 +319,303 @@ extension CurrencyQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder exchangeNameEqualTo( - String exchangeName) { + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'exchangeName', - value: [exchangeName], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'exchangeName', + value: [exchangeName], + ), + ); }); } QueryBuilder exchangeNameNotEqualTo( - String exchangeName) { + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [], - upper: [exchangeName], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [exchangeName], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [], + upper: [exchangeName], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [exchangeName], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [exchangeName], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [], - upper: [exchangeName], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [exchangeName], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [], + upper: [exchangeName], + includeUpper: false, + ), + ); } }); } QueryBuilder - tickerEqualToAnyExchangeNameName(String ticker) { + tickerEqualToAnyExchangeNameName(String ticker) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'ticker_exchangeName_name', - value: [ticker], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'ticker_exchangeName_name', + value: [ticker], + ), + ); }); } QueryBuilder - tickerNotEqualToAnyExchangeNameName(String ticker) { + tickerNotEqualToAnyExchangeNameName(String ticker) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [], - upper: [ticker], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [], + upper: [ticker], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [], - upper: [ticker], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [], + upper: [ticker], + includeUpper: false, + ), + ); } }); } QueryBuilder - tickerExchangeNameEqualToAnyName(String ticker, String exchangeName) { + tickerExchangeNameEqualToAnyName(String ticker, String exchangeName) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'ticker_exchangeName_name', - value: [ticker, exchangeName], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'ticker_exchangeName_name', + value: [ticker, exchangeName], + ), + ); }); } QueryBuilder - tickerEqualToExchangeNameNotEqualToAnyName( - String ticker, String exchangeName) { + tickerEqualToExchangeNameNotEqualToAnyName( + String ticker, + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker], - upper: [ticker, exchangeName], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName], - includeLower: false, - upper: [ticker], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker], + upper: [ticker, exchangeName], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName], + includeLower: false, + upper: [ticker], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName], - includeLower: false, - upper: [ticker], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker], - upper: [ticker, exchangeName], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName], + includeLower: false, + upper: [ticker], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker], + upper: [ticker, exchangeName], + includeUpper: false, + ), + ); } }); } QueryBuilder - tickerExchangeNameNameEqualTo( - String ticker, String exchangeName, String name) { + tickerExchangeNameNameEqualTo( + String ticker, + String exchangeName, + String name, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'ticker_exchangeName_name', - value: [ticker, exchangeName, name], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'ticker_exchangeName_name', + value: [ticker, exchangeName, name], + ), + ); }); } QueryBuilder - tickerExchangeNameEqualToNameNotEqualTo( - String ticker, String exchangeName, String name) { + tickerExchangeNameEqualToNameNotEqualTo( + String ticker, + String exchangeName, + String name, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName], - upper: [ticker, exchangeName, name], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName, name], - includeLower: false, - upper: [ticker, exchangeName], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName], + upper: [ticker, exchangeName, name], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName, name], + includeLower: false, + upper: [ticker, exchangeName], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName, name], - includeLower: false, - upper: [ticker, exchangeName], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker_exchangeName_name', - lower: [ticker, exchangeName], - upper: [ticker, exchangeName, name], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName, name], + includeLower: false, + upper: [ticker, exchangeName], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker_exchangeName_name', + lower: [ticker, exchangeName], + upper: [ticker, exchangeName, name], + includeUpper: false, + ), + ); } }); } QueryBuilder isStackCoinEqualTo( - bool isStackCoin) { + bool isStackCoin, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'isStackCoin', - value: [isStackCoin], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'isStackCoin', + value: [isStackCoin], + ), + ); }); } QueryBuilder isStackCoinNotEqualTo( - bool isStackCoin) { + bool isStackCoin, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'isStackCoin', - lower: [], - upper: [isStackCoin], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'isStackCoin', - lower: [isStackCoin], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'isStackCoin', + lower: [], + upper: [isStackCoin], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'isStackCoin', + lower: [isStackCoin], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'isStackCoin', - lower: [isStackCoin], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'isStackCoin', - lower: [], - upper: [isStackCoin], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'isStackCoin', + lower: [isStackCoin], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'isStackCoin', + lower: [], + upper: [isStackCoin], + includeUpper: false, + ), + ); } }); } @@ -584,27 +628,31 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeNameGreaterThan( + exchangeNameGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -614,12 +662,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -631,28 +681,29 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'exchangeName', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'exchangeName', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeNameStartsWith( - String value, { - bool caseSensitive = true, - }) { + exchangeNameStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -661,72 +712,78 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeNameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeNameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'exchangeName', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'exchangeName', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeNameIsEmpty() { + exchangeNameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchangeName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'exchangeName', value: ''), + ); }); } QueryBuilder - exchangeNameIsNotEmpty() { + exchangeNameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'exchangeName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'exchangeName', value: ''), + ); }); } QueryBuilder externalIdIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'externalId', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'externalId'), + ); }); } QueryBuilder - externalIdIsNotNull() { + externalIdIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'externalId', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'externalId'), + ); }); } @@ -735,11 +792,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -749,12 +808,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -764,12 +825,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -781,14 +844,16 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'externalId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'externalId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -797,11 +862,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -810,79 +877,84 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder externalIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'externalId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'externalId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder externalIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'externalId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'externalId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder externalIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'externalId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'externalId', value: ''), + ); }); } QueryBuilder - externalIdIsNotEmpty() { + externalIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'externalId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'externalId', value: ''), + ); }); } QueryBuilder idIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'id', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'id'), + ); }); } QueryBuilder idIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'id', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'id'), + ); }); } QueryBuilder idEqualTo(Id? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -891,11 +963,13 @@ extension CurrencyQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -904,11 +978,13 @@ extension CurrencyQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -919,13 +995,15 @@ extension CurrencyQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -934,11 +1012,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -948,12 +1028,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -963,12 +1045,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -980,14 +1064,16 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'image', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'image', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -996,11 +1082,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1009,100 +1097,106 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder imageContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'image', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'image', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder imageMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'image', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'image', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder imageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'image', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'image', value: ''), + ); }); } QueryBuilder imageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'image', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'image', value: ''), + ); }); } QueryBuilder isAvailableIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'isAvailable', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'isAvailable'), + ); }); } QueryBuilder - isAvailableIsNotNull() { + isAvailableIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'isAvailable', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'isAvailable'), + ); }); } QueryBuilder isAvailableEqualTo( - bool? value) { + bool? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isAvailable', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isAvailable', value: value), + ); }); } QueryBuilder isFiatEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isFiat', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isFiat', value: value), + ); }); } QueryBuilder isStackCoinEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isStackCoin', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isStackCoin', value: value), + ); }); } @@ -1111,11 +1205,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1125,12 +1221,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1140,12 +1238,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1157,14 +1257,16 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1173,11 +1275,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1186,53 +1290,59 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } @@ -1241,11 +1351,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1255,12 +1367,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1270,12 +1384,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1287,14 +1403,16 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'network', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'network', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1303,11 +1421,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1316,63 +1436,69 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder networkContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'network', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'network', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder networkMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'network', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'network', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder networkIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'network', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'network', value: ''), + ); }); } QueryBuilder networkIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'network', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'network', value: ''), + ); }); } QueryBuilder rateTypeEqualTo( - SupportedRateType value) { + SupportedRateType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'rateType', value: value), + ); }); } @@ -1381,11 +1507,13 @@ extension CurrencyQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateType', + value: value, + ), + ); }); } @@ -1394,11 +1522,13 @@ extension CurrencyQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateType', + value: value, + ), + ); }); } @@ -1409,13 +1539,15 @@ extension CurrencyQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1424,11 +1556,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1438,12 +1572,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1453,12 +1589,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1470,14 +1608,16 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ticker', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ticker', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1486,11 +1626,13 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1499,71 +1641,77 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder tickerContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder tickerMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'ticker', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'ticker', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder tickerIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ticker', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ticker', value: ''), + ); }); } QueryBuilder tickerIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'ticker', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'ticker', value: ''), + ); }); } QueryBuilder - tokenContractIsNull() { + tokenContractIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'tokenContract', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'tokenContract'), + ); }); } QueryBuilder - tokenContractIsNotNull() { + tokenContractIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'tokenContract', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'tokenContract'), + ); }); } @@ -1572,27 +1720,31 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractGreaterThan( + tokenContractGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1602,12 +1754,14 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1619,28 +1773,29 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenContract', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenContract', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractStartsWith( - String value, { - bool caseSensitive = true, - }) { + tokenContractStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1649,55 +1804,61 @@ extension CurrencyQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder tokenContractContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'tokenContract', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'tokenContract', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder tokenContractMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'tokenContract', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'tokenContract', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractIsEmpty() { + tokenContractIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenContract', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenContract', value: ''), + ); }); } QueryBuilder - tokenContractIsNotEmpty() { + tokenContractIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'tokenContract', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'tokenContract', value: ''), + ); }); } } @@ -1991,22 +2152,25 @@ extension CurrencyQuerySortThenBy extension CurrencyQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByExchangeName( - {bool caseSensitive = true}) { + QueryBuilder distinctByExchangeName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'exchangeName', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByExternalId( - {bool caseSensitive = true}) { + QueryBuilder distinctByExternalId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'externalId', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByImage( - {bool caseSensitive = true}) { + QueryBuilder distinctByImage({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'image', caseSensitive: caseSensitive); }); @@ -2030,15 +2194,17 @@ extension CurrencyQueryWhereDistinct }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByNetwork( - {bool caseSensitive = true}) { + QueryBuilder distinctByNetwork({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'network', caseSensitive: caseSensitive); }); @@ -2050,18 +2216,22 @@ extension CurrencyQueryWhereDistinct }); } - QueryBuilder distinctByTicker( - {bool caseSensitive = true}) { + QueryBuilder distinctByTicker({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'ticker', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByTokenContract( - {bool caseSensitive = true}) { + QueryBuilder distinctByTokenContract({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'tokenContract', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'tokenContract', + caseSensitive: caseSensitive, + ); }); } } @@ -2123,7 +2293,7 @@ extension CurrencyQueryProperty } QueryBuilder - rateTypeProperty() { + rateTypeProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'rateType'); }); diff --git a/lib/models/isar/exchange_cache/pair.dart b/lib/models/isar/exchange_cache/pair.dart index 923aeb26e..2e77ee7f7 100644 --- a/lib/models/isar/exchange_cache/pair.dart +++ b/lib/models/isar/exchange_cache/pair.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'pair.g.dart'; @@ -29,12 +29,7 @@ class Pair { @Index() final String exchangeName; - @Index( - composite: [ - CompositeIndex("exchangeName"), - CompositeIndex("to"), - ], - ) + @Index(composite: [CompositeIndex("exchangeName"), CompositeIndex("to")]) final String from; final String to; @@ -61,12 +56,7 @@ class Pair { rateType == other.rateType; @override - int get hashCode => Object.hash( - exchangeName, - from, - to, - rateType, - ); + int get hashCode => Object.hash(exchangeName, from, to, rateType); @override String toString() => "Pair: ${toMap()}"; diff --git a/lib/models/isar/exchange_cache/pair.g.dart b/lib/models/isar/exchange_cache/pair.g.dart index 0f9b6435d..81479ec61 100644 --- a/lib/models/isar/exchange_cache/pair.g.dart +++ b/lib/models/isar/exchange_cache/pair.g.dart @@ -22,28 +22,17 @@ const PairSchema = CollectionSchema( name: r'exchangeName', type: IsarType.string, ), - r'from': PropertySchema( - id: 1, - name: r'from', - type: IsarType.string, - ), - r'hashCode': PropertySchema( - id: 2, - name: r'hashCode', - type: IsarType.long, - ), + r'from': PropertySchema(id: 1, name: r'from', type: IsarType.string), + r'hashCode': PropertySchema(id: 2, name: r'hashCode', type: IsarType.long), r'rateType': PropertySchema( id: 3, name: r'rateType', type: IsarType.byte, enumMap: _PairrateTypeEnumValueMap, ), - r'to': PropertySchema( - id: 4, - name: r'to', - type: IsarType.string, - ) + r'to': PropertySchema(id: 4, name: r'to', type: IsarType.string), }, + estimateSize: _pairEstimateSize, serialize: _pairSerialize, deserialize: _pairDeserialize, @@ -60,7 +49,7 @@ const PairSchema = CollectionSchema( name: r'exchangeName', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'from_exchangeName_to': IndexSchema( @@ -83,16 +72,17 @@ const PairSchema = CollectionSchema( name: r'to', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _pairGetId, getLinks: _pairGetLinks, attach: _pairAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _pairEstimateSize( @@ -129,7 +119,8 @@ Pair _pairDeserialize( final object = Pair( exchangeName: reader.readString(offsets[0]), from: reader.readString(offsets[1]), - rateType: _PairrateTypeValueEnumMap[reader.readByteOrNull(offsets[3])] ?? + rateType: + _PairrateTypeValueEnumMap[reader.readByteOrNull(offsets[3])] ?? SupportedRateType.fixed, to: reader.readString(offsets[4]), ); @@ -152,7 +143,8 @@ P _pairDeserializeProp

( return (reader.readLong(offset)) as P; case 3: return (_PairrateTypeValueEnumMap[reader.readByteOrNull(offset)] ?? - SupportedRateType.fixed) as P; + SupportedRateType.fixed) + as P; case 4: return (reader.readString(offset)) as P; default: @@ -160,11 +152,7 @@ P _pairDeserializeProp

( } } -const _PairrateTypeEnumValueMap = { - 'fixed': 0, - 'estimated': 1, - 'both': 2, -}; +const _PairrateTypeEnumValueMap = {'fixed': 0, 'estimated': 1, 'both': 2}; const _PairrateTypeValueEnumMap = { 0: SupportedRateType.fixed, 1: SupportedRateType.estimated, @@ -194,10 +182,7 @@ extension PairQueryWhereSort on QueryBuilder { extension PairQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -223,8 +208,10 @@ extension PairQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -232,8 +219,10 @@ extension PairQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -248,192 +237,246 @@ extension PairQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder exchangeNameEqualTo( - String exchangeName) { + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'exchangeName', - value: [exchangeName], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'exchangeName', + value: [exchangeName], + ), + ); }); } QueryBuilder exchangeNameNotEqualTo( - String exchangeName) { + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [], - upper: [exchangeName], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [exchangeName], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [], + upper: [exchangeName], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [exchangeName], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [exchangeName], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'exchangeName', - lower: [], - upper: [exchangeName], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [exchangeName], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'exchangeName', + lower: [], + upper: [exchangeName], + includeUpper: false, + ), + ); } }); } QueryBuilder fromEqualToAnyExchangeNameTo( - String from) { + String from, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'from_exchangeName_to', - value: [from], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'from_exchangeName_to', + value: [from], + ), + ); }); } QueryBuilder fromNotEqualToAnyExchangeNameTo( - String from) { + String from, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [], - upper: [from], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [], + upper: [from], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [], - upper: [from], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [], + upper: [from], + includeUpper: false, + ), + ); } }); } QueryBuilder fromExchangeNameEqualToAnyTo( - String from, String exchangeName) { + String from, + String exchangeName, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'from_exchangeName_to', - value: [from, exchangeName], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'from_exchangeName_to', + value: [from, exchangeName], + ), + ); }); } QueryBuilder - fromEqualToExchangeNameNotEqualToAnyTo(String from, String exchangeName) { + fromEqualToExchangeNameNotEqualToAnyTo(String from, String exchangeName) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from], - upper: [from, exchangeName], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName], - includeLower: false, - upper: [from], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from], + upper: [from, exchangeName], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName], + includeLower: false, + upper: [from], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName], - includeLower: false, - upper: [from], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from], - upper: [from, exchangeName], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName], + includeLower: false, + upper: [from], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from], + upper: [from, exchangeName], + includeUpper: false, + ), + ); } }); } QueryBuilder fromExchangeNameToEqualTo( - String from, String exchangeName, String to) { + String from, + String exchangeName, + String to, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'from_exchangeName_to', - value: [from, exchangeName, to], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'from_exchangeName_to', + value: [from, exchangeName, to], + ), + ); }); } QueryBuilder - fromExchangeNameEqualToToNotEqualTo( - String from, String exchangeName, String to) { + fromExchangeNameEqualToToNotEqualTo( + String from, + String exchangeName, + String to, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName], - upper: [from, exchangeName, to], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName, to], - includeLower: false, - upper: [from, exchangeName], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName], + upper: [from, exchangeName, to], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName, to], + includeLower: false, + upper: [from, exchangeName], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName, to], - includeLower: false, - upper: [from, exchangeName], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'from_exchangeName_to', - lower: [from, exchangeName], - upper: [from, exchangeName, to], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName, to], + includeLower: false, + upper: [from, exchangeName], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'from_exchangeName_to', + lower: [from, exchangeName], + upper: [from, exchangeName, to], + includeUpper: false, + ), + ); } }); } @@ -445,11 +488,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -459,12 +504,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -474,12 +521,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -491,14 +540,16 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'exchangeName', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'exchangeName', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -507,11 +558,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -520,53 +573,59 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeNameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'exchangeName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'exchangeName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeNameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'exchangeName', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'exchangeName', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeNameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchangeName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'exchangeName', value: ''), + ); }); } QueryBuilder exchangeNameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'exchangeName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'exchangeName', value: ''), + ); }); } @@ -575,11 +634,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -589,12 +650,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -604,12 +667,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -621,14 +686,16 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'from', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'from', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -637,11 +704,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -650,60 +719,67 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder fromContains(String value, - {bool caseSensitive = true}) { + QueryBuilder fromContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'from', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'from', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder fromMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder fromMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'from', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'from', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder fromIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'from', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'from', value: ''), + ); }); } QueryBuilder fromIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'from', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'from', value: ''), + ); }); } QueryBuilder hashCodeEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'hashCode', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'hashCode', value: value), + ); }); } @@ -712,11 +788,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'hashCode', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'hashCode', + value: value, + ), + ); }); } @@ -725,11 +803,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'hashCode', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'hashCode', + value: value, + ), + ); }); } @@ -740,38 +820,39 @@ extension PairQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'hashCode', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'hashCode', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'id', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'id'), + ); }); } QueryBuilder idIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'id', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'id'), + ); }); } QueryBuilder idEqualTo(Id? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -780,11 +861,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -793,11 +876,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -808,23 +893,25 @@ extension PairQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder rateTypeEqualTo( - SupportedRateType value) { + SupportedRateType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'rateType', value: value), + ); }); } @@ -833,11 +920,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateType', + value: value, + ), + ); }); } @@ -846,11 +935,13 @@ extension PairQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateType', + value: value, + ), + ); }); } @@ -861,13 +952,15 @@ extension PairQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -876,11 +969,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -890,12 +985,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -905,12 +1002,14 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -922,14 +1021,16 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'to', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'to', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -938,11 +1039,13 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -951,51 +1054,59 @@ extension PairQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder toContains(String value, - {bool caseSensitive = true}) { + QueryBuilder toContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'to', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'to', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder toMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder toMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'to', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'to', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder toIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'to', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'to', value: ''), + ); }); } QueryBuilder toIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'to', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'to', value: ''), + ); }); } } @@ -1141,15 +1252,17 @@ extension PairQuerySortThenBy on QueryBuilder { } extension PairQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByExchangeName( - {bool caseSensitive = true}) { + QueryBuilder distinctByExchangeName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'exchangeName', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByFrom( - {bool caseSensitive = true}) { + QueryBuilder distinctByFrom({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'from', caseSensitive: caseSensitive); }); @@ -1167,8 +1280,9 @@ extension PairQueryWhereDistinct on QueryBuilder { }); } - QueryBuilder distinctByTo( - {bool caseSensitive = true}) { + QueryBuilder distinctByTo({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'to', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/address_label.dart b/lib/models/isar/models/address_label.dart index ebee66369..ae6e337d4 100644 --- a/lib/models/isar/models/address_label.dart +++ b/lib/models/isar/models/address_label.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'address_label.g.dart'; diff --git a/lib/models/isar/models/address_label.g.dart b/lib/models/isar/models/address_label.g.dart index a87af5963..077359ac8 100644 --- a/lib/models/isar/models/address_label.g.dart +++ b/lib/models/isar/models/address_label.g.dart @@ -22,22 +22,15 @@ const AddressLabelSchema = CollectionSchema( name: r'addressString', type: IsarType.string, ), - r'tags': PropertySchema( - id: 1, - name: r'tags', - type: IsarType.stringList, - ), - r'value': PropertySchema( - id: 2, - name: r'value', - type: IsarType.string, - ), + r'tags': PropertySchema(id: 1, name: r'tags', type: IsarType.stringList), + r'value': PropertySchema(id: 2, name: r'value', type: IsarType.string), r'walletId': PropertySchema( id: 3, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _addressLabelEstimateSize, serialize: _addressLabelSerialize, deserialize: _addressLabelDeserialize, @@ -54,7 +47,7 @@ const AddressLabelSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'addressString_walletId': IndexSchema( @@ -72,16 +65,17 @@ const AddressLabelSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _addressLabelGetId, getLinks: _addressLabelGetLinks, attach: _addressLabelAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _addressLabelEstimateSize( @@ -165,37 +159,54 @@ List> _addressLabelGetLinks(AddressLabel object) { } void _addressLabelAttach( - IsarCollection col, Id id, AddressLabel object) { + IsarCollection col, + Id id, + AddressLabel object, +) { object.id = id; } extension AddressLabelByIndex on IsarCollection { Future getByAddressStringWalletId( - String addressString, String walletId) { + String addressString, + String walletId, + ) { return getByIndex(r'addressString_walletId', [addressString, walletId]); } AddressLabel? getByAddressStringWalletIdSync( - String addressString, String walletId) { + String addressString, + String walletId, + ) { return getByIndexSync(r'addressString_walletId', [addressString, walletId]); } Future deleteByAddressStringWalletId( - String addressString, String walletId) { + String addressString, + String walletId, + ) { return deleteByIndex(r'addressString_walletId', [addressString, walletId]); } bool deleteByAddressStringWalletIdSync( - String addressString, String walletId) { - return deleteByIndexSync( - r'addressString_walletId', [addressString, walletId]); + String addressString, + String walletId, + ) { + return deleteByIndexSync(r'addressString_walletId', [ + addressString, + walletId, + ]); } Future> getAllByAddressStringWalletId( - List addressStringValues, List walletIdValues) { + List addressStringValues, + List walletIdValues, + ) { final len = addressStringValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([addressStringValues[i], walletIdValues[i]]); @@ -205,10 +216,14 @@ extension AddressLabelByIndex on IsarCollection { } List getAllByAddressStringWalletIdSync( - List addressStringValues, List walletIdValues) { + List addressStringValues, + List walletIdValues, + ) { final len = addressStringValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([addressStringValues[i], walletIdValues[i]]); @@ -218,10 +233,14 @@ extension AddressLabelByIndex on IsarCollection { } Future deleteAllByAddressStringWalletId( - List addressStringValues, List walletIdValues) { + List addressStringValues, + List walletIdValues, + ) { final len = addressStringValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([addressStringValues[i], walletIdValues[i]]); @@ -231,10 +250,14 @@ extension AddressLabelByIndex on IsarCollection { } int deleteAllByAddressStringWalletIdSync( - List addressStringValues, List walletIdValues) { + List addressStringValues, + List walletIdValues, + ) { final len = addressStringValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([addressStringValues[i], walletIdValues[i]]); @@ -247,20 +270,30 @@ extension AddressLabelByIndex on IsarCollection { return putByIndex(r'addressString_walletId', object); } - Id putByAddressStringWalletIdSync(AddressLabel object, - {bool saveLinks = true}) { - return putByIndexSync(r'addressString_walletId', object, - saveLinks: saveLinks); + Id putByAddressStringWalletIdSync( + AddressLabel object, { + bool saveLinks = true, + }) { + return putByIndexSync( + r'addressString_walletId', + object, + saveLinks: saveLinks, + ); } Future> putAllByAddressStringWalletId(List objects) { return putAllByIndex(r'addressString_walletId', objects); } - List putAllByAddressStringWalletIdSync(List objects, - {bool saveLinks = true}) { - return putAllByIndexSync(r'addressString_walletId', objects, - saveLinks: saveLinks); + List putAllByAddressStringWalletIdSync( + List objects, { + bool saveLinks = true, + }) { + return putAllByIndexSync( + r'addressString_walletId', + objects, + saveLinks: saveLinks, + ); } } @@ -277,15 +310,13 @@ extension AddressLabelQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -308,8 +339,9 @@ extension AddressLabelQueryWhere } QueryBuilder idGreaterThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -317,8 +349,10 @@ extension AddressLabelQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -333,147 +367,179 @@ extension AddressLabelQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - addressStringEqualToAnyWalletId(String addressString) { + addressStringEqualToAnyWalletId(String addressString) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'addressString_walletId', - value: [addressString], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'addressString_walletId', + value: [addressString], + ), + ); }); } QueryBuilder - addressStringNotEqualToAnyWalletId(String addressString) { + addressStringNotEqualToAnyWalletId(String addressString) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [], - upper: [addressString], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [], + upper: [addressString], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [], - upper: [addressString], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [], + upper: [addressString], + includeUpper: false, + ), + ); } }); } QueryBuilder - addressStringWalletIdEqualTo(String addressString, String walletId) { + addressStringWalletIdEqualTo(String addressString, String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'addressString_walletId', - value: [addressString, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'addressString_walletId', + value: [addressString, walletId], + ), + ); }); } QueryBuilder - addressStringEqualToWalletIdNotEqualTo( - String addressString, String walletId) { + addressStringEqualToWalletIdNotEqualTo( + String addressString, + String walletId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString], - upper: [addressString, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString, walletId], - includeLower: false, - upper: [addressString], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString], + upper: [addressString, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString, walletId], + includeLower: false, + upper: [addressString], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString, walletId], - includeLower: false, - upper: [addressString], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'addressString_walletId', - lower: [addressString], - upper: [addressString, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString, walletId], + includeLower: false, + upper: [addressString], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'addressString_walletId', + lower: [addressString], + upper: [addressString, walletId], + includeUpper: false, + ), + ); } }); } @@ -482,53 +548,56 @@ extension AddressLabelQueryWhere extension AddressLabelQueryFilter on QueryBuilder { QueryBuilder - addressStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + addressStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringGreaterThan( + addressStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringLessThan( + addressStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringBetween( + addressStringBetween( String lower, String upper, { bool includeLower = true, @@ -536,94 +605,96 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'addressString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'addressString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + addressStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + addressStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringContains(String value, {bool caseSensitive = true}) { + addressStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'addressString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'addressString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringMatches(String pattern, {bool caseSensitive = true}) { + addressStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'addressString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'addressString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStringIsEmpty() { + addressStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addressString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'addressString', value: ''), + ); }); } QueryBuilder - addressStringIsNotEmpty() { + addressStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'addressString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'addressString', value: ''), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -632,11 +703,13 @@ extension AddressLabelQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -645,11 +718,13 @@ extension AddressLabelQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -660,81 +735,86 @@ extension AddressLabelQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder tagsIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'tags', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'tags'), + ); }); } QueryBuilder - tagsIsNotNull() { + tagsIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'tags', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'tags'), + ); }); } QueryBuilder - tagsElementEqualTo( - String value, { - bool caseSensitive = true, - }) { + tagsElementEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementGreaterThan( + tagsElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementLessThan( + tagsElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementBetween( + tagsElementBetween( String lower, String upper, { bool includeLower = true, @@ -742,160 +822,126 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tags', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tags', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementStartsWith( - String value, { - bool caseSensitive = true, - }) { + tagsElementStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementEndsWith( - String value, { - bool caseSensitive = true, - }) { + tagsElementEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementContains(String value, {bool caseSensitive = true}) { + tagsElementContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'tags', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementMatches(String pattern, {bool caseSensitive = true}) { + tagsElementMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'tags', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'tags', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tagsElementIsEmpty() { + tagsElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tags', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tags', value: ''), + ); }); } QueryBuilder - tagsElementIsNotEmpty() { + tagsElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'tags', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'tags', value: ''), + ); }); } QueryBuilder - tagsLengthEqualTo(int length) { + tagsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tags', - length, - true, - length, - true, - ); + return query.listLength(r'tags', length, true, length, true); }); } QueryBuilder - tagsIsEmpty() { + tagsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tags', - 0, - true, - 0, - true, - ); + return query.listLength(r'tags', 0, true, 0, true); }); } QueryBuilder - tagsIsNotEmpty() { + tagsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tags', - 0, - false, - 999999, - true, - ); + return query.listLength(r'tags', 0, false, 999999, true); }); } QueryBuilder - tagsLengthLessThan( - int length, { - bool include = false, - }) { + tagsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tags', - 0, - true, - length, - include, - ); + return query.listLength(r'tags', 0, true, length, include); }); } QueryBuilder - tagsLengthGreaterThan( - int length, { - bool include = false, - }) { + tagsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tags', - length, - include, - 999999, - true, - ); + return query.listLength(r'tags', length, include, 999999, true); }); } QueryBuilder - tagsLengthBetween( + tagsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -917,27 +963,31 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueGreaterThan( + valueGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -947,12 +997,14 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -964,28 +1016,29 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -994,106 +1047,115 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIsEmpty() { + valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } QueryBuilder - valueIsNotEmpty() { + valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { + walletIdEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -1101,84 +1163,86 @@ extension AddressLabelQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { + walletIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -1198,7 +1262,7 @@ extension AddressLabelQuerySortBy } QueryBuilder - sortByAddressStringDesc() { + sortByAddressStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'addressString', Sort.desc); }); @@ -1238,7 +1302,7 @@ extension AddressLabelQuerySortThenBy } QueryBuilder - thenByAddressStringDesc() { + thenByAddressStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'addressString', Sort.desc); }); @@ -1283,11 +1347,14 @@ extension AddressLabelQuerySortThenBy extension AddressLabelQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByAddressString( - {bool caseSensitive = true}) { + QueryBuilder distinctByAddressString({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'addressString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'addressString', + caseSensitive: caseSensitive, + ); }); } @@ -1297,15 +1364,17 @@ extension AddressLabelQueryWhereDistinct }); } - QueryBuilder distinctByValue( - {bool caseSensitive = true}) { + QueryBuilder distinctByValue({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'value', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/block_explorer.dart b/lib/models/isar/models/block_explorer.dart index 6bde45001..ab0c1e8a1 100644 --- a/lib/models/isar/models/block_explorer.dart +++ b/lib/models/isar/models/block_explorer.dart @@ -8,7 +8,8 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../../app_config.dart'; import '../../../wallets/crypto_currency/crypto_currency.dart'; @@ -16,10 +17,7 @@ part 'block_explorer.g.dart'; @collection class TransactionBlockExplorer { - TransactionBlockExplorer({ - required this.ticker, - required this.url, - }); + TransactionBlockExplorer({required this.ticker, required this.url}); Id id = Isar.autoIncrement; @@ -37,10 +35,6 @@ class TransactionBlockExplorer { } } - Uri? getUrlFor({required String txid}) => Uri.tryParse( - url.replaceFirst( - "%5BTXID%5D", - txid, - ), - ); + Uri? getUrlFor({required String txid}) => + Uri.tryParse(url.replaceFirst("%5BTXID%5D", txid)); } diff --git a/lib/models/isar/models/block_explorer.g.dart b/lib/models/isar/models/block_explorer.g.dart index 0c4be65bc..4265524c4 100644 --- a/lib/models/isar/models/block_explorer.g.dart +++ b/lib/models/isar/models/block_explorer.g.dart @@ -18,17 +18,10 @@ const TransactionBlockExplorerSchema = CollectionSchema( name: r'TransactionBlockExplorer', id: 4209077296238413906, properties: { - r'ticker': PropertySchema( - id: 0, - name: r'ticker', - type: IsarType.string, - ), - r'url': PropertySchema( - id: 1, - name: r'url', - type: IsarType.string, - ) + r'ticker': PropertySchema(id: 0, name: r'ticker', type: IsarType.string), + r'url': PropertySchema(id: 1, name: r'url', type: IsarType.string), }, + estimateSize: _transactionBlockExplorerEstimateSize, serialize: _transactionBlockExplorerSerialize, deserialize: _transactionBlockExplorerDeserialize, @@ -45,16 +38,17 @@ const TransactionBlockExplorerSchema = CollectionSchema( name: r'ticker', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _transactionBlockExplorerGetId, getLinks: _transactionBlockExplorerGetLinks, attach: _transactionBlockExplorerAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _transactionBlockExplorerEstimateSize( @@ -113,12 +107,16 @@ Id _transactionBlockExplorerGetId(TransactionBlockExplorer object) { } List> _transactionBlockExplorerGetLinks( - TransactionBlockExplorer object) { + TransactionBlockExplorer object, +) { return []; } void _transactionBlockExplorerAttach( - IsarCollection col, Id id, TransactionBlockExplorer object) { + IsarCollection col, + Id id, + TransactionBlockExplorer object, +) { object.id = id; } @@ -141,13 +139,15 @@ extension TransactionBlockExplorerByIndex } Future> getAllByTicker( - List tickerValues) { + List tickerValues, + ) { final values = tickerValues.map((e) => [e]).toList(); return getAllByIndex(r'ticker', values); } List getAllByTickerSync( - List tickerValues) { + List tickerValues, + ) { final values = tickerValues.map((e) => [e]).toList(); return getAllByIndexSync(r'ticker', values); } @@ -174,36 +174,53 @@ extension TransactionBlockExplorerByIndex return putAllByIndex(r'ticker', objects); } - List putAllByTickerSync(List objects, - {bool saveLinks = true}) { + List putAllByTickerSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'ticker', objects, saveLinks: saveLinks); } } -extension TransactionBlockExplorerQueryWhereSort on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QWhere> { +extension TransactionBlockExplorerQueryWhereSort + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QWhere + > { QueryBuilder - anyId() { + anyId() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(const IdWhereClause.any()); }); } } -extension TransactionBlockExplorerQueryWhere on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QWhereClause> { - QueryBuilder idEqualTo(Id id) { +extension TransactionBlockExplorerQueryWhere + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QWhereClause + > { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } - QueryBuilder idNotEqualTo(Id id) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + idNotEqualTo(Id id) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -225,8 +242,12 @@ extension TransactionBlockExplorerQueryWhere on QueryBuilder< }); } - QueryBuilder idGreaterThan(Id id, {bool include = false}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -234,8 +255,12 @@ extension TransactionBlockExplorerQueryWhere on QueryBuilder< }); } - QueryBuilder idLessThan(Id id, {bool include = false}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + idLessThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -243,175 +268,235 @@ extension TransactionBlockExplorerQueryWhere on QueryBuilder< }); } - QueryBuilder idBetween( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + idBetween( Id lowerId, Id upperId, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } - QueryBuilder tickerEqualTo(String ticker) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + tickerEqualTo(String ticker) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'ticker', - value: [ticker], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'ticker', value: [ticker]), + ); }); } - QueryBuilder tickerNotEqualTo(String ticker) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterWhereClause + > + tickerNotEqualTo(String ticker) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker', - lower: [], - upper: [ticker], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker', - lower: [ticker], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker', + lower: [], + upper: [ticker], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker', + lower: [ticker], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker', - lower: [ticker], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'ticker', - lower: [], - upper: [ticker], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker', + lower: [ticker], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'ticker', + lower: [], + upper: [ticker], + includeUpper: false, + ), + ); } }); } } -extension TransactionBlockExplorerQueryFilter on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QFilterCondition> { - QueryBuilder idEqualTo(Id value) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); +extension TransactionBlockExplorerQueryFilter + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QFilterCondition + > { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + idEqualTo(Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } - QueryBuilder idGreaterThan( - Id value, { - bool include = false, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } - QueryBuilder idLessThan( - Id value, { - bool include = false, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + idLessThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } - QueryBuilder idBetween( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + idBetween( Id lower, Id upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } - QueryBuilder tickerEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerGreaterThan( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerLessThan( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerBetween( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerBetween( String lower, String upper, { bool includeLower = true, @@ -419,137 +504,176 @@ extension TransactionBlockExplorerQueryFilter on QueryBuilder< bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ticker', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ticker', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerStartsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - tickerContains(String value, {bool caseSensitive = true}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'ticker', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'ticker', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - tickerMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'ticker', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'ticker', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder tickerIsEmpty() { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ticker', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ticker', value: ''), + ); }); } - QueryBuilder tickerIsNotEmpty() { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + tickerIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'ticker', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'ticker', value: ''), + ); }); } - QueryBuilder urlEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlGreaterThan( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlLessThan( - String value, { - bool include = false, - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlLessThan(String value, {bool include = false, bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlBetween( + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlBetween( String lower, String upper, { bool includeLower = true, @@ -557,191 +681,245 @@ extension TransactionBlockExplorerQueryFilter on QueryBuilder< bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'url', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'url', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlStartsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - urlContains(String value, {bool caseSensitive = true}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'url', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'url', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - urlMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'url', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'url', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder urlIsEmpty() { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'url', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'url', value: ''), + ); }); } - QueryBuilder urlIsNotEmpty() { + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QAfterFilterCondition + > + urlIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'url', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'url', value: ''), + ); }); } } -extension TransactionBlockExplorerQueryObject on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QFilterCondition> {} - -extension TransactionBlockExplorerQueryLinks on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QFilterCondition> {} - -extension TransactionBlockExplorerQuerySortBy on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QSortBy> { +extension TransactionBlockExplorerQueryObject + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QFilterCondition + > {} + +extension TransactionBlockExplorerQueryLinks + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QFilterCondition + > {} + +extension TransactionBlockExplorerQuerySortBy + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QSortBy + > { QueryBuilder - sortByTicker() { + sortByTicker() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ticker', Sort.asc); }); } QueryBuilder - sortByTickerDesc() { + sortByTickerDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ticker', Sort.desc); }); } QueryBuilder - sortByUrl() { + sortByUrl() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'url', Sort.asc); }); } QueryBuilder - sortByUrlDesc() { + sortByUrlDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'url', Sort.desc); }); } } -extension TransactionBlockExplorerQuerySortThenBy on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QSortThenBy> { +extension TransactionBlockExplorerQuerySortThenBy + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QSortThenBy + > { QueryBuilder - thenById() { + thenById() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.asc); }); } QueryBuilder - thenByIdDesc() { + thenByIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.desc); }); } QueryBuilder - thenByTicker() { + thenByTicker() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ticker', Sort.asc); }); } QueryBuilder - thenByTickerDesc() { + thenByTickerDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ticker', Sort.desc); }); } QueryBuilder - thenByUrl() { + thenByUrl() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'url', Sort.asc); }); } QueryBuilder - thenByUrlDesc() { + thenByUrlDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'url', Sort.desc); }); } } -extension TransactionBlockExplorerQueryWhereDistinct on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QDistinct> { +extension TransactionBlockExplorerQueryWhereDistinct + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QDistinct + > { QueryBuilder - distinctByTicker({bool caseSensitive = true}) { + distinctByTicker({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'ticker', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByUrl({bool caseSensitive = true}) { + distinctByUrl({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'url', caseSensitive: caseSensitive); }); } } -extension TransactionBlockExplorerQueryProperty on QueryBuilder< - TransactionBlockExplorer, TransactionBlockExplorer, QQueryProperty> { +extension TransactionBlockExplorerQueryProperty + on + QueryBuilder< + TransactionBlockExplorer, + TransactionBlockExplorer, + QQueryProperty + > { QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'id'); @@ -749,14 +927,14 @@ extension TransactionBlockExplorerQueryProperty on QueryBuilder< } QueryBuilder - tickerProperty() { + tickerProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'ticker'); }); } QueryBuilder - urlProperty() { + urlProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'url'); }); diff --git a/lib/models/isar/models/blockchain_data/address.dart b/lib/models/isar/models/blockchain_data/address.dart index c1dfb3a24..3366eb52c 100644 --- a/lib/models/isar/models/blockchain_data/address.dart +++ b/lib/models/isar/models/blockchain_data/address.dart @@ -10,7 +10,7 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../exceptions/address/address_exception.dart'; import 'crypto_currency_address.dart'; diff --git a/lib/models/isar/models/blockchain_data/address.g.dart b/lib/models/isar/models/blockchain_data/address.g.dart index e3df46a6b..2878d1640 100644 --- a/lib/models/isar/models/blockchain_data/address.g.dart +++ b/lib/models/isar/models/blockchain_data/address.g.dart @@ -26,6 +26,7 @@ const AddressSchema = CollectionSchema( id: 1, name: r'derivationPath', type: IsarType.object, + target: r'DerivationPath', ), r'otherData': PropertySchema( @@ -50,11 +51,7 @@ const AddressSchema = CollectionSchema( type: IsarType.byte, enumMap: _AddresstypeEnumValueMap, ), - r'value': PropertySchema( - id: 6, - name: r'value', - type: IsarType.string, - ), + r'value': PropertySchema(id: 6, name: r'value', type: IsarType.string), r'walletId': PropertySchema( id: 7, name: r'walletId', @@ -64,8 +61,9 @@ const AddressSchema = CollectionSchema( id: 8, name: r'zSafeFrost', type: IsarType.bool, - ) + ), }, + estimateSize: _addressEstimateSize, serialize: _addressSerialize, deserialize: _addressDeserialize, @@ -82,7 +80,7 @@ const AddressSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'value_walletId': IndexSchema( @@ -100,7 +98,7 @@ const AddressSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'derivationIndex': IndexSchema( @@ -113,9 +111,9 @@ const AddressSchema = CollectionSchema( name: r'derivationIndex', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: { r'transactions': LinkSchema( @@ -123,13 +121,14 @@ const AddressSchema = CollectionSchema( name: r'transactions', target: r'Transaction', single: false, - ) + ), }, embeddedSchemas: {r'DerivationPath': DerivationPathSchema}, + getId: _addressGetId, getLinks: _addressGetLinks, attach: _addressAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _addressEstimateSize( @@ -141,9 +140,13 @@ int _addressEstimateSize( { final value = object.derivationPath; if (value != null) { - bytesCount += 3 + + bytesCount += + 3 + DerivationPathSchema.estimateSize( - value, allOffsets[DerivationPath]!, allOffsets); + value, + allOffsets[DerivationPath]!, + allOffsets, + ); } } { @@ -195,9 +198,11 @@ Address _addressDeserialize( ), otherData: reader.readStringOrNull(offsets[2]), publicKey: reader.readByteList(offsets[3]) ?? [], - subType: _AddresssubTypeValueEnumMap[reader.readByteOrNull(offsets[4])] ?? + subType: + _AddresssubTypeValueEnumMap[reader.readByteOrNull(offsets[4])] ?? AddressSubType.receiving, - type: _AddresstypeValueEnumMap[reader.readByteOrNull(offsets[5])] ?? + type: + _AddresstypeValueEnumMap[reader.readByteOrNull(offsets[5])] ?? AddressType.p2pkh, value: reader.readString(offsets[6]), walletId: reader.readString(offsets[7]), @@ -218,20 +223,23 @@ P _addressDeserializeProp

( return (reader.readLong(offset)) as P; case 1: return (reader.readObjectOrNull( - offset, - DerivationPathSchema.deserialize, - allOffsets, - )) as P; + offset, + DerivationPathSchema.deserialize, + allOffsets, + )) + as P; case 2: return (reader.readStringOrNull(offset)) as P; case 3: return (reader.readByteList(offset) ?? []) as P; case 4: return (_AddresssubTypeValueEnumMap[reader.readByteOrNull(offset)] ?? - AddressSubType.receiving) as P; + AddressSubType.receiving) + as P; case 5: return (_AddresstypeValueEnumMap[reader.readByteOrNull(offset)] ?? - AddressType.p2pkh) as P; + AddressType.p2pkh) + as P; case 6: return (reader.readString(offset)) as P; case 7: @@ -316,8 +324,12 @@ List> _addressGetLinks(Address object) { void _addressAttach(IsarCollection col, Id id, Address object) { object.id = id; - object.transactions - .attach(col, col.isar.collection(), r'transactions', id); + object.transactions.attach( + col, + col.isar.collection(), + r'transactions', + id, + ); } extension AddressByIndex on IsarCollection

{ @@ -338,10 +350,14 @@ extension AddressByIndex on IsarCollection
{ } Future> getAllByValueWalletId( - List valueValues, List walletIdValues) { + List valueValues, + List walletIdValues, + ) { final len = valueValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([valueValues[i], walletIdValues[i]]); @@ -351,10 +367,14 @@ extension AddressByIndex on IsarCollection
{ } List getAllByValueWalletIdSync( - List valueValues, List walletIdValues) { + List valueValues, + List walletIdValues, + ) { final len = valueValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([valueValues[i], walletIdValues[i]]); @@ -364,10 +384,14 @@ extension AddressByIndex on IsarCollection
{ } Future deleteAllByValueWalletId( - List valueValues, List walletIdValues) { + List valueValues, + List walletIdValues, + ) { final len = valueValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([valueValues[i], walletIdValues[i]]); @@ -377,10 +401,14 @@ extension AddressByIndex on IsarCollection
{ } int deleteAllByValueWalletIdSync( - List valueValues, List walletIdValues) { + List valueValues, + List walletIdValues, + ) { final len = valueValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([valueValues[i], walletIdValues[i]]); @@ -401,8 +429,10 @@ extension AddressByIndex on IsarCollection
{ return putAllByIndex(r'value_walletId', objects); } - List putAllByValueWalletIdSync(List
objects, - {bool saveLinks = true}) { + List putAllByValueWalletIdSync( + List
objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'value_walletId', objects, saveLinks: saveLinks); } } @@ -426,10 +456,7 @@ extension AddressQueryWhereSort on QueryBuilder { extension AddressQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -455,8 +482,10 @@ extension AddressQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -464,8 +493,10 @@ extension AddressQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -480,191 +511,235 @@ extension AddressQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder walletIdNotEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder valueEqualToAnyWalletId( - String value) { + String value, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'value_walletId', - value: [value], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'value_walletId', value: [value]), + ); }); } QueryBuilder valueNotEqualToAnyWalletId( - String value) { + String value, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [], - upper: [value], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [], + upper: [value], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [], - upper: [value], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [], + upper: [value], + includeUpper: false, + ), + ); } }); } QueryBuilder valueWalletIdEqualTo( - String value, String walletId) { + String value, + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'value_walletId', - value: [value, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'value_walletId', + value: [value, walletId], + ), + ); }); } QueryBuilder - valueEqualToWalletIdNotEqualTo(String value, String walletId) { + valueEqualToWalletIdNotEqualTo(String value, String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value], - upper: [value, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value, walletId], - includeLower: false, - upper: [value], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value], + upper: [value, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value, walletId], + includeLower: false, + upper: [value], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value, walletId], - includeLower: false, - upper: [value], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'value_walletId', - lower: [value], - upper: [value, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value, walletId], + includeLower: false, + upper: [value], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'value_walletId', + lower: [value], + upper: [value, walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder derivationIndexEqualTo( - int derivationIndex) { + int derivationIndex, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'derivationIndex', - value: [derivationIndex], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'derivationIndex', + value: [derivationIndex], + ), + ); }); } QueryBuilder derivationIndexNotEqualTo( - int derivationIndex) { + int derivationIndex, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [], - upper: [derivationIndex], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [derivationIndex], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [], + upper: [derivationIndex], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [derivationIndex], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [derivationIndex], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [], - upper: [derivationIndex], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [derivationIndex], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [], + upper: [derivationIndex], + includeUpper: false, + ), + ); } }); } @@ -674,12 +749,14 @@ extension AddressQueryWhere on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [derivationIndex], - includeLower: include, - upper: [], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [derivationIndex], + includeLower: include, + upper: [], + ), + ); }); } @@ -688,12 +765,14 @@ extension AddressQueryWhere on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [], - upper: [derivationIndex], - includeUpper: include, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [], + upper: [derivationIndex], + includeUpper: include, + ), + ); }); } @@ -704,13 +783,15 @@ extension AddressQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'derivationIndex', - lower: [lowerDerivationIndex], - includeLower: includeLower, - upper: [upperDerivationIndex], - includeUpper: includeUpper, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'derivationIndex', + lower: [lowerDerivationIndex], + includeLower: includeLower, + upper: [upperDerivationIndex], + includeUpper: includeUpper, + ), + ); }); } } @@ -718,26 +799,25 @@ extension AddressQueryWhere on QueryBuilder { extension AddressQueryFilter on QueryBuilder { QueryBuilder derivationIndexEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'derivationIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'derivationIndex', value: value), + ); }); } QueryBuilder - derivationIndexGreaterThan( - int value, { - bool include = false, - }) { + derivationIndexGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'derivationIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'derivationIndex', + value: value, + ), + ); }); } @@ -746,11 +826,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'derivationIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'derivationIndex', + value: value, + ), + ); }); } @@ -761,39 +843,40 @@ extension AddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'derivationIndex', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'derivationIndex', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder derivationPathIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'derivationPath', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'derivationPath'), + ); }); } QueryBuilder - derivationPathIsNotNull() { + derivationPathIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'derivationPath', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'derivationPath'), + ); }); } QueryBuilder idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -802,11 +885,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -815,11 +900,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -830,29 +917,31 @@ extension AddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder otherDataIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherData'), + ); }); } QueryBuilder otherDataIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherData'), + ); }); } @@ -861,11 +950,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -875,12 +966,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -890,12 +983,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -907,14 +1002,16 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherData', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherData', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -923,11 +1020,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -936,91 +1035,95 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherData', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherData', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherData', value: ''), + ); }); } QueryBuilder otherDataIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherData', value: ''), + ); }); } QueryBuilder publicKeyElementEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'publicKey', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'publicKey', value: value), + ); }); } QueryBuilder - publicKeyElementGreaterThan( - int value, { - bool include = false, - }) { + publicKeyElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'publicKey', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'publicKey', + value: value, + ), + ); }); } QueryBuilder - publicKeyElementLessThan( - int value, { - bool include = false, - }) { + publicKeyElementLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'publicKey', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'publicKey', + value: value, + ), + ); }); } @@ -1031,50 +1134,35 @@ extension AddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'publicKey', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'publicKey', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder publicKeyLengthEqualTo( - int length) { + int length, + ) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'publicKey', - length, - true, - length, - true, - ); + return query.listLength(r'publicKey', length, true, length, true); }); } QueryBuilder publicKeyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'publicKey', - 0, - true, - 0, - true, - ); + return query.listLength(r'publicKey', 0, true, 0, true); }); } QueryBuilder publicKeyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'publicKey', - 0, - false, - 999999, - true, - ); + return query.listLength(r'publicKey', 0, false, 999999, true); }); } @@ -1083,29 +1171,14 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'publicKey', - 0, - true, - length, - include, - ); + return query.listLength(r'publicKey', 0, true, length, include); }); } QueryBuilder - publicKeyLengthGreaterThan( - int length, { - bool include = false, - }) { + publicKeyLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'publicKey', - length, - include, - 999999, - true, - ); + return query.listLength(r'publicKey', length, include, 999999, true); }); } @@ -1127,12 +1200,12 @@ extension AddressQueryFilter } QueryBuilder subTypeEqualTo( - AddressSubType value) { + AddressSubType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'subType', value: value), + ); }); } @@ -1141,11 +1214,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } @@ -1154,11 +1229,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } @@ -1169,23 +1246,25 @@ extension AddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'subType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'subType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder typeEqualTo( - AddressType value) { + AddressType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'type', value: value), + ); }); } @@ -1194,11 +1273,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -1207,11 +1288,13 @@ extension AddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -1222,13 +1305,15 @@ extension AddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'type', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1237,11 +1322,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1251,12 +1338,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1266,12 +1355,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1283,14 +1374,16 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1299,11 +1392,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1312,53 +1407,59 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } QueryBuilder valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } @@ -1367,11 +1468,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1381,12 +1484,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1396,12 +1501,14 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1413,14 +1520,16 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1429,11 +1538,13 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1442,79 +1553,85 @@ extension AddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } QueryBuilder zSafeFrostIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'zSafeFrost', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'zSafeFrost'), + ); }); } QueryBuilder zSafeFrostIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'zSafeFrost', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'zSafeFrost'), + ); }); } QueryBuilder zSafeFrostEqualTo( - bool? value) { + bool? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'zSafeFrost', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'zSafeFrost', value: value), + ); }); } } @@ -1522,7 +1639,8 @@ extension AddressQueryFilter extension AddressQueryObject on QueryBuilder { QueryBuilder derivationPath( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'derivationPath'); }); @@ -1532,14 +1650,15 @@ extension AddressQueryObject extension AddressQueryLinks on QueryBuilder { QueryBuilder transactions( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.link(q, r'transactions'); }); } QueryBuilder - transactionsLengthEqualTo(int length) { + transactionsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'transactions', length, true, length, true); }); @@ -1552,34 +1671,28 @@ extension AddressQueryLinks } QueryBuilder - transactionsIsNotEmpty() { + transactionsIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'transactions', 0, false, 999999, true); }); } QueryBuilder - transactionsLengthLessThan( - int length, { - bool include = false, - }) { + transactionsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'transactions', 0, true, length, include); }); } QueryBuilder - transactionsLengthGreaterThan( - int length, { - bool include = false, - }) { + transactionsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'transactions', length, include, 999999, true); }); } QueryBuilder - transactionsLengthBetween( + transactionsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -1587,7 +1700,12 @@ extension AddressQueryLinks }) { return QueryBuilder.apply(this, (query) { return query.linkLength( - r'transactions', lower, includeLower, upper, includeUpper); + r'transactions', + lower, + includeLower, + upper, + includeUpper, + ); }); } } @@ -1785,8 +1903,9 @@ extension AddressQueryWhereDistinct }); } - QueryBuilder distinctByOtherData( - {bool caseSensitive = true}) { + QueryBuilder distinctByOtherData({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'otherData', caseSensitive: caseSensitive); }); @@ -1810,15 +1929,17 @@ extension AddressQueryWhereDistinct }); } - QueryBuilder distinctByValue( - {bool caseSensitive = true}) { + QueryBuilder distinctByValue({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'value', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -1846,7 +1967,7 @@ extension AddressQueryProperty } QueryBuilder - derivationPathProperty() { + derivationPathProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'derivationPath'); }); @@ -1906,12 +2027,9 @@ const DerivationPathSchema = Schema( name: r'DerivationPath', id: -7377061614393881103, properties: { - r'value': PropertySchema( - id: 0, - name: r'value', - type: IsarType.string, - ) + r'value': PropertySchema(id: 0, name: r'value', type: IsarType.string), }, + estimateSize: _derivationPathEstimateSize, serialize: _derivationPathSerialize, deserialize: _derivationPathDeserialize, @@ -1965,53 +2083,56 @@ P _derivationPathDeserializeProp

( extension DerivationPathQueryFilter on QueryBuilder { QueryBuilder - valueEqualTo( - String value, { - bool caseSensitive = true, - }) { + valueEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueGreaterThan( + valueGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueLessThan( + valueLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueBetween( + valueBetween( String lower, String upper, { bool includeLower = true, @@ -2019,84 +2140,86 @@ extension DerivationPathQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueEndsWith( - String value, { - bool caseSensitive = true, - }) { + valueEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueContains(String value, {bool caseSensitive = true}) { + valueContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueMatches(String pattern, {bool caseSensitive = true}) { + valueMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIsEmpty() { + valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } QueryBuilder - valueIsNotEmpty() { + valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } } diff --git a/lib/models/isar/models/blockchain_data/input.dart b/lib/models/isar/models/blockchain_data/input.dart index e816a5596..a8fbf8b15 100644 --- a/lib/models/isar/models/blockchain_data/input.dart +++ b/lib/models/isar/models/blockchain_data/input.dart @@ -10,7 +10,7 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'input.g.dart'; diff --git a/lib/models/isar/models/blockchain_data/input.g.dart b/lib/models/isar/models/blockchain_data/input.g.dart index a08dc7637..01f1e9357 100644 --- a/lib/models/isar/models/blockchain_data/input.g.dart +++ b/lib/models/isar/models/blockchain_data/input.g.dart @@ -33,27 +33,12 @@ const InputSchema = Schema( name: r'scriptSigAsm', type: IsarType.string, ), - r'sequence': PropertySchema( - id: 4, - name: r'sequence', - type: IsarType.long, - ), - r'txid': PropertySchema( - id: 5, - name: r'txid', - type: IsarType.string, - ), - r'vout': PropertySchema( - id: 6, - name: r'vout', - type: IsarType.long, - ), - r'witness': PropertySchema( - id: 7, - name: r'witness', - type: IsarType.string, - ) + r'sequence': PropertySchema(id: 4, name: r'sequence', type: IsarType.long), + r'txid': PropertySchema(id: 5, name: r'txid', type: IsarType.string), + r'vout': PropertySchema(id: 6, name: r'vout', type: IsarType.long), + r'witness': PropertySchema(id: 7, name: r'witness', type: IsarType.string), }, + estimateSize: _inputEstimateSize, serialize: _inputSerialize, deserialize: _inputDeserialize, @@ -159,20 +144,20 @@ P _inputDeserializeProp

( extension InputQueryFilter on QueryBuilder { QueryBuilder - innerRedeemScriptAsmIsNull() { + innerRedeemScriptAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'innerRedeemScriptAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'innerRedeemScriptAsm'), + ); }); } QueryBuilder - innerRedeemScriptAsmIsNotNull() { + innerRedeemScriptAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'innerRedeemScriptAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'innerRedeemScriptAsm'), + ); }); } @@ -181,43 +166,49 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmGreaterThan( + innerRedeemScriptAsmGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmLessThan( + innerRedeemScriptAsmLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -229,127 +220,133 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'innerRedeemScriptAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'innerRedeemScriptAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmStartsWith( - String value, { - bool caseSensitive = true, - }) { + innerRedeemScriptAsmStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmEndsWith( - String value, { - bool caseSensitive = true, - }) { + innerRedeemScriptAsmEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmContains(String value, {bool caseSensitive = true}) { + innerRedeemScriptAsmContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder innerRedeemScriptAsmMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'innerRedeemScriptAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'innerRedeemScriptAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmIsEmpty() { + innerRedeemScriptAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'innerRedeemScriptAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'innerRedeemScriptAsm', value: ''), + ); }); } QueryBuilder - innerRedeemScriptAsmIsNotEmpty() { + innerRedeemScriptAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'innerRedeemScriptAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'innerRedeemScriptAsm', + value: '', + ), + ); }); } QueryBuilder isCoinbaseIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'isCoinbase', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'isCoinbase'), + ); }); } QueryBuilder isCoinbaseIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'isCoinbase', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'isCoinbase'), + ); }); } QueryBuilder isCoinbaseEqualTo( - bool? value) { + bool? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isCoinbase', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isCoinbase', value: value), + ); }); } QueryBuilder scriptSigIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptSig', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptSig'), + ); }); } QueryBuilder scriptSigIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptSig', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptSig'), + ); }); } @@ -358,11 +355,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -372,12 +371,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -387,12 +388,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -404,14 +407,16 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptSig', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptSig', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -420,11 +425,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -433,69 +440,75 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptSig', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptSig', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptSig', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptSig', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSig', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptSig', value: ''), + ); }); } QueryBuilder scriptSigIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptSig', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptSig', value: ''), + ); }); } QueryBuilder scriptSigAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptSigAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptSigAsm'), + ); }); } QueryBuilder scriptSigAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptSigAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptSigAsm'), + ); }); } @@ -504,11 +517,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -518,12 +533,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -533,12 +550,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -550,14 +569,16 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptSigAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptSigAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -566,11 +587,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -579,79 +602,85 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptSigAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptSigAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptSigAsm', value: ''), + ); }); } QueryBuilder scriptSigAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptSigAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptSigAsm', value: ''), + ); }); } QueryBuilder sequenceIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'sequence', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'sequence'), + ); }); } QueryBuilder sequenceIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'sequence', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'sequence'), + ); }); } QueryBuilder sequenceEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sequence', value: value), + ); }); } @@ -660,11 +689,13 @@ extension InputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sequence', + value: value, + ), + ); }); } @@ -673,11 +704,13 @@ extension InputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sequence', + value: value, + ), + ); }); } @@ -688,13 +721,15 @@ extension InputQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sequence', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sequence', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -703,11 +738,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -717,12 +754,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -732,12 +771,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -749,14 +790,16 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -765,11 +808,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -778,60 +823,67 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder txidContains(String value, - {bool caseSensitive = true}) { + QueryBuilder txidContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder txidMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder txidMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder voutEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'vout', value: value), + ); }); } @@ -840,11 +892,13 @@ extension InputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -853,11 +907,13 @@ extension InputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -868,29 +924,31 @@ extension InputQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'vout', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'vout', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder witnessIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'witness', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'witness'), + ); }); } QueryBuilder witnessIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'witness', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'witness'), + ); }); } @@ -899,11 +957,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -913,12 +973,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -928,12 +990,14 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -945,14 +1009,16 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'witness', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'witness', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -961,11 +1027,13 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -974,53 +1042,59 @@ extension InputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'witness', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'witness', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'witness', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'witness', value: ''), + ); }); } QueryBuilder witnessIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'witness', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'witness', value: ''), + ); }); } } diff --git a/lib/models/isar/models/blockchain_data/output.dart b/lib/models/isar/models/blockchain_data/output.dart index f544e9911..f65f2687a 100644 --- a/lib/models/isar/models/blockchain_data/output.dart +++ b/lib/models/isar/models/blockchain_data/output.dart @@ -10,7 +10,7 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'output.g.dart'; diff --git a/lib/models/isar/models/blockchain_data/output.g.dart b/lib/models/isar/models/blockchain_data/output.g.dart index 6a5812373..e26963117 100644 --- a/lib/models/isar/models/blockchain_data/output.g.dart +++ b/lib/models/isar/models/blockchain_data/output.g.dart @@ -33,12 +33,9 @@ const OutputSchema = Schema( name: r'scriptPubKeyType', type: IsarType.string, ), - r'value': PropertySchema( - id: 4, - name: r'value', - type: IsarType.long, - ) + r'value': PropertySchema(id: 4, name: r'value', type: IsarType.long), }, + estimateSize: _outputEstimateSize, serialize: _outputSerialize, deserialize: _outputDeserialize, @@ -127,17 +124,17 @@ P _outputDeserializeProp

( extension OutputQueryFilter on QueryBuilder { QueryBuilder scriptPubKeyIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptPubKey', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptPubKey'), + ); }); } QueryBuilder scriptPubKeyIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptPubKey', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptPubKey'), + ); }); } @@ -146,11 +143,13 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -160,12 +159,14 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -175,12 +176,14 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -192,14 +195,16 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKey', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKey', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -208,11 +213,13 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -221,104 +228,113 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKey', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKey', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKey', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKey', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKey', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKey', value: ''), + ); }); } QueryBuilder scriptPubKeyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKey', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptPubKey', value: ''), + ); }); } QueryBuilder - scriptPubKeyAddressEqualTo( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyAddressEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressGreaterThan( + scriptPubKeyAddressGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressLessThan( + scriptPubKeyAddressLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressBetween( + scriptPubKeyAddressBetween( String lower, String upper, { bool includeLower = true, @@ -326,101 +342,106 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKeyAddress', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKeyAddress', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressStartsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyAddressStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressEndsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyAddressEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressContains(String value, {bool caseSensitive = true}) { + scriptPubKeyAddressContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKeyAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKeyAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressMatches(String pattern, {bool caseSensitive = true}) { + scriptPubKeyAddressMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKeyAddress', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKeyAddress', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAddressIsEmpty() { + scriptPubKeyAddressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKeyAddress', value: ''), + ); }); } QueryBuilder - scriptPubKeyAddressIsNotEmpty() { + scriptPubKeyAddressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKeyAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'scriptPubKeyAddress', + value: '', + ), + ); }); } QueryBuilder scriptPubKeyAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptPubKeyAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptPubKeyAsm'), + ); }); } QueryBuilder - scriptPubKeyAsmIsNotNull() { + scriptPubKeyAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptPubKeyAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptPubKeyAsm'), + ); }); } @@ -429,27 +450,31 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmGreaterThan( + scriptPubKeyAsmGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -459,12 +484,14 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -476,14 +503,16 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKeyAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKeyAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -492,11 +521,13 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -505,71 +536,77 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyAsmContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyAsmMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKeyAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKeyAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKeyAsm', value: ''), + ); }); } QueryBuilder - scriptPubKeyAsmIsNotEmpty() { + scriptPubKeyAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKeyAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptPubKeyAsm', value: ''), + ); }); } QueryBuilder scriptPubKeyTypeIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptPubKeyType', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptPubKeyType'), + ); }); } QueryBuilder - scriptPubKeyTypeIsNotNull() { + scriptPubKeyTypeIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptPubKeyType', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptPubKeyType'), + ); }); } @@ -578,27 +615,31 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyTypeGreaterThan( + scriptPubKeyTypeGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -608,12 +649,14 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -625,28 +668,29 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKeyType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKeyType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyTypeStartsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyTypeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -655,64 +699,69 @@ extension OutputQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyTypeContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKeyType', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKeyType', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptPubKeyTypeMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKeyType', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKeyType', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyTypeIsEmpty() { + scriptPubKeyTypeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyType', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKeyType', value: ''), + ); }); } QueryBuilder - scriptPubKeyTypeIsNotEmpty() { + scriptPubKeyTypeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKeyType', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptPubKeyType', value: ''), + ); }); } QueryBuilder valueEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: value), + ); }); } @@ -721,11 +770,13 @@ extension OutputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + ), + ); }); } @@ -734,11 +785,13 @@ extension OutputQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + ), + ); }); } @@ -749,13 +802,15 @@ extension OutputQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } } diff --git a/lib/models/isar/models/blockchain_data/transaction.dart b/lib/models/isar/models/blockchain_data/transaction.dart index 417856079..3e43ffb21 100644 --- a/lib/models/isar/models/blockchain_data/transaction.dart +++ b/lib/models/isar/models/blockchain_data/transaction.dart @@ -11,7 +11,7 @@ import 'dart:convert'; import 'dart:math'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../../utilities/amount/amount.dart'; diff --git a/lib/models/isar/models/blockchain_data/transaction.g.dart b/lib/models/isar/models/blockchain_data/transaction.g.dart index 3d9a3d409..aa41d834b 100644 --- a/lib/models/isar/models/blockchain_data/transaction.g.dart +++ b/lib/models/isar/models/blockchain_data/transaction.g.dart @@ -17,30 +17,19 @@ const TransactionSchema = CollectionSchema( name: r'Transaction', id: 5320225499417954855, properties: { - r'amount': PropertySchema( - id: 0, - name: r'amount', - type: IsarType.long, - ), + r'amount': PropertySchema(id: 0, name: r'amount', type: IsarType.long), r'amountString': PropertySchema( id: 1, name: r'amountString', type: IsarType.string, ), - r'fee': PropertySchema( - id: 2, - name: r'fee', - type: IsarType.long, - ), - r'height': PropertySchema( - id: 3, - name: r'height', - type: IsarType.long, - ), + r'fee': PropertySchema(id: 2, name: r'fee', type: IsarType.long), + r'height': PropertySchema(id: 3, name: r'height', type: IsarType.long), r'inputs': PropertySchema( id: 4, name: r'inputs', type: IsarType.objectList, + target: r'Input', ), r'isCancelled': PropertySchema( @@ -53,11 +42,7 @@ const TransactionSchema = CollectionSchema( name: r'isLelantus', type: IsarType.bool, ), - r'nonce': PropertySchema( - id: 7, - name: r'nonce', - type: IsarType.long, - ), + r'nonce': PropertySchema(id: 7, name: r'nonce', type: IsarType.long), r'numberOfMessages': PropertySchema( id: 8, name: r'numberOfMessages', @@ -72,13 +57,10 @@ const TransactionSchema = CollectionSchema( id: 10, name: r'outputs', type: IsarType.objectList, + target: r'Output', ), - r'slateId': PropertySchema( - id: 11, - name: r'slateId', - type: IsarType.string, - ), + r'slateId': PropertySchema(id: 11, name: r'slateId', type: IsarType.string), r'subType': PropertySchema( id: 12, name: r'subType', @@ -90,11 +72,7 @@ const TransactionSchema = CollectionSchema( name: r'timestamp', type: IsarType.long, ), - r'txid': PropertySchema( - id: 14, - name: r'txid', - type: IsarType.string, - ), + r'txid': PropertySchema(id: 14, name: r'txid', type: IsarType.string), r'type': PropertySchema( id: 15, name: r'type', @@ -105,8 +83,9 @@ const TransactionSchema = CollectionSchema( id: 16, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _transactionEstimateSize, serialize: _transactionSerialize, deserialize: _transactionDeserialize, @@ -123,7 +102,7 @@ const TransactionSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'txid_walletId': IndexSchema( @@ -141,7 +120,7 @@ const TransactionSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'timestamp': IndexSchema( @@ -154,9 +133,9 @@ const TransactionSchema = CollectionSchema( name: r'timestamp', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: { r'address': LinkSchema( @@ -165,13 +144,14 @@ const TransactionSchema = CollectionSchema( target: r'Address', single: true, linkName: r'transactions', - ) + ), }, embeddedSchemas: {r'Input': InputSchema, r'Output': OutputSchema}, + getId: _transactionGetId, getLinks: _transactionGetLinks, attach: _transactionAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _transactionEstimateSize( @@ -265,7 +245,8 @@ Transaction _transactionDeserialize( amountString: reader.readStringOrNull(offsets[1]), fee: reader.readLong(offsets[2]), height: reader.readLongOrNull(offsets[3]), - inputs: reader.readObjectList( + inputs: + reader.readObjectList( offsets[4], InputSchema.deserialize, allOffsets, @@ -277,7 +258,8 @@ Transaction _transactionDeserialize( nonce: reader.readLongOrNull(offsets[7]), numberOfMessages: reader.readLongOrNull(offsets[8]), otherData: reader.readStringOrNull(offsets[9]), - outputs: reader.readObjectList( + outputs: + reader.readObjectList( offsets[10], OutputSchema.deserialize, allOffsets, @@ -287,10 +269,11 @@ Transaction _transactionDeserialize( slateId: reader.readStringOrNull(offsets[11]), subType: _TransactionsubTypeValueEnumMap[reader.readByteOrNull(offsets[12])] ?? - TransactionSubType.none, + TransactionSubType.none, timestamp: reader.readLong(offsets[13]), txid: reader.readString(offsets[14]), - type: _TransactiontypeValueEnumMap[reader.readByteOrNull(offsets[15])] ?? + type: + _TransactiontypeValueEnumMap[reader.readByteOrNull(offsets[15])] ?? TransactionType.outgoing, walletId: reader.readString(offsets[16]), ); @@ -315,12 +298,13 @@ P _transactionDeserializeProp

( return (reader.readLongOrNull(offset)) as P; case 4: return (reader.readObjectList( - offset, - InputSchema.deserialize, - allOffsets, - Input(), - ) ?? - []) as P; + offset, + InputSchema.deserialize, + allOffsets, + Input(), + ) ?? + []) + as P; case 5: return (reader.readBool(offset)) as P; case 6: @@ -333,24 +317,27 @@ P _transactionDeserializeProp

( return (reader.readStringOrNull(offset)) as P; case 10: return (reader.readObjectList( - offset, - OutputSchema.deserialize, - allOffsets, - Output(), - ) ?? - []) as P; + offset, + OutputSchema.deserialize, + allOffsets, + Output(), + ) ?? + []) + as P; case 11: return (reader.readStringOrNull(offset)) as P; case 12: return (_TransactionsubTypeValueEnumMap[reader.readByteOrNull(offset)] ?? - TransactionSubType.none) as P; + TransactionSubType.none) + as P; case 13: return (reader.readLong(offset)) as P; case 14: return (reader.readString(offset)) as P; case 15: return (_TransactiontypeValueEnumMap[reader.readByteOrNull(offset)] ?? - TransactionType.outgoing) as P; + TransactionType.outgoing) + as P; case 16: return (reader.readString(offset)) as P; default: @@ -404,7 +391,10 @@ List> _transactionGetLinks(Transaction object) { } void _transactionAttach( - IsarCollection col, Id id, Transaction object) { + IsarCollection col, + Id id, + Transaction object, +) { object.id = id; object.address.attach(col, col.isar.collection

(), r'address', id); } @@ -427,10 +417,14 @@ extension TransactionByIndex on IsarCollection { } Future> getAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -440,10 +434,14 @@ extension TransactionByIndex on IsarCollection { } List getAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -453,10 +451,14 @@ extension TransactionByIndex on IsarCollection { } Future deleteAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -466,10 +468,14 @@ extension TransactionByIndex on IsarCollection { } int deleteAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -490,8 +496,10 @@ extension TransactionByIndex on IsarCollection { return putAllByIndex(r'txid_walletId', objects); } - List putAllByTxidWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByTxidWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'txid_walletId', objects, saveLinks: saveLinks); } } @@ -517,15 +525,13 @@ extension TransactionQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -547,8 +553,10 @@ extension TransactionQueryWhere }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -556,8 +564,10 @@ extension TransactionQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -572,207 +582,245 @@ extension TransactionQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder walletIdNotEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidEqualToAnyWalletId(String txid) { + txidEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'txid_walletId', value: [txid]), + ); }); } QueryBuilder - txidNotEqualToAnyWalletId(String txid) { + txidNotEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ); } }); } QueryBuilder txidWalletIdEqualTo( - String txid, String walletId) { + String txid, + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId', + value: [txid, walletId], + ), + ); }); } QueryBuilder - txidEqualToWalletIdNotEqualTo(String txid, String walletId) { + txidEqualToWalletIdNotEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder timestampEqualTo( - int timestamp) { + int timestamp, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'timestamp', - value: [timestamp], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'timestamp', value: [timestamp]), + ); }); } QueryBuilder timestampNotEqualTo( - int timestamp) { + int timestamp, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: false, + ), + ); } }); } QueryBuilder - timestampGreaterThan( - int timestamp, { - bool include = false, - }) { + timestampGreaterThan(int timestamp, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: include, - upper: [], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: include, + upper: [], + ), + ); }); } @@ -781,12 +829,14 @@ extension TransactionQueryWhere bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: include, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: include, + ), + ); }); } @@ -797,13 +847,15 @@ extension TransactionQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [lowerTimestamp], - includeLower: includeLower, - upper: [upperTimestamp], - includeUpper: includeUpper, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [lowerTimestamp], + includeLower: includeLower, + upper: [upperTimestamp], + includeUpper: includeUpper, + ), + ); }); } } @@ -811,26 +863,25 @@ extension TransactionQueryWhere extension TransactionQueryFilter on QueryBuilder { QueryBuilder amountEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'amount', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'amount', value: value), + ); }); } QueryBuilder - amountGreaterThan( - int value, { - bool include = false, - }) { + amountGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'amount', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'amount', + value: value, + ), + ); }); } @@ -839,11 +890,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'amount', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'amount', + value: value, + ), + ); }); } @@ -854,82 +907,87 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'amount', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'amount', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - amountStringIsNull() { + amountStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'amountString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'amountString'), + ); }); } QueryBuilder - amountStringIsNotNull() { + amountStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'amountString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'amountString'), + ); }); } QueryBuilder - amountStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + amountStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringGreaterThan( + amountStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringLessThan( + amountStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringBetween( + amountStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -937,94 +995,96 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'amountString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'amountString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + amountStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + amountStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringContains(String value, {bool caseSensitive = true}) { + amountStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'amountString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'amountString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringMatches(String pattern, {bool caseSensitive = true}) { + amountStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'amountString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'amountString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - amountStringIsEmpty() { + amountStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'amountString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'amountString', value: ''), + ); }); } QueryBuilder - amountStringIsNotEmpty() { + amountStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'amountString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'amountString', value: ''), + ); }); } QueryBuilder feeEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'fee', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'fee', value: value), + ); }); } @@ -1033,11 +1093,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'fee', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'fee', + value: value, + ), + ); }); } @@ -1046,11 +1108,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'fee', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'fee', + value: value, + ), + ); }); } @@ -1061,54 +1125,55 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'fee', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'fee', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder heightIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'height'), + ); }); } QueryBuilder - heightIsNotNull() { + heightIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'height'), + ); }); } QueryBuilder heightEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'height', value: value), + ); }); } QueryBuilder - heightGreaterThan( - int? value, { - bool include = false, - }) { + heightGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'height', + value: value, + ), + ); }); } @@ -1117,11 +1182,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'height', + value: value, + ), + ); }); } @@ -1132,23 +1199,25 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'height', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'height', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -1157,11 +1226,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1170,11 +1241,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1185,89 +1258,55 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - inputsLengthEqualTo(int length) { + inputsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - length, - true, - length, - true, - ); + return query.listLength(r'inputs', length, true, length, true); }); } QueryBuilder - inputsIsEmpty() { + inputsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - true, - 0, - true, - ); + return query.listLength(r'inputs', 0, true, 0, true); }); } QueryBuilder - inputsIsNotEmpty() { + inputsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - false, - 999999, - true, - ); + return query.listLength(r'inputs', 0, false, 999999, true); }); } QueryBuilder - inputsLengthLessThan( - int length, { - bool include = false, - }) { + inputsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - true, - length, - include, - ); + return query.listLength(r'inputs', 0, true, length, include); }); } QueryBuilder - inputsLengthGreaterThan( - int length, { - bool include = false, - }) { + inputsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - length, - include, - 999999, - true, - ); + return query.listLength(r'inputs', length, include, 999999, true); }); } QueryBuilder - inputsLengthBetween( + inputsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -1285,81 +1324,78 @@ extension TransactionQueryFilter } QueryBuilder - isCancelledEqualTo(bool value) { + isCancelledEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isCancelled', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isCancelled', value: value), + ); }); } QueryBuilder - isLelantusIsNull() { + isLelantusIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'isLelantus', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'isLelantus'), + ); }); } QueryBuilder - isLelantusIsNotNull() { + isLelantusIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'isLelantus', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'isLelantus'), + ); }); } QueryBuilder - isLelantusEqualTo(bool? value) { + isLelantusEqualTo(bool? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isLelantus', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isLelantus', value: value), + ); }); } QueryBuilder nonceIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'nonce'), + ); }); } QueryBuilder - nonceIsNotNull() { + nonceIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'nonce'), + ); }); } QueryBuilder nonceEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'nonce', value: value), + ); }); } QueryBuilder - nonceGreaterThan( - int? value, { - bool include = false, - }) { + nonceGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } @@ -1368,11 +1404,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } @@ -1383,156 +1421,160 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'nonce', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'nonce', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - numberOfMessagesIsNull() { + numberOfMessagesIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'numberOfMessages', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'numberOfMessages'), + ); }); } QueryBuilder - numberOfMessagesIsNotNull() { + numberOfMessagesIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'numberOfMessages', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'numberOfMessages'), + ); }); } QueryBuilder - numberOfMessagesEqualTo(int? value) { + numberOfMessagesEqualTo(int? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'numberOfMessages', value: value), + ); }); } QueryBuilder - numberOfMessagesGreaterThan( - int? value, { - bool include = false, - }) { + numberOfMessagesGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numberOfMessages', + value: value, + ), + ); }); } QueryBuilder - numberOfMessagesLessThan( - int? value, { - bool include = false, - }) { + numberOfMessagesLessThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numberOfMessages', + value: value, + ), + ); }); } QueryBuilder - numberOfMessagesBetween( + numberOfMessagesBetween( int? lower, int? upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numberOfMessages', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numberOfMessages', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - otherDataIsNull() { + otherDataIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherData'), + ); }); } QueryBuilder - otherDataIsNotNull() { + otherDataIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherData'), + ); }); } QueryBuilder - otherDataEqualTo( - String? value, { - bool caseSensitive = true, - }) { + otherDataEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataGreaterThan( + otherDataGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataLessThan( + otherDataLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataBetween( + otherDataBetween( String? lower, String? upper, { bool includeLower = true, @@ -1540,160 +1582,126 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherData', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherData', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataStartsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataEndsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataContains(String value, {bool caseSensitive = true}) { + otherDataContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataMatches(String pattern, {bool caseSensitive = true}) { + otherDataMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherData', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherData', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataIsEmpty() { + otherDataIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherData', value: ''), + ); }); } QueryBuilder - otherDataIsNotEmpty() { + otherDataIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherData', value: ''), + ); }); } QueryBuilder - outputsLengthEqualTo(int length) { + outputsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - length, - true, - length, - true, - ); + return query.listLength(r'outputs', length, true, length, true); }); } QueryBuilder - outputsIsEmpty() { + outputsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - true, - 0, - true, - ); + return query.listLength(r'outputs', 0, true, 0, true); }); } QueryBuilder - outputsIsNotEmpty() { + outputsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - false, - 999999, - true, - ); + return query.listLength(r'outputs', 0, false, 999999, true); }); } QueryBuilder - outputsLengthLessThan( - int length, { - bool include = false, - }) { + outputsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - true, - length, - include, - ); + return query.listLength(r'outputs', 0, true, length, include); }); } QueryBuilder - outputsLengthGreaterThan( - int length, { - bool include = false, - }) { + outputsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - length, - include, - 999999, - true, - ); + return query.listLength(r'outputs', length, include, 999999, true); }); } QueryBuilder - outputsLengthBetween( + outputsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -1711,20 +1719,20 @@ extension TransactionQueryFilter } QueryBuilder - slateIdIsNull() { + slateIdIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'slateId', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'slateId'), + ); }); } QueryBuilder - slateIdIsNotNull() { + slateIdIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'slateId', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'slateId'), + ); }); } @@ -1733,27 +1741,31 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdGreaterThan( + slateIdGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1763,12 +1775,14 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1780,28 +1794,29 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'slateId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'slateId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + slateIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1810,79 +1825,84 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder slateIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder slateIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'slateId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'slateId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdIsEmpty() { + slateIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'slateId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'slateId', value: ''), + ); }); } QueryBuilder - slateIdIsNotEmpty() { + slateIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'slateId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'slateId', value: ''), + ); }); } QueryBuilder subTypeEqualTo( - TransactionSubType value) { + TransactionSubType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'subType', value: value), + ); }); } QueryBuilder - subTypeGreaterThan( - TransactionSubType value, { - bool include = false, - }) { + subTypeGreaterThan(TransactionSubType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } @@ -1891,11 +1911,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } @@ -1906,69 +1928,70 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'subType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'subType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - timestampEqualTo(int value) { + timestampEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'timestamp', value: value), + ); }); } QueryBuilder - timestampGreaterThan( - int value, { - bool include = false, - }) { + timestampGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'timestamp', + value: value, + ), + ); }); } QueryBuilder - timestampLessThan( - int value, { - bool include = false, - }) { + timestampLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'timestamp', + value: value, + ), + ); }); } QueryBuilder - timestampBetween( + timestampBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'timestamp', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'timestamp', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1977,11 +2000,13 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1991,12 +2016,14 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2006,12 +2033,14 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2023,14 +2052,16 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2039,11 +2070,13 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2052,64 +2085,70 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder - txidIsNotEmpty() { + txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder typeEqualTo( - TransactionType value) { + TransactionType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'type', value: value), + ); }); } @@ -2118,11 +2157,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -2131,11 +2172,13 @@ extension TransactionQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -2146,13 +2189,15 @@ extension TransactionQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'type', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -2161,43 +2206,49 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2209,85 +2260,88 @@ extension TransactionQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -2295,14 +2349,16 @@ extension TransactionQueryFilter extension TransactionQueryObject on QueryBuilder { QueryBuilder inputsElement( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'inputs'); }); } QueryBuilder outputsElement( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'outputs'); }); @@ -2312,14 +2368,15 @@ extension TransactionQueryObject extension TransactionQueryLinks on QueryBuilder { QueryBuilder address( - FilterQuery
q) { + FilterQuery
q, + ) { return QueryBuilder.apply(this, (query) { return query.link(q, r'address'); }); } QueryBuilder - addressIsNull() { + addressIsNull() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'address', 0, true, 0, true); }); @@ -2347,7 +2404,7 @@ extension TransactionQuerySortBy } QueryBuilder - sortByAmountStringDesc() { + sortByAmountStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'amountString', Sort.desc); }); @@ -2414,14 +2471,14 @@ extension TransactionQuerySortBy } QueryBuilder - sortByNumberOfMessages() { + sortByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.asc); }); } QueryBuilder - sortByNumberOfMessagesDesc() { + sortByNumberOfMessagesDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.desc); }); @@ -2533,7 +2590,7 @@ extension TransactionQuerySortThenBy } QueryBuilder - thenByAmountStringDesc() { + thenByAmountStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'amountString', Sort.desc); }); @@ -2612,14 +2669,14 @@ extension TransactionQuerySortThenBy } QueryBuilder - thenByNumberOfMessages() { + thenByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.asc); }); } QueryBuilder - thenByNumberOfMessagesDesc() { + thenByNumberOfMessagesDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.desc); }); @@ -2718,8 +2775,9 @@ extension TransactionQueryWhereDistinct }); } - QueryBuilder distinctByAmountString( - {bool caseSensitive = true}) { + QueryBuilder distinctByAmountString({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'amountString', caseSensitive: caseSensitive); }); @@ -2756,21 +2814,23 @@ extension TransactionQueryWhereDistinct } QueryBuilder - distinctByNumberOfMessages() { + distinctByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numberOfMessages'); }); } - QueryBuilder distinctByOtherData( - {bool caseSensitive = true}) { + QueryBuilder distinctByOtherData({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'otherData', caseSensitive: caseSensitive); }); } - QueryBuilder distinctBySlateId( - {bool caseSensitive = true}) { + QueryBuilder distinctBySlateId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'slateId', caseSensitive: caseSensitive); }); @@ -2788,8 +2848,9 @@ extension TransactionQueryWhereDistinct }); } - QueryBuilder distinctByTxid( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxid({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txid', caseSensitive: caseSensitive); }); @@ -2801,8 +2862,9 @@ extension TransactionQueryWhereDistinct }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -2890,7 +2952,7 @@ extension TransactionQueryProperty } QueryBuilder - subTypeProperty() { + subTypeProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'subType'); }); diff --git a/lib/models/isar/models/blockchain_data/utxo.dart b/lib/models/isar/models/blockchain_data/utxo.dart index 57f9ede64..f417b4cdf 100644 --- a/lib/models/isar/models/blockchain_data/utxo.dart +++ b/lib/models/isar/models/blockchain_data/utxo.dart @@ -11,7 +11,7 @@ import 'dart:convert'; import 'dart:math'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'utxo.g.dart'; @@ -42,10 +42,7 @@ class UTXO { @Index( unique: true, replace: true, - composite: [ - CompositeIndex("walletId"), - CompositeIndex("vout"), - ], + composite: [CompositeIndex("walletId"), CompositeIndex("vout")], ) late final String txid; @@ -132,26 +129,26 @@ class UTXO { String? address, bool? used, String? otherData, - }) => - UTXO( - walletId: walletId ?? this.walletId, - txid: txid ?? this.txid, - vout: vout ?? this.vout, - value: value ?? this.value, - name: name ?? this.name, - isBlocked: isBlocked ?? this.isBlocked, - blockedReason: blockedReason ?? this.blockedReason, - isCoinbase: isCoinbase ?? this.isCoinbase, - blockHash: blockHash ?? this.blockHash, - blockHeight: blockHeight ?? this.blockHeight, - blockTime: blockTime ?? this.blockTime, - address: address ?? this.address, - used: used ?? this.used, - otherData: otherData ?? this.otherData, - )..id = id ?? this.id; + }) => UTXO( + walletId: walletId ?? this.walletId, + txid: txid ?? this.txid, + vout: vout ?? this.vout, + value: value ?? this.value, + name: name ?? this.name, + isBlocked: isBlocked ?? this.isBlocked, + blockedReason: blockedReason ?? this.blockedReason, + isCoinbase: isCoinbase ?? this.isCoinbase, + blockHash: blockHash ?? this.blockHash, + blockHeight: blockHeight ?? this.blockHeight, + blockTime: blockTime ?? this.blockTime, + address: address ?? this.address, + used: used ?? this.used, + otherData: otherData ?? this.otherData, + )..id = id ?? this.id; @override - String toString() => "{ " + String toString() => + "{ " "id: $id, " "walletId: $walletId, " "txid: $txid, " diff --git a/lib/models/isar/models/blockchain_data/utxo.g.dart b/lib/models/isar/models/blockchain_data/utxo.g.dart index 0d2a0fcd7..b33804098 100644 --- a/lib/models/isar/models/blockchain_data/utxo.g.dart +++ b/lib/models/isar/models/blockchain_data/utxo.g.dart @@ -17,11 +17,7 @@ const UTXOSchema = CollectionSchema( name: r'UTXO', id: 5934032492047519621, properties: { - r'address': PropertySchema( - id: 0, - name: r'address', - type: IsarType.string, - ), + r'address': PropertySchema(id: 0, name: r'address', type: IsarType.string), r'blockHash': PropertySchema( id: 1, name: r'blockHash', @@ -52,42 +48,23 @@ const UTXOSchema = CollectionSchema( name: r'isCoinbase', type: IsarType.bool, ), - r'name': PropertySchema( - id: 7, - name: r'name', - type: IsarType.string, - ), + r'name': PropertySchema(id: 7, name: r'name', type: IsarType.string), r'otherData': PropertySchema( id: 8, name: r'otherData', type: IsarType.string, ), - r'txid': PropertySchema( - id: 9, - name: r'txid', - type: IsarType.string, - ), - r'used': PropertySchema( - id: 10, - name: r'used', - type: IsarType.bool, - ), - r'value': PropertySchema( - id: 11, - name: r'value', - type: IsarType.long, - ), - r'vout': PropertySchema( - id: 12, - name: r'vout', - type: IsarType.long, - ), + r'txid': PropertySchema(id: 9, name: r'txid', type: IsarType.string), + r'used': PropertySchema(id: 10, name: r'used', type: IsarType.bool), + r'value': PropertySchema(id: 11, name: r'value', type: IsarType.long), + r'vout': PropertySchema(id: 12, name: r'vout', type: IsarType.long), r'walletId': PropertySchema( id: 13, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _uTXOEstimateSize, serialize: _uTXOSerialize, deserialize: _uTXODeserialize, @@ -104,7 +81,7 @@ const UTXOSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'txid_walletId_vout': IndexSchema( @@ -127,7 +104,7 @@ const UTXOSchema = CollectionSchema( name: r'vout', type: IndexType.value, caseSensitive: false, - ) + ), ], ), r'isBlocked': IndexSchema( @@ -140,16 +117,17 @@ const UTXOSchema = CollectionSchema( name: r'isBlocked', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _uTXOGetId, getLinks: _uTXOGetLinks, attach: _uTXOAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _uTXOEstimateSize( @@ -298,7 +276,10 @@ extension UTXOByIndex on IsarCollection { } Future deleteByTxidWalletIdVout( - String txid, String walletId, int vout) { + String txid, + String walletId, + int vout, + ) { return deleteByIndex(r'txid_walletId_vout', [txid, walletId, vout]); } @@ -306,11 +287,16 @@ extension UTXOByIndex on IsarCollection { return deleteByIndexSync(r'txid_walletId_vout', [txid, walletId, vout]); } - Future> getAllByTxidWalletIdVout(List txidValues, - List walletIdValues, List voutValues) { + Future> getAllByTxidWalletIdVout( + List txidValues, + List walletIdValues, + List voutValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len && voutValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len && voutValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i], voutValues[i]]); @@ -319,11 +305,16 @@ extension UTXOByIndex on IsarCollection { return getAllByIndex(r'txid_walletId_vout', values); } - List getAllByTxidWalletIdVoutSync(List txidValues, - List walletIdValues, List voutValues) { + List getAllByTxidWalletIdVoutSync( + List txidValues, + List walletIdValues, + List voutValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len && voutValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len && voutValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i], voutValues[i]]); @@ -332,11 +323,16 @@ extension UTXOByIndex on IsarCollection { return getAllByIndexSync(r'txid_walletId_vout', values); } - Future deleteAllByTxidWalletIdVout(List txidValues, - List walletIdValues, List voutValues) { + Future deleteAllByTxidWalletIdVout( + List txidValues, + List walletIdValues, + List voutValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len && voutValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len && voutValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i], voutValues[i]]); @@ -345,11 +341,16 @@ extension UTXOByIndex on IsarCollection { return deleteAllByIndex(r'txid_walletId_vout', values); } - int deleteAllByTxidWalletIdVoutSync(List txidValues, - List walletIdValues, List voutValues) { + int deleteAllByTxidWalletIdVoutSync( + List txidValues, + List walletIdValues, + List voutValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len && voutValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len && voutValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i], voutValues[i]]); @@ -370,10 +371,15 @@ extension UTXOByIndex on IsarCollection { return putAllByIndex(r'txid_walletId_vout', objects); } - List putAllByTxidWalletIdVoutSync(List objects, - {bool saveLinks = true}) { - return putAllByIndexSync(r'txid_walletId_vout', objects, - saveLinks: saveLinks); + List putAllByTxidWalletIdVoutSync( + List objects, { + bool saveLinks = true, + }) { + return putAllByIndexSync( + r'txid_walletId_vout', + objects, + saveLinks: saveLinks, + ); } } @@ -396,10 +402,7 @@ extension UTXOQueryWhereSort on QueryBuilder { extension UTXOQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -425,8 +428,10 @@ extension UTXOQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -434,8 +439,10 @@ extension UTXOQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -450,208 +457,260 @@ extension UTXOQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder walletIdNotEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder txidEqualToAnyWalletIdVout( - String txid) { + String txid, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId_vout', - value: [txid], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId_vout', + value: [txid], + ), + ); }); } QueryBuilder txidNotEqualToAnyWalletIdVout( - String txid) { + String txid, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [], - upper: [txid], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [], + upper: [txid], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [], - upper: [txid], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [], + upper: [txid], + includeUpper: false, + ), + ); } }); } QueryBuilder txidWalletIdEqualToAnyVout( - String txid, String walletId) { + String txid, + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId_vout', - value: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId_vout', + value: [txid, walletId], + ), + ); }); } QueryBuilder - txidEqualToWalletIdNotEqualToAnyVout(String txid, String walletId) { + txidEqualToWalletIdNotEqualToAnyVout(String txid, String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder txidWalletIdVoutEqualTo( - String txid, String walletId, int vout) { + String txid, + String walletId, + int vout, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId_vout', - value: [txid, walletId, vout], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId_vout', + value: [txid, walletId, vout], + ), + ); }); } QueryBuilder txidWalletIdEqualToVoutNotEqualTo( - String txid, String walletId, int vout) { + String txid, + String walletId, + int vout, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId], - upper: [txid, walletId, vout], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId, vout], - includeLower: false, - upper: [txid, walletId], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId], + upper: [txid, walletId, vout], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId, vout], + includeLower: false, + upper: [txid, walletId], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId, vout], - includeLower: false, - upper: [txid, walletId], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId], - upper: [txid, walletId, vout], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId, vout], + includeLower: false, + upper: [txid, walletId], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId], + upper: [txid, walletId, vout], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidWalletIdEqualToVoutGreaterThan( + txidWalletIdEqualToVoutGreaterThan( String txid, String walletId, int vout, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId, vout], - includeLower: include, - upper: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId, vout], + includeLower: include, + upper: [txid, walletId], + ), + ); }); } @@ -662,12 +721,14 @@ extension UTXOQueryWhere on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId], - upper: [txid, walletId, vout], - includeUpper: include, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId], + upper: [txid, walletId, vout], + includeUpper: include, + ), + ); }); } @@ -680,56 +741,66 @@ extension UTXOQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId_vout', - lower: [txid, walletId, lowerVout], - includeLower: includeLower, - upper: [txid, walletId, upperVout], - includeUpper: includeUpper, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId_vout', + lower: [txid, walletId, lowerVout], + includeLower: includeLower, + upper: [txid, walletId, upperVout], + includeUpper: includeUpper, + ), + ); }); } QueryBuilder isBlockedEqualTo(bool isBlocked) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'isBlocked', - value: [isBlocked], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'isBlocked', value: [isBlocked]), + ); }); } QueryBuilder isBlockedNotEqualTo( - bool isBlocked) { + bool isBlocked, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'isBlocked', - lower: [], - upper: [isBlocked], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'isBlocked', - lower: [isBlocked], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'isBlocked', + lower: [], + upper: [isBlocked], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'isBlocked', + lower: [isBlocked], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'isBlocked', - lower: [isBlocked], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'isBlocked', - lower: [], - upper: [isBlocked], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'isBlocked', + lower: [isBlocked], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'isBlocked', + lower: [], + upper: [isBlocked], + includeUpper: false, + ), + ); } }); } @@ -738,17 +809,17 @@ extension UTXOQueryWhere on QueryBuilder { extension UTXOQueryFilter on QueryBuilder { QueryBuilder addressIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'address', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'address'), + ); }); } QueryBuilder addressIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'address', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'address'), + ); }); } @@ -757,11 +828,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -771,12 +844,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -786,12 +861,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -803,14 +880,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'address', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'address', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -819,11 +898,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -832,67 +913,75 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder addressContains(String value, - {bool caseSensitive = true}) { + QueryBuilder addressContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder addressMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder addressMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'address', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'address', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'address', value: ''), + ); }); } QueryBuilder addressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'address', value: ''), + ); }); } QueryBuilder blockHashIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'blockHash', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'blockHash'), + ); }); } QueryBuilder blockHashIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'blockHash', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'blockHash'), + ); }); } @@ -901,11 +990,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -915,12 +1006,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -930,12 +1023,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -947,14 +1042,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'blockHash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'blockHash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -963,11 +1060,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -976,79 +1075,85 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockHashContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockHashMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'blockHash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'blockHash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockHashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'blockHash', value: ''), + ); }); } QueryBuilder blockHashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'blockHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'blockHash', value: ''), + ); }); } QueryBuilder blockHeightIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'blockHeight', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'blockHeight'), + ); }); } QueryBuilder blockHeightIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'blockHeight', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'blockHeight'), + ); }); } QueryBuilder blockHeightEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'blockHeight', value: value), + ); }); } @@ -1057,11 +1162,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'blockHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'blockHeight', + value: value, + ), + ); }); } @@ -1070,11 +1177,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'blockHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'blockHeight', + value: value, + ), + ); }); } @@ -1085,38 +1194,39 @@ extension UTXOQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'blockHeight', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'blockHeight', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder blockTimeIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'blockTime', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'blockTime'), + ); }); } QueryBuilder blockTimeIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'blockTime', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'blockTime'), + ); }); } QueryBuilder blockTimeEqualTo(int? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockTime', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'blockTime', value: value), + ); }); } @@ -1125,11 +1235,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'blockTime', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'blockTime', + value: value, + ), + ); }); } @@ -1138,11 +1250,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'blockTime', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'blockTime', + value: value, + ), + ); }); } @@ -1153,29 +1267,31 @@ extension UTXOQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'blockTime', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'blockTime', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder blockedReasonIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'blockedReason', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'blockedReason'), + ); }); } QueryBuilder blockedReasonIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'blockedReason', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'blockedReason'), + ); }); } @@ -1184,11 +1300,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1198,12 +1316,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1213,12 +1333,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1230,14 +1352,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'blockedReason', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'blockedReason', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1246,11 +1370,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1259,62 +1385,67 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockedReasonContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'blockedReason', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'blockedReason', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockedReasonMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'blockedReason', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'blockedReason', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder blockedReasonIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockedReason', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'blockedReason', value: ''), + ); }); } QueryBuilder blockedReasonIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'blockedReason', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'blockedReason', value: ''), + ); }); } QueryBuilder idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -1323,11 +1454,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1336,11 +1469,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1351,32 +1486,33 @@ extension UTXOQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder isBlockedEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isBlocked', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isBlocked', value: value), + ); }); } QueryBuilder isCoinbaseEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isCoinbase', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isCoinbase', value: value), + ); }); } @@ -1385,11 +1521,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1399,12 +1537,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1414,12 +1554,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1431,14 +1573,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1447,11 +1591,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1460,67 +1606,75 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder nameContains(String value, - {bool caseSensitive = true}) { + QueryBuilder nameContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder nameMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder nameMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } QueryBuilder otherDataIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherData'), + ); }); } QueryBuilder otherDataIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherData'), + ); }); } @@ -1529,11 +1683,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1543,12 +1699,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1558,12 +1716,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1575,14 +1735,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherData', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherData', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1591,11 +1753,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1604,53 +1768,59 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherData', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherData', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder otherDataIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherData', value: ''), + ); }); } QueryBuilder otherDataIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherData', value: ''), + ); }); } @@ -1659,11 +1829,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1673,12 +1845,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1688,12 +1862,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1705,14 +1881,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1721,11 +1899,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1734,85 +1914,91 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder txidContains(String value, - {bool caseSensitive = true}) { + QueryBuilder txidContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder txidMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder txidMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder usedIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'used', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'used'), + ); }); } QueryBuilder usedIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'used', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'used'), + ); }); } QueryBuilder usedEqualTo(bool? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'used', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'used', value: value), + ); }); } QueryBuilder valueEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: value), + ); }); } @@ -1821,11 +2007,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + ), + ); }); } @@ -1834,11 +2022,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + ), + ); }); } @@ -1849,22 +2039,23 @@ extension UTXOQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder voutEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'vout', value: value), + ); }); } @@ -1873,11 +2064,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -1886,11 +2079,13 @@ extension UTXOQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -1901,13 +2096,15 @@ extension UTXOQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'vout', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'vout', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1916,11 +2113,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1930,12 +2129,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1945,12 +2146,14 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1962,14 +2165,16 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1978,11 +2183,13 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1991,52 +2198,59 @@ extension UTXOQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder walletIdContains(String value, - {bool caseSensitive = true}) { + QueryBuilder walletIdContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -2398,15 +2612,17 @@ extension UTXOQuerySortThenBy on QueryBuilder { } extension UTXOQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByAddress( - {bool caseSensitive = true}) { + QueryBuilder distinctByAddress({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'address', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByBlockHash( - {bool caseSensitive = true}) { + QueryBuilder distinctByBlockHash({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'blockHash', caseSensitive: caseSensitive); }); @@ -2424,11 +2640,14 @@ extension UTXOQueryWhereDistinct on QueryBuilder { }); } - QueryBuilder distinctByBlockedReason( - {bool caseSensitive = true}) { + QueryBuilder distinctByBlockedReason({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'blockedReason', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'blockedReason', + caseSensitive: caseSensitive, + ); }); } @@ -2444,22 +2663,25 @@ extension UTXOQueryWhereDistinct on QueryBuilder { }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByOtherData( - {bool caseSensitive = true}) { + QueryBuilder distinctByOtherData({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'otherData', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByTxid( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxid({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txid', caseSensitive: caseSensitive); }); @@ -2483,8 +2705,9 @@ extension UTXOQueryWhereDistinct on QueryBuilder { }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/blockchain_data/v2/input_v2.dart b/lib/models/isar/models/blockchain_data/v2/input_v2.dart index 7442bd2d4..7e4ae14d9 100644 --- a/lib/models/isar/models/blockchain_data/v2/input_v2.dart +++ b/lib/models/isar/models/blockchain_data/v2/input_v2.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'input_v2.g.dart'; diff --git a/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart index fb0e9dd61..39778b704 100644 --- a/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart +++ b/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart @@ -13,22 +13,11 @@ const OutpointV2Schema = Schema( name: r'OutpointV2', id: 5327663686922028778, properties: { - r'hashCode': PropertySchema( - id: 0, - name: r'hashCode', - type: IsarType.long, - ), - r'txid': PropertySchema( - id: 1, - name: r'txid', - type: IsarType.string, - ), - r'vout': PropertySchema( - id: 2, - name: r'vout', - type: IsarType.long, - ) + r'hashCode': PropertySchema(id: 0, name: r'hashCode', type: IsarType.long), + r'txid': PropertySchema(id: 1, name: r'txid', type: IsarType.string), + r'vout': PropertySchema(id: 2, name: r'vout', type: IsarType.long), }, + estimateSize: _outpointV2EstimateSize, serialize: _outpointV2Serialize, deserialize: _outpointV2Deserialize, @@ -89,26 +78,25 @@ P _outpointV2DeserializeProp

( extension OutpointV2QueryFilter on QueryBuilder { QueryBuilder hashCodeEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'hashCode', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'hashCode', value: value), + ); }); } QueryBuilder - hashCodeGreaterThan( - int value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'hashCode', - value: value, - )); + hashCodeGreaterThan(int value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'hashCode', + value: value, + ), + ); }); } @@ -117,11 +105,13 @@ extension OutpointV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'hashCode', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'hashCode', + value: value, + ), + ); }); } @@ -132,13 +122,15 @@ extension OutpointV2QueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'hashCode', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'hashCode', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -147,11 +139,13 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -161,12 +155,14 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -176,12 +172,14 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -193,14 +191,16 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -209,11 +209,13 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -222,63 +224,69 @@ extension OutpointV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder voutEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'vout', value: value), + ); }); } @@ -287,11 +295,13 @@ extension OutpointV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -300,11 +310,13 @@ extension OutpointV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'vout', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'vout', + value: value, + ), + ); }); } @@ -315,13 +327,15 @@ extension OutpointV2QueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'vout', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'vout', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } } @@ -355,6 +369,7 @@ const InputV2Schema = Schema( id: 3, name: r'outpoint', type: IsarType.object, + target: r'OutpointV2', ), r'scriptSigAsm': PropertySchema( @@ -367,11 +382,7 @@ const InputV2Schema = Schema( name: r'scriptSigHex', type: IsarType.string, ), - r'sequence': PropertySchema( - id: 6, - name: r'sequence', - type: IsarType.long, - ), + r'sequence': PropertySchema(id: 6, name: r'sequence', type: IsarType.long), r'valueStringSats': PropertySchema( id: 7, name: r'valueStringSats', @@ -382,12 +393,9 @@ const InputV2Schema = Schema( name: r'walletOwns', type: IsarType.bool, ), - r'witness': PropertySchema( - id: 9, - name: r'witness', - type: IsarType.string, - ) + r'witness': PropertySchema(id: 9, name: r'witness', type: IsarType.string), }, + estimateSize: _inputV2EstimateSize, serialize: _inputV2Serialize, deserialize: _inputV2Deserialize, @@ -422,9 +430,13 @@ int _inputV2EstimateSize( { final value = object.outpoint; if (value != null) { - bytesCount += 3 + + bytesCount += + 3 + OutpointV2Schema.estimateSize( - value, allOffsets[OutpointV2]!, allOffsets); + value, + allOffsets[OutpointV2]!, + allOffsets, + ); } } { @@ -511,10 +523,11 @@ P _inputV2DeserializeProp

( return (reader.readStringOrNull(offset)) as P; case 3: return (reader.readObjectOrNull( - offset, - OutpointV2Schema.deserialize, - allOffsets, - )) as P; + offset, + OutpointV2Schema.deserialize, + allOffsets, + )) + as P; case 4: return (reader.readStringOrNull(offset)) as P; case 5: @@ -539,43 +552,49 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementGreaterThan( + addressesElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementLessThan( + addressesElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -587,122 +606,108 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'addresses', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'addresses', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + addressesElementStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + addressesElementEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + addressesElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressesElementMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'addresses', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'addresses', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementIsEmpty() { + addressesElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'addresses', value: ''), + ); }); } QueryBuilder - addressesElementIsNotEmpty() { + addressesElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'addresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'addresses', value: ''), + ); }); } QueryBuilder addressesLengthEqualTo( - int length) { + int length, + ) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - true, - length, - true, - ); + return query.listLength(r'addresses', length, true, length, true); }); } QueryBuilder addressesIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - 0, - true, - ); + return query.listLength(r'addresses', 0, true, 0, true); }); } QueryBuilder addressesIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - false, - 999999, - true, - ); + return query.listLength(r'addresses', 0, false, 999999, true); }); } @@ -711,29 +716,14 @@ extension InputV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - length, - include, - ); + return query.listLength(r'addresses', 0, true, length, include); }); } QueryBuilder - addressesLengthGreaterThan( - int length, { - bool include = false, - }) { + addressesLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - include, - 999999, - true, - ); + return query.listLength(r'addresses', length, include, 999999, true); }); } @@ -756,17 +746,17 @@ extension InputV2QueryFilter QueryBuilder coinbaseIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'coinbase', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'coinbase'), + ); }); } QueryBuilder coinbaseIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'coinbase', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'coinbase'), + ); }); } @@ -775,11 +765,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -789,12 +781,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -804,12 +798,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -821,14 +817,16 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinbase', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinbase', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -837,11 +835,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -850,122 +850,131 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder coinbaseContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinbase', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinbase', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder coinbaseMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinbase', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinbase', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder coinbaseIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinbase', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinbase', value: ''), + ); }); } QueryBuilder coinbaseIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinbase', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinbase', value: ''), + ); }); } QueryBuilder - innerRedeemScriptAsmIsNull() { + innerRedeemScriptAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'innerRedeemScriptAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'innerRedeemScriptAsm'), + ); }); } QueryBuilder - innerRedeemScriptAsmIsNotNull() { + innerRedeemScriptAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'innerRedeemScriptAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'innerRedeemScriptAsm'), + ); }); } QueryBuilder - innerRedeemScriptAsmEqualTo( - String? value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + innerRedeemScriptAsmEqualTo(String? value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmGreaterThan( + innerRedeemScriptAsmGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmLessThan( + innerRedeemScriptAsmLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmBetween( + innerRedeemScriptAsmBetween( String? lower, String? upper, { bool includeLower = true, @@ -973,117 +982,122 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'innerRedeemScriptAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'innerRedeemScriptAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + innerRedeemScriptAsmStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + innerRedeemScriptAsmEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'innerRedeemScriptAsm', - value: value, - caseSensitive: caseSensitive, - )); + innerRedeemScriptAsmContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'innerRedeemScriptAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'innerRedeemScriptAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + innerRedeemScriptAsmMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'innerRedeemScriptAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - innerRedeemScriptAsmIsEmpty() { + innerRedeemScriptAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'innerRedeemScriptAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'innerRedeemScriptAsm', value: ''), + ); }); } QueryBuilder - innerRedeemScriptAsmIsNotEmpty() { + innerRedeemScriptAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'innerRedeemScriptAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'innerRedeemScriptAsm', + value: '', + ), + ); }); } QueryBuilder outpointIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'outpoint', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'outpoint'), + ); }); } QueryBuilder outpointIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'outpoint', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'outpoint'), + ); }); } QueryBuilder scriptSigAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptSigAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptSigAsm'), + ); }); } QueryBuilder - scriptSigAsmIsNotNull() { + scriptSigAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptSigAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptSigAsm'), + ); }); } @@ -1092,11 +1106,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1106,12 +1122,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1121,12 +1139,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1138,14 +1158,16 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptSigAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptSigAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1154,11 +1176,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1167,71 +1191,77 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptSigAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptSigAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptSigAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptSigAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptSigAsm', value: ''), + ); }); } QueryBuilder - scriptSigAsmIsNotEmpty() { + scriptSigAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptSigAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptSigAsm', value: ''), + ); }); } QueryBuilder scriptSigHexIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptSigHex', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptSigHex'), + ); }); } QueryBuilder - scriptSigHexIsNotNull() { + scriptSigHexIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptSigHex', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptSigHex'), + ); }); } @@ -1240,11 +1270,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1254,12 +1286,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1269,12 +1303,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1286,14 +1322,16 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptSigHex', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptSigHex', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1302,11 +1340,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1315,80 +1355,86 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigHexContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptSigHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptSigHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigHexMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptSigHex', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptSigHex', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder scriptSigHexIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptSigHex', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptSigHex', value: ''), + ); }); } QueryBuilder - scriptSigHexIsNotEmpty() { + scriptSigHexIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptSigHex', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptSigHex', value: ''), + ); }); } QueryBuilder sequenceIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'sequence', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'sequence'), + ); }); } QueryBuilder sequenceIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'sequence', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'sequence'), + ); }); } QueryBuilder sequenceEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sequence', value: value), + ); }); } @@ -1397,11 +1443,13 @@ extension InputV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sequence', + value: value, + ), + ); }); } @@ -1410,11 +1458,13 @@ extension InputV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sequence', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sequence', + value: value, + ), + ); }); } @@ -1425,13 +1475,15 @@ extension InputV2QueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sequence', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sequence', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1440,27 +1492,31 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsGreaterThan( + valueStringSatsGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1470,12 +1526,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1487,28 +1545,29 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'valueStringSats', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'valueStringSats', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + valueStringSatsStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1517,81 +1576,87 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueStringSatsContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder valueStringSatsMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'valueStringSats', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'valueStringSats', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsIsEmpty() { + valueStringSatsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueStringSats', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'valueStringSats', value: ''), + ); }); } QueryBuilder - valueStringSatsIsNotEmpty() { + valueStringSatsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'valueStringSats', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'valueStringSats', value: ''), + ); }); } QueryBuilder walletOwnsEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletOwns', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletOwns', value: value), + ); }); } QueryBuilder witnessIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'witness', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'witness'), + ); }); } QueryBuilder witnessIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'witness', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'witness'), + ); }); } @@ -1600,11 +1665,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1614,12 +1681,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1629,12 +1698,14 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1646,14 +1717,16 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'witness', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'witness', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1662,11 +1735,13 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1675,53 +1750,59 @@ extension InputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'witness', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'witness', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'witness', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'witness', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder witnessIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'witness', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'witness', value: ''), + ); }); } QueryBuilder witnessIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'witness', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'witness', value: ''), + ); }); } } @@ -1729,7 +1810,8 @@ extension InputV2QueryFilter extension InputV2QueryObject on QueryBuilder { QueryBuilder outpoint( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'outpoint'); }); diff --git a/lib/models/isar/models/blockchain_data/v2/output_v2.dart b/lib/models/isar/models/blockchain_data/v2/output_v2.dart index 01bfcfb0e..44da1a173 100644 --- a/lib/models/isar/models/blockchain_data/v2/output_v2.dart +++ b/lib/models/isar/models/blockchain_data/v2/output_v2.dart @@ -1,5 +1,5 @@ import 'package:decimal/decimal.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'output_v2.g.dart'; diff --git a/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart index 539ad6dbd..0f7f3127a 100644 --- a/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart +++ b/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart @@ -37,8 +37,9 @@ const OutputV2Schema = Schema( id: 4, name: r'walletOwns', type: IsarType.bool, - ) + ), }, + estimateSize: _outputV2EstimateSize, serialize: _outputV2Serialize, deserialize: _outputV2Deserialize, @@ -122,53 +123,56 @@ P _outputV2DeserializeProp

( extension OutputV2QueryFilter on QueryBuilder { QueryBuilder - addressesElementEqualTo( - String value, { - bool caseSensitive = true, - }) { + addressesElementEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementGreaterThan( + addressesElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementLessThan( + addressesElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementBetween( + addressesElementBetween( String lower, String upper, { bool includeLower = true, @@ -176,159 +180,125 @@ extension OutputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'addresses', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'addresses', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementStartsWith( - String value, { - bool caseSensitive = true, - }) { + addressesElementStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementEndsWith( - String value, { - bool caseSensitive = true, - }) { + addressesElementEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementContains(String value, {bool caseSensitive = true}) { + addressesElementContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'addresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'addresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementMatches(String pattern, {bool caseSensitive = true}) { + addressesElementMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'addresses', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'addresses', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressesElementIsEmpty() { + addressesElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'addresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'addresses', value: ''), + ); }); } QueryBuilder - addressesElementIsNotEmpty() { + addressesElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'addresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'addresses', value: ''), + ); }); } QueryBuilder - addressesLengthEqualTo(int length) { + addressesLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - true, - length, - true, - ); + return query.listLength(r'addresses', length, true, length, true); }); } QueryBuilder addressesIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - 0, - true, - ); + return query.listLength(r'addresses', 0, true, 0, true); }); } QueryBuilder - addressesIsNotEmpty() { + addressesIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - false, - 999999, - true, - ); + return query.listLength(r'addresses', 0, false, 999999, true); }); } QueryBuilder - addressesLengthLessThan( - int length, { - bool include = false, - }) { + addressesLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - length, - include, - ); + return query.listLength(r'addresses', 0, true, length, include); }); } QueryBuilder - addressesLengthGreaterThan( - int length, { - bool include = false, - }) { + addressesLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - include, - 999999, - true, - ); + return query.listLength(r'addresses', length, include, 999999, true); }); } QueryBuilder - addressesLengthBetween( + addressesLengthBetween( int lower, int upper, { bool includeLower = true, @@ -346,71 +316,74 @@ extension OutputV2QueryFilter } QueryBuilder - scriptPubKeyAsmIsNull() { + scriptPubKeyAsmIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'scriptPubKeyAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'scriptPubKeyAsm'), + ); }); } QueryBuilder - scriptPubKeyAsmIsNotNull() { + scriptPubKeyAsmIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'scriptPubKeyAsm', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'scriptPubKeyAsm'), + ); }); } QueryBuilder - scriptPubKeyAsmEqualTo( - String? value, { - bool caseSensitive = true, - }) { + scriptPubKeyAsmEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmGreaterThan( + scriptPubKeyAsmGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmLessThan( + scriptPubKeyAsmLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmBetween( + scriptPubKeyAsmBetween( String? lower, String? upper, { bool includeLower = true, @@ -418,135 +391,140 @@ extension OutputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKeyAsm', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKeyAsm', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmStartsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyAsmStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmEndsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyAsmEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmContains(String value, {bool caseSensitive = true}) { + scriptPubKeyAsmContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKeyAsm', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKeyAsm', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmMatches(String pattern, {bool caseSensitive = true}) { + scriptPubKeyAsmMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKeyAsm', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKeyAsm', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyAsmIsEmpty() { + scriptPubKeyAsmIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKeyAsm', value: ''), + ); }); } QueryBuilder - scriptPubKeyAsmIsNotEmpty() { + scriptPubKeyAsmIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKeyAsm', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptPubKeyAsm', value: ''), + ); }); } QueryBuilder - scriptPubKeyHexEqualTo( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyHexEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexGreaterThan( + scriptPubKeyHexGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexLessThan( + scriptPubKeyHexLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexBetween( + scriptPubKeyHexBetween( String lower, String upper, { bool includeLower = true, @@ -554,135 +532,140 @@ extension OutputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'scriptPubKeyHex', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'scriptPubKeyHex', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexStartsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyHexStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexEndsWith( - String value, { - bool caseSensitive = true, - }) { + scriptPubKeyHexEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexContains(String value, {bool caseSensitive = true}) { + scriptPubKeyHexContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'scriptPubKeyHex', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'scriptPubKeyHex', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexMatches(String pattern, {bool caseSensitive = true}) { + scriptPubKeyHexMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'scriptPubKeyHex', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'scriptPubKeyHex', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - scriptPubKeyHexIsEmpty() { + scriptPubKeyHexIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'scriptPubKeyHex', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'scriptPubKeyHex', value: ''), + ); }); } QueryBuilder - scriptPubKeyHexIsNotEmpty() { + scriptPubKeyHexIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'scriptPubKeyHex', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'scriptPubKeyHex', value: ''), + ); }); } QueryBuilder - valueStringSatsEqualTo( - String value, { - bool caseSensitive = true, - }) { + valueStringSatsEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsGreaterThan( + valueStringSatsGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsLessThan( + valueStringSatsLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsBetween( + valueStringSatsBetween( String lower, String upper, { bool includeLower = true, @@ -690,94 +673,96 @@ extension OutputV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'valueStringSats', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'valueStringSats', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueStringSatsStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsEndsWith( - String value, { - bool caseSensitive = true, - }) { + valueStringSatsEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsContains(String value, {bool caseSensitive = true}) { + valueStringSatsContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'valueStringSats', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'valueStringSats', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsMatches(String pattern, {bool caseSensitive = true}) { + valueStringSatsMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'valueStringSats', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'valueStringSats', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStringSatsIsEmpty() { + valueStringSatsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueStringSats', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'valueStringSats', value: ''), + ); }); } QueryBuilder - valueStringSatsIsNotEmpty() { + valueStringSatsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'valueStringSats', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'valueStringSats', value: ''), + ); }); } QueryBuilder walletOwnsEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletOwns', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletOwns', value: value), + ); }); } } diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart index 3a2026785..a507ba8fe 100644 --- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart +++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:math'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../../utilities/amount/amount.dart'; import '../../../../../utilities/extensions/extensions.dart'; @@ -95,6 +95,11 @@ class TransactionV2 { bool get isEpiccashTransaction => _getFromOtherData(key: TxV2OdKeys.isEpiccashTransaction) == true; + + @ignore + bool get isMimblewimblecoinTransaction => + _getFromOtherData(key: TxV2OdKeys.isMimblewimblecoinTransaction) == true; + int? get numberOfMessages => _getFromOtherData(key: TxV2OdKeys.numberOfMessages) as int?; String? get slateId => _getFromOtherData(key: TxV2OdKeys.slateId) as String?; @@ -292,6 +297,74 @@ class TransactionV2 { } } + if (isMimblewimblecoinTransaction) { + if (slateId == null) { + return "Restored Funds"; + } + + if (isCancelled) { + return "Cancelled"; + } else if (type == TransactionType.incoming) { + if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { + return "Received"; + } else { + if (numberOfMessages == 1) { + return "Receiving (waiting for sender)"; + } else if ((numberOfMessages ?? 0) > 1) { + return "Receiving (waiting for confirmations)"; // TODO test if the sender still has to open again after the receiver has 2 messages present, ie. sender->receiver->sender->node (yes) vs. sender->receiver->node (no) + } else { + return "Receiving ${prettyConfirms()}"; + } + } + } else if (type == TransactionType.outgoing) { + if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { + return "Sent (confirmed)"; + } else { + if (numberOfMessages == 1) { + return "Sending (waiting for receiver)"; + } else if ((numberOfMessages ?? 0) > 1) { + return "Sending (waiting for confirmations)"; + } else { + return "Sending ${prettyConfirms()}"; + } + } + } + } + + if (isMimblewimblecoinTransaction) { + if (slateId == null) { + return "Restored Funds"; + } + + if (isCancelled) { + return "Cancelled"; + } else if (type == TransactionType.incoming) { + if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { + return "Received"; + } else { + if (numberOfMessages == 1) { + return "Receiving (waiting for sender)"; + } else if ((numberOfMessages ?? 0) > 1) { + return "Receiving (waiting for confirmations)"; // TODO test if the sender still has to open again after the receiver has 2 messages present, ie. sender->receiver->sender->node (yes) vs. sender->receiver->node (no) + } else { + return "Receiving ${prettyConfirms()}"; + } + } + } else if (type == TransactionType.outgoing) { + if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { + return "Sent (confirmed)"; + } else { + if (numberOfMessages == 1) { + return "Sending (waiting for receiver)"; + } else if ((numberOfMessages ?? 0) > 1) { + return "Sending (waiting for confirmations)"; + } else { + return "Sending ${prettyConfirms()}"; + } + } + } + } + if (type == TransactionType.incoming) { // if (_transaction.isMinting) { // return "Minting"; @@ -333,6 +406,10 @@ class TransactionV2 { bool get isInstantLock => _getFromOtherData(key: TxV2OdKeys.isInstantLock) == true; + @ignore + String? get salviumTypeString => + _getFromOtherData(key: TxV2OdKeys.salviumTypeString) as String?; + @override String toString() { return 'TransactionV2(\n' @@ -356,6 +433,7 @@ abstract final class TxV2OdKeys { static const size = "size"; static const vSize = "vSize"; static const isEpiccashTransaction = "isEpiccashTransaction"; + static const isMimblewimblecoinTransaction = "isMimblewimblecoinTransaction"; static const numberOfMessages = "numberOfMessages"; static const slateId = "slateId"; static const onChainNote = "onChainNote"; @@ -367,4 +445,6 @@ abstract final class TxV2OdKeys { static const moneroAccountIndex = "moneroAccountIndex"; static const isMoneroTransaction = "isMoneroTransaction"; static const isInstantLock = "isInstantLock"; + static const salviumTypeInt = "salviumTypeInt"; + static const salviumTypeString = "salviumTypeString"; } diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart index 6c2ffde6d..1335d783a 100644 --- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart +++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart @@ -27,20 +27,13 @@ const TransactionV2Schema = CollectionSchema( name: r'contractAddress', type: IsarType.string, ), - r'hash': PropertySchema( - id: 2, - name: r'hash', - type: IsarType.string, - ), - r'height': PropertySchema( - id: 3, - name: r'height', - type: IsarType.long, - ), + r'hash': PropertySchema(id: 2, name: r'hash', type: IsarType.string), + r'height': PropertySchema(id: 3, name: r'height', type: IsarType.long), r'inputs': PropertySchema( id: 4, name: r'inputs', type: IsarType.objectList, + target: r'InputV2', ), r'isCancelled': PropertySchema( @@ -53,11 +46,7 @@ const TransactionV2Schema = CollectionSchema( name: r'isEpiccashTransaction', type: IsarType.bool, ), - r'nonce': PropertySchema( - id: 7, - name: r'nonce', - type: IsarType.long, - ), + r'nonce': PropertySchema(id: 7, name: r'nonce', type: IsarType.long), r'numberOfMessages': PropertySchema( id: 8, name: r'numberOfMessages', @@ -77,13 +66,10 @@ const TransactionV2Schema = CollectionSchema( id: 11, name: r'outputs', type: IsarType.objectList, + target: r'OutputV2', ), - r'slateId': PropertySchema( - id: 12, - name: r'slateId', - type: IsarType.string, - ), + r'slateId': PropertySchema(id: 12, name: r'slateId', type: IsarType.string), r'subType': PropertySchema( id: 13, name: r'subType', @@ -95,34 +81,40 @@ const TransactionV2Schema = CollectionSchema( name: r'timestamp', type: IsarType.long, ), - r'txid': PropertySchema( - id: 15, - name: r'txid', - type: IsarType.string, - ), + r'txid': PropertySchema(id: 15, name: r'txid', type: IsarType.string), r'type': PropertySchema( id: 16, name: r'type', type: IsarType.byte, enumMap: _TransactionV2typeEnumValueMap, ), - r'version': PropertySchema( - id: 17, - name: r'version', - type: IsarType.long, - ), + r'version': PropertySchema(id: 17, name: r'version', type: IsarType.long), r'walletId': PropertySchema( id: 18, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _transactionV2EstimateSize, serialize: _transactionV2Serialize, deserialize: _transactionV2Deserialize, deserializeProp: _transactionV2DeserializeProp, idName: r'id', indexes: { + r'timestamp': IndexSchema( + id: 1852253767416892198, + name: r'timestamp', + unique: false, + replace: false, + properties: [ + IndexPropertySchema( + name: r'timestamp', + type: IndexType.value, + caseSensitive: false, + ), + ], + ), r'walletId': IndexSchema( id: -1783113319798776304, name: r'walletId', @@ -133,7 +125,7 @@ const TransactionV2Schema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'txid_walletId': IndexSchema( @@ -151,33 +143,21 @@ const TransactionV2Schema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), - r'timestamp': IndexSchema( - id: 1852253767416892198, - name: r'timestamp', - unique: false, - replace: false, - properties: [ - IndexPropertySchema( - name: r'timestamp', - type: IndexType.value, - caseSensitive: false, - ) - ], - ) }, links: {}, embeddedSchemas: { r'InputV2': InputV2Schema, r'OutpointV2': OutpointV2Schema, - r'OutputV2': OutputV2Schema + r'OutputV2': OutputV2Schema, }, + getId: _transactionV2GetId, getLinks: _transactionV2GetLinks, attach: _transactionV2Attach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _transactionV2EstimateSize( @@ -285,7 +265,8 @@ TransactionV2 _transactionV2Deserialize( blockHash: reader.readStringOrNull(offsets[0]), hash: reader.readString(offsets[2]), height: reader.readLongOrNull(offsets[3]), - inputs: reader.readObjectList( + inputs: + reader.readObjectList( offsets[4], InputV2Schema.deserialize, allOffsets, @@ -293,7 +274,8 @@ TransactionV2 _transactionV2Deserialize( ) ?? [], otherData: reader.readStringOrNull(offsets[10]), - outputs: reader.readObjectList( + outputs: + reader.readObjectList( offsets[11], OutputV2Schema.deserialize, allOffsets, @@ -302,10 +284,11 @@ TransactionV2 _transactionV2Deserialize( [], subType: _TransactionV2subTypeValueEnumMap[reader.readByteOrNull(offsets[13])] ?? - TransactionSubType.none, + TransactionSubType.none, timestamp: reader.readLong(offsets[14]), txid: reader.readString(offsets[15]), - type: _TransactionV2typeValueEnumMap[reader.readByteOrNull(offsets[16])] ?? + type: + _TransactionV2typeValueEnumMap[reader.readByteOrNull(offsets[16])] ?? TransactionType.outgoing, version: reader.readLong(offsets[17]), walletId: reader.readString(offsets[18]), @@ -331,12 +314,13 @@ P _transactionV2DeserializeProp

( return (reader.readLongOrNull(offset)) as P; case 4: return (reader.readObjectList( - offset, - InputV2Schema.deserialize, - allOffsets, - InputV2(), - ) ?? - []) as P; + offset, + InputV2Schema.deserialize, + allOffsets, + InputV2(), + ) ?? + []) + as P; case 5: return (reader.readBool(offset)) as P; case 6: @@ -351,25 +335,29 @@ P _transactionV2DeserializeProp

( return (reader.readStringOrNull(offset)) as P; case 11: return (reader.readObjectList( - offset, - OutputV2Schema.deserialize, - allOffsets, - OutputV2(), - ) ?? - []) as P; + offset, + OutputV2Schema.deserialize, + allOffsets, + OutputV2(), + ) ?? + []) + as P; case 12: return (reader.readStringOrNull(offset)) as P; case 13: - return (_TransactionV2subTypeValueEnumMap[ - reader.readByteOrNull(offset)] ?? - TransactionSubType.none) as P; + return (_TransactionV2subTypeValueEnumMap[reader.readByteOrNull( + offset, + )] ?? + TransactionSubType.none) + as P; case 14: return (reader.readLong(offset)) as P; case 15: return (reader.readString(offset)) as P; case 16: return (_TransactionV2typeValueEnumMap[reader.readByteOrNull(offset)] ?? - TransactionType.outgoing) as P; + TransactionType.outgoing) + as P; case 17: return (reader.readLong(offset)) as P; case 18: @@ -425,7 +413,10 @@ List> _transactionV2GetLinks(TransactionV2 object) { } void _transactionV2Attach( - IsarCollection col, Id id, TransactionV2 object) { + IsarCollection col, + Id id, + TransactionV2 object, +) { object.id = id; } @@ -447,10 +438,14 @@ extension TransactionV2ByIndex on IsarCollection { } Future> getAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -460,10 +455,14 @@ extension TransactionV2ByIndex on IsarCollection { } List getAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -473,10 +472,14 @@ extension TransactionV2ByIndex on IsarCollection { } Future deleteAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -486,10 +489,14 @@ extension TransactionV2ByIndex on IsarCollection { } int deleteAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -510,8 +517,10 @@ extension TransactionV2ByIndex on IsarCollection { return putAllByIndex(r'txid_walletId', objects); } - List putAllByTxidWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByTxidWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'txid_walletId', objects, saveLinks: saveLinks); } } @@ -536,17 +545,16 @@ extension TransactionV2QueryWhereSort extension TransactionV2QueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -569,8 +577,9 @@ extension TransactionV2QueryWhere } QueryBuilder idGreaterThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -579,8 +588,9 @@ extension TransactionV2QueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -595,240 +605,274 @@ extension TransactionV2QueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } - QueryBuilder walletIdEqualTo( - String walletId) { + QueryBuilder + timestampEqualTo(int timestamp) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'timestamp', value: [timestamp]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + timestampNotEqualTo(int timestamp) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidEqualToAnyWalletId(String txid) { + timestampGreaterThan(int timestamp, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [timestamp], + includeLower: include, + upper: [], + ), + ); }); } QueryBuilder - txidNotEqualToAnyWalletId(String txid) { + timestampLessThan(int timestamp, {bool include = false}) { return QueryBuilder.apply(this, (query) { - if (query.whereSort == Sort.asc) { - return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )); - } else { - return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )); - } + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [], + upper: [timestamp], + includeUpper: include, + ), + ); }); } QueryBuilder - txidWalletIdEqualTo(String txid, String walletId) { + timestampBetween( + int lowerTimestamp, + int upperTimestamp, { + bool includeLower = true, + bool includeUpper = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestamp', + lower: [lowerTimestamp], + includeLower: includeLower, + upper: [upperTimestamp], + includeUpper: includeUpper, + ), + ); + }); + } + + QueryBuilder walletIdEqualTo( + String walletId, + ) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - txidEqualToWalletIdNotEqualTo(String txid, String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - timestampEqualTo(int timestamp) { + txidEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'timestamp', - value: [timestamp], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'txid_walletId', value: [txid]), + ); }); } QueryBuilder - timestampNotEqualTo(int timestamp) { + txidNotEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ); } }); } QueryBuilder - timestampGreaterThan( - int timestamp, { - bool include = false, - }) { + txidWalletIdEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [timestamp], - includeLower: include, - upper: [], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId', + value: [txid, walletId], + ), + ); }); } QueryBuilder - timestampLessThan( - int timestamp, { - bool include = false, - }) { + txidEqualToWalletIdNotEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [], - upper: [timestamp], - includeUpper: include, - )); - }); - } - - QueryBuilder - timestampBetween( - int lowerTimestamp, - int upperTimestamp, { - bool includeLower = true, - bool includeUpper = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestamp', - lower: [lowerTimestamp], - includeLower: includeLower, - upper: [upperTimestamp], - includeUpper: includeUpper, - )); + if (query.whereSort == Sort.asc) { + return query + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ); + } else { + return query + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ); + } }); } } @@ -836,71 +880,74 @@ extension TransactionV2QueryWhere extension TransactionV2QueryFilter on QueryBuilder { QueryBuilder - blockHashIsNull() { + blockHashIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'blockHash', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'blockHash'), + ); }); } QueryBuilder - blockHashIsNotNull() { + blockHashIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'blockHash', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'blockHash'), + ); }); } QueryBuilder - blockHashEqualTo( - String? value, { - bool caseSensitive = true, - }) { + blockHashEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashGreaterThan( + blockHashGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashLessThan( + blockHashLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashBetween( + blockHashBetween( String? lower, String? upper, { bool includeLower = true, @@ -908,153 +955,158 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'blockHash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'blockHash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashStartsWith( - String value, { - bool caseSensitive = true, - }) { + blockHashStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashEndsWith( - String value, { - bool caseSensitive = true, - }) { + blockHashEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashContains(String value, {bool caseSensitive = true}) { + blockHashContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'blockHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'blockHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashMatches(String pattern, {bool caseSensitive = true}) { + blockHashMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'blockHash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'blockHash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - blockHashIsEmpty() { + blockHashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'blockHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'blockHash', value: ''), + ); }); } QueryBuilder - blockHashIsNotEmpty() { + blockHashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'blockHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'blockHash', value: ''), + ); }); } QueryBuilder - contractAddressIsNull() { + contractAddressIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'contractAddress', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'contractAddress'), + ); }); } QueryBuilder - contractAddressIsNotNull() { + contractAddressIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'contractAddress', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'contractAddress'), + ); }); } QueryBuilder - contractAddressEqualTo( - String? value, { - bool caseSensitive = true, - }) { + contractAddressEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressGreaterThan( + contractAddressGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressLessThan( + contractAddressLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressBetween( + contractAddressBetween( String? lower, String? upper, { bool includeLower = true, @@ -1062,84 +1114,86 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'contractAddress', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'contractAddress', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressStartsWith( - String value, { - bool caseSensitive = true, - }) { + contractAddressStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressEndsWith( - String value, { - bool caseSensitive = true, - }) { + contractAddressEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressContains(String value, {bool caseSensitive = true}) { + contractAddressContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'contractAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'contractAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressMatches(String pattern, {bool caseSensitive = true}) { + contractAddressMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'contractAddress', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'contractAddress', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contractAddressIsEmpty() { + contractAddressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'contractAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'contractAddress', value: ''), + ); }); } QueryBuilder - contractAddressIsNotEmpty() { + contractAddressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'contractAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'contractAddress', value: ''), + ); }); } @@ -1148,43 +1202,49 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashGreaterThan( + hashGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashLessThan( + hashLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1196,183 +1256,184 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'hash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'hash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashStartsWith( - String value, { - bool caseSensitive = true, - }) { + hashStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashEndsWith( - String value, { - bool caseSensitive = true, - }) { + hashEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashContains(String value, {bool caseSensitive = true}) { + hashContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'hash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'hash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder hashMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'hash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'hash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - hashIsEmpty() { + hashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'hash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'hash', value: ''), + ); }); } QueryBuilder - hashIsNotEmpty() { + hashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'hash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'hash', value: ''), + ); }); } QueryBuilder - heightIsNull() { + heightIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'height'), + ); }); } QueryBuilder - heightIsNotNull() { + heightIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'height'), + ); }); } QueryBuilder - heightEqualTo(int? value) { + heightEqualTo(int? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'height', value: value), + ); }); } QueryBuilder - heightGreaterThan( - int? value, { - bool include = false, - }) { + heightGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'height', + value: value, + ), + ); }); } QueryBuilder - heightLessThan( - int? value, { - bool include = false, - }) { + heightLessThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'height', + value: value, + ), + ); }); } QueryBuilder - heightBetween( + heightBetween( int? lower, int? upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'height', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'height', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1381,11 +1442,13 @@ extension TransactionV2QueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1396,89 +1459,55 @@ extension TransactionV2QueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - inputsLengthEqualTo(int length) { + inputsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - length, - true, - length, - true, - ); + return query.listLength(r'inputs', length, true, length, true); }); } QueryBuilder - inputsIsEmpty() { + inputsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - true, - 0, - true, - ); + return query.listLength(r'inputs', 0, true, 0, true); }); } QueryBuilder - inputsIsNotEmpty() { + inputsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - false, - 999999, - true, - ); + return query.listLength(r'inputs', 0, false, 999999, true); }); } QueryBuilder - inputsLengthLessThan( - int length, { - bool include = false, - }) { + inputsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - 0, - true, - length, - include, - ); + return query.listLength(r'inputs', 0, true, length, include); }); } QueryBuilder - inputsLengthGreaterThan( - int length, { - bool include = false, - }) { + inputsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'inputs', - length, - include, - 999999, - true, - ); + return query.listLength(r'inputs', length, include, 999999, true); }); } QueryBuilder - inputsLengthBetween( + inputsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -1496,239 +1525,241 @@ extension TransactionV2QueryFilter } QueryBuilder - isCancelledEqualTo(bool value) { + isCancelledEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isCancelled', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isCancelled', value: value), + ); }); } QueryBuilder - isEpiccashTransactionEqualTo(bool value) { + isEpiccashTransactionEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isEpiccashTransaction', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'isEpiccashTransaction', + value: value, + ), + ); }); } QueryBuilder - nonceIsNull() { + nonceIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'nonce'), + ); }); } QueryBuilder - nonceIsNotNull() { + nonceIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'nonce'), + ); }); } QueryBuilder - nonceEqualTo(int? value) { + nonceEqualTo(int? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'nonce', value: value), + ); }); } QueryBuilder - nonceGreaterThan( - int? value, { - bool include = false, - }) { + nonceGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } QueryBuilder - nonceLessThan( - int? value, { - bool include = false, - }) { + nonceLessThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } QueryBuilder - nonceBetween( + nonceBetween( int? lower, int? upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'nonce', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'nonce', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - numberOfMessagesIsNull() { + numberOfMessagesIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'numberOfMessages', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'numberOfMessages'), + ); }); } QueryBuilder - numberOfMessagesIsNotNull() { + numberOfMessagesIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'numberOfMessages', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'numberOfMessages'), + ); }); } QueryBuilder - numberOfMessagesEqualTo(int? value) { + numberOfMessagesEqualTo(int? value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'numberOfMessages', value: value), + ); }); } QueryBuilder - numberOfMessagesGreaterThan( - int? value, { - bool include = false, - }) { + numberOfMessagesGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numberOfMessages', + value: value, + ), + ); }); } QueryBuilder - numberOfMessagesLessThan( - int? value, { - bool include = false, - }) { + numberOfMessagesLessThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numberOfMessages', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numberOfMessages', + value: value, + ), + ); }); } QueryBuilder - numberOfMessagesBetween( + numberOfMessagesBetween( int? lower, int? upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numberOfMessages', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numberOfMessages', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - onChainNoteIsNull() { + onChainNoteIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'onChainNote', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'onChainNote'), + ); }); } QueryBuilder - onChainNoteIsNotNull() { + onChainNoteIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'onChainNote', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'onChainNote'), + ); }); } - - QueryBuilder - onChainNoteEqualTo( - String? value, { - bool caseSensitive = true, - }) { + + QueryBuilder + onChainNoteEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteGreaterThan( + onChainNoteGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteLessThan( + onChainNoteLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteBetween( + onChainNoteBetween( String? lower, String? upper, { bool includeLower = true, @@ -1736,153 +1767,158 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'onChainNote', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'onChainNote', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteStartsWith( - String value, { - bool caseSensitive = true, - }) { + onChainNoteStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteEndsWith( - String value, { - bool caseSensitive = true, - }) { + onChainNoteEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteContains(String value, {bool caseSensitive = true}) { + onChainNoteContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'onChainNote', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'onChainNote', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteMatches(String pattern, {bool caseSensitive = true}) { + onChainNoteMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'onChainNote', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'onChainNote', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - onChainNoteIsEmpty() { + onChainNoteIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'onChainNote', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'onChainNote', value: ''), + ); }); } QueryBuilder - onChainNoteIsNotEmpty() { + onChainNoteIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'onChainNote', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'onChainNote', value: ''), + ); }); } QueryBuilder - otherDataIsNull() { + otherDataIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherData'), + ); }); } QueryBuilder - otherDataIsNotNull() { + otherDataIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherData', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherData'), + ); }); } QueryBuilder - otherDataEqualTo( - String? value, { - bool caseSensitive = true, - }) { + otherDataEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataGreaterThan( + otherDataGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataLessThan( + otherDataLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataBetween( + otherDataBetween( String? lower, String? upper, { bool includeLower = true, @@ -1890,160 +1926,126 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherData', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherData', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataStartsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataEndsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataContains(String value, {bool caseSensitive = true}) { + otherDataContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherData', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherData', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataMatches(String pattern, {bool caseSensitive = true}) { + otherDataMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherData', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherData', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataIsEmpty() { + otherDataIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherData', value: ''), + ); }); } QueryBuilder - otherDataIsNotEmpty() { + otherDataIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherData', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherData', value: ''), + ); }); } QueryBuilder - outputsLengthEqualTo(int length) { + outputsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - length, - true, - length, - true, - ); + return query.listLength(r'outputs', length, true, length, true); }); } QueryBuilder - outputsIsEmpty() { + outputsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - true, - 0, - true, - ); + return query.listLength(r'outputs', 0, true, 0, true); }); } QueryBuilder - outputsIsNotEmpty() { + outputsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - false, - 999999, - true, - ); + return query.listLength(r'outputs', 0, false, 999999, true); }); } QueryBuilder - outputsLengthLessThan( - int length, { - bool include = false, - }) { + outputsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - 0, - true, - length, - include, - ); + return query.listLength(r'outputs', 0, true, length, include); }); } QueryBuilder - outputsLengthGreaterThan( - int length, { - bool include = false, - }) { + outputsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'outputs', - length, - include, - 999999, - true, - ); + return query.listLength(r'outputs', length, include, 999999, true); }); } QueryBuilder - outputsLengthBetween( + outputsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -2061,71 +2063,74 @@ extension TransactionV2QueryFilter } QueryBuilder - slateIdIsNull() { + slateIdIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'slateId', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'slateId'), + ); }); } QueryBuilder - slateIdIsNotNull() { + slateIdIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'slateId', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'slateId'), + ); }); } QueryBuilder - slateIdEqualTo( - String? value, { - bool caseSensitive = true, - }) { + slateIdEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdGreaterThan( + slateIdGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdLessThan( + slateIdLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdBetween( + slateIdBetween( String? lower, String? upper, { bool includeLower = true, @@ -2133,196 +2138,196 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'slateId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'slateId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + slateIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + slateIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdContains(String value, {bool caseSensitive = true}) { + slateIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'slateId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'slateId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdMatches(String pattern, {bool caseSensitive = true}) { + slateIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'slateId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'slateId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - slateIdIsEmpty() { + slateIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'slateId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'slateId', value: ''), + ); }); } QueryBuilder - slateIdIsNotEmpty() { + slateIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'slateId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'slateId', value: ''), + ); }); } QueryBuilder - subTypeEqualTo(TransactionSubType value) { + subTypeEqualTo(TransactionSubType value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'subType', value: value), + ); }); } QueryBuilder - subTypeGreaterThan( - TransactionSubType value, { - bool include = false, - }) { + subTypeGreaterThan(TransactionSubType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } QueryBuilder - subTypeLessThan( - TransactionSubType value, { - bool include = false, - }) { + subTypeLessThan(TransactionSubType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'subType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'subType', + value: value, + ), + ); }); } QueryBuilder - subTypeBetween( + subTypeBetween( TransactionSubType lower, TransactionSubType upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'subType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'subType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - timestampEqualTo(int value) { + timestampEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'timestamp', value: value), + ); }); } QueryBuilder - timestampGreaterThan( - int value, { - bool include = false, - }) { + timestampGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'timestamp', + value: value, + ), + ); }); } QueryBuilder - timestampLessThan( - int value, { - bool include = false, - }) { + timestampLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'timestamp', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'timestamp', + value: value, + ), + ); }); } QueryBuilder - timestampBetween( + timestampBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'timestamp', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'timestamp', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -2331,43 +2336,49 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidGreaterThan( + txidGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidLessThan( + txidLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2379,123 +2390,124 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidStartsWith( - String value, { - bool caseSensitive = true, - }) { + txidStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidEndsWith( - String value, { - bool caseSensitive = true, - }) { + txidEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidContains(String value, {bool caseSensitive = true}) { + txidContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidIsEmpty() { + txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder - txidIsNotEmpty() { + txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder typeEqualTo( - TransactionType value) { + TransactionType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'type', value: value), + ); }); } QueryBuilder - typeGreaterThan( - TransactionType value, { - bool include = false, - }) { + typeGreaterThan(TransactionType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + ), + ); }); } QueryBuilder - typeLessThan( - TransactionType value, { - bool include = false, - }) { + typeLessThan(TransactionType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -2506,120 +2518,124 @@ extension TransactionV2QueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'type', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - versionEqualTo(int value) { + versionEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'version', value: value), + ); }); } QueryBuilder - versionGreaterThan( - int value, { - bool include = false, - }) { + versionGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'version', + value: value, + ), + ); }); } QueryBuilder - versionLessThan( - int value, { - bool include = false, - }) { + versionLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'version', + value: value, + ), + ); }); } QueryBuilder - versionBetween( + versionBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'version', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'version', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { + walletIdEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -2627,84 +2643,86 @@ extension TransactionV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { + walletIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -2712,14 +2730,14 @@ extension TransactionV2QueryFilter extension TransactionV2QueryObject on QueryBuilder { QueryBuilder - inputsElement(FilterQuery q) { + inputsElement(FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.object(q, r'inputs'); }); } QueryBuilder - outputsElement(FilterQuery q) { + outputsElement(FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.object(q, r'outputs'); }); @@ -2738,21 +2756,21 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByBlockHashDesc() { + sortByBlockHashDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'blockHash', Sort.desc); }); } QueryBuilder - sortByContractAddress() { + sortByContractAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'contractAddress', Sort.asc); }); } QueryBuilder - sortByContractAddressDesc() { + sortByContractAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'contractAddress', Sort.desc); }); @@ -2789,21 +2807,21 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByIsCancelledDesc() { + sortByIsCancelledDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isCancelled', Sort.desc); }); } QueryBuilder - sortByIsEpiccashTransaction() { + sortByIsEpiccashTransaction() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isEpiccashTransaction', Sort.asc); }); } QueryBuilder - sortByIsEpiccashTransactionDesc() { + sortByIsEpiccashTransactionDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isEpiccashTransaction', Sort.desc); }); @@ -2822,14 +2840,14 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByNumberOfMessages() { + sortByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.asc); }); } QueryBuilder - sortByNumberOfMessagesDesc() { + sortByNumberOfMessagesDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.desc); }); @@ -2842,7 +2860,7 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByOnChainNoteDesc() { + sortByOnChainNoteDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'onChainNote', Sort.desc); }); @@ -2855,7 +2873,7 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByOtherDataDesc() { + sortByOtherDataDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherData', Sort.desc); }); @@ -2892,7 +2910,7 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByTimestampDesc() { + sortByTimestampDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'timestamp', Sort.desc); }); @@ -2941,7 +2959,7 @@ extension TransactionV2QuerySortBy } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -2957,21 +2975,21 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByBlockHashDesc() { + thenByBlockHashDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'blockHash', Sort.desc); }); } QueryBuilder - thenByContractAddress() { + thenByContractAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'contractAddress', Sort.asc); }); } QueryBuilder - thenByContractAddressDesc() { + thenByContractAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'contractAddress', Sort.desc); }); @@ -3020,21 +3038,21 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByIsCancelledDesc() { + thenByIsCancelledDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isCancelled', Sort.desc); }); } QueryBuilder - thenByIsEpiccashTransaction() { + thenByIsEpiccashTransaction() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isEpiccashTransaction', Sort.asc); }); } QueryBuilder - thenByIsEpiccashTransactionDesc() { + thenByIsEpiccashTransactionDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isEpiccashTransaction', Sort.desc); }); @@ -3053,14 +3071,14 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByNumberOfMessages() { + thenByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.asc); }); } QueryBuilder - thenByNumberOfMessagesDesc() { + thenByNumberOfMessagesDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberOfMessages', Sort.desc); }); @@ -3073,7 +3091,7 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByOnChainNoteDesc() { + thenByOnChainNoteDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'onChainNote', Sort.desc); }); @@ -3086,7 +3104,7 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByOtherDataDesc() { + thenByOtherDataDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherData', Sort.desc); }); @@ -3123,7 +3141,7 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByTimestampDesc() { + thenByTimestampDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'timestamp', Sort.desc); }); @@ -3172,7 +3190,7 @@ extension TransactionV2QuerySortThenBy } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -3181,23 +3199,27 @@ extension TransactionV2QuerySortThenBy extension TransactionV2QueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByBlockHash( - {bool caseSensitive = true}) { + QueryBuilder distinctByBlockHash({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'blockHash', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByContractAddress({bool caseSensitive = true}) { + distinctByContractAddress({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'contractAddress', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'contractAddress', + caseSensitive: caseSensitive, + ); }); } - QueryBuilder distinctByHash( - {bool caseSensitive = true}) { + QueryBuilder distinctByHash({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'hash', caseSensitive: caseSensitive); }); @@ -3210,14 +3232,14 @@ extension TransactionV2QueryWhereDistinct } QueryBuilder - distinctByIsCancelled() { + distinctByIsCancelled() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'isCancelled'); }); } QueryBuilder - distinctByIsEpiccashTransaction() { + distinctByIsEpiccashTransaction() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'isEpiccashTransaction'); }); @@ -3230,28 +3252,31 @@ extension TransactionV2QueryWhereDistinct } QueryBuilder - distinctByNumberOfMessages() { + distinctByNumberOfMessages() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numberOfMessages'); }); } - QueryBuilder distinctByOnChainNote( - {bool caseSensitive = true}) { + QueryBuilder distinctByOnChainNote({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'onChainNote', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByOtherData( - {bool caseSensitive = true}) { + QueryBuilder distinctByOtherData({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'otherData', caseSensitive: caseSensitive); }); } - QueryBuilder distinctBySlateId( - {bool caseSensitive = true}) { + QueryBuilder distinctBySlateId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'slateId', caseSensitive: caseSensitive); }); @@ -3269,8 +3294,9 @@ extension TransactionV2QueryWhereDistinct }); } - QueryBuilder distinctByTxid( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxid({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txid', caseSensitive: caseSensitive); }); @@ -3288,8 +3314,9 @@ extension TransactionV2QueryWhereDistinct }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -3311,7 +3338,7 @@ extension TransactionV2QueryProperty } QueryBuilder - contractAddressProperty() { + contractAddressProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'contractAddress'); }); @@ -3330,7 +3357,7 @@ extension TransactionV2QueryProperty } QueryBuilder, QQueryOperations> - inputsProperty() { + inputsProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'inputs'); }); @@ -3343,7 +3370,7 @@ extension TransactionV2QueryProperty } QueryBuilder - isEpiccashTransactionProperty() { + isEpiccashTransactionProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'isEpiccashTransaction'); }); @@ -3356,7 +3383,7 @@ extension TransactionV2QueryProperty } QueryBuilder - numberOfMessagesProperty() { + numberOfMessagesProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'numberOfMessages'); }); @@ -3375,7 +3402,7 @@ extension TransactionV2QueryProperty } QueryBuilder, QQueryOperations> - outputsProperty() { + outputsProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'outputs'); }); @@ -3388,7 +3415,7 @@ extension TransactionV2QueryProperty } QueryBuilder - subTypeProperty() { + subTypeProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'subType'); }); @@ -3407,7 +3434,7 @@ extension TransactionV2QueryProperty } QueryBuilder - typeProperty() { + typeProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'type'); }); diff --git a/lib/models/isar/models/contact_entry.dart b/lib/models/isar/models/contact_entry.dart index 66cd68dc1..af926e5fb 100644 --- a/lib/models/isar/models/contact_entry.dart +++ b/lib/models/isar/models/contact_entry.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../app_config.dart'; import '../../../wallets/crypto_currency/crypto_currency.dart'; diff --git a/lib/models/isar/models/contact_entry.g.dart b/lib/models/isar/models/contact_entry.g.dart index 282112f55..99b745c3a 100644 --- a/lib/models/isar/models/contact_entry.g.dart +++ b/lib/models/isar/models/contact_entry.g.dart @@ -21,6 +21,7 @@ const ContactEntrySchema = CollectionSchema( id: 0, name: r'addresses', type: IsarType.objectList, + target: r'ContactAddressEntry', ), r'customId': PropertySchema( @@ -38,12 +39,9 @@ const ContactEntrySchema = CollectionSchema( name: r'isFavorite', type: IsarType.bool, ), - r'name': PropertySchema( - id: 4, - name: r'name', - type: IsarType.string, - ) + r'name': PropertySchema(id: 4, name: r'name', type: IsarType.string), }, + estimateSize: _contactEntryEstimateSize, serialize: _contactEntrySerialize, deserialize: _contactEntryDeserialize, @@ -60,16 +58,17 @@ const ContactEntrySchema = CollectionSchema( name: r'customId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {r'ContactAddressEntry': ContactAddressEntrySchema}, + getId: _contactEntryGetId, getLinks: _contactEntryGetLinks, attach: _contactEntryAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _contactEntryEstimateSize( @@ -83,8 +82,11 @@ int _contactEntryEstimateSize( final offsets = allOffsets[ContactAddressEntry]!; for (var i = 0; i < object.addresses.length; i++) { final value = object.addresses[i]; - bytesCount += - ContactAddressEntrySchema.estimateSize(value, offsets, allOffsets); + bytesCount += ContactAddressEntrySchema.estimateSize( + value, + offsets, + allOffsets, + ); } } bytesCount += 3 + object.customId.length * 3; @@ -123,7 +125,8 @@ ContactEntry _contactEntryDeserialize( Map> allOffsets, ) { final object = ContactEntry( - addresses: reader.readObjectList( + addresses: + reader.readObjectList( offsets[0], ContactAddressEntrySchema.deserialize, allOffsets, @@ -148,12 +151,13 @@ P _contactEntryDeserializeProp

( switch (propertyId) { case 0: return (reader.readObjectList( - offset, - ContactAddressEntrySchema.deserialize, - allOffsets, - ContactAddressEntry(), - ) ?? - []) as P; + offset, + ContactAddressEntrySchema.deserialize, + allOffsets, + ContactAddressEntry(), + ) ?? + []) + as P; case 1: return (reader.readString(offset)) as P; case 2: @@ -176,7 +180,10 @@ List> _contactEntryGetLinks(ContactEntry object) { } void _contactEntryAttach( - IsarCollection col, Id id, ContactEntry object) { + IsarCollection col, + Id id, + ContactEntry object, +) { object.id = id; } @@ -229,8 +236,10 @@ extension ContactEntryByIndex on IsarCollection { return putAllByIndex(r'customId', objects); } - List putAllByCustomIdSync(List objects, - {bool saveLinks = true}) { + List putAllByCustomIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'customId', objects, saveLinks: saveLinks); } } @@ -248,15 +257,13 @@ extension ContactEntryQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -279,8 +286,9 @@ extension ContactEntryQueryWhere } QueryBuilder idGreaterThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -288,8 +296,10 @@ extension ContactEntryQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -304,56 +314,66 @@ extension ContactEntryQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder customIdEqualTo( - String customId) { + String customId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'customId', - value: [customId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'customId', value: [customId]), + ); }); } QueryBuilder - customIdNotEqualTo(String customId) { + customIdNotEqualTo(String customId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'customId', - lower: [], - upper: [customId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'customId', - lower: [customId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'customId', + lower: [], + upper: [customId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'customId', + lower: [customId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'customId', - lower: [customId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'customId', - lower: [], - upper: [customId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'customId', + lower: [customId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'customId', + lower: [], + upper: [customId], + includeUpper: false, + ), + ); } }); } @@ -362,78 +382,42 @@ extension ContactEntryQueryWhere extension ContactEntryQueryFilter on QueryBuilder { QueryBuilder - addressesLengthEqualTo(int length) { + addressesLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - true, - length, - true, - ); + return query.listLength(r'addresses', length, true, length, true); }); } QueryBuilder - addressesIsEmpty() { + addressesIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - 0, - true, - ); + return query.listLength(r'addresses', 0, true, 0, true); }); } QueryBuilder - addressesIsNotEmpty() { + addressesIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - false, - 999999, - true, - ); + return query.listLength(r'addresses', 0, false, 999999, true); }); } QueryBuilder - addressesLengthLessThan( - int length, { - bool include = false, - }) { + addressesLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - 0, - true, - length, - include, - ); + return query.listLength(r'addresses', 0, true, length, include); }); } QueryBuilder - addressesLengthGreaterThan( - int length, { - bool include = false, - }) { + addressesLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'addresses', - length, - include, - 999999, - true, - ); + return query.listLength(r'addresses', length, include, 999999, true); }); } QueryBuilder - addressesLengthBetween( + addressesLengthBetween( int lower, int upper, { bool includeLower = true, @@ -451,53 +435,56 @@ extension ContactEntryQueryFilter } QueryBuilder - customIdEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + customIdEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdGreaterThan( + customIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdLessThan( + customIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdBetween( + customIdBetween( String lower, String upper, { bool includeLower = true, @@ -505,153 +492,158 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'customId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'customId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + customIdStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + customIdEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'customId', - value: value, - caseSensitive: caseSensitive, - )); + customIdContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'customId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'customId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + customIdMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'customId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - customIdIsEmpty() { + customIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'customId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'customId', value: ''), + ); }); } QueryBuilder - customIdIsNotEmpty() { + customIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'customId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'customId', value: ''), + ); }); } QueryBuilder - emojiCharIsNull() { + emojiCharIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'emojiChar', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'emojiChar'), + ); }); } QueryBuilder - emojiCharIsNotNull() { + emojiCharIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'emojiChar', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'emojiChar'), + ); }); } QueryBuilder - emojiCharEqualTo( - String? value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + emojiCharEqualTo(String? value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharGreaterThan( + emojiCharGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharLessThan( + emojiCharLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharBetween( + emojiCharBetween( String? lower, String? upper, { bool includeLower = true, @@ -659,94 +651,96 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'emojiChar', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'emojiChar', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + emojiCharStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + emojiCharEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'emojiChar', - value: value, - caseSensitive: caseSensitive, - )); + emojiCharContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'emojiChar', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'emojiChar', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + emojiCharMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'emojiChar', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - emojiCharIsEmpty() { + emojiCharIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'emojiChar', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'emojiChar', value: ''), + ); }); } QueryBuilder - emojiCharIsNotEmpty() { + emojiCharIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'emojiChar', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'emojiChar', value: ''), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -755,11 +749,13 @@ extension ContactEntryQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -768,11 +764,13 @@ extension ContactEntryQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -783,23 +781,24 @@ extension ContactEntryQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - isFavoriteEqualTo(bool value) { + isFavoriteEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isFavorite', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isFavorite', value: value), + ); }); } @@ -808,27 +807,31 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - nameGreaterThan( + nameGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -838,12 +841,14 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -855,28 +860,29 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - nameStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + nameStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -885,55 +891,61 @@ extension ContactEntryQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - nameIsEmpty() { + nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder - nameIsNotEmpty() { + nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } } @@ -941,7 +953,7 @@ extension ContactEntryQueryFilter extension ContactEntryQueryObject on QueryBuilder { QueryBuilder - addressesElement(FilterQuery q) { + addressesElement(FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.object(q, r'addresses'); }); @@ -984,7 +996,7 @@ extension ContactEntryQuerySortBy } QueryBuilder - sortByIsFavoriteDesc() { + sortByIsFavoriteDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isFavorite', Sort.desc); }); @@ -1048,7 +1060,7 @@ extension ContactEntryQuerySortThenBy } QueryBuilder - thenByIsFavoriteDesc() { + thenByIsFavoriteDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isFavorite', Sort.desc); }); @@ -1069,15 +1081,17 @@ extension ContactEntryQuerySortThenBy extension ContactEntryQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByCustomId( - {bool caseSensitive = true}) { + QueryBuilder distinctByCustomId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'customId', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByEmojiChar( - {bool caseSensitive = true}) { + QueryBuilder distinctByEmojiChar({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'emojiChar', caseSensitive: caseSensitive); }); @@ -1089,8 +1103,9 @@ extension ContactEntryQueryWhereDistinct }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); @@ -1106,7 +1121,7 @@ extension ContactEntryQueryProperty } QueryBuilder, QQueryOperations> - addressesProperty() { + addressesProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'addresses'); }); @@ -1148,27 +1163,16 @@ const ContactAddressEntrySchema = Schema( name: r'ContactAddressEntry', id: 2556413586404997281, properties: { - r'address': PropertySchema( - id: 0, - name: r'address', - type: IsarType.string, - ), + r'address': PropertySchema(id: 0, name: r'address', type: IsarType.string), r'coinName': PropertySchema( id: 1, name: r'coinName', type: IsarType.string, ), - r'label': PropertySchema( - id: 2, - name: r'label', - type: IsarType.string, - ), - r'other': PropertySchema( - id: 3, - name: r'other', - type: IsarType.string, - ) + r'label': PropertySchema(id: 2, name: r'label', type: IsarType.string), + r'other': PropertySchema(id: 3, name: r'other', type: IsarType.string), }, + estimateSize: _contactAddressEntryEstimateSize, serialize: _contactAddressEntrySerialize, deserialize: _contactAddressEntryDeserialize, @@ -1239,56 +1243,64 @@ P _contactAddressEntryDeserializeProp

( } } -extension ContactAddressEntryQueryFilter on QueryBuilder { +extension ContactAddressEntryQueryFilter + on + QueryBuilder< + ContactAddressEntry, + ContactAddressEntry, + QFilterCondition + > { QueryBuilder - addressEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + addressEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressGreaterThan( + addressGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressLessThan( + addressLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressBetween( + addressBetween( String lower, String upper, { bool includeLower = true, @@ -1296,135 +1308,140 @@ extension ContactAddressEntryQueryFilter on QueryBuilder - addressStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + addressStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + addressEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + addressContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'address', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + addressMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'address', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressIsEmpty() { + addressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'address', value: ''), + ); }); } QueryBuilder - addressIsNotEmpty() { + addressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'address', value: ''), + ); }); } QueryBuilder - coinNameEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + coinNameEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameGreaterThan( + coinNameGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameLessThan( + coinNameLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameBetween( + coinNameBetween( String lower, String upper, { bool includeLower = true, @@ -1432,135 +1449,140 @@ extension ContactAddressEntryQueryFilter on QueryBuilder - coinNameStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + coinNameStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + coinNameEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + coinNameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinName', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + coinNameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinName', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameIsEmpty() { + coinNameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinName', value: ''), + ); }); } QueryBuilder - coinNameIsNotEmpty() { + coinNameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinName', value: ''), + ); }); } QueryBuilder - labelEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + labelEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelGreaterThan( + labelGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelLessThan( + labelLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelBetween( + labelBetween( String lower, String upper, { bool includeLower = true, @@ -1568,153 +1590,158 @@ extension ContactAddressEntryQueryFilter on QueryBuilder - labelStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + labelStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + labelEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + labelContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'label', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + labelMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'label', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelIsEmpty() { + labelIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'label', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'label', value: ''), + ); }); } QueryBuilder - labelIsNotEmpty() { + labelIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'label', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'label', value: ''), + ); }); } QueryBuilder - otherIsNull() { + otherIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'other', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'other'), + ); }); } QueryBuilder - otherIsNotNull() { + otherIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'other', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'other'), + ); }); } QueryBuilder - otherEqualTo( - String? value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + otherEqualTo(String? value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherGreaterThan( + otherGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherLessThan( + otherLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherBetween( + otherBetween( String? lower, String? upper, { bool includeLower = true, @@ -1722,87 +1749,94 @@ extension ContactAddressEntryQueryFilter on QueryBuilder - otherStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + otherStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + otherEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'other', - value: value, - caseSensitive: caseSensitive, - )); + otherContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'other', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'other', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + otherMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'other', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherIsEmpty() { + otherIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'other', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'other', value: ''), + ); }); } QueryBuilder - otherIsNotEmpty() { + otherIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'other', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'other', value: ''), + ); }); } } -extension ContactAddressEntryQueryObject on QueryBuilder {} +extension ContactAddressEntryQueryObject + on + QueryBuilder< + ContactAddressEntry, + ContactAddressEntry, + QFilterCondition + > {} diff --git a/lib/models/isar/models/encrypted_string_value.dart b/lib/models/isar/models/encrypted_string_value.dart index 96b3d1799..c2223584f 100644 --- a/lib/models/isar/models/encrypted_string_value.dart +++ b/lib/models/isar/models/encrypted_string_value.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'encrypted_string_value.g.dart'; diff --git a/lib/models/isar/models/encrypted_string_value.g.dart b/lib/models/isar/models/encrypted_string_value.g.dart index 5b3490dcc..2b9960011 100644 --- a/lib/models/isar/models/encrypted_string_value.g.dart +++ b/lib/models/isar/models/encrypted_string_value.g.dart @@ -18,17 +18,10 @@ const EncryptedStringValueSchema = CollectionSchema( name: r'EncryptedStringValue', id: 4826543019451092626, properties: { - r'key': PropertySchema( - id: 0, - name: r'key', - type: IsarType.string, - ), - r'value': PropertySchema( - id: 1, - name: r'value', - type: IsarType.string, - ) + r'key': PropertySchema(id: 0, name: r'key', type: IsarType.string), + r'value': PropertySchema(id: 1, name: r'value', type: IsarType.string), }, + estimateSize: _encryptedStringValueEstimateSize, serialize: _encryptedStringValueSerialize, deserialize: _encryptedStringValueDeserialize, @@ -45,16 +38,17 @@ const EncryptedStringValueSchema = CollectionSchema( name: r'key', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _encryptedStringValueGetId, getLinks: _encryptedStringValueGetLinks, attach: _encryptedStringValueAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _encryptedStringValueEstimateSize( @@ -112,12 +106,16 @@ Id _encryptedStringValueGetId(EncryptedStringValue object) { } List> _encryptedStringValueGetLinks( - EncryptedStringValue object) { + EncryptedStringValue object, +) { return []; } void _encryptedStringValueAttach( - IsarCollection col, Id id, EncryptedStringValue object) { + IsarCollection col, + Id id, + EncryptedStringValue object, +) { object.id = id; } @@ -170,8 +168,10 @@ extension EncryptedStringValueByIndex on IsarCollection { return putAllByIndex(r'key', objects); } - List putAllByKeySync(List objects, - {bool saveLinks = true}) { + List putAllByKeySync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'key', objects, saveLinks: saveLinks); } } @@ -179,7 +179,7 @@ extension EncryptedStringValueByIndex on IsarCollection { extension EncryptedStringValueQueryWhereSort on QueryBuilder { QueryBuilder - anyId() { + anyId() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(const IdWhereClause.any()); }); @@ -189,17 +189,14 @@ extension EncryptedStringValueQueryWhereSort extension EncryptedStringValueQueryWhere on QueryBuilder { QueryBuilder - idEqualTo(Id id) { + idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder - idNotEqualTo(Id id) { + idNotEqualTo(Id id) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -222,7 +219,7 @@ extension EncryptedStringValueQueryWhere } QueryBuilder - idGreaterThan(Id id, {bool include = false}) { + idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -231,7 +228,7 @@ extension EncryptedStringValueQueryWhere } QueryBuilder - idLessThan(Id id, {bool include = false}) { + idLessThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -240,174 +237,218 @@ extension EncryptedStringValueQueryWhere } QueryBuilder - idBetween( + idBetween( Id lowerId, Id upperId, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - keyEqualTo(String key) { + keyEqualTo(String key) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'key', - value: [key], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'key', value: [key]), + ); }); } QueryBuilder - keyNotEqualTo(String key) { + keyNotEqualTo(String key) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'key', - lower: [], - upper: [key], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'key', - lower: [key], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'key', + lower: [], + upper: [key], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'key', + lower: [key], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'key', - lower: [key], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'key', - lower: [], - upper: [key], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'key', + lower: [key], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'key', + lower: [], + upper: [key], + includeUpper: false, + ), + ); } }); } } -extension EncryptedStringValueQueryFilter on QueryBuilder { - QueryBuilder idEqualTo(Id value) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); +extension EncryptedStringValueQueryFilter + on + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QFilterCondition + > { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + idEqualTo(Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } - QueryBuilder idGreaterThan( - Id value, { - bool include = false, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } - QueryBuilder idLessThan( - Id value, { - bool include = false, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + idLessThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } - QueryBuilder idBetween( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + idBetween( Id lower, Id upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } - QueryBuilder keyEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder keyGreaterThan( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder keyLessThan( - String value, { - bool include = false, - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyLessThan(String value, {bool include = false, bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder keyBetween( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyBetween( String lower, String upper, { bool includeLower = true, @@ -415,137 +456,180 @@ extension EncryptedStringValueQueryFilter on QueryBuilder keyStartsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder keyEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - keyContains(String value, {bool caseSensitive = true}) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'key', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'key', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - keyMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'key', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'key', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder keyIsEmpty() { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'key', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'key', value: ''), + ); }); } - QueryBuilder keyIsNotEmpty() { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + keyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'key', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'key', value: ''), + ); }); } - QueryBuilder valueEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder valueGreaterThan( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder valueLessThan( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder valueBetween( + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueBetween( String lower, String upper, { bool includeLower = true, @@ -553,121 +637,155 @@ extension EncryptedStringValueQueryFilter on QueryBuilder valueStartsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder valueEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - valueContains(String value, {bool caseSensitive = true}) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - valueMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder valueIsEmpty() { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } - QueryBuilder valueIsNotEmpty() { + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QAfterFilterCondition + > + valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } } -extension EncryptedStringValueQueryObject on QueryBuilder {} - -extension EncryptedStringValueQueryLinks on QueryBuilder {} +extension EncryptedStringValueQueryObject + on + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QFilterCondition + > {} + +extension EncryptedStringValueQueryLinks + on + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QFilterCondition + > {} extension EncryptedStringValueQuerySortBy on QueryBuilder { QueryBuilder - sortByKey() { + sortByKey() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'key', Sort.asc); }); } QueryBuilder - sortByKeyDesc() { + sortByKeyDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'key', Sort.desc); }); } QueryBuilder - sortByValue() { + sortByValue() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.asc); }); } QueryBuilder - sortByValueDesc() { + sortByValueDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.desc); }); @@ -677,42 +795,42 @@ extension EncryptedStringValueQuerySortBy extension EncryptedStringValueQuerySortThenBy on QueryBuilder { QueryBuilder - thenById() { + thenById() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.asc); }); } QueryBuilder - thenByIdDesc() { + thenByIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.desc); }); } QueryBuilder - thenByKey() { + thenByKey() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'key', Sort.asc); }); } QueryBuilder - thenByKeyDesc() { + thenByKeyDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'key', Sort.desc); }); } QueryBuilder - thenByValue() { + thenByValue() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.asc); }); } QueryBuilder - thenByValueDesc() { + thenByValueDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.desc); }); @@ -722,22 +840,27 @@ extension EncryptedStringValueQuerySortThenBy extension EncryptedStringValueQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByKey({bool caseSensitive = true}) { + distinctByKey({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'key', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByValue({bool caseSensitive = true}) { + distinctByValue({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'value', caseSensitive: caseSensitive); }); } } -extension EncryptedStringValueQueryProperty on QueryBuilder< - EncryptedStringValue, EncryptedStringValue, QQueryProperty> { +extension EncryptedStringValueQueryProperty + on + QueryBuilder< + EncryptedStringValue, + EncryptedStringValue, + QQueryProperty + > { QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'id'); diff --git a/lib/models/isar/models/ethereum/eth_contract.dart b/lib/models/isar/models/ethereum/eth_contract.dart index df19d9d8d..adaec3122 100644 --- a/lib/models/isar/models/ethereum/eth_contract.dart +++ b/lib/models/isar/models/ethereum/eth_contract.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../contract.dart'; part 'eth_contract.g.dart'; diff --git a/lib/models/isar/models/ethereum/eth_contract.g.dart b/lib/models/isar/models/ethereum/eth_contract.g.dart index fcb1af11d..b5b3aadbc 100644 --- a/lib/models/isar/models/ethereum/eth_contract.g.dart +++ b/lib/models/isar/models/ethereum/eth_contract.g.dart @@ -17,38 +17,19 @@ const EthContractSchema = CollectionSchema( name: r'EthContract', id: 3784021410994159165, properties: { - r'abi': PropertySchema( - id: 0, - name: r'abi', - type: IsarType.string, - ), - r'address': PropertySchema( - id: 1, - name: r'address', - type: IsarType.string, - ), - r'decimals': PropertySchema( - id: 2, - name: r'decimals', - type: IsarType.long, - ), - r'name': PropertySchema( - id: 3, - name: r'name', - type: IsarType.string, - ), - r'symbol': PropertySchema( - id: 4, - name: r'symbol', - type: IsarType.string, - ), + r'abi': PropertySchema(id: 0, name: r'abi', type: IsarType.string), + r'address': PropertySchema(id: 1, name: r'address', type: IsarType.string), + r'decimals': PropertySchema(id: 2, name: r'decimals', type: IsarType.long), + r'name': PropertySchema(id: 3, name: r'name', type: IsarType.string), + r'symbol': PropertySchema(id: 4, name: r'symbol', type: IsarType.string), r'type': PropertySchema( id: 5, name: r'type', type: IsarType.byte, enumMap: _EthContracttypeEnumValueMap, - ) + ), }, + estimateSize: _ethContractEstimateSize, serialize: _ethContractSerialize, deserialize: _ethContractDeserialize, @@ -65,16 +46,17 @@ const EthContractSchema = CollectionSchema( name: r'address', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _ethContractGetId, getLinks: _ethContractGetLinks, attach: _ethContractAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _ethContractEstimateSize( @@ -121,7 +103,8 @@ EthContract _ethContractDeserialize( decimals: reader.readLong(offsets[2]), name: reader.readString(offsets[3]), symbol: reader.readString(offsets[4]), - type: _EthContracttypeValueEnumMap[reader.readByteOrNull(offsets[5])] ?? + type: + _EthContracttypeValueEnumMap[reader.readByteOrNull(offsets[5])] ?? EthContractType.unknown, ); object.id = id; @@ -147,17 +130,14 @@ P _ethContractDeserializeProp

( return (reader.readString(offset)) as P; case 5: return (_EthContracttypeValueEnumMap[reader.readByteOrNull(offset)] ?? - EthContractType.unknown) as P; + EthContractType.unknown) + as P; default: throw IsarError('Unknown property with id $propertyId'); } } -const _EthContracttypeEnumValueMap = { - 'unknown': 0, - 'erc20': 1, - 'erc721': 2, -}; +const _EthContracttypeEnumValueMap = {'unknown': 0, 'erc20': 1, 'erc721': 2}; const _EthContracttypeValueEnumMap = { 0: EthContractType.unknown, 1: EthContractType.erc20, @@ -173,7 +153,10 @@ List> _ethContractGetLinks(EthContract object) { } void _ethContractAttach( - IsarCollection col, Id id, EthContract object) { + IsarCollection col, + Id id, + EthContract object, +) { object.id = id; } @@ -226,8 +209,10 @@ extension EthContractByIndex on IsarCollection { return putAllByIndex(r'address', objects); } - List putAllByAddressSync(List objects, - {bool saveLinks = true}) { + List putAllByAddressSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'address', objects, saveLinks: saveLinks); } } @@ -245,15 +230,13 @@ extension EthContractQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -275,8 +258,10 @@ extension EthContractQueryWhere }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -284,8 +269,10 @@ extension EthContractQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -300,56 +287,67 @@ extension EthContractQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder addressEqualTo( - String address) { + String address, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'address', - value: [address], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'address', value: [address]), + ); }); } QueryBuilder addressNotEqualTo( - String address) { + String address, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'address', - lower: [], - upper: [address], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'address', - lower: [address], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'address', + lower: [], + upper: [address], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'address', + lower: [address], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'address', - lower: [address], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'address', - lower: [], - upper: [address], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'address', + lower: [address], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'address', + lower: [], + upper: [address], + includeUpper: false, + ), + ); } }); } @@ -359,17 +357,17 @@ extension EthContractQueryFilter on QueryBuilder { QueryBuilder abiIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'abi', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'abi'), + ); }); } QueryBuilder abiIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'abi', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'abi'), + ); }); } @@ -378,11 +376,13 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -392,12 +392,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -407,12 +409,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -424,14 +428,16 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'abi', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'abi', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -440,11 +446,13 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -453,54 +461,60 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder abiContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'abi', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'abi', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder abiMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'abi', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'abi', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder abiIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'abi', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'abi', value: ''), + ); }); } QueryBuilder - abiIsNotEmpty() { + abiIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'abi', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'abi', value: ''), + ); }); } @@ -509,27 +523,31 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressGreaterThan( + addressGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -539,12 +557,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -556,28 +576,29 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'address', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'address', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + addressStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -586,93 +607,97 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'address', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'address', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - addressIsEmpty() { + addressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'address', value: ''), + ); }); } QueryBuilder - addressIsNotEmpty() { + addressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'address', value: ''), + ); }); } QueryBuilder decimalsEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'decimals', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'decimals', value: value), + ); }); } QueryBuilder - decimalsGreaterThan( - int value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'decimals', - value: value, - )); + decimalsGreaterThan(int value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'decimals', + value: value, + ), + ); }); } QueryBuilder - decimalsLessThan( - int value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'decimals', - value: value, - )); + decimalsLessThan(int value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'decimals', + value: value, + ), + ); }); } @@ -683,23 +708,25 @@ extension EthContractQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'decimals', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'decimals', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -708,11 +735,13 @@ extension EthContractQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -721,11 +750,13 @@ extension EthContractQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -736,13 +767,15 @@ extension EthContractQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -751,11 +784,13 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -765,12 +800,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -780,12 +817,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -797,14 +836,16 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -813,11 +854,13 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -826,54 +869,60 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder - nameIsNotEmpty() { + nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } @@ -882,27 +931,31 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - symbolGreaterThan( + symbolGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -912,12 +965,14 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -929,28 +984,29 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'symbol', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'symbol', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - symbolStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + symbolStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -959,65 +1015,71 @@ extension EthContractQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder symbolContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'symbol', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'symbol', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder symbolMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'symbol', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'symbol', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - symbolIsEmpty() { + symbolIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'symbol', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'symbol', value: ''), + ); }); } QueryBuilder - symbolIsNotEmpty() { + symbolIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'symbol', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'symbol', value: ''), + ); }); } QueryBuilder typeEqualTo( - EthContractType value) { + EthContractType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'type', value: value), + ); }); } @@ -1026,11 +1088,13 @@ extension EthContractQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -1039,11 +1103,13 @@ extension EthContractQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -1054,13 +1120,15 @@ extension EthContractQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'type', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } } @@ -1235,15 +1303,17 @@ extension EthContractQuerySortThenBy extension EthContractQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByAbi( - {bool caseSensitive = true}) { + QueryBuilder distinctByAbi({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'abi', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByAddress( - {bool caseSensitive = true}) { + QueryBuilder distinctByAddress({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'address', caseSensitive: caseSensitive); }); @@ -1255,15 +1325,17 @@ extension EthContractQueryWhereDistinct }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } - QueryBuilder distinctBySymbol( - {bool caseSensitive = true}) { + QueryBuilder distinctBySymbol({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'symbol', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/log.dart b/lib/models/isar/models/log.dart index 79f5808b2..8fa1f1efd 100644 --- a/lib/models/isar/models/log.dart +++ b/lib/models/isar/models/log.dart @@ -8,7 +8,8 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + // import 'package:stackwallet/models/isar/type_converters/log_level_converter.dart'; import '../../../utilities/enums/log_level_enum.dart'; diff --git a/lib/models/isar/models/log.g.dart b/lib/models/isar/models/log.g.dart index ebad873f2..358c9c6b1 100644 --- a/lib/models/isar/models/log.g.dart +++ b/lib/models/isar/models/log.g.dart @@ -23,17 +23,14 @@ const LogSchema = CollectionSchema( type: IsarType.string, enumMap: _LoglogLevelEnumValueMap, ), - r'message': PropertySchema( - id: 1, - name: r'message', - type: IsarType.string, - ), + r'message': PropertySchema(id: 1, name: r'message', type: IsarType.string), r'timestampInMillisUTC': PropertySchema( id: 2, name: r'timestampInMillisUTC', type: IsarType.long, - ) + ), }, + estimateSize: _logEstimateSize, serialize: _logSerialize, deserialize: _logDeserialize, @@ -50,16 +47,17 @@ const LogSchema = CollectionSchema( name: r'timestampInMillisUTC', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _logGetId, getLinks: _logGetLinks, attach: _logAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _logEstimateSize( @@ -94,7 +92,7 @@ Log _logDeserialize( object.id = id; object.logLevel = _LoglogLevelValueEnumMap[reader.readStringOrNull(offsets[0])] ?? - LogLevel.Info; + LogLevel.Info; object.message = reader.readString(offsets[1]); object.timestampInMillisUTC = reader.readLong(offsets[2]); return object; @@ -109,7 +107,8 @@ P _logDeserializeProp

( switch (propertyId) { case 0: return (_LoglogLevelValueEnumMap[reader.readStringOrNull(offset)] ?? - LogLevel.Info) as P; + LogLevel.Info) + as P; case 1: return (reader.readString(offset)) as P; case 2: @@ -165,10 +164,7 @@ extension LogQueryWhereSort on QueryBuilder { extension LogQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -194,8 +190,10 @@ extension LogQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -203,8 +201,10 @@ extension LogQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -219,56 +219,70 @@ extension LogQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder timestampInMillisUTCEqualTo( - int timestampInMillisUTC) { + int timestampInMillisUTC, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'timestampInMillisUTC', - value: [timestampInMillisUTC], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'timestampInMillisUTC', + value: [timestampInMillisUTC], + ), + ); }); } QueryBuilder timestampInMillisUTCNotEqualTo( - int timestampInMillisUTC) { + int timestampInMillisUTC, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [], - upper: [timestampInMillisUTC], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [timestampInMillisUTC], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [], + upper: [timestampInMillisUTC], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [timestampInMillisUTC], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [timestampInMillisUTC], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [], - upper: [timestampInMillisUTC], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [timestampInMillisUTC], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [], + upper: [timestampInMillisUTC], + includeUpper: false, + ), + ); } }); } @@ -278,12 +292,14 @@ extension LogQueryWhere on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [timestampInMillisUTC], - includeLower: include, - upper: [], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [timestampInMillisUTC], + includeLower: include, + upper: [], + ), + ); }); } @@ -292,12 +308,14 @@ extension LogQueryWhere on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [], - upper: [timestampInMillisUTC], - includeUpper: include, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [], + upper: [timestampInMillisUTC], + includeUpper: include, + ), + ); }); } @@ -308,13 +326,15 @@ extension LogQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'timestampInMillisUTC', - lower: [lowerTimestampInMillisUTC], - includeLower: includeLower, - upper: [upperTimestampInMillisUTC], - includeUpper: includeUpper, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'timestampInMillisUTC', + lower: [lowerTimestampInMillisUTC], + includeLower: includeLower, + upper: [upperTimestampInMillisUTC], + includeUpper: includeUpper, + ), + ); }); } } @@ -322,10 +342,9 @@ extension LogQueryWhere on QueryBuilder { extension LogQueryFilter on QueryBuilder { QueryBuilder idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -334,11 +353,13 @@ extension LogQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -347,11 +368,13 @@ extension LogQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -362,13 +385,15 @@ extension LogQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -377,11 +402,13 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -391,12 +418,14 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -406,12 +435,14 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -423,14 +454,16 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'logLevel', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'logLevel', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -439,11 +472,13 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -452,51 +487,59 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder logLevelContains(String value, - {bool caseSensitive = true}) { + QueryBuilder logLevelContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'logLevel', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'logLevel', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder logLevelMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder logLevelMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'logLevel', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'logLevel', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder logLevelIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'logLevel', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'logLevel', value: ''), + ); }); } QueryBuilder logLevelIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'logLevel', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'logLevel', value: ''), + ); }); } @@ -505,11 +548,13 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -519,12 +564,14 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -534,12 +581,14 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -551,14 +600,16 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'message', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'message', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -567,11 +618,13 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -580,61 +633,72 @@ extension LogQueryFilter on QueryBuilder { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder messageContains(String value, - {bool caseSensitive = true}) { + QueryBuilder messageContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'message', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'message', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder messageMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder messageMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'message', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'message', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder messageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'message', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'message', value: ''), + ); }); } QueryBuilder messageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'message', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'message', value: ''), + ); }); } QueryBuilder timestampInMillisUTCEqualTo( - int value) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'timestampInMillisUTC', - value: value, - )); + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'timestampInMillisUTC', + value: value, + ), + ); }); } @@ -643,11 +707,13 @@ extension LogQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'timestampInMillisUTC', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'timestampInMillisUTC', + value: value, + ), + ); }); } @@ -656,11 +722,13 @@ extension LogQueryFilter on QueryBuilder { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'timestampInMillisUTC', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'timestampInMillisUTC', + value: value, + ), + ); }); } @@ -671,13 +739,15 @@ extension LogQueryFilter on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'timestampInMillisUTC', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'timestampInMillisUTC', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } } @@ -775,15 +845,17 @@ extension LogQuerySortThenBy on QueryBuilder { } extension LogQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByLogLevel( - {bool caseSensitive = true}) { + QueryBuilder distinctByLogLevel({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'logLevel', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByMessage( - {bool caseSensitive = true}) { + QueryBuilder distinctByMessage({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'message', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/sent_to_address.dart b/lib/models/isar/models/sent_to_address.dart index f18b18a08..16ad55c4c 100644 --- a/lib/models/isar/models/sent_to_address.dart +++ b/lib/models/isar/models/sent_to_address.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'sent_to_address.g.dart'; diff --git a/lib/models/isar/models/sent_to_address.g.dart b/lib/models/isar/models/sent_to_address.g.dart index 88153da9d..354b03038 100644 --- a/lib/models/isar/models/sent_to_address.g.dart +++ b/lib/models/isar/models/sent_to_address.g.dart @@ -17,27 +17,16 @@ const SentToAddressSchema = CollectionSchema( name: r'SentToAddress', id: 4845779153260162867, properties: { - r'label': PropertySchema( - id: 0, - name: r'label', - type: IsarType.string, - ), - r'txid': PropertySchema( - id: 1, - name: r'txid', - type: IsarType.string, - ), - r'value': PropertySchema( - id: 2, - name: r'value', - type: IsarType.string, - ), + r'label': PropertySchema(id: 0, name: r'label', type: IsarType.string), + r'txid': PropertySchema(id: 1, name: r'txid', type: IsarType.string), + r'value': PropertySchema(id: 2, name: r'value', type: IsarType.string), r'walletId': PropertySchema( id: 3, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _sentToAddressEstimateSize, serialize: _sentToAddressSerialize, deserialize: _sentToAddressDeserialize, @@ -54,7 +43,7 @@ const SentToAddressSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'txid_walletId': IndexSchema( @@ -72,16 +61,17 @@ const SentToAddressSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _sentToAddressGetId, getLinks: _sentToAddressGetLinks, attach: _sentToAddressAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _sentToAddressEstimateSize( @@ -154,7 +144,10 @@ List> _sentToAddressGetLinks(SentToAddress object) { } void _sentToAddressAttach( - IsarCollection col, Id id, SentToAddress object) { + IsarCollection col, + Id id, + SentToAddress object, +) { object.id = id; } @@ -176,10 +169,14 @@ extension SentToAddressByIndex on IsarCollection { } Future> getAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -189,10 +186,14 @@ extension SentToAddressByIndex on IsarCollection { } List getAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -202,10 +203,14 @@ extension SentToAddressByIndex on IsarCollection { } Future deleteAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -215,10 +220,14 @@ extension SentToAddressByIndex on IsarCollection { } int deleteAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -239,8 +248,10 @@ extension SentToAddressByIndex on IsarCollection { return putAllByIndex(r'txid_walletId', objects); } - List putAllByTxidWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByTxidWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'txid_walletId', objects, saveLinks: saveLinks); } } @@ -257,17 +268,16 @@ extension SentToAddressQueryWhereSort extension SentToAddressQueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -290,8 +300,9 @@ extension SentToAddressQueryWhere } QueryBuilder idGreaterThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -300,8 +311,9 @@ extension SentToAddressQueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -316,146 +328,173 @@ extension SentToAddressQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidEqualToAnyWalletId(String txid) { + txidEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'txid_walletId', value: [txid]), + ); }); } QueryBuilder - txidNotEqualToAnyWalletId(String txid) { + txidNotEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidWalletIdEqualTo(String txid, String walletId) { + txidWalletIdEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId', + value: [txid, walletId], + ), + ); }); } QueryBuilder - txidEqualToWalletIdNotEqualTo(String txid, String walletId) { + txidEqualToWalletIdNotEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ); } }); } @@ -464,26 +503,25 @@ extension SentToAddressQueryWhere extension SentToAddressQueryFilter on QueryBuilder { QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -492,11 +530,13 @@ extension SentToAddressQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -507,64 +547,69 @@ extension SentToAddressQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - labelEqualTo( - String value, { - bool caseSensitive = true, - }) { + labelEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelGreaterThan( + labelGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelLessThan( + labelLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelBetween( + labelBetween( String lower, String upper, { bool includeLower = true, @@ -572,84 +617,86 @@ extension SentToAddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'label', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'label', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelStartsWith( - String value, { - bool caseSensitive = true, - }) { + labelStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelEndsWith( - String value, { - bool caseSensitive = true, - }) { + labelEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelContains(String value, {bool caseSensitive = true}) { + labelContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'label', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'label', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelMatches(String pattern, {bool caseSensitive = true}) { + labelMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'label', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'label', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - labelIsEmpty() { + labelIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'label', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'label', value: ''), + ); }); } QueryBuilder - labelIsNotEmpty() { + labelIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'label', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'label', value: ''), + ); }); } @@ -658,43 +705,49 @@ extension SentToAddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidGreaterThan( + txidGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidLessThan( + txidLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -706,136 +759,142 @@ extension SentToAddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidStartsWith( - String value, { - bool caseSensitive = true, - }) { + txidStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidEndsWith( - String value, { - bool caseSensitive = true, - }) { + txidEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidContains(String value, {bool caseSensitive = true}) { + txidContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txidMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidIsEmpty() { + txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder - txidIsNotEmpty() { + txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder - valueEqualTo( - String value, { - bool caseSensitive = true, - }) { + valueEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueGreaterThan( + valueGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueLessThan( + valueLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueBetween( + valueBetween( String lower, String upper, { bool includeLower = true, @@ -843,135 +902,140 @@ extension SentToAddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueEndsWith( - String value, { - bool caseSensitive = true, - }) { + valueEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueContains(String value, {bool caseSensitive = true}) { + valueContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueMatches(String pattern, {bool caseSensitive = true}) { + valueMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIsEmpty() { + valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } QueryBuilder - valueIsNotEmpty() { + valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { + walletIdEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -979,84 +1043,86 @@ extension SentToAddressQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { + walletIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -1112,7 +1178,7 @@ extension SentToAddressQuerySortBy } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1176,7 +1242,7 @@ extension SentToAddressQuerySortThenBy } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1185,29 +1251,33 @@ extension SentToAddressQuerySortThenBy extension SentToAddressQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByLabel( - {bool caseSensitive = true}) { + QueryBuilder distinctByLabel({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'label', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByTxid( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxid({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txid', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByValue( - {bool caseSensitive = true}) { + QueryBuilder distinctByValue({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'value', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/models/transaction_note.dart b/lib/models/isar/models/transaction_note.dart index 698d005e4..f91c1ab30 100644 --- a/lib/models/isar/models/transaction_note.dart +++ b/lib/models/isar/models/transaction_note.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'transaction_note.g.dart'; @@ -25,18 +25,12 @@ class TransactionNote { @Index() late String walletId; - @Index( - unique: true, - replace: true, - composite: [CompositeIndex("walletId")], - ) + @Index(unique: true, replace: true, composite: [CompositeIndex("walletId")]) late String txid; late String value; - TransactionNote copyWith({ - String? value, - }) { + TransactionNote copyWith({String? value}) { return TransactionNote( walletId: walletId, txid: txid, diff --git a/lib/models/isar/models/transaction_note.g.dart b/lib/models/isar/models/transaction_note.g.dart index 67af8cdca..9a16ae190 100644 --- a/lib/models/isar/models/transaction_note.g.dart +++ b/lib/models/isar/models/transaction_note.g.dart @@ -17,22 +17,15 @@ const TransactionNoteSchema = CollectionSchema( name: r'TransactionNote', id: 5128348263878806765, properties: { - r'txid': PropertySchema( - id: 0, - name: r'txid', - type: IsarType.string, - ), - r'value': PropertySchema( - id: 1, - name: r'value', - type: IsarType.string, - ), + r'txid': PropertySchema(id: 0, name: r'txid', type: IsarType.string), + r'value': PropertySchema(id: 1, name: r'value', type: IsarType.string), r'walletId': PropertySchema( id: 2, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _transactionNoteEstimateSize, serialize: _transactionNoteSerialize, deserialize: _transactionNoteDeserialize, @@ -49,7 +42,7 @@ const TransactionNoteSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], ), r'txid_walletId': IndexSchema( @@ -67,16 +60,17 @@ const TransactionNoteSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _transactionNoteGetId, getLinks: _transactionNoteGetLinks, attach: _transactionNoteAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _transactionNoteEstimateSize( @@ -144,7 +138,10 @@ List> _transactionNoteGetLinks(TransactionNote object) { } void _transactionNoteAttach( - IsarCollection col, Id id, TransactionNote object) { + IsarCollection col, + Id id, + TransactionNote object, +) { object.id = id; } @@ -166,10 +163,14 @@ extension TransactionNoteByIndex on IsarCollection { } Future> getAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -179,10 +180,14 @@ extension TransactionNoteByIndex on IsarCollection { } List getAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -192,10 +197,14 @@ extension TransactionNoteByIndex on IsarCollection { } Future deleteAllByTxidWalletId( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -205,10 +214,14 @@ extension TransactionNoteByIndex on IsarCollection { } int deleteAllByTxidWalletIdSync( - List txidValues, List walletIdValues) { + List txidValues, + List walletIdValues, + ) { final len = txidValues.length; - assert(walletIdValues.length == len, - 'All index values must have the same length'); + assert( + walletIdValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([txidValues[i], walletIdValues[i]]); @@ -229,8 +242,10 @@ extension TransactionNoteByIndex on IsarCollection { return putAllByIndex(r'txid_walletId', objects); } - List putAllByTxidWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByTxidWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'txid_walletId', objects, saveLinks: saveLinks); } } @@ -247,17 +262,15 @@ extension TransactionNoteQueryWhereSort extension TransactionNoteQueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder - idNotEqualTo(Id id) { + idNotEqualTo(Id id) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -280,7 +293,7 @@ extension TransactionNoteQueryWhere } QueryBuilder - idGreaterThan(Id id, {bool include = false}) { + idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -289,8 +302,9 @@ extension TransactionNoteQueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -305,146 +319,172 @@ extension TransactionNoteQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo(String walletId) { + walletIdEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidEqualToAnyWalletId(String txid) { + txidEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'txid_walletId', value: [txid]), + ); }); } QueryBuilder - txidNotEqualToAnyWalletId(String txid) { + txidNotEqualToAnyWalletId(String txid) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [], - upper: [txid], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [], + upper: [txid], + includeUpper: false, + ), + ); } }); } QueryBuilder - txidWalletIdEqualTo(String txid, String walletId) { + txidWalletIdEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'txid_walletId', - value: [txid, walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'txid_walletId', + value: [txid, walletId], + ), + ); }); } QueryBuilder - txidEqualToWalletIdNotEqualTo(String txid, String walletId) { + txidEqualToWalletIdNotEqualTo(String txid, String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid, walletId], - includeLower: false, - upper: [txid], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'txid_walletId', - lower: [txid], - upper: [txid, walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid, walletId], + includeLower: false, + upper: [txid], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'txid_walletId', + lower: [txid], + upper: [txid, walletId], + includeUpper: false, + ), + ); } }); } @@ -453,109 +493,111 @@ extension TransactionNoteQueryWhere extension TransactionNoteQueryFilter on QueryBuilder { QueryBuilder - idEqualTo(Id value) { + idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idLessThan( - Id value, { - bool include = false, - }) { + idLessThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idBetween( + idBetween( Id lower, Id upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - txidEqualTo( - String value, { - bool caseSensitive = true, - }) { + txidEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidGreaterThan( + txidGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidLessThan( + txidLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidBetween( + txidBetween( String lower, String upper, { bool includeLower = true, @@ -563,135 +605,140 @@ extension TransactionNoteQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txid', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidStartsWith( - String value, { - bool caseSensitive = true, - }) { + txidStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidEndsWith( - String value, { - bool caseSensitive = true, - }) { + txidEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidContains(String value, {bool caseSensitive = true}) { + txidContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txid', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txid', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidMatches(String pattern, {bool caseSensitive = true}) { + txidMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txid', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txid', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txidIsEmpty() { + txidIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txid', value: ''), + ); }); } QueryBuilder - txidIsNotEmpty() { + txidIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txid', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txid', value: ''), + ); }); } QueryBuilder - valueEqualTo( - String value, { - bool caseSensitive = true, - }) { + valueEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueGreaterThan( + valueGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueLessThan( + valueLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueBetween( + valueBetween( String lower, String upper, { bool includeLower = true, @@ -699,135 +746,140 @@ extension TransactionNoteQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'value', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'value', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueEndsWith( - String value, { - bool caseSensitive = true, - }) { + valueEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueContains(String value, {bool caseSensitive = true}) { + valueContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'value', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'value', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueMatches(String pattern, {bool caseSensitive = true}) { + valueMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'value', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'value', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIsEmpty() { + valueIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'value', value: ''), + ); }); } QueryBuilder - valueIsNotEmpty() { + valueIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'value', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'value', value: ''), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { + walletIdEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -835,84 +887,86 @@ extension TransactionNoteQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { + walletIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -932,7 +986,7 @@ extension TransactionNoteQuerySortBy } QueryBuilder - sortByTxidDesc() { + sortByTxidDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'txid', Sort.desc); }); @@ -945,21 +999,21 @@ extension TransactionNoteQuerySortBy } QueryBuilder - sortByValueDesc() { + sortByValueDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.desc); }); } QueryBuilder - sortByWalletId() { + sortByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -987,7 +1041,7 @@ extension TransactionNoteQuerySortThenBy } QueryBuilder - thenByTxidDesc() { + thenByTxidDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'txid', Sort.desc); }); @@ -1000,21 +1054,21 @@ extension TransactionNoteQuerySortThenBy } QueryBuilder - thenByValueDesc() { + thenByValueDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'value', Sort.desc); }); } QueryBuilder - thenByWalletId() { + thenByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1023,22 +1077,25 @@ extension TransactionNoteQuerySortThenBy extension TransactionNoteQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByTxid( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxid({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txid', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByValue( - {bool caseSensitive = true}) { + QueryBuilder distinctByValue({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'value', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/ordinal.dart b/lib/models/isar/ordinal.dart index 6ac3a2dad..99b4dcdae 100644 --- a/lib/models/isar/ordinal.dart +++ b/lib/models/isar/ordinal.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../dto/ordinals/inscription_data.dart'; @@ -15,10 +15,7 @@ class Ordinal { @Index( unique: true, replace: true, - composite: [ - CompositeIndex("utxoTXID"), - CompositeIndex("utxoVOUT"), - ], + composite: [CompositeIndex("utxoTXID"), CompositeIndex("utxoVOUT")], ) final String inscriptionId; @@ -45,8 +42,10 @@ class Ordinal { inscriptionId: data.inscriptionId, inscriptionNumber: data.inscriptionNumber, content: data.content, - utxoTXID: data.output.split(':')[ - 0], // "output": "062f32e21aa04246b8873b5d9a929576addd0339881e1ea478b406795d6b6c47:0" + utxoTXID: + data.output.split( + ':', + )[0], // "output": "062f32e21aa04246b8873b5d9a929576addd0339881e1ea478b406795d6b6c47:0" utxoVOUT: int.parse(data.output.split(':')[1]), ); } diff --git a/lib/models/isar/ordinal.g.dart b/lib/models/isar/ordinal.g.dart index 5c23e11bb..09ba40434 100644 --- a/lib/models/isar/ordinal.g.dart +++ b/lib/models/isar/ordinal.g.dart @@ -17,11 +17,7 @@ const OrdinalSchema = CollectionSchema( name: r'Ordinal', id: -7772149326141951436, properties: { - r'content': PropertySchema( - id: 0, - name: r'content', - type: IsarType.string, - ), + r'content': PropertySchema(id: 0, name: r'content', type: IsarType.string), r'inscriptionId': PropertySchema( id: 1, name: r'inscriptionId', @@ -37,17 +33,14 @@ const OrdinalSchema = CollectionSchema( name: r'utxoTXID', type: IsarType.string, ), - r'utxoVOUT': PropertySchema( - id: 4, - name: r'utxoVOUT', - type: IsarType.long, - ), + r'utxoVOUT': PropertySchema(id: 4, name: r'utxoVOUT', type: IsarType.long), r'walletId': PropertySchema( id: 5, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _ordinalEstimateSize, serialize: _ordinalSerialize, deserialize: _ordinalDeserialize, @@ -74,16 +67,17 @@ const OrdinalSchema = CollectionSchema( name: r'utxoVOUT', type: IndexType.value, caseSensitive: false, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _ordinalGetId, getLinks: _ordinalGetLinks, attach: _ordinalAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _ordinalEstimateSize( @@ -169,88 +163,136 @@ void _ordinalAttach(IsarCollection col, Id id, Ordinal object) { extension OrdinalByIndex on IsarCollection { Future getByInscriptionIdUtxoTXIDUtxoVOUT( - String inscriptionId, String utxoTXID, int utxoVOUT) { - return getByIndex(r'inscriptionId_utxoTXID_utxoVOUT', - [inscriptionId, utxoTXID, utxoVOUT]); + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { + return getByIndex(r'inscriptionId_utxoTXID_utxoVOUT', [ + inscriptionId, + utxoTXID, + utxoVOUT, + ]); } Ordinal? getByInscriptionIdUtxoTXIDUtxoVOUTSync( - String inscriptionId, String utxoTXID, int utxoVOUT) { - return getByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', - [inscriptionId, utxoTXID, utxoVOUT]); + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { + return getByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', [ + inscriptionId, + utxoTXID, + utxoVOUT, + ]); } Future deleteByInscriptionIdUtxoTXIDUtxoVOUT( - String inscriptionId, String utxoTXID, int utxoVOUT) { - return deleteByIndex(r'inscriptionId_utxoTXID_utxoVOUT', - [inscriptionId, utxoTXID, utxoVOUT]); + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { + return deleteByIndex(r'inscriptionId_utxoTXID_utxoVOUT', [ + inscriptionId, + utxoTXID, + utxoVOUT, + ]); } bool deleteByInscriptionIdUtxoTXIDUtxoVOUTSync( - String inscriptionId, String utxoTXID, int utxoVOUT) { - return deleteByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', - [inscriptionId, utxoTXID, utxoVOUT]); + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { + return deleteByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', [ + inscriptionId, + utxoTXID, + utxoVOUT, + ]); } Future> getAllByInscriptionIdUtxoTXIDUtxoVOUT( - List inscriptionIdValues, - List utxoTXIDValues, - List utxoVOUTValues) { + List inscriptionIdValues, + List utxoTXIDValues, + List utxoVOUTValues, + ) { final len = inscriptionIdValues.length; - assert(utxoTXIDValues.length == len && utxoVOUTValues.length == len, - 'All index values must have the same length'); + assert( + utxoTXIDValues.length == len && utxoVOUTValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { - values - .add([inscriptionIdValues[i], utxoTXIDValues[i], utxoVOUTValues[i]]); + values.add([ + inscriptionIdValues[i], + utxoTXIDValues[i], + utxoVOUTValues[i], + ]); } return getAllByIndex(r'inscriptionId_utxoTXID_utxoVOUT', values); } List getAllByInscriptionIdUtxoTXIDUtxoVOUTSync( - List inscriptionIdValues, - List utxoTXIDValues, - List utxoVOUTValues) { + List inscriptionIdValues, + List utxoTXIDValues, + List utxoVOUTValues, + ) { final len = inscriptionIdValues.length; - assert(utxoTXIDValues.length == len && utxoVOUTValues.length == len, - 'All index values must have the same length'); + assert( + utxoTXIDValues.length == len && utxoVOUTValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { - values - .add([inscriptionIdValues[i], utxoTXIDValues[i], utxoVOUTValues[i]]); + values.add([ + inscriptionIdValues[i], + utxoTXIDValues[i], + utxoVOUTValues[i], + ]); } return getAllByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', values); } Future deleteAllByInscriptionIdUtxoTXIDUtxoVOUT( - List inscriptionIdValues, - List utxoTXIDValues, - List utxoVOUTValues) { + List inscriptionIdValues, + List utxoTXIDValues, + List utxoVOUTValues, + ) { final len = inscriptionIdValues.length; - assert(utxoTXIDValues.length == len && utxoVOUTValues.length == len, - 'All index values must have the same length'); + assert( + utxoTXIDValues.length == len && utxoVOUTValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { - values - .add([inscriptionIdValues[i], utxoTXIDValues[i], utxoVOUTValues[i]]); + values.add([ + inscriptionIdValues[i], + utxoTXIDValues[i], + utxoVOUTValues[i], + ]); } return deleteAllByIndex(r'inscriptionId_utxoTXID_utxoVOUT', values); } int deleteAllByInscriptionIdUtxoTXIDUtxoVOUTSync( - List inscriptionIdValues, - List utxoTXIDValues, - List utxoVOUTValues) { + List inscriptionIdValues, + List utxoTXIDValues, + List utxoVOUTValues, + ) { final len = inscriptionIdValues.length; - assert(utxoTXIDValues.length == len && utxoVOUTValues.length == len, - 'All index values must have the same length'); + assert( + utxoTXIDValues.length == len && utxoVOUTValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { - values - .add([inscriptionIdValues[i], utxoTXIDValues[i], utxoVOUTValues[i]]); + values.add([ + inscriptionIdValues[i], + utxoTXIDValues[i], + utxoVOUTValues[i], + ]); } return deleteAllByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', values); @@ -260,21 +302,32 @@ extension OrdinalByIndex on IsarCollection { return putByIndex(r'inscriptionId_utxoTXID_utxoVOUT', object); } - Id putByInscriptionIdUtxoTXIDUtxoVOUTSync(Ordinal object, - {bool saveLinks = true}) { - return putByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', object, - saveLinks: saveLinks); + Id putByInscriptionIdUtxoTXIDUtxoVOUTSync( + Ordinal object, { + bool saveLinks = true, + }) { + return putByIndexSync( + r'inscriptionId_utxoTXID_utxoVOUT', + object, + saveLinks: saveLinks, + ); } Future> putAllByInscriptionIdUtxoTXIDUtxoVOUT( - List objects) { + List objects, + ) { return putAllByIndex(r'inscriptionId_utxoTXID_utxoVOUT', objects); } - List putAllByInscriptionIdUtxoTXIDUtxoVOUTSync(List objects, - {bool saveLinks = true}) { - return putAllByIndexSync(r'inscriptionId_utxoTXID_utxoVOUT', objects, - saveLinks: saveLinks); + List putAllByInscriptionIdUtxoTXIDUtxoVOUTSync( + List objects, { + bool saveLinks = true, + }) { + return putAllByIndexSync( + r'inscriptionId_utxoTXID_utxoVOUT', + objects, + saveLinks: saveLinks, + ); } } @@ -289,10 +342,7 @@ extension OrdinalQueryWhereSort on QueryBuilder { extension OrdinalQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -318,8 +368,10 @@ extension OrdinalQueryWhere on QueryBuilder { }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -327,8 +379,10 @@ extension OrdinalQueryWhere on QueryBuilder { }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -343,190 +397,236 @@ extension OrdinalQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - inscriptionIdEqualToAnyUtxoTXIDUtxoVOUT(String inscriptionId) { + inscriptionIdEqualToAnyUtxoTXIDUtxoVOUT(String inscriptionId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - value: [inscriptionId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + value: [inscriptionId], + ), + ); }); } QueryBuilder - inscriptionIdNotEqualToAnyUtxoTXIDUtxoVOUT(String inscriptionId) { + inscriptionIdNotEqualToAnyUtxoTXIDUtxoVOUT(String inscriptionId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [], - upper: [inscriptionId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [], + upper: [inscriptionId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [], - upper: [inscriptionId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [], + upper: [inscriptionId], + includeUpper: false, + ), + ); } }); } QueryBuilder - inscriptionIdUtxoTXIDEqualToAnyUtxoVOUT( - String inscriptionId, String utxoTXID) { + inscriptionIdUtxoTXIDEqualToAnyUtxoVOUT( + String inscriptionId, + String utxoTXID, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - value: [inscriptionId, utxoTXID], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + value: [inscriptionId, utxoTXID], + ), + ); }); } QueryBuilder - inscriptionIdEqualToUtxoTXIDNotEqualToAnyUtxoVOUT( - String inscriptionId, String utxoTXID) { + inscriptionIdEqualToUtxoTXIDNotEqualToAnyUtxoVOUT( + String inscriptionId, + String utxoTXID, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId], - upper: [inscriptionId, utxoTXID], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID], - includeLower: false, - upper: [inscriptionId], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId], + upper: [inscriptionId, utxoTXID], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID], + includeLower: false, + upper: [inscriptionId], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID], - includeLower: false, - upper: [inscriptionId], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId], - upper: [inscriptionId, utxoTXID], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID], + includeLower: false, + upper: [inscriptionId], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId], + upper: [inscriptionId, utxoTXID], + includeUpper: false, + ), + ); } }); } QueryBuilder - inscriptionIdUtxoTXIDUtxoVOUTEqualTo( - String inscriptionId, String utxoTXID, int utxoVOUT) { + inscriptionIdUtxoTXIDUtxoVOUTEqualTo( + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - value: [inscriptionId, utxoTXID, utxoVOUT], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + value: [inscriptionId, utxoTXID, utxoVOUT], + ), + ); }); } QueryBuilder - inscriptionIdUtxoTXIDEqualToUtxoVOUTNotEqualTo( - String inscriptionId, String utxoTXID, int utxoVOUT) { + inscriptionIdUtxoTXIDEqualToUtxoVOUTNotEqualTo( + String inscriptionId, + String utxoTXID, + int utxoVOUT, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID], - upper: [inscriptionId, utxoTXID, utxoVOUT], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID, utxoVOUT], - includeLower: false, - upper: [inscriptionId, utxoTXID], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID], + upper: [inscriptionId, utxoTXID, utxoVOUT], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID, utxoVOUT], + includeLower: false, + upper: [inscriptionId, utxoTXID], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID, utxoVOUT], - includeLower: false, - upper: [inscriptionId, utxoTXID], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID], - upper: [inscriptionId, utxoTXID, utxoVOUT], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID, utxoVOUT], + includeLower: false, + upper: [inscriptionId, utxoTXID], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID], + upper: [inscriptionId, utxoTXID, utxoVOUT], + includeUpper: false, + ), + ); } }); } QueryBuilder - inscriptionIdUtxoTXIDEqualToUtxoVOUTGreaterThan( + inscriptionIdUtxoTXIDEqualToUtxoVOUTGreaterThan( String inscriptionId, String utxoTXID, int utxoVOUT, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID, utxoVOUT], - includeLower: include, - upper: [inscriptionId, utxoTXID], - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID, utxoVOUT], + includeLower: include, + upper: [inscriptionId, utxoTXID], + ), + ); }); } QueryBuilder - inscriptionIdUtxoTXIDEqualToUtxoVOUTLessThan( + inscriptionIdUtxoTXIDEqualToUtxoVOUTLessThan( String inscriptionId, String utxoTXID, int utxoVOUT, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID], - upper: [inscriptionId, utxoTXID, utxoVOUT], - includeUpper: include, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID], + upper: [inscriptionId, utxoTXID, utxoVOUT], + includeUpper: include, + ), + ); }); } QueryBuilder - inscriptionIdUtxoTXIDEqualToUtxoVOUTBetween( + inscriptionIdUtxoTXIDEqualToUtxoVOUTBetween( String inscriptionId, String utxoTXID, int lowerUtxoVOUT, @@ -535,13 +635,15 @@ extension OrdinalQueryWhere on QueryBuilder { bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.between( - indexName: r'inscriptionId_utxoTXID_utxoVOUT', - lower: [inscriptionId, utxoTXID, lowerUtxoVOUT], - includeLower: includeLower, - upper: [inscriptionId, utxoTXID, upperUtxoVOUT], - includeUpper: includeUpper, - )); + return query.addWhereClause( + IndexWhereClause.between( + indexName: r'inscriptionId_utxoTXID_utxoVOUT', + lower: [inscriptionId, utxoTXID, lowerUtxoVOUT], + includeLower: includeLower, + upper: [inscriptionId, utxoTXID, upperUtxoVOUT], + includeUpper: includeUpper, + ), + ); }); } } @@ -553,11 +655,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -567,12 +671,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -582,12 +688,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -599,14 +707,16 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'content', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'content', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -615,11 +725,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -628,62 +740,67 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder contentContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'content', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'content', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder contentMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'content', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'content', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder contentIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'content', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'content', value: ''), + ); }); } QueryBuilder contentIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'content', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'content', value: ''), + ); }); } QueryBuilder idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -692,11 +809,13 @@ extension OrdinalQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -705,11 +824,13 @@ extension OrdinalQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -720,13 +841,15 @@ extension OrdinalQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -735,27 +858,31 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - inscriptionIdGreaterThan( + inscriptionIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -765,12 +892,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -782,14 +911,16 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'inscriptionId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'inscriptionId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -798,11 +929,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -811,110 +944,115 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder inscriptionIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'inscriptionId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'inscriptionId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder inscriptionIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'inscriptionId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'inscriptionId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder inscriptionIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'inscriptionId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'inscriptionId', value: ''), + ); }); } QueryBuilder - inscriptionIdIsNotEmpty() { + inscriptionIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'inscriptionId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'inscriptionId', value: ''), + ); }); } QueryBuilder - inscriptionNumberEqualTo(int value) { + inscriptionNumberEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'inscriptionNumber', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'inscriptionNumber', value: value), + ); }); } QueryBuilder - inscriptionNumberGreaterThan( - int value, { - bool include = false, - }) { + inscriptionNumberGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'inscriptionNumber', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'inscriptionNumber', + value: value, + ), + ); }); } QueryBuilder - inscriptionNumberLessThan( - int value, { - bool include = false, - }) { + inscriptionNumberLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'inscriptionNumber', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'inscriptionNumber', + value: value, + ), + ); }); } QueryBuilder - inscriptionNumberBetween( + inscriptionNumberBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'inscriptionNumber', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'inscriptionNumber', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -923,11 +1061,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -937,12 +1077,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -952,12 +1094,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -969,14 +1113,16 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'utxoTXID', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'utxoTXID', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -985,11 +1131,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -998,63 +1146,69 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder utxoTXIDContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'utxoTXID', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'utxoTXID', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder utxoTXIDMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'utxoTXID', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'utxoTXID', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder utxoTXIDIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'utxoTXID', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'utxoTXID', value: ''), + ); }); } QueryBuilder utxoTXIDIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'utxoTXID', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'utxoTXID', value: ''), + ); }); } QueryBuilder utxoVOUTEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'utxoVOUT', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'utxoVOUT', value: value), + ); }); } @@ -1063,11 +1217,13 @@ extension OrdinalQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'utxoVOUT', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'utxoVOUT', + value: value, + ), + ); }); } @@ -1076,11 +1232,13 @@ extension OrdinalQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'utxoVOUT', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'utxoVOUT', + value: value, + ), + ); }); } @@ -1091,13 +1249,15 @@ extension OrdinalQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'utxoVOUT', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'utxoVOUT', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1106,11 +1266,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1120,12 +1282,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1135,12 +1299,14 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1152,14 +1318,16 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1168,11 +1336,13 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1181,53 +1351,59 @@ extension OrdinalQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -1401,18 +1577,22 @@ extension OrdinalQuerySortThenBy extension OrdinalQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByContent( - {bool caseSensitive = true}) { + QueryBuilder distinctByContent({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'content', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByInscriptionId( - {bool caseSensitive = true}) { + QueryBuilder distinctByInscriptionId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'inscriptionId', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'inscriptionId', + caseSensitive: caseSensitive, + ); }); } @@ -1422,8 +1602,9 @@ extension OrdinalQueryWhereDistinct }); } - QueryBuilder distinctByUtxoTXID( - {bool caseSensitive = true}) { + QueryBuilder distinctByUtxoTXID({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'utxoTXID', caseSensitive: caseSensitive); }); @@ -1435,8 +1616,9 @@ extension OrdinalQueryWhereDistinct }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); diff --git a/lib/models/isar/stack_theme.dart b/lib/models/isar/stack_theme.dart index efa2f7d05..476494d92 100644 --- a/lib/models/isar/stack_theme.dart +++ b/lib/models/isar/stack_theme.dart @@ -12,7 +12,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../app_config.dart'; import '../../utilities/extensions/impl/box_shadow.dart'; @@ -1943,6 +1943,7 @@ class ThemeAssets implements IThemeAssets { late final String wownero; late final String namecoin; late final String particl; + late final String mimblewimblecoin; late final String bitcoinImage; late final String bitcoincashImage; late final String dogecoinImage; diff --git a/lib/models/isar/stack_theme.g.dart b/lib/models/isar/stack_theme.g.dart index c77d979f5..71f51800f 100644 --- a/lib/models/isar/stack_theme.g.dart +++ b/lib/models/isar/stack_theme.g.dart @@ -51,12 +51,14 @@ const StackThemeSchema = CollectionSchema( id: 6, name: r'assets', type: IsarType.object, + target: r'ThemeAssets', ), r'assetsV2': PropertySchema( id: 7, name: r'assetsV2', type: IsarType.object, + target: r'ThemeAssetsV2', ), r'backgroundAppBarInt': PropertySchema( @@ -309,11 +311,7 @@ const StackThemeSchema = CollectionSchema( name: r'myStackContactIconBGInt', type: IsarType.long, ), - r'name': PropertySchema( - id: 58, - name: r'name', - type: IsarType.string, - ), + r'name': PropertySchema(id: 58, name: r'name', type: IsarType.string), r'numberBackDefaultInt': PropertySchema( id: 59, name: r'numberBackDefaultInt', @@ -809,11 +807,7 @@ const StackThemeSchema = CollectionSchema( name: r'topNavIconYellowInt', type: IsarType.long, ), - r'version': PropertySchema( - id: 158, - name: r'version', - type: IsarType.long, - ), + r'version': PropertySchema(id: 158, name: r'version', type: IsarType.long), r'warningBackgroundInt': PropertySchema( id: 159, name: r'warningBackgroundInt', @@ -828,9 +822,11 @@ const StackThemeSchema = CollectionSchema( id: 161, name: r'zAssetsV3', type: IsarType.object, + target: r'ThemeAssetsV3', - ) + ), }, + estimateSize: _stackThemeEstimateSize, serialize: _stackThemeSerialize, deserialize: _stackThemeDeserialize, @@ -847,20 +843,21 @@ const StackThemeSchema = CollectionSchema( name: r'themeId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: { r'ThemeAssets': ThemeAssetsSchema, r'ThemeAssetsV2': ThemeAssetsV2Schema, - r'ThemeAssetsV3': ThemeAssetsV3Schema + r'ThemeAssetsV3': ThemeAssetsV3Schema, }, + getId: _stackThemeGetId, getLinks: _stackThemeGetLinks, attach: _stackThemeAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _stackThemeEstimateSize( @@ -872,17 +869,25 @@ int _stackThemeEstimateSize( { final value = object.assetsV1; if (value != null) { - bytesCount += 3 + + bytesCount += + 3 + ThemeAssetsSchema.estimateSize( - value, allOffsets[ThemeAssets]!, allOffsets); + value, + allOffsets[ThemeAssets]!, + allOffsets, + ); } } { final value = object.assetsV2; if (value != null) { - bytesCount += 3 + + bytesCount += + 3 + ThemeAssetsV2Schema.estimateSize( - value, allOffsets[ThemeAssetsV2]!, allOffsets); + value, + allOffsets[ThemeAssetsV2]!, + allOffsets, + ); } } bytesCount += 3 + object.brightnessString.length * 3; @@ -905,9 +910,13 @@ int _stackThemeEstimateSize( { final value = object.assetsV3; if (value != null) { - bytesCount += 3 + + bytesCount += + 3 + ThemeAssetsV3Schema.estimateSize( - value, allOffsets[ThemeAssetsV3]!, allOffsets); + value, + allOffsets[ThemeAssetsV3]!, + allOffsets, + ); } } return bytesCount; @@ -1164,8 +1173,9 @@ StackTheme _stackThemeDeserialize( object.favoriteStarInactiveInt = reader.readLong(offsets[48]); object.gradientBackgroundString = reader.readStringOrNull(offsets[49]); object.highlightInt = reader.readLong(offsets[50]); - object.homeViewButtonBarBoxShadowString = - reader.readStringOrNull(offsets[51]); + object.homeViewButtonBarBoxShadowString = reader.readStringOrNull( + offsets[51], + ); object.id = id; object.infoItemBGInt = reader.readLong(offsets[52]); object.infoItemIconsInt = reader.readLong(offsets[53]); @@ -1305,16 +1315,18 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 6: return (reader.readObjectOrNull( - offset, - ThemeAssetsSchema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsSchema.deserialize, + allOffsets, + )) + as P; case 7: return (reader.readObjectOrNull( - offset, - ThemeAssetsV2Schema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsV2Schema.deserialize, + allOffsets, + )) + as P; case 8: return (reader.readLong(offset)) as P; case 9: @@ -1623,10 +1635,11 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 161: return (reader.readObjectOrNull( - offset, - ThemeAssetsV3Schema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsV3Schema.deserialize, + allOffsets, + )) + as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -1693,8 +1706,10 @@ extension StackThemeByIndex on IsarCollection { return putAllByIndex(r'themeId', objects); } - List putAllByThemeIdSync(List objects, - {bool saveLinks = true}) { + List putAllByThemeIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'themeId', objects, saveLinks: saveLinks); } } @@ -1712,10 +1727,7 @@ extension StackThemeQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -1741,8 +1753,10 @@ extension StackThemeQueryWhere }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -1750,8 +1764,10 @@ extension StackThemeQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -1766,56 +1782,67 @@ extension StackThemeQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder themeIdEqualTo( - String themeId) { + String themeId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'themeId', - value: [themeId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'themeId', value: [themeId]), + ); }); } QueryBuilder themeIdNotEqualTo( - String themeId) { + String themeId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'themeId', - lower: [], - upper: [themeId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'themeId', - lower: [themeId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'themeId', + lower: [], + upper: [themeId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'themeId', + lower: [themeId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'themeId', - lower: [themeId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'themeId', - lower: [], - upper: [themeId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'themeId', + lower: [themeId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'themeId', + lower: [], + upper: [themeId], + includeUpper: false, + ), + ); } }); } @@ -1824,871 +1851,878 @@ extension StackThemeQueryWhere extension StackThemeQueryFilter on QueryBuilder { QueryBuilder - accentColorBlueIntEqualTo(int value) { + accentColorBlueIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorBlueInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'accentColorBlueInt', value: value), + ); }); } QueryBuilder - accentColorBlueIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorBlueIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorBlueInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorBlueInt', + value: value, + ), + ); }); } QueryBuilder - accentColorBlueIntLessThan( - int value, { - bool include = false, - }) { + accentColorBlueIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorBlueInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorBlueInt', + value: value, + ), + ); }); } QueryBuilder - accentColorBlueIntBetween( + accentColorBlueIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorBlueInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorBlueInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - accentColorDarkIntEqualTo(int value) { + accentColorDarkIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'accentColorDarkInt', value: value), + ); }); } QueryBuilder - accentColorDarkIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorDarkIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorDarkInt', + value: value, + ), + ); }); } QueryBuilder - accentColorDarkIntLessThan( - int value, { - bool include = false, - }) { + accentColorDarkIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorDarkInt', + value: value, + ), + ); }); } QueryBuilder - accentColorDarkIntBetween( + accentColorDarkIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorDarkInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorDarkInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - accentColorGreenIntEqualTo(int value) { + accentColorGreenIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'accentColorGreenInt', value: value), + ); }); } QueryBuilder - accentColorGreenIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorGreenIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorGreenInt', + value: value, + ), + ); }); } QueryBuilder - accentColorGreenIntLessThan( - int value, { - bool include = false, - }) { + accentColorGreenIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorGreenInt', + value: value, + ), + ); }); } QueryBuilder - accentColorGreenIntBetween( + accentColorGreenIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorGreenInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorGreenInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - accentColorOrangeIntEqualTo(int value) { + accentColorOrangeIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorOrangeInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'accentColorOrangeInt', + value: value, + ), + ); }); } QueryBuilder - accentColorOrangeIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorOrangeIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorOrangeInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorOrangeInt', + value: value, + ), + ); }); } QueryBuilder - accentColorOrangeIntLessThan( - int value, { - bool include = false, - }) { + accentColorOrangeIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorOrangeInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorOrangeInt', + value: value, + ), + ); }); } QueryBuilder - accentColorOrangeIntBetween( + accentColorOrangeIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorOrangeInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorOrangeInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - accentColorRedIntEqualTo(int value) { + accentColorRedIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'accentColorRedInt', value: value), + ); }); } QueryBuilder - accentColorRedIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorRedIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorRedInt', + value: value, + ), + ); }); } QueryBuilder - accentColorRedIntLessThan( - int value, { - bool include = false, - }) { + accentColorRedIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorRedInt', + value: value, + ), + ); }); } QueryBuilder - accentColorRedIntBetween( + accentColorRedIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorRedInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorRedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - accentColorYellowIntEqualTo(int value) { + accentColorYellowIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'accentColorYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'accentColorYellowInt', + value: value, + ), + ); }); } QueryBuilder - accentColorYellowIntGreaterThan( - int value, { - bool include = false, - }) { + accentColorYellowIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'accentColorYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'accentColorYellowInt', + value: value, + ), + ); }); } QueryBuilder - accentColorYellowIntLessThan( - int value, { - bool include = false, - }) { + accentColorYellowIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'accentColorYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'accentColorYellowInt', + value: value, + ), + ); }); } QueryBuilder - accentColorYellowIntBetween( + accentColorYellowIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'accentColorYellowInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'accentColorYellowInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder assetsV1IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'assets', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'assets'), + ); }); } QueryBuilder - assetsV1IsNotNull() { + assetsV1IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'assets', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'assets'), + ); }); } QueryBuilder assetsV2IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'assetsV2', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'assetsV2'), + ); }); } QueryBuilder - assetsV2IsNotNull() { + assetsV2IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'assetsV2', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'assetsV2'), + ); }); } QueryBuilder - backgroundAppBarIntEqualTo(int value) { + backgroundAppBarIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'backgroundAppBarInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'backgroundAppBarInt', value: value), + ); }); } QueryBuilder - backgroundAppBarIntGreaterThan( - int value, { - bool include = false, - }) { + backgroundAppBarIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'backgroundAppBarInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'backgroundAppBarInt', + value: value, + ), + ); }); } QueryBuilder - backgroundAppBarIntLessThan( - int value, { - bool include = false, - }) { + backgroundAppBarIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'backgroundAppBarInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'backgroundAppBarInt', + value: value, + ), + ); }); } QueryBuilder - backgroundAppBarIntBetween( + backgroundAppBarIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'backgroundAppBarInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'backgroundAppBarInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - backgroundIntEqualTo(int value) { + backgroundIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'backgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'backgroundInt', value: value), + ); }); } QueryBuilder - backgroundIntGreaterThan( - int value, { - bool include = false, - }) { + backgroundIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'backgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'backgroundInt', + value: value, + ), + ); }); } QueryBuilder - backgroundIntLessThan( - int value, { - bool include = false, - }) { + backgroundIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'backgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'backgroundInt', + value: value, + ), + ); }); } QueryBuilder - backgroundIntBetween( + backgroundIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'backgroundInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'backgroundInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavBackIntEqualTo(int value) { + bottomNavBackIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bottomNavBackInt', value: value), + ); }); } QueryBuilder - bottomNavBackIntGreaterThan( - int value, { - bool include = false, - }) { + bottomNavBackIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavBackInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavBackIntLessThan( - int value, { - bool include = false, - }) { + bottomNavBackIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavBackInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavBackIntBetween( + bottomNavBackIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavBackInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavBackInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavIconBackIntEqualTo(int value) { + bottomNavIconBackIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bottomNavIconBackInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconBackIntGreaterThan( - int value, { - bool include = false, - }) { + bottomNavIconBackIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavIconBackInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconBackIntLessThan( - int value, { - bool include = false, - }) { + bottomNavIconBackIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavIconBackInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconBackIntBetween( + bottomNavIconBackIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavIconBackInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavIconBackInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavIconIconHighlightedIntEqualTo(int value) { + bottomNavIconIconHighlightedIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavIconIconHighlightedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bottomNavIconIconHighlightedInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconHighlightedIntGreaterThan( + bottomNavIconIconHighlightedIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavIconIconHighlightedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavIconIconHighlightedInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconHighlightedIntLessThan( - int value, { - bool include = false, - }) { + bottomNavIconIconHighlightedIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavIconIconHighlightedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavIconIconHighlightedInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconHighlightedIntBetween( + bottomNavIconIconHighlightedIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavIconIconHighlightedInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavIconIconHighlightedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavIconIconIntEqualTo(int value) { + bottomNavIconIconIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bottomNavIconIconInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconIntGreaterThan( - int value, { - bool include = false, - }) { + bottomNavIconIconIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavIconIconInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconIntLessThan( - int value, { - bool include = false, - }) { + bottomNavIconIconIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavIconIconInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavIconIconIntBetween( + bottomNavIconIconIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavIconIconInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavIconIconInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavShadowIntEqualTo(int value) { + bottomNavShadowIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavShadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bottomNavShadowInt', value: value), + ); }); } QueryBuilder - bottomNavShadowIntGreaterThan( - int value, { - bool include = false, - }) { + bottomNavShadowIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavShadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavShadowInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavShadowIntLessThan( - int value, { - bool include = false, - }) { + bottomNavShadowIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavShadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavShadowInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavShadowIntBetween( + bottomNavShadowIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavShadowInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavShadowInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - bottomNavTextIntEqualTo(int value) { + bottomNavTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bottomNavTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bottomNavTextInt', value: value), + ); }); } QueryBuilder - bottomNavTextIntGreaterThan( - int value, { - bool include = false, - }) { + bottomNavTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bottomNavTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bottomNavTextInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavTextIntLessThan( - int value, { - bool include = false, - }) { + bottomNavTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bottomNavTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bottomNavTextInt', + value: value, + ), + ); }); } QueryBuilder - bottomNavTextIntBetween( + bottomNavTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bottomNavTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bottomNavTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - brightnessStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + brightnessStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringGreaterThan( + brightnessStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringLessThan( + brightnessStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringBetween( + brightnessStringBetween( String lower, String upper, { bool includeLower = true, @@ -2696,1367 +2730,1419 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'brightnessString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'brightnessString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + brightnessStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + brightnessStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringContains(String value, {bool caseSensitive = true}) { + brightnessStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'brightnessString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'brightnessString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringMatches(String pattern, {bool caseSensitive = true}) { + brightnessStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'brightnessString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'brightnessString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - brightnessStringIsEmpty() { + brightnessStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'brightnessString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'brightnessString', value: ''), + ); }); } QueryBuilder - brightnessStringIsNotEmpty() { + brightnessStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'brightnessString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'brightnessString', value: ''), + ); }); } QueryBuilder - buttonBackBorderDisabledIntEqualTo(int value) { + buttonBackBorderDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackBorderDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonBackBorderDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderDisabledIntBetween( + buttonBackBorderDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackBorderDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackBorderDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackBorderIntEqualTo(int value) { + buttonBackBorderIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'buttonBackBorderInt', value: value), + ); }); } QueryBuilder - buttonBackBorderIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackBorderIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackBorderInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderIntLessThan( - int value, { - bool include = false, - }) { + buttonBackBorderIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackBorderInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderIntBetween( + buttonBackBorderIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackBorderInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackBorderInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryDisabledIntEqualTo(int value) { + buttonBackBorderSecondaryDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackBorderSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackBorderSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryDisabledIntGreaterThan( + buttonBackBorderSecondaryDisabledIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackBorderSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackBorderSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryDisabledIntLessThan( + buttonBackBorderSecondaryDisabledIntLessThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackBorderSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackBorderSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryDisabledIntBetween( + buttonBackBorderSecondaryDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackBorderSecondaryDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackBorderSecondaryDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryIntEqualTo(int value) { + buttonBackBorderSecondaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackBorderSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackBorderSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackBorderSecondaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackBorderSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackBorderSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryIntLessThan( - int value, { - bool include = false, - }) { + buttonBackBorderSecondaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackBorderSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackBorderSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackBorderSecondaryIntBetween( + buttonBackBorderSecondaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackBorderSecondaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackBorderSecondaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackPrimaryDisabledIntEqualTo(int value) { + buttonBackPrimaryDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackPrimaryDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonBackPrimaryDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryDisabledIntBetween( + buttonBackPrimaryDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackPrimaryDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackPrimaryDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackPrimaryIntEqualTo(int value) { + buttonBackPrimaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackPrimaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryIntLessThan( - int value, { - bool include = false, - }) { + buttonBackPrimaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackPrimaryIntBetween( + buttonBackPrimaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackPrimaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackPrimaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackSecondaryDisabledIntEqualTo(int value) { + buttonBackSecondaryDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackSecondaryDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonBackSecondaryDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryDisabledIntBetween( + buttonBackSecondaryDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackSecondaryDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackSecondaryDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonBackSecondaryIntEqualTo(int value) { + buttonBackSecondaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonBackSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonBackSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryIntGreaterThan( - int value, { - bool include = false, - }) { + buttonBackSecondaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonBackSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonBackSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryIntLessThan( - int value, { - bool include = false, - }) { + buttonBackSecondaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonBackSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonBackSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonBackSecondaryIntBetween( + buttonBackSecondaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonBackSecondaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonBackSecondaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextBorderIntEqualTo(int value) { + buttonTextBorderIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'buttonTextBorderInt', value: value), + ); }); } QueryBuilder - buttonTextBorderIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextBorderIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextBorderInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderIntLessThan( - int value, { - bool include = false, - }) { + buttonTextBorderIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextBorderInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderIntBetween( + buttonTextBorderIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextBorderInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextBorderInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextBorderlessDisabledIntEqualTo(int value) { + buttonTextBorderlessDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextBorderlessDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextBorderlessDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessDisabledIntGreaterThan( + buttonTextBorderlessDisabledIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextBorderlessDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextBorderlessDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonTextBorderlessDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextBorderlessDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextBorderlessDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessDisabledIntBetween( + buttonTextBorderlessDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextBorderlessDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextBorderlessDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextBorderlessIntEqualTo(int value) { + buttonTextBorderlessIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextBorderlessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextBorderlessInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextBorderlessIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextBorderlessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextBorderlessInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessIntLessThan( - int value, { - bool include = false, - }) { + buttonTextBorderlessIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextBorderlessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextBorderlessInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextBorderlessIntBetween( + buttonTextBorderlessIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextBorderlessInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextBorderlessInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextDisabledIntEqualTo(int value) { + buttonTextDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonTextDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextDisabledIntBetween( + buttonTextDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextPrimaryDisabledIntEqualTo(int value) { + buttonTextPrimaryDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextPrimaryDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonTextPrimaryDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextPrimaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextPrimaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryDisabledIntBetween( + buttonTextPrimaryDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextPrimaryDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextPrimaryDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextPrimaryIntEqualTo(int value) { + buttonTextPrimaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextPrimaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryIntLessThan( - int value, { - bool include = false, - }) { + buttonTextPrimaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextPrimaryIntBetween( + buttonTextPrimaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextPrimaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextPrimaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextSecondaryDisabledIntEqualTo(int value) { + buttonTextSecondaryDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextSecondaryDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryDisabledIntLessThan( - int value, { - bool include = false, - }) { + buttonTextSecondaryDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextSecondaryDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextSecondaryDisabledInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryDisabledIntBetween( + buttonTextSecondaryDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextSecondaryDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextSecondaryDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - buttonTextSecondaryIntEqualTo(int value) { + buttonTextSecondaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buttonTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buttonTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryIntGreaterThan( - int value, { - bool include = false, - }) { + buttonTextSecondaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buttonTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buttonTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryIntLessThan( - int value, { - bool include = false, - }) { + buttonTextSecondaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buttonTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buttonTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - buttonTextSecondaryIntBetween( + buttonTextSecondaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buttonTextSecondaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buttonTextSecondaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxBGCheckedIntEqualTo(int value) { + checkboxBGCheckedIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxBGCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxBGCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGCheckedIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxBGCheckedIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxBGCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxBGCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGCheckedIntLessThan( - int value, { - bool include = false, - }) { + checkboxBGCheckedIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxBGCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxBGCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGCheckedIntBetween( + checkboxBGCheckedIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxBGCheckedInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxBGCheckedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxBGDisabledIntEqualTo(int value) { + checkboxBGDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxBGDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxBGDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxBGDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGDisabledIntLessThan( - int value, { - bool include = false, - }) { + checkboxBGDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxBGDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBGDisabledIntBetween( + checkboxBGDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxBGDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxBGDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxBorderEmptyIntEqualTo(int value) { + checkboxBorderEmptyIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxBorderEmptyInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxBorderEmptyInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBorderEmptyIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxBorderEmptyIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxBorderEmptyInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxBorderEmptyInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBorderEmptyIntLessThan( - int value, { - bool include = false, - }) { + checkboxBorderEmptyIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxBorderEmptyInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxBorderEmptyInt', + value: value, + ), + ); }); } QueryBuilder - checkboxBorderEmptyIntBetween( + checkboxBorderEmptyIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxBorderEmptyInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxBorderEmptyInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxIconCheckedIntEqualTo(int value) { + checkboxIconCheckedIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxIconCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxIconCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconCheckedIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxIconCheckedIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxIconCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxIconCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconCheckedIntLessThan( - int value, { - bool include = false, - }) { + checkboxIconCheckedIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxIconCheckedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxIconCheckedInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconCheckedIntBetween( + checkboxIconCheckedIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxIconCheckedInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxIconCheckedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxIconDisabledIntEqualTo(int value) { + checkboxIconDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxIconDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxIconDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxIconDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxIconDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxIconDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconDisabledIntLessThan( - int value, { - bool include = false, - }) { + checkboxIconDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxIconDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxIconDisabledInt', + value: value, + ), + ); }); } QueryBuilder - checkboxIconDisabledIntBetween( + checkboxIconDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxIconDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxIconDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - checkboxTextLabelIntEqualTo(int value) { + checkboxTextLabelIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'checkboxTextLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'checkboxTextLabelInt', + value: value, + ), + ); }); } QueryBuilder - checkboxTextLabelIntGreaterThan( - int value, { - bool include = false, - }) { + checkboxTextLabelIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'checkboxTextLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'checkboxTextLabelInt', + value: value, + ), + ); }); } QueryBuilder - checkboxTextLabelIntLessThan( - int value, { - bool include = false, - }) { + checkboxTextLabelIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'checkboxTextLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'checkboxTextLabelInt', + value: value, + ), + ); }); } QueryBuilder - checkboxTextLabelIntBetween( + checkboxTextLabelIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'checkboxTextLabelInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'checkboxTextLabelInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - coinColorsJsonStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + coinColorsJsonStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringGreaterThan( + coinColorsJsonStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringLessThan( + coinColorsJsonStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringBetween( + coinColorsJsonStringBetween( String lower, String upper, { bool includeLower = true, @@ -4064,657 +4150,674 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinColorsJsonString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinColorsJsonString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinColorsJsonStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinColorsJsonStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringContains(String value, {bool caseSensitive = true}) { + coinColorsJsonStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinColorsJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinColorsJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringMatches(String pattern, {bool caseSensitive = true}) { + coinColorsJsonStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinColorsJsonString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinColorsJsonString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinColorsJsonStringIsEmpty() { + coinColorsJsonStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinColorsJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinColorsJsonString', value: ''), + ); }); } QueryBuilder - coinColorsJsonStringIsNotEmpty() { + coinColorsJsonStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinColorsJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'coinColorsJsonString', + value: '', + ), + ); }); } QueryBuilder - currencyListItemBGIntEqualTo(int value) { + currencyListItemBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'currencyListItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'currencyListItemBGInt', + value: value, + ), + ); }); } QueryBuilder - currencyListItemBGIntGreaterThan( - int value, { - bool include = false, - }) { + currencyListItemBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'currencyListItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'currencyListItemBGInt', + value: value, + ), + ); }); } QueryBuilder - currencyListItemBGIntLessThan( - int value, { - bool include = false, - }) { + currencyListItemBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'currencyListItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'currencyListItemBGInt', + value: value, + ), + ); }); } QueryBuilder - currencyListItemBGIntBetween( + currencyListItemBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'currencyListItemBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'currencyListItemBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - customTextButtonDisabledTextIntEqualTo(int value) { + customTextButtonDisabledTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'customTextButtonDisabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'customTextButtonDisabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonDisabledTextIntGreaterThan( + customTextButtonDisabledTextIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'customTextButtonDisabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'customTextButtonDisabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonDisabledTextIntLessThan( - int value, { - bool include = false, - }) { + customTextButtonDisabledTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'customTextButtonDisabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'customTextButtonDisabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonDisabledTextIntBetween( + customTextButtonDisabledTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'customTextButtonDisabledTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'customTextButtonDisabledTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - customTextButtonEnabledTextIntEqualTo(int value) { + customTextButtonEnabledTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'customTextButtonEnabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'customTextButtonEnabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonEnabledTextIntGreaterThan( - int value, { - bool include = false, - }) { + customTextButtonEnabledTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'customTextButtonEnabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'customTextButtonEnabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonEnabledTextIntLessThan( - int value, { - bool include = false, - }) { + customTextButtonEnabledTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'customTextButtonEnabledTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'customTextButtonEnabledTextInt', + value: value, + ), + ); }); } QueryBuilder - customTextButtonEnabledTextIntBetween( + customTextButtonEnabledTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'customTextButtonEnabledTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'customTextButtonEnabledTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - ethTagBGIntEqualTo(int value) { + ethTagBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethTagBGInt', value: value), + ); }); } QueryBuilder - ethTagBGIntGreaterThan( - int value, { - bool include = false, - }) { + ethTagBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethTagBGInt', + value: value, + ), + ); }); } QueryBuilder - ethTagBGIntLessThan( - int value, { - bool include = false, - }) { + ethTagBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethTagBGInt', + value: value, + ), + ); }); } QueryBuilder - ethTagBGIntBetween( + ethTagBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethTagBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethTagBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - ethTagTextIntEqualTo(int value) { + ethTagTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethTagTextInt', value: value), + ); }); } QueryBuilder - ethTagTextIntGreaterThan( - int value, { - bool include = false, - }) { + ethTagTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethTagTextInt', + value: value, + ), + ); }); } QueryBuilder - ethTagTextIntLessThan( - int value, { - bool include = false, - }) { + ethTagTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethTagTextInt', + value: value, + ), + ); }); } QueryBuilder - ethTagTextIntBetween( + ethTagTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethTagTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethTagTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - ethWalletTagBGIntEqualTo(int value) { + ethWalletTagBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethWalletTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethWalletTagBGInt', value: value), + ); }); } QueryBuilder - ethWalletTagBGIntGreaterThan( - int value, { - bool include = false, - }) { + ethWalletTagBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethWalletTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethWalletTagBGInt', + value: value, + ), + ); }); } QueryBuilder - ethWalletTagBGIntLessThan( - int value, { - bool include = false, - }) { + ethWalletTagBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethWalletTagBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethWalletTagBGInt', + value: value, + ), + ); }); } QueryBuilder - ethWalletTagBGIntBetween( + ethWalletTagBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethWalletTagBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethWalletTagBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - ethWalletTagTextIntEqualTo(int value) { + ethWalletTagTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethWalletTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethWalletTagTextInt', value: value), + ); }); } QueryBuilder - ethWalletTagTextIntGreaterThan( - int value, { - bool include = false, - }) { + ethWalletTagTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethWalletTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethWalletTagTextInt', + value: value, + ), + ); }); } QueryBuilder - ethWalletTagTextIntLessThan( - int value, { - bool include = false, - }) { + ethWalletTagTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethWalletTagTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethWalletTagTextInt', + value: value, + ), + ); }); } QueryBuilder - ethWalletTagTextIntBetween( + ethWalletTagTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethWalletTagTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethWalletTagTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - favoriteStarActiveIntEqualTo(int value) { + favoriteStarActiveIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'favoriteStarActiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'favoriteStarActiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarActiveIntGreaterThan( - int value, { - bool include = false, - }) { + favoriteStarActiveIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'favoriteStarActiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'favoriteStarActiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarActiveIntLessThan( - int value, { - bool include = false, - }) { + favoriteStarActiveIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'favoriteStarActiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'favoriteStarActiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarActiveIntBetween( + favoriteStarActiveIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'favoriteStarActiveInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'favoriteStarActiveInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - favoriteStarInactiveIntEqualTo(int value) { + favoriteStarInactiveIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'favoriteStarInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'favoriteStarInactiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarInactiveIntGreaterThan( - int value, { - bool include = false, - }) { + favoriteStarInactiveIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'favoriteStarInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'favoriteStarInactiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarInactiveIntLessThan( - int value, { - bool include = false, - }) { + favoriteStarInactiveIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'favoriteStarInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'favoriteStarInactiveInt', + value: value, + ), + ); }); } QueryBuilder - favoriteStarInactiveIntBetween( + favoriteStarInactiveIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'favoriteStarInactiveInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'favoriteStarInactiveInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - gradientBackgroundStringIsNull() { + gradientBackgroundStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'gradientBackgroundString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'gradientBackgroundString'), + ); }); } QueryBuilder - gradientBackgroundStringIsNotNull() { + gradientBackgroundStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'gradientBackgroundString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'gradientBackgroundString'), + ); }); } QueryBuilder - gradientBackgroundStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + gradientBackgroundStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringGreaterThan( + gradientBackgroundStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringLessThan( + gradientBackgroundStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringBetween( + gradientBackgroundStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -4722,211 +4825,229 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'gradientBackgroundString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'gradientBackgroundString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringStartsWith( + gradientBackgroundStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + gradientBackgroundStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringContains(String value, - {bool caseSensitive = true}) { + gradientBackgroundStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'gradientBackgroundString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'gradientBackgroundString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringMatches(String pattern, - {bool caseSensitive = true}) { + gradientBackgroundStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'gradientBackgroundString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'gradientBackgroundString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - gradientBackgroundStringIsEmpty() { + gradientBackgroundStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'gradientBackgroundString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'gradientBackgroundString', + value: '', + ), + ); }); } QueryBuilder - gradientBackgroundStringIsNotEmpty() { + gradientBackgroundStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'gradientBackgroundString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'gradientBackgroundString', + value: '', + ), + ); }); } QueryBuilder - highlightIntEqualTo(int value) { + highlightIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'highlightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'highlightInt', value: value), + ); }); } QueryBuilder - highlightIntGreaterThan( - int value, { - bool include = false, - }) { + highlightIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'highlightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'highlightInt', + value: value, + ), + ); }); } QueryBuilder - highlightIntLessThan( - int value, { - bool include = false, - }) { + highlightIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'highlightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'highlightInt', + value: value, + ), + ); }); } QueryBuilder - highlightIntBetween( + highlightIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'highlightInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'highlightInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringIsNull() { + homeViewButtonBarBoxShadowStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'homeViewButtonBarBoxShadowString', - )); + return query.addFilterCondition( + const FilterCondition.isNull( + property: r'homeViewButtonBarBoxShadowString', + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringIsNotNull() { + homeViewButtonBarBoxShadowStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'homeViewButtonBarBoxShadowString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull( + property: r'homeViewButtonBarBoxShadowString', + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringEqualTo( + homeViewButtonBarBoxShadowStringEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringGreaterThan( + homeViewButtonBarBoxShadowStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringLessThan( + homeViewButtonBarBoxShadowStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringBetween( + homeViewButtonBarBoxShadowStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -4934,96 +5055,114 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'homeViewButtonBarBoxShadowString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'homeViewButtonBarBoxShadowString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringStartsWith( + homeViewButtonBarBoxShadowStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringEndsWith( + homeViewButtonBarBoxShadowStringEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringContains(String value, - {bool caseSensitive = true}) { + homeViewButtonBarBoxShadowStringContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'homeViewButtonBarBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'homeViewButtonBarBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringMatches(String pattern, - {bool caseSensitive = true}) { + homeViewButtonBarBoxShadowStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'homeViewButtonBarBoxShadowString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'homeViewButtonBarBoxShadowString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringIsEmpty() { + homeViewButtonBarBoxShadowStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'homeViewButtonBarBoxShadowString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'homeViewButtonBarBoxShadowString', + value: '', + ), + ); }); } QueryBuilder - homeViewButtonBarBoxShadowStringIsNotEmpty() { + homeViewButtonBarBoxShadowStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'homeViewButtonBarBoxShadowString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'homeViewButtonBarBoxShadowString', + value: '', + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -5032,11 +5171,13 @@ extension StackThemeQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -5045,11 +5186,13 @@ extension StackThemeQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -5060,349 +5203,351 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - infoItemBGIntEqualTo(int value) { + infoItemBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'infoItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'infoItemBGInt', value: value), + ); }); } QueryBuilder - infoItemBGIntGreaterThan( - int value, { - bool include = false, - }) { + infoItemBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'infoItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'infoItemBGInt', + value: value, + ), + ); }); } QueryBuilder - infoItemBGIntLessThan( - int value, { - bool include = false, - }) { + infoItemBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'infoItemBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'infoItemBGInt', + value: value, + ), + ); }); } QueryBuilder - infoItemBGIntBetween( + infoItemBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'infoItemBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'infoItemBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - infoItemIconsIntEqualTo(int value) { + infoItemIconsIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'infoItemIconsInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'infoItemIconsInt', value: value), + ); }); } QueryBuilder - infoItemIconsIntGreaterThan( - int value, { - bool include = false, - }) { + infoItemIconsIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'infoItemIconsInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'infoItemIconsInt', + value: value, + ), + ); }); } QueryBuilder - infoItemIconsIntLessThan( - int value, { - bool include = false, - }) { + infoItemIconsIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'infoItemIconsInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'infoItemIconsInt', + value: value, + ), + ); }); } QueryBuilder - infoItemIconsIntBetween( + infoItemIconsIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'infoItemIconsInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'infoItemIconsInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - infoItemLabelIntEqualTo(int value) { + infoItemLabelIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'infoItemLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'infoItemLabelInt', value: value), + ); }); } QueryBuilder - infoItemLabelIntGreaterThan( - int value, { - bool include = false, - }) { + infoItemLabelIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'infoItemLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'infoItemLabelInt', + value: value, + ), + ); }); } QueryBuilder - infoItemLabelIntLessThan( - int value, { - bool include = false, - }) { + infoItemLabelIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'infoItemLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'infoItemLabelInt', + value: value, + ), + ); }); } QueryBuilder - infoItemLabelIntBetween( + infoItemLabelIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'infoItemLabelInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'infoItemLabelInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - infoItemTextIntEqualTo(int value) { + infoItemTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'infoItemTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'infoItemTextInt', value: value), + ); }); } QueryBuilder - infoItemTextIntGreaterThan( - int value, { - bool include = false, - }) { + infoItemTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'infoItemTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'infoItemTextInt', + value: value, + ), + ); }); } QueryBuilder - infoItemTextIntLessThan( - int value, { - bool include = false, - }) { + infoItemTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'infoItemTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'infoItemTextInt', + value: value, + ), + ); }); } QueryBuilder - infoItemTextIntBetween( + infoItemTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'infoItemTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'infoItemTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - loadingOverlayTextColorIntEqualTo(int value) { + loadingOverlayTextColorIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingOverlayTextColorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'loadingOverlayTextColorInt', + value: value, + ), + ); }); } QueryBuilder - loadingOverlayTextColorIntGreaterThan( - int value, { - bool include = false, - }) { + loadingOverlayTextColorIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'loadingOverlayTextColorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'loadingOverlayTextColorInt', + value: value, + ), + ); }); } QueryBuilder - loadingOverlayTextColorIntLessThan( - int value, { - bool include = false, - }) { + loadingOverlayTextColorIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'loadingOverlayTextColorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'loadingOverlayTextColorInt', + value: value, + ), + ); }); } QueryBuilder - loadingOverlayTextColorIntBetween( + loadingOverlayTextColorIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'loadingOverlayTextColorInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'loadingOverlayTextColorInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - myStackContactIconBGIntEqualTo(int value) { + myStackContactIconBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'myStackContactIconBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'myStackContactIconBGInt', + value: value, + ), + ); }); } QueryBuilder - myStackContactIconBGIntGreaterThan( - int value, { - bool include = false, - }) { + myStackContactIconBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'myStackContactIconBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'myStackContactIconBGInt', + value: value, + ), + ); }); } QueryBuilder - myStackContactIconBGIntLessThan( - int value, { - bool include = false, - }) { + myStackContactIconBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'myStackContactIconBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'myStackContactIconBGInt', + value: value, + ), + ); }); } QueryBuilder - myStackContactIconBGIntBetween( + myStackContactIconBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'myStackContactIconBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'myStackContactIconBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -5411,11 +5556,13 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -5425,12 +5572,14 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -5440,12 +5589,14 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -5457,14 +5608,16 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -5473,11 +5626,13 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -5486,315 +5641,327 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } QueryBuilder - numberBackDefaultIntEqualTo(int value) { + numberBackDefaultIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numberBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'numberBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberBackDefaultIntGreaterThan( - int value, { - bool include = false, - }) { + numberBackDefaultIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numberBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numberBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberBackDefaultIntLessThan( - int value, { - bool include = false, - }) { + numberBackDefaultIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numberBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numberBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberBackDefaultIntBetween( + numberBackDefaultIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numberBackDefaultInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numberBackDefaultInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - numberTextDefaultIntEqualTo(int value) { + numberTextDefaultIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numberTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'numberTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberTextDefaultIntGreaterThan( - int value, { - bool include = false, - }) { + numberTextDefaultIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numberTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numberTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberTextDefaultIntLessThan( - int value, { - bool include = false, - }) { + numberTextDefaultIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numberTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numberTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numberTextDefaultIntBetween( + numberTextDefaultIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numberTextDefaultInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numberTextDefaultInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - numpadBackDefaultIntEqualTo(int value) { + numpadBackDefaultIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numpadBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'numpadBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadBackDefaultIntGreaterThan( - int value, { - bool include = false, - }) { + numpadBackDefaultIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numpadBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numpadBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadBackDefaultIntLessThan( - int value, { - bool include = false, - }) { + numpadBackDefaultIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numpadBackDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numpadBackDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadBackDefaultIntBetween( + numpadBackDefaultIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numpadBackDefaultInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numpadBackDefaultInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - numpadTextDefaultIntEqualTo(int value) { + numpadTextDefaultIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'numpadTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'numpadTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadTextDefaultIntGreaterThan( - int value, { - bool include = false, - }) { + numpadTextDefaultIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'numpadTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'numpadTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadTextDefaultIntLessThan( - int value, { - bool include = false, - }) { + numpadTextDefaultIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'numpadTextDefaultInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'numpadTextDefaultInt', + value: value, + ), + ); }); } QueryBuilder - numpadTextDefaultIntBetween( + numpadTextDefaultIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'numpadTextDefaultInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'numpadTextDefaultInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder overlayIntEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'overlayInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'overlayInt', value: value), + ); }); } QueryBuilder - overlayIntGreaterThan( - int value, { - bool include = false, - }) { + overlayIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'overlayInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'overlayInt', + value: value, + ), + ); }); } QueryBuilder - overlayIntLessThan( - int value, { - bool include = false, - }) { + overlayIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'overlayInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'overlayInt', + value: value, + ), + ); }); } @@ -5805,51 +5972,51 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'overlayInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'overlayInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder popupBGIntEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'popupBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'popupBGInt', value: value), + ); }); } QueryBuilder - popupBGIntGreaterThan( - int value, { - bool include = false, - }) { + popupBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'popupBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'popupBGInt', + value: value, + ), + ); }); } QueryBuilder - popupBGIntLessThan( - int value, { - bool include = false, - }) { + popupBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'popupBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'popupBGInt', + value: value, + ), + ); }); } @@ -5860,1213 +6027,1259 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'popupBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'popupBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonBorderDisabledIntEqualTo(int value) { + radioButtonBorderDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonBorderDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderDisabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonBorderDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderDisabledIntBetween( + radioButtonBorderDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonBorderDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonBorderDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonBorderEnabledIntEqualTo(int value) { + radioButtonBorderEnabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonBorderEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonBorderEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderEnabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonBorderEnabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonBorderEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonBorderEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderEnabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonBorderEnabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonBorderEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonBorderEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonBorderEnabledIntBetween( + radioButtonBorderEnabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonBorderEnabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonBorderEnabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonIconBorderDisabledIntEqualTo(int value) { + radioButtonIconBorderDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonIconBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonIconBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderDisabledIntGreaterThan( + radioButtonIconBorderDisabledIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonIconBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonIconBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderDisabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonIconBorderDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonIconBorderDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonIconBorderDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderDisabledIntBetween( + radioButtonIconBorderDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonIconBorderDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonIconBorderDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonIconBorderIntEqualTo(int value) { + radioButtonIconBorderIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonIconBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonIconBorderInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonIconBorderIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonIconBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonIconBorderInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderIntLessThan( - int value, { - bool include = false, - }) { + radioButtonIconBorderIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonIconBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonIconBorderInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconBorderIntBetween( + radioButtonIconBorderIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonIconBorderInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonIconBorderInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonIconCircleIntEqualTo(int value) { + radioButtonIconCircleIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonIconCircleInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonIconCircleInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconCircleIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonIconCircleIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonIconCircleInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonIconCircleInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconCircleIntLessThan( - int value, { - bool include = false, - }) { + radioButtonIconCircleIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonIconCircleInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonIconCircleInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconCircleIntBetween( + radioButtonIconCircleIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonIconCircleInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonIconCircleInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonIconEnabledIntEqualTo(int value) { + radioButtonIconEnabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonIconEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonIconEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconEnabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonIconEnabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonIconEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonIconEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconEnabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonIconEnabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonIconEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonIconEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonIconEnabledIntBetween( + radioButtonIconEnabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonIconEnabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonIconEnabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonLabelDisabledIntEqualTo(int value) { + radioButtonLabelDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonLabelDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonLabelDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonLabelDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonLabelDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonLabelDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelDisabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonLabelDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonLabelDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonLabelDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelDisabledIntBetween( + radioButtonLabelDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonLabelDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonLabelDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonLabelEnabledIntEqualTo(int value) { + radioButtonLabelEnabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonLabelEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonLabelEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelEnabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonLabelEnabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonLabelEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonLabelEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelEnabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonLabelEnabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonLabelEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonLabelEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonLabelEnabledIntBetween( + radioButtonLabelEnabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonLabelEnabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonLabelEnabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonTextDisabledIntEqualTo(int value) { + radioButtonTextDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonTextDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextDisabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonTextDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonTextDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonTextDisabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextDisabledIntBetween( + radioButtonTextDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonTextDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonTextDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - radioButtonTextEnabledIntEqualTo(int value) { + radioButtonTextEnabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'radioButtonTextEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'radioButtonTextEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextEnabledIntGreaterThan( - int value, { - bool include = false, - }) { + radioButtonTextEnabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'radioButtonTextEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'radioButtonTextEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextEnabledIntLessThan( - int value, { - bool include = false, - }) { + radioButtonTextEnabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'radioButtonTextEnabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'radioButtonTextEnabledInt', + value: value, + ), + ); }); } QueryBuilder - radioButtonTextEnabledIntBetween( + radioButtonTextEnabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'radioButtonTextEnabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'radioButtonTextEnabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - rateTypeToggleColorOffIntEqualTo(int value) { + rateTypeToggleColorOffIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateTypeToggleColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'rateTypeToggleColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOffIntGreaterThan( - int value, { - bool include = false, - }) { + rateTypeToggleColorOffIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateTypeToggleColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateTypeToggleColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOffIntLessThan( - int value, { - bool include = false, - }) { + rateTypeToggleColorOffIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateTypeToggleColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateTypeToggleColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOffIntBetween( + rateTypeToggleColorOffIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateTypeToggleColorOffInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateTypeToggleColorOffInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - rateTypeToggleColorOnIntEqualTo(int value) { + rateTypeToggleColorOnIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateTypeToggleColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'rateTypeToggleColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOnIntGreaterThan( - int value, { - bool include = false, - }) { + rateTypeToggleColorOnIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateTypeToggleColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateTypeToggleColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOnIntLessThan( - int value, { - bool include = false, - }) { + rateTypeToggleColorOnIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateTypeToggleColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateTypeToggleColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleColorOnIntBetween( + rateTypeToggleColorOnIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateTypeToggleColorOnInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateTypeToggleColorOnInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOffIntEqualTo(int value) { + rateTypeToggleDesktopColorOffIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateTypeToggleDesktopColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'rateTypeToggleDesktopColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOffIntGreaterThan( + rateTypeToggleDesktopColorOffIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateTypeToggleDesktopColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateTypeToggleDesktopColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOffIntLessThan( - int value, { - bool include = false, - }) { + rateTypeToggleDesktopColorOffIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateTypeToggleDesktopColorOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateTypeToggleDesktopColorOffInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOffIntBetween( + rateTypeToggleDesktopColorOffIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateTypeToggleDesktopColorOffInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateTypeToggleDesktopColorOffInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOnIntEqualTo(int value) { + rateTypeToggleDesktopColorOnIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'rateTypeToggleDesktopColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'rateTypeToggleDesktopColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOnIntGreaterThan( + rateTypeToggleDesktopColorOnIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'rateTypeToggleDesktopColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'rateTypeToggleDesktopColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOnIntLessThan( - int value, { - bool include = false, - }) { + rateTypeToggleDesktopColorOnIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'rateTypeToggleDesktopColorOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'rateTypeToggleDesktopColorOnInt', + value: value, + ), + ); }); } QueryBuilder - rateTypeToggleDesktopColorOnIntBetween( + rateTypeToggleDesktopColorOnIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'rateTypeToggleDesktopColorOnInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'rateTypeToggleDesktopColorOnInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsIconBack2IntEqualTo(int value) { + settingsIconBack2IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsIconBack2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'settingsIconBack2Int', + value: value, + ), + ); }); } QueryBuilder - settingsIconBack2IntGreaterThan( - int value, { - bool include = false, - }) { + settingsIconBack2IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsIconBack2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsIconBack2Int', + value: value, + ), + ); }); } QueryBuilder - settingsIconBack2IntLessThan( - int value, { - bool include = false, - }) { + settingsIconBack2IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsIconBack2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsIconBack2Int', + value: value, + ), + ); }); } QueryBuilder - settingsIconBack2IntBetween( + settingsIconBack2IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsIconBack2Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsIconBack2Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsIconBackIntEqualTo(int value) { + settingsIconBackIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'settingsIconBackInt', value: value), + ); }); } QueryBuilder - settingsIconBackIntGreaterThan( - int value, { - bool include = false, - }) { + settingsIconBackIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsIconBackInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconBackIntLessThan( - int value, { - bool include = false, - }) { + settingsIconBackIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsIconBackInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsIconBackInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconBackIntBetween( + settingsIconBackIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsIconBackInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsIconBackInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsIconElementIntEqualTo(int value) { + settingsIconElementIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsIconElementInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'settingsIconElementInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconElementIntGreaterThan( - int value, { - bool include = false, - }) { + settingsIconElementIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsIconElementInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsIconElementInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconElementIntLessThan( - int value, { - bool include = false, - }) { + settingsIconElementIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsIconElementInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsIconElementInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconElementIntBetween( + settingsIconElementIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsIconElementInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsIconElementInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsIconIconIntEqualTo(int value) { + settingsIconIconIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'settingsIconIconInt', value: value), + ); }); } QueryBuilder - settingsIconIconIntGreaterThan( - int value, { - bool include = false, - }) { + settingsIconIconIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsIconIconInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconIconIntLessThan( - int value, { - bool include = false, - }) { + settingsIconIconIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsIconIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsIconIconInt', + value: value, + ), + ); }); } QueryBuilder - settingsIconIconIntBetween( + settingsIconIconIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsIconIconInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsIconIconInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsItem2ActiveBGIntEqualTo(int value) { + settingsItem2ActiveBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsItem2ActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'settingsItem2ActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveBGIntGreaterThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsItem2ActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsItem2ActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveBGIntLessThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsItem2ActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsItem2ActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveBGIntBetween( + settingsItem2ActiveBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsItem2ActiveBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsItem2ActiveBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsItem2ActiveSubIntEqualTo(int value) { + settingsItem2ActiveSubIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsItem2ActiveSubInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'settingsItem2ActiveSubInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveSubIntGreaterThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveSubIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsItem2ActiveSubInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsItem2ActiveSubInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveSubIntLessThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveSubIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsItem2ActiveSubInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsItem2ActiveSubInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveSubIntBetween( + settingsItem2ActiveSubIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsItem2ActiveSubInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsItem2ActiveSubInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - settingsItem2ActiveTextIntEqualTo(int value) { + settingsItem2ActiveTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'settingsItem2ActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'settingsItem2ActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveTextIntGreaterThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'settingsItem2ActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'settingsItem2ActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveTextIntLessThan( - int value, { - bool include = false, - }) { + settingsItem2ActiveTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'settingsItem2ActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'settingsItem2ActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - settingsItem2ActiveTextIntBetween( + settingsItem2ActiveTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'settingsItem2ActiveTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'settingsItem2ActiveTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder shadowIntEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'shadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'shadowInt', value: value), + ); }); } QueryBuilder - shadowIntGreaterThan( - int value, { - bool include = false, - }) { + shadowIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'shadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'shadowInt', + value: value, + ), + ); }); } @@ -7075,11 +7288,13 @@ extension StackThemeQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'shadowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'shadowInt', + value: value, + ), + ); }); } @@ -7090,373 +7305,380 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'shadowInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'shadowInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarBackErrorIntEqualTo(int value) { + snackBarBackErrorIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarBackErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'snackBarBackErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackErrorIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarBackErrorIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarBackErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarBackErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackErrorIntLessThan( - int value, { - bool include = false, - }) { + snackBarBackErrorIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarBackErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarBackErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackErrorIntBetween( + snackBarBackErrorIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarBackErrorInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarBackErrorInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarBackInfoIntEqualTo(int value) { + snackBarBackInfoIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarBackInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'snackBarBackInfoInt', value: value), + ); }); } QueryBuilder - snackBarBackInfoIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarBackInfoIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarBackInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarBackInfoInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackInfoIntLessThan( - int value, { - bool include = false, - }) { + snackBarBackInfoIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarBackInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarBackInfoInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackInfoIntBetween( + snackBarBackInfoIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarBackInfoInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarBackInfoInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarBackSuccessIntEqualTo(int value) { + snackBarBackSuccessIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarBackSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'snackBarBackSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackSuccessIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarBackSuccessIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarBackSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarBackSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackSuccessIntLessThan( - int value, { - bool include = false, - }) { + snackBarBackSuccessIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarBackSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarBackSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarBackSuccessIntBetween( + snackBarBackSuccessIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarBackSuccessInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarBackSuccessInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarTextErrorIntEqualTo(int value) { + snackBarTextErrorIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarTextErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'snackBarTextErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextErrorIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarTextErrorIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarTextErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarTextErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextErrorIntLessThan( - int value, { - bool include = false, - }) { + snackBarTextErrorIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarTextErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarTextErrorInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextErrorIntBetween( + snackBarTextErrorIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarTextErrorInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarTextErrorInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarTextInfoIntEqualTo(int value) { + snackBarTextInfoIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarTextInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'snackBarTextInfoInt', value: value), + ); }); } QueryBuilder - snackBarTextInfoIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarTextInfoIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarTextInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarTextInfoInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextInfoIntLessThan( - int value, { - bool include = false, - }) { + snackBarTextInfoIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarTextInfoInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarTextInfoInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextInfoIntBetween( + snackBarTextInfoIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarTextInfoInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarTextInfoInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - snackBarTextSuccessIntEqualTo(int value) { + snackBarTextSuccessIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'snackBarTextSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'snackBarTextSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextSuccessIntGreaterThan( - int value, { - bool include = false, - }) { + snackBarTextSuccessIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'snackBarTextSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'snackBarTextSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextSuccessIntLessThan( - int value, { - bool include = false, - }) { + snackBarTextSuccessIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'snackBarTextSuccessInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'snackBarTextSuccessInt', + value: value, + ), + ); }); } QueryBuilder - snackBarTextSuccessIntBetween( + snackBarTextSuccessIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'snackBarTextSuccessInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'snackBarTextSuccessInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder splashIntEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'splashInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'splashInt', value: value), + ); }); } QueryBuilder - splashIntGreaterThan( - int value, { - bool include = false, - }) { + splashIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'splashInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'splashInt', + value: value, + ), + ); }); } @@ -7465,11 +7687,13 @@ extension StackThemeQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'splashInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'splashInt', + value: value, + ), + ); }); } @@ -7480,232 +7704,237 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'splashInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'splashInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stackWalletBGIntEqualTo(int value) { + stackWalletBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackWalletBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stackWalletBGInt', value: value), + ); }); } QueryBuilder - stackWalletBGIntGreaterThan( - int value, { - bool include = false, - }) { + stackWalletBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackWalletBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackWalletBGInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletBGIntLessThan( - int value, { - bool include = false, - }) { + stackWalletBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackWalletBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackWalletBGInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletBGIntBetween( + stackWalletBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackWalletBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackWalletBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stackWalletBottomIntEqualTo(int value) { + stackWalletBottomIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackWalletBottomInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stackWalletBottomInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletBottomIntGreaterThan( - int value, { - bool include = false, - }) { + stackWalletBottomIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackWalletBottomInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackWalletBottomInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletBottomIntLessThan( - int value, { - bool include = false, - }) { + stackWalletBottomIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackWalletBottomInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackWalletBottomInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletBottomIntBetween( + stackWalletBottomIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackWalletBottomInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackWalletBottomInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stackWalletMidIntEqualTo(int value) { + stackWalletMidIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackWalletMidInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stackWalletMidInt', value: value), + ); }); } QueryBuilder - stackWalletMidIntGreaterThan( - int value, { - bool include = false, - }) { + stackWalletMidIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackWalletMidInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackWalletMidInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletMidIntLessThan( - int value, { - bool include = false, - }) { + stackWalletMidIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackWalletMidInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackWalletMidInt', + value: value, + ), + ); }); } QueryBuilder - stackWalletMidIntBetween( + stackWalletMidIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackWalletMidInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackWalletMidInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - standardBoxShadowStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + standardBoxShadowStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringGreaterThan( + standardBoxShadowStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringLessThan( + standardBoxShadowStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringBetween( + standardBoxShadowStringBetween( String lower, String upper, { bool includeLower = true, @@ -7713,2886 +7942,2968 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'standardBoxShadowString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'standardBoxShadowString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + standardBoxShadowStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + standardBoxShadowStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringContains(String value, - {bool caseSensitive = true}) { + standardBoxShadowStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'standardBoxShadowString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'standardBoxShadowString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringMatches(String pattern, - {bool caseSensitive = true}) { + standardBoxShadowStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'standardBoxShadowString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'standardBoxShadowString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - standardBoxShadowStringIsEmpty() { + standardBoxShadowStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'standardBoxShadowString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'standardBoxShadowString', + value: '', + ), + ); }); } QueryBuilder - standardBoxShadowStringIsNotEmpty() { + standardBoxShadowStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'standardBoxShadowString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'standardBoxShadowString', + value: '', + ), + ); }); } QueryBuilder - stepIndicatorBGCheckIntEqualTo(int value) { + stepIndicatorBGCheckIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorBGCheckInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorBGCheckInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGCheckIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorBGCheckIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorBGCheckInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorBGCheckInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGCheckIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorBGCheckIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorBGCheckInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorBGCheckInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGCheckIntBetween( + stepIndicatorBGCheckIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorBGCheckInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorBGCheckInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorBGInactiveIntEqualTo(int value) { + stepIndicatorBGInactiveIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorBGInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorBGInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGInactiveIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorBGInactiveIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorBGInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorBGInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGInactiveIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorBGInactiveIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorBGInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorBGInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGInactiveIntBetween( + stepIndicatorBGInactiveIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorBGInactiveInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorBGInactiveInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesInactiveIntEqualTo(int value) { + stepIndicatorBGLinesInactiveIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorBGLinesInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorBGLinesInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesInactiveIntGreaterThan( + stepIndicatorBGLinesInactiveIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorBGLinesInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorBGLinesInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesInactiveIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorBGLinesInactiveIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorBGLinesInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorBGLinesInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesInactiveIntBetween( + stepIndicatorBGLinesInactiveIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorBGLinesInactiveInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorBGLinesInactiveInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesIntEqualTo(int value) { + stepIndicatorBGLinesIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorBGLinesInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorBGLinesInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorBGLinesIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorBGLinesInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorBGLinesInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorBGLinesIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorBGLinesInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorBGLinesInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGLinesIntBetween( + stepIndicatorBGLinesIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorBGLinesInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorBGLinesInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorBGNumberIntEqualTo(int value) { + stepIndicatorBGNumberIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorBGNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorBGNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGNumberIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorBGNumberIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorBGNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorBGNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGNumberIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorBGNumberIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorBGNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorBGNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorBGNumberIntBetween( + stepIndicatorBGNumberIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorBGNumberInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorBGNumberInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorIconInactiveIntEqualTo(int value) { + stepIndicatorIconInactiveIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorIconInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorIconInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconInactiveIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorIconInactiveIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorIconInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorIconInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconInactiveIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorIconInactiveIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorIconInactiveInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorIconInactiveInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconInactiveIntBetween( + stepIndicatorIconInactiveIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorIconInactiveInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorIconInactiveInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorIconNumberIntEqualTo(int value) { + stepIndicatorIconNumberIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorIconNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorIconNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconNumberIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorIconNumberIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorIconNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorIconNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconNumberIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorIconNumberIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorIconNumberInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorIconNumberInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconNumberIntBetween( + stepIndicatorIconNumberIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorIconNumberInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorIconNumberInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - stepIndicatorIconTextIntEqualTo(int value) { + stepIndicatorIconTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stepIndicatorIconTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stepIndicatorIconTextInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconTextIntGreaterThan( - int value, { - bool include = false, - }) { + stepIndicatorIconTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stepIndicatorIconTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stepIndicatorIconTextInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconTextIntLessThan( - int value, { - bool include = false, - }) { + stepIndicatorIconTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stepIndicatorIconTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stepIndicatorIconTextInt', + value: value, + ), + ); }); } QueryBuilder - stepIndicatorIconTextIntBetween( + stepIndicatorIconTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stepIndicatorIconTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stepIndicatorIconTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchBGDisabledIntEqualTo(int value) { + switchBGDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'switchBGDisabledInt', value: value), + ); }); } QueryBuilder - switchBGDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + switchBGDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchBGDisabledInt', + value: value, + ), + ); }); } QueryBuilder - switchBGDisabledIntLessThan( - int value, { - bool include = false, - }) { + switchBGDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchBGDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchBGDisabledInt', + value: value, + ), + ); }); } QueryBuilder - switchBGDisabledIntBetween( + switchBGDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchBGDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchBGDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchBGOffIntEqualTo(int value) { + switchBGOffIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchBGOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'switchBGOffInt', value: value), + ); }); } QueryBuilder - switchBGOffIntGreaterThan( - int value, { - bool include = false, - }) { + switchBGOffIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchBGOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchBGOffInt', + value: value, + ), + ); }); } QueryBuilder - switchBGOffIntLessThan( - int value, { - bool include = false, - }) { + switchBGOffIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchBGOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchBGOffInt', + value: value, + ), + ); }); } QueryBuilder - switchBGOffIntBetween( + switchBGOffIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchBGOffInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchBGOffInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchBGOnIntEqualTo(int value) { + switchBGOnIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchBGOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'switchBGOnInt', value: value), + ); }); } QueryBuilder - switchBGOnIntGreaterThan( - int value, { - bool include = false, - }) { + switchBGOnIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchBGOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchBGOnInt', + value: value, + ), + ); }); } QueryBuilder - switchBGOnIntLessThan( - int value, { - bool include = false, - }) { + switchBGOnIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchBGOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchBGOnInt', + value: value, + ), + ); }); } QueryBuilder - switchBGOnIntBetween( + switchBGOnIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchBGOnInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchBGOnInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchCircleDisabledIntEqualTo(int value) { + switchCircleDisabledIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchCircleDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'switchCircleDisabledInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleDisabledIntGreaterThan( - int value, { - bool include = false, - }) { + switchCircleDisabledIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchCircleDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchCircleDisabledInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleDisabledIntLessThan( - int value, { - bool include = false, - }) { + switchCircleDisabledIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchCircleDisabledInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchCircleDisabledInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleDisabledIntBetween( + switchCircleDisabledIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchCircleDisabledInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchCircleDisabledInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchCircleOffIntEqualTo(int value) { + switchCircleOffIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchCircleOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'switchCircleOffInt', value: value), + ); }); } QueryBuilder - switchCircleOffIntGreaterThan( - int value, { - bool include = false, - }) { + switchCircleOffIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchCircleOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchCircleOffInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleOffIntLessThan( - int value, { - bool include = false, - }) { + switchCircleOffIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchCircleOffInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchCircleOffInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleOffIntBetween( + switchCircleOffIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchCircleOffInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchCircleOffInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - switchCircleOnIntEqualTo(int value) { + switchCircleOnIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'switchCircleOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'switchCircleOnInt', value: value), + ); }); } QueryBuilder - switchCircleOnIntGreaterThan( - int value, { - bool include = false, - }) { + switchCircleOnIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'switchCircleOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'switchCircleOnInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleOnIntLessThan( - int value, { - bool include = false, - }) { + switchCircleOnIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'switchCircleOnInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'switchCircleOnInt', + value: value, + ), + ); }); } QueryBuilder - switchCircleOnIntBetween( + switchCircleOnIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'switchCircleOnInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'switchCircleOnInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textConfirmTotalAmountIntEqualTo(int value) { + textConfirmTotalAmountIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textConfirmTotalAmountInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textConfirmTotalAmountInt', + value: value, + ), + ); }); } QueryBuilder - textConfirmTotalAmountIntGreaterThan( - int value, { - bool include = false, - }) { + textConfirmTotalAmountIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textConfirmTotalAmountInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textConfirmTotalAmountInt', + value: value, + ), + ); }); } QueryBuilder - textConfirmTotalAmountIntLessThan( - int value, { - bool include = false, - }) { + textConfirmTotalAmountIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textConfirmTotalAmountInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textConfirmTotalAmountInt', + value: value, + ), + ); }); } QueryBuilder - textConfirmTotalAmountIntBetween( + textConfirmTotalAmountIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textConfirmTotalAmountInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textConfirmTotalAmountInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textDark2IntEqualTo(int value) { + textDark2IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textDark2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textDark2Int', value: value), + ); }); } QueryBuilder - textDark2IntGreaterThan( - int value, { - bool include = false, - }) { + textDark2IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textDark2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textDark2Int', + value: value, + ), + ); }); } QueryBuilder - textDark2IntLessThan( - int value, { - bool include = false, - }) { + textDark2IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textDark2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textDark2Int', + value: value, + ), + ); }); } QueryBuilder - textDark2IntBetween( + textDark2IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textDark2Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textDark2Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textDark3IntEqualTo(int value) { + textDark3IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textDark3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textDark3Int', value: value), + ); }); } QueryBuilder - textDark3IntGreaterThan( - int value, { - bool include = false, - }) { + textDark3IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textDark3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textDark3Int', + value: value, + ), + ); }); } QueryBuilder - textDark3IntLessThan( - int value, { - bool include = false, - }) { + textDark3IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textDark3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textDark3Int', + value: value, + ), + ); }); } QueryBuilder - textDark3IntBetween( + textDark3IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textDark3Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textDark3Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textDarkIntEqualTo(int value) { + textDarkIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textDarkInt', value: value), + ); }); } QueryBuilder - textDarkIntGreaterThan( - int value, { - bool include = false, - }) { + textDarkIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textDarkInt', + value: value, + ), + ); }); } QueryBuilder - textDarkIntLessThan( - int value, { - bool include = false, - }) { + textDarkIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textDarkInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textDarkInt', + value: value, + ), + ); }); } QueryBuilder - textDarkIntBetween( + textDarkIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textDarkInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textDarkInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textErrorIntEqualTo(int value) { + textErrorIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textErrorInt', value: value), + ); }); } QueryBuilder - textErrorIntGreaterThan( - int value, { - bool include = false, - }) { + textErrorIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textErrorInt', + value: value, + ), + ); }); } QueryBuilder - textErrorIntLessThan( - int value, { - bool include = false, - }) { + textErrorIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textErrorInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textErrorInt', + value: value, + ), + ); }); } QueryBuilder - textErrorIntBetween( + textErrorIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textErrorInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textErrorInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFavoriteCardIntEqualTo(int value) { + textFavoriteCardIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFavoriteCardInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textFavoriteCardInt', value: value), + ); }); } QueryBuilder - textFavoriteCardIntGreaterThan( - int value, { - bool include = false, - }) { + textFavoriteCardIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFavoriteCardInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFavoriteCardInt', + value: value, + ), + ); }); } QueryBuilder - textFavoriteCardIntLessThan( - int value, { - bool include = false, - }) { + textFavoriteCardIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFavoriteCardInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFavoriteCardInt', + value: value, + ), + ); }); } QueryBuilder - textFavoriteCardIntBetween( + textFavoriteCardIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFavoriteCardInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFavoriteCardInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldActiveBGIntEqualTo(int value) { + textFieldActiveBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveBGIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldActiveBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveBGIntLessThan( - int value, { - bool include = false, - }) { + textFieldActiveBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldActiveBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldActiveBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveBGIntBetween( + textFieldActiveBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldActiveBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldActiveBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldActiveLabelIntEqualTo(int value) { + textFieldActiveLabelIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldActiveLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldActiveLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveLabelIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldActiveLabelIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldActiveLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldActiveLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveLabelIntLessThan( - int value, { - bool include = false, - }) { + textFieldActiveLabelIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldActiveLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldActiveLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveLabelIntBetween( + textFieldActiveLabelIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldActiveLabelInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldActiveLabelInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconLeftIntEqualTo(int value) { + textFieldActiveSearchIconLeftIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldActiveSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldActiveSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconLeftIntGreaterThan( + textFieldActiveSearchIconLeftIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldActiveSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldActiveSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconLeftIntLessThan( - int value, { - bool include = false, - }) { + textFieldActiveSearchIconLeftIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldActiveSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldActiveSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconLeftIntBetween( + textFieldActiveSearchIconLeftIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldActiveSearchIconLeftInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldActiveSearchIconLeftInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconRightIntEqualTo(int value) { + textFieldActiveSearchIconRightIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldActiveSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldActiveSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconRightIntGreaterThan( + textFieldActiveSearchIconRightIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldActiveSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldActiveSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconRightIntLessThan( - int value, { - bool include = false, - }) { + textFieldActiveSearchIconRightIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldActiveSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldActiveSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveSearchIconRightIntBetween( + textFieldActiveSearchIconRightIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldActiveSearchIconRightInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldActiveSearchIconRightInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldActiveTextIntEqualTo(int value) { + textFieldActiveTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveTextIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldActiveTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveTextIntLessThan( - int value, { - bool include = false, - }) { + textFieldActiveTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldActiveTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldActiveTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldActiveTextIntBetween( + textFieldActiveTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldActiveTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldActiveTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldDefaultBGIntEqualTo(int value) { + textFieldDefaultBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldDefaultBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldDefaultBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultBGIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldDefaultBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldDefaultBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldDefaultBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultBGIntLessThan( - int value, { - bool include = false, - }) { + textFieldDefaultBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldDefaultBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldDefaultBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultBGIntBetween( + textFieldDefaultBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldDefaultBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldDefaultBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconLeftIntEqualTo(int value) { + textFieldDefaultSearchIconLeftIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldDefaultSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldDefaultSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconLeftIntGreaterThan( + textFieldDefaultSearchIconLeftIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldDefaultSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldDefaultSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconLeftIntLessThan( - int value, { - bool include = false, - }) { + textFieldDefaultSearchIconLeftIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldDefaultSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldDefaultSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconLeftIntBetween( + textFieldDefaultSearchIconLeftIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldDefaultSearchIconLeftInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldDefaultSearchIconLeftInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconRightIntEqualTo(int value) { + textFieldDefaultSearchIconRightIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldDefaultSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldDefaultSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconRightIntGreaterThan( + textFieldDefaultSearchIconRightIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldDefaultSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldDefaultSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconRightIntLessThan( + textFieldDefaultSearchIconRightIntLessThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldDefaultSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldDefaultSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultSearchIconRightIntBetween( + textFieldDefaultSearchIconRightIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldDefaultSearchIconRightInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldDefaultSearchIconRightInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldDefaultTextIntEqualTo(int value) { + textFieldDefaultTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldDefaultTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldDefaultTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultTextIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldDefaultTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldDefaultTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldDefaultTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultTextIntLessThan( - int value, { - bool include = false, - }) { + textFieldDefaultTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldDefaultTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldDefaultTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldDefaultTextIntBetween( + textFieldDefaultTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldDefaultTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldDefaultTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorBGIntEqualTo(int value) { + textFieldErrorBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textFieldErrorBGInt', value: value), + ); }); } QueryBuilder - textFieldErrorBGIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldErrorBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorBGIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorBGIntBetween( + textFieldErrorBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorBorderIntEqualTo(int value) { + textFieldErrorBorderIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldErrorBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorBorderIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldErrorBorderIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorBorderIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorBorderIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorBorderIntBetween( + textFieldErrorBorderIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorBorderInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorBorderInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorLabelIntEqualTo(int value) { + textFieldErrorLabelIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldErrorLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorLabelIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldErrorLabelIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorLabelIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorLabelIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorLabelIntBetween( + textFieldErrorLabelIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorLabelInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorLabelInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconLeftIntEqualTo(int value) { + textFieldErrorSearchIconLeftIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldErrorSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconLeftIntGreaterThan( + textFieldErrorSearchIconLeftIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconLeftIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorSearchIconLeftIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconLeftIntBetween( + textFieldErrorSearchIconLeftIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorSearchIconLeftInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorSearchIconLeftInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconRightIntEqualTo(int value) { + textFieldErrorSearchIconRightIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldErrorSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconRightIntGreaterThan( + textFieldErrorSearchIconRightIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconRightIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorSearchIconRightIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorSearchIconRightIntBetween( + textFieldErrorSearchIconRightIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorSearchIconRightInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorSearchIconRightInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldErrorTextIntEqualTo(int value) { + textFieldErrorTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldErrorTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldErrorTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorTextIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldErrorTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldErrorTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldErrorTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorTextIntLessThan( - int value, { - bool include = false, - }) { + textFieldErrorTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldErrorTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldErrorTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldErrorTextIntBetween( + textFieldErrorTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldErrorTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldErrorTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessBGIntEqualTo(int value) { + textFieldSuccessBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBGIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldSuccessBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBGIntLessThan( - int value, { - bool include = false, - }) { + textFieldSuccessBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessBGInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBGIntBetween( + textFieldSuccessBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessBorderIntEqualTo(int value) { + textFieldSuccessBorderIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBorderIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldSuccessBorderIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBorderIntLessThan( - int value, { - bool include = false, - }) { + textFieldSuccessBorderIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessBorderInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessBorderInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessBorderIntBetween( + textFieldSuccessBorderIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessBorderInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessBorderInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessLabelIntEqualTo(int value) { + textFieldSuccessLabelIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessLabelIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldSuccessLabelIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessLabelIntLessThan( - int value, { - bool include = false, - }) { + textFieldSuccessLabelIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessLabelInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessLabelInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessLabelIntBetween( + textFieldSuccessLabelIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessLabelInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessLabelInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconLeftIntEqualTo(int value) { + textFieldSuccessSearchIconLeftIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconLeftIntGreaterThan( + textFieldSuccessSearchIconLeftIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconLeftIntLessThan( - int value, { - bool include = false, - }) { + textFieldSuccessSearchIconLeftIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessSearchIconLeftInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessSearchIconLeftInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconLeftIntBetween( + textFieldSuccessSearchIconLeftIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessSearchIconLeftInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessSearchIconLeftInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconRightIntEqualTo(int value) { + textFieldSuccessSearchIconRightIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconRightIntGreaterThan( + textFieldSuccessSearchIconRightIntGreaterThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconRightIntLessThan( + textFieldSuccessSearchIconRightIntLessThan( int value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessSearchIconRightInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessSearchIconRightInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessSearchIconRightIntBetween( + textFieldSuccessSearchIconRightIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessSearchIconRightInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessSearchIconRightInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textFieldSuccessTextIntEqualTo(int value) { + textFieldSuccessTextIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textFieldSuccessTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textFieldSuccessTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessTextIntGreaterThan( - int value, { - bool include = false, - }) { + textFieldSuccessTextIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textFieldSuccessTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textFieldSuccessTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessTextIntLessThan( - int value, { - bool include = false, - }) { + textFieldSuccessTextIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textFieldSuccessTextInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textFieldSuccessTextInt', + value: value, + ), + ); }); } QueryBuilder - textFieldSuccessTextIntBetween( + textFieldSuccessTextIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textFieldSuccessTextInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textFieldSuccessTextInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textRestoreIntEqualTo(int value) { + textRestoreIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textRestoreInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textRestoreInt', value: value), + ); }); } QueryBuilder - textRestoreIntGreaterThan( - int value, { - bool include = false, - }) { + textRestoreIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textRestoreInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textRestoreInt', + value: value, + ), + ); }); } QueryBuilder - textRestoreIntLessThan( - int value, { - bool include = false, - }) { + textRestoreIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textRestoreInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textRestoreInt', + value: value, + ), + ); }); } QueryBuilder - textRestoreIntBetween( + textRestoreIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textRestoreInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textRestoreInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSelectedWordTableItemIntEqualTo(int value) { + textSelectedWordTableItemIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSelectedWordTableItemInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'textSelectedWordTableItemInt', + value: value, + ), + ); }); } QueryBuilder - textSelectedWordTableItemIntGreaterThan( - int value, { - bool include = false, - }) { + textSelectedWordTableItemIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSelectedWordTableItemInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSelectedWordTableItemInt', + value: value, + ), + ); }); } QueryBuilder - textSelectedWordTableItemIntLessThan( - int value, { - bool include = false, - }) { + textSelectedWordTableItemIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSelectedWordTableItemInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSelectedWordTableItemInt', + value: value, + ), + ); }); } QueryBuilder - textSelectedWordTableItemIntBetween( + textSelectedWordTableItemIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSelectedWordTableItemInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSelectedWordTableItemInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle1IntEqualTo(int value) { + textSubtitle1IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle1Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle1Int', value: value), + ); }); } QueryBuilder - textSubtitle1IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle1IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle1Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle1Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle1IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle1IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle1Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle1Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle1IntBetween( + textSubtitle1IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle1Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle1Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle2IntEqualTo(int value) { + textSubtitle2IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle2Int', value: value), + ); }); } QueryBuilder - textSubtitle2IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle2IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle2Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle2IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle2IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle2Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle2Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle2IntBetween( + textSubtitle2IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle2Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle2Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle3IntEqualTo(int value) { + textSubtitle3IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle3Int', value: value), + ); }); } QueryBuilder - textSubtitle3IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle3IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle3Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle3IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle3IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle3Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle3Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle3IntBetween( + textSubtitle3IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle3Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle3Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle4IntEqualTo(int value) { + textSubtitle4IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle4Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle4Int', value: value), + ); }); } QueryBuilder - textSubtitle4IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle4IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle4Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle4Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle4IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle4IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle4Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle4Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle4IntBetween( + textSubtitle4IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle4Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle4Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle5IntEqualTo(int value) { + textSubtitle5IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle5Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle5Int', value: value), + ); }); } QueryBuilder - textSubtitle5IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle5IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle5Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle5Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle5IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle5IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle5Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle5Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle5IntBetween( + textSubtitle5IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle5Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle5Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textSubtitle6IntEqualTo(int value) { + textSubtitle6IntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textSubtitle6Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textSubtitle6Int', value: value), + ); }); } QueryBuilder - textSubtitle6IntGreaterThan( - int value, { - bool include = false, - }) { + textSubtitle6IntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textSubtitle6Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textSubtitle6Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle6IntLessThan( - int value, { - bool include = false, - }) { + textSubtitle6IntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textSubtitle6Int', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textSubtitle6Int', + value: value, + ), + ); }); } QueryBuilder - textSubtitle6IntBetween( + textSubtitle6IntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textSubtitle6Int', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textSubtitle6Int', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - textWhiteIntEqualTo(int value) { + textWhiteIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'textWhiteInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'textWhiteInt', value: value), + ); }); } QueryBuilder - textWhiteIntGreaterThan( - int value, { - bool include = false, - }) { + textWhiteIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'textWhiteInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'textWhiteInt', + value: value, + ), + ); }); } QueryBuilder - textWhiteIntLessThan( - int value, { - bool include = false, - }) { + textWhiteIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'textWhiteInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'textWhiteInt', + value: value, + ), + ); }); } QueryBuilder - textWhiteIntBetween( + textWhiteIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'textWhiteInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'textWhiteInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -10601,27 +10912,31 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeIdGreaterThan( + themeIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -10631,12 +10946,14 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -10648,14 +10965,16 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themeId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themeId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -10664,11 +10983,13 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -10677,599 +10998,607 @@ extension StackThemeQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder themeIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themeId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'themeId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder themeIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themeId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'themeId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder themeIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themeId', value: ''), + ); }); } QueryBuilder - themeIdIsNotEmpty() { + themeIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themeId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themeId', value: ''), + ); }); } QueryBuilder - tokenSummaryBGIntEqualTo(int value) { + tokenSummaryBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenSummaryBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenSummaryBGInt', value: value), + ); }); } QueryBuilder - tokenSummaryBGIntGreaterThan( - int value, { - bool include = false, - }) { + tokenSummaryBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenSummaryBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenSummaryBGInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryBGIntLessThan( - int value, { - bool include = false, - }) { + tokenSummaryBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenSummaryBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenSummaryBGInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryBGIntBetween( + tokenSummaryBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenSummaryBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenSummaryBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenSummaryButtonBGIntEqualTo(int value) { + tokenSummaryButtonBGIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenSummaryButtonBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenSummaryButtonBGInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryButtonBGIntGreaterThan( - int value, { - bool include = false, - }) { + tokenSummaryButtonBGIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenSummaryButtonBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenSummaryButtonBGInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryButtonBGIntLessThan( - int value, { - bool include = false, - }) { + tokenSummaryButtonBGIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenSummaryButtonBGInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenSummaryButtonBGInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryButtonBGIntBetween( + tokenSummaryButtonBGIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenSummaryButtonBGInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenSummaryButtonBGInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenSummaryIconIntEqualTo(int value) { + tokenSummaryIconIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenSummaryIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenSummaryIconInt', value: value), + ); }); } QueryBuilder - tokenSummaryIconIntGreaterThan( - int value, { - bool include = false, - }) { + tokenSummaryIconIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenSummaryIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenSummaryIconInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryIconIntLessThan( - int value, { - bool include = false, - }) { + tokenSummaryIconIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenSummaryIconInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenSummaryIconInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryIconIntBetween( + tokenSummaryIconIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenSummaryIconInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenSummaryIconInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenSummaryTextPrimaryIntEqualTo(int value) { + tokenSummaryTextPrimaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenSummaryTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenSummaryTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextPrimaryIntGreaterThan( - int value, { - bool include = false, - }) { + tokenSummaryTextPrimaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenSummaryTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenSummaryTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextPrimaryIntLessThan( - int value, { - bool include = false, - }) { + tokenSummaryTextPrimaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenSummaryTextPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenSummaryTextPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextPrimaryIntBetween( + tokenSummaryTextPrimaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenSummaryTextPrimaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenSummaryTextPrimaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenSummaryTextSecondaryIntEqualTo(int value) { + tokenSummaryTextSecondaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenSummaryTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenSummaryTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextSecondaryIntGreaterThan( - int value, { - bool include = false, - }) { + tokenSummaryTextSecondaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenSummaryTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenSummaryTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextSecondaryIntLessThan( - int value, { - bool include = false, - }) { + tokenSummaryTextSecondaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenSummaryTextSecondaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenSummaryTextSecondaryInt', + value: value, + ), + ); }); } QueryBuilder - tokenSummaryTextSecondaryIntBetween( + tokenSummaryTextSecondaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenSummaryTextSecondaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenSummaryTextSecondaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - topNavIconGreenIntEqualTo(int value) { + topNavIconGreenIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'topNavIconGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'topNavIconGreenInt', value: value), + ); }); } QueryBuilder - topNavIconGreenIntGreaterThan( - int value, { - bool include = false, - }) { + topNavIconGreenIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'topNavIconGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'topNavIconGreenInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconGreenIntLessThan( - int value, { - bool include = false, - }) { + topNavIconGreenIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'topNavIconGreenInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'topNavIconGreenInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconGreenIntBetween( + topNavIconGreenIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'topNavIconGreenInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'topNavIconGreenInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - topNavIconPrimaryIntEqualTo(int value) { + topNavIconPrimaryIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'topNavIconPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'topNavIconPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconPrimaryIntGreaterThan( - int value, { - bool include = false, - }) { + topNavIconPrimaryIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'topNavIconPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'topNavIconPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconPrimaryIntLessThan( - int value, { - bool include = false, - }) { + topNavIconPrimaryIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'topNavIconPrimaryInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'topNavIconPrimaryInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconPrimaryIntBetween( + topNavIconPrimaryIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'topNavIconPrimaryInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'topNavIconPrimaryInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - topNavIconRedIntEqualTo(int value) { + topNavIconRedIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'topNavIconRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'topNavIconRedInt', value: value), + ); }); } QueryBuilder - topNavIconRedIntGreaterThan( - int value, { - bool include = false, - }) { + topNavIconRedIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'topNavIconRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'topNavIconRedInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconRedIntLessThan( - int value, { - bool include = false, - }) { + topNavIconRedIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'topNavIconRedInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'topNavIconRedInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconRedIntBetween( + topNavIconRedIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'topNavIconRedInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'topNavIconRedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - topNavIconYellowIntEqualTo(int value) { + topNavIconYellowIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'topNavIconYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'topNavIconYellowInt', value: value), + ); }); } QueryBuilder - topNavIconYellowIntGreaterThan( - int value, { - bool include = false, - }) { + topNavIconYellowIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'topNavIconYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'topNavIconYellowInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconYellowIntLessThan( - int value, { - bool include = false, - }) { + topNavIconYellowIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'topNavIconYellowInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'topNavIconYellowInt', + value: value, + ), + ); }); } QueryBuilder - topNavIconYellowIntBetween( + topNavIconYellowIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'topNavIconYellowInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'topNavIconYellowInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder versionIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'version', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'version'), + ); }); } QueryBuilder - versionIsNotNull() { + versionIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'version', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'version'), + ); }); } QueryBuilder versionEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'version', value: value), + ); }); } QueryBuilder - versionGreaterThan( - int? value, { - bool include = false, - }) { + versionGreaterThan(int? value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'version', + value: value, + ), + ); }); } @@ -11278,11 +11607,13 @@ extension StackThemeQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'version', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'version', + value: value, + ), + ); }); } @@ -11293,142 +11624,148 @@ extension StackThemeQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'version', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'version', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - warningBackgroundIntEqualTo(int value) { + warningBackgroundIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'warningBackgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'warningBackgroundInt', + value: value, + ), + ); }); } QueryBuilder - warningBackgroundIntGreaterThan( - int value, { - bool include = false, - }) { + warningBackgroundIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'warningBackgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'warningBackgroundInt', + value: value, + ), + ); }); } QueryBuilder - warningBackgroundIntLessThan( - int value, { - bool include = false, - }) { + warningBackgroundIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'warningBackgroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'warningBackgroundInt', + value: value, + ), + ); }); } QueryBuilder - warningBackgroundIntBetween( + warningBackgroundIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'warningBackgroundInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'warningBackgroundInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - warningForegroundIntEqualTo(int value) { + warningForegroundIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'warningForegroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'warningForegroundInt', + value: value, + ), + ); }); } QueryBuilder - warningForegroundIntGreaterThan( - int value, { - bool include = false, - }) { + warningForegroundIntGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'warningForegroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'warningForegroundInt', + value: value, + ), + ); }); } QueryBuilder - warningForegroundIntLessThan( - int value, { - bool include = false, - }) { + warningForegroundIntLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'warningForegroundInt', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'warningForegroundInt', + value: value, + ), + ); }); } QueryBuilder - warningForegroundIntBetween( + warningForegroundIntBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'warningForegroundInt', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'warningForegroundInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder assetsV3IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'zAssetsV3', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'zAssetsV3'), + ); }); } QueryBuilder - assetsV3IsNotNull() { + assetsV3IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'zAssetsV3', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'zAssetsV3'), + ); }); } } @@ -11436,21 +11773,24 @@ extension StackThemeQueryFilter extension StackThemeQueryObject on QueryBuilder { QueryBuilder assetsV1( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'assets'); }); } QueryBuilder assetsV2( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'assetsV2'); }); } QueryBuilder assetsV3( - FilterQuery q) { + FilterQuery q, + ) { return QueryBuilder.apply(this, (query) { return query.object(q, r'zAssetsV3'); }); @@ -11463,56 +11803,56 @@ extension StackThemeQueryLinks extension StackThemeQuerySortBy on QueryBuilder { QueryBuilder - sortByAccentColorBlueInt() { + sortByAccentColorBlueInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorBlueInt', Sort.asc); }); } QueryBuilder - sortByAccentColorBlueIntDesc() { + sortByAccentColorBlueIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorBlueInt', Sort.desc); }); } QueryBuilder - sortByAccentColorDarkInt() { + sortByAccentColorDarkInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorDarkInt', Sort.asc); }); } QueryBuilder - sortByAccentColorDarkIntDesc() { + sortByAccentColorDarkIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorDarkInt', Sort.desc); }); } QueryBuilder - sortByAccentColorGreenInt() { + sortByAccentColorGreenInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorGreenInt', Sort.asc); }); } QueryBuilder - sortByAccentColorGreenIntDesc() { + sortByAccentColorGreenIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorGreenInt', Sort.desc); }); } QueryBuilder - sortByAccentColorOrangeInt() { + sortByAccentColorOrangeInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorOrangeInt', Sort.asc); }); } QueryBuilder - sortByAccentColorOrangeIntDesc() { + sortByAccentColorOrangeIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorOrangeInt', Sort.desc); }); @@ -11525,35 +11865,35 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByAccentColorRedIntDesc() { + sortByAccentColorRedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorRedInt', Sort.desc); }); } QueryBuilder - sortByAccentColorYellowInt() { + sortByAccentColorYellowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorYellowInt', Sort.asc); }); } QueryBuilder - sortByAccentColorYellowIntDesc() { + sortByAccentColorYellowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorYellowInt', Sort.desc); }); } QueryBuilder - sortByBackgroundAppBarInt() { + sortByBackgroundAppBarInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'backgroundAppBarInt', Sort.asc); }); } QueryBuilder - sortByBackgroundAppBarIntDesc() { + sortByBackgroundAppBarIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'backgroundAppBarInt', Sort.desc); }); @@ -11578,63 +11918,63 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByBottomNavBackIntDesc() { + sortByBottomNavBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavBackInt', Sort.desc); }); } QueryBuilder - sortByBottomNavIconBackInt() { + sortByBottomNavIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconBackInt', Sort.asc); }); } QueryBuilder - sortByBottomNavIconBackIntDesc() { + sortByBottomNavIconBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconBackInt', Sort.desc); }); } QueryBuilder - sortByBottomNavIconIconHighlightedInt() { + sortByBottomNavIconIconHighlightedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.asc); }); } QueryBuilder - sortByBottomNavIconIconHighlightedIntDesc() { + sortByBottomNavIconIconHighlightedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.desc); }); } QueryBuilder - sortByBottomNavIconIconInt() { + sortByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconInt', Sort.asc); }); } QueryBuilder - sortByBottomNavIconIconIntDesc() { + sortByBottomNavIconIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconInt', Sort.desc); }); } QueryBuilder - sortByBottomNavShadowInt() { + sortByBottomNavShadowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavShadowInt', Sort.asc); }); } QueryBuilder - sortByBottomNavShadowIntDesc() { + sortByBottomNavShadowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavShadowInt', Sort.desc); }); @@ -11647,7 +11987,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByBottomNavTextIntDesc() { + sortByBottomNavTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavTextInt', Sort.desc); }); @@ -11660,372 +12000,374 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByBrightnessStringDesc() { + sortByBrightnessStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'brightnessString', Sort.desc); }); } QueryBuilder - sortByButtonBackBorderDisabledInt() { + sortByButtonBackBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonBackBorderDisabledIntDesc() { + sortByButtonBackBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonBackBorderInt() { + sortByButtonBackBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderInt', Sort.asc); }); } QueryBuilder - sortByButtonBackBorderIntDesc() { + sortByButtonBackBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderInt', Sort.desc); }); } QueryBuilder - sortByButtonBackBorderSecondaryDisabledInt() { + sortByButtonBackBorderSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonBackBorderSecondaryDisabledIntDesc() { + sortByButtonBackBorderSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy( - r'buttonBackBorderSecondaryDisabledInt', Sort.desc); + r'buttonBackBorderSecondaryDisabledInt', + Sort.desc, + ); }); } QueryBuilder - sortByButtonBackBorderSecondaryInt() { + sortByButtonBackBorderSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryInt', Sort.asc); }); } QueryBuilder - sortByButtonBackBorderSecondaryIntDesc() { + sortByButtonBackBorderSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryInt', Sort.desc); }); } QueryBuilder - sortByButtonBackPrimaryDisabledInt() { + sortByButtonBackPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonBackPrimaryDisabledIntDesc() { + sortByButtonBackPrimaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonBackPrimaryInt() { + sortByButtonBackPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryInt', Sort.asc); }); } QueryBuilder - sortByButtonBackPrimaryIntDesc() { + sortByButtonBackPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryInt', Sort.desc); }); } QueryBuilder - sortByButtonBackSecondaryDisabledInt() { + sortByButtonBackSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonBackSecondaryDisabledIntDesc() { + sortByButtonBackSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonBackSecondaryInt() { + sortByButtonBackSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryInt', Sort.asc); }); } QueryBuilder - sortByButtonBackSecondaryIntDesc() { + sortByButtonBackSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryInt', Sort.desc); }); } QueryBuilder - sortByButtonTextBorderInt() { + sortByButtonTextBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderInt', Sort.asc); }); } QueryBuilder - sortByButtonTextBorderIntDesc() { + sortByButtonTextBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderInt', Sort.desc); }); } QueryBuilder - sortByButtonTextBorderlessDisabledInt() { + sortByButtonTextBorderlessDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonTextBorderlessDisabledIntDesc() { + sortByButtonTextBorderlessDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonTextBorderlessInt() { + sortByButtonTextBorderlessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessInt', Sort.asc); }); } QueryBuilder - sortByButtonTextBorderlessIntDesc() { + sortByButtonTextBorderlessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessInt', Sort.desc); }); } QueryBuilder - sortByButtonTextDisabledInt() { + sortByButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonTextDisabledIntDesc() { + sortByButtonTextDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonTextPrimaryDisabledInt() { + sortByButtonTextPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonTextPrimaryDisabledIntDesc() { + sortByButtonTextPrimaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonTextPrimaryInt() { + sortByButtonTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryInt', Sort.asc); }); } QueryBuilder - sortByButtonTextPrimaryIntDesc() { + sortByButtonTextPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryInt', Sort.desc); }); } QueryBuilder - sortByButtonTextSecondaryDisabledInt() { + sortByButtonTextSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - sortByButtonTextSecondaryDisabledIntDesc() { + sortByButtonTextSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryDisabledInt', Sort.desc); }); } QueryBuilder - sortByButtonTextSecondaryInt() { + sortByButtonTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryInt', Sort.asc); }); } QueryBuilder - sortByButtonTextSecondaryIntDesc() { + sortByButtonTextSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryInt', Sort.desc); }); } QueryBuilder - sortByCheckboxBGCheckedInt() { + sortByCheckboxBGCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGCheckedInt', Sort.asc); }); } QueryBuilder - sortByCheckboxBGCheckedIntDesc() { + sortByCheckboxBGCheckedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGCheckedInt', Sort.desc); }); } QueryBuilder - sortByCheckboxBGDisabledInt() { + sortByCheckboxBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGDisabledInt', Sort.asc); }); } QueryBuilder - sortByCheckboxBGDisabledIntDesc() { + sortByCheckboxBGDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGDisabledInt', Sort.desc); }); } QueryBuilder - sortByCheckboxBorderEmptyInt() { + sortByCheckboxBorderEmptyInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBorderEmptyInt', Sort.asc); }); } QueryBuilder - sortByCheckboxBorderEmptyIntDesc() { + sortByCheckboxBorderEmptyIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBorderEmptyInt', Sort.desc); }); } QueryBuilder - sortByCheckboxIconCheckedInt() { + sortByCheckboxIconCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconCheckedInt', Sort.asc); }); } QueryBuilder - sortByCheckboxIconCheckedIntDesc() { + sortByCheckboxIconCheckedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconCheckedInt', Sort.desc); }); } QueryBuilder - sortByCheckboxIconDisabledInt() { + sortByCheckboxIconDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconDisabledInt', Sort.asc); }); } QueryBuilder - sortByCheckboxIconDisabledIntDesc() { + sortByCheckboxIconDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconDisabledInt', Sort.desc); }); } QueryBuilder - sortByCheckboxTextLabelInt() { + sortByCheckboxTextLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxTextLabelInt', Sort.asc); }); } QueryBuilder - sortByCheckboxTextLabelIntDesc() { + sortByCheckboxTextLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxTextLabelInt', Sort.desc); }); } QueryBuilder - sortByCoinColorsJsonString() { + sortByCoinColorsJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'coinColorsJsonString', Sort.asc); }); } QueryBuilder - sortByCoinColorsJsonStringDesc() { + sortByCoinColorsJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'coinColorsJsonString', Sort.desc); }); } QueryBuilder - sortByCurrencyListItemBGInt() { + sortByCurrencyListItemBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'currencyListItemBGInt', Sort.asc); }); } QueryBuilder - sortByCurrencyListItemBGIntDesc() { + sortByCurrencyListItemBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'currencyListItemBGInt', Sort.desc); }); } QueryBuilder - sortByCustomTextButtonDisabledTextInt() { + sortByCustomTextButtonDisabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonDisabledTextInt', Sort.asc); }); } QueryBuilder - sortByCustomTextButtonDisabledTextIntDesc() { + sortByCustomTextButtonDisabledTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonDisabledTextInt', Sort.desc); }); } QueryBuilder - sortByCustomTextButtonEnabledTextInt() { + sortByCustomTextButtonEnabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonEnabledTextInt', Sort.asc); }); } QueryBuilder - sortByCustomTextButtonEnabledTextIntDesc() { + sortByCustomTextButtonEnabledTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonEnabledTextInt', Sort.desc); }); @@ -12062,63 +12404,63 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByEthWalletTagBGIntDesc() { + sortByEthWalletTagBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagBGInt', Sort.desc); }); } QueryBuilder - sortByEthWalletTagTextInt() { + sortByEthWalletTagTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagTextInt', Sort.asc); }); } QueryBuilder - sortByEthWalletTagTextIntDesc() { + sortByEthWalletTagTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagTextInt', Sort.desc); }); } QueryBuilder - sortByFavoriteStarActiveInt() { + sortByFavoriteStarActiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarActiveInt', Sort.asc); }); } QueryBuilder - sortByFavoriteStarActiveIntDesc() { + sortByFavoriteStarActiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarActiveInt', Sort.desc); }); } QueryBuilder - sortByFavoriteStarInactiveInt() { + sortByFavoriteStarInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarInactiveInt', Sort.asc); }); } QueryBuilder - sortByFavoriteStarInactiveIntDesc() { + sortByFavoriteStarInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarInactiveInt', Sort.desc); }); } QueryBuilder - sortByGradientBackgroundString() { + sortByGradientBackgroundString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'gradientBackgroundString', Sort.asc); }); } QueryBuilder - sortByGradientBackgroundStringDesc() { + sortByGradientBackgroundStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'gradientBackgroundString', Sort.desc); }); @@ -12137,14 +12479,14 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByHomeViewButtonBarBoxShadowString() { + sortByHomeViewButtonBarBoxShadowString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'homeViewButtonBarBoxShadowString', Sort.asc); }); } QueryBuilder - sortByHomeViewButtonBarBoxShadowStringDesc() { + sortByHomeViewButtonBarBoxShadowStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'homeViewButtonBarBoxShadowString', Sort.desc); }); @@ -12169,7 +12511,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByInfoItemIconsIntDesc() { + sortByInfoItemIconsIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemIconsInt', Sort.desc); }); @@ -12182,7 +12524,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByInfoItemLabelIntDesc() { + sortByInfoItemLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemLabelInt', Sort.desc); }); @@ -12195,35 +12537,35 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByInfoItemTextIntDesc() { + sortByInfoItemTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemTextInt', Sort.desc); }); } QueryBuilder - sortByLoadingOverlayTextColorInt() { + sortByLoadingOverlayTextColorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'loadingOverlayTextColorInt', Sort.asc); }); } QueryBuilder - sortByLoadingOverlayTextColorIntDesc() { + sortByLoadingOverlayTextColorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'loadingOverlayTextColorInt', Sort.desc); }); } QueryBuilder - sortByMyStackContactIconBGInt() { + sortByMyStackContactIconBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myStackContactIconBGInt', Sort.asc); }); } QueryBuilder - sortByMyStackContactIconBGIntDesc() { + sortByMyStackContactIconBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myStackContactIconBGInt', Sort.desc); }); @@ -12242,56 +12584,56 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByNumberBackDefaultInt() { + sortByNumberBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberBackDefaultInt', Sort.asc); }); } QueryBuilder - sortByNumberBackDefaultIntDesc() { + sortByNumberBackDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberBackDefaultInt', Sort.desc); }); } QueryBuilder - sortByNumberTextDefaultInt() { + sortByNumberTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberTextDefaultInt', Sort.asc); }); } QueryBuilder - sortByNumberTextDefaultIntDesc() { + sortByNumberTextDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberTextDefaultInt', Sort.desc); }); } QueryBuilder - sortByNumpadBackDefaultInt() { + sortByNumpadBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadBackDefaultInt', Sort.asc); }); } QueryBuilder - sortByNumpadBackDefaultIntDesc() { + sortByNumpadBackDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadBackDefaultInt', Sort.desc); }); } QueryBuilder - sortByNumpadTextDefaultInt() { + sortByNumpadTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadTextDefaultInt', Sort.asc); }); } QueryBuilder - sortByNumpadTextDefaultIntDesc() { + sortByNumpadTextDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadTextDefaultInt', Sort.desc); }); @@ -12322,294 +12664,294 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByRadioButtonBorderDisabledInt() { + sortByRadioButtonBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderDisabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonBorderDisabledIntDesc() { + sortByRadioButtonBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderDisabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonBorderEnabledInt() { + sortByRadioButtonBorderEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderEnabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonBorderEnabledIntDesc() { + sortByRadioButtonBorderEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderEnabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonIconBorderDisabledInt() { + sortByRadioButtonIconBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderDisabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonIconBorderDisabledIntDesc() { + sortByRadioButtonIconBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderDisabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonIconBorderInt() { + sortByRadioButtonIconBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonIconBorderIntDesc() { + sortByRadioButtonIconBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonIconCircleInt() { + sortByRadioButtonIconCircleInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconCircleInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonIconCircleIntDesc() { + sortByRadioButtonIconCircleIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconCircleInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonIconEnabledInt() { + sortByRadioButtonIconEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconEnabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonIconEnabledIntDesc() { + sortByRadioButtonIconEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconEnabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonLabelDisabledInt() { + sortByRadioButtonLabelDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelDisabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonLabelDisabledIntDesc() { + sortByRadioButtonLabelDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelDisabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonLabelEnabledInt() { + sortByRadioButtonLabelEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelEnabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonLabelEnabledIntDesc() { + sortByRadioButtonLabelEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelEnabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonTextDisabledInt() { + sortByRadioButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextDisabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonTextDisabledIntDesc() { + sortByRadioButtonTextDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextDisabledInt', Sort.desc); }); } QueryBuilder - sortByRadioButtonTextEnabledInt() { + sortByRadioButtonTextEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextEnabledInt', Sort.asc); }); } QueryBuilder - sortByRadioButtonTextEnabledIntDesc() { + sortByRadioButtonTextEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextEnabledInt', Sort.desc); }); } QueryBuilder - sortByRateTypeToggleColorOffInt() { + sortByRateTypeToggleColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOffInt', Sort.asc); }); } QueryBuilder - sortByRateTypeToggleColorOffIntDesc() { + sortByRateTypeToggleColorOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOffInt', Sort.desc); }); } QueryBuilder - sortByRateTypeToggleColorOnInt() { + sortByRateTypeToggleColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOnInt', Sort.asc); }); } QueryBuilder - sortByRateTypeToggleColorOnIntDesc() { + sortByRateTypeToggleColorOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOnInt', Sort.desc); }); } QueryBuilder - sortByRateTypeToggleDesktopColorOffInt() { + sortByRateTypeToggleDesktopColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOffInt', Sort.asc); }); } QueryBuilder - sortByRateTypeToggleDesktopColorOffIntDesc() { + sortByRateTypeToggleDesktopColorOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOffInt', Sort.desc); }); } QueryBuilder - sortByRateTypeToggleDesktopColorOnInt() { + sortByRateTypeToggleDesktopColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOnInt', Sort.asc); }); } QueryBuilder - sortByRateTypeToggleDesktopColorOnIntDesc() { + sortByRateTypeToggleDesktopColorOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOnInt', Sort.desc); }); } QueryBuilder - sortBySettingsIconBack2Int() { + sortBySettingsIconBack2Int() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBack2Int', Sort.asc); }); } QueryBuilder - sortBySettingsIconBack2IntDesc() { + sortBySettingsIconBack2IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBack2Int', Sort.desc); }); } QueryBuilder - sortBySettingsIconBackInt() { + sortBySettingsIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBackInt', Sort.asc); }); } QueryBuilder - sortBySettingsIconBackIntDesc() { + sortBySettingsIconBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBackInt', Sort.desc); }); } QueryBuilder - sortBySettingsIconElementInt() { + sortBySettingsIconElementInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconElementInt', Sort.asc); }); } QueryBuilder - sortBySettingsIconElementIntDesc() { + sortBySettingsIconElementIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconElementInt', Sort.desc); }); } QueryBuilder - sortBySettingsIconIconInt() { + sortBySettingsIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconIconInt', Sort.asc); }); } QueryBuilder - sortBySettingsIconIconIntDesc() { + sortBySettingsIconIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconIconInt', Sort.desc); }); } QueryBuilder - sortBySettingsItem2ActiveBGInt() { + sortBySettingsItem2ActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveBGInt', Sort.asc); }); } QueryBuilder - sortBySettingsItem2ActiveBGIntDesc() { + sortBySettingsItem2ActiveBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveBGInt', Sort.desc); }); } QueryBuilder - sortBySettingsItem2ActiveSubInt() { + sortBySettingsItem2ActiveSubInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveSubInt', Sort.asc); }); } QueryBuilder - sortBySettingsItem2ActiveSubIntDesc() { + sortBySettingsItem2ActiveSubIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveSubInt', Sort.desc); }); } QueryBuilder - sortBySettingsItem2ActiveTextInt() { + sortBySettingsItem2ActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveTextInt', Sort.asc); }); } QueryBuilder - sortBySettingsItem2ActiveTextIntDesc() { + sortBySettingsItem2ActiveTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveTextInt', Sort.desc); }); @@ -12628,84 +12970,84 @@ extension StackThemeQuerySortBy } QueryBuilder - sortBySnackBarBackErrorInt() { + sortBySnackBarBackErrorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackErrorInt', Sort.asc); }); } QueryBuilder - sortBySnackBarBackErrorIntDesc() { + sortBySnackBarBackErrorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackErrorInt', Sort.desc); }); } QueryBuilder - sortBySnackBarBackInfoInt() { + sortBySnackBarBackInfoInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackInfoInt', Sort.asc); }); } QueryBuilder - sortBySnackBarBackInfoIntDesc() { + sortBySnackBarBackInfoIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackInfoInt', Sort.desc); }); } QueryBuilder - sortBySnackBarBackSuccessInt() { + sortBySnackBarBackSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackSuccessInt', Sort.asc); }); } QueryBuilder - sortBySnackBarBackSuccessIntDesc() { + sortBySnackBarBackSuccessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackSuccessInt', Sort.desc); }); } QueryBuilder - sortBySnackBarTextErrorInt() { + sortBySnackBarTextErrorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextErrorInt', Sort.asc); }); } QueryBuilder - sortBySnackBarTextErrorIntDesc() { + sortBySnackBarTextErrorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextErrorInt', Sort.desc); }); } QueryBuilder - sortBySnackBarTextInfoInt() { + sortBySnackBarTextInfoInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextInfoInt', Sort.asc); }); } QueryBuilder - sortBySnackBarTextInfoIntDesc() { + sortBySnackBarTextInfoIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextInfoInt', Sort.desc); }); } QueryBuilder - sortBySnackBarTextSuccessInt() { + sortBySnackBarTextSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextSuccessInt', Sort.asc); }); } QueryBuilder - sortBySnackBarTextSuccessIntDesc() { + sortBySnackBarTextSuccessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextSuccessInt', Sort.desc); }); @@ -12730,21 +13072,21 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByStackWalletBGIntDesc() { + sortByStackWalletBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBGInt', Sort.desc); }); } QueryBuilder - sortByStackWalletBottomInt() { + sortByStackWalletBottomInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBottomInt', Sort.asc); }); } QueryBuilder - sortByStackWalletBottomIntDesc() { + sortByStackWalletBottomIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBottomInt', Sort.desc); }); @@ -12757,147 +13099,147 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByStackWalletMidIntDesc() { + sortByStackWalletMidIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletMidInt', Sort.desc); }); } QueryBuilder - sortByStandardBoxShadowString() { + sortByStandardBoxShadowString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'standardBoxShadowString', Sort.asc); }); } QueryBuilder - sortByStandardBoxShadowStringDesc() { + sortByStandardBoxShadowStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'standardBoxShadowString', Sort.desc); }); } QueryBuilder - sortByStepIndicatorBGCheckInt() { + sortByStepIndicatorBGCheckInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGCheckInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorBGCheckIntDesc() { + sortByStepIndicatorBGCheckIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGCheckInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorBGInactiveInt() { + sortByStepIndicatorBGInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGInactiveInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorBGInactiveIntDesc() { + sortByStepIndicatorBGInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGInactiveInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorBGLinesInactiveInt() { + sortByStepIndicatorBGLinesInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInactiveInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorBGLinesInactiveIntDesc() { + sortByStepIndicatorBGLinesInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInactiveInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorBGLinesInt() { + sortByStepIndicatorBGLinesInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorBGLinesIntDesc() { + sortByStepIndicatorBGLinesIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorBGNumberInt() { + sortByStepIndicatorBGNumberInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGNumberInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorBGNumberIntDesc() { + sortByStepIndicatorBGNumberIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGNumberInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorIconInactiveInt() { + sortByStepIndicatorIconInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconInactiveInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorIconInactiveIntDesc() { + sortByStepIndicatorIconInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconInactiveInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorIconNumberInt() { + sortByStepIndicatorIconNumberInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconNumberInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorIconNumberIntDesc() { + sortByStepIndicatorIconNumberIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconNumberInt', Sort.desc); }); } QueryBuilder - sortByStepIndicatorIconTextInt() { + sortByStepIndicatorIconTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconTextInt', Sort.asc); }); } QueryBuilder - sortByStepIndicatorIconTextIntDesc() { + sortByStepIndicatorIconTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconTextInt', Sort.desc); }); } QueryBuilder - sortBySwitchBGDisabledInt() { + sortBySwitchBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGDisabledInt', Sort.asc); }); } QueryBuilder - sortBySwitchBGDisabledIntDesc() { + sortBySwitchBGDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGDisabledInt', Sort.desc); }); @@ -12910,7 +13252,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortBySwitchBGOffIntDesc() { + sortBySwitchBGOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGOffInt', Sort.desc); }); @@ -12929,28 +13271,28 @@ extension StackThemeQuerySortBy } QueryBuilder - sortBySwitchCircleDisabledInt() { + sortBySwitchCircleDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleDisabledInt', Sort.asc); }); } QueryBuilder - sortBySwitchCircleDisabledIntDesc() { + sortBySwitchCircleDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleDisabledInt', Sort.desc); }); } QueryBuilder - sortBySwitchCircleOffInt() { + sortBySwitchCircleOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOffInt', Sort.asc); }); } QueryBuilder - sortBySwitchCircleOffIntDesc() { + sortBySwitchCircleOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOffInt', Sort.desc); }); @@ -12963,21 +13305,21 @@ extension StackThemeQuerySortBy } QueryBuilder - sortBySwitchCircleOnIntDesc() { + sortBySwitchCircleOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOnInt', Sort.desc); }); } QueryBuilder - sortByTextConfirmTotalAmountInt() { + sortByTextConfirmTotalAmountInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textConfirmTotalAmountInt', Sort.asc); }); } QueryBuilder - sortByTextConfirmTotalAmountIntDesc() { + sortByTextConfirmTotalAmountIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textConfirmTotalAmountInt', Sort.desc); }); @@ -13032,308 +13374,308 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextFavoriteCardInt() { + sortByTextFavoriteCardInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFavoriteCardInt', Sort.asc); }); } QueryBuilder - sortByTextFavoriteCardIntDesc() { + sortByTextFavoriteCardIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFavoriteCardInt', Sort.desc); }); } QueryBuilder - sortByTextFieldActiveBGInt() { + sortByTextFieldActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveBGInt', Sort.asc); }); } QueryBuilder - sortByTextFieldActiveBGIntDesc() { + sortByTextFieldActiveBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveBGInt', Sort.desc); }); } QueryBuilder - sortByTextFieldActiveLabelInt() { + sortByTextFieldActiveLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveLabelInt', Sort.asc); }); } QueryBuilder - sortByTextFieldActiveLabelIntDesc() { + sortByTextFieldActiveLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveLabelInt', Sort.desc); }); } QueryBuilder - sortByTextFieldActiveSearchIconLeftInt() { + sortByTextFieldActiveSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconLeftInt', Sort.asc); }); } QueryBuilder - sortByTextFieldActiveSearchIconLeftIntDesc() { + sortByTextFieldActiveSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconLeftInt', Sort.desc); }); } QueryBuilder - sortByTextFieldActiveSearchIconRightInt() { + sortByTextFieldActiveSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconRightInt', Sort.asc); }); } QueryBuilder - sortByTextFieldActiveSearchIconRightIntDesc() { + sortByTextFieldActiveSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconRightInt', Sort.desc); }); } QueryBuilder - sortByTextFieldActiveTextInt() { + sortByTextFieldActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveTextInt', Sort.asc); }); } QueryBuilder - sortByTextFieldActiveTextIntDesc() { + sortByTextFieldActiveTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveTextInt', Sort.desc); }); } QueryBuilder - sortByTextFieldDefaultBGInt() { + sortByTextFieldDefaultBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultBGInt', Sort.asc); }); } QueryBuilder - sortByTextFieldDefaultBGIntDesc() { + sortByTextFieldDefaultBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultBGInt', Sort.desc); }); } QueryBuilder - sortByTextFieldDefaultSearchIconLeftInt() { + sortByTextFieldDefaultSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconLeftInt', Sort.asc); }); } QueryBuilder - sortByTextFieldDefaultSearchIconLeftIntDesc() { + sortByTextFieldDefaultSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconLeftInt', Sort.desc); }); } QueryBuilder - sortByTextFieldDefaultSearchIconRightInt() { + sortByTextFieldDefaultSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconRightInt', Sort.asc); }); } QueryBuilder - sortByTextFieldDefaultSearchIconRightIntDesc() { + sortByTextFieldDefaultSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconRightInt', Sort.desc); }); } QueryBuilder - sortByTextFieldDefaultTextInt() { + sortByTextFieldDefaultTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultTextInt', Sort.asc); }); } QueryBuilder - sortByTextFieldDefaultTextIntDesc() { + sortByTextFieldDefaultTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultTextInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorBGInt() { + sortByTextFieldErrorBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBGInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorBGIntDesc() { + sortByTextFieldErrorBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBGInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorBorderInt() { + sortByTextFieldErrorBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBorderInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorBorderIntDesc() { + sortByTextFieldErrorBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBorderInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorLabelInt() { + sortByTextFieldErrorLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorLabelInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorLabelIntDesc() { + sortByTextFieldErrorLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorLabelInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorSearchIconLeftInt() { + sortByTextFieldErrorSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconLeftInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorSearchIconLeftIntDesc() { + sortByTextFieldErrorSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconLeftInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorSearchIconRightInt() { + sortByTextFieldErrorSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconRightInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorSearchIconRightIntDesc() { + sortByTextFieldErrorSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconRightInt', Sort.desc); }); } QueryBuilder - sortByTextFieldErrorTextInt() { + sortByTextFieldErrorTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorTextInt', Sort.asc); }); } QueryBuilder - sortByTextFieldErrorTextIntDesc() { + sortByTextFieldErrorTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorTextInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessBGInt() { + sortByTextFieldSuccessBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBGInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessBGIntDesc() { + sortByTextFieldSuccessBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBGInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessBorderInt() { + sortByTextFieldSuccessBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBorderInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessBorderIntDesc() { + sortByTextFieldSuccessBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBorderInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessLabelInt() { + sortByTextFieldSuccessLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessLabelInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessLabelIntDesc() { + sortByTextFieldSuccessLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessLabelInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessSearchIconLeftInt() { + sortByTextFieldSuccessSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconLeftInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessSearchIconLeftIntDesc() { + sortByTextFieldSuccessSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconLeftInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessSearchIconRightInt() { + sortByTextFieldSuccessSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconRightInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessSearchIconRightIntDesc() { + sortByTextFieldSuccessSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconRightInt', Sort.desc); }); } QueryBuilder - sortByTextFieldSuccessTextInt() { + sortByTextFieldSuccessTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessTextInt', Sort.asc); }); } QueryBuilder - sortByTextFieldSuccessTextIntDesc() { + sortByTextFieldSuccessTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessTextInt', Sort.desc); }); @@ -13346,21 +13688,21 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextRestoreIntDesc() { + sortByTextRestoreIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textRestoreInt', Sort.desc); }); } QueryBuilder - sortByTextSelectedWordTableItemInt() { + sortByTextSelectedWordTableItemInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSelectedWordTableItemInt', Sort.asc); }); } QueryBuilder - sortByTextSelectedWordTableItemIntDesc() { + sortByTextSelectedWordTableItemIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSelectedWordTableItemInt', Sort.desc); }); @@ -13373,7 +13715,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle1IntDesc() { + sortByTextSubtitle1IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle1Int', Sort.desc); }); @@ -13386,7 +13728,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle2IntDesc() { + sortByTextSubtitle2IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle2Int', Sort.desc); }); @@ -13399,7 +13741,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle3IntDesc() { + sortByTextSubtitle3IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle3Int', Sort.desc); }); @@ -13412,7 +13754,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle4IntDesc() { + sortByTextSubtitle4IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle4Int', Sort.desc); }); @@ -13425,7 +13767,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle5IntDesc() { + sortByTextSubtitle5IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle5Int', Sort.desc); }); @@ -13438,7 +13780,7 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTextSubtitle6IntDesc() { + sortByTextSubtitle6IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle6Int', Sort.desc); }); @@ -13475,91 +13817,91 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTokenSummaryBGIntDesc() { + sortByTokenSummaryBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryBGInt', Sort.desc); }); } QueryBuilder - sortByTokenSummaryButtonBGInt() { + sortByTokenSummaryButtonBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryButtonBGInt', Sort.asc); }); } QueryBuilder - sortByTokenSummaryButtonBGIntDesc() { + sortByTokenSummaryButtonBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryButtonBGInt', Sort.desc); }); } QueryBuilder - sortByTokenSummaryIconInt() { + sortByTokenSummaryIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryIconInt', Sort.asc); }); } QueryBuilder - sortByTokenSummaryIconIntDesc() { + sortByTokenSummaryIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryIconInt', Sort.desc); }); } QueryBuilder - sortByTokenSummaryTextPrimaryInt() { + sortByTokenSummaryTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextPrimaryInt', Sort.asc); }); } QueryBuilder - sortByTokenSummaryTextPrimaryIntDesc() { + sortByTokenSummaryTextPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextPrimaryInt', Sort.desc); }); } QueryBuilder - sortByTokenSummaryTextSecondaryInt() { + sortByTokenSummaryTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextSecondaryInt', Sort.asc); }); } QueryBuilder - sortByTokenSummaryTextSecondaryIntDesc() { + sortByTokenSummaryTextSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextSecondaryInt', Sort.desc); }); } QueryBuilder - sortByTopNavIconGreenInt() { + sortByTopNavIconGreenInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconGreenInt', Sort.asc); }); } QueryBuilder - sortByTopNavIconGreenIntDesc() { + sortByTopNavIconGreenIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconGreenInt', Sort.desc); }); } QueryBuilder - sortByTopNavIconPrimaryInt() { + sortByTopNavIconPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconPrimaryInt', Sort.asc); }); } QueryBuilder - sortByTopNavIconPrimaryIntDesc() { + sortByTopNavIconPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconPrimaryInt', Sort.desc); }); @@ -13572,21 +13914,21 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByTopNavIconRedIntDesc() { + sortByTopNavIconRedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconRedInt', Sort.desc); }); } QueryBuilder - sortByTopNavIconYellowInt() { + sortByTopNavIconYellowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconYellowInt', Sort.asc); }); } QueryBuilder - sortByTopNavIconYellowIntDesc() { + sortByTopNavIconYellowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconYellowInt', Sort.desc); }); @@ -13605,28 +13947,28 @@ extension StackThemeQuerySortBy } QueryBuilder - sortByWarningBackgroundInt() { + sortByWarningBackgroundInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningBackgroundInt', Sort.asc); }); } QueryBuilder - sortByWarningBackgroundIntDesc() { + sortByWarningBackgroundIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningBackgroundInt', Sort.desc); }); } QueryBuilder - sortByWarningForegroundInt() { + sortByWarningForegroundInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningForegroundInt', Sort.asc); }); } QueryBuilder - sortByWarningForegroundIntDesc() { + sortByWarningForegroundIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningForegroundInt', Sort.desc); }); @@ -13636,56 +13978,56 @@ extension StackThemeQuerySortBy extension StackThemeQuerySortThenBy on QueryBuilder { QueryBuilder - thenByAccentColorBlueInt() { + thenByAccentColorBlueInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorBlueInt', Sort.asc); }); } QueryBuilder - thenByAccentColorBlueIntDesc() { + thenByAccentColorBlueIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorBlueInt', Sort.desc); }); } QueryBuilder - thenByAccentColorDarkInt() { + thenByAccentColorDarkInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorDarkInt', Sort.asc); }); } QueryBuilder - thenByAccentColorDarkIntDesc() { + thenByAccentColorDarkIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorDarkInt', Sort.desc); }); } QueryBuilder - thenByAccentColorGreenInt() { + thenByAccentColorGreenInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorGreenInt', Sort.asc); }); } QueryBuilder - thenByAccentColorGreenIntDesc() { + thenByAccentColorGreenIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorGreenInt', Sort.desc); }); } QueryBuilder - thenByAccentColorOrangeInt() { + thenByAccentColorOrangeInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorOrangeInt', Sort.asc); }); } QueryBuilder - thenByAccentColorOrangeIntDesc() { + thenByAccentColorOrangeIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorOrangeInt', Sort.desc); }); @@ -13698,35 +14040,35 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByAccentColorRedIntDesc() { + thenByAccentColorRedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorRedInt', Sort.desc); }); } QueryBuilder - thenByAccentColorYellowInt() { + thenByAccentColorYellowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorYellowInt', Sort.asc); }); } QueryBuilder - thenByAccentColorYellowIntDesc() { + thenByAccentColorYellowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'accentColorYellowInt', Sort.desc); }); } QueryBuilder - thenByBackgroundAppBarInt() { + thenByBackgroundAppBarInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'backgroundAppBarInt', Sort.asc); }); } QueryBuilder - thenByBackgroundAppBarIntDesc() { + thenByBackgroundAppBarIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'backgroundAppBarInt', Sort.desc); }); @@ -13751,63 +14093,63 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByBottomNavBackIntDesc() { + thenByBottomNavBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavBackInt', Sort.desc); }); } QueryBuilder - thenByBottomNavIconBackInt() { + thenByBottomNavIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconBackInt', Sort.asc); }); } QueryBuilder - thenByBottomNavIconBackIntDesc() { + thenByBottomNavIconBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconBackInt', Sort.desc); }); } QueryBuilder - thenByBottomNavIconIconHighlightedInt() { + thenByBottomNavIconIconHighlightedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.asc); }); } QueryBuilder - thenByBottomNavIconIconHighlightedIntDesc() { + thenByBottomNavIconIconHighlightedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.desc); }); } QueryBuilder - thenByBottomNavIconIconInt() { + thenByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconInt', Sort.asc); }); } QueryBuilder - thenByBottomNavIconIconIntDesc() { + thenByBottomNavIconIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavIconIconInt', Sort.desc); }); } QueryBuilder - thenByBottomNavShadowInt() { + thenByBottomNavShadowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavShadowInt', Sort.asc); }); } QueryBuilder - thenByBottomNavShadowIntDesc() { + thenByBottomNavShadowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavShadowInt', Sort.desc); }); @@ -13820,7 +14162,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByBottomNavTextIntDesc() { + thenByBottomNavTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'bottomNavTextInt', Sort.desc); }); @@ -13833,372 +14175,374 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByBrightnessStringDesc() { + thenByBrightnessStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'brightnessString', Sort.desc); }); } QueryBuilder - thenByButtonBackBorderDisabledInt() { + thenByButtonBackBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonBackBorderDisabledIntDesc() { + thenByButtonBackBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonBackBorderInt() { + thenByButtonBackBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderInt', Sort.asc); }); } QueryBuilder - thenByButtonBackBorderIntDesc() { + thenByButtonBackBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderInt', Sort.desc); }); } QueryBuilder - thenByButtonBackBorderSecondaryDisabledInt() { + thenByButtonBackBorderSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonBackBorderSecondaryDisabledIntDesc() { + thenByButtonBackBorderSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy( - r'buttonBackBorderSecondaryDisabledInt', Sort.desc); + r'buttonBackBorderSecondaryDisabledInt', + Sort.desc, + ); }); } QueryBuilder - thenByButtonBackBorderSecondaryInt() { + thenByButtonBackBorderSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryInt', Sort.asc); }); } QueryBuilder - thenByButtonBackBorderSecondaryIntDesc() { + thenByButtonBackBorderSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackBorderSecondaryInt', Sort.desc); }); } QueryBuilder - thenByButtonBackPrimaryDisabledInt() { + thenByButtonBackPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonBackPrimaryDisabledIntDesc() { + thenByButtonBackPrimaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonBackPrimaryInt() { + thenByButtonBackPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryInt', Sort.asc); }); } QueryBuilder - thenByButtonBackPrimaryIntDesc() { + thenByButtonBackPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackPrimaryInt', Sort.desc); }); } QueryBuilder - thenByButtonBackSecondaryDisabledInt() { + thenByButtonBackSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonBackSecondaryDisabledIntDesc() { + thenByButtonBackSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonBackSecondaryInt() { + thenByButtonBackSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryInt', Sort.asc); }); } QueryBuilder - thenByButtonBackSecondaryIntDesc() { + thenByButtonBackSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonBackSecondaryInt', Sort.desc); }); } QueryBuilder - thenByButtonTextBorderInt() { + thenByButtonTextBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderInt', Sort.asc); }); } QueryBuilder - thenByButtonTextBorderIntDesc() { + thenByButtonTextBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderInt', Sort.desc); }); } QueryBuilder - thenByButtonTextBorderlessDisabledInt() { + thenByButtonTextBorderlessDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonTextBorderlessDisabledIntDesc() { + thenByButtonTextBorderlessDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonTextBorderlessInt() { + thenByButtonTextBorderlessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessInt', Sort.asc); }); } QueryBuilder - thenByButtonTextBorderlessIntDesc() { + thenByButtonTextBorderlessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextBorderlessInt', Sort.desc); }); } QueryBuilder - thenByButtonTextDisabledInt() { + thenByButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonTextDisabledIntDesc() { + thenByButtonTextDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonTextPrimaryDisabledInt() { + thenByButtonTextPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonTextPrimaryDisabledIntDesc() { + thenByButtonTextPrimaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonTextPrimaryInt() { + thenByButtonTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryInt', Sort.asc); }); } QueryBuilder - thenByButtonTextPrimaryIntDesc() { + thenByButtonTextPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextPrimaryInt', Sort.desc); }); } QueryBuilder - thenByButtonTextSecondaryDisabledInt() { + thenByButtonTextSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryDisabledInt', Sort.asc); }); } QueryBuilder - thenByButtonTextSecondaryDisabledIntDesc() { + thenByButtonTextSecondaryDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryDisabledInt', Sort.desc); }); } QueryBuilder - thenByButtonTextSecondaryInt() { + thenByButtonTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryInt', Sort.asc); }); } QueryBuilder - thenByButtonTextSecondaryIntDesc() { + thenByButtonTextSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'buttonTextSecondaryInt', Sort.desc); }); } QueryBuilder - thenByCheckboxBGCheckedInt() { + thenByCheckboxBGCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGCheckedInt', Sort.asc); }); } QueryBuilder - thenByCheckboxBGCheckedIntDesc() { + thenByCheckboxBGCheckedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGCheckedInt', Sort.desc); }); } QueryBuilder - thenByCheckboxBGDisabledInt() { + thenByCheckboxBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGDisabledInt', Sort.asc); }); } QueryBuilder - thenByCheckboxBGDisabledIntDesc() { + thenByCheckboxBGDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBGDisabledInt', Sort.desc); }); } QueryBuilder - thenByCheckboxBorderEmptyInt() { + thenByCheckboxBorderEmptyInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBorderEmptyInt', Sort.asc); }); } QueryBuilder - thenByCheckboxBorderEmptyIntDesc() { + thenByCheckboxBorderEmptyIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxBorderEmptyInt', Sort.desc); }); } QueryBuilder - thenByCheckboxIconCheckedInt() { + thenByCheckboxIconCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconCheckedInt', Sort.asc); }); } QueryBuilder - thenByCheckboxIconCheckedIntDesc() { + thenByCheckboxIconCheckedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconCheckedInt', Sort.desc); }); } QueryBuilder - thenByCheckboxIconDisabledInt() { + thenByCheckboxIconDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconDisabledInt', Sort.asc); }); } QueryBuilder - thenByCheckboxIconDisabledIntDesc() { + thenByCheckboxIconDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxIconDisabledInt', Sort.desc); }); } QueryBuilder - thenByCheckboxTextLabelInt() { + thenByCheckboxTextLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxTextLabelInt', Sort.asc); }); } QueryBuilder - thenByCheckboxTextLabelIntDesc() { + thenByCheckboxTextLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'checkboxTextLabelInt', Sort.desc); }); } QueryBuilder - thenByCoinColorsJsonString() { + thenByCoinColorsJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'coinColorsJsonString', Sort.asc); }); } QueryBuilder - thenByCoinColorsJsonStringDesc() { + thenByCoinColorsJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'coinColorsJsonString', Sort.desc); }); } QueryBuilder - thenByCurrencyListItemBGInt() { + thenByCurrencyListItemBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'currencyListItemBGInt', Sort.asc); }); } QueryBuilder - thenByCurrencyListItemBGIntDesc() { + thenByCurrencyListItemBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'currencyListItemBGInt', Sort.desc); }); } QueryBuilder - thenByCustomTextButtonDisabledTextInt() { + thenByCustomTextButtonDisabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonDisabledTextInt', Sort.asc); }); } QueryBuilder - thenByCustomTextButtonDisabledTextIntDesc() { + thenByCustomTextButtonDisabledTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonDisabledTextInt', Sort.desc); }); } QueryBuilder - thenByCustomTextButtonEnabledTextInt() { + thenByCustomTextButtonEnabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonEnabledTextInt', Sort.asc); }); } QueryBuilder - thenByCustomTextButtonEnabledTextIntDesc() { + thenByCustomTextButtonEnabledTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'customTextButtonEnabledTextInt', Sort.desc); }); @@ -14235,63 +14579,63 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByEthWalletTagBGIntDesc() { + thenByEthWalletTagBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagBGInt', Sort.desc); }); } QueryBuilder - thenByEthWalletTagTextInt() { + thenByEthWalletTagTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagTextInt', Sort.asc); }); } QueryBuilder - thenByEthWalletTagTextIntDesc() { + thenByEthWalletTagTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'ethWalletTagTextInt', Sort.desc); }); } QueryBuilder - thenByFavoriteStarActiveInt() { + thenByFavoriteStarActiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarActiveInt', Sort.asc); }); } QueryBuilder - thenByFavoriteStarActiveIntDesc() { + thenByFavoriteStarActiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarActiveInt', Sort.desc); }); } QueryBuilder - thenByFavoriteStarInactiveInt() { + thenByFavoriteStarInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarInactiveInt', Sort.asc); }); } QueryBuilder - thenByFavoriteStarInactiveIntDesc() { + thenByFavoriteStarInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favoriteStarInactiveInt', Sort.desc); }); } QueryBuilder - thenByGradientBackgroundString() { + thenByGradientBackgroundString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'gradientBackgroundString', Sort.asc); }); } QueryBuilder - thenByGradientBackgroundStringDesc() { + thenByGradientBackgroundStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'gradientBackgroundString', Sort.desc); }); @@ -14310,14 +14654,14 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByHomeViewButtonBarBoxShadowString() { + thenByHomeViewButtonBarBoxShadowString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'homeViewButtonBarBoxShadowString', Sort.asc); }); } QueryBuilder - thenByHomeViewButtonBarBoxShadowStringDesc() { + thenByHomeViewButtonBarBoxShadowStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'homeViewButtonBarBoxShadowString', Sort.desc); }); @@ -14354,7 +14698,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByInfoItemIconsIntDesc() { + thenByInfoItemIconsIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemIconsInt', Sort.desc); }); @@ -14367,7 +14711,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByInfoItemLabelIntDesc() { + thenByInfoItemLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemLabelInt', Sort.desc); }); @@ -14380,35 +14724,35 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByInfoItemTextIntDesc() { + thenByInfoItemTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'infoItemTextInt', Sort.desc); }); } QueryBuilder - thenByLoadingOverlayTextColorInt() { + thenByLoadingOverlayTextColorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'loadingOverlayTextColorInt', Sort.asc); }); } QueryBuilder - thenByLoadingOverlayTextColorIntDesc() { + thenByLoadingOverlayTextColorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'loadingOverlayTextColorInt', Sort.desc); }); } QueryBuilder - thenByMyStackContactIconBGInt() { + thenByMyStackContactIconBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myStackContactIconBGInt', Sort.asc); }); } QueryBuilder - thenByMyStackContactIconBGIntDesc() { + thenByMyStackContactIconBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myStackContactIconBGInt', Sort.desc); }); @@ -14427,56 +14771,56 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByNumberBackDefaultInt() { + thenByNumberBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberBackDefaultInt', Sort.asc); }); } QueryBuilder - thenByNumberBackDefaultIntDesc() { + thenByNumberBackDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberBackDefaultInt', Sort.desc); }); } QueryBuilder - thenByNumberTextDefaultInt() { + thenByNumberTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberTextDefaultInt', Sort.asc); }); } QueryBuilder - thenByNumberTextDefaultIntDesc() { + thenByNumberTextDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numberTextDefaultInt', Sort.desc); }); } QueryBuilder - thenByNumpadBackDefaultInt() { + thenByNumpadBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadBackDefaultInt', Sort.asc); }); } QueryBuilder - thenByNumpadBackDefaultIntDesc() { + thenByNumpadBackDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadBackDefaultInt', Sort.desc); }); } QueryBuilder - thenByNumpadTextDefaultInt() { + thenByNumpadTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadTextDefaultInt', Sort.asc); }); } QueryBuilder - thenByNumpadTextDefaultIntDesc() { + thenByNumpadTextDefaultIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'numpadTextDefaultInt', Sort.desc); }); @@ -14507,294 +14851,294 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByRadioButtonBorderDisabledInt() { + thenByRadioButtonBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderDisabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonBorderDisabledIntDesc() { + thenByRadioButtonBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderDisabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonBorderEnabledInt() { + thenByRadioButtonBorderEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderEnabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonBorderEnabledIntDesc() { + thenByRadioButtonBorderEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonBorderEnabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonIconBorderDisabledInt() { + thenByRadioButtonIconBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderDisabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonIconBorderDisabledIntDesc() { + thenByRadioButtonIconBorderDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderDisabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonIconBorderInt() { + thenByRadioButtonIconBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonIconBorderIntDesc() { + thenByRadioButtonIconBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconBorderInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonIconCircleInt() { + thenByRadioButtonIconCircleInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconCircleInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonIconCircleIntDesc() { + thenByRadioButtonIconCircleIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconCircleInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonIconEnabledInt() { + thenByRadioButtonIconEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconEnabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonIconEnabledIntDesc() { + thenByRadioButtonIconEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonIconEnabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonLabelDisabledInt() { + thenByRadioButtonLabelDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelDisabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonLabelDisabledIntDesc() { + thenByRadioButtonLabelDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelDisabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonLabelEnabledInt() { + thenByRadioButtonLabelEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelEnabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonLabelEnabledIntDesc() { + thenByRadioButtonLabelEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonLabelEnabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonTextDisabledInt() { + thenByRadioButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextDisabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonTextDisabledIntDesc() { + thenByRadioButtonTextDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextDisabledInt', Sort.desc); }); } QueryBuilder - thenByRadioButtonTextEnabledInt() { + thenByRadioButtonTextEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextEnabledInt', Sort.asc); }); } QueryBuilder - thenByRadioButtonTextEnabledIntDesc() { + thenByRadioButtonTextEnabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'radioButtonTextEnabledInt', Sort.desc); }); } QueryBuilder - thenByRateTypeToggleColorOffInt() { + thenByRateTypeToggleColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOffInt', Sort.asc); }); } QueryBuilder - thenByRateTypeToggleColorOffIntDesc() { + thenByRateTypeToggleColorOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOffInt', Sort.desc); }); } QueryBuilder - thenByRateTypeToggleColorOnInt() { + thenByRateTypeToggleColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOnInt', Sort.asc); }); } QueryBuilder - thenByRateTypeToggleColorOnIntDesc() { + thenByRateTypeToggleColorOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleColorOnInt', Sort.desc); }); } QueryBuilder - thenByRateTypeToggleDesktopColorOffInt() { + thenByRateTypeToggleDesktopColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOffInt', Sort.asc); }); } QueryBuilder - thenByRateTypeToggleDesktopColorOffIntDesc() { + thenByRateTypeToggleDesktopColorOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOffInt', Sort.desc); }); } QueryBuilder - thenByRateTypeToggleDesktopColorOnInt() { + thenByRateTypeToggleDesktopColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOnInt', Sort.asc); }); } QueryBuilder - thenByRateTypeToggleDesktopColorOnIntDesc() { + thenByRateTypeToggleDesktopColorOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'rateTypeToggleDesktopColorOnInt', Sort.desc); }); } QueryBuilder - thenBySettingsIconBack2Int() { + thenBySettingsIconBack2Int() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBack2Int', Sort.asc); }); } QueryBuilder - thenBySettingsIconBack2IntDesc() { + thenBySettingsIconBack2IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBack2Int', Sort.desc); }); } QueryBuilder - thenBySettingsIconBackInt() { + thenBySettingsIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBackInt', Sort.asc); }); } QueryBuilder - thenBySettingsIconBackIntDesc() { + thenBySettingsIconBackIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconBackInt', Sort.desc); }); } QueryBuilder - thenBySettingsIconElementInt() { + thenBySettingsIconElementInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconElementInt', Sort.asc); }); } QueryBuilder - thenBySettingsIconElementIntDesc() { + thenBySettingsIconElementIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconElementInt', Sort.desc); }); } QueryBuilder - thenBySettingsIconIconInt() { + thenBySettingsIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconIconInt', Sort.asc); }); } QueryBuilder - thenBySettingsIconIconIntDesc() { + thenBySettingsIconIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsIconIconInt', Sort.desc); }); } QueryBuilder - thenBySettingsItem2ActiveBGInt() { + thenBySettingsItem2ActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveBGInt', Sort.asc); }); } QueryBuilder - thenBySettingsItem2ActiveBGIntDesc() { + thenBySettingsItem2ActiveBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveBGInt', Sort.desc); }); } QueryBuilder - thenBySettingsItem2ActiveSubInt() { + thenBySettingsItem2ActiveSubInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveSubInt', Sort.asc); }); } QueryBuilder - thenBySettingsItem2ActiveSubIntDesc() { + thenBySettingsItem2ActiveSubIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveSubInt', Sort.desc); }); } QueryBuilder - thenBySettingsItem2ActiveTextInt() { + thenBySettingsItem2ActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveTextInt', Sort.asc); }); } QueryBuilder - thenBySettingsItem2ActiveTextIntDesc() { + thenBySettingsItem2ActiveTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'settingsItem2ActiveTextInt', Sort.desc); }); @@ -14813,84 +15157,84 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenBySnackBarBackErrorInt() { + thenBySnackBarBackErrorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackErrorInt', Sort.asc); }); } QueryBuilder - thenBySnackBarBackErrorIntDesc() { + thenBySnackBarBackErrorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackErrorInt', Sort.desc); }); } QueryBuilder - thenBySnackBarBackInfoInt() { + thenBySnackBarBackInfoInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackInfoInt', Sort.asc); }); } QueryBuilder - thenBySnackBarBackInfoIntDesc() { + thenBySnackBarBackInfoIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackInfoInt', Sort.desc); }); } QueryBuilder - thenBySnackBarBackSuccessInt() { + thenBySnackBarBackSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackSuccessInt', Sort.asc); }); } QueryBuilder - thenBySnackBarBackSuccessIntDesc() { + thenBySnackBarBackSuccessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarBackSuccessInt', Sort.desc); }); } QueryBuilder - thenBySnackBarTextErrorInt() { + thenBySnackBarTextErrorInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextErrorInt', Sort.asc); }); } QueryBuilder - thenBySnackBarTextErrorIntDesc() { + thenBySnackBarTextErrorIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextErrorInt', Sort.desc); }); } QueryBuilder - thenBySnackBarTextInfoInt() { + thenBySnackBarTextInfoInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextInfoInt', Sort.asc); }); } QueryBuilder - thenBySnackBarTextInfoIntDesc() { + thenBySnackBarTextInfoIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextInfoInt', Sort.desc); }); } QueryBuilder - thenBySnackBarTextSuccessInt() { + thenBySnackBarTextSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextSuccessInt', Sort.asc); }); } QueryBuilder - thenBySnackBarTextSuccessIntDesc() { + thenBySnackBarTextSuccessIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'snackBarTextSuccessInt', Sort.desc); }); @@ -14915,21 +15259,21 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByStackWalletBGIntDesc() { + thenByStackWalletBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBGInt', Sort.desc); }); } QueryBuilder - thenByStackWalletBottomInt() { + thenByStackWalletBottomInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBottomInt', Sort.asc); }); } QueryBuilder - thenByStackWalletBottomIntDesc() { + thenByStackWalletBottomIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletBottomInt', Sort.desc); }); @@ -14942,147 +15286,147 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByStackWalletMidIntDesc() { + thenByStackWalletMidIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stackWalletMidInt', Sort.desc); }); } QueryBuilder - thenByStandardBoxShadowString() { + thenByStandardBoxShadowString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'standardBoxShadowString', Sort.asc); }); } QueryBuilder - thenByStandardBoxShadowStringDesc() { + thenByStandardBoxShadowStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'standardBoxShadowString', Sort.desc); }); } QueryBuilder - thenByStepIndicatorBGCheckInt() { + thenByStepIndicatorBGCheckInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGCheckInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorBGCheckIntDesc() { + thenByStepIndicatorBGCheckIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGCheckInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorBGInactiveInt() { + thenByStepIndicatorBGInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGInactiveInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorBGInactiveIntDesc() { + thenByStepIndicatorBGInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGInactiveInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorBGLinesInactiveInt() { + thenByStepIndicatorBGLinesInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInactiveInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorBGLinesInactiveIntDesc() { + thenByStepIndicatorBGLinesInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInactiveInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorBGLinesInt() { + thenByStepIndicatorBGLinesInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorBGLinesIntDesc() { + thenByStepIndicatorBGLinesIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGLinesInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorBGNumberInt() { + thenByStepIndicatorBGNumberInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGNumberInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorBGNumberIntDesc() { + thenByStepIndicatorBGNumberIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorBGNumberInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorIconInactiveInt() { + thenByStepIndicatorIconInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconInactiveInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorIconInactiveIntDesc() { + thenByStepIndicatorIconInactiveIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconInactiveInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorIconNumberInt() { + thenByStepIndicatorIconNumberInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconNumberInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorIconNumberIntDesc() { + thenByStepIndicatorIconNumberIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconNumberInt', Sort.desc); }); } QueryBuilder - thenByStepIndicatorIconTextInt() { + thenByStepIndicatorIconTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconTextInt', Sort.asc); }); } QueryBuilder - thenByStepIndicatorIconTextIntDesc() { + thenByStepIndicatorIconTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'stepIndicatorIconTextInt', Sort.desc); }); } QueryBuilder - thenBySwitchBGDisabledInt() { + thenBySwitchBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGDisabledInt', Sort.asc); }); } QueryBuilder - thenBySwitchBGDisabledIntDesc() { + thenBySwitchBGDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGDisabledInt', Sort.desc); }); @@ -15095,7 +15439,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenBySwitchBGOffIntDesc() { + thenBySwitchBGOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchBGOffInt', Sort.desc); }); @@ -15114,28 +15458,28 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenBySwitchCircleDisabledInt() { + thenBySwitchCircleDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleDisabledInt', Sort.asc); }); } QueryBuilder - thenBySwitchCircleDisabledIntDesc() { + thenBySwitchCircleDisabledIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleDisabledInt', Sort.desc); }); } QueryBuilder - thenBySwitchCircleOffInt() { + thenBySwitchCircleOffInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOffInt', Sort.asc); }); } QueryBuilder - thenBySwitchCircleOffIntDesc() { + thenBySwitchCircleOffIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOffInt', Sort.desc); }); @@ -15148,21 +15492,21 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenBySwitchCircleOnIntDesc() { + thenBySwitchCircleOnIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'switchCircleOnInt', Sort.desc); }); } QueryBuilder - thenByTextConfirmTotalAmountInt() { + thenByTextConfirmTotalAmountInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textConfirmTotalAmountInt', Sort.asc); }); } QueryBuilder - thenByTextConfirmTotalAmountIntDesc() { + thenByTextConfirmTotalAmountIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textConfirmTotalAmountInt', Sort.desc); }); @@ -15217,308 +15561,308 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextFavoriteCardInt() { + thenByTextFavoriteCardInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFavoriteCardInt', Sort.asc); }); } QueryBuilder - thenByTextFavoriteCardIntDesc() { + thenByTextFavoriteCardIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFavoriteCardInt', Sort.desc); }); } QueryBuilder - thenByTextFieldActiveBGInt() { + thenByTextFieldActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveBGInt', Sort.asc); }); } QueryBuilder - thenByTextFieldActiveBGIntDesc() { + thenByTextFieldActiveBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveBGInt', Sort.desc); }); } QueryBuilder - thenByTextFieldActiveLabelInt() { + thenByTextFieldActiveLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveLabelInt', Sort.asc); }); } QueryBuilder - thenByTextFieldActiveLabelIntDesc() { + thenByTextFieldActiveLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveLabelInt', Sort.desc); }); } QueryBuilder - thenByTextFieldActiveSearchIconLeftInt() { + thenByTextFieldActiveSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconLeftInt', Sort.asc); }); } QueryBuilder - thenByTextFieldActiveSearchIconLeftIntDesc() { + thenByTextFieldActiveSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconLeftInt', Sort.desc); }); } QueryBuilder - thenByTextFieldActiveSearchIconRightInt() { + thenByTextFieldActiveSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconRightInt', Sort.asc); }); } QueryBuilder - thenByTextFieldActiveSearchIconRightIntDesc() { + thenByTextFieldActiveSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveSearchIconRightInt', Sort.desc); }); } QueryBuilder - thenByTextFieldActiveTextInt() { + thenByTextFieldActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveTextInt', Sort.asc); }); } QueryBuilder - thenByTextFieldActiveTextIntDesc() { + thenByTextFieldActiveTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldActiveTextInt', Sort.desc); }); } QueryBuilder - thenByTextFieldDefaultBGInt() { + thenByTextFieldDefaultBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultBGInt', Sort.asc); }); } QueryBuilder - thenByTextFieldDefaultBGIntDesc() { + thenByTextFieldDefaultBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultBGInt', Sort.desc); }); } QueryBuilder - thenByTextFieldDefaultSearchIconLeftInt() { + thenByTextFieldDefaultSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconLeftInt', Sort.asc); }); } QueryBuilder - thenByTextFieldDefaultSearchIconLeftIntDesc() { + thenByTextFieldDefaultSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconLeftInt', Sort.desc); }); } QueryBuilder - thenByTextFieldDefaultSearchIconRightInt() { + thenByTextFieldDefaultSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconRightInt', Sort.asc); }); } QueryBuilder - thenByTextFieldDefaultSearchIconRightIntDesc() { + thenByTextFieldDefaultSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultSearchIconRightInt', Sort.desc); }); } QueryBuilder - thenByTextFieldDefaultTextInt() { + thenByTextFieldDefaultTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultTextInt', Sort.asc); }); } QueryBuilder - thenByTextFieldDefaultTextIntDesc() { + thenByTextFieldDefaultTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldDefaultTextInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorBGInt() { + thenByTextFieldErrorBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBGInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorBGIntDesc() { + thenByTextFieldErrorBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBGInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorBorderInt() { + thenByTextFieldErrorBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBorderInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorBorderIntDesc() { + thenByTextFieldErrorBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorBorderInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorLabelInt() { + thenByTextFieldErrorLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorLabelInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorLabelIntDesc() { + thenByTextFieldErrorLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorLabelInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorSearchIconLeftInt() { + thenByTextFieldErrorSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconLeftInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorSearchIconLeftIntDesc() { + thenByTextFieldErrorSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconLeftInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorSearchIconRightInt() { + thenByTextFieldErrorSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconRightInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorSearchIconRightIntDesc() { + thenByTextFieldErrorSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorSearchIconRightInt', Sort.desc); }); } QueryBuilder - thenByTextFieldErrorTextInt() { + thenByTextFieldErrorTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorTextInt', Sort.asc); }); } QueryBuilder - thenByTextFieldErrorTextIntDesc() { + thenByTextFieldErrorTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldErrorTextInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessBGInt() { + thenByTextFieldSuccessBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBGInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessBGIntDesc() { + thenByTextFieldSuccessBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBGInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessBorderInt() { + thenByTextFieldSuccessBorderInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBorderInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessBorderIntDesc() { + thenByTextFieldSuccessBorderIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessBorderInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessLabelInt() { + thenByTextFieldSuccessLabelInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessLabelInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessLabelIntDesc() { + thenByTextFieldSuccessLabelIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessLabelInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessSearchIconLeftInt() { + thenByTextFieldSuccessSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconLeftInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessSearchIconLeftIntDesc() { + thenByTextFieldSuccessSearchIconLeftIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconLeftInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessSearchIconRightInt() { + thenByTextFieldSuccessSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconRightInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessSearchIconRightIntDesc() { + thenByTextFieldSuccessSearchIconRightIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessSearchIconRightInt', Sort.desc); }); } QueryBuilder - thenByTextFieldSuccessTextInt() { + thenByTextFieldSuccessTextInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessTextInt', Sort.asc); }); } QueryBuilder - thenByTextFieldSuccessTextIntDesc() { + thenByTextFieldSuccessTextIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textFieldSuccessTextInt', Sort.desc); }); @@ -15531,21 +15875,21 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextRestoreIntDesc() { + thenByTextRestoreIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textRestoreInt', Sort.desc); }); } QueryBuilder - thenByTextSelectedWordTableItemInt() { + thenByTextSelectedWordTableItemInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSelectedWordTableItemInt', Sort.asc); }); } QueryBuilder - thenByTextSelectedWordTableItemIntDesc() { + thenByTextSelectedWordTableItemIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSelectedWordTableItemInt', Sort.desc); }); @@ -15558,7 +15902,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle1IntDesc() { + thenByTextSubtitle1IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle1Int', Sort.desc); }); @@ -15571,7 +15915,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle2IntDesc() { + thenByTextSubtitle2IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle2Int', Sort.desc); }); @@ -15584,7 +15928,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle3IntDesc() { + thenByTextSubtitle3IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle3Int', Sort.desc); }); @@ -15597,7 +15941,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle4IntDesc() { + thenByTextSubtitle4IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle4Int', Sort.desc); }); @@ -15610,7 +15954,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle5IntDesc() { + thenByTextSubtitle5IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle5Int', Sort.desc); }); @@ -15623,7 +15967,7 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTextSubtitle6IntDesc() { + thenByTextSubtitle6IntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'textSubtitle6Int', Sort.desc); }); @@ -15660,91 +16004,91 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTokenSummaryBGIntDesc() { + thenByTokenSummaryBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryBGInt', Sort.desc); }); } QueryBuilder - thenByTokenSummaryButtonBGInt() { + thenByTokenSummaryButtonBGInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryButtonBGInt', Sort.asc); }); } QueryBuilder - thenByTokenSummaryButtonBGIntDesc() { + thenByTokenSummaryButtonBGIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryButtonBGInt', Sort.desc); }); } QueryBuilder - thenByTokenSummaryIconInt() { + thenByTokenSummaryIconInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryIconInt', Sort.asc); }); } QueryBuilder - thenByTokenSummaryIconIntDesc() { + thenByTokenSummaryIconIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryIconInt', Sort.desc); }); } QueryBuilder - thenByTokenSummaryTextPrimaryInt() { + thenByTokenSummaryTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextPrimaryInt', Sort.asc); }); } QueryBuilder - thenByTokenSummaryTextPrimaryIntDesc() { + thenByTokenSummaryTextPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextPrimaryInt', Sort.desc); }); } QueryBuilder - thenByTokenSummaryTextSecondaryInt() { + thenByTokenSummaryTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextSecondaryInt', Sort.asc); }); } QueryBuilder - thenByTokenSummaryTextSecondaryIntDesc() { + thenByTokenSummaryTextSecondaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenSummaryTextSecondaryInt', Sort.desc); }); } QueryBuilder - thenByTopNavIconGreenInt() { + thenByTopNavIconGreenInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconGreenInt', Sort.asc); }); } QueryBuilder - thenByTopNavIconGreenIntDesc() { + thenByTopNavIconGreenIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconGreenInt', Sort.desc); }); } QueryBuilder - thenByTopNavIconPrimaryInt() { + thenByTopNavIconPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconPrimaryInt', Sort.asc); }); } QueryBuilder - thenByTopNavIconPrimaryIntDesc() { + thenByTopNavIconPrimaryIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconPrimaryInt', Sort.desc); }); @@ -15757,21 +16101,21 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByTopNavIconRedIntDesc() { + thenByTopNavIconRedIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconRedInt', Sort.desc); }); } QueryBuilder - thenByTopNavIconYellowInt() { + thenByTopNavIconYellowInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconYellowInt', Sort.asc); }); } QueryBuilder - thenByTopNavIconYellowIntDesc() { + thenByTopNavIconYellowIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'topNavIconYellowInt', Sort.desc); }); @@ -15790,28 +16134,28 @@ extension StackThemeQuerySortThenBy } QueryBuilder - thenByWarningBackgroundInt() { + thenByWarningBackgroundInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningBackgroundInt', Sort.asc); }); } QueryBuilder - thenByWarningBackgroundIntDesc() { + thenByWarningBackgroundIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningBackgroundInt', Sort.desc); }); } QueryBuilder - thenByWarningForegroundInt() { + thenByWarningForegroundInt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningForegroundInt', Sort.asc); }); } QueryBuilder - thenByWarningForegroundIntDesc() { + thenByWarningForegroundIntDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'warningForegroundInt', Sort.desc); }); @@ -15821,49 +16165,49 @@ extension StackThemeQuerySortThenBy extension StackThemeQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByAccentColorBlueInt() { + distinctByAccentColorBlueInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorBlueInt'); }); } QueryBuilder - distinctByAccentColorDarkInt() { + distinctByAccentColorDarkInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorDarkInt'); }); } QueryBuilder - distinctByAccentColorGreenInt() { + distinctByAccentColorGreenInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorGreenInt'); }); } QueryBuilder - distinctByAccentColorOrangeInt() { + distinctByAccentColorOrangeInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorOrangeInt'); }); } QueryBuilder - distinctByAccentColorRedInt() { + distinctByAccentColorRedInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorRedInt'); }); } QueryBuilder - distinctByAccentColorYellowInt() { + distinctByAccentColorYellowInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'accentColorYellowInt'); }); } QueryBuilder - distinctByBackgroundAppBarInt() { + distinctByBackgroundAppBarInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'backgroundAppBarInt'); }); @@ -15882,28 +16226,28 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByBottomNavIconBackInt() { + distinctByBottomNavIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'bottomNavIconBackInt'); }); } QueryBuilder - distinctByBottomNavIconIconHighlightedInt() { + distinctByBottomNavIconIconHighlightedInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'bottomNavIconIconHighlightedInt'); }); } QueryBuilder - distinctByBottomNavIconIconInt() { + distinctByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'bottomNavIconIconInt'); }); } QueryBuilder - distinctByBottomNavShadowInt() { + distinctByBottomNavShadowInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'bottomNavShadowInt'); }); @@ -15915,192 +16259,197 @@ extension StackThemeQueryWhereDistinct }); } - QueryBuilder distinctByBrightnessString( - {bool caseSensitive = true}) { + QueryBuilder distinctByBrightnessString({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'brightnessString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'brightnessString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByButtonBackBorderDisabledInt() { + distinctByButtonBackBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackBorderDisabledInt'); }); } QueryBuilder - distinctByButtonBackBorderInt() { + distinctByButtonBackBorderInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackBorderInt'); }); } QueryBuilder - distinctByButtonBackBorderSecondaryDisabledInt() { + distinctByButtonBackBorderSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackBorderSecondaryDisabledInt'); }); } QueryBuilder - distinctByButtonBackBorderSecondaryInt() { + distinctByButtonBackBorderSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackBorderSecondaryInt'); }); } QueryBuilder - distinctByButtonBackPrimaryDisabledInt() { + distinctByButtonBackPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackPrimaryDisabledInt'); }); } QueryBuilder - distinctByButtonBackPrimaryInt() { + distinctByButtonBackPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackPrimaryInt'); }); } QueryBuilder - distinctByButtonBackSecondaryDisabledInt() { + distinctByButtonBackSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackSecondaryDisabledInt'); }); } QueryBuilder - distinctByButtonBackSecondaryInt() { + distinctByButtonBackSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonBackSecondaryInt'); }); } QueryBuilder - distinctByButtonTextBorderInt() { + distinctByButtonTextBorderInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextBorderInt'); }); } QueryBuilder - distinctByButtonTextBorderlessDisabledInt() { + distinctByButtonTextBorderlessDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextBorderlessDisabledInt'); }); } QueryBuilder - distinctByButtonTextBorderlessInt() { + distinctByButtonTextBorderlessInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextBorderlessInt'); }); } QueryBuilder - distinctByButtonTextDisabledInt() { + distinctByButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextDisabledInt'); }); } QueryBuilder - distinctByButtonTextPrimaryDisabledInt() { + distinctByButtonTextPrimaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextPrimaryDisabledInt'); }); } QueryBuilder - distinctByButtonTextPrimaryInt() { + distinctByButtonTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextPrimaryInt'); }); } QueryBuilder - distinctByButtonTextSecondaryDisabledInt() { + distinctByButtonTextSecondaryDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextSecondaryDisabledInt'); }); } QueryBuilder - distinctByButtonTextSecondaryInt() { + distinctByButtonTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'buttonTextSecondaryInt'); }); } QueryBuilder - distinctByCheckboxBGCheckedInt() { + distinctByCheckboxBGCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxBGCheckedInt'); }); } QueryBuilder - distinctByCheckboxBGDisabledInt() { + distinctByCheckboxBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxBGDisabledInt'); }); } QueryBuilder - distinctByCheckboxBorderEmptyInt() { + distinctByCheckboxBorderEmptyInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxBorderEmptyInt'); }); } QueryBuilder - distinctByCheckboxIconCheckedInt() { + distinctByCheckboxIconCheckedInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxIconCheckedInt'); }); } QueryBuilder - distinctByCheckboxIconDisabledInt() { + distinctByCheckboxIconDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxIconDisabledInt'); }); } QueryBuilder - distinctByCheckboxTextLabelInt() { + distinctByCheckboxTextLabelInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'checkboxTextLabelInt'); }); } QueryBuilder - distinctByCoinColorsJsonString({bool caseSensitive = true}) { + distinctByCoinColorsJsonString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'coinColorsJsonString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'coinColorsJsonString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByCurrencyListItemBGInt() { + distinctByCurrencyListItemBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'currencyListItemBGInt'); }); } QueryBuilder - distinctByCustomTextButtonDisabledTextInt() { + distinctByCustomTextButtonDisabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'customTextButtonDisabledTextInt'); }); } QueryBuilder - distinctByCustomTextButtonEnabledTextInt() { + distinctByCustomTextButtonEnabledTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'customTextButtonEnabledTextInt'); }); @@ -16119,38 +16468,40 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByEthWalletTagBGInt() { + distinctByEthWalletTagBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'ethWalletTagBGInt'); }); } QueryBuilder - distinctByEthWalletTagTextInt() { + distinctByEthWalletTagTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'ethWalletTagTextInt'); }); } QueryBuilder - distinctByFavoriteStarActiveInt() { + distinctByFavoriteStarActiveInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'favoriteStarActiveInt'); }); } QueryBuilder - distinctByFavoriteStarInactiveInt() { + distinctByFavoriteStarInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'favoriteStarInactiveInt'); }); } QueryBuilder - distinctByGradientBackgroundString({bool caseSensitive = true}) { + distinctByGradientBackgroundString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'gradientBackgroundString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'gradientBackgroundString', + caseSensitive: caseSensitive, + ); }); } @@ -16161,10 +16512,12 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByHomeViewButtonBarBoxShadowString({bool caseSensitive = true}) { + distinctByHomeViewButtonBarBoxShadowString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'homeViewButtonBarBoxShadowString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'homeViewButtonBarBoxShadowString', + caseSensitive: caseSensitive, + ); }); } @@ -16193,49 +16546,50 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByLoadingOverlayTextColorInt() { + distinctByLoadingOverlayTextColorInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'loadingOverlayTextColorInt'); }); } QueryBuilder - distinctByMyStackContactIconBGInt() { + distinctByMyStackContactIconBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'myStackContactIconBGInt'); }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByNumberBackDefaultInt() { + distinctByNumberBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numberBackDefaultInt'); }); } QueryBuilder - distinctByNumberTextDefaultInt() { + distinctByNumberTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numberTextDefaultInt'); }); } QueryBuilder - distinctByNumpadBackDefaultInt() { + distinctByNumpadBackDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numpadBackDefaultInt'); }); } QueryBuilder - distinctByNumpadTextDefaultInt() { + distinctByNumpadTextDefaultInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'numpadTextDefaultInt'); }); @@ -16254,147 +16608,147 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByRadioButtonBorderDisabledInt() { + distinctByRadioButtonBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonBorderDisabledInt'); }); } QueryBuilder - distinctByRadioButtonBorderEnabledInt() { + distinctByRadioButtonBorderEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonBorderEnabledInt'); }); } QueryBuilder - distinctByRadioButtonIconBorderDisabledInt() { + distinctByRadioButtonIconBorderDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonIconBorderDisabledInt'); }); } QueryBuilder - distinctByRadioButtonIconBorderInt() { + distinctByRadioButtonIconBorderInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonIconBorderInt'); }); } QueryBuilder - distinctByRadioButtonIconCircleInt() { + distinctByRadioButtonIconCircleInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonIconCircleInt'); }); } QueryBuilder - distinctByRadioButtonIconEnabledInt() { + distinctByRadioButtonIconEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonIconEnabledInt'); }); } QueryBuilder - distinctByRadioButtonLabelDisabledInt() { + distinctByRadioButtonLabelDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonLabelDisabledInt'); }); } QueryBuilder - distinctByRadioButtonLabelEnabledInt() { + distinctByRadioButtonLabelEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonLabelEnabledInt'); }); } QueryBuilder - distinctByRadioButtonTextDisabledInt() { + distinctByRadioButtonTextDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonTextDisabledInt'); }); } QueryBuilder - distinctByRadioButtonTextEnabledInt() { + distinctByRadioButtonTextEnabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'radioButtonTextEnabledInt'); }); } QueryBuilder - distinctByRateTypeToggleColorOffInt() { + distinctByRateTypeToggleColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'rateTypeToggleColorOffInt'); }); } QueryBuilder - distinctByRateTypeToggleColorOnInt() { + distinctByRateTypeToggleColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'rateTypeToggleColorOnInt'); }); } QueryBuilder - distinctByRateTypeToggleDesktopColorOffInt() { + distinctByRateTypeToggleDesktopColorOffInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'rateTypeToggleDesktopColorOffInt'); }); } QueryBuilder - distinctByRateTypeToggleDesktopColorOnInt() { + distinctByRateTypeToggleDesktopColorOnInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'rateTypeToggleDesktopColorOnInt'); }); } QueryBuilder - distinctBySettingsIconBack2Int() { + distinctBySettingsIconBack2Int() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsIconBack2Int'); }); } QueryBuilder - distinctBySettingsIconBackInt() { + distinctBySettingsIconBackInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsIconBackInt'); }); } QueryBuilder - distinctBySettingsIconElementInt() { + distinctBySettingsIconElementInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsIconElementInt'); }); } QueryBuilder - distinctBySettingsIconIconInt() { + distinctBySettingsIconIconInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsIconIconInt'); }); } QueryBuilder - distinctBySettingsItem2ActiveBGInt() { + distinctBySettingsItem2ActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsItem2ActiveBGInt'); }); } QueryBuilder - distinctBySettingsItem2ActiveSubInt() { + distinctBySettingsItem2ActiveSubInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsItem2ActiveSubInt'); }); } QueryBuilder - distinctBySettingsItem2ActiveTextInt() { + distinctBySettingsItem2ActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'settingsItem2ActiveTextInt'); }); @@ -16407,42 +16761,42 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctBySnackBarBackErrorInt() { + distinctBySnackBarBackErrorInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarBackErrorInt'); }); } QueryBuilder - distinctBySnackBarBackInfoInt() { + distinctBySnackBarBackInfoInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarBackInfoInt'); }); } QueryBuilder - distinctBySnackBarBackSuccessInt() { + distinctBySnackBarBackSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarBackSuccessInt'); }); } QueryBuilder - distinctBySnackBarTextErrorInt() { + distinctBySnackBarTextErrorInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarTextErrorInt'); }); } QueryBuilder - distinctBySnackBarTextInfoInt() { + distinctBySnackBarTextInfoInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarTextInfoInt'); }); } QueryBuilder - distinctBySnackBarTextSuccessInt() { + distinctBySnackBarTextSuccessInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'snackBarTextSuccessInt'); }); @@ -16461,85 +16815,87 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByStackWalletBottomInt() { + distinctByStackWalletBottomInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stackWalletBottomInt'); }); } QueryBuilder - distinctByStackWalletMidInt() { + distinctByStackWalletMidInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stackWalletMidInt'); }); } QueryBuilder - distinctByStandardBoxShadowString({bool caseSensitive = true}) { + distinctByStandardBoxShadowString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'standardBoxShadowString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'standardBoxShadowString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByStepIndicatorBGCheckInt() { + distinctByStepIndicatorBGCheckInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorBGCheckInt'); }); } QueryBuilder - distinctByStepIndicatorBGInactiveInt() { + distinctByStepIndicatorBGInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorBGInactiveInt'); }); } QueryBuilder - distinctByStepIndicatorBGLinesInactiveInt() { + distinctByStepIndicatorBGLinesInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorBGLinesInactiveInt'); }); } QueryBuilder - distinctByStepIndicatorBGLinesInt() { + distinctByStepIndicatorBGLinesInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorBGLinesInt'); }); } QueryBuilder - distinctByStepIndicatorBGNumberInt() { + distinctByStepIndicatorBGNumberInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorBGNumberInt'); }); } QueryBuilder - distinctByStepIndicatorIconInactiveInt() { + distinctByStepIndicatorIconInactiveInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorIconInactiveInt'); }); } QueryBuilder - distinctByStepIndicatorIconNumberInt() { + distinctByStepIndicatorIconNumberInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorIconNumberInt'); }); } QueryBuilder - distinctByStepIndicatorIconTextInt() { + distinctByStepIndicatorIconTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'stepIndicatorIconTextInt'); }); } QueryBuilder - distinctBySwitchBGDisabledInt() { + distinctBySwitchBGDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'switchBGDisabledInt'); }); @@ -16558,28 +16914,28 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctBySwitchCircleDisabledInt() { + distinctBySwitchCircleDisabledInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'switchCircleDisabledInt'); }); } QueryBuilder - distinctBySwitchCircleOffInt() { + distinctBySwitchCircleOffInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'switchCircleOffInt'); }); } QueryBuilder - distinctBySwitchCircleOnInt() { + distinctBySwitchCircleOnInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'switchCircleOnInt'); }); } QueryBuilder - distinctByTextConfirmTotalAmountInt() { + distinctByTextConfirmTotalAmountInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textConfirmTotalAmountInt'); }); @@ -16610,154 +16966,154 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByTextFavoriteCardInt() { + distinctByTextFavoriteCardInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFavoriteCardInt'); }); } QueryBuilder - distinctByTextFieldActiveBGInt() { + distinctByTextFieldActiveBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldActiveBGInt'); }); } QueryBuilder - distinctByTextFieldActiveLabelInt() { + distinctByTextFieldActiveLabelInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldActiveLabelInt'); }); } QueryBuilder - distinctByTextFieldActiveSearchIconLeftInt() { + distinctByTextFieldActiveSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldActiveSearchIconLeftInt'); }); } QueryBuilder - distinctByTextFieldActiveSearchIconRightInt() { + distinctByTextFieldActiveSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldActiveSearchIconRightInt'); }); } QueryBuilder - distinctByTextFieldActiveTextInt() { + distinctByTextFieldActiveTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldActiveTextInt'); }); } QueryBuilder - distinctByTextFieldDefaultBGInt() { + distinctByTextFieldDefaultBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldDefaultBGInt'); }); } QueryBuilder - distinctByTextFieldDefaultSearchIconLeftInt() { + distinctByTextFieldDefaultSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldDefaultSearchIconLeftInt'); }); } QueryBuilder - distinctByTextFieldDefaultSearchIconRightInt() { + distinctByTextFieldDefaultSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldDefaultSearchIconRightInt'); }); } QueryBuilder - distinctByTextFieldDefaultTextInt() { + distinctByTextFieldDefaultTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldDefaultTextInt'); }); } QueryBuilder - distinctByTextFieldErrorBGInt() { + distinctByTextFieldErrorBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorBGInt'); }); } QueryBuilder - distinctByTextFieldErrorBorderInt() { + distinctByTextFieldErrorBorderInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorBorderInt'); }); } QueryBuilder - distinctByTextFieldErrorLabelInt() { + distinctByTextFieldErrorLabelInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorLabelInt'); }); } QueryBuilder - distinctByTextFieldErrorSearchIconLeftInt() { + distinctByTextFieldErrorSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorSearchIconLeftInt'); }); } QueryBuilder - distinctByTextFieldErrorSearchIconRightInt() { + distinctByTextFieldErrorSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorSearchIconRightInt'); }); } QueryBuilder - distinctByTextFieldErrorTextInt() { + distinctByTextFieldErrorTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldErrorTextInt'); }); } QueryBuilder - distinctByTextFieldSuccessBGInt() { + distinctByTextFieldSuccessBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessBGInt'); }); } QueryBuilder - distinctByTextFieldSuccessBorderInt() { + distinctByTextFieldSuccessBorderInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessBorderInt'); }); } QueryBuilder - distinctByTextFieldSuccessLabelInt() { + distinctByTextFieldSuccessLabelInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessLabelInt'); }); } QueryBuilder - distinctByTextFieldSuccessSearchIconLeftInt() { + distinctByTextFieldSuccessSearchIconLeftInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessSearchIconLeftInt'); }); } QueryBuilder - distinctByTextFieldSuccessSearchIconRightInt() { + distinctByTextFieldSuccessSearchIconRightInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessSearchIconRightInt'); }); } QueryBuilder - distinctByTextFieldSuccessTextInt() { + distinctByTextFieldSuccessTextInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textFieldSuccessTextInt'); }); @@ -16770,7 +17126,7 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByTextSelectedWordTableItemInt() { + distinctByTextSelectedWordTableItemInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'textSelectedWordTableItemInt'); }); @@ -16818,57 +17174,58 @@ extension StackThemeQueryWhereDistinct }); } - QueryBuilder distinctByThemeId( - {bool caseSensitive = true}) { + QueryBuilder distinctByThemeId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'themeId', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByTokenSummaryBGInt() { + distinctByTokenSummaryBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenSummaryBGInt'); }); } QueryBuilder - distinctByTokenSummaryButtonBGInt() { + distinctByTokenSummaryButtonBGInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenSummaryButtonBGInt'); }); } QueryBuilder - distinctByTokenSummaryIconInt() { + distinctByTokenSummaryIconInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenSummaryIconInt'); }); } QueryBuilder - distinctByTokenSummaryTextPrimaryInt() { + distinctByTokenSummaryTextPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenSummaryTextPrimaryInt'); }); } QueryBuilder - distinctByTokenSummaryTextSecondaryInt() { + distinctByTokenSummaryTextSecondaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenSummaryTextSecondaryInt'); }); } QueryBuilder - distinctByTopNavIconGreenInt() { + distinctByTopNavIconGreenInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'topNavIconGreenInt'); }); } QueryBuilder - distinctByTopNavIconPrimaryInt() { + distinctByTopNavIconPrimaryInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'topNavIconPrimaryInt'); }); @@ -16881,7 +17238,7 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByTopNavIconYellowInt() { + distinctByTopNavIconYellowInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'topNavIconYellowInt'); }); @@ -16894,14 +17251,14 @@ extension StackThemeQueryWhereDistinct } QueryBuilder - distinctByWarningBackgroundInt() { + distinctByWarningBackgroundInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'warningBackgroundInt'); }); } QueryBuilder - distinctByWarningForegroundInt() { + distinctByWarningForegroundInt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'warningForegroundInt'); }); @@ -16929,14 +17286,14 @@ extension StackThemeQueryProperty } QueryBuilder - accentColorGreenIntProperty() { + accentColorGreenIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'accentColorGreenInt'); }); } QueryBuilder - accentColorOrangeIntProperty() { + accentColorOrangeIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'accentColorOrangeInt'); }); @@ -16949,7 +17306,7 @@ extension StackThemeQueryProperty } QueryBuilder - accentColorYellowIntProperty() { + accentColorYellowIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'accentColorYellowInt'); }); @@ -16962,14 +17319,14 @@ extension StackThemeQueryProperty } QueryBuilder - assetsV2Property() { + assetsV2Property() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'assetsV2'); }); } QueryBuilder - backgroundAppBarIntProperty() { + backgroundAppBarIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'backgroundAppBarInt'); }); @@ -16988,21 +17345,21 @@ extension StackThemeQueryProperty } QueryBuilder - bottomNavIconBackIntProperty() { + bottomNavIconBackIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'bottomNavIconBackInt'); }); } QueryBuilder - bottomNavIconIconHighlightedIntProperty() { + bottomNavIconIconHighlightedIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'bottomNavIconIconHighlightedInt'); }); } QueryBuilder - bottomNavIconIconIntProperty() { + bottomNavIconIconIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'bottomNavIconIconInt'); }); @@ -17021,189 +17378,189 @@ extension StackThemeQueryProperty } QueryBuilder - brightnessStringProperty() { + brightnessStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'brightnessString'); }); } QueryBuilder - buttonBackBorderDisabledIntProperty() { + buttonBackBorderDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackBorderDisabledInt'); }); } QueryBuilder - buttonBackBorderIntProperty() { + buttonBackBorderIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackBorderInt'); }); } QueryBuilder - buttonBackBorderSecondaryDisabledIntProperty() { + buttonBackBorderSecondaryDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackBorderSecondaryDisabledInt'); }); } QueryBuilder - buttonBackBorderSecondaryIntProperty() { + buttonBackBorderSecondaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackBorderSecondaryInt'); }); } QueryBuilder - buttonBackPrimaryDisabledIntProperty() { + buttonBackPrimaryDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackPrimaryDisabledInt'); }); } QueryBuilder - buttonBackPrimaryIntProperty() { + buttonBackPrimaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackPrimaryInt'); }); } QueryBuilder - buttonBackSecondaryDisabledIntProperty() { + buttonBackSecondaryDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackSecondaryDisabledInt'); }); } QueryBuilder - buttonBackSecondaryIntProperty() { + buttonBackSecondaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonBackSecondaryInt'); }); } QueryBuilder - buttonTextBorderIntProperty() { + buttonTextBorderIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextBorderInt'); }); } QueryBuilder - buttonTextBorderlessDisabledIntProperty() { + buttonTextBorderlessDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextBorderlessDisabledInt'); }); } QueryBuilder - buttonTextBorderlessIntProperty() { + buttonTextBorderlessIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextBorderlessInt'); }); } QueryBuilder - buttonTextDisabledIntProperty() { + buttonTextDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextDisabledInt'); }); } QueryBuilder - buttonTextPrimaryDisabledIntProperty() { + buttonTextPrimaryDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextPrimaryDisabledInt'); }); } QueryBuilder - buttonTextPrimaryIntProperty() { + buttonTextPrimaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextPrimaryInt'); }); } QueryBuilder - buttonTextSecondaryDisabledIntProperty() { + buttonTextSecondaryDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextSecondaryDisabledInt'); }); } QueryBuilder - buttonTextSecondaryIntProperty() { + buttonTextSecondaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'buttonTextSecondaryInt'); }); } QueryBuilder - checkboxBGCheckedIntProperty() { + checkboxBGCheckedIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxBGCheckedInt'); }); } QueryBuilder - checkboxBGDisabledIntProperty() { + checkboxBGDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxBGDisabledInt'); }); } QueryBuilder - checkboxBorderEmptyIntProperty() { + checkboxBorderEmptyIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxBorderEmptyInt'); }); } QueryBuilder - checkboxIconCheckedIntProperty() { + checkboxIconCheckedIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxIconCheckedInt'); }); } QueryBuilder - checkboxIconDisabledIntProperty() { + checkboxIconDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxIconDisabledInt'); }); } QueryBuilder - checkboxTextLabelIntProperty() { + checkboxTextLabelIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'checkboxTextLabelInt'); }); } QueryBuilder - coinColorsJsonStringProperty() { + coinColorsJsonStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'coinColorsJsonString'); }); } QueryBuilder - currencyListItemBGIntProperty() { + currencyListItemBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'currencyListItemBGInt'); }); } QueryBuilder - customTextButtonDisabledTextIntProperty() { + customTextButtonDisabledTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'customTextButtonDisabledTextInt'); }); } QueryBuilder - customTextButtonEnabledTextIntProperty() { + customTextButtonEnabledTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'customTextButtonEnabledTextInt'); }); @@ -17228,28 +17585,28 @@ extension StackThemeQueryProperty } QueryBuilder - ethWalletTagTextIntProperty() { + ethWalletTagTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'ethWalletTagTextInt'); }); } QueryBuilder - favoriteStarActiveIntProperty() { + favoriteStarActiveIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'favoriteStarActiveInt'); }); } QueryBuilder - favoriteStarInactiveIntProperty() { + favoriteStarInactiveIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'favoriteStarInactiveInt'); }); } QueryBuilder - gradientBackgroundStringProperty() { + gradientBackgroundStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'gradientBackgroundString'); }); @@ -17262,7 +17619,7 @@ extension StackThemeQueryProperty } QueryBuilder - homeViewButtonBarBoxShadowStringProperty() { + homeViewButtonBarBoxShadowStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'homeViewButtonBarBoxShadowString'); }); @@ -17293,14 +17650,14 @@ extension StackThemeQueryProperty } QueryBuilder - loadingOverlayTextColorIntProperty() { + loadingOverlayTextColorIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'loadingOverlayTextColorInt'); }); } QueryBuilder - myStackContactIconBGIntProperty() { + myStackContactIconBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'myStackContactIconBGInt'); }); @@ -17313,28 +17670,28 @@ extension StackThemeQueryProperty } QueryBuilder - numberBackDefaultIntProperty() { + numberBackDefaultIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'numberBackDefaultInt'); }); } QueryBuilder - numberTextDefaultIntProperty() { + numberTextDefaultIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'numberTextDefaultInt'); }); } QueryBuilder - numpadBackDefaultIntProperty() { + numpadBackDefaultIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'numpadBackDefaultInt'); }); } QueryBuilder - numpadTextDefaultIntProperty() { + numpadTextDefaultIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'numpadTextDefaultInt'); }); @@ -17353,147 +17710,147 @@ extension StackThemeQueryProperty } QueryBuilder - radioButtonBorderDisabledIntProperty() { + radioButtonBorderDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonBorderDisabledInt'); }); } QueryBuilder - radioButtonBorderEnabledIntProperty() { + radioButtonBorderEnabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonBorderEnabledInt'); }); } QueryBuilder - radioButtonIconBorderDisabledIntProperty() { + radioButtonIconBorderDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonIconBorderDisabledInt'); }); } QueryBuilder - radioButtonIconBorderIntProperty() { + radioButtonIconBorderIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonIconBorderInt'); }); } QueryBuilder - radioButtonIconCircleIntProperty() { + radioButtonIconCircleIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonIconCircleInt'); }); } QueryBuilder - radioButtonIconEnabledIntProperty() { + radioButtonIconEnabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonIconEnabledInt'); }); } QueryBuilder - radioButtonLabelDisabledIntProperty() { + radioButtonLabelDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonLabelDisabledInt'); }); } QueryBuilder - radioButtonLabelEnabledIntProperty() { + radioButtonLabelEnabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonLabelEnabledInt'); }); } QueryBuilder - radioButtonTextDisabledIntProperty() { + radioButtonTextDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonTextDisabledInt'); }); } QueryBuilder - radioButtonTextEnabledIntProperty() { + radioButtonTextEnabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'radioButtonTextEnabledInt'); }); } QueryBuilder - rateTypeToggleColorOffIntProperty() { + rateTypeToggleColorOffIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'rateTypeToggleColorOffInt'); }); } QueryBuilder - rateTypeToggleColorOnIntProperty() { + rateTypeToggleColorOnIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'rateTypeToggleColorOnInt'); }); } QueryBuilder - rateTypeToggleDesktopColorOffIntProperty() { + rateTypeToggleDesktopColorOffIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'rateTypeToggleDesktopColorOffInt'); }); } QueryBuilder - rateTypeToggleDesktopColorOnIntProperty() { + rateTypeToggleDesktopColorOnIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'rateTypeToggleDesktopColorOnInt'); }); } QueryBuilder - settingsIconBack2IntProperty() { + settingsIconBack2IntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsIconBack2Int'); }); } QueryBuilder - settingsIconBackIntProperty() { + settingsIconBackIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsIconBackInt'); }); } QueryBuilder - settingsIconElementIntProperty() { + settingsIconElementIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsIconElementInt'); }); } QueryBuilder - settingsIconIconIntProperty() { + settingsIconIconIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsIconIconInt'); }); } QueryBuilder - settingsItem2ActiveBGIntProperty() { + settingsItem2ActiveBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsItem2ActiveBGInt'); }); } QueryBuilder - settingsItem2ActiveSubIntProperty() { + settingsItem2ActiveSubIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsItem2ActiveSubInt'); }); } QueryBuilder - settingsItem2ActiveTextIntProperty() { + settingsItem2ActiveTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'settingsItem2ActiveTextInt'); }); @@ -17506,42 +17863,42 @@ extension StackThemeQueryProperty } QueryBuilder - snackBarBackErrorIntProperty() { + snackBarBackErrorIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarBackErrorInt'); }); } QueryBuilder - snackBarBackInfoIntProperty() { + snackBarBackInfoIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarBackInfoInt'); }); } QueryBuilder - snackBarBackSuccessIntProperty() { + snackBarBackSuccessIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarBackSuccessInt'); }); } QueryBuilder - snackBarTextErrorIntProperty() { + snackBarTextErrorIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarTextErrorInt'); }); } QueryBuilder - snackBarTextInfoIntProperty() { + snackBarTextInfoIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarTextInfoInt'); }); } QueryBuilder - snackBarTextSuccessIntProperty() { + snackBarTextSuccessIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'snackBarTextSuccessInt'); }); @@ -17560,7 +17917,7 @@ extension StackThemeQueryProperty } QueryBuilder - stackWalletBottomIntProperty() { + stackWalletBottomIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stackWalletBottomInt'); }); @@ -17573,70 +17930,70 @@ extension StackThemeQueryProperty } QueryBuilder - standardBoxShadowStringProperty() { + standardBoxShadowStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'standardBoxShadowString'); }); } QueryBuilder - stepIndicatorBGCheckIntProperty() { + stepIndicatorBGCheckIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorBGCheckInt'); }); } QueryBuilder - stepIndicatorBGInactiveIntProperty() { + stepIndicatorBGInactiveIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorBGInactiveInt'); }); } QueryBuilder - stepIndicatorBGLinesInactiveIntProperty() { + stepIndicatorBGLinesInactiveIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorBGLinesInactiveInt'); }); } QueryBuilder - stepIndicatorBGLinesIntProperty() { + stepIndicatorBGLinesIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorBGLinesInt'); }); } QueryBuilder - stepIndicatorBGNumberIntProperty() { + stepIndicatorBGNumberIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorBGNumberInt'); }); } QueryBuilder - stepIndicatorIconInactiveIntProperty() { + stepIndicatorIconInactiveIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorIconInactiveInt'); }); } QueryBuilder - stepIndicatorIconNumberIntProperty() { + stepIndicatorIconNumberIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorIconNumberInt'); }); } QueryBuilder - stepIndicatorIconTextIntProperty() { + stepIndicatorIconTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'stepIndicatorIconTextInt'); }); } QueryBuilder - switchBGDisabledIntProperty() { + switchBGDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'switchBGDisabledInt'); }); @@ -17655,7 +18012,7 @@ extension StackThemeQueryProperty } QueryBuilder - switchCircleDisabledIntProperty() { + switchCircleDisabledIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'switchCircleDisabledInt'); }); @@ -17674,7 +18031,7 @@ extension StackThemeQueryProperty } QueryBuilder - textConfirmTotalAmountIntProperty() { + textConfirmTotalAmountIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textConfirmTotalAmountInt'); }); @@ -17705,154 +18062,154 @@ extension StackThemeQueryProperty } QueryBuilder - textFavoriteCardIntProperty() { + textFavoriteCardIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFavoriteCardInt'); }); } QueryBuilder - textFieldActiveBGIntProperty() { + textFieldActiveBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldActiveBGInt'); }); } QueryBuilder - textFieldActiveLabelIntProperty() { + textFieldActiveLabelIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldActiveLabelInt'); }); } QueryBuilder - textFieldActiveSearchIconLeftIntProperty() { + textFieldActiveSearchIconLeftIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldActiveSearchIconLeftInt'); }); } QueryBuilder - textFieldActiveSearchIconRightIntProperty() { + textFieldActiveSearchIconRightIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldActiveSearchIconRightInt'); }); } QueryBuilder - textFieldActiveTextIntProperty() { + textFieldActiveTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldActiveTextInt'); }); } QueryBuilder - textFieldDefaultBGIntProperty() { + textFieldDefaultBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldDefaultBGInt'); }); } QueryBuilder - textFieldDefaultSearchIconLeftIntProperty() { + textFieldDefaultSearchIconLeftIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldDefaultSearchIconLeftInt'); }); } QueryBuilder - textFieldDefaultSearchIconRightIntProperty() { + textFieldDefaultSearchIconRightIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldDefaultSearchIconRightInt'); }); } QueryBuilder - textFieldDefaultTextIntProperty() { + textFieldDefaultTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldDefaultTextInt'); }); } QueryBuilder - textFieldErrorBGIntProperty() { + textFieldErrorBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorBGInt'); }); } QueryBuilder - textFieldErrorBorderIntProperty() { + textFieldErrorBorderIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorBorderInt'); }); } QueryBuilder - textFieldErrorLabelIntProperty() { + textFieldErrorLabelIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorLabelInt'); }); } QueryBuilder - textFieldErrorSearchIconLeftIntProperty() { + textFieldErrorSearchIconLeftIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorSearchIconLeftInt'); }); } QueryBuilder - textFieldErrorSearchIconRightIntProperty() { + textFieldErrorSearchIconRightIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorSearchIconRightInt'); }); } QueryBuilder - textFieldErrorTextIntProperty() { + textFieldErrorTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldErrorTextInt'); }); } QueryBuilder - textFieldSuccessBGIntProperty() { + textFieldSuccessBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessBGInt'); }); } QueryBuilder - textFieldSuccessBorderIntProperty() { + textFieldSuccessBorderIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessBorderInt'); }); } QueryBuilder - textFieldSuccessLabelIntProperty() { + textFieldSuccessLabelIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessLabelInt'); }); } QueryBuilder - textFieldSuccessSearchIconLeftIntProperty() { + textFieldSuccessSearchIconLeftIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessSearchIconLeftInt'); }); } QueryBuilder - textFieldSuccessSearchIconRightIntProperty() { + textFieldSuccessSearchIconRightIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessSearchIconRightInt'); }); } QueryBuilder - textFieldSuccessTextIntProperty() { + textFieldSuccessTextIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textFieldSuccessTextInt'); }); @@ -17865,7 +18222,7 @@ extension StackThemeQueryProperty } QueryBuilder - textSelectedWordTableItemIntProperty() { + textSelectedWordTableItemIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'textSelectedWordTableItemInt'); }); @@ -17926,28 +18283,28 @@ extension StackThemeQueryProperty } QueryBuilder - tokenSummaryButtonBGIntProperty() { + tokenSummaryButtonBGIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenSummaryButtonBGInt'); }); } QueryBuilder - tokenSummaryIconIntProperty() { + tokenSummaryIconIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenSummaryIconInt'); }); } QueryBuilder - tokenSummaryTextPrimaryIntProperty() { + tokenSummaryTextPrimaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenSummaryTextPrimaryInt'); }); } QueryBuilder - tokenSummaryTextSecondaryIntProperty() { + tokenSummaryTextSecondaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenSummaryTextSecondaryInt'); }); @@ -17960,7 +18317,7 @@ extension StackThemeQueryProperty } QueryBuilder - topNavIconPrimaryIntProperty() { + topNavIconPrimaryIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'topNavIconPrimaryInt'); }); @@ -17973,7 +18330,7 @@ extension StackThemeQueryProperty } QueryBuilder - topNavIconYellowIntProperty() { + topNavIconYellowIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'topNavIconYellowInt'); }); @@ -17986,21 +18343,21 @@ extension StackThemeQueryProperty } QueryBuilder - warningBackgroundIntProperty() { + warningBackgroundIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'warningBackgroundInt'); }); } QueryBuilder - warningForegroundIntProperty() { + warningForegroundIntProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'warningForegroundInt'); }); } QueryBuilder - assetsV3Property() { + assetsV3Property() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'zAssetsV3'); }); @@ -18023,16 +18380,8 @@ const ThemeAssetsSchema = Schema( name: r'background', type: IsarType.string, ), - r'bellNew': PropertySchema( - id: 1, - name: r'bellNew', - type: IsarType.string, - ), - r'bitcoin': PropertySchema( - id: 2, - name: r'bitcoin', - type: IsarType.string, - ), + r'bellNew': PropertySchema(id: 1, name: r'bellNew', type: IsarType.string), + r'bitcoin': PropertySchema(id: 2, name: r'bitcoin', type: IsarType.string), r'bitcoinImage': PropertySchema( id: 3, name: r'bitcoinImage', @@ -18058,11 +18407,7 @@ const ThemeAssetsSchema = Schema( name: r'bitcoincashImageSecondary', type: IsarType.string, ), - r'buy': PropertySchema( - id: 8, - name: r'buy', - type: IsarType.string, - ), + r'buy': PropertySchema(id: 8, name: r'buy', type: IsarType.string), r'dogecoin': PropertySchema( id: 9, name: r'dogecoin', @@ -18113,11 +18458,7 @@ const ThemeAssetsSchema = Schema( name: r'exchange', type: IsarType.string, ), - r'firo': PropertySchema( - id: 19, - name: r'firo', - type: IsarType.string, - ), + r'firo': PropertySchema(id: 19, name: r'firo', type: IsarType.string), r'firoImage': PropertySchema( id: 20, name: r'firoImage', @@ -18148,142 +18489,124 @@ const ThemeAssetsSchema = Schema( name: r'loadingGif', type: IsarType.string, ), - r'monero': PropertySchema( + r'mimblewimblecoin': PropertySchema( id: 26, - name: r'monero', + name: r'mimblewimblecoin', type: IsarType.string, ), + r'monero': PropertySchema(id: 27, name: r'monero', type: IsarType.string), r'moneroImage': PropertySchema( - id: 27, + id: 28, name: r'moneroImage', type: IsarType.string, ), r'moneroImageSecondary': PropertySchema( - id: 28, + id: 29, name: r'moneroImageSecondary', type: IsarType.string, ), r'namecoin': PropertySchema( - id: 29, + id: 30, name: r'namecoin', type: IsarType.string, ), r'namecoinImage': PropertySchema( - id: 30, + id: 31, name: r'namecoinImage', type: IsarType.string, ), r'namecoinImageSecondary': PropertySchema( - id: 31, - name: r'namecoinImageSecondary', - type: IsarType.string, - ), - r'particl': PropertySchema( id: 32, - name: r'particl', + name: r'namecoinImageSecondary', type: IsarType.string, ), + r'particl': PropertySchema(id: 33, name: r'particl', type: IsarType.string), r'particlImage': PropertySchema( - id: 33, + id: 34, name: r'particlImage', type: IsarType.string, ), r'particlImageSecondary': PropertySchema( - id: 34, + id: 35, name: r'particlImageSecondary', type: IsarType.string, ), r'personaEasy': PropertySchema( - id: 35, + id: 36, name: r'personaEasy', type: IsarType.string, ), r'personaIncognito': PropertySchema( - id: 36, - name: r'personaIncognito', - type: IsarType.string, - ), - r'receive': PropertySchema( id: 37, - name: r'receive', + name: r'personaIncognito', type: IsarType.string, ), + r'receive': PropertySchema(id: 38, name: r'receive', type: IsarType.string), r'receiveCancelled': PropertySchema( - id: 38, + id: 39, name: r'receiveCancelled', type: IsarType.string, ), r'receivePending': PropertySchema( - id: 39, - name: r'receivePending', - type: IsarType.string, - ), - r'send': PropertySchema( id: 40, - name: r'send', + name: r'receivePending', type: IsarType.string, ), + r'send': PropertySchema(id: 41, name: r'send', type: IsarType.string), r'sendCancelled': PropertySchema( - id: 41, + id: 42, name: r'sendCancelled', type: IsarType.string, ), r'sendPending': PropertySchema( - id: 42, - name: r'sendPending', - type: IsarType.string, - ), - r'stack': PropertySchema( id: 43, - name: r'stack', + name: r'sendPending', type: IsarType.string, ), + r'stack': PropertySchema(id: 44, name: r'stack', type: IsarType.string), r'stackIcon': PropertySchema( - id: 44, + id: 45, name: r'stackIcon', type: IsarType.string, ), r'themePreview': PropertySchema( - id: 45, + id: 46, name: r'themePreview', type: IsarType.string, ), r'themeSelector': PropertySchema( - id: 46, + id: 47, name: r'themeSelector', type: IsarType.string, ), r'txExchange': PropertySchema( - id: 47, + id: 48, name: r'txExchange', type: IsarType.string, ), r'txExchangeFailed': PropertySchema( - id: 48, + id: 49, name: r'txExchangeFailed', type: IsarType.string, ), r'txExchangePending': PropertySchema( - id: 49, - name: r'txExchangePending', - type: IsarType.string, - ), - r'wownero': PropertySchema( id: 50, - name: r'wownero', + name: r'txExchangePending', type: IsarType.string, ), + r'wownero': PropertySchema(id: 51, name: r'wownero', type: IsarType.string), r'wowneroImage': PropertySchema( - id: 51, + id: 52, name: r'wowneroImage', type: IsarType.string, ), r'wowneroImageSecondary': PropertySchema( - id: 52, + id: 53, name: r'wowneroImageSecondary', type: IsarType.string, - ) + ), }, + estimateSize: _themeAssetsEstimateSize, serialize: _themeAssetsSerialize, deserialize: _themeAssetsDeserialize, @@ -18332,6 +18655,7 @@ int _themeAssetsEstimateSize( bytesCount += 3 + value.length * 3; } } + bytesCount += 3 + object.mimblewimblecoin.length * 3; bytesCount += 3 + object.monero.length * 3; bytesCount += 3 + object.moneroImage.length * 3; bytesCount += 3 + object.moneroImageSecondary.length * 3; @@ -18394,33 +18718,34 @@ void _themeAssetsSerialize( writer.writeString(offsets[23], object.litecoinImage); writer.writeString(offsets[24], object.litecoinImageSecondary); writer.writeString(offsets[25], object.loadingGif); - writer.writeString(offsets[26], object.monero); - writer.writeString(offsets[27], object.moneroImage); - writer.writeString(offsets[28], object.moneroImageSecondary); - writer.writeString(offsets[29], object.namecoin); - writer.writeString(offsets[30], object.namecoinImage); - writer.writeString(offsets[31], object.namecoinImageSecondary); - writer.writeString(offsets[32], object.particl); - writer.writeString(offsets[33], object.particlImage); - writer.writeString(offsets[34], object.particlImageSecondary); - writer.writeString(offsets[35], object.personaEasy); - writer.writeString(offsets[36], object.personaIncognito); - writer.writeString(offsets[37], object.receive); - writer.writeString(offsets[38], object.receiveCancelled); - writer.writeString(offsets[39], object.receivePending); - writer.writeString(offsets[40], object.send); - writer.writeString(offsets[41], object.sendCancelled); - writer.writeString(offsets[42], object.sendPending); - writer.writeString(offsets[43], object.stack); - writer.writeString(offsets[44], object.stackIcon); - writer.writeString(offsets[45], object.themePreview); - writer.writeString(offsets[46], object.themeSelector); - writer.writeString(offsets[47], object.txExchange); - writer.writeString(offsets[48], object.txExchangeFailed); - writer.writeString(offsets[49], object.txExchangePending); - writer.writeString(offsets[50], object.wownero); - writer.writeString(offsets[51], object.wowneroImage); - writer.writeString(offsets[52], object.wowneroImageSecondary); + writer.writeString(offsets[26], object.mimblewimblecoin); + writer.writeString(offsets[27], object.monero); + writer.writeString(offsets[28], object.moneroImage); + writer.writeString(offsets[29], object.moneroImageSecondary); + writer.writeString(offsets[30], object.namecoin); + writer.writeString(offsets[31], object.namecoinImage); + writer.writeString(offsets[32], object.namecoinImageSecondary); + writer.writeString(offsets[33], object.particl); + writer.writeString(offsets[34], object.particlImage); + writer.writeString(offsets[35], object.particlImageSecondary); + writer.writeString(offsets[36], object.personaEasy); + writer.writeString(offsets[37], object.personaIncognito); + writer.writeString(offsets[38], object.receive); + writer.writeString(offsets[39], object.receiveCancelled); + writer.writeString(offsets[40], object.receivePending); + writer.writeString(offsets[41], object.send); + writer.writeString(offsets[42], object.sendCancelled); + writer.writeString(offsets[43], object.sendPending); + writer.writeString(offsets[44], object.stack); + writer.writeString(offsets[45], object.stackIcon); + writer.writeString(offsets[46], object.themePreview); + writer.writeString(offsets[47], object.themeSelector); + writer.writeString(offsets[48], object.txExchange); + writer.writeString(offsets[49], object.txExchangeFailed); + writer.writeString(offsets[50], object.txExchangePending); + writer.writeString(offsets[51], object.wownero); + writer.writeString(offsets[52], object.wowneroImage); + writer.writeString(offsets[53], object.wowneroImageSecondary); } ThemeAssets _themeAssetsDeserialize( @@ -18456,33 +18781,34 @@ ThemeAssets _themeAssetsDeserialize( object.litecoinImage = reader.readString(offsets[23]); object.litecoinImageSecondary = reader.readString(offsets[24]); object.loadingGif = reader.readStringOrNull(offsets[25]); - object.monero = reader.readString(offsets[26]); - object.moneroImage = reader.readString(offsets[27]); - object.moneroImageSecondary = reader.readString(offsets[28]); - object.namecoin = reader.readString(offsets[29]); - object.namecoinImage = reader.readString(offsets[30]); - object.namecoinImageSecondary = reader.readString(offsets[31]); - object.particl = reader.readString(offsets[32]); - object.particlImage = reader.readString(offsets[33]); - object.particlImageSecondary = reader.readString(offsets[34]); - object.personaEasy = reader.readString(offsets[35]); - object.personaIncognito = reader.readString(offsets[36]); - object.receive = reader.readString(offsets[37]); - object.receiveCancelled = reader.readString(offsets[38]); - object.receivePending = reader.readString(offsets[39]); - object.send = reader.readString(offsets[40]); - object.sendCancelled = reader.readString(offsets[41]); - object.sendPending = reader.readString(offsets[42]); - object.stack = reader.readString(offsets[43]); - object.stackIcon = reader.readString(offsets[44]); - object.themePreview = reader.readString(offsets[45]); - object.themeSelector = reader.readString(offsets[46]); - object.txExchange = reader.readString(offsets[47]); - object.txExchangeFailed = reader.readString(offsets[48]); - object.txExchangePending = reader.readString(offsets[49]); - object.wownero = reader.readString(offsets[50]); - object.wowneroImage = reader.readString(offsets[51]); - object.wowneroImageSecondary = reader.readString(offsets[52]); + object.mimblewimblecoin = reader.readString(offsets[26]); + object.monero = reader.readString(offsets[27]); + object.moneroImage = reader.readString(offsets[28]); + object.moneroImageSecondary = reader.readString(offsets[29]); + object.namecoin = reader.readString(offsets[30]); + object.namecoinImage = reader.readString(offsets[31]); + object.namecoinImageSecondary = reader.readString(offsets[32]); + object.particl = reader.readString(offsets[33]); + object.particlImage = reader.readString(offsets[34]); + object.particlImageSecondary = reader.readString(offsets[35]); + object.personaEasy = reader.readString(offsets[36]); + object.personaIncognito = reader.readString(offsets[37]); + object.receive = reader.readString(offsets[38]); + object.receiveCancelled = reader.readString(offsets[39]); + object.receivePending = reader.readString(offsets[40]); + object.send = reader.readString(offsets[41]); + object.sendCancelled = reader.readString(offsets[42]); + object.sendPending = reader.readString(offsets[43]); + object.stack = reader.readString(offsets[44]); + object.stackIcon = reader.readString(offsets[45]); + object.themePreview = reader.readString(offsets[46]); + object.themeSelector = reader.readString(offsets[47]); + object.txExchange = reader.readString(offsets[48]); + object.txExchangeFailed = reader.readString(offsets[49]); + object.txExchangePending = reader.readString(offsets[50]); + object.wownero = reader.readString(offsets[51]); + object.wowneroImage = reader.readString(offsets[52]); + object.wowneroImageSecondary = reader.readString(offsets[53]); return object; } @@ -18599,6 +18925,8 @@ P _themeAssetsDeserializeProp

( return (reader.readString(offset)) as P; case 52: return (reader.readString(offset)) as P; + case 53: + return (reader.readString(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -18607,71 +18935,74 @@ P _themeAssetsDeserializeProp

( extension ThemeAssetsQueryFilter on QueryBuilder { QueryBuilder - backgroundIsNull() { + backgroundIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'background', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'background'), + ); }); } QueryBuilder - backgroundIsNotNull() { + backgroundIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'background', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'background'), + ); }); } QueryBuilder - backgroundEqualTo( - String? value, { - bool caseSensitive = true, - }) { + backgroundEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundGreaterThan( + backgroundGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundLessThan( + backgroundLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundBetween( + backgroundBetween( String? lower, String? upper, { bool includeLower = true, @@ -18679,84 +19010,86 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'background', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'background', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundStartsWith( - String value, { - bool caseSensitive = true, - }) { + backgroundStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundEndsWith( - String value, { - bool caseSensitive = true, - }) { + backgroundEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundContains(String value, {bool caseSensitive = true}) { + backgroundContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundMatches(String pattern, {bool caseSensitive = true}) { + backgroundMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'background', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'background', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundIsEmpty() { + backgroundIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'background', value: ''), + ); }); } QueryBuilder - backgroundIsNotEmpty() { + backgroundIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'background', value: ''), + ); }); } @@ -18765,27 +19098,31 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewGreaterThan( + bellNewGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18795,12 +19132,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18812,28 +19151,29 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bellNew', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bellNew', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewStartsWith( - String value, { - bool caseSensitive = true, - }) { + bellNewStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18842,55 +19182,61 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder bellNewContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder bellNewMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bellNew', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bellNew', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewIsEmpty() { + bellNewIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bellNew', value: ''), + ); }); } QueryBuilder - bellNewIsNotEmpty() { + bellNewIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bellNew', value: ''), + ); }); } @@ -18899,27 +19245,31 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinGreaterThan( + bitcoinGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18929,12 +19279,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18946,28 +19298,29 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoin', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoin', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinStartsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoinStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -18976,106 +19329,115 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder bitcoinContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder bitcoinMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoin', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoin', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinIsEmpty() { + bitcoinIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bitcoin', value: ''), + ); }); } QueryBuilder - bitcoinIsNotEmpty() { + bitcoinIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bitcoin', value: ''), + ); }); } QueryBuilder - bitcoinImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageGreaterThan( + bitcoinImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageLessThan( + bitcoinImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageBetween( + bitcoinImageBetween( String lower, String upper, { bool includeLower = true, @@ -19083,135 +19445,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoinImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoinImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageContains(String value, {bool caseSensitive = true}) { + bitcoinImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageMatches(String pattern, {bool caseSensitive = true}) { + bitcoinImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoinImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoinImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageIsEmpty() { + bitcoinImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bitcoinImage', value: ''), + ); }); } QueryBuilder - bitcoinImageIsNotEmpty() { + bitcoinImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bitcoinImage', value: ''), + ); }); } QueryBuilder - bitcoinImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryGreaterThan( + bitcoinImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryLessThan( + bitcoinImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryBetween( + bitcoinImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -19219,136 +19586,143 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoinImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoinImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoinImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryContains(String value, {bool caseSensitive = true}) { + bitcoinImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + bitcoinImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoinImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoinImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoinImageSecondaryIsEmpty() { + bitcoinImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bitcoinImageSecondary', value: ''), + ); }); } QueryBuilder - bitcoinImageSecondaryIsNotEmpty() { + bitcoinImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'bitcoinImageSecondary', + value: '', + ), + ); }); } QueryBuilder - bitcoincashEqualTo( - String value, { - bool caseSensitive = true, - }) { + bitcoincashEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashGreaterThan( + bitcoincashGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashLessThan( + bitcoincashLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashBetween( + bitcoincashBetween( String lower, String upper, { bool includeLower = true, @@ -19356,135 +19730,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoincash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoincash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashStartsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoincashStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashEndsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoincashEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashContains(String value, {bool caseSensitive = true}) { + bitcoincashContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoincash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoincash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashMatches(String pattern, {bool caseSensitive = true}) { + bitcoincashMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoincash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoincash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashIsEmpty() { + bitcoincashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bitcoincash', value: ''), + ); }); } QueryBuilder - bitcoincashIsNotEmpty() { + bitcoincashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoincash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bitcoincash', value: ''), + ); }); } QueryBuilder - bitcoincashImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + bitcoincashImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageGreaterThan( + bitcoincashImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageLessThan( + bitcoincashImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageBetween( + bitcoincashImageBetween( String lower, String upper, { bool includeLower = true, @@ -19492,135 +19871,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoincashImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoincashImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoincashImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoincashImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageContains(String value, {bool caseSensitive = true}) { + bitcoincashImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoincashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoincashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageMatches(String pattern, {bool caseSensitive = true}) { + bitcoincashImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoincashImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoincashImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageIsEmpty() { + bitcoincashImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincashImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bitcoincashImage', value: ''), + ); }); } QueryBuilder - bitcoincashImageIsNotEmpty() { + bitcoincashImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoincashImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bitcoincashImage', value: ''), + ); }); } QueryBuilder - bitcoincashImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + bitcoincashImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryGreaterThan( + bitcoincashImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryLessThan( + bitcoincashImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryBetween( + bitcoincashImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -19628,86 +20012,98 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bitcoincashImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bitcoincashImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryStartsWith( + bitcoincashImageSecondaryStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + bitcoincashImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryContains(String value, - {bool caseSensitive = true}) { + bitcoincashImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bitcoincashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bitcoincashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + bitcoincashImageSecondaryMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bitcoincashImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bitcoincashImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryIsEmpty() { + bitcoincashImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bitcoincashImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bitcoincashImageSecondary', + value: '', + ), + ); }); } QueryBuilder - bitcoincashImageSecondaryIsNotEmpty() { + bitcoincashImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bitcoincashImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'bitcoincashImageSecondary', + value: '', + ), + ); }); } @@ -19716,11 +20112,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19730,12 +20128,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19745,12 +20145,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19762,14 +20164,16 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19778,11 +20182,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19791,54 +20197,60 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder buyContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder buyMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'buy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'buy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder buyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'buy', value: ''), + ); }); } QueryBuilder - buyIsNotEmpty() { + buyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'buy', value: ''), + ); }); } @@ -19847,43 +20259,49 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinGreaterThan( + dogecoinGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinLessThan( + dogecoinLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -19895,136 +20313,142 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'dogecoin', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'dogecoin', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinStartsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinEndsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinContains(String value, {bool caseSensitive = true}) { + dogecoinContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'dogecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'dogecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder dogecoinMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'dogecoin', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'dogecoin', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinIsEmpty() { + dogecoinIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'dogecoin', value: ''), + ); }); } QueryBuilder - dogecoinIsNotEmpty() { + dogecoinIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'dogecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'dogecoin', value: ''), + ); }); } QueryBuilder - dogecoinImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageGreaterThan( + dogecoinImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageLessThan( + dogecoinImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageBetween( + dogecoinImageBetween( String lower, String upper, { bool includeLower = true, @@ -20032,135 +20456,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'dogecoinImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'dogecoinImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageContains(String value, {bool caseSensitive = true}) { + dogecoinImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'dogecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'dogecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageMatches(String pattern, {bool caseSensitive = true}) { + dogecoinImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'dogecoinImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'dogecoinImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageIsEmpty() { + dogecoinImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'dogecoinImage', value: ''), + ); }); } QueryBuilder - dogecoinImageIsNotEmpty() { + dogecoinImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'dogecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'dogecoinImage', value: ''), + ); }); } QueryBuilder - dogecoinImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryGreaterThan( + dogecoinImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryLessThan( + dogecoinImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryBetween( + dogecoinImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -20168,86 +20597,89 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'dogecoinImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'dogecoinImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + dogecoinImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryContains(String value, - {bool caseSensitive = true}) { + dogecoinImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'dogecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'dogecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + dogecoinImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'dogecoinImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'dogecoinImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dogecoinImageSecondaryIsEmpty() { + dogecoinImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'dogecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'dogecoinImageSecondary', value: ''), + ); }); } QueryBuilder - dogecoinImageSecondaryIsNotEmpty() { + dogecoinImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'dogecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'dogecoinImageSecondary', + value: '', + ), + ); }); } @@ -20256,43 +20688,49 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashGreaterThan( + epicCashGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashLessThan( + epicCashLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -20304,136 +20742,142 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'epicCash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'epicCash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashStartsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashEndsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashContains(String value, {bool caseSensitive = true}) { + epicCashContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'epicCash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'epicCash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder epicCashMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'epicCash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'epicCash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashIsEmpty() { + epicCashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'epicCash', value: ''), + ); }); } QueryBuilder - epicCashIsNotEmpty() { + epicCashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'epicCash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'epicCash', value: ''), + ); }); } QueryBuilder - epicCashImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + epicCashImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageGreaterThan( + epicCashImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageLessThan( + epicCashImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageBetween( + epicCashImageBetween( String lower, String upper, { bool includeLower = true, @@ -20441,135 +20885,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'epicCashImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'epicCashImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageContains(String value, {bool caseSensitive = true}) { + epicCashImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'epicCashImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'epicCashImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageMatches(String pattern, {bool caseSensitive = true}) { + epicCashImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'epicCashImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'epicCashImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageIsEmpty() { + epicCashImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCashImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'epicCashImage', value: ''), + ); }); } QueryBuilder - epicCashImageIsNotEmpty() { + epicCashImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'epicCashImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'epicCashImage', value: ''), + ); }); } QueryBuilder - epicCashImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + epicCashImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryGreaterThan( + epicCashImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryLessThan( + epicCashImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryBetween( + epicCashImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -20577,86 +21026,89 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'epicCashImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'epicCashImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + epicCashImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryContains(String value, - {bool caseSensitive = true}) { + epicCashImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'epicCashImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'epicCashImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + epicCashImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'epicCashImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'epicCashImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - epicCashImageSecondaryIsEmpty() { + epicCashImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'epicCashImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'epicCashImageSecondary', value: ''), + ); }); } QueryBuilder - epicCashImageSecondaryIsNotEmpty() { + epicCashImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'epicCashImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'epicCashImageSecondary', + value: '', + ), + ); }); } @@ -20665,43 +21117,49 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumGreaterThan( + ethereumGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumLessThan( + ethereumLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -20713,136 +21171,142 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethereum', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethereum', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumStartsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumEndsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumContains(String value, {bool caseSensitive = true}) { + ethereumContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'ethereum', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'ethereum', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder ethereumMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'ethereum', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'ethereum', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumIsEmpty() { + ethereumIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereum', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethereum', value: ''), + ); }); } QueryBuilder - ethereumIsNotEmpty() { + ethereumIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'ethereum', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'ethereum', value: ''), + ); }); } QueryBuilder - ethereumImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + ethereumImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageGreaterThan( + ethereumImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageLessThan( + ethereumImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageBetween( + ethereumImageBetween( String lower, String upper, { bool includeLower = true, @@ -20850,135 +21314,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethereumImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethereumImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageContains(String value, {bool caseSensitive = true}) { + ethereumImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'ethereumImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'ethereumImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageMatches(String pattern, {bool caseSensitive = true}) { + ethereumImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'ethereumImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'ethereumImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageIsEmpty() { + ethereumImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereumImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethereumImage', value: ''), + ); }); } QueryBuilder - ethereumImageIsNotEmpty() { + ethereumImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'ethereumImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'ethereumImage', value: ''), + ); }); } QueryBuilder - ethereumImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + ethereumImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryGreaterThan( + ethereumImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryLessThan( + ethereumImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryBetween( + ethereumImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -20986,86 +21455,89 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'ethereumImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'ethereumImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + ethereumImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryContains(String value, - {bool caseSensitive = true}) { + ethereumImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'ethereumImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'ethereumImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + ethereumImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'ethereumImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'ethereumImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - ethereumImageSecondaryIsEmpty() { + ethereumImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'ethereumImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'ethereumImageSecondary', value: ''), + ); }); } QueryBuilder - ethereumImageSecondaryIsNotEmpty() { + ethereumImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'ethereumImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'ethereumImageSecondary', + value: '', + ), + ); }); } @@ -21074,43 +21546,49 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeGreaterThan( + exchangeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeLessThan( + exchangeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21122,85 +21600,88 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'exchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'exchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeStartsWith( - String value, { - bool caseSensitive = true, - }) { + exchangeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeEndsWith( - String value, { - bool caseSensitive = true, - }) { + exchangeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeContains(String value, {bool caseSensitive = true}) { + exchangeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder exchangeMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'exchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'exchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeIsEmpty() { + exchangeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'exchange', value: ''), + ); }); } QueryBuilder - exchangeIsNotEmpty() { + exchangeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'exchange', value: ''), + ); }); } @@ -21209,11 +21690,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21223,12 +21706,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21238,12 +21723,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21255,14 +21742,16 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'firo', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'firo', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21271,11 +21760,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21284,105 +21775,114 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder firoContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'firo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'firo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder firoMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'firo', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'firo', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder firoIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firo', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'firo', value: ''), + ); }); } QueryBuilder - firoIsNotEmpty() { + firoIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'firo', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'firo', value: ''), + ); }); } QueryBuilder - firoImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + firoImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageGreaterThan( + firoImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageLessThan( + firoImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageBetween( + firoImageBetween( String lower, String upper, { bool includeLower = true, @@ -21390,135 +21890,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'firoImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'firoImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + firoImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + firoImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageContains(String value, {bool caseSensitive = true}) { + firoImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'firoImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'firoImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageMatches(String pattern, {bool caseSensitive = true}) { + firoImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'firoImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'firoImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageIsEmpty() { + firoImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firoImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'firoImage', value: ''), + ); }); } QueryBuilder - firoImageIsNotEmpty() { + firoImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'firoImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'firoImage', value: ''), + ); }); } QueryBuilder - firoImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + firoImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryGreaterThan( + firoImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryLessThan( + firoImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryBetween( + firoImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -21526,84 +22031,86 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'firoImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'firoImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + firoImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + firoImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryContains(String value, {bool caseSensitive = true}) { + firoImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'firoImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'firoImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { + firoImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'firoImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'firoImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - firoImageSecondaryIsEmpty() { + firoImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'firoImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'firoImageSecondary', value: ''), + ); }); } QueryBuilder - firoImageSecondaryIsNotEmpty() { + firoImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'firoImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'firoImageSecondary', value: ''), + ); }); } @@ -21612,43 +22119,49 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinGreaterThan( + litecoinGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinLessThan( + litecoinLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -21660,136 +22173,142 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'litecoin', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'litecoin', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinStartsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinEndsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinContains(String value, {bool caseSensitive = true}) { + litecoinContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'litecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'litecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder litecoinMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'litecoin', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'litecoin', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinIsEmpty() { + litecoinIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'litecoin', value: ''), + ); }); } QueryBuilder - litecoinIsNotEmpty() { + litecoinIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'litecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'litecoin', value: ''), + ); }); } QueryBuilder - litecoinImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + litecoinImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageGreaterThan( + litecoinImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageLessThan( + litecoinImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageBetween( + litecoinImageBetween( String lower, String upper, { bool includeLower = true, @@ -21797,135 +22316,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'litecoinImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'litecoinImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageContains(String value, {bool caseSensitive = true}) { + litecoinImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'litecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'litecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageMatches(String pattern, {bool caseSensitive = true}) { + litecoinImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'litecoinImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'litecoinImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageIsEmpty() { + litecoinImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'litecoinImage', value: ''), + ); }); } QueryBuilder - litecoinImageIsNotEmpty() { + litecoinImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'litecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'litecoinImage', value: ''), + ); }); } QueryBuilder - litecoinImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + litecoinImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryGreaterThan( + litecoinImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryLessThan( + litecoinImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryBetween( + litecoinImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -21933,155 +22457,161 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'litecoinImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'litecoinImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + litecoinImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryContains(String value, - {bool caseSensitive = true}) { + litecoinImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'litecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'litecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + litecoinImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'litecoinImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'litecoinImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - litecoinImageSecondaryIsEmpty() { + litecoinImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'litecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'litecoinImageSecondary', value: ''), + ); }); } QueryBuilder - litecoinImageSecondaryIsNotEmpty() { + litecoinImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'litecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'litecoinImageSecondary', + value: '', + ), + ); }); } QueryBuilder - loadingGifIsNull() { + loadingGifIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifIsNotNull() { + loadingGifIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifEqualTo( - String? value, { - bool caseSensitive = true, - }) { + loadingGifEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifGreaterThan( + loadingGifGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifLessThan( + loadingGifLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifBetween( + loadingGifBetween( String? lower, String? upper, { bool includeLower = true, @@ -22089,132 +22619,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'loadingGif', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'loadingGif', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifStartsWith( - String value, { - bool caseSensitive = true, - }) { + loadingGifStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifEndsWith( - String value, { - bool caseSensitive = true, - }) { + loadingGifEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifContains(String value, {bool caseSensitive = true}) { + loadingGifContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifMatches(String pattern, {bool caseSensitive = true}) { + loadingGifMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'loadingGif', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'loadingGif', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifIsEmpty() { + loadingGifIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'loadingGif', value: ''), + ); }); } QueryBuilder - loadingGifIsNotEmpty() { + loadingGifIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'loadingGif', value: ''), + ); }); } - QueryBuilder moneroEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + mimblewimblecoinEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroGreaterThan( + mimblewimblecoinGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder moneroLessThan( + QueryBuilder + mimblewimblecoinLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder moneroBetween( + QueryBuilder + mimblewimblecoinBetween( String lower, String upper, { bool includeLower = true, @@ -22222,136 +22760,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'monero', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'mimblewimblecoin', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroStartsWith( - String value, { - bool caseSensitive = true, - }) { + mimblewimblecoinStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder moneroEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + mimblewimblecoinEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder moneroContains( - String value, - {bool caseSensitive = true}) { + QueryBuilder + mimblewimblecoinContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'monero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'mimblewimblecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder moneroMatches( - String pattern, - {bool caseSensitive = true}) { + QueryBuilder + mimblewimblecoinMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'monero', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'mimblewimblecoin', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroIsEmpty() { + mimblewimblecoinIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'monero', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'mimblewimblecoin', value: ''), + ); }); } QueryBuilder - moneroIsNotEmpty() { + mimblewimblecoinIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'monero', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'mimblewimblecoin', value: ''), + ); }); } - QueryBuilder - moneroImageEqualTo( + QueryBuilder moneroEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageGreaterThan( + moneroGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - moneroImageLessThan( + QueryBuilder moneroLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - moneroImageBetween( + QueryBuilder moneroBetween( String lower, String upper, { bool includeLower = true, @@ -22359,135 +22901,146 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'moneroImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'monero', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + moneroStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - moneroImageEndsWith( + QueryBuilder moneroEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - moneroImageContains(String value, {bool caseSensitive = true}) { + QueryBuilder moneroContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'moneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'monero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - moneroImageMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder moneroMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'moneroImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'monero', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageIsEmpty() { + moneroIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'moneroImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'monero', value: ''), + ); }); } QueryBuilder - moneroImageIsNotEmpty() { + moneroIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'moneroImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'monero', value: ''), + ); }); } QueryBuilder - moneroImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + moneroImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryGreaterThan( + moneroImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryLessThan( + moneroImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryBetween( + moneroImageBetween( String lower, String upper, { bool includeLower = true, @@ -22495,133 +23048,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'moneroImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'moneroImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + moneroImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + moneroImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryContains(String value, {bool caseSensitive = true}) { + moneroImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'moneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'moneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { + moneroImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'moneroImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'moneroImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - moneroImageSecondaryIsEmpty() { + moneroImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'moneroImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'moneroImage', value: ''), + ); }); } QueryBuilder - moneroImageSecondaryIsNotEmpty() { + moneroImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'moneroImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'moneroImage', value: ''), + ); }); } - QueryBuilder namecoinEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + moneroImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinGreaterThan( + moneroImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinLessThan( + moneroImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder namecoinBetween( + QueryBuilder + moneroImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -22629,136 +23189,144 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'namecoin', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'moneroImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinStartsWith( - String value, { - bool caseSensitive = true, - }) { + moneroImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinEndsWith( - String value, { - bool caseSensitive = true, - }) { + moneroImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinContains(String value, {bool caseSensitive = true}) { + moneroImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'namecoin', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'moneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder namecoinMatches( - String pattern, - {bool caseSensitive = true}) { + QueryBuilder + moneroImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'namecoin', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'moneroImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinIsEmpty() { + moneroImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'moneroImageSecondary', value: ''), + ); }); } QueryBuilder - namecoinIsNotEmpty() { + moneroImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'namecoin', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'moneroImageSecondary', + value: '', + ), + ); }); } - QueryBuilder - namecoinImageEqualTo( + QueryBuilder namecoinEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageGreaterThan( + namecoinGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageLessThan( + namecoinLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - namecoinImageBetween( + QueryBuilder namecoinBetween( String lower, String upper, { bool includeLower = true, @@ -22766,135 +23334,142 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'namecoinImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'namecoin', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + namecoinStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + namecoinEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageContains(String value, {bool caseSensitive = true}) { + namecoinContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'namecoinImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'namecoin', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - namecoinImageMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder namecoinMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'namecoinImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'namecoin', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageIsEmpty() { + namecoinIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'namecoin', value: ''), + ); }); } QueryBuilder - namecoinImageIsNotEmpty() { + namecoinIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'namecoinImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'namecoin', value: ''), + ); }); } QueryBuilder - namecoinImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + namecoinImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryGreaterThan( + namecoinImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryLessThan( + namecoinImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryBetween( + namecoinImageBetween( String lower, String upper, { bool includeLower = true, @@ -22902,134 +23477,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'namecoinImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'namecoinImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + namecoinImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + namecoinImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryContains(String value, - {bool caseSensitive = true}) { + namecoinImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'namecoinImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'namecoinImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + namecoinImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'namecoinImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'namecoinImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - namecoinImageSecondaryIsEmpty() { + namecoinImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'namecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'namecoinImage', value: ''), + ); }); } QueryBuilder - namecoinImageSecondaryIsNotEmpty() { + namecoinImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'namecoinImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'namecoinImage', value: ''), + ); }); } - QueryBuilder particlEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + namecoinImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlGreaterThan( + namecoinImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder particlLessThan( + QueryBuilder + namecoinImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder particlBetween( + QueryBuilder + namecoinImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -23037,136 +23618,143 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'particl', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'namecoinImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlStartsWith( - String value, { - bool caseSensitive = true, - }) { + namecoinImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder particlEndsWith( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + namecoinImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder particlContains( - String value, - {bool caseSensitive = true}) { + QueryBuilder + namecoinImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'particl', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'namecoinImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder particlMatches( - String pattern, - {bool caseSensitive = true}) { + QueryBuilder + namecoinImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'particl', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'namecoinImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlIsEmpty() { + namecoinImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particl', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'namecoinImageSecondary', value: ''), + ); }); } QueryBuilder - particlIsNotEmpty() { + namecoinImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'particl', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'namecoinImageSecondary', + value: '', + ), + ); }); } - QueryBuilder - particlImageEqualTo( + QueryBuilder particlEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageGreaterThan( + particlGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - particlImageLessThan( + QueryBuilder particlLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - particlImageBetween( + QueryBuilder particlBetween( String lower, String upper, { bool includeLower = true, @@ -23174,135 +23762,146 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'particlImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'particl', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + particlStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - particlImageEndsWith( + QueryBuilder particlEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - particlImageContains(String value, {bool caseSensitive = true}) { + QueryBuilder particlContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'particlImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'particl', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder - particlImageMatches(String pattern, {bool caseSensitive = true}) { + QueryBuilder particlMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'particlImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'particl', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageIsEmpty() { + particlIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particlImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'particl', value: ''), + ); }); } QueryBuilder - particlImageIsNotEmpty() { + particlIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'particlImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'particl', value: ''), + ); }); } QueryBuilder - particlImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + particlImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryGreaterThan( + particlImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryLessThan( + particlImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryBetween( + particlImageBetween( String lower, String upper, { bool includeLower = true, @@ -23310,136 +23909,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'particlImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'particlImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + particlImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + particlImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryContains(String value, {bool caseSensitive = true}) { + particlImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'particlImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'particlImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + particlImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'particlImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'particlImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - particlImageSecondaryIsEmpty() { + particlImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'particlImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'particlImage', value: ''), + ); }); } QueryBuilder - particlImageSecondaryIsNotEmpty() { + particlImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'particlImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'particlImage', value: ''), + ); }); } QueryBuilder - personaEasyEqualTo( - String value, { - bool caseSensitive = true, - }) { + particlImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyGreaterThan( + particlImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyLessThan( + particlImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyBetween( + particlImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -23447,135 +24050,143 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaEasy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'particlImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyStartsWith( - String value, { - bool caseSensitive = true, - }) { + particlImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyEndsWith( - String value, { - bool caseSensitive = true, - }) { + particlImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyContains(String value, {bool caseSensitive = true}) { + particlImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'particlImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyMatches(String pattern, {bool caseSensitive = true}) { + particlImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaEasy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'particlImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyIsEmpty() { + particlImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'particlImageSecondary', value: ''), + ); }); } QueryBuilder - personaEasyIsNotEmpty() { + particlImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'particlImageSecondary', + value: '', + ), + ); }); } QueryBuilder - personaIncognitoEqualTo( - String value, { - bool caseSensitive = true, - }) { + personaEasyEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoGreaterThan( + personaEasyGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoLessThan( + personaEasyLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoBetween( + personaEasyBetween( String lower, String upper, { bool includeLower = true, @@ -23583,132 +24194,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaIncognito', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaEasy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoStartsWith( - String value, { - bool caseSensitive = true, - }) { + personaEasyStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoEndsWith( - String value, { - bool caseSensitive = true, - }) { + personaEasyEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoContains(String value, {bool caseSensitive = true}) { + personaEasyContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoMatches(String pattern, {bool caseSensitive = true}) { + personaEasyMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaIncognito', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaEasy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoIsEmpty() { + personaEasyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaEasy', value: ''), + ); }); } QueryBuilder - personaIncognitoIsNotEmpty() { + personaEasyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaEasy', value: ''), + ); }); } - QueryBuilder receiveEqualTo( - String value, { - bool caseSensitive = true, - }) { + QueryBuilder + personaIncognitoEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveGreaterThan( + personaIncognitoGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder receiveLessThan( + QueryBuilder + personaIncognitoLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } - QueryBuilder receiveBetween( + QueryBuilder + personaIncognitoBetween( String lower, String upper, { bool includeLower = true, @@ -23716,28 +24335,170 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receive', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaIncognito', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + personaIncognitoStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + personaIncognitoEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveStartsWith( + personaIncognitoContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + personaIncognitoMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaIncognito', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + personaIncognitoIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaIncognito', value: ''), + ); + }); + } + + QueryBuilder + personaIncognitoIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaIncognito', value: ''), + ); + }); + } + + QueryBuilder receiveEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + receiveGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder receiveLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder receiveBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.between( + property: r'receive', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + receiveStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -23746,106 +24507,115 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder receiveContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder receiveMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receive', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receive', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveIsEmpty() { + receiveIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveIsNotEmpty() { + receiveIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveCancelledEqualTo( - String value, { - bool caseSensitive = true, - }) { + receiveCancelledEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledGreaterThan( + receiveCancelledGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledLessThan( + receiveCancelledLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledBetween( + receiveCancelledBetween( String lower, String upper, { bool includeLower = true, @@ -23853,135 +24623,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receiveCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receiveCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledStartsWith( - String value, { - bool caseSensitive = true, - }) { + receiveCancelledStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledEndsWith( - String value, { - bool caseSensitive = true, - }) { + receiveCancelledEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledContains(String value, {bool caseSensitive = true}) { + receiveCancelledContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledMatches(String pattern, {bool caseSensitive = true}) { + receiveCancelledMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receiveCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receiveCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledIsEmpty() { + receiveCancelledIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receiveCancelledIsNotEmpty() { + receiveCancelledIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receivePendingEqualTo( - String value, { - bool caseSensitive = true, - }) { + receivePendingEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingGreaterThan( + receivePendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingLessThan( + receivePendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingBetween( + receivePendingBetween( String lower, String upper, { bool includeLower = true, @@ -23989,84 +24764,86 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receivePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receivePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingStartsWith( - String value, { - bool caseSensitive = true, - }) { + receivePendingStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingEndsWith( - String value, { - bool caseSensitive = true, - }) { + receivePendingEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingContains(String value, {bool caseSensitive = true}) { + receivePendingContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingMatches(String pattern, {bool caseSensitive = true}) { + receivePendingMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receivePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receivePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingIsEmpty() { + receivePendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receivePending', value: ''), + ); }); } QueryBuilder - receivePendingIsNotEmpty() { + receivePendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receivePending', value: ''), + ); }); } @@ -24075,11 +24852,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24089,12 +24868,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24104,12 +24885,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24121,14 +24904,16 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'send', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'send', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24137,11 +24922,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24150,105 +24937,114 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder sendContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder sendMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'send', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'send', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder sendIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'send', value: ''), + ); }); } QueryBuilder - sendIsNotEmpty() { + sendIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'send', value: ''), + ); }); } QueryBuilder - sendCancelledEqualTo( - String value, { - bool caseSensitive = true, - }) { + sendCancelledEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledGreaterThan( + sendCancelledGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledLessThan( + sendCancelledLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledBetween( + sendCancelledBetween( String lower, String upper, { bool includeLower = true, @@ -24256,135 +25052,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledStartsWith( - String value, { - bool caseSensitive = true, - }) { + sendCancelledStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledEndsWith( - String value, { - bool caseSensitive = true, - }) { + sendCancelledEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledContains(String value, {bool caseSensitive = true}) { + sendCancelledContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledMatches(String pattern, {bool caseSensitive = true}) { + sendCancelledMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledIsEmpty() { + sendCancelledIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendCancelledIsNotEmpty() { + sendCancelledIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendPendingEqualTo( - String value, { - bool caseSensitive = true, - }) { + sendPendingEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingGreaterThan( + sendPendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingLessThan( + sendPendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingBetween( + sendPendingBetween( String lower, String upper, { bool includeLower = true, @@ -24392,84 +25193,86 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendPending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendPending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingStartsWith( - String value, { - bool caseSensitive = true, - }) { + sendPendingStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingEndsWith( - String value, { - bool caseSensitive = true, - }) { + sendPendingEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingContains(String value, {bool caseSensitive = true}) { + sendPendingContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingMatches(String pattern, {bool caseSensitive = true}) { + sendPendingMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendPending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendPending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingIsEmpty() { + sendPendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendPending', value: ''), + ); }); } QueryBuilder - sendPendingIsNotEmpty() { + sendPendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendPending', value: ''), + ); }); } @@ -24478,27 +25281,31 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackGreaterThan( + stackGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24508,12 +25315,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24525,14 +25334,16 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stack', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stack', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24541,11 +25352,13 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -24554,105 +25367,114 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder stackContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder stackMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stack', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'stack', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder stackIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stack', value: ''), + ); }); } QueryBuilder - stackIsNotEmpty() { + stackIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stack', value: ''), + ); }); } QueryBuilder - stackIconEqualTo( - String value, { - bool caseSensitive = true, - }) { + stackIconEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconGreaterThan( + stackIconGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconLessThan( + stackIconLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconBetween( + stackIconBetween( String lower, String upper, { bool includeLower = true, @@ -24660,135 +25482,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackIcon', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackIcon', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconStartsWith( - String value, { - bool caseSensitive = true, - }) { + stackIconStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconEndsWith( - String value, { - bool caseSensitive = true, - }) { + stackIconEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconContains(String value, {bool caseSensitive = true}) { + stackIconContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconMatches(String pattern, {bool caseSensitive = true}) { + stackIconMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stackIcon', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'stackIcon', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconIsEmpty() { + stackIconIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - stackIconIsNotEmpty() { + stackIconIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - themePreviewEqualTo( - String value, { - bool caseSensitive = true, - }) { + themePreviewEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewGreaterThan( + themePreviewGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewLessThan( + themePreviewLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewBetween( + themePreviewBetween( String lower, String upper, { bool includeLower = true, @@ -24796,135 +25623,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themePreview', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themePreview', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewStartsWith( - String value, { - bool caseSensitive = true, - }) { + themePreviewStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewEndsWith( - String value, { - bool caseSensitive = true, - }) { + themePreviewEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewContains(String value, {bool caseSensitive = true}) { + themePreviewContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewMatches(String pattern, {bool caseSensitive = true}) { + themePreviewMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themePreview', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'themePreview', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewIsEmpty() { + themePreviewIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themePreviewIsNotEmpty() { + themePreviewIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themeSelectorEqualTo( - String value, { - bool caseSensitive = true, - }) { + themeSelectorEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorGreaterThan( + themeSelectorGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorLessThan( + themeSelectorLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorBetween( + themeSelectorBetween( String lower, String upper, { bool includeLower = true, @@ -24932,135 +25764,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themeSelector', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themeSelector', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorStartsWith( - String value, { - bool caseSensitive = true, - }) { + themeSelectorStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorEndsWith( - String value, { - bool caseSensitive = true, - }) { + themeSelectorEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorContains(String value, {bool caseSensitive = true}) { + themeSelectorContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorMatches(String pattern, {bool caseSensitive = true}) { + themeSelectorMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themeSelector', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'themeSelector', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorIsEmpty() { + themeSelectorIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - themeSelectorIsNotEmpty() { + themeSelectorIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - txExchangeEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeGreaterThan( + txExchangeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeLessThan( + txExchangeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeBetween( + txExchangeBetween( String lower, String upper, { bool includeLower = true, @@ -25068,135 +25905,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeStartsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeContains(String value, {bool caseSensitive = true}) { + txExchangeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeMatches(String pattern, {bool caseSensitive = true}) { + txExchangeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeIsEmpty() { + txExchangeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeIsNotEmpty() { + txExchangeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeFailedEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangeFailedEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedGreaterThan( + txExchangeFailedGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedLessThan( + txExchangeFailedLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedBetween( + txExchangeFailedBetween( String lower, String upper, { bool includeLower = true, @@ -25204,135 +26046,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangeFailed', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangeFailed', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedStartsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeFailedStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeFailedEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedContains(String value, {bool caseSensitive = true}) { + txExchangeFailedContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedMatches(String pattern, {bool caseSensitive = true}) { + txExchangeFailedMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangeFailed', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangeFailed', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedIsEmpty() { + txExchangeFailedIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangeFailedIsNotEmpty() { + txExchangeFailedIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangePendingEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangePendingEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingGreaterThan( + txExchangePendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingLessThan( + txExchangePendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingBetween( + txExchangePendingBetween( String lower, String upper, { bool includeLower = true, @@ -25340,84 +26187,86 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingStartsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangePendingStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangePendingEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingContains(String value, {bool caseSensitive = true}) { + txExchangePendingContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingMatches(String pattern, {bool caseSensitive = true}) { + txExchangePendingMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingIsEmpty() { + txExchangePendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangePending', value: ''), + ); }); } QueryBuilder - txExchangePendingIsNotEmpty() { + txExchangePendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangePending', value: ''), + ); }); } @@ -25426,27 +26275,31 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroGreaterThan( + wowneroGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -25456,12 +26309,14 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -25473,28 +26328,29 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'wownero', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'wownero', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroStartsWith( - String value, { - bool caseSensitive = true, - }) { + wowneroStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -25503,106 +26359,115 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder wowneroContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'wownero', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'wownero', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder wowneroMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'wownero', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'wownero', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroIsEmpty() { + wowneroIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wownero', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'wownero', value: ''), + ); }); } QueryBuilder - wowneroIsNotEmpty() { + wowneroIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'wownero', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'wownero', value: ''), + ); }); } QueryBuilder - wowneroImageEqualTo( - String value, { - bool caseSensitive = true, - }) { + wowneroImageEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageGreaterThan( + wowneroImageGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageLessThan( + wowneroImageLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageBetween( + wowneroImageBetween( String lower, String upper, { bool includeLower = true, @@ -25610,135 +26475,140 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'wowneroImage', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'wowneroImage', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageStartsWith( - String value, { - bool caseSensitive = true, - }) { + wowneroImageStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageEndsWith( - String value, { - bool caseSensitive = true, - }) { + wowneroImageEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageContains(String value, {bool caseSensitive = true}) { + wowneroImageContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'wowneroImage', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'wowneroImage', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageMatches(String pattern, {bool caseSensitive = true}) { + wowneroImageMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'wowneroImage', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'wowneroImage', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageIsEmpty() { + wowneroImageIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wowneroImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'wowneroImage', value: ''), + ); }); } QueryBuilder - wowneroImageIsNotEmpty() { + wowneroImageIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'wowneroImage', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'wowneroImage', value: ''), + ); }); } QueryBuilder - wowneroImageSecondaryEqualTo( - String value, { - bool caseSensitive = true, - }) { + wowneroImageSecondaryEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryGreaterThan( + wowneroImageSecondaryGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryLessThan( + wowneroImageSecondaryLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryBetween( + wowneroImageSecondaryBetween( String lower, String upper, { bool includeLower = true, @@ -25746,85 +26616,89 @@ extension ThemeAssetsQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'wowneroImageSecondary', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'wowneroImageSecondary', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryStartsWith( - String value, { - bool caseSensitive = true, - }) { + wowneroImageSecondaryStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryEndsWith( - String value, { - bool caseSensitive = true, - }) { + wowneroImageSecondaryEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryContains(String value, {bool caseSensitive = true}) { + wowneroImageSecondaryContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'wowneroImageSecondary', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'wowneroImageSecondary', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryMatches(String pattern, - {bool caseSensitive = true}) { + wowneroImageSecondaryMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'wowneroImageSecondary', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'wowneroImageSecondary', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - wowneroImageSecondaryIsEmpty() { + wowneroImageSecondaryIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'wowneroImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'wowneroImageSecondary', value: ''), + ); }); } QueryBuilder - wowneroImageSecondaryIsNotEmpty() { + wowneroImageSecondaryIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'wowneroImageSecondary', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'wowneroImageSecondary', + value: '', + ), + ); }); } } @@ -25844,16 +26718,8 @@ const ThemeAssetsV2Schema = Schema( name: r'background', type: IsarType.string, ), - r'bellNew': PropertySchema( - id: 1, - name: r'bellNew', - type: IsarType.string, - ), - r'buy': PropertySchema( - id: 2, - name: r'buy', - type: IsarType.string, - ), + r'bellNew': PropertySchema(id: 1, name: r'bellNew', type: IsarType.string), + r'buy': PropertySchema(id: 2, name: r'buy', type: IsarType.string), r'coinIconsString': PropertySchema( id: 3, name: r'coinIconsString', @@ -25894,11 +26760,7 @@ const ThemeAssetsV2Schema = Schema( name: r'personaIncognito', type: IsarType.string, ), - r'receive': PropertySchema( - id: 11, - name: r'receive', - type: IsarType.string, - ), + r'receive': PropertySchema(id: 11, name: r'receive', type: IsarType.string), r'receiveCancelled': PropertySchema( id: 12, name: r'receiveCancelled', @@ -25909,11 +26771,7 @@ const ThemeAssetsV2Schema = Schema( name: r'receivePending', type: IsarType.string, ), - r'send': PropertySchema( - id: 14, - name: r'send', - type: IsarType.string, - ), + r'send': PropertySchema(id: 14, name: r'send', type: IsarType.string), r'sendCancelled': PropertySchema( id: 15, name: r'sendCancelled', @@ -25924,11 +26782,7 @@ const ThemeAssetsV2Schema = Schema( name: r'sendPending', type: IsarType.string, ), - r'stack': PropertySchema( - id: 17, - name: r'stack', - type: IsarType.string, - ), + r'stack': PropertySchema(id: 17, name: r'stack', type: IsarType.string), r'stackIcon': PropertySchema( id: 18, name: r'stackIcon', @@ -25958,8 +26812,9 @@ const ThemeAssetsV2Schema = Schema( id: 23, name: r'txExchangePending', type: IsarType.string, - ) + ), }, + estimateSize: _themeAssetsV2EstimateSize, serialize: _themeAssetsV2Serialize, deserialize: _themeAssetsV2Deserialize, @@ -26138,71 +26993,74 @@ P _themeAssetsV2DeserializeProp

( extension ThemeAssetsV2QueryFilter on QueryBuilder { QueryBuilder - backgroundIsNull() { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'background', - )); - }); - } - - QueryBuilder - backgroundIsNotNull() { + backgroundIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'background', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'background'), + ); }); } QueryBuilder - backgroundEqualTo( - String? value, { - bool caseSensitive = true, - }) { + backgroundIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'background'), + ); }); } QueryBuilder - backgroundGreaterThan( + backgroundEqualTo(String? value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + backgroundGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundLessThan( + backgroundLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundBetween( + backgroundBetween( String? lower, String? upper, { bool includeLower = true, @@ -26210,135 +27068,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'background', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'background', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + backgroundStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + backgroundEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + backgroundContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'background', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + backgroundMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'background', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundIsEmpty() { + backgroundIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'background', value: ''), + ); }); } QueryBuilder - backgroundIsNotEmpty() { + backgroundIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'background', value: ''), + ); }); } QueryBuilder - bellNewEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + bellNewEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewGreaterThan( + bellNewGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewLessThan( + bellNewLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewBetween( + bellNewBetween( String lower, String upper, { bool includeLower = true, @@ -26346,84 +27209,86 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bellNew', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bellNew', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + bellNewStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + bellNewEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + bellNewContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bellNew', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + bellNewMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'bellNew', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewIsEmpty() { + bellNewIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bellNew', value: ''), + ); }); } QueryBuilder - bellNewIsNotEmpty() { + bellNewIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bellNew', value: ''), + ); }); } @@ -26432,27 +27297,31 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyGreaterThan( + buyGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -26462,12 +27331,14 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -26479,28 +27350,29 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + buyStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -26509,106 +27381,115 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder buyContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder buyMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'buy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'buy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyIsEmpty() { + buyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'buy', value: ''), + ); }); } QueryBuilder - buyIsNotEmpty() { + buyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'buy', value: ''), + ); }); } QueryBuilder - coinIconsStringEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + coinIconsStringEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringGreaterThan( + coinIconsStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringLessThan( + coinIconsStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringBetween( + coinIconsStringBetween( String lower, String upper, { bool includeLower = true, @@ -26616,135 +27497,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinIconsString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinIconsString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + coinIconsStringStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + coinIconsStringEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + coinIconsStringContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinIconsString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + coinIconsStringMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinIconsString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringIsEmpty() { + coinIconsStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinIconsString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinIconsString', value: ''), + ); }); } QueryBuilder - coinIconsStringIsNotEmpty() { + coinIconsStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinIconsString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinIconsString', value: ''), + ); }); } QueryBuilder - coinImagesStringEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinImagesStringEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringGreaterThan( + coinImagesStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringLessThan( + coinImagesStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringBetween( + coinImagesStringBetween( String lower, String upper, { bool includeLower = true, @@ -26752,135 +27638,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinImagesString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinImagesStringStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinImagesStringEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinImagesStringContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinImagesString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + coinImagesStringMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringIsEmpty() { + coinImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinImagesString', value: ''), + ); }); } QueryBuilder - coinImagesStringIsNotEmpty() { + coinImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinImagesString', value: ''), + ); }); } QueryBuilder - coinPlaceholderEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + coinPlaceholderEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderGreaterThan( + coinPlaceholderGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderLessThan( + coinPlaceholderLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderBetween( + coinPlaceholderBetween( String lower, String upper, { bool includeLower = true, @@ -26888,135 +27779,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinPlaceholder', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinPlaceholder', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + coinPlaceholderStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + coinPlaceholderEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + coinPlaceholderContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinPlaceholder', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + coinPlaceholderMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinPlaceholder', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderIsEmpty() { + coinPlaceholderIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinPlaceholder', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinPlaceholder', value: ''), + ); }); } QueryBuilder - coinPlaceholderIsNotEmpty() { + coinPlaceholderIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinPlaceholder', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinPlaceholder', value: ''), + ); }); } QueryBuilder - coinSecondaryImagesStringEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinSecondaryImagesStringEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringGreaterThan( + coinSecondaryImagesStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringLessThan( + coinSecondaryImagesStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringBetween( + coinSecondaryImagesStringBetween( String lower, String upper, { bool includeLower = true, @@ -27024,137 +27920,152 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinSecondaryImagesString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinSecondaryImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringStartsWith( + coinSecondaryImagesStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinSecondaryImagesStringEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringContains(String value, - {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + coinSecondaryImagesStringContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringMatches(String pattern, - {bool caseSensitive = true}) { + coinSecondaryImagesStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinSecondaryImagesString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinSecondaryImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringIsEmpty() { + coinSecondaryImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinSecondaryImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinSecondaryImagesString', + value: '', + ), + ); }); } QueryBuilder - coinSecondaryImagesStringIsNotEmpty() { + coinSecondaryImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinSecondaryImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'coinSecondaryImagesString', + value: '', + ), + ); }); } QueryBuilder - exchangeEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + exchangeEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeGreaterThan( + exchangeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeLessThan( + exchangeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeBetween( + exchangeBetween( String lower, String upper, { bool includeLower = true, @@ -27162,153 +28073,158 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'exchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'exchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + exchangeStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + exchangeEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + exchangeContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'exchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + exchangeMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'exchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeIsEmpty() { + exchangeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'exchange', value: ''), + ); }); } QueryBuilder - exchangeIsNotEmpty() { + exchangeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'exchange', value: ''), + ); }); } QueryBuilder - loadingGifIsNull() { + loadingGifIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifIsNotNull() { + loadingGifIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifEqualTo( - String? value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + loadingGifEqualTo(String? value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifGreaterThan( + loadingGifGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifLessThan( + loadingGifLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifBetween( + loadingGifBetween( String? lower, String? upper, { bool includeLower = true, @@ -27316,135 +28232,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'loadingGif', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'loadingGif', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + loadingGifStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + loadingGifEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + loadingGifContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'loadingGif', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + loadingGifMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'loadingGif', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifIsEmpty() { + loadingGifIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'loadingGif', value: ''), + ); }); } QueryBuilder - loadingGifIsNotEmpty() { + loadingGifIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'loadingGif', value: ''), + ); }); } QueryBuilder - personaEasyEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + personaEasyEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyGreaterThan( + personaEasyGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyLessThan( + personaEasyLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyBetween( + personaEasyBetween( String lower, String upper, { bool includeLower = true, @@ -27452,135 +28373,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaEasy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaEasy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + personaEasyStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + personaEasyEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + personaEasyContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaEasy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + personaEasyMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaEasy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyIsEmpty() { + personaEasyIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaEasy', value: ''), + ); }); } QueryBuilder - personaEasyIsNotEmpty() { + personaEasyIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaEasy', value: ''), + ); }); } QueryBuilder - personaIncognitoEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + personaIncognitoEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoGreaterThan( + personaIncognitoGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoLessThan( + personaIncognitoLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoBetween( + personaIncognitoBetween( String lower, String upper, { bool includeLower = true, @@ -27588,135 +28514,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaIncognito', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaIncognito', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + personaIncognitoStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + personaIncognitoEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + personaIncognitoContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaIncognito', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + personaIncognitoMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaIncognito', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoIsEmpty() { + personaIncognitoIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaIncognito', value: ''), + ); }); } QueryBuilder - personaIncognitoIsNotEmpty() { + personaIncognitoIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaIncognito', value: ''), + ); }); } QueryBuilder - receiveEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + receiveEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveGreaterThan( + receiveGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveLessThan( + receiveLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveBetween( + receiveBetween( String lower, String upper, { bool includeLower = true, @@ -27724,135 +28655,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receive', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receive', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + receiveStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + receiveEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + receiveContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receive', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + receiveMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'receive', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveIsEmpty() { + receiveIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveIsNotEmpty() { + receiveIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveCancelledEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + receiveCancelledEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledGreaterThan( + receiveCancelledGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledLessThan( + receiveCancelledLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledBetween( + receiveCancelledBetween( String lower, String upper, { bool includeLower = true, @@ -27860,135 +28796,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receiveCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receiveCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + receiveCancelledStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + receiveCancelledEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + receiveCancelledContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receiveCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + receiveCancelledMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'receiveCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledIsEmpty() { + receiveCancelledIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receiveCancelledIsNotEmpty() { + receiveCancelledIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receivePendingEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + receivePendingEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingGreaterThan( + receivePendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingLessThan( + receivePendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingBetween( + receivePendingBetween( String lower, String upper, { bool includeLower = true, @@ -27996,84 +28937,86 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receivePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receivePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + receivePendingStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + receivePendingEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + receivePendingContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receivePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + receivePendingMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'receivePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingIsEmpty() { + receivePendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receivePending', value: ''), + ); }); } QueryBuilder - receivePendingIsNotEmpty() { + receivePendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receivePending', value: ''), + ); }); } @@ -28082,43 +29025,49 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendGreaterThan( + sendGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendLessThan( + sendLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -28130,136 +29079,142 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'send', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'send', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + sendStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + sendEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + sendContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder sendMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'send', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'send', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendIsEmpty() { + sendIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'send', value: ''), + ); }); } QueryBuilder - sendIsNotEmpty() { + sendIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'send', value: ''), + ); }); } QueryBuilder - sendCancelledEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + sendCancelledEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledGreaterThan( + sendCancelledGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledLessThan( + sendCancelledLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledBetween( + sendCancelledBetween( String lower, String upper, { bool includeLower = true, @@ -28267,135 +29222,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + sendCancelledStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + sendCancelledEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + sendCancelledContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + sendCancelledMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledIsEmpty() { + sendCancelledIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendCancelledIsNotEmpty() { + sendCancelledIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendPendingEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + sendPendingEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingGreaterThan( + sendPendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingLessThan( + sendPendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingBetween( + sendPendingBetween( String lower, String upper, { bool includeLower = true, @@ -28403,135 +29363,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendPending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendPending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + sendPendingStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + sendPendingEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + sendPendingContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendPending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + sendPendingMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendPending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingIsEmpty() { + sendPendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendPending', value: ''), + ); }); } QueryBuilder - sendPendingIsNotEmpty() { + sendPendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendPending', value: ''), + ); }); } QueryBuilder - stackEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + stackEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackGreaterThan( + stackGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackLessThan( + stackLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackBetween( + stackBetween( String lower, String upper, { bool includeLower = true, @@ -28539,135 +29504,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stack', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stack', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + stackStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + stackEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + stackContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stack', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + stackMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'stack', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIsEmpty() { + stackIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stack', value: ''), + ); }); } QueryBuilder - stackIsNotEmpty() { + stackIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stack', value: ''), + ); }); } QueryBuilder - stackIconEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + stackIconEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconGreaterThan( + stackIconGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconLessThan( + stackIconLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconBetween( + stackIconBetween( String lower, String upper, { bool includeLower = true, @@ -28675,135 +29645,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackIcon', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackIcon', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + stackIconStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + stackIconEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + stackIconContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stackIcon', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + stackIconMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'stackIcon', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconIsEmpty() { + stackIconIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - stackIconIsNotEmpty() { + stackIconIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - themePreviewEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + themePreviewEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewGreaterThan( + themePreviewGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewLessThan( + themePreviewLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewBetween( + themePreviewBetween( String lower, String upper, { bool includeLower = true, @@ -28811,135 +29786,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themePreview', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themePreview', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + themePreviewStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + themePreviewEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + themePreviewContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themePreview', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + themePreviewMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'themePreview', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewIsEmpty() { + themePreviewIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themePreviewIsNotEmpty() { + themePreviewIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themeSelectorEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + themeSelectorEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorGreaterThan( + themeSelectorGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorLessThan( + themeSelectorLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorBetween( + themeSelectorBetween( String lower, String upper, { bool includeLower = true, @@ -28947,135 +29927,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themeSelector', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themeSelector', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + themeSelectorStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + themeSelectorEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + themeSelectorContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themeSelector', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + themeSelectorMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'themeSelector', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorIsEmpty() { + themeSelectorIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - themeSelectorIsNotEmpty() { + themeSelectorIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - txExchangeEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeGreaterThan( + txExchangeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeLessThan( + txExchangeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeBetween( + txExchangeBetween( String lower, String upper, { bool includeLower = true, @@ -29083,135 +30068,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + txExchangeMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeIsEmpty() { + txExchangeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeIsNotEmpty() { + txExchangeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeFailedEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeFailedEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedGreaterThan( + txExchangeFailedGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedLessThan( + txExchangeFailedLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedBetween( + txExchangeFailedBetween( String lower, String upper, { bool includeLower = true, @@ -29219,135 +30209,140 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangeFailed', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangeFailed', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeFailedStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeFailedEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + txExchangeFailedContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangeFailed', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + txExchangeFailedMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangeFailed', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedIsEmpty() { + txExchangeFailedIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangeFailedIsNotEmpty() { + txExchangeFailedIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangePendingEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + txExchangePendingEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingGreaterThan( + txExchangePendingGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingLessThan( + txExchangePendingLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingBetween( + txExchangePendingBetween( String lower, String upper, { bool includeLower = true, @@ -29355,84 +30350,86 @@ extension ThemeAssetsV2QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + txExchangePendingStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + txExchangePendingEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + txExchangePendingContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + txExchangePendingMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingIsEmpty() { + txExchangePendingIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangePending', value: ''), + ); }); } QueryBuilder - txExchangePendingIsNotEmpty() { + txExchangePendingIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangePending', value: ''), + ); }); } } @@ -29446,22 +30443,14 @@ extension ThemeAssetsV2QueryObject const ThemeAssetsV3Schema = Schema( name: r'ThemeAssetsV3', id: -8828098514594684151, - properties: { - r'background': PropertySchema( - id: 0, - name: r'background', - type: IsarType.string, - ), - r'bellNew': PropertySchema( - id: 1, - name: r'bellNew', - type: IsarType.string, - ), - r'buy': PropertySchema( - id: 2, - name: r'buy', + properties: { + r'background': PropertySchema( + id: 0, + name: r'background', type: IsarType.string, ), + r'bellNew': PropertySchema(id: 1, name: r'bellNew', type: IsarType.string), + r'buy': PropertySchema(id: 2, name: r'buy', type: IsarType.string), r'coinCardImagesString': PropertySchema( id: 3, name: r'coinCardImagesString', @@ -29522,11 +30511,7 @@ const ThemeAssetsV3Schema = Schema( name: r'personaIncognito', type: IsarType.string, ), - r'receive': PropertySchema( - id: 15, - name: r'receive', - type: IsarType.string, - ), + r'receive': PropertySchema(id: 15, name: r'receive', type: IsarType.string), r'receiveCancelled': PropertySchema( id: 16, name: r'receiveCancelled', @@ -29537,11 +30522,7 @@ const ThemeAssetsV3Schema = Schema( name: r'receivePending', type: IsarType.string, ), - r'send': PropertySchema( - id: 18, - name: r'send', - type: IsarType.string, - ), + r'send': PropertySchema(id: 18, name: r'send', type: IsarType.string), r'sendCancelled': PropertySchema( id: 19, name: r'sendCancelled', @@ -29552,11 +30533,7 @@ const ThemeAssetsV3Schema = Schema( name: r'sendPending', type: IsarType.string, ), - r'stack': PropertySchema( - id: 21, - name: r'stack', - type: IsarType.string, - ), + r'stack': PropertySchema(id: 21, name: r'stack', type: IsarType.string), r'stackIcon': PropertySchema( id: 22, name: r'stackIcon', @@ -29586,8 +30563,9 @@ const ThemeAssetsV3Schema = Schema( id: 27, name: r'txExchangePending', type: IsarType.string, - ) + ), }, + estimateSize: _themeAssetsV3EstimateSize, serialize: _themeAssetsV3Serialize, deserialize: _themeAssetsV3Deserialize, @@ -29806,71 +30784,74 @@ P _themeAssetsV3DeserializeProp

( extension ThemeAssetsV3QueryFilter on QueryBuilder { QueryBuilder - backgroundRelativeIsNull() { + backgroundRelativeIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'background', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'background'), + ); }); } QueryBuilder - backgroundRelativeIsNotNull() { + backgroundRelativeIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'background', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'background'), + ); }); } QueryBuilder - backgroundRelativeEqualTo( - String? value, { - bool caseSensitive = true, - }) { + backgroundRelativeEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeGreaterThan( + backgroundRelativeGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeLessThan( + backgroundRelativeLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeBetween( + backgroundRelativeBetween( String? lower, String? upper, { bool includeLower = true, @@ -29878,135 +30859,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'background', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'background', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + backgroundRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + backgroundRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeContains(String value, {bool caseSensitive = true}) { + backgroundRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'background', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'background', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeMatches(String pattern, {bool caseSensitive = true}) { + backgroundRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'background', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'background', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - backgroundRelativeIsEmpty() { + backgroundRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'background', value: ''), + ); }); } QueryBuilder - backgroundRelativeIsNotEmpty() { + backgroundRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'background', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'background', value: ''), + ); }); } QueryBuilder - bellNewRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + bellNewRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeGreaterThan( + bellNewRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeLessThan( + bellNewRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeBetween( + bellNewRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -30014,135 +31000,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'bellNew', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'bellNew', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + bellNewRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + bellNewRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeContains(String value, {bool caseSensitive = true}) { + bellNewRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'bellNew', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'bellNew', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeMatches(String pattern, {bool caseSensitive = true}) { + bellNewRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'bellNew', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'bellNew', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - bellNewRelativeIsEmpty() { + bellNewRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'bellNew', value: ''), + ); }); } QueryBuilder - bellNewRelativeIsNotEmpty() { + bellNewRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'bellNew', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'bellNew', value: ''), + ); }); } QueryBuilder - buyRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + buyRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeGreaterThan( + buyRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeLessThan( + buyRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeBetween( + buyRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -30150,153 +31141,158 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'buy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'buy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + buyRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + buyRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeContains(String value, {bool caseSensitive = true}) { + buyRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'buy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeMatches(String pattern, {bool caseSensitive = true}) { + buyRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'buy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'buy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - buyRelativeIsEmpty() { + buyRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'buy', value: ''), + ); }); } QueryBuilder - buyRelativeIsNotEmpty() { + buyRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'buy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'buy', value: ''), + ); }); } QueryBuilder - coinCardImagesStringIsNull() { + coinCardImagesStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'coinCardImagesString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'coinCardImagesString'), + ); }); } QueryBuilder - coinCardImagesStringIsNotNull() { + coinCardImagesStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'coinCardImagesString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'coinCardImagesString'), + ); }); } QueryBuilder - coinCardImagesStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + coinCardImagesStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringGreaterThan( + coinCardImagesStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringLessThan( + coinCardImagesStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringBetween( + coinCardImagesStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -30304,135 +31300,143 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinCardImagesString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinCardImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinCardImagesStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinCardImagesStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringContains(String value, {bool caseSensitive = true}) { + coinCardImagesStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinCardImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringMatches(String pattern, {bool caseSensitive = true}) { + coinCardImagesStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinCardImagesString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinCardImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardImagesStringIsEmpty() { + coinCardImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinCardImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinCardImagesString', value: ''), + ); }); } QueryBuilder - coinCardImagesStringIsNotEmpty() { + coinCardImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinCardImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'coinCardImagesString', + value: '', + ), + ); }); } QueryBuilder - coinIconsStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + coinIconsStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringGreaterThan( + coinIconsStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringLessThan( + coinIconsStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringBetween( + coinIconsStringBetween( String lower, String upper, { bool includeLower = true, @@ -30440,135 +31444,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinIconsString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinIconsString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinIconsStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinIconsStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringContains(String value, {bool caseSensitive = true}) { + coinIconsStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinIconsString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinIconsString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringMatches(String pattern, {bool caseSensitive = true}) { + coinIconsStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinIconsString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinIconsString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinIconsStringIsEmpty() { + coinIconsStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinIconsString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinIconsString', value: ''), + ); }); } QueryBuilder - coinIconsStringIsNotEmpty() { + coinIconsStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinIconsString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinIconsString', value: ''), + ); }); } QueryBuilder - coinImagesStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + coinImagesStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringGreaterThan( + coinImagesStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringLessThan( + coinImagesStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringBetween( + coinImagesStringBetween( String lower, String upper, { bool includeLower = true, @@ -30576,135 +31585,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinImagesString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinImagesStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinImagesStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringContains(String value, {bool caseSensitive = true}) { + coinImagesStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringMatches(String pattern, {bool caseSensitive = true}) { + coinImagesStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinImagesString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinImagesStringIsEmpty() { + coinImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinImagesString', value: ''), + ); }); } QueryBuilder - coinImagesStringIsNotEmpty() { + coinImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinImagesString', value: ''), + ); }); } QueryBuilder - coinPlaceholderRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + coinPlaceholderRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeGreaterThan( + coinPlaceholderRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeLessThan( + coinPlaceholderRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeBetween( + coinPlaceholderRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -30712,137 +31726,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinPlaceholder', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinPlaceholder', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinPlaceholderRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinPlaceholderRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeContains(String value, - {bool caseSensitive = true}) { + coinPlaceholderRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinPlaceholder', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinPlaceholder', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeMatches(String pattern, - {bool caseSensitive = true}) { + coinPlaceholderRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinPlaceholder', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinPlaceholder', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinPlaceholderRelativeIsEmpty() { + coinPlaceholderRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinPlaceholder', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinPlaceholder', value: ''), + ); }); } QueryBuilder - coinPlaceholderRelativeIsNotEmpty() { + coinPlaceholderRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinPlaceholder', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinPlaceholder', value: ''), + ); }); } QueryBuilder - coinSecondaryImagesStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + coinSecondaryImagesStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringGreaterThan( + coinSecondaryImagesStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringLessThan( + coinSecondaryImagesStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringBetween( + coinSecondaryImagesStringBetween( String lower, String upper, { bool includeLower = true, @@ -30850,137 +31867,152 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinSecondaryImagesString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinSecondaryImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringStartsWith( + coinSecondaryImagesStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + coinSecondaryImagesStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringContains(String value, - {bool caseSensitive = true}) { + coinSecondaryImagesStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinSecondaryImagesString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinSecondaryImagesString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringMatches(String pattern, - {bool caseSensitive = true}) { + coinSecondaryImagesStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinSecondaryImagesString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinSecondaryImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinSecondaryImagesStringIsEmpty() { + coinSecondaryImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinSecondaryImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinSecondaryImagesString', + value: '', + ), + ); }); } QueryBuilder - coinSecondaryImagesStringIsNotEmpty() { + coinSecondaryImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinSecondaryImagesString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'coinSecondaryImagesString', + value: '', + ), + ); }); } QueryBuilder - exchangeRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + exchangeRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeGreaterThan( + exchangeRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeLessThan( + exchangeRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeBetween( + exchangeRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -30988,153 +32020,158 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'exchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'exchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + exchangeRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + exchangeRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeContains(String value, {bool caseSensitive = true}) { + exchangeRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'exchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'exchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeMatches(String pattern, {bool caseSensitive = true}) { + exchangeRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'exchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'exchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - exchangeRelativeIsEmpty() { + exchangeRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'exchange', value: ''), + ); }); } QueryBuilder - exchangeRelativeIsNotEmpty() { + exchangeRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'exchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'exchange', value: ''), + ); }); } QueryBuilder - loadingGifRelativeIsNull() { + loadingGifRelativeIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifRelativeIsNotNull() { + loadingGifRelativeIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'loadingGif', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'loadingGif'), + ); }); } QueryBuilder - loadingGifRelativeEqualTo( - String? value, { - bool caseSensitive = true, - }) { + loadingGifRelativeEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeGreaterThan( + loadingGifRelativeGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeLessThan( + loadingGifRelativeLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeBetween( + loadingGifRelativeBetween( String? lower, String? upper, { bool includeLower = true, @@ -31142,153 +32179,161 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'loadingGif', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'loadingGif', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + loadingGifRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + loadingGifRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeContains(String value, {bool caseSensitive = true}) { + loadingGifRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'loadingGif', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'loadingGif', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeMatches(String pattern, {bool caseSensitive = true}) { + loadingGifRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'loadingGif', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'loadingGif', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - loadingGifRelativeIsEmpty() { + loadingGifRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'loadingGif', value: ''), + ); }); } QueryBuilder - loadingGifRelativeIsNotEmpty() { + loadingGifRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'loadingGif', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'loadingGif', value: ''), + ); }); } QueryBuilder - coinCardFavoritesImagesStringIsNull() { + coinCardFavoritesImagesStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherStringParam1', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherStringParam1'), + ); }); } QueryBuilder - coinCardFavoritesImagesStringIsNotNull() { + coinCardFavoritesImagesStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherStringParam1', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherStringParam1'), + ); }); } QueryBuilder - coinCardFavoritesImagesStringEqualTo( + coinCardFavoritesImagesStringEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringGreaterThan( + coinCardFavoritesImagesStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringLessThan( + coinCardFavoritesImagesStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringBetween( + coinCardFavoritesImagesStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -31296,155 +32341,170 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherStringParam1', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherStringParam1', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringStartsWith( + coinCardFavoritesImagesStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringEndsWith( + coinCardFavoritesImagesStringEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringContains(String value, - {bool caseSensitive = true}) { + coinCardFavoritesImagesStringContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherStringParam1', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringMatches(String pattern, - {bool caseSensitive = true}) { + coinCardFavoritesImagesStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherStringParam1', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherStringParam1', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinCardFavoritesImagesStringIsEmpty() { + coinCardFavoritesImagesStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam1', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherStringParam1', value: ''), + ); }); } QueryBuilder - coinCardFavoritesImagesStringIsNotEmpty() { + coinCardFavoritesImagesStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherStringParam1', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherStringParam1', value: ''), + ); }); } QueryBuilder - dummy2IsNull() { + dummy2IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherStringParam2', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherStringParam2'), + ); }); } QueryBuilder - dummy2IsNotNull() { + dummy2IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherStringParam2', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherStringParam2'), + ); }); } QueryBuilder - dummy2EqualTo( - String? value, { - bool caseSensitive = true, - }) { + dummy2EqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2GreaterThan( + dummy2GreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2LessThan( + dummy2LessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2Between( + dummy2Between( String? lower, String? upper, { bool includeLower = true, @@ -31452,153 +32512,158 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherStringParam2', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherStringParam2', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2StartsWith( - String value, { - bool caseSensitive = true, - }) { + dummy2StartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2EndsWith( - String value, { - bool caseSensitive = true, - }) { + dummy2EndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2Contains(String value, {bool caseSensitive = true}) { + dummy2Contains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherStringParam2', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2Matches(String pattern, {bool caseSensitive = true}) { + dummy2Matches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherStringParam2', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherStringParam2', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy2IsEmpty() { + dummy2IsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam2', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherStringParam2', value: ''), + ); }); } QueryBuilder - dummy2IsNotEmpty() { + dummy2IsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherStringParam2', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherStringParam2', value: ''), + ); }); } QueryBuilder - dummy3IsNull() { + dummy3IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherStringParam3', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherStringParam3'), + ); }); } QueryBuilder - dummy3IsNotNull() { + dummy3IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherStringParam3', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherStringParam3'), + ); }); } QueryBuilder - dummy3EqualTo( - String? value, { - bool caseSensitive = true, - }) { + dummy3EqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3GreaterThan( + dummy3GreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3LessThan( + dummy3LessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3Between( + dummy3Between( String? lower, String? upper, { bool includeLower = true, @@ -31606,135 +32671,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherStringParam3', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherStringParam3', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3StartsWith( - String value, { - bool caseSensitive = true, - }) { + dummy3StartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3EndsWith( - String value, { - bool caseSensitive = true, - }) { + dummy3EndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3Contains(String value, {bool caseSensitive = true}) { + dummy3Contains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherStringParam3', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3Matches(String pattern, {bool caseSensitive = true}) { + dummy3Matches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherStringParam3', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherStringParam3', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - dummy3IsEmpty() { + dummy3IsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherStringParam3', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherStringParam3', value: ''), + ); }); } QueryBuilder - dummy3IsNotEmpty() { + dummy3IsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherStringParam3', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'otherStringParam3', value: ''), + ); }); } QueryBuilder - personaEasyRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + personaEasyRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeGreaterThan( + personaEasyRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeLessThan( + personaEasyRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeBetween( + personaEasyRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -31742,135 +32812,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaEasy', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaEasy', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + personaEasyRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + personaEasyRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeContains(String value, {bool caseSensitive = true}) { + personaEasyRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaEasy', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaEasy', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeMatches(String pattern, {bool caseSensitive = true}) { + personaEasyRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaEasy', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaEasy', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaEasyRelativeIsEmpty() { + personaEasyRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaEasy', value: ''), + ); }); } QueryBuilder - personaEasyRelativeIsNotEmpty() { + personaEasyRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaEasy', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaEasy', value: ''), + ); }); } QueryBuilder - personaIncognitoRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + personaIncognitoRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeGreaterThan( + personaIncognitoRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeLessThan( + personaIncognitoRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeBetween( + personaIncognitoRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -31878,137 +32953,143 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'personaIncognito', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'personaIncognito', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeStartsWith( + personaIncognitoRelativeStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + personaIncognitoRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeContains(String value, - {bool caseSensitive = true}) { + personaIncognitoRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'personaIncognito', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'personaIncognito', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeMatches(String pattern, - {bool caseSensitive = true}) { + personaIncognitoRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'personaIncognito', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'personaIncognito', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - personaIncognitoRelativeIsEmpty() { + personaIncognitoRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'personaIncognito', value: ''), + ); }); } QueryBuilder - personaIncognitoRelativeIsNotEmpty() { + personaIncognitoRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'personaIncognito', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'personaIncognito', value: ''), + ); }); } QueryBuilder - receiveRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + receiveRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeGreaterThan( + receiveRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeLessThan( + receiveRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeBetween( + receiveRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32016,135 +33097,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receive', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receive', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + receiveRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + receiveRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeContains(String value, {bool caseSensitive = true}) { + receiveRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receive', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receive', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeMatches(String pattern, {bool caseSensitive = true}) { + receiveRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receive', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receive', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveRelativeIsEmpty() { + receiveRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveRelativeIsNotEmpty() { + receiveRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receive', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receive', value: ''), + ); }); } QueryBuilder - receiveCancelledRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + receiveCancelledRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeGreaterThan( + receiveCancelledRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeLessThan( + receiveCancelledRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeBetween( + receiveCancelledRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32152,137 +33238,143 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receiveCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receiveCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeStartsWith( + receiveCancelledRelativeStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + receiveCancelledRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeContains(String value, - {bool caseSensitive = true}) { + receiveCancelledRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receiveCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receiveCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeMatches(String pattern, - {bool caseSensitive = true}) { + receiveCancelledRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receiveCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receiveCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receiveCancelledRelativeIsEmpty() { + receiveCancelledRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receiveCancelledRelativeIsNotEmpty() { + receiveCancelledRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receiveCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receiveCancelled', value: ''), + ); }); } QueryBuilder - receivePendingRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + receivePendingRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeGreaterThan( + receivePendingRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeLessThan( + receivePendingRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeBetween( + receivePendingRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32290,137 +33382,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'receivePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'receivePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + receivePendingRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + receivePendingRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeContains(String value, - {bool caseSensitive = true}) { + receivePendingRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'receivePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'receivePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeMatches(String pattern, - {bool caseSensitive = true}) { + receivePendingRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'receivePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'receivePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - receivePendingRelativeIsEmpty() { + receivePendingRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'receivePending', value: ''), + ); }); } QueryBuilder - receivePendingRelativeIsNotEmpty() { + receivePendingRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'receivePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'receivePending', value: ''), + ); }); } QueryBuilder - sendRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + sendRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeGreaterThan( + sendRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeLessThan( + sendRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeBetween( + sendRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32428,135 +33523,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'send', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'send', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + sendRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + sendRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeContains(String value, {bool caseSensitive = true}) { + sendRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'send', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'send', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeMatches(String pattern, {bool caseSensitive = true}) { + sendRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'send', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'send', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendRelativeIsEmpty() { + sendRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'send', value: ''), + ); }); } QueryBuilder - sendRelativeIsNotEmpty() { + sendRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'send', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'send', value: ''), + ); }); } QueryBuilder - sendCancelledRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + sendCancelledRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeGreaterThan( + sendCancelledRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeLessThan( + sendCancelledRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeBetween( + sendCancelledRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32564,136 +33664,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendCancelled', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendCancelled', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + sendCancelledRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + sendCancelledRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeContains(String value, {bool caseSensitive = true}) { + sendCancelledRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendCancelled', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendCancelled', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeMatches(String pattern, - {bool caseSensitive = true}) { + sendCancelledRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendCancelled', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendCancelled', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendCancelledRelativeIsEmpty() { + sendCancelledRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendCancelledRelativeIsNotEmpty() { + sendCancelledRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendCancelled', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendCancelled', value: ''), + ); }); } QueryBuilder - sendPendingRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + sendPendingRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeGreaterThan( + sendPendingRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeLessThan( + sendPendingRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeBetween( + sendPendingRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32701,135 +33805,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'sendPending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'sendPending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + sendPendingRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + sendPendingRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeContains(String value, {bool caseSensitive = true}) { + sendPendingRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'sendPending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'sendPending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeMatches(String pattern, {bool caseSensitive = true}) { + sendPendingRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'sendPending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'sendPending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - sendPendingRelativeIsEmpty() { + sendPendingRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'sendPending', value: ''), + ); }); } QueryBuilder - sendPendingRelativeIsNotEmpty() { + sendPendingRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'sendPending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'sendPending', value: ''), + ); }); } QueryBuilder - stackRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + stackRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeGreaterThan( + stackRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeLessThan( + stackRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeBetween( + stackRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32837,135 +33946,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stack', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stack', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + stackRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + stackRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeContains(String value, {bool caseSensitive = true}) { + stackRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stack', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'stack', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeMatches(String pattern, {bool caseSensitive = true}) { + stackRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stack', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'stack', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackRelativeIsEmpty() { + stackRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stack', value: ''), + ); }); } QueryBuilder - stackRelativeIsNotEmpty() { + stackRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stack', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stack', value: ''), + ); }); } QueryBuilder - stackIconRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + stackIconRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeGreaterThan( + stackIconRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeLessThan( + stackIconRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeBetween( + stackIconRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -32973,135 +34087,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'stackIcon', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'stackIcon', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + stackIconRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + stackIconRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeContains(String value, {bool caseSensitive = true}) { + stackIconRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'stackIcon', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'stackIcon', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeMatches(String pattern, {bool caseSensitive = true}) { + stackIconRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'stackIcon', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'stackIcon', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - stackIconRelativeIsEmpty() { + stackIconRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - stackIconRelativeIsNotEmpty() { + stackIconRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'stackIcon', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'stackIcon', value: ''), + ); }); } QueryBuilder - themePreviewRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + themePreviewRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeGreaterThan( + themePreviewRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeLessThan( + themePreviewRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeBetween( + themePreviewRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -33109,135 +34228,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themePreview', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themePreview', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + themePreviewRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + themePreviewRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeContains(String value, {bool caseSensitive = true}) { + themePreviewRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themePreview', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'themePreview', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeMatches(String pattern, {bool caseSensitive = true}) { + themePreviewRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themePreview', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'themePreview', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themePreviewRelativeIsEmpty() { + themePreviewRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themePreviewRelativeIsNotEmpty() { + themePreviewRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themePreview', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themePreview', value: ''), + ); }); } QueryBuilder - themeSelectorRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + themeSelectorRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeGreaterThan( + themeSelectorRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeLessThan( + themeSelectorRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeBetween( + themeSelectorRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -33245,136 +34369,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'themeSelector', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'themeSelector', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + themeSelectorRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + themeSelectorRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeContains(String value, {bool caseSensitive = true}) { + themeSelectorRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'themeSelector', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'themeSelector', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeMatches(String pattern, - {bool caseSensitive = true}) { + themeSelectorRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'themeSelector', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'themeSelector', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - themeSelectorRelativeIsEmpty() { + themeSelectorRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - themeSelectorRelativeIsNotEmpty() { + themeSelectorRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'themeSelector', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'themeSelector', value: ''), + ); }); } QueryBuilder - txExchangeRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangeRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeGreaterThan( + txExchangeRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeLessThan( + txExchangeRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeBetween( + txExchangeRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -33382,135 +34510,140 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchange', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchange', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeStartsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeRelativeStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeContains(String value, {bool caseSensitive = true}) { + txExchangeRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchange', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchange', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeMatches(String pattern, {bool caseSensitive = true}) { + txExchangeRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchange', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchange', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeRelativeIsEmpty() { + txExchangeRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeRelativeIsNotEmpty() { + txExchangeRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchange', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchange', value: ''), + ); }); } QueryBuilder - txExchangeFailedRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangeFailedRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeGreaterThan( + txExchangeFailedRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeLessThan( + txExchangeFailedRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeBetween( + txExchangeFailedRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -33518,137 +34651,143 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangeFailed', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangeFailed', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeStartsWith( + txExchangeFailedRelativeStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangeFailedRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeContains(String value, - {bool caseSensitive = true}) { + txExchangeFailedRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangeFailed', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangeFailed', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeMatches(String pattern, - {bool caseSensitive = true}) { + txExchangeFailedRelativeMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangeFailed', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangeFailed', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangeFailedRelativeIsEmpty() { + txExchangeFailedRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangeFailedRelativeIsNotEmpty() { + txExchangeFailedRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangeFailed', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangeFailed', value: ''), + ); }); } QueryBuilder - txExchangePendingRelativeEqualTo( - String value, { - bool caseSensitive = true, - }) { + txExchangePendingRelativeEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeGreaterThan( + txExchangePendingRelativeGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeLessThan( + txExchangePendingRelativeLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeBetween( + txExchangePendingRelativeBetween( String lower, String upper, { bool includeLower = true, @@ -33656,86 +34795,92 @@ extension ThemeAssetsV3QueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txExchangePending', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txExchangePending', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeStartsWith( + txExchangePendingRelativeStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeEndsWith( - String value, { - bool caseSensitive = true, - }) { + txExchangePendingRelativeEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeContains(String value, - {bool caseSensitive = true}) { + txExchangePendingRelativeContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txExchangePending', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txExchangePending', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeMatches(String pattern, - {bool caseSensitive = true}) { + txExchangePendingRelativeMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txExchangePending', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txExchangePending', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - txExchangePendingRelativeIsEmpty() { + txExchangePendingRelativeIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txExchangePending', value: ''), + ); }); } QueryBuilder - txExchangePendingRelativeIsNotEmpty() { + txExchangePendingRelativeIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txExchangePending', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txExchangePending', value: ''), + ); }); } } diff --git a/lib/models/lelantus_coin.dart b/lib/models/lelantus_coin.dart index 6dbce0b4a..a009b2892 100644 --- a/lib/models/lelantus_coin.dart +++ b/lib/models/lelantus_coin.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part 'type_adaptors/lelantus_coin.g.dart'; diff --git a/lib/models/mwc_slatepack_models.dart b/lib/models/mwc_slatepack_models.dart new file mode 100644 index 000000000..8b5c05b83 --- /dev/null +++ b/lib/models/mwc_slatepack_models.dart @@ -0,0 +1,116 @@ +class SlatepackResult { + final bool success; + final String? error; + final String? slatepack; + final String? slateJson; + final bool? wasEncrypted; + final String? recipientAddress; + + SlatepackResult({ + required this.success, + this.error, + this.slatepack, + this.slateJson, + this.wasEncrypted, + this.recipientAddress, + }); + + @override + String toString() { + return "SlatepackResult(" + "success: $success, " + "error: $error, " + "slatepack: $slatepack, " + "slateJson: $slateJson, " + "wasEncrypted: $wasEncrypted, " + "recipientAddress: $recipientAddress" + ")"; + } +} + +class SlatepackDecodeResult { + final bool success; + final String? error; + final String? slateJson; + final bool? wasEncrypted; + final String? senderAddress; + final String? recipientAddress; + + SlatepackDecodeResult({ + required this.success, + this.error, + this.slateJson, + this.wasEncrypted, + this.senderAddress, + this.recipientAddress, + }); + + @override + String toString() { + return "SlatepackDecodeResult(" + "success: $success, " + "error: $error, " + "slateJson: $slateJson, " + "wasEncrypted: $wasEncrypted, " + "senderAddress: $senderAddress, " + "recipientAddress: $recipientAddress" + ")"; + } +} + +class ReceiveResult { + final bool success; + final String? error; + final String? slateId; + final String? commitId; + final String? responseSlatepack; + final bool? wasEncrypted; + final String? recipientAddress; + + ReceiveResult({ + required this.success, + this.error, + this.slateId, + this.commitId, + this.responseSlatepack, + this.wasEncrypted, + this.recipientAddress, + }); + + @override + String toString() { + return "ReceiveResult(" + "success: $success, " + "error: $error, " + "slateId: $slateId, " + "commitId: $commitId, " + "responseSlatepack: $responseSlatepack, " + "wasEncrypted: $wasEncrypted, " + "recipientAddress: $recipientAddress" + ")"; + } +} + +class FinalizeResult { + final bool success; + final String? error; + final String? slateId; + final String? commitId; + + FinalizeResult({ + required this.success, + this.error, + this.slateId, + this.commitId, + }); + + @override + String toString() { + return "FinalizeResult(" + "success: $success, " + "error: $error, " + "slateId: $slateId, " + "commitId: $commitId" + ")"; + } +} diff --git a/lib/models/mwcmqs_config_model.dart b/lib/models/mwcmqs_config_model.dart new file mode 100644 index 000000000..eb37702f5 --- /dev/null +++ b/lib/models/mwcmqs_config_model.dart @@ -0,0 +1,73 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import 'dart:convert'; + +import 'package:hive_ce/hive.dart'; + +import 'mwcmqs_server_model.dart'; + +part 'type_adaptors/mwcmqs_config_model.g.dart'; + +@HiveType(typeId: 82) +class MwcMqsConfigModel { + @HiveField(1) + final String host; + @HiveField(2) + final int? port; + + MwcMqsConfigModel({required this.host, this.port}); + + MwcMqsConfigModel copyWith({int? port, bool? protocolInsecure}) { + return MwcMqsConfigModel(host: host, port: this.port ?? 443); + } + + Map toMap() { + final Map map = {}; + map['mwcmqs_domain'] = host; + map['mwcmqs_port'] = port; + return map; + } + + Map toJson() { + return {'mwcmqs_domain': host, 'mwcmqs_port': port}; + } + + @override + String toString() { + return json.encode(toJson()); + } + + static MwcMqsConfigModel fromString(String MwcMqsConfigString) { + final dynamic _mwcmqs = json.decode(MwcMqsConfigString); + + final oldDomain = _mwcmqs["domain"] ?? "empty"; + if (oldDomain != "empty") { + _mwcmqs['mwcmqs_domain'] = _mwcmqs['domain']; + } + final oldPort = _mwcmqs["port"] ?? "empty"; + if (oldPort != "empty") { + _mwcmqs['mwcmqs_port'] = _mwcmqs['port']; + } + + return MwcMqsConfigModel( + host: _mwcmqs['mwcmqs_domain'] as String, + port: _mwcmqs['mwcmqs_port'] as int, + ); + } + + static MwcMqsConfigModel fromServer( + MwcMqsServerModel server, { + bool? protocolInsecure, + int? addressIndex, + }) { + return MwcMqsConfigModel(host: server.host, port: server.port ?? 443); + } +} diff --git a/lib/models/mwcmqs_server_model.dart b/lib/models/mwcmqs_server_model.dart new file mode 100644 index 000000000..9b5bd5d27 --- /dev/null +++ b/lib/models/mwcmqs_server_model.dart @@ -0,0 +1,93 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import 'package:hive_ce/hive.dart'; + +part 'type_adaptors/mwcmqs_server_model.g.dart'; + +@HiveType(typeId: 81) +class MwcMqsServerModel { + @HiveField(0) + final String id; + @HiveField(1) + final String host; + @HiveField(2) + final int? port; + @HiveField(3) + final String name; + @HiveField(4) + final bool? useSSL; + @HiveField(5) + final bool? enabled; + @HiveField(6) + final bool? isFailover; + @HiveField(7) + final bool? isDown; + + MwcMqsServerModel({ + required this.id, + required this.host, + this.port, + required this.name, + this.useSSL, + this.enabled, + this.isFailover, + this.isDown, + }); + + MwcMqsServerModel copyWith({ + String? host, + int? port, + String? name, + bool? useSSL, + bool? enabled, + bool? isFailover, + bool? isDown, + }) { + return MwcMqsServerModel( + id: id, + host: host ?? this.host, + port: port ?? this.port, + name: name ?? this.name, + useSSL: useSSL ?? this.useSSL, + enabled: enabled ?? this.enabled, + isFailover: isFailover ?? this.isFailover, + isDown: isDown ?? this.isDown, + ); + } + + Map toMap() { + final Map map = {}; + map['id'] = id; + map['host'] = host; + map['port'] = port; + map['name'] = name; + map['useSSL'] = useSSL; + map['enabled'] = enabled; + map['isFailover'] = isFailover; + map['isDown'] = isDown; + return map; + } + + bool get isDefault => id.startsWith("default_"); + + Map toJson() { + return { + 'id': id, + 'host': host, + 'port': port, + 'name': name, + 'useSSL': useSSL, + 'enabled': enabled, + 'isFailover': isFailover, + 'isDown': isDown, + }; + } +} diff --git a/lib/models/node_model.dart b/lib/models/node_model.dart index 1224d7e5b..5d43d84db 100644 --- a/lib/models/node_model.dart +++ b/lib/models/node_model.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import '../utilities/default_nodes.dart'; import '../utilities/flutter_secure_storage_interface.dart'; diff --git a/lib/models/notification_model.dart b/lib/models/notification_model.dart index 54a7a6787..aa56f24c0 100644 --- a/lib/models/notification_model.dart +++ b/lib/models/notification_model.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part 'type_adaptors/notification_model.g.dart'; diff --git a/lib/models/paymint/transactions_model.dart b/lib/models/paymint/transactions_model.dart index 6cea6f1ce..e9bbcffdf 100644 --- a/lib/models/paymint/transactions_model.dart +++ b/lib/models/paymint/transactions_model.dart @@ -10,7 +10,7 @@ import 'package:dart_numerics/dart_numerics.dart'; import 'package:decimal/decimal.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part '../type_adaptors/transactions_model.g.dart'; @@ -236,7 +236,8 @@ class Transaction { return Transaction( txid: json['txid'] as String, confirmedStatus: json['confirmed_status'] as bool? ?? false, - timestamp: json['timestamp'] as int? ?? + timestamp: + json['timestamp'] as int? ?? (DateTime.now().millisecondsSinceEpoch ~/ 1000), txType: json['txType'] as String, amount: _parse(json["amount"].toString()), diff --git a/lib/models/paymint/utxo_model.dart b/lib/models/paymint/utxo_model.dart index 5a8ccffaa..0d12d3a5d 100644 --- a/lib/models/paymint/utxo_model.dart +++ b/lib/models/paymint/utxo_model.dart @@ -9,7 +9,7 @@ */ import 'package:dart_numerics/dart_numerics.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part '../type_adaptors/utxo_model.g.dart'; diff --git a/lib/models/trade_wallet_lookup.dart b/lib/models/trade_wallet_lookup.dart index c4bc8252b..c2a12c9c2 100644 --- a/lib/models/trade_wallet_lookup.dart +++ b/lib/models/trade_wallet_lookup.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; part 'type_adaptors/trade_wallet_lookup.g.dart'; diff --git a/lib/models/type_adaptors/mwcmqs_config_model.g.dart b/lib/models/type_adaptors/mwcmqs_config_model.g.dart new file mode 100644 index 000000000..f66fbdb56 --- /dev/null +++ b/lib/models/type_adaptors/mwcmqs_config_model.g.dart @@ -0,0 +1,44 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of '../mwcmqs_config_model.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class MwcMqsConfigModelAdapter extends TypeAdapter { + @override + final int typeId = 82; + + @override + MwcMqsConfigModel read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return MwcMqsConfigModel( + host: fields[1] as String, + port: fields[2] as int?, + ); + } + + @override + void write(BinaryWriter writer, MwcMqsConfigModel obj) { + writer + ..writeByte(2) + ..writeByte(1) + ..write(obj.host) + ..writeByte(2) + ..write(obj.port); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MwcMqsConfigModelAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} diff --git a/lib/models/type_adaptors/mwcmqs_server_model.g.dart b/lib/models/type_adaptors/mwcmqs_server_model.g.dart new file mode 100644 index 000000000..dabdd9464 --- /dev/null +++ b/lib/models/type_adaptors/mwcmqs_server_model.g.dart @@ -0,0 +1,62 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of '../mwcmqs_server_model.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class MwcMqsServerModelAdapter extends TypeAdapter { + @override + final int typeId = 81; + + @override + MwcMqsServerModel read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return MwcMqsServerModel( + id: fields[0] as String, + host: fields[1] as String, + port: fields[2] as int?, + name: fields[3] as String, + useSSL: fields[4] as bool?, + enabled: fields[5] as bool?, + isFailover: fields[6] as bool?, + isDown: fields[7] as bool?, + ); + } + + @override + void write(BinaryWriter writer, MwcMqsServerModel obj) { + writer + ..writeByte(8) + ..writeByte(0) + ..write(obj.id) + ..writeByte(1) + ..write(obj.host) + ..writeByte(2) + ..write(obj.port) + ..writeByte(3) + ..write(obj.name) + ..writeByte(4) + ..write(obj.useSSL) + ..writeByte(5) + ..write(obj.enabled) + ..writeByte(6) + ..write(obj.isFailover) + ..writeByte(7) + ..write(obj.isDown); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MwcMqsServerModelAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} diff --git a/lib/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart b/lib/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart index 3294ce18f..b1f07cec7 100644 --- a/lib/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart +++ b/lib/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart @@ -13,7 +13,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/isar/main_db.dart'; import '../../../models/isar/models/ethereum/eth_contract.dart'; diff --git a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart index 9137e21f4..a477c5769 100644 --- a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart +++ b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_token_list_element.dart @@ -11,7 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../models/isar/exchange_cache/currency.dart'; import '../../../../models/isar/models/ethereum/eth_contract.dart'; diff --git a/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart b/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart index ef4248d0b..4d289a466 100644 --- a/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart +++ b/lib/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart @@ -13,7 +13,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../app_config.dart'; import '../../../db/isar/main_db.dart'; diff --git a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/coin_select_item.dart b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/coin_select_item.dart index 2506b4195..72adf390b 100644 --- a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/coin_select_item.dart +++ b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/coin_select_item.dart @@ -13,7 +13,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../models/add_wallet_list_entity/add_wallet_list_entity.dart'; import '../../../../models/add_wallet_list_entity/sub_classes/eth_token_entity.dart'; diff --git a/lib/pages/add_wallet_views/frost_ms/new/create_new_frost_ms_wallet_view.dart b/lib/pages/add_wallet_views/frost_ms/new/create_new_frost_ms_wallet_view.dart index a97c7b785..74c31d872 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/create_new_frost_ms_wallet_view.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/create_new_frost_ms_wallet_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; + import '../../../../frost_route_generator.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../services/frost.dart'; import '../../../../themes/stack_colors.dart'; import '../../../../utilities/text_styles.dart'; import '../../../../utilities/util.dart'; @@ -20,6 +20,7 @@ import '../../../../widgets/frost_mascot.dart'; import '../../../../widgets/frost_scaffold.dart'; import '../../../../widgets/rounded_white_container.dart'; import '../../../../widgets/stack_dialog.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; class CreateNewFrostMsWalletView extends ConsumerStatefulWidget { const CreateNewFrostMsWalletView({ @@ -114,31 +115,22 @@ class _NewFrostMsWalletViewState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "What is a threshold?", - style: STextStyles.w600_20(context), - ), - const SizedBox( - height: 12, - ), + Text("What is a threshold?", style: STextStyles.w600_20(context)), + const SizedBox(height: 12), Text( "A threshold is the amount of people required to perform an " "action. This does not have to be the same number as the " "total number in the group.", style: STextStyles.w400_16(context), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Text( "For example, if you have 3 people in the group, but a threshold " "of 2, then you only need 2 out of the 3 people to sign for an " "action to take place.", style: STextStyles.w400_16(context), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Text( "Conversely if you have a group of 3 AND a threshold of 3, you " "will need all 3 people in the group to sign to approve any " @@ -177,17 +169,15 @@ class _NewFrostMsWalletViewState 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ', ), ), - body: SizedBox( - width: 480, - child: child, - ), + body: SizedBox(width: 480, child: child), ), child: ConditionalParent( condition: !Util.isDesktop, builder: (child) => Background( child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: AppBarBackButton( onPressed: () { @@ -229,8 +219,9 @@ class _NewFrostMsWalletViewState Text( "Threshold", style: STextStyles.w500_14(context).copyWith( - color: - Theme.of(context).extension()!.textDark3, + color: Theme.of( + context, + ).extension()!.textDark3, ), ), CustomTextButton( @@ -239,9 +230,7 @@ class _NewFrostMsWalletViewState ), ], ), - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), TextField( keyboardType: TextInputType.number, inputFormatters: [FilteringTextInputFormatter.digitsOnly], @@ -251,18 +240,14 @@ class _NewFrostMsWalletViewState hintStyle: STextStyles.fieldLabel(context), ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), Text( "Number of participants", style: STextStyles.w500_14(context).copyWith( color: Theme.of(context).extension()!.textDark3, ), ), - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, @@ -277,9 +262,7 @@ class _NewFrostMsWalletViewState hintStyle: STextStyles.fieldLabel(context), ), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Row( children: [ Expanded( @@ -294,9 +277,7 @@ class _NewFrostMsWalletViewState ), ], ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), if (controllers.isNotEmpty) Text( "My name", @@ -304,10 +285,7 @@ class _NewFrostMsWalletViewState color: Theme.of(context).extension()!.textDark3, ), ), - if (controllers.isNotEmpty) - const SizedBox( - height: 10, - ), + if (controllers.isNotEmpty) const SizedBox(height: 10), if (controllers.isNotEmpty) Column( mainAxisSize: MainAxisSize.min, @@ -320,9 +298,7 @@ class _NewFrostMsWalletViewState hintStyle: STextStyles.fieldLabel(context), ), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Row( children: [ Expanded( @@ -337,10 +313,7 @@ class _NewFrostMsWalletViewState ), ], ), - if (controllers.length > 1) - const SizedBox( - height: 16, - ), + if (controllers.length > 1) const SizedBox(height: 16), if (controllers.length > 1) Column( mainAxisSize: MainAxisSize.min, @@ -349,13 +322,12 @@ class _NewFrostMsWalletViewState Text( "Remaining participants", style: STextStyles.w500_14(context).copyWith( - color: - Theme.of(context).extension()!.textDark3, + color: Theme.of( + context, + ).extension()!.textDark3, ), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Row( children: [ Expanded( @@ -375,9 +347,7 @@ class _NewFrostMsWalletViewState children: [ for (int i = 1; i < controllers.length; i++) Padding( - padding: const EdgeInsets.only( - top: 10, - ), + padding: const EdgeInsets.only(top: 10), child: TextField( controller: controllers[i], decoration: InputDecoration( @@ -389,9 +359,7 @@ class _NewFrostMsWalletViewState ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Create new group", onPressed: () async { @@ -411,14 +379,14 @@ class _NewFrostMsWalletViewState ); } - final config = Frost.createMultisigConfig( + final config = frostInterface.createMultisigConfig( name: controllers.first.text.trim(), threshold: int.parse(_thresholdController.text), participants: controllers.map((e) => e.text.trim()).toList(), ); - ref.read(pFrostMyName.notifier).state = - controllers.first.text.trim(); + ref.read(pFrostMyName.notifier).state = controllers.first.text + .trim(); ref.read(pFrostMultisigConfig.notifier).state = config; ref.read(pFrostScaffoldArgs.state).state = ( @@ -434,9 +402,9 @@ class _NewFrostMsWalletViewState callerRouteName: CreateNewFrostMsWalletView.routeName, ); - await Navigator.of(context).pushNamed( - FrostStepScaffold.routeName, - ); + await Navigator.of( + context, + ).pushNamed(FrostStepScaffold.routeName); }, ), ], diff --git a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1a.dart b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1a.dart index 7b9efb7aa..527301411 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1a.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1a.dart @@ -4,7 +4,6 @@ import 'package:flutter_svg/flutter_svg.dart'; import '../../../../../frost_route_generator.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../../services/frost.dart'; import '../../../../../themes/stack_colors.dart'; import '../../../../../utilities/assets.dart'; import '../../../../../utilities/text_styles.dart'; @@ -17,6 +16,7 @@ import '../../../../../widgets/detail_item.dart'; import '../../../../../widgets/dialogs/simple_mobile_dialog.dart'; import '../../../../../widgets/frost_step_user_steps.dart'; import '../../../../../widgets/qr.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostCreateStep1a extends ConsumerStatefulWidget { @@ -41,7 +41,7 @@ class _FrostCreateStep1aState extends ConsumerState { bool _userVerifyContinue = false; void _showParticipantsDialog() { - final participants = Frost.getParticipants( + final participants = frostInterface.getParticipants( multisigConfig: ref.read(pFrostMultisigConfig.state).state!, ); @@ -53,9 +53,7 @@ class _FrostCreateStep1aState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Text( @@ -63,9 +61,7 @@ class _FrostCreateStep1aState extends ConsumerState { style: STextStyles.w600_20(context), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Text( @@ -75,9 +71,7 @@ class _FrostCreateStep1aState extends ConsumerState { ), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), for (final participant in participants) Column( mainAxisSize: MainAxisSize.min, @@ -85,12 +79,11 @@ class _FrostCreateStep1aState extends ConsumerState { Container( width: double.infinity, height: 1.5, - color: - Theme.of(context).extension()!.background, - ), - const SizedBox( - height: 12, + color: Theme.of( + context, + ).extension()!.background, ), + const SizedBox(height: 12), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Row( @@ -99,12 +92,10 @@ class _FrostCreateStep1aState extends ConsumerState { width: 26, height: 26, decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldActiveBG, - borderRadius: BorderRadius.circular( - 200, - ), + color: Theme.of( + context, + ).extension()!.textFieldActiveBG, + borderRadius: BorderRadius.circular(200), ), child: Center( child: SvgPicture.asset( @@ -114,32 +105,22 @@ class _FrostCreateStep1aState extends ConsumerState { ), ), ), - const SizedBox( - width: 8, - ), + const SizedBox(width: 8), Expanded( child: Text( participant, style: STextStyles.w500_14(context), ), ), - const SizedBox( - width: 8, - ), - IconCopyButton( - data: participant, - ), + const SizedBox(width: 8), + IconCopyButton(data: participant), ], ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), ], ), - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), ], ), ), @@ -152,12 +133,8 @@ class _FrostCreateStep1aState extends ConsumerState { padding: const EdgeInsets.all(16), child: Column( children: [ - const FrostStepUserSteps( - userSteps: info, - ), - const SizedBox( - height: 20, - ), + const FrostStepUserSteps(userSteps: info), + const SizedBox(height: 20), SizedBox( height: 220, child: Row( @@ -170,9 +147,7 @@ class _FrostCreateStep1aState extends ConsumerState { ], ), ), - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), DetailItem( title: "Encoded config", detail: ref.watch(pFrostMultisigConfig.state).state ?? "Error", @@ -186,9 +161,7 @@ class _FrostCreateStep1aState extends ConsumerState { ref.watch(pFrostMultisigConfig.state).state ?? "Error", ), ), - SizedBox( - height: Util.isDesktop ? 64 : 16, - ), + SizedBox(height: Util.isDesktop ? 64 : 16), Row( children: [ Expanded( @@ -199,13 +172,8 @@ class _FrostCreateStep1aState extends ConsumerState { ), ], ), - if (!Util.isDesktop) - const Spacer( - flex: 2, - ), - const SizedBox( - height: 16, - ), + if (!Util.isDesktop) const Spacer(flex: 2), + const SizedBox(height: 16), CheckboxTextButton( label: "I have verified that everyone has joined the group", onChanged: (value) { @@ -214,15 +182,14 @@ class _FrostCreateStep1aState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Start key generation", enabled: _userVerifyContinue, onPressed: () async { - ref.read(pFrostStartKeyGenData.notifier).state = - Frost.startKeyGeneration( + ref + .read(pFrostStartKeyGenData.notifier) + .state = frostInterface.startKeyGeneration( multisigConfig: ref.watch(pFrostMultisigConfig.state).state!, myName: ref.read(pFrostMyName.state).state!, ); diff --git a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1b.dart b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1b.dart index 59597c659..3661e853a 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1b.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_1b.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; + import '../../../../../frost_route_generator.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../../services/frost.dart'; import '../../../../../utilities/text_styles.dart'; import '../../../../../utilities/util.dart'; import '../../../../../widgets/custom_buttons/checkbox_text_button.dart'; @@ -11,6 +11,7 @@ import '../../../../../widgets/frost_step_user_steps.dart'; import '../../../../../widgets/rounded_white_container.dart'; import '../../../../../widgets/stack_dialog.dart'; import '../../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; class FrostCreateStep1b extends ConsumerStatefulWidget { const FrostCreateStep1b({super.key}); @@ -62,12 +63,8 @@ class _FrostCreateStep1bState extends ConsumerState { padding: const EdgeInsets.all(16), child: Column( children: [ - const FrostStepUserSteps( - userSteps: info, - ), - const SizedBox( - height: 16, - ), + const FrostStepUserSteps(userSteps: info), + const SizedBox(height: 16), FrostStepField( controller: configFieldController, focusNode: configFocusNode, @@ -80,9 +77,7 @@ class _FrostCreateStep1bState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), FrostStepField( controller: myNameFieldController, focusNode: myNameFocusNode, @@ -95,9 +90,7 @@ class _FrostCreateStep1bState extends ConsumerState { }); }, ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), Row( children: [ Expanded( @@ -111,13 +104,9 @@ class _FrostCreateStep1bState extends ConsumerState { ), ], ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), CheckboxTextButton( label: "I have verified that everyone has joined the group", onChanged: (value) { @@ -126,9 +115,7 @@ class _FrostCreateStep1bState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Start key generation", enabled: _userVerifyContinue && !_nameEmpty && !_configEmpty, @@ -139,7 +126,9 @@ class _FrostCreateStep1bState extends ConsumerState { final config = configFieldController.text; - if (!Frost.validateEncodedMultisigConfig(encodedConfig: config)) { + if (!frostInterface.validateEncodedMultisigConfig( + encodedConfig: config, + )) { return await showDialog( context: context, builder: (_) => StackOkDialog( @@ -149,7 +138,8 @@ class _FrostCreateStep1bState extends ConsumerState { ); } - if (!Frost.getParticipants(multisigConfig: config) + if (!frostInterface + .getParticipants(multisigConfig: config) .contains(myNameFieldController.text)) { return await showDialog( context: context, @@ -163,11 +153,11 @@ class _FrostCreateStep1bState extends ConsumerState { ref.read(pFrostMyName.state).state = myNameFieldController.text; ref.read(pFrostMultisigConfig.notifier).state = config; - ref.read(pFrostStartKeyGenData.state).state = - Frost.startKeyGeneration( - multisigConfig: ref.read(pFrostMultisigConfig.state).state!, - myName: ref.read(pFrostMyName.state).state!, - ); + ref.read(pFrostStartKeyGenData.state).state = frostInterface + .startKeyGeneration( + multisigConfig: ref.read(pFrostMultisigConfig.state).state!, + myName: ref.read(pFrostMyName.state).state!, + ); ref.read(pFrostCreateCurrentStep.state).state = 2; await Navigator.of(context).pushNamed( ref diff --git a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_2.dart b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_2.dart index d8aae6d6d..9bef38d22 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_2.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_2.dart @@ -3,7 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../../frost_route_generator.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../../services/frost.dart'; import '../../../../../utilities/logger.dart'; import '../../../../../utilities/util.dart'; import '../../../../../widgets/custom_buttons/checkbox_text_button.dart'; @@ -15,12 +14,11 @@ import '../../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../../widgets/frost_step_user_steps.dart'; import '../../../../../widgets/stack_dialog.dart'; import '../../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; class FrostCreateStep2 extends ConsumerStatefulWidget { - const FrostCreateStep2({ - super.key, - }); + const FrostCreateStep2({super.key}); static const String routeName = "/frostCreateStep2"; static const String title = "Commitments"; @@ -47,7 +45,7 @@ class _FrostCreateStep2State extends ConsumerState { @override void initState() { - participants = Frost.getParticipants( + participants = frostInterface.getParticipants( multisigConfig: ref.read(pFrostMultisigConfig.state).state!, ); myIndex = participants.indexOf(ref.read(pFrostMyName.state).state!); @@ -81,9 +79,7 @@ class _FrostCreateStep2State extends ConsumerState { padding: const EdgeInsets.all(16), child: Column( children: [ - const FrostStepUserSteps( - userSteps: info, - ), + const FrostStepUserSteps(userSteps: info), const SizedBox(height: 12), DetailItem( title: "My name", @@ -94,17 +90,11 @@ class _FrostCreateStep2State extends ConsumerState { title: "My commitment", detail: myCommitment, button: Util.isDesktop - ? IconCopyButton( - data: myCommitment, - ) - : SimpleCopyButton( - data: myCommitment, - ), + ? IconCopyButton(data: myCommitment) + : SimpleCopyButton(data: myCommitment), ), const SizedBox(height: 12), - FrostQrDialogPopupButton( - data: myCommitment, - ), + FrostQrDialogPopupButton(data: myCommitment), const SizedBox(height: 12), for (int i = 0; i < participants.length; i++) Padding( @@ -135,7 +125,8 @@ class _FrostCreateStep2State extends ConsumerState { const SizedBox(height: 12), PrimaryButton( label: "Generate shares", - enabled: _userVerifyContinue && + enabled: + _userVerifyContinue && !fieldIsEmptyFlags.reduce((v, e) => v |= e), onPressed: () async { // check for empty commitments @@ -156,19 +147,19 @@ class _FrostCreateStep2State extends ConsumerState { commitments.insert(myIndex, myCommitment); try { - ref.read(pFrostSecretSharesData.notifier).state = - Frost.generateSecretShares( - multisigConfigWithNamePtr: ref - .read(pFrostStartKeyGenData.state) - .state! - .multisigConfigWithNamePtr, - mySeed: ref.read(pFrostStartKeyGenData.state).state!.seed, - secretShareMachineWrapperPtr: ref - .read(pFrostStartKeyGenData.state) - .state! - .secretShareMachineWrapperPtr, - commitments: commitments, - ); + ref.read(pFrostSecretSharesData.notifier).state = frostInterface + .generateSecretShares( + multisigConfigWithNamePtr: ref + .read(pFrostStartKeyGenData.state) + .state! + .multisigConfigWithNamePtr, + mySeed: ref.read(pFrostStartKeyGenData.state).state!.seed, + secretShareMachineWrapperPtr: ref + .read(pFrostStartKeyGenData.state) + .state! + .secretShareMachineWrapperPtr, + commitments: commitments, + ); ref.read(pFrostCreateCurrentStep.state).state = 3; await Navigator.of(context).pushNamed( @@ -178,7 +169,7 @@ class _FrostCreateStep2State extends ConsumerState { .routeName, ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (context.mounted) { return await showDialog( context: context, diff --git a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_3.dart b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_3.dart index ec565cb59..1b2ba0c6a 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_3.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_3.dart @@ -3,7 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../../frost_route_generator.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../../services/frost.dart'; import '../../../../../utilities/logger.dart'; import '../../../../../utilities/util.dart'; import '../../../../../widgets/custom_buttons/checkbox_text_button.dart'; @@ -15,6 +14,7 @@ import '../../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../../widgets/frost_step_user_steps.dart'; import '../../../../../widgets/stack_dialog.dart'; import '../../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; class FrostCreateStep3 extends ConsumerStatefulWidget { @@ -46,7 +46,7 @@ class _FrostCreateStep3State extends ConsumerState { @override void initState() { - participants = Frost.getParticipants( + participants = frostInterface.getParticipants( multisigConfig: ref.read(pFrostMultisigConfig.state).state!, ); myIndex = participants.indexOf(ref.read(pFrostMyName.state).state!); @@ -80,9 +80,7 @@ class _FrostCreateStep3State extends ConsumerState { padding: const EdgeInsets.all(16), child: Column( children: [ - const FrostStepUserSteps( - userSteps: info, - ), + const FrostStepUserSteps(userSteps: info), const SizedBox(height: 12), DetailItem( title: "My name", @@ -93,17 +91,11 @@ class _FrostCreateStep3State extends ConsumerState { title: "My share", detail: myShare, button: Util.isDesktop - ? IconCopyButton( - data: myShare, - ) - : SimpleCopyButton( - data: myShare, - ), + ? IconCopyButton(data: myShare) + : SimpleCopyButton(data: myShare), ), const SizedBox(height: 12), - FrostQrDialogPopupButton( - data: myShare, - ), + FrostQrDialogPopupButton(data: myShare), const SizedBox(height: 12), for (int i = 0; i < participants.length; i++) Padding( @@ -131,12 +123,11 @@ class _FrostCreateStep3State extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Generate", - enabled: _userVerifyContinue && + enabled: + _userVerifyContinue && !fieldIsEmptyFlags.reduce((v, e) => v |= e), onPressed: () async { // check for empty commitments @@ -157,8 +148,9 @@ class _FrostCreateStep3State extends ConsumerState { shares.insert(myIndex, myShare); try { - ref.read(pFrostCompletedKeyGenData.notifier).state = - Frost.completeKeyGeneration( + ref + .read(pFrostCompletedKeyGenData.notifier) + .state = frostInterface.completeKeyGeneration( multisigConfigWithNamePtr: ref .read(pFrostStartKeyGenData.state) .state! @@ -178,7 +170,7 @@ class _FrostCreateStep3State extends ConsumerState { .routeName, ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (context.mounted) { return await showDialog( diff --git a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_5.dart b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_5.dart index 9d835ea4e..651669076 100644 --- a/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_5.dart +++ b/lib/pages/add_wallet_views/frost_ms/new/steps/frost_create_step_5.dart @@ -11,7 +11,6 @@ import '../../../../../pages_desktop_specific/desktop_home_view.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../../providers/global/secure_store_provider.dart'; import '../../../../../providers/providers.dart'; -import '../../../../../services/frost.dart'; import '../../../../../themes/stack_colors.dart'; import '../../../../../utilities/assets.dart'; import '../../../../../utilities/logger.dart'; @@ -26,8 +25,10 @@ import '../../../../../widgets/desktop/primary_button.dart'; import '../../../../../widgets/detail_item.dart'; import '../../../../../widgets/loading_indicator.dart'; import '../../../../../widgets/rounded_container.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../../home_view/home_view.dart'; -import '../../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; +import '../../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tvd; class FrostCreateStep5 extends ConsumerStatefulWidget { const FrostCreateStep5({super.key}); @@ -55,10 +56,14 @@ class _FrostCreateStep5State extends ConsumerState { @override void initState() { seed = ref.read(pFrostStartKeyGenData.state).state!.seed; - serializedKeys = - ref.read(pFrostCompletedKeyGenData.state).state!.serializedKeys; - recoveryString = - ref.read(pFrostCompletedKeyGenData.state).state!.recoveryString; + serializedKeys = ref + .read(pFrostCompletedKeyGenData.state) + .state! + .serializedKeys; + recoveryString = ref + .read(pFrostCompletedKeyGenData.state) + .state! + .recoveryString; multisigConfig = ref.read(pFrostMultisigConfig.state).state!; multisigId = ref.read(pFrostCompletedKeyGenData.state).state!.multisigId; @@ -72,15 +77,15 @@ class _FrostCreateStep5State extends ConsumerState { child: Column( children: [ RoundedContainer( - color: - Theme.of(context).extension()!.warningBackground, + color: Theme.of( + context, + ).extension()!.warningBackground, child: Text( _warning, style: STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.warningForeground, + color: Theme.of( + context, + ).extension()!.warningForeground, ), ), ), @@ -88,19 +93,17 @@ class _FrostCreateStep5State extends ConsumerState { DetailItem( title: "Multisig Config", detail: multisigConfig, - button: - Util.isDesktop - ? IconCopyButton(data: multisigConfig) - : SimpleCopyButton(data: multisigConfig), + button: Util.isDesktop + ? tvd.IconCopyButton(data: multisigConfig) + : SimpleCopyButton(data: multisigConfig), ), const SizedBox(height: 12), DetailItem( title: "Keys", detail: serializedKeys, - button: - Util.isDesktop - ? IconCopyButton(data: serializedKeys) - : SimpleCopyButton(data: serializedKeys), + button: Util.isDesktop + ? tvd.IconCopyButton(data: serializedKeys) + : SimpleCopyButton(data: serializedKeys), ), if (!Util.isDesktop) const Spacer(), const SizedBox(height: 12), @@ -155,10 +158,10 @@ class _FrostCreateStep5State extends ConsumerState { serializedKeys: serializedKeys, multisigId: multisigId, myName: ref.read(pFrostMyName.state).state!, - participants: Frost.getParticipants( + participants: frostInterface.getParticipants( multisigConfig: ref.read(pFrostMultisigConfig.state).state!, ), - threshold: Frost.getThreshold( + threshold: frostInterface.getThreshold( multisigConfig: ref.read(pFrostMultisigConfig.state).state!, ), ); diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1a.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1a.dart index 740baafc3..9fe973bce 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1a.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1a.dart @@ -6,7 +6,6 @@ import '../../../../frost_route_generator.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../providers/global/wallets_provider.dart'; -import '../../../../services/frost.dart'; import '../../../../themes/stack_colors.dart'; import '../../../../utilities/assets.dart'; import '../../../../utilities/logger.dart'; @@ -23,6 +22,7 @@ import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/dialogs/simple_mobile_dialog.dart'; import '../../../../widgets/frost_step_user_steps.dart'; import '../../../../widgets/qr.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostReshareStep1a extends ConsumerStatefulWidget { @@ -63,9 +63,9 @@ class _FrostReshareStep1aState extends ConsumerState { final serializedKeys = await wallet.getSerializedKeys(); if (mounted) { - final result = Frost.beginResharer( + final result = frostInterface.beginResharer( serializedKeys: serializedKeys!, - config: Frost.decodeRConfig( + config: frostInterface.decodeRConfig( ref.read(pFrostResharingData).resharerRConfig!, ), ); @@ -81,14 +81,12 @@ class _FrostReshareStep1aState extends ConsumerState { ); } } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: e.toString(), - ), + builder: (_) => FrostErrorDialog(title: e.toString()), ); } } finally { @@ -97,8 +95,10 @@ class _FrostReshareStep1aState extends ConsumerState { } void _showParticipantsDialog() { - final participants = - ref.read(pFrostResharingData).configData!.newParticipants; + final participants = ref + .read(pFrostResharingData) + .configData! + .newParticipants; showDialog( context: context, @@ -108,9 +108,7 @@ class _FrostReshareStep1aState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Text( @@ -118,9 +116,7 @@ class _FrostReshareStep1aState extends ConsumerState { style: STextStyles.w600_20(context), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Text( @@ -130,9 +126,7 @@ class _FrostReshareStep1aState extends ConsumerState { ), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), for (final participant in participants) Column( mainAxisSize: MainAxisSize.min, @@ -140,12 +134,11 @@ class _FrostReshareStep1aState extends ConsumerState { Container( width: double.infinity, height: 1.5, - color: - Theme.of(context).extension()!.background, - ), - const SizedBox( - height: 12, + color: Theme.of( + context, + ).extension()!.background, ), + const SizedBox(height: 12), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), child: Row( @@ -154,12 +147,10 @@ class _FrostReshareStep1aState extends ConsumerState { width: 26, height: 26, decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldActiveBG, - borderRadius: BorderRadius.circular( - 200, - ), + color: Theme.of( + context, + ).extension()!.textFieldActiveBG, + borderRadius: BorderRadius.circular(200), ), child: Center( child: SvgPicture.asset( @@ -169,32 +160,22 @@ class _FrostReshareStep1aState extends ConsumerState { ), ), ), - const SizedBox( - width: 8, - ), + const SizedBox(width: 8), Expanded( child: Text( participant, style: STextStyles.w500_14(context), ), ), - const SizedBox( - width: 8, - ), - IconCopyButton( - data: participant, - ), + const SizedBox(width: 8), + IconCopyButton(data: participant), ], ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), ], ), - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), ], ), ), @@ -227,9 +208,7 @@ class _FrostReshareStep1aState extends ConsumerState { padding: const EdgeInsets.all(16), child: Column( children: [ - const FrostStepUserSteps( - userSteps: info, - ), + const FrostStepUserSteps(userSteps: info), const SizedBox(height: 20), SizedBox( height: 220, @@ -243,9 +222,7 @@ class _FrostReshareStep1aState extends ConsumerState { ], ), ), - const SizedBox( - height: 32, - ), + const SizedBox(height: 32), DetailItem( title: "Config", detail: ref.watch(pFrostResharingData).resharerRConfig!, @@ -257,9 +234,7 @@ class _FrostReshareStep1aState extends ConsumerState { data: ref.watch(pFrostResharingData).resharerRConfig!, ), ), - SizedBox( - height: Util.isDesktop ? 64 : 16, - ), + SizedBox(height: Util.isDesktop ? 64 : 16), Row( children: [ Expanded( @@ -271,10 +246,7 @@ class _FrostReshareStep1aState extends ConsumerState { ], ), if (iAmInvolved && !Util.isDesktop) const Spacer(), - if (iAmInvolved) - const SizedBox( - height: 16, - ), + if (iAmInvolved) const SizedBox(height: 16), if (iAmInvolved) CheckboxTextButton( label: "I have verified that everyone has imported the config", @@ -284,10 +256,7 @@ class _FrostReshareStep1aState extends ConsumerState { }); }, ), - if (iAmInvolved) - const SizedBox( - height: 16, - ), + if (iAmInvolved) const SizedBox(height: 16), if (iAmInvolved) PrimaryButton( label: "Start resharing", diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1b.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1b.dart index 7224e2acb..b4971d6f5 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1b.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_1b.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:frostdart/frostdart.dart'; + +// import 'package:frostdart/frostdart.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../providers/global/secure_store_provider.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/format.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; @@ -16,11 +16,10 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/frost_step_user_steps.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; class FrostReshareStep1b extends ConsumerStatefulWidget { - const FrostReshareStep1b({ - super.key, - }); + const FrostReshareStep1b({super.key}); static const String routeName = "/frostReshareStep1b"; static const String title = "Import reshare config"; @@ -70,8 +69,8 @@ class _FrostReshareStep1bState extends ConsumerState { String? salt; try { salt = Format.uint8listToString( - resharerSalt( - resharerConfig: Frost.decodeRConfig( + frostInterface.getResharerSalt( + resharerConfig: frostInterface.decodeRConfig( ref.read(pFrostResharingData).resharerRConfig!, ), ), @@ -95,13 +94,13 @@ class _FrostReshareStep1bState extends ConsumerState { }); } - final serializedKeys = await ref.read(secureStoreProvider).read( - key: "{$walletId}_serializedFROSTKeys", - ); + final serializedKeys = await ref + .read(secureStoreProvider) + .read(key: "{$walletId}_serializedFROSTKeys"); if (mounted) { - final result = Frost.beginResharer( + final result = frostInterface.beginResharer( serializedKeys: serializedKeys!, - config: Frost.decodeRConfig( + config: frostInterface.decodeRConfig( ref.read(pFrostResharingData).resharerRConfig!, ), ); @@ -117,14 +116,12 @@ class _FrostReshareStep1bState extends ConsumerState { ); } } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: e.toString(), - ), + builder: (_) => FrostErrorDialog(title: e.toString()), ); } } finally { @@ -153,12 +150,8 @@ class _FrostReshareStep1bState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox( - height: 16, - ), - const FrostStepUserSteps( - userSteps: info, - ), + const SizedBox(height: 16), + const FrostStepUserSteps(userSteps: info), const SizedBox(height: 20), FrostStepField( controller: configFieldController, @@ -172,13 +165,9 @@ class _FrostReshareStep1bState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), CheckboxTextButton( label: "I have verified that everyone has imported the config", onChanged: (value) { @@ -187,9 +176,7 @@ class _FrostReshareStep1bState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Start resharing", enabled: !_configEmpty && _userVerifyContinue, diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2abd.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2abd.dart index b54b6041b..7cc2ce539 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2abd.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2abd.dart @@ -6,7 +6,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; import '../../../../wallets/isar/models/frost_wallet_info.dart'; @@ -17,6 +16,7 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/detail_item.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostReshareStep2abd extends ConsumerStatefulWidget { @@ -60,9 +60,9 @@ class _FrostReshareStep2abdState extends ConsumerState { resharerStarts.insert(myResharerIndexIndex, myResharerStart); } - final result = Frost.beginReshared( + final result = frostInterface.beginReshared( myName: ref.read(pFrostResharingData).myName!, - resharerConfig: Frost.decodeRConfig( + resharerConfig: frostInterface.decodeRConfig( ref.read(pFrostResharingData).resharerRConfig!, ), resharerStarts: resharerStarts, @@ -79,15 +79,13 @@ class _FrostReshareStep2abdState extends ConsumerState { .routeName, ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: "Error", - message: e.toString(), - ), + builder: (_) => + FrostErrorDialog(title: "Error", message: e.toString()), ); } } finally { @@ -103,11 +101,14 @@ class _FrostReshareStep2abdState extends ConsumerState { .isar .frostWalletInfo .getByWalletIdSync(ref.read(pFrostScaffoldArgs)!.walletId!)!; - final myOldIndex = - frostInfo.participants.indexOf(ref.read(pFrostResharingData).myName!); + final myOldIndex = frostInfo.participants.indexOf( + ref.read(pFrostResharingData).myName!, + ); - myResharerStart = - ref.read(pFrostResharingData).startResharerData!.resharerStart; + myResharerStart = ref + .read(pFrostResharingData) + .startResharerData! + .resharerStart; resharers = ref.read(pFrostResharingData).configData!.resharers; myResharerIndexIndex = resharers.values.toList().indexOf(myOldIndex); @@ -151,20 +152,12 @@ class _FrostReshareStep2abdState extends ConsumerState { title: "My resharer", detail: myResharerStart, button: Util.isDesktop - ? IconCopyButton( - data: myResharerStart, - ) - : SimpleCopyButton( - data: myResharerStart, - ), + ? IconCopyButton(data: myResharerStart) + : SimpleCopyButton(data: myResharerStart), ), const SizedBox(height: 12), - FrostQrDialogPopupButton( - data: myResharerStart, - ), - const SizedBox( - height: 12, - ), + FrostQrDialogPopupButton(data: myResharerStart), + const SizedBox(height: 12), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -175,7 +168,8 @@ class _FrostReshareStep2abdState extends ConsumerState { focusNode: focusNodes[i], showQrScanOption: true, label: resharers.keys.elementAt(i), - hint: "Enter " + hint: + "Enter " "${resharers.keys.elementAt(i)}" "'s resharer", onChanged: (_) { @@ -187,9 +181,7 @@ class _FrostReshareStep2abdState extends ConsumerState { ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), CheckboxTextButton( label: "I have verified that everyone has my resharer", onChanged: (value) { @@ -198,12 +190,11 @@ class _FrostReshareStep2abdState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Continue", - enabled: _userVerifyContinue && + enabled: + _userVerifyContinue && (amOutgoingParticipant || !fieldIsEmptyFlags.fold(false, (v, e) => v || e)), onPressed: _onPressed, diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2c.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2c.dart index 92a3a195b..3717188fd 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2c.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_2c.dart @@ -5,12 +5,12 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; class FrostReshareStep2c extends ConsumerStatefulWidget { const FrostReshareStep2c({super.key}); @@ -41,9 +41,9 @@ class _FrostReshareStep2cState extends ConsumerState { // collect resharer strings final resharerStarts = controllers.map((e) => e.text).toList(); - final result = Frost.beginReshared( + final result = frostInterface.beginReshared( myName: ref.read(pFrostResharingData).myName!, - resharerConfig: Frost.decodeRConfig( + resharerConfig: frostInterface.decodeRConfig( ref.read(pFrostResharingData).resharerRConfig!, ), resharerStarts: resharerStarts, @@ -59,15 +59,13 @@ class _FrostReshareStep2cState extends ConsumerState { .routeName, ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: "Error", - message: e.toString(), - ), + builder: (_) => + FrostErrorDialog(title: "Error", message: e.toString()), ); } } finally { @@ -116,7 +114,8 @@ class _FrostReshareStep2cState extends ConsumerState { focusNode: focusNodes[i], showQrScanOption: true, label: resharers.keys.elementAt(i), - hint: "Enter " + hint: + "Enter " "${resharers.keys.elementAt(i)}" "'s resharer", onChanged: (_) { @@ -129,9 +128,7 @@ class _FrostReshareStep2cState extends ConsumerState { ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Continue", enabled: !fieldIsEmptyFlags.reduce((v, e) => v |= e), diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_3abd.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_3abd.dart index d4fc876c1..edd5d5140 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_3abd.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_3abd.dart @@ -1,11 +1,8 @@ -import 'dart:ffi'; - import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; import '../../../../widgets/custom_buttons/checkbox_text_button.dart'; @@ -15,6 +12,7 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/detail_item.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostReshareStep3abd extends ConsumerStatefulWidget { @@ -55,8 +53,8 @@ class _FrostReshareStep3abdState extends ConsumerState { encryptionKeys.insert(myIndex, myEncryptionKey!); } - final result = Frost.finishResharer( - machine: ref.read(pFrostResharingData).startResharerData!.machine.ref, + final result = frostInterface.finishResharer( + machine: ref.read(pFrostResharingData).startResharerData!.machine, encryptionKeysOfResharedTo: encryptionKeys, ); @@ -70,14 +68,12 @@ class _FrostReshareStep3abdState extends ConsumerState { .routeName, ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: "Error", - message: e.toString(), - ), + builder: (_) => + FrostErrorDialog(title: "Error", message: e.toString()), ); } } finally { @@ -87,8 +83,10 @@ class _FrostReshareStep3abdState extends ConsumerState { @override void initState() { - myEncryptionKey = - ref.read(pFrostResharingData).startResharedData?.resharedStart; + myEncryptionKey = ref + .read(pFrostResharingData) + .startResharedData + ?.resharedStart; newParticipants = ref.read(pFrostResharingData).configData!.newParticipants; myIndex = newParticipants.indexOf(ref.read(pFrostResharingData).myName!); @@ -136,22 +134,13 @@ class _FrostReshareStep3abdState extends ConsumerState { title: "My encryption key", detail: myEncryptionKey!, button: Util.isDesktop - ? IconCopyButton( - data: myEncryptionKey!, - ) - : SimpleCopyButton( - data: myEncryptionKey!, - ), + ? IconCopyButton(data: myEncryptionKey!) + : SimpleCopyButton(data: myEncryptionKey!), ), if (!amOutgoingParticipant) const SizedBox(height: 12), if (!amOutgoingParticipant) - FrostQrDialogPopupButton( - data: myEncryptionKey!, - ), - if (!amOutgoingParticipant) - const SizedBox( - height: 12, - ), + FrostQrDialogPopupButton(data: myEncryptionKey!), + if (!amOutgoingParticipant) const SizedBox(height: 12), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -164,7 +153,8 @@ class _FrostReshareStep3abdState extends ConsumerState { focusNode: focusNodes[i], showQrScanOption: true, label: newParticipants[i], - hint: "Enter " + hint: + "Enter " "${newParticipants[i]}" "'s encryption key", onChanged: (_) { @@ -177,10 +167,7 @@ class _FrostReshareStep3abdState extends ConsumerState { ], ), if (!Util.isDesktop) const Spacer(), - if (!amOutgoingParticipant) - const SizedBox( - height: 12, - ), + if (!amOutgoingParticipant) const SizedBox(height: 12), if (!amOutgoingParticipant) CheckboxTextButton( label: "I have verified that everyone has my encryption key", @@ -190,12 +177,11 @@ class _FrostReshareStep3abdState extends ConsumerState { }); }, ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Continue", - enabled: (amOutgoingParticipant || _userVerifyContinue) && + enabled: + (amOutgoingParticipant || _userVerifyContinue) && !fieldIsEmptyFlags.reduce((v, e) => v |= e), onPressed: _onPressed, ), diff --git a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_4.dart b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_4.dart index dd081d121..00765f921 100644 --- a/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_4.dart +++ b/lib/pages/add_wallet_views/frost_ms/reshare/frost_reshare_step_4.dart @@ -1,5 +1,3 @@ -import 'dart:ffi'; - import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -7,7 +5,6 @@ import '../../../../frost_route_generator.dart'; import '../../../../pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; import '../../../../wallets/isar/models/frost_wallet_info.dart'; @@ -18,6 +15,7 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/detail_item.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; import '../../../wallet_view/wallet_view.dart'; @@ -58,7 +56,10 @@ class _FrostReshareStep4State extends ConsumerState { if (amOutgoingParticipant) { ref.read(pFrostResharingData).reset(); ref.read(pFrostScaffoldCanPopDesktop.notifier).state = true; - ref.read(pFrostScaffoldArgs)?.parentNav.popUntil( + ref + .read(pFrostScaffoldArgs) + ?.parentNav + .popUntil( ModalRoute.withName( Util.isDesktop ? DesktopWalletView.routeName @@ -72,8 +73,8 @@ class _FrostReshareStep4State extends ConsumerState { resharerCompletes.insert(myResharerIndexIndex!, myResharerComplete!); } - final data = Frost.finishReshared( - prior: ref.read(pFrostResharingData).startResharedData!.prior.ref, + final data = frostInterface.finishReshared( + prior: ref.read(pFrostResharingData).startResharedData!.prior, resharerCompletes: resharerCompletes, ); @@ -88,14 +89,12 @@ class _FrostReshareStep4State extends ConsumerState { ); } } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, - builder: (_) => FrostErrorDialog( - title: "Error", - message: e.toString(), - ), + builder: (_) => + FrostErrorDialog(title: "Error", message: e.toString()), ); } } finally { @@ -107,9 +106,9 @@ class _FrostReshareStep4State extends ConsumerState { void initState() { amNewParticipant = ref.read(pFrostResharingData).startResharerData == null && - ref.read(pFrostResharingData).incompleteWallet != null && - ref.read(pFrostResharingData).incompleteWallet?.walletId == - ref.read(pFrostScaffoldArgs)!.walletId!; + ref.read(pFrostResharingData).incompleteWallet != null && + ref.read(pFrostResharingData).incompleteWallet?.walletId == + ref.read(pFrostScaffoldArgs)!.walletId!; myName = ref.read(pFrostResharingData).myName!; @@ -127,8 +126,9 @@ class _FrostReshareStep4State extends ConsumerState { .isar .frostWalletInfo .getByWalletIdSync(ref.read(pFrostScaffoldArgs)!.walletId!)!; - final myOldIndex = - frostInfo.participants.indexOf(ref.read(pFrostResharingData).myName!); + final myOldIndex = frostInfo.participants.indexOf( + ref.read(pFrostResharingData).myName!, + ); myResharerIndexIndex = resharers.values.toList().indexOf(myOldIndex); if (myResharerIndexIndex! >= 0) { @@ -173,22 +173,13 @@ class _FrostReshareStep4State extends ConsumerState { title: "My resharer complete", detail: myResharerComplete!, button: Util.isDesktop - ? IconCopyButton( - data: myResharerComplete!, - ) - : SimpleCopyButton( - data: myResharerComplete!, - ), + ? IconCopyButton(data: myResharerComplete!) + : SimpleCopyButton(data: myResharerComplete!), ), if (myResharerComplete != null) const SizedBox(height: 12), if (myResharerComplete != null) - FrostQrDialogPopupButton( - data: myResharerComplete!, - ), - if (!amOutgoingParticipant) - const SizedBox( - height: 16, - ), + FrostQrDialogPopupButton(data: myResharerComplete!), + if (!amOutgoingParticipant) const SizedBox(height: 16), if (!amOutgoingParticipant) Column( mainAxisSize: MainAxisSize.min, @@ -202,7 +193,8 @@ class _FrostReshareStep4State extends ConsumerState { focusNode: focusNodes[i], showQrScanOption: true, label: resharers.keys.elementAt(i), - hint: "Enter " + hint: + "Enter " "${resharers.keys.elementAt(i)}" "'s resharer", onChanged: (_) { @@ -215,9 +207,7 @@ class _FrostReshareStep4State extends ConsumerState { ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), if (!amNewParticipant) CheckboxTextButton( label: "I have verified that everyone has my resharer complete", @@ -227,13 +217,11 @@ class _FrostReshareStep4State extends ConsumerState { }); }, ), - if (!amNewParticipant) - const SizedBox( - height: 16, - ), + if (!amNewParticipant) const SizedBox(height: 16), PrimaryButton( label: amOutgoingParticipant ? "Done" : "Complete", - enabled: (amNewParticipant || _userVerifyContinue) && + enabled: + (amNewParticipant || _userVerifyContinue) && (amOutgoingParticipant || !fieldIsEmptyFlags.fold(false, (v, e) => v || e)), onPressed: _onPressed, diff --git a/lib/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart b/lib/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart index facaeed44..33eddc54b 100644 --- a/lib/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart +++ b/lib/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart @@ -4,13 +4,13 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:frostdart/frostdart.dart' as frost; + +// import 'package:frostdart/frostdart.dart' as frost; import '../../../../notifications/show_flush_bar.dart'; import '../../../../pages_desktop_specific/desktop_home_view.dart'; import '../../../../providers/global/secure_store_provider.dart'; import '../../../../providers/providers.dart'; -import '../../../../services/frost.dart'; import '../../../../themes/stack_colors.dart'; import '../../../../utilities/assets.dart'; import '../../../../utilities/barcode_scanner_interface.dart'; @@ -38,6 +38,7 @@ import '../../../../widgets/icon_widgets/x_icon.dart'; import '../../../../widgets/stack_dialog.dart'; import '../../../../widgets/stack_text_field.dart'; import '../../../../widgets/textfield_icon_button.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../home_view/home_view.dart'; class RestoreFrostMsWalletView extends ConsumerStatefulWidget { @@ -70,8 +71,10 @@ class _RestoreFrostMsWalletViewState final keys = keysFieldController.text; final config = configFieldController.text; - final myNameIndex = frost.getParticipantIndexFromKeys(serializedKeys: keys); - final participants = Frost.getParticipants(multisigConfig: config); + final myNameIndex = frostInterface.participantIndexFromKeys( + serializedKeys: keys, + ); + final participants = frostInterface.getParticipants(multisigConfig: config); final myName = participants[myNameIndex]; final info = WalletInfo.createNew( @@ -92,7 +95,7 @@ class _RestoreFrostMsWalletViewState knownSalts: [], participants: participants, myName: myName, - threshold: frost.multisigThreshold(multisigConfig: config), + threshold: frostInterface.getMultisigThreshold(multisigConfig: config), ); await ref.read(mainDBProvider).isar.writeTxn(() async { @@ -173,12 +176,11 @@ class _RestoreFrostMsWalletViewState if (mounted) { await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: "Failed to restore", - message: e.toString(), - desktopPopRootNavigator: Util.isDesktop, - ), + builder: (_) => StackOkDialog( + title: "Failed to restore", + message: e.toString(), + desktopPopRootNavigator: Util.isDesktop, + ), ); } } finally { @@ -265,60 +267,59 @@ class _RestoreFrostMsWalletViewState Widget build(BuildContext context) { return ConditionalParent( condition: Util.isDesktop, - builder: - (child) => DesktopScaffold( - background: Theme.of(context).extension()!.background, - appBar: const DesktopAppBar( - isCompactHeight: false, - leading: AppBarBackButton(), - // TODO: [prio=high] get rid of placeholder text?? - trailing: FrostMascot( - title: 'Lorem ipsum', - body: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ', - ), - ), - body: SizedBox(width: 480, child: child), + builder: (child) => DesktopScaffold( + background: Theme.of(context).extension()!.background, + appBar: const DesktopAppBar( + isCompactHeight: false, + leading: AppBarBackButton(), + // TODO: [prio=high] get rid of placeholder text?? + trailing: FrostMascot( + title: 'Lorem ipsum', + body: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ', ), + ), + body: SizedBox(width: 480, child: child), + ), child: ConditionalParent( condition: !Util.isDesktop, - builder: - (child) => Background( - child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, - appBar: AppBar( - leading: AppBarBackButton( - onPressed: () { - Navigator.of(context).pop(); - }, - ), - title: Text( - "Restore FROST multisig wallet", - style: STextStyles.navBarTitle(context), - ), - ), - body: SafeArea( - child: LayoutBuilder( - builder: (context, constraints) { - return SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: IntrinsicHeight( - child: Padding( - padding: const EdgeInsets.all(16), - child: child, - ), - ), + builder: (child) => Background( + child: Scaffold( + backgroundColor: Theme.of( + context, + ).extension()!.background, + appBar: AppBar( + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + title: Text( + "Restore FROST multisig wallet", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(16), + child: child, ), - ); - }, - ), - ), + ), + ), + ); + }, ), ), + ), + ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -340,78 +341,79 @@ class _RestoreFrostMsWalletViewState autocorrect: false, enableSuggestions: false, style: STextStyles.field(context), - decoration: standardInputDecoration( - "Enter config", - configFocusNode, - context, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 6, - bottom: 8, - right: 5, - ), - suffixIcon: Padding( - padding: - _configEmpty + decoration: + standardInputDecoration( + "Enter config", + configFocusNode, + context, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 6, + bottom: 8, + right: 5, + ), + suffixIcon: Padding( + padding: _configEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - !_configEmpty - ? TextFieldIconButton( - semanticsLabel: - "Clear Button. Clears The Config Field.", - key: const Key("frConfigClearButtonKey"), - onTap: () { - configFieldController.text = ""; - - setState(() { - _configEmpty = true; - }); - }, - child: const XIcon(), - ) - : TextFieldIconButton( - semanticsLabel: - "Paste Button. Pastes From Clipboard To Config Field Input.", - key: const Key("frConfigPasteButtonKey"), - onTap: () async { - final ClipboardData? data = - await Clipboard.getData( - Clipboard.kTextPlain, - ); - if (data?.text != null && - data!.text!.isNotEmpty) { - configFieldController.text = - data.text!.trim(); - } - - setState(() { - _configEmpty = - configFieldController.text.isEmpty; - }); - }, - child: - _configEmpty - ? const ClipboardIcon() - : const XIcon(), - ), - if (_configEmpty) - TextFieldIconButton( - semanticsLabel: - "Scan QR Button. Opens Camera For Scanning QR Code.", - key: const Key("frConfigScanQrButtonKey"), - onTap: scanQr, - child: const QrCodeIcon(), - ), - ], + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + !_configEmpty + ? TextFieldIconButton( + semanticsLabel: + "Clear Button. Clears The Config Field.", + key: const Key("frConfigClearButtonKey"), + onTap: () { + configFieldController.text = ""; + + setState(() { + _configEmpty = true; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + semanticsLabel: + "Paste Button. Pastes From Clipboard To Config Field Input.", + key: const Key("frConfigPasteButtonKey"), + onTap: () async { + final ClipboardData? data = + await Clipboard.getData( + Clipboard.kTextPlain, + ); + if (data?.text != null && + data!.text!.isNotEmpty) { + configFieldController.text = data + .text! + .trim(); + } + + setState(() { + _configEmpty = configFieldController + .text + .isEmpty; + }); + }, + child: _configEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + if (_configEmpty) + TextFieldIconButton( + semanticsLabel: + "Scan QR Button. Opens Camera For Scanning QR Code.", + key: const Key("frConfigScanQrButtonKey"), + onTap: scanQr, + child: const QrCodeIcon(), + ), + ], + ), + ), ), ), - ), - ), ), ), const SizedBox(height: 16), @@ -432,70 +434,69 @@ class _RestoreFrostMsWalletViewState autocorrect: false, enableSuggestions: false, style: STextStyles.field(context), - decoration: standardInputDecoration( - "Keys", - keysFocusNode, - context, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 6, - bottom: 8, - right: 5, - ), - suffixIcon: Padding( - padding: - _keysEmpty + decoration: + standardInputDecoration( + "Keys", + keysFocusNode, + context, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 6, + bottom: 8, + right: 5, + ), + suffixIcon: Padding( + padding: _keysEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - !_keysEmpty - ? TextFieldIconButton( - semanticsLabel: - "Clear Button. Clears The Keys Field.", - key: const Key("frMyNameClearButtonKey"), - onTap: () { - keysFieldController.text = ""; - - setState(() { - _keysEmpty = true; - }); - }, - child: const XIcon(), - ) - : TextFieldIconButton( - semanticsLabel: - "Paste Button. Pastes From Clipboard To Keys Field.", - key: const Key("frKeysPasteButtonKey"), - onTap: () async { - final ClipboardData? data = - await Clipboard.getData( - Clipboard.kTextPlain, - ); - if (data?.text != null && - data!.text!.isNotEmpty) { - keysFieldController.text = - data.text!.trim(); - } - - setState(() { - _keysEmpty = - keysFieldController.text.isEmpty; - }); - }, - child: - _keysEmpty - ? const ClipboardIcon() - : const XIcon(), - ), - ], + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + !_keysEmpty + ? TextFieldIconButton( + semanticsLabel: + "Clear Button. Clears The Keys Field.", + key: const Key("frMyNameClearButtonKey"), + onTap: () { + keysFieldController.text = ""; + + setState(() { + _keysEmpty = true; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + semanticsLabel: + "Paste Button. Pastes From Clipboard To Keys Field.", + key: const Key("frKeysPasteButtonKey"), + onTap: () async { + final ClipboardData? data = + await Clipboard.getData( + Clipboard.kTextPlain, + ); + if (data?.text != null && + data!.text!.isNotEmpty) { + keysFieldController.text = data.text! + .trim(); + } + + setState(() { + _keysEmpty = + keysFieldController.text.isEmpty; + }); + }, + child: _keysEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + ], + ), + ), ), ), - ), - ), ), ), const SizedBox(height: 16), diff --git a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart index ec7419d96..fa810756d 100644 --- a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart +++ b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart'; diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart index 5cc90beba..1686eba71 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart @@ -8,8 +8,6 @@ * */ -import 'package:cs_monero/src/deprecated/get_height_by_date.dart' - as cs_monero_deprecated; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -42,6 +40,8 @@ import '../../../../widgets/rounded_white_container.dart'; import '../../../../widgets/stack_text_field.dart'; import '../../../../widgets/textfield_icon_button.dart'; import '../../../../widgets/toggle.dart'; +import '../../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../../create_or_restore_wallet_view/sub_widgets/coin_image.dart'; import '../restore_view_only_wallet_view.dart'; import '../restore_wallet_view.dart'; @@ -213,10 +213,15 @@ class _RestoreOptionsViewState extends ConsumerState { int height = 0; if (date != null) { if (widget.coin is Monero) { - height = cs_monero_deprecated.getMoneroHeightByDate(date: date); + height = csMonero.getHeightByDate(date, csCoin: CsCoin.monero); } if (widget.coin is Wownero) { - height = cs_monero_deprecated.getWowneroHeightByDate(date: date); + height = csMonero.getHeightByDate(date, csCoin: CsCoin.wownero); + } + if (widget.coin is Salvium) { + height = csSalvium.getHeightByDate( + DateTime.now().subtract(const Duration(days: 7)), + ); } if (height < 0) { height = 0; @@ -256,27 +261,26 @@ class _RestoreOptionsViewState extends ConsumerState { return MasterScaffold( isDesktop: isDesktop, - appBar: - isDesktop - ? const DesktopAppBar( - isCompactHeight: false, - leading: AppBarBackButton(), - trailing: ExitToMyStackButton(), - ) - : AppBar( - leading: AppBarBackButton( - onPressed: () { - if (textFieldFocusNode.hasFocus) { - textFieldFocusNode.unfocus(); - Future.delayed( - const Duration(milliseconds: 100), - ).then((value) => Navigator.of(context).pop()); - } else { - Navigator.of(context).pop(); - } - }, - ), + appBar: isDesktop + ? const DesktopAppBar( + isCompactHeight: false, + leading: AppBarBackButton(), + trailing: ExitToMyStackButton(), + ) + : AppBar( + leading: AppBarBackButton( + onPressed: () { + if (textFieldFocusNode.hasFocus) { + textFieldFocusNode.unfocus(); + Future.delayed( + const Duration(milliseconds: 100), + ).then((value) => Navigator.of(context).pop()); + } else { + Navigator.of(context).pop(); + } + }, ), + ), body: RestoreOptionsPlatformLayout( isDesktop: isDesktop, child: ConstrainedBox( @@ -292,10 +296,9 @@ class _RestoreOptionsViewState extends ConsumerState { Text( "Restore options", textAlign: TextAlign.center, - style: - isDesktop - ? STextStyles.desktopH2(context) - : STextStyles.pageTitleH1(context), + style: isDesktop + ? STextStyles.desktopH2(context) + : STextStyles.pageTitleH1(context), ), SizedBox(height: isDesktop ? 40 : 24), if (coin is ViewOnlyOptionCurrencyInterface) @@ -306,12 +309,12 @@ class _RestoreOptionsViewState extends ConsumerState { key: UniqueKey(), onText: "Seed", offText: "View Only", - onColor: - Theme.of(context).extension()!.popupBG, - offColor: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + onColor: Theme.of( + context, + ).extension()!.popupBG, + offColor: Theme.of( + context, + ).extension()!.textFieldDefaultBG, isOn: _showViewOnlyOption, onValueChanged: (value) { setState(() { @@ -330,32 +333,33 @@ class _RestoreOptionsViewState extends ConsumerState { SizedBox(height: isDesktop ? 40 : 24), _showViewOnlyOption ? ViewOnlyRestoreOption( - coin: coin, - dateController: _dateController, - dateChooserFunction: - isDesktop ? chooseDesktopDate : chooseDate, - blockHeightController: _blockHeightController, - blockHeightFocusNode: _blockHeightFocusNode, - ) + coin: coin, + dateController: _dateController, + dateChooserFunction: isDesktop + ? chooseDesktopDate + : chooseDate, + blockHeightController: _blockHeightController, + blockHeightFocusNode: _blockHeightFocusNode, + ) : SeedRestoreOption( - coin: coin, - dateController: _dateController, - blockHeightController: _blockHeightController, - blockHeightFocusNode: _blockHeightFocusNode, - pwController: passwordController, - pwFocusNode: passwordFocusNode, - dateChooserFunction: - isDesktop ? chooseDesktopDate : chooseDate, - chooseMnemonicLength: chooseMnemonicLength, - ), + coin: coin, + dateController: _dateController, + blockHeightController: _blockHeightController, + blockHeightFocusNode: _blockHeightFocusNode, + pwController: passwordController, + pwFocusNode: passwordFocusNode, + dateChooserFunction: isDesktop + ? chooseDesktopDate + : chooseDate, + chooseMnemonicLength: chooseMnemonicLength, + ), if (!isDesktop) const Spacer(flex: 3), SizedBox(height: isDesktop ? 32 : 12), RestoreOptionsNextButton( isDesktop: isDesktop, - onPressed: - ref.watch(_pIsUsingDate) || _hasBlockHeight - ? nextPressed - : null, + onPressed: ref.watch(_pIsUsingDate) || _hasBlockHeight + ? nextPressed + : null, ), if (isDesktop) const Spacer(flex: 15), ], @@ -419,125 +423,129 @@ class _SeedRestoreOptionState extends ConsumerState { return Column( children: [ - if (isCnAnd25 || widget.coin is Epiccash) + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( ref.watch(_pIsUsingDate) ? "Choose start date" : "Block height", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark3, - ) - : STextStyles.smallMed12(context), + style: Util.isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( + context, + ).extension()!.textDark3, + ) + : STextStyles.smallMed12(context), textAlign: TextAlign.left, ), CustomTextButton( - text: - ref.watch(_pIsUsingDate) ? "Use block height" : "Use date", - onTap: - () => - ref.read(_pIsUsingDate.notifier).state = - !ref.read(_pIsUsingDate), + text: ref.watch(_pIsUsingDate) + ? "Use block height" + : "Use date", + onTap: () => ref.read(_pIsUsingDate.notifier).state = !ref.read( + _pIsUsingDate, + ), ), ], ), - if (isCnAnd25 || widget.coin is Epiccash) + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) SizedBox(height: Util.isDesktop ? 16 : 8), - if (isCnAnd25 || widget.coin is Epiccash) + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) ref.watch(_pIsUsingDate) ? RestoreFromDatePicker( - onTap: widget.dateChooserFunction, - controller: widget.dateController, - ) + onTap: widget.dateChooserFunction, + controller: widget.dateController, + ) : ClipRRect( - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - child: TextField( - focusNode: widget.blockHeightFocusNode, - controller: widget.blockHeightController, - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - textInputAction: TextInputAction.done, - style: - Util.isDesktop - ? STextStyles.desktopTextMedium( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + focusNode: widget.blockHeightFocusNode, + controller: widget.blockHeightController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + textInputAction: TextInputAction.done, + style: Util.isDesktop + ? STextStyles.desktopTextMedium( context, ).copyWith(height: 2) - : STextStyles.field(context), - onChanged: (value) { - setState(() { - _blockFieldEmpty = value.isEmpty; - }); - }, - decoration: standardInputDecoration( - "Start scanning from...", - widget.blockHeightFocusNode, - context, - ).copyWith( - suffixIcon: UnconstrainedBox( - child: TextFieldIconButton( - child: Semantics( - label: - "Clear Block Height Field Button. Clears the block height field", - excludeSemantics: true, - child: - !_blockFieldEmpty - ? XIcon( - width: Util.isDesktop ? 24 : 16, - height: Util.isDesktop ? 24 : 16, - ) - : const SizedBox.shrink(), + : STextStyles.field(context), + onChanged: (value) { + setState(() { + _blockFieldEmpty = value.isEmpty; + }); + }, + decoration: + standardInputDecoration( + "Start scanning from...", + widget.blockHeightFocusNode, + context, + ).copyWith( + suffixIcon: UnconstrainedBox( + child: TextFieldIconButton( + child: Semantics( + label: + "Clear Block Height Field Button. Clears the block height field", + excludeSemantics: true, + child: !_blockFieldEmpty + ? XIcon( + width: Util.isDesktop ? 24 : 16, + height: Util.isDesktop ? 24 : 16, + ) + : const SizedBox.shrink(), + ), + onTap: () { + widget.blockHeightController.text = ""; + setState(() { + _blockFieldEmpty = true; + }); + }, + ), + ), ), - onTap: () { - widget.blockHeightController.text = ""; - setState(() { - _blockFieldEmpty = true; - }); - }, - ), - ), ), ), - ), - if (isCnAnd25 || widget.coin is Epiccash) const SizedBox(height: 8), - if (isCnAnd25 || widget.coin is Epiccash) + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) + const SizedBox(height: 8), + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) RoundedWhiteContainer( child: Center( child: Text( ref.watch(_pIsUsingDate) ? "Choose the date you made the wallet (approximate is fine)" : "Enter the initial block height of the wallet", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textSubtitle1, - ) - : STextStyles.smallMed12( + style: Util.isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( context, - ).copyWith(fontSize: 10), + ).extension()!.textSubtitle1, + ) + : STextStyles.smallMed12(context).copyWith(fontSize: 10), ), ), ), - if (isCnAnd25 || widget.coin is Epiccash) + if (isCnAnd25 || + widget.coin is Epiccash || + widget.coin is Mimblewimblecoin) SizedBox(height: Util.isDesktop ? 24 : 16), Text( "Choose recovery phrase length", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of(context).extension()!.textDark3, - ) - : STextStyles.smallMed12(context), + style: Util.isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context).extension()!.textDark3, + ) + : STextStyles.smallMed12(context), textAlign: TextAlign.left, ), SizedBox(height: Util.isDesktop ? 16 : 8), @@ -565,19 +573,17 @@ class _SeedRestoreOptionState extends ConsumerState { iconStyleData: IconStyleData( icon: ConditionalParent( condition: Util.isDesktop, - builder: - (child) => Padding( - padding: const EdgeInsets.only(right: 10), - child: child, - ), + builder: (child) => Padding( + padding: const EdgeInsets.only(right: 10), + child: child, + ), child: SvgPicture.asset( Assets.svg.chevronDown, width: 12, height: 6, - color: - Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), ), ), @@ -585,10 +591,9 @@ class _SeedRestoreOptionState extends ConsumerState { offset: const Offset(0, -10), elevation: 0, decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -625,17 +630,15 @@ class _SeedRestoreOptionState extends ConsumerState { children: [ Text( "Advanced", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark3, - ) - : STextStyles.smallMed12(context), + ).extension()!.textDark3, + ) + : STextStyles.smallMed12(context), textAlign: TextAlign.left, ), SvgPicture.asset( @@ -644,10 +647,9 @@ class _SeedRestoreOptionState extends ConsumerState { : Assets.svg.chevronDown, width: 12, height: 6, - color: - Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, ), ], ), @@ -666,57 +668,56 @@ class _SeedRestoreOptionState extends ConsumerState { key: const Key("mnemonicPassphraseFieldKey1"), focusNode: widget.pwFocusNode, controller: widget.pwController, - style: - Util.isDesktop - ? STextStyles.desktopTextMedium( - context, - ).copyWith(height: 2) - : STextStyles.field(context), + style: Util.isDesktop + ? STextStyles.desktopTextMedium( + context, + ).copyWith(height: 2) + : STextStyles.field(context), obscureText: _hidePassword, enableSuggestions: false, autocorrect: false, - decoration: standardInputDecoration( - widget.coin is CryptonoteCurrency - ? "Seed Offset" - : "BIP39 passphrase", - widget.pwFocusNode, - context, - ).copyWith( - suffixIcon: UnconstrainedBox( - child: ConditionalParent( - condition: Util.isDesktop, - builder: - (child) => SizedBox(height: 70, child: child), - child: Row( - children: [ - SizedBox(width: Util.isDesktop ? 24 : 16), - GestureDetector( - key: const Key( - "mnemonicPassphraseFieldShowPasswordButtonKey", - ), - onTap: () async { - setState(() { - _hidePassword = !_hidePassword; - }); - }, - child: SvgPicture.asset( - _hidePassword - ? Assets.svg.eye - : Assets.svg.eyeSlash, - color: - Theme.of( + decoration: + standardInputDecoration( + widget.coin is CryptonoteCurrency + ? "Seed Offset" + : "BIP39 passphrase", + widget.pwFocusNode, + context, + ).copyWith( + suffixIcon: UnconstrainedBox( + child: ConditionalParent( + condition: Util.isDesktop, + builder: (child) => + SizedBox(height: 70, child: child), + child: Row( + children: [ + SizedBox(width: Util.isDesktop ? 24 : 16), + GestureDetector( + key: const Key( + "mnemonicPassphraseFieldShowPasswordButtonKey", + ), + onTap: () async { + setState(() { + _hidePassword = !_hidePassword; + }); + }, + child: SvgPicture.asset( + _hidePassword + ? Assets.svg.eye + : Assets.svg.eyeSlash, + color: Theme.of( context, ).extension()!.textDark3, - width: Util.isDesktop ? 24 : 16, - height: Util.isDesktop ? 24 : 16, - ), + width: Util.isDesktop ? 24 : 16, + height: Util.isDesktop ? 24 : 16, + ), + ), + const SizedBox(width: 12), + ], ), - const SizedBox(width: 12), - ], + ), ), ), - ), - ), ), ), const SizedBox(height: 8), @@ -725,23 +726,21 @@ class _SeedRestoreOptionState extends ConsumerState { child: Text( widget.coin is CryptonoteCurrency ? "(Optional) An offset used to derive a different " - "wallet from the given mnemonic, allowing recovery " - "of a hidden or alternate wallet based on the same " - "seed phrase." + "wallet from the given mnemonic, allowing recovery " + "of a hidden or alternate wallet based on the same " + "seed phrase." : "If the recovery phrase you are about to restore " - "was created with an optional BIP39 passphrase " - "you can enter it here.", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraSmall( + "was created with an optional BIP39 passphrase " + "you can enter it here.", + style: Util.isDesktop + ? STextStyles.desktopTextExtraSmall( + context, + ).copyWith( + color: Theme.of( context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textSubtitle1, - ) - : STextStyles.itemSubtitle(context), + ).extension()!.textSubtitle1, + ) + : STextStyles.itemSubtitle(context), ), ), ), @@ -798,25 +797,23 @@ class _ViewOnlyRestoreOptionState extends ConsumerState { children: [ Text( ref.watch(_pIsUsingDate) ? "Choose start date" : "Block height", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context).copyWith( + color: Theme.of( context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark3, - ) - : STextStyles.smallMed12(context), + ).extension()!.textDark3, + ) + : STextStyles.smallMed12(context), textAlign: TextAlign.left, ), CustomTextButton( - text: - ref.watch(_pIsUsingDate) ? "Use block height" : "Use date", + text: ref.watch(_pIsUsingDate) + ? "Use block height" + : "Use date", onTap: () { - ref.read(_pIsUsingDate.notifier).state = - !ref.read(_pIsUsingDate); + ref.read(_pIsUsingDate.notifier).state = !ref.read( + _pIsUsingDate, + ); }, ), ], @@ -825,60 +822,59 @@ class _ViewOnlyRestoreOptionState extends ConsumerState { if (showDateOption) ref.watch(_pIsUsingDate) ? RestoreFromDatePicker( - onTap: widget.dateChooserFunction, - controller: widget.dateController, - ) + onTap: widget.dateChooserFunction, + controller: widget.dateController, + ) : ClipRRect( - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - child: TextField( - focusNode: widget.blockHeightFocusNode, - controller: widget.blockHeightController, - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - textInputAction: TextInputAction.done, - style: - Util.isDesktop - ? STextStyles.desktopTextMedium( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + focusNode: widget.blockHeightFocusNode, + controller: widget.blockHeightController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + textInputAction: TextInputAction.done, + style: Util.isDesktop + ? STextStyles.desktopTextMedium( context, ).copyWith(height: 2) - : STextStyles.field(context), - onChanged: (value) { - setState(() { - _blockFieldEmpty = value.isEmpty; - }); - }, - decoration: standardInputDecoration( - "Start scanning from...", - widget.blockHeightFocusNode, - context, - ).copyWith( - suffixIcon: UnconstrainedBox( - child: TextFieldIconButton( - child: Semantics( - label: - "Clear Block Height Field Button. Clears the block height field", - excludeSemantics: true, - child: - !_blockFieldEmpty - ? XIcon( - width: Util.isDesktop ? 24 : 16, - height: Util.isDesktop ? 24 : 16, - ) - : const SizedBox.shrink(), + : STextStyles.field(context), + onChanged: (value) { + setState(() { + _blockFieldEmpty = value.isEmpty; + }); + }, + decoration: + standardInputDecoration( + "Start scanning from...", + widget.blockHeightFocusNode, + context, + ).copyWith( + suffixIcon: UnconstrainedBox( + child: TextFieldIconButton( + child: Semantics( + label: + "Clear Block Height Field Button. Clears the block height field", + excludeSemantics: true, + child: !_blockFieldEmpty + ? XIcon( + width: Util.isDesktop ? 24 : 16, + height: Util.isDesktop ? 24 : 16, + ) + : const SizedBox.shrink(), + ), + onTap: () { + widget.blockHeightController.text = ""; + setState(() { + _blockFieldEmpty = true; + }); + }, + ), + ), ), - onTap: () { - widget.blockHeightController.text = ""; - setState(() { - _blockFieldEmpty = true; - }); - }, - ), - ), ), ), - ), if (showDateOption) const SizedBox(height: 8), if (showDateOption) RoundedWhiteContainer( @@ -887,17 +883,13 @@ class _ViewOnlyRestoreOptionState extends ConsumerState { ref.watch(_pIsUsingDate) ? "Choose the date you made the wallet (approximate is fine)" : "Enter the initial block height of the wallet", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textSubtitle1, - ) - : STextStyles.smallMed12( + style: Util.isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( context, - ).copyWith(fontSize: 10), + ).extension()!.textSubtitle1, + ) + : STextStyles.smallMed12(context).copyWith(fontSize: 10), ), ), ), diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_view_only_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_view_only_wallet_view.dart index a473d83ec..e0d3871c4 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_view_only_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_view_only_wallet_view.dart @@ -25,6 +25,7 @@ import '../../../wallets/crypto_currency/intermediate/bip39_hd_currency.dart'; import '../../../wallets/crypto_currency/intermediate/cryptonote_currency.dart'; import '../../../wallets/isar/models/wallet_info.dart'; import '../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../wallets/wallet/impl/monero_wallet.dart'; import '../../../wallets/wallet/impl/wownero_wallet.dart'; import '../../../wallets/wallet/impl/xelis_wallet.dart'; @@ -219,6 +220,10 @@ class _RestoreViewOnlyWalletViewState case const (EpiccashWallet): await (wallet as EpiccashWallet).init(isRestore: true); break; + + case const (MimblewimblecoinWallet): + await (wallet as MimblewimblecoinWallet).init(isRestore: true); + break; case const (MoneroWallet): await (wallet as MoneroWallet).init(isRestore: true); diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart index aeb9ff845..50df15202 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart @@ -16,13 +16,11 @@ import 'dart:math'; import 'package:bip39/bip39.dart' as bip39; import 'package:bip39/src/wordlists/english.dart' as bip39wordlist; -import 'package:cs_monero/cs_monero.dart' as lib_monero; 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:wakelock_plus/wakelock_plus.dart'; -import 'package:xelis_flutter/src/api/seed_search_engine.dart' as x_seed; import '../../../notifications/show_flush_bar.dart'; import '../../../pages_desktop_specific/desktop_home_view.dart'; @@ -44,12 +42,14 @@ import '../../../utilities/util.dart'; import '../../../wallets/crypto_currency/crypto_currency.dart'; import '../../../wallets/isar/models/wallet_info.dart'; import '../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../wallets/wallet/impl/monero_wallet.dart'; import '../../../wallets/wallet/impl/salvium_wallet.dart'; import '../../../wallets/wallet/impl/wownero_wallet.dart'; import '../../../wallets/wallet/impl/xelis_wallet.dart'; import '../../../wallets/wallet/intermediate/external_wallet.dart'; import '../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart'; +import '../../../wallets/wallet/supporting/mimblewimblecoin_wallet_info_extension.dart'; import '../../../wallets/wallet/wallet.dart'; import '../../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../../widgets/desktop/desktop_app_bar.dart'; @@ -60,6 +60,8 @@ import '../../../widgets/icon_widgets/qrcode_icon.dart'; import '../../../widgets/table_view/table_view.dart'; import '../../../widgets/table_view/table_view_cell.dart'; import '../../../widgets/table_view/table_view_row.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/lib_xelis_interface.dart'; import '../../home_view/home_view.dart'; import '../add_token_view/edit_wallet_tokens_view.dart'; import '../select_wallet_for_token_view.dart'; @@ -99,7 +101,6 @@ class _RestoreWalletViewState extends ConsumerState { late final int _seedWordCount; late final bool isDesktop; - x_seed.SearchEngine? _xelisSeedSearch; final HashSet _wordListHashSet = HashSet.from(bip39wordlist.WORDLIST); final ScrollController controller = ScrollController(); @@ -151,10 +152,9 @@ class _RestoreWalletViewState extends ConsumerState { _seedWordCount = widget.seedWordsLength; isDesktop = Util.isDesktop; - textSelectionControls = - Platform.isIOS - ? CustomCupertinoTextSelectionControls(onPaste: onControlsPaste) - : CustomMaterialTextSelectionControls(onPaste: onControlsPaste); + textSelectionControls = Platform.isIOS + ? CustomCupertinoTextSelectionControls(onPaste: onControlsPaste) + : CustomMaterialTextSelectionControls(onPaste: onControlsPaste); for (int i = 0; i < _seedWordCount; i++) { _controllers.add(TextEditingController()); @@ -162,12 +162,6 @@ class _RestoreWalletViewState extends ConsumerState { // _focusNodes.add(FocusNode()); } - if (widget.coin is Xelis) { - _xelisSeedSearch = x_seed.SearchEngine.init( - languageIndex: BigInt.from(0), - ); - } - super.initState(); } @@ -187,7 +181,7 @@ class _RestoreWalletViewState extends ConsumerState { // Salvium use's Monero's wordlists. switch (widget.seedWordsLength) { case 25: - return lib_monero.getMoneroWordList("English").contains(word); + return csMonero.getMoneroWordList("English").contains(word); case 16: return Monero.sixteenWordsWordList.contains(word); default: @@ -195,14 +189,14 @@ class _RestoreWalletViewState extends ConsumerState { } } if (widget.coin is Wownero) { - final wowneroWordList = lib_monero.getWowneroWordList( + final wowneroWordList = csMonero.getWowneroWordList( "English", - seedWordsLength: widget.seedWordsLength, + widget.seedWordsLength, ); return wowneroWordList.contains(word); } if (widget.coin is Xelis) { - return _xelisSeedSearch!.search(query: word).length > 0; + return libXelis.validateSeedWord(word); } return _wordListHashSet.contains(word); } @@ -224,7 +218,7 @@ class _RestoreWalletViewState extends ConsumerState { } mnemonic = mnemonic.trim(); - final int height = widget.restoreBlockHeight; + int height = widget.restoreBlockHeight; String? otherDataJsonString; // TODO: make more robust estimate of date maybe using https://explorer.epic.tech/api-index @@ -242,6 +236,34 @@ class _RestoreWalletViewState extends ConsumerState { ).toMap(), ), }); + } else if (widget.coin is Mimblewimblecoin) { + // final int secondsSinceEpoch = + // widget.restoreFromDate!.millisecondsSinceEpoch ~/ 1000; + final int secondsSinceEpoch = + DateTime.now().millisecondsSinceEpoch ~/ 1000; + const int mimblewimblecoinFirstBlock = 1573462801; + const double overestimateSecondsPerBlock = 61; + final int chosenSeconds = + secondsSinceEpoch - mimblewimblecoinFirstBlock; + final int approximateHeight = + chosenSeconds ~/ overestimateSecondsPerBlock; + height = approximateHeight; + if (height < 0) { + height = 0; + } + otherDataJsonString = jsonEncode({ + WalletInfoKeys.mimblewimblecoinData: jsonEncode( + ExtraMimblewimblecoinWalletInfo( + receivingIndex: 0, + changeIndex: 0, + slatesToAddresses: {}, + slatesToCommits: {}, + lastScannedBlock: height, + restoreHeight: height, + creationHeight: height, + ).toMap(), + ), + }); } // TODO: do actual check to make sure it is a valid mnemonic for monero + xelis @@ -325,6 +347,10 @@ class _RestoreWalletViewState extends ConsumerState { await (wallet as EpiccashWallet).init(isRestore: true); break; + case const (MimblewimblecoinWallet): + await (wallet as MimblewimblecoinWallet).init(isRestore: true); + break; + case const (MoneroWallet): await (wallet as MoneroWallet).init(isRestore: true); break; @@ -375,10 +401,8 @@ class _RestoreWalletViewState extends ConsumerState { ref .read(newEthWalletTriggerTempUntilHiveCompletelyDeleted.state) .state = !ref - .read( - newEthWalletTriggerTempUntilHiveCompletelyDeleted.state, - ) - .state; + .read(newEthWalletTriggerTempUntilHiveCompletelyDeleted.state) + .state; } if (mounted) { @@ -477,43 +501,42 @@ class _RestoreWalletViewState extends ConsumerState { case FormInputStatus.empty: color = Theme.of(context).extension()!.textFieldDefaultBG; prefixColor = Theme.of(context).extension()!.textSubtitle2; - borderColor = - Theme.of(context).extension()!.textFieldDefaultBG; + borderColor = Theme.of( + context, + ).extension()!.textFieldDefaultBG; break; case FormInputStatus.invalid: color = Theme.of(context).extension()!.textFieldErrorBG; - prefixColor = - Theme.of( - context, - ).extension()!.textFieldErrorSearchIconLeft; - borderColor = - Theme.of(context).extension()!.textFieldErrorBorder; + prefixColor = Theme.of( + context, + ).extension()!.textFieldErrorSearchIconLeft; + borderColor = Theme.of( + context, + ).extension()!.textFieldErrorBorder; suffixIcon = SvgPicture.asset( Assets.svg.alertCircle, width: 16, height: 16, - color: - Theme.of( - context, - ).extension()!.textFieldErrorSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldErrorSearchIconRight, ); break; case FormInputStatus.valid: color = Theme.of(context).extension()!.textFieldSuccessBG; - prefixColor = - Theme.of( - context, - ).extension()!.textFieldSuccessSearchIconLeft; - borderColor = - Theme.of(context).extension()!.textFieldSuccessBorder; + prefixColor = Theme.of( + context, + ).extension()!.textFieldSuccessSearchIconLeft; + borderColor = Theme.of( + context, + ).extension()!.textFieldSuccessBorder; suffixIcon = SvgPicture.asset( Assets.svg.checkCircle, width: 16, height: 16, - color: - Theme.of( - context, - ).extension()!.textFieldSuccessSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldSuccessSearchIconRight, ); break; } @@ -672,90 +695,85 @@ class _RestoreWalletViewState extends ConsumerState { final isDesktop = Util.isDesktop; return MasterScaffold( isDesktop: isDesktop, - appBar: - isDesktop - ? const DesktopAppBar( - isCompactHeight: false, - leading: AppBarBackButton(), - trailing: ExitToMyStackButton(), - ) - : AppBar( - leading: AppBarBackButton( - onPressed: () async { - if (FocusScope.of(context).hasFocus) { - FocusScope.of(context).unfocus(); - await Future.delayed( - const Duration(milliseconds: 50), - ); - } - if (context.mounted) { - Navigator.of(context).pop(); - } - }, - ), - actions: [ - Padding( - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - right: 10, - ), - child: AspectRatio( - aspectRatio: 1, - child: AppBarIconButton( - semanticsLabel: - "View QR Code Button. Opens Camera To Scan QR Code For Restoring Wallet.", - key: const Key("restoreWalletViewQrCodeButton"), - size: 36, - shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, - icon: QrCodeIcon( - width: 20, - height: 20, - color: - Theme.of( - context, - ).extension()!.accentColorDark, - ), - onPressed: scanMnemonicQr, + appBar: isDesktop + ? const DesktopAppBar( + isCompactHeight: false, + leading: AppBarBackButton(), + trailing: ExitToMyStackButton(), + ) + : AppBar( + leading: AppBarBackButton( + onPressed: () async { + if (FocusScope.of(context).hasFocus) { + FocusScope.of(context).unfocus(); + await Future.delayed( + const Duration(milliseconds: 50), + ); + } + if (context.mounted) { + Navigator.of(context).pop(); + } + }, + ), + actions: [ + Padding( + padding: const EdgeInsets.only( + top: 10, + bottom: 10, + right: 10, + ), + child: AspectRatio( + aspectRatio: 1, + child: AppBarIconButton( + semanticsLabel: + "View QR Code Button. Opens Camera To Scan QR Code For Restoring Wallet.", + key: const Key("restoreWalletViewQrCodeButton"), + size: 36, + shadows: const [], + color: Theme.of( + context, + ).extension()!.background, + icon: QrCodeIcon( + width: 20, + height: 20, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), + onPressed: scanMnemonicQr, ), ), - Padding( - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - right: 10, - ), - child: AspectRatio( - aspectRatio: 1, - child: AppBarIconButton( - semanticsLabel: - "Paste Button. Pastes From Clipboard For Restoring Wallet.", - key: const Key("restoreWalletPasteButton"), - size: 36, - shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, - icon: ClipboardIcon( - width: 20, - height: 20, - color: - Theme.of( - context, - ).extension()!.accentColorDark, - ), - onPressed: pasteMnemonic, + ), + Padding( + padding: const EdgeInsets.only( + top: 10, + bottom: 10, + right: 10, + ), + child: AspectRatio( + aspectRatio: 1, + child: AppBarIconButton( + semanticsLabel: + "Paste Button. Pastes From Clipboard For Restoring Wallet.", + key: const Key("restoreWalletPasteButton"), + size: 36, + shadows: const [], + color: Theme.of( + context, + ).extension()!.background, + icon: ClipboardIcon( + width: 20, + height: 20, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), + onPressed: pasteMnemonic, ), ), - ], - ), + ), + ], + ), body: Container( color: Theme.of(context).extension()!.background, child: Padding( @@ -776,18 +794,16 @@ class _RestoreWalletViewState extends ConsumerState { SizedBox(height: isDesktop ? 0 : 4), Text( "Recovery phrase", - style: - isDesktop - ? STextStyles.desktopH2(context) - : STextStyles.pageTitleH1(context), + style: isDesktop + ? STextStyles.desktopH2(context) + : STextStyles.pageTitleH1(context), ), SizedBox(height: isDesktop ? 16 : 8), Text( "Enter your $_seedWordCount-word recovery phrase.", - style: - isDesktop - ? STextStyles.desktopSubtitleH2(context) - : STextStyles.subtitle(context), + style: isDesktop + ? STextStyles.desktopSubtitleH2(context) + : STextStyles.subtitle(context), ), SizedBox(height: isDesktop ? 16 : 10), if (isDesktop) @@ -807,10 +823,9 @@ class _RestoreWalletViewState extends ConsumerState { Assets.svg.clipboard, width: 22, height: 22, - color: - Theme.of(context) - .extension()! - .buttonTextSecondary, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, ), const SizedBox(width: 8), Text( @@ -876,8 +891,8 @@ class _RestoreWalletViewState extends ConsumerState { .onUserInteraction, selectionControls: i * 4 + j - 1 == 1 - ? textSelectionControls - : null, + ? textSelectionControls + : null, // focusNode: // _focusNodes[i * 4 + j - 1], onChanged: (value) { @@ -923,18 +938,19 @@ class _RestoreWalletViewState extends ConsumerState { _controllers[i * 4 + j - 1], - style: STextStyles.field( - context, - ).copyWith( - color: - Theme.of(context) + style: + STextStyles.field( + context, + ).copyWith( + color: Theme.of(context) .extension< StackColors >()! .textRestore, - fontSize: - isDesktop ? 16 : 14, - ), + fontSize: isDesktop + ? 16 + : 14, + ), ), if (_inputStatuses[i * 4 + j - @@ -953,16 +969,19 @@ class _RestoreWalletViewState extends ConsumerState { "Please check spelling", textAlign: TextAlign.left, - style: STextStyles.label( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textError, - ), + style: + STextStyles.label( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textError, + ), ), ), ), @@ -1014,10 +1033,9 @@ class _RestoreWalletViewState extends ConsumerState { autovalidateMode: AutovalidateMode .onUserInteraction, - selectionControls: - i == 1 - ? textSelectionControls - : null, + selectionControls: i == 1 + ? textSelectionControls + : null, onChanged: (value) { final FormInputStatus formInputStatus; @@ -1044,18 +1062,19 @@ class _RestoreWalletViewState extends ConsumerState { }); }, controller: _controllers[i], - style: STextStyles.field( - context, - ).copyWith( - color: - Theme.of(context) + style: + STextStyles.field( + context, + ).copyWith( + color: Theme.of(context) .extension< StackColors >()! .overlay, - fontSize: - isDesktop ? 16 : 14, - ), + fontSize: isDesktop + ? 16 + : 14, + ), ), if (_inputStatuses[i] == FormInputStatus.invalid) @@ -1072,16 +1091,19 @@ class _RestoreWalletViewState extends ConsumerState { "Please check spelling", textAlign: TextAlign.left, - style: STextStyles.label( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textError, - ), + style: + STextStyles.label( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textError, + ), ), ), ), @@ -1147,8 +1169,9 @@ class _RestoreWalletViewState extends ConsumerState { ), autovalidateMode: AutovalidateMode.onUserInteraction, - selectionControls: - i == 1 ? textSelectionControls : null, + selectionControls: i == 1 + ? textSelectionControls + : null, // focusNode: _focusNodes[i - 1], onChanged: (value) { final FormInputStatus formInputStatus; @@ -1178,10 +1201,9 @@ class _RestoreWalletViewState extends ConsumerState { }, controller: _controllers[i - 1], style: STextStyles.field(context).copyWith( - color: - Theme.of(context) - .extension()! - .textRestore, + color: Theme.of( + context, + ).extension()!.textRestore, fontSize: isDesktop ? 16 : 14, ), ), @@ -1198,14 +1220,12 @@ class _RestoreWalletViewState extends ConsumerState { child: Text( "Please check spelling", textAlign: TextAlign.left, - style: STextStyles.label( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.label(context) + .copyWith( + color: Theme.of(context) .extension()! .textError, - ), + ), ), ), ), diff --git a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart index c562ec88e..9494b6630 100644 --- a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart +++ b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart @@ -12,10 +12,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:math'; -import 'package:cs_monero/src/deprecated/get_height_by_date.dart' - as cs_monero_deprecated; -import 'package:cs_salvium/src/deprecated/get_height_by_date.dart' - as cs_salvium_deprecated; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -50,6 +46,8 @@ import '../../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../../widgets/desktop/desktop_app_bar.dart'; import '../../../widgets/desktop/desktop_scaffold.dart'; import '../../../widgets/stack_dialog.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../../home_view/home_view.dart'; import '../add_token_view/edit_wallet_tokens_view.dart'; import '../new_wallet_options/new_wallet_options_view.dart'; @@ -95,11 +93,6 @@ class _VerifyRecoveryPhraseViewState super.initState(); } - @override - dispose() { - super.dispose(); - } - Future _verifyMnemonicPassphrase() async { final result = await showDialog( context: context, @@ -121,18 +114,20 @@ class _VerifyRecoveryPhraseViewState } else if (widget.wallet is LibMoneroWallet || widget.wallet is LibSalviumWallet) { if (widget.wallet.cryptoCurrency is Monero) { - height = cs_monero_deprecated.getMoneroHeightByDate( - date: DateTime.now().subtract(const Duration(days: 7)), + height = csMonero.getHeightByDate( + DateTime.now().subtract(const Duration(days: 7)), + csCoin: CsCoin.monero, ); } if (widget.wallet.cryptoCurrency is Wownero) { - height = cs_monero_deprecated.getWowneroHeightByDate( - date: DateTime.now().subtract(const Duration(days: 7)), + height = csMonero.getHeightByDate( + DateTime.now().subtract(const Duration(days: 7)), + csCoin: CsCoin.wownero, ); } if (widget.wallet.cryptoCurrency is Salvium) { - height = cs_salvium_deprecated.getSalviumHeightByDate( - date: DateTime.now().subtract(const Duration(days: 7)), + height = csSalvium.getHeightByDate( + DateTime.now().subtract(const Duration(days: 7)), ); } if (height < 0) height = 0; @@ -156,8 +151,8 @@ class _VerifyRecoveryPhraseViewState final ViewOnlyWalletData viewOnlyData; if (widget.wallet is ExtendedKeysInterface) { - final extendedKeyInfo = - await (widget.wallet as ExtendedKeysInterface).getXPubs(); + final extendedKeyInfo = await (widget.wallet as ExtendedKeysInterface) + .getXPubs(); final testPath = (_coin as Bip39HDCurrency).constructDerivePath( derivePathType: (_coin as Bip39HDCurrency).defaultDerivePathType, chain: 0, @@ -183,9 +178,8 @@ class _VerifyRecoveryPhraseViewState } else if (widget.wallet is LibMoneroWallet) { final w = widget.wallet as LibMoneroWallet; - final info = - await w - .hackToCreateNewViewOnlyWalletDataFromNewlyCreatedWalletThisFunctionShouldNotBeCalledUnlessYouKnowWhatYouAreDoing(); + final info = await w + .hackToCreateNewViewOnlyWalletDataFromNewlyCreatedWalletThisFunctionShouldNotBeCalledUnlessYouKnowWhatYouAreDoing(); final address = info.$1; final privateViewKey = info.$2; @@ -199,9 +193,8 @@ class _VerifyRecoveryPhraseViewState } else if (widget.wallet is LibSalviumWallet) { final w = widget.wallet as LibSalviumWallet; - final info = - await w - .hackToCreateNewViewOnlyWalletDataFromNewlyCreatedWalletThisFunctionShouldNotBeCalledUnlessYouKnowWhatYouAreDoing(); + final info = await w + .hackToCreateNewViewOnlyWalletDataFromNewlyCreatedWalletThisFunctionShouldNotBeCalledUnlessYouKnowWhatYouAreDoing(); final address = info.$1; final privateViewKey = info.$2; @@ -315,8 +308,8 @@ class _VerifyRecoveryPhraseViewState ref .read(newEthWalletTriggerTempUntilHiveCompletelyDeleted.state) .state = !ref - .read(newEthWalletTriggerTempUntilHiveCompletelyDeleted.state) - .state; + .read(newEthWalletTriggerTempUntilHiveCompletelyDeleted.state) + .state; } if (mounted && @@ -343,11 +336,10 @@ class _VerifyRecoveryPhraseViewState if (mounted) { await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: e.toString(), - desktopPopRootNavigator: Util.isDesktop, - ), + builder: (_) => StackOkDialog( + title: e.toString(), + desktopPopRootNavigator: Util.isDesktop, + ), ); } @@ -391,12 +383,15 @@ class _VerifyRecoveryPhraseViewState ).pushNamedAndRemoveUntil(HomeView.routeName, (route) => false), ); if (_coin is Ethereum) { - unawaited( - Navigator.of(context).pushNamed( - EditWalletTokensView.routeName, - arguments: widget.wallet.walletId, - ), - ); + WidgetsBinding.instance.addPostFrameCallback((_) { + ref + .read(pNavKey) + .currentState + ?.pushNamed( + EditWalletTokensView.routeName, + arguments: widget.wallet.walletId, + ); + }); } } } @@ -487,53 +482,54 @@ class _VerifyRecoveryPhraseViewState @override Widget build(BuildContext context) { debugPrint("BUILD: $runtimeType"); - final correctIndex = - ref.watch(verifyMnemonicWordIndexStateProvider.state).state; + final correctIndex = ref + .watch(verifyMnemonicWordIndexStateProvider.state) + .state; return WillPopScope( onWillPop: onWillPop, child: MasterScaffold( isDesktop: isDesktop, - appBar: - isDesktop - ? DesktopAppBar( - isCompactHeight: false, - leading: AppBarBackButton( - onPressed: () async { - Navigator.of(context).popUntil( - ModalRoute.withName( - NewWalletRecoveryPhraseView.routeName, - ), - ); - }, - ), - trailing: ExitToMyStackButton( - onPressed: () async { - await delete(); - if (context.mounted) { - Navigator.of(context).popUntil( - ModalRoute.withName(DesktopHomeView.routeName), - ); - } - }, - ), - ) - : AppBar( - leading: AppBarBackButton( - onPressed: () async { + appBar: isDesktop + ? DesktopAppBar( + isCompactHeight: false, + leading: AppBarBackButton( + onPressed: () async { + Navigator.of(context).popUntil( + ModalRoute.withName( + NewWalletRecoveryPhraseView.routeName, + ), + ); + }, + ), + trailing: ExitToMyStackButton( + onPressed: () async { + await delete(); + if (context.mounted) { Navigator.of(context).popUntil( - ModalRoute.withName( - NewWalletRecoveryPhraseView.routeName, - ), + ModalRoute.withName(DesktopHomeView.routeName), ); - }, - ), + } + }, + ), + ) + : AppBar( + leading: AppBarBackButton( + onPressed: () async { + Navigator.of(context).popUntil( + ModalRoute.withName( + NewWalletRecoveryPhraseView.routeName, + ), + ); + }, ), + ), body: SizedBox( width: isDesktop ? 410 : null, child: Padding( - padding: - isDesktop ? const EdgeInsets.all(0) : const EdgeInsets.all(16), + padding: isDesktop + ? const EdgeInsets.all(0) + : const EdgeInsets.all(16), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -542,27 +538,24 @@ class _VerifyRecoveryPhraseViewState Text( "Verify recovery phrase", textAlign: TextAlign.center, - style: - isDesktop - ? STextStyles.desktopH2(context) - : STextStyles.label(context).copyWith(fontSize: 12), + style: isDesktop + ? STextStyles.desktopH2(context) + : STextStyles.label(context).copyWith(fontSize: 12), ), SizedBox(height: isDesktop ? 16 : 4), Text( isDesktop ? "Select word number" : "Tap word number ", textAlign: TextAlign.center, - style: - isDesktop - ? STextStyles.desktopSubtitleH1(context) - : STextStyles.pageTitleH1(context), + style: isDesktop + ? STextStyles.desktopSubtitleH1(context) + : STextStyles.pageTitleH1(context), ), SizedBox(height: isDesktop ? 16 : 12), Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -593,61 +586,51 @@ class _VerifyRecoveryPhraseViewState Expanded( child: Consumer( builder: (_, ref, __) { - final selectedWord = - ref - .watch( - verifyMnemonicSelectedWordStateProvider - .state, - ) - .state; - final correctWord = - ref - .watch( - verifyMnemonicCorrectWordStateProvider - .state, - ) - .state; + final selectedWord = ref + .watch( + verifyMnemonicSelectedWordStateProvider.state, + ) + .state; + final correctWord = ref + .watch( + verifyMnemonicCorrectWordStateProvider.state, + ) + .state; return ConstrainedBox( constraints: BoxConstraints( minHeight: isDesktop ? 70 : 0, ), child: TextButton( - onPressed: - selectedWord.isNotEmpty - ? () async { - await _continue( - correctWord == selectedWord, - ); - } - : null, - style: - selectedWord.isNotEmpty - ? Theme.of(context) - .extension()! - .getPrimaryEnabledButtonStyle(context) - : Theme.of(context) - .extension()! - .getPrimaryDisabledButtonStyle( - context, - ), - child: - isDesktop - ? Text( - "Verify", - style: - selectedWord.isNotEmpty - ? STextStyles.desktopButtonEnabled( - context, - ) - : STextStyles.desktopButtonDisabled( - context, - ), - ) - : Text( - "Continue", - style: STextStyles.button(context), - ), + onPressed: selectedWord.isNotEmpty + ? () async { + await _continue( + correctWord == selectedWord, + ); + } + : null, + style: selectedWord.isNotEmpty + ? Theme.of(context) + .extension()! + .getPrimaryEnabledButtonStyle(context) + : Theme.of(context) + .extension()! + .getPrimaryDisabledButtonStyle(context), + child: isDesktop + ? Text( + "Verify", + style: selectedWord.isNotEmpty + ? STextStyles.desktopButtonEnabled( + context, + ) + : STextStyles.desktopButtonDisabled( + context, + ), + ) + : Text( + "Continue", + style: STextStyles.button(context), + ), ), ); }, diff --git a/lib/pages/address_book_views/subviews/contact_details_view.dart b/lib/pages/address_book_views/subviews/contact_details_view.dart index 0ee0e6b93..2540c736c 100644 --- a/lib/pages/address_book_views/subviews/contact_details_view.dart +++ b/lib/pages/address_book_views/subviews/contact_details_view.dart @@ -14,7 +14,7 @@ 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:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../models/isar/models/isar_models.dart'; diff --git a/lib/pages/buy_view/buy_form.dart b/lib/pages/buy_view/buy_form.dart index 64a7ba40f..8f8a0c9b8 100644 --- a/lib/pages/buy_view/buy_form.dart +++ b/lib/pages/buy_view/buy_form.dart @@ -16,7 +16,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:intl/intl.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../app_config.dart'; import '../../models/buy/response_objects/crypto.dart'; diff --git a/lib/pages/buy_view/buy_view.dart b/lib/pages/buy_view/buy_view.dart index 9589621cc..552a8457e 100644 --- a/lib/pages/buy_view/buy_view.dart +++ b/lib/pages/buy_view/buy_view.dart @@ -10,21 +10,19 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../app_config.dart'; import '../../models/isar/models/ethereum/eth_contract.dart'; -import 'buy_form.dart'; import '../../services/event_bus/events/global/tor_connection_status_changed_event.dart'; import '../../services/tor_service.dart'; import '../../themes/stack_colors.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; import '../../widgets/stack_dialog.dart'; import '../../widgets/tor_subscription.dart'; +import 'buy_form.dart'; class BuyView extends ConsumerStatefulWidget { - const BuyView({ - super.key, - this.coin, - this.tokenContract, - }); + const BuyView({super.key, this.coin, this.tokenContract}); final CryptoCurrency? coin; final EthContract? tokenContract; @@ -46,8 +44,9 @@ class _BuyViewState extends ConsumerState { coin = widget.coin; tokenContract = widget.tokenContract; - torEnabled = - ref.read(pTorService).status != TorConnectionStatus.disconnected; + torEnabled = AppConfig.hasFeature(AppFeature.tor) + ? ref.read(pTorService).status != TorConnectionStatus.disconnected + : false; super.initState(); } @@ -66,23 +65,15 @@ class _BuyViewState extends ConsumerState { children: [ SafeArea( child: Padding( - padding: const EdgeInsets.only( - left: 16, - right: 16, - top: 16, - ), - child: BuyForm( - coin: coin, - tokenContract: tokenContract, - ), + padding: const EdgeInsets.only(left: 16, right: 16, top: 16), + child: BuyForm(coin: coin, tokenContract: tokenContract), ), ), if (torEnabled) Container( - color: Theme.of(context) - .extension()! - .overlay - .withOpacity(0.7), + color: Theme.of( + context, + ).extension()!.overlay.withOpacity(0.7), height: MediaQuery.of(context).size.height, width: MediaQuery.of(context).size.width, child: const StackDialog( diff --git a/lib/pages/coin_control/coin_control_view.dart b/lib/pages/coin_control/coin_control_view.dart index cb288f845..796073364 100644 --- a/lib/pages/coin_control/coin_control_view.dart +++ b/lib/pages/coin_control/coin_control_view.dart @@ -13,7 +13,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../db/isar/main_db.dart'; @@ -44,10 +44,7 @@ import '../../widgets/toggle.dart'; import 'utxo_card.dart'; import 'utxo_details_view.dart'; -enum CoinControlViewType { - manage, - use; -} +enum CoinControlViewType { manage, use } class CoinControlView extends ConsumerStatefulWidget { const CoinControlView({ @@ -126,11 +123,12 @@ class _CoinControlViewState extends ConsumerState { Widget build(BuildContext context) { debugPrint("BUILD: $runtimeType"); - final minConfirms = ref - .watch(pWallets) - .getWallet(widget.walletId) - .cryptoCurrency - .minConfirms; + final minConfirms = + ref + .watch(pWallets) + .getWallet(widget.walletId) + .cryptoCurrency + .minConfirms; final coin = ref.watch(pWalletCoin(widget.walletId)); final currentHeight = ref.watch(pWalletChainHeight(widget.walletId)); @@ -148,9 +146,10 @@ class _CoinControlViewState extends ConsumerState { _map = null; _list = MainDB.instance.queryUTXOsSync( walletId: widget.walletId, - filter: _isSearching - ? CCFilter.all - : _showBlocked + filter: + _isSearching + ? CCFilter.all + : _showBlocked ? CCFilter.frozen : CCFilter.available, sort: _sort, @@ -173,119 +172,121 @@ class _CoinControlViewState extends ConsumerState { Theme.of(context).extension()!.background, appBar: AppBar( automaticallyImplyLeading: false, - leading: _isSearching - ? null - : widget.type == CoinControlViewType.use && + leading: + _isSearching + ? null + : widget.type == CoinControlViewType.use && _selectedAvailable.isNotEmpty ? AppBarIconButton( - icon: XIcon( - width: 24, - height: 24, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, - ), - onPressed: () { - setState(() { - _selectedAvailable.clear(); - }); - }, - ) - : AppBarBackButton( - onPressed: () { - unawaited(_refreshBalance()); - Navigator.of(context).pop( - widget.type == CoinControlViewType.use - ? _selectedAvailable - : null, - ); - }, - ), - title: _isSearching - ? AppBarSearchField( - controller: searchController, - focusNode: searchFocus, - ) - : Text( - "Coin control", - style: STextStyles.navBarTitle(context), - ), - titleSpacing: 0, - actions: _isSearching - ? [ - AspectRatio( - aspectRatio: 1, - child: AppBarIconButton( - size: 36, - icon: SvgPicture.asset( - Assets.svg.x, - width: 20, - height: 20, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, - ), - onPressed: () { - // show search - setState(() { - _isSearching = false; - }); - }, + icon: XIcon( + width: 24, + height: 24, + color: + Theme.of( + context, + ).extension()!.topNavIconPrimary, ), + onPressed: () { + setState(() { + _selectedAvailable.clear(); + }); + }, + ) + : AppBarBackButton( + onPressed: () { + unawaited(_refreshBalance()); + Navigator.of(context).pop( + widget.type == CoinControlViewType.use + ? _selectedAvailable + : null, + ); + }, ), - ] - : [ - AspectRatio( - aspectRatio: 1, - child: AppBarIconButton( - size: 36, - icon: SvgPicture.asset( - Assets.svg.search, - width: 20, - height: 20, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, + title: + _isSearching + ? AppBarSearchField( + controller: searchController, + focusNode: searchFocus, + ) + : Text( + "Coin control", + style: STextStyles.navBarTitle(context), + ), + titleSpacing: 0, + actions: + _isSearching + ? [ + AspectRatio( + aspectRatio: 1, + child: AppBarIconButton( + size: 36, + icon: SvgPicture.asset( + Assets.svg.x, + width: 20, + height: 20, + color: + Theme.of( + context, + ).extension()!.topNavIconPrimary, + ), + onPressed: () { + // show search + setState(() { + _isSearching = false; + }); + }, ), - onPressed: () { - // show search - setState(() { - _isSearching = true; - }); - }, ), - ), - AspectRatio( - aspectRatio: 1, - child: JDropdownIconButton( - mobileAppBar: true, - groupValue: _sort, - items: CCSortDescriptor.values.toSet(), - onSelectionChanged: (CCSortDescriptor? newValue) { - if (newValue != null && newValue != _sort) { + ] + : [ + AspectRatio( + aspectRatio: 1, + child: AppBarIconButton( + size: 36, + icon: SvgPicture.asset( + Assets.svg.search, + width: 20, + height: 20, + color: + Theme.of( + context, + ).extension()!.topNavIconPrimary, + ), + onPressed: () { + // show search setState(() { - _sort = newValue; + _isSearching = true; }); - } - }, - displayPrefix: "Sort by", + }, + ), ), - ), - ], + AspectRatio( + aspectRatio: 1, + child: JDropdownIconButton( + mobileAppBar: true, + groupValue: _sort, + items: CCSortDescriptor.values.toSet(), + onSelectionChanged: (CCSortDescriptor? newValue) { + if (newValue != null && newValue != _sort) { + setState(() { + _sort = newValue; + }); + } + }, + displayPrefix: "Sort by", + ), + ), + ], ), body: SafeArea( child: Column( children: [ Expanded( child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - ), + padding: const EdgeInsets.symmetric(horizontal: 16), child: Column( children: [ - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), if (!_isSearching) RoundedWhiteContainer( child: Text( @@ -293,28 +294,28 @@ class _CoinControlViewState extends ConsumerState { "outputs at your discretion. Tap the output circle to " "select.", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), ), - if (!_isSearching) - const SizedBox( - height: 10, - ), + if (!_isSearching) const SizedBox(height: 10), if (!(_isSearching || _map != null)) SizedBox( height: 48, child: Toggle( key: UniqueKey(), - onColor: Theme.of(context) - .extension()! - .popupBG, + onColor: + Theme.of( + context, + ).extension()!.popupBG, onText: "Available outputs", - offColor: Theme.of(context) - .extension()! - .textFieldDefaultBG, + offColor: + Theme.of(context) + .extension()! + .textFieldDefaultBG, offText: "Frozen outputs", isOn: _showBlocked, onValueChanged: (value) { @@ -330,26 +331,23 @@ class _CoinControlViewState extends ConsumerState { ), ), ), - if (!_isSearching) - const SizedBox( - height: 10, - ), + if (!_isSearching) const SizedBox(height: 10), if (_isSearching) Expanded( child: ListView.separated( itemCount: _list!.length, - separatorBuilder: (context, _) => const SizedBox( - height: 10, - ), + separatorBuilder: + (context, _) => const SizedBox(height: 10), itemBuilder: (context, index) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(_list![index]) - .findFirstSync()!; + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(_list![index]) + .findFirstSync()!; final isSelected = _selectedBlocked.contains(utxo) || - _selectedAvailable.contains(utxo); + _selectedAvailable.contains(utxo); return UtxoCard( key: Key( @@ -357,7 +355,8 @@ class _CoinControlViewState extends ConsumerState { ), walletId: widget.walletId, utxo: utxo, - canSelect: widget.type == + canSelect: + widget.type == CoinControlViewType.manage || (widget.type == CoinControlViewType.use && !utxo.isBlocked && @@ -366,8 +365,9 @@ class _CoinControlViewState extends ConsumerState { currentHeight, ref.watch( pWallets.select( - (s) => s - .getWallet(widget.walletId), + (s) => s.getWallet( + widget.walletId, + ), ), ), )), @@ -385,8 +385,9 @@ class _CoinControlViewState extends ConsumerState { setState(() {}); }, onPressed: () async { - final result = - await Navigator.of(context).pushNamed( + final result = await Navigator.of( + context, + ).pushNamed( UtxoDetailsView.routeName, arguments: Tuple2( utxo.id, @@ -404,170 +405,176 @@ class _CoinControlViewState extends ConsumerState { if (!_isSearching) _list != null ? Expanded( - child: ListView.separated( - itemCount: _list!.length, - separatorBuilder: (context, _) => - const SizedBox( - height: 10, - ), - itemBuilder: (context, index) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(_list![index]) - .findFirstSync()!; + child: ListView.separated( + itemCount: _list!.length, + separatorBuilder: + (context, _) => + const SizedBox(height: 10), + itemBuilder: (context, index) { + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(_list![index]) + .findFirstSync()!; - final isSelected = _showBlocked - ? _selectedBlocked.contains(utxo) - : _selectedAvailable.contains(utxo); + final isSelected = + _showBlocked + ? _selectedBlocked.contains(utxo) + : _selectedAvailable.contains(utxo); - return UtxoCard( - key: Key( - "${utxo.walletId}_${utxo.id}_$isSelected", - ), - walletId: widget.walletId, - utxo: utxo, - canSelect: widget.type == - CoinControlViewType.manage || - (widget.type == - CoinControlViewType.use && - !_showBlocked && - _isConfirmed( - utxo, - currentHeight, - ref.watch( - pWallets.select( - (s) => s.getWallet( - widget.walletId, - ), + return UtxoCard( + key: Key( + "${utxo.walletId}_${utxo.id}_$isSelected", + ), + walletId: widget.walletId, + utxo: utxo, + canSelect: + widget.type == + CoinControlViewType.manage || + (widget.type == + CoinControlViewType.use && + !_showBlocked && + _isConfirmed( + utxo, + currentHeight, + ref.watch( + pWallets.select( + (s) => s.getWallet( + widget.walletId, ), ), - )), - initialSelectedState: isSelected, - onSelectedChanged: (value) { - if (value) { - _showBlocked - ? _selectedBlocked.add(utxo) - : _selectedAvailable.add(utxo); - } else { - _showBlocked - ? _selectedBlocked.remove(utxo) - : _selectedAvailable - .remove(utxo); - } + ), + )), + initialSelectedState: isSelected, + onSelectedChanged: (value) { + if (value) { + _showBlocked + ? _selectedBlocked.add(utxo) + : _selectedAvailable.add(utxo); + } else { + _showBlocked + ? _selectedBlocked.remove(utxo) + : _selectedAvailable.remove(utxo); + } + setState(() {}); + }, + onPressed: () async { + final result = await Navigator.of( + context, + ).pushNamed( + UtxoDetailsView.routeName, + arguments: Tuple2( + utxo.id, + widget.walletId, + ), + ); + if (mounted && result == "refresh") { setState(() {}); - }, - onPressed: () async { - final result = - await Navigator.of(context) - .pushNamed( - UtxoDetailsView.routeName, - arguments: Tuple2( - utxo.id, - widget.walletId, - ), - ); - if (mounted && result == "refresh") { - setState(() {}); - } - }, - ); - }, - ), - ) + } + }, + ); + }, + ), + ) : Expanded( - child: ListView.separated( - itemCount: _map!.entries.length, - separatorBuilder: (context, _) => - const SizedBox( - height: 10, - ), - itemBuilder: (context, index) { - final entry = - _map!.entries.elementAt(index); - final _controller = - RotateIconController(); + child: ListView.separated( + itemCount: _map!.entries.length, + separatorBuilder: + (context, _) => + const SizedBox(height: 10), + itemBuilder: (context, index) { + final entry = _map!.entries.elementAt( + index, + ); + final _controller = RotateIconController(); - return Expandable2( - border: Theme.of(context) - .extension()! - .backgroundAppBar, - background: Theme.of(context) - .extension()! - .popupBG, - animationDurationMultiplier: - 0.2 * entry.value.length, - onExpandWillChange: (state) { - if (state == - Expandable2State.expanded) { - _controller.forward?.call(); - } else { - _controller.reverse?.call(); - } - }, - header: RoundedContainer( - padding: const EdgeInsets.all(14), - color: Colors.transparent, - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - entry.key, - style: - STextStyles.w600_14( - context, - ), - ), - const SizedBox( - height: 2, + return Expandable2( + border: + Theme.of(context) + .extension()! + .backgroundAppBar, + background: + Theme.of( + context, + ).extension()!.popupBG, + animationDurationMultiplier: + 0.2 * entry.value.length, + onExpandWillChange: (state) { + if (state == + Expandable2State.expanded) { + _controller.forward?.call(); + } else { + _controller.reverse?.call(); + } + }, + header: RoundedContainer( + padding: const EdgeInsets.all(14), + color: Colors.transparent, + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + entry.key, + style: STextStyles.w600_14( + context, ), - Text( - "${entry.value.length} " - "output${entry.value.length > 1 ? "s" : ""}", - style: - STextStyles.w500_12( - context, - ).copyWith( - color: Theme.of(context) - .extension< - StackColors>()! - .textSubtitle1, - ), + ), + const SizedBox(height: 2), + Text( + "${entry.value.length} " + "output${entry.value.length > 1 ? "s" : ""}", + style: STextStyles.w500_12( + context, + ).copyWith( + color: + Theme.of(context) + .extension< + StackColors + >()! + .textSubtitle1, ), - ], - ), + ), + ], ), - RotateIcon( - animationDurationMultiplier: - 0.2 * entry.value.length, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 14, - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), - curve: Curves.easeInOut, - controller: _controller, + ), + RotateIcon( + animationDurationMultiplier: + 0.2 * entry.value.length, + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 14, + color: + Theme.of(context) + .extension< + StackColors + >()! + .textSubtitle1, ), - ], - ), + curve: Curves.easeInOut, + controller: _controller, + ), + ], ), - children: entry.value.map( - (id) { - final utxo = MainDB - .instance.isar.utxos - .where() - .idEqualTo(id) - .findFirstSync()!; + ), + children: + entry.value.map((id) { + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(id) + .findFirstSync()!; - final isSelected = _selectedBlocked - .contains(utxo) || - _selectedAvailable - .contains(utxo); + final isSelected = + _selectedBlocked.contains( + utxo, + ) || + _selectedAvailable.contains( + utxo, + ); return UtxoCard( key: Key( @@ -575,7 +582,8 @@ class _CoinControlViewState extends ConsumerState { ), walletId: widget.walletId, utxo: utxo, - canSelect: widget.type == + canSelect: + widget.type == CoinControlViewType .manage || (widget.type == @@ -597,14 +605,17 @@ class _CoinControlViewState extends ConsumerState { onSelectedChanged: (value) { if (value) { utxo.isBlocked - ? _selectedBlocked - .add(utxo) - : _selectedAvailable - .add(utxo); + ? _selectedBlocked.add( + utxo, + ) + : _selectedAvailable.add( + utxo, + ); } else { utxo.isBlocked - ? _selectedBlocked - .remove(utxo) + ? _selectedBlocked.remove( + utxo, + ) : _selectedAvailable .remove(utxo); } @@ -612,26 +623,26 @@ class _CoinControlViewState extends ConsumerState { }, onPressed: () async { final result = - await Navigator.of(context) - .pushNamed( - UtxoDetailsView.routeName, - arguments: Tuple2( - utxo.id, - widget.walletId, - ), - ); + await Navigator.of( + context, + ).pushNamed( + UtxoDetailsView.routeName, + arguments: Tuple2( + utxo.id, + widget.walletId, + ), + ); if (mounted && result == "refresh") { setState(() {}); } }, ); - }, - ).toList(), - ); - }, - ), + }).toList(), + ); + }, ), + ), ], ), ), @@ -641,13 +652,14 @@ class _CoinControlViewState extends ConsumerState { widget.type == CoinControlViewType.manage) Container( decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .backgroundAppBar, + color: + Theme.of( + context, + ).extension()!.backgroundAppBar, boxShadow: [ - Theme.of(context) - .extension()! - .standardBoxShadow, + Theme.of( + context, + ).extension()!.standardBoxShadow, ], ), child: Padding( @@ -658,22 +670,14 @@ class _CoinControlViewState extends ConsumerState { if (_showBlocked) { await MainDB.instance.putUTXOs( _selectedBlocked - .map( - (e) => e.copyWith( - isBlocked: false, - ), - ) + .map((e) => e.copyWith(isBlocked: false)) .toList(), ); _selectedBlocked.clear(); } else { await MainDB.instance.putUTXOs( _selectedAvailable - .map( - (e) => e.copyWith( - isBlocked: true, - ), - ) + .map((e) => e.copyWith(isBlocked: true)) .toList(), ); _selectedAvailable.clear(); @@ -686,13 +690,14 @@ class _CoinControlViewState extends ConsumerState { if (!_showBlocked && widget.type == CoinControlViewType.use) Container( decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .backgroundAppBar, + color: + Theme.of( + context, + ).extension()!.backgroundAppBar, boxShadow: [ - Theme.of(context) - .extension()! - .standardBoxShadow, + Theme.of( + context, + ).extension()!.standardBoxShadow, ], ), child: Padding( @@ -724,30 +729,42 @@ class _CoinControlViewState extends ConsumerState { (value, element) => value += element, ); - final selectedSum = - selectedSumInt.toAmountAsRaw( - fractionDigits: coin.fractionDigits, - ); + final selectedSum = selectedSumInt + .toAmountAsRaw( + fractionDigits: + coin.fractionDigits, + ); return SelectableText( ref .watch(pAmountFormatter(coin)) .format(selectedSum), - style: widget.requestedTotal == null - ? STextStyles.w600_14(context) - : STextStyles.w600_14(context) - .copyWith( - color: selectedSum >= - widget - .requestedTotal! - ? Theme.of(context) - .extension< - StackColors>()! - .accentColorGreen - : Theme.of(context) - .extension< - StackColors>()! - .accentColorRed, - ), + style: + widget.requestedTotal == null + ? STextStyles.w600_14( + context, + ) + : STextStyles.w600_14( + context, + ).copyWith( + color: + selectedSum >= + widget + .requestedTotal! + ? Theme.of( + context, + ) + .extension< + StackColors + >()! + .accentColorGreen + : Theme.of( + context, + ) + .extension< + StackColors + >()! + .accentColorRed, + ), ); }, ), @@ -758,9 +775,10 @@ class _CoinControlViewState extends ConsumerState { Container( width: double.infinity, height: 1.5, - color: Theme.of(context) - .extension()! - .backgroundAppBar, + color: + Theme.of(context) + .extension()! + .backgroundAppBar, ), if (widget.requestedTotal != null) Padding( @@ -785,9 +803,7 @@ class _CoinControlViewState extends ConsumerState { ], ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), PrimaryButton( label: "Use coins", enabled: _selectedAvailable.isNotEmpty, @@ -795,9 +811,7 @@ class _CoinControlViewState extends ConsumerState { if (searchFocus.hasFocus) { searchFocus.unfocus(); } - Navigator.of(context).pop( - _selectedAvailable, - ); + Navigator.of(context).pop(_selectedAvailable); }, ), ], diff --git a/lib/pages/coin_control/utxo_details_view.dart b/lib/pages/coin_control/utxo_details_view.dart index 9959abdda..b77b152bd 100644 --- a/lib/pages/coin_control/utxo_details_view.dart +++ b/lib/pages/coin_control/utxo_details_view.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/isar/models/isar_models.dart'; @@ -35,7 +35,7 @@ import '../../widgets/desktop/desktop_dialog_close_button.dart'; import '../../widgets/desktop/secondary_button.dart'; import '../../widgets/icon_widgets/utxo_status_icon.dart'; import '../../widgets/rounded_container.dart'; -import '../wallet_view/transaction_views/transaction_details_view.dart'; +import '../wallet_view/transaction_views/transaction_details_view.dart' as tdv; class UtxoDetailsView extends ConsumerStatefulWidget { const UtxoDetailsView({ @@ -83,10 +83,11 @@ class _UtxoDetailsViewState extends ConsumerState { @override void initState() { - utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(widget.utxoId) - .findFirstSync()!; + utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(widget.utxoId) + .findFirstSync()!; streamUTXO = MainDB.instance.watchUTXO(id: widget.utxoId); @@ -112,53 +113,50 @@ class _UtxoDetailsViewState extends ConsumerState { final confirmed = _isConfirmed( utxo!, currentHeight, - ref.watch( - pWallets.select( - (s) => s.getWallet(widget.walletId), - ), - ), + ref.watch(pWallets.select((s) => s.getWallet(widget.walletId))), ); return ConditionalParent( condition: !isDesktop, - builder: (child) => Background( - child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, - appBar: AppBar( - backgroundColor: - Theme.of(context).extension()!.background, - leading: AppBarBackButton( - onPressed: () { - Navigator.of(context).pop(_popWithRefresh ? "refresh" : null); - }, - ), - title: Text( - "Output details", - style: STextStyles.navBarTitle(context), - ), - ), - body: SafeArea( - child: LayoutBuilder( - builder: (context, constraints) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: IntrinsicHeight( - child: child, + builder: + (child) => Background( + child: Scaffold( + backgroundColor: + Theme.of(context).extension()!.background, + appBar: AppBar( + backgroundColor: + Theme.of(context).extension()!.background, + leading: AppBarBackButton( + onPressed: () { + Navigator.of( + context, + ).pop(_popWithRefresh ? "refresh" : null); + }, + ), + title: Text( + "Output details", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight(child: child), + ), ), - ), - ), - ); - }, + ); + }, + ), + ), ), ), - ), - ), child: StreamBuilder( stream: streamUTXO, builder: (context, snapshot) { @@ -184,8 +182,9 @@ class _UtxoDetailsViewState extends ConsumerState { ), DesktopDialogCloseButton( onPressedOverride: () { - Navigator.of(context) - .pop(_popWithRefresh ? "refresh" : null); + Navigator.of( + context, + ).pop(_popWithRefresh ? "refresh" : null); }, ), ], @@ -204,15 +203,14 @@ class _UtxoDetailsViewState extends ConsumerState { child: RoundedContainer( padding: EdgeInsets.zero, color: Colors.transparent, - borderColor: Theme.of(context) - .extension()! - .textFieldDefaultBG, + borderColor: + Theme.of(context) + .extension()! + .textFieldDefaultBG, child: child, ), ), - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), SecondaryButton( buttonHeight: ButtonHeight.l, label: utxo!.isBlocked ? "Unfreeze" : "Freeze", @@ -229,15 +227,13 @@ class _UtxoDetailsViewState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - if (!isDesktop) - const SizedBox( - height: 10, - ), + if (!isDesktop) const SizedBox(height: 10), RoundedContainer( padding: const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + color: + isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.popupBG, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -246,22 +242,23 @@ class _UtxoDetailsViewState extends ConsumerState { if (isDesktop) UTXOStatusIcon( blocked: utxo!.isBlocked, - status: confirmed - ? UTXOStatusIconStatus.confirmed - : UTXOStatusIconStatus.unconfirmed, - background: Theme.of(context) - .extension()! - .popupBG, + status: + confirmed + ? UTXOStatusIconStatus.confirmed + : UTXOStatusIconStatus.unconfirmed, + background: + Theme.of( + context, + ).extension()!.popupBG, selected: false, width: 32, height: 32, ), - if (isDesktop) - const SizedBox( - width: 16, - ), + if (isDesktop) const SizedBox(width: 16), Text( - ref.watch(pAmountFormatter(coin)).format( + ref + .watch(pAmountFormatter(coin)) + .format( utxo!.value.toAmountAsRaw( fractionDigits: coin.fractionDigits, ), @@ -274,18 +271,19 @@ class _UtxoDetailsViewState extends ConsumerState { utxo!.isBlocked ? "Frozen" : confirmed - ? "Available" - : "Unconfirmed", + ? "Available" + : "Unconfirmed", style: STextStyles.w500_14(context).copyWith( - color: utxo!.isBlocked - ? const Color(0xFF7FA2D4) // todo theme - : confirmed - ? Theme.of(context) - .extension()! - .accentColorGreen - : Theme.of(context) - .extension()! - .accentColorYellow, + color: + utxo!.isBlocked + ? const Color(0xFF7FA2D4) // todo theme + : confirmed + ? Theme.of( + context, + ).extension()!.accentColorGreen + : Theme.of( + context, + ).extension()!.accentColorYellow, ), ), ], @@ -293,12 +291,14 @@ class _UtxoDetailsViewState extends ConsumerState { ), const _Div(), RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -309,9 +309,10 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Label", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), SimpleEditButton( @@ -319,32 +320,27 @@ class _UtxoDetailsViewState extends ConsumerState { editLabel: "label", onValueChanged: (newName) { MainDB.instance.putUTXO( - utxo!.copyWith( - name: newName, - ), + utxo!.copyWith(name: newName), ); }, ), ], ), - const SizedBox( - height: 4, - ), - Text( - utxo!.name, - style: STextStyles.w500_14(context), - ), + const SizedBox(height: 4), + Text(utxo!.name, style: STextStyles.w500_14(context)), ], ), ), const _Div(), RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -355,39 +351,35 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Address", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), isDesktop - ? IconCopyButton( - data: utxo!.address!, - ) - : SimpleCopyButton( - data: utxo!.address!, - ), + ? tdv.IconCopyButton(data: utxo!.address!) + : SimpleCopyButton(data: utxo!.address!), ], ), - const SizedBox( - height: 4, - ), - Text( - utxo!.address!, - style: STextStyles.w500_14(context), - ), + const SizedBox(height: 4), + Text(utxo!.address!, style: STextStyles.w500_14(context)), ], ), ), if (label != null && label!.value.isNotEmpty) const _Div(), if (label != null && label!.value.isNotEmpty) RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -398,38 +390,32 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Address label", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), isDesktop - ? IconCopyButton( - data: label!.value, - ) - : SimpleCopyButton( - data: label!.value, - ), + ? tdv.IconCopyButton(data: label!.value) + : SimpleCopyButton(data: label!.value), ], ), - const SizedBox( - height: 4, - ), - Text( - label!.value, - style: STextStyles.w500_14(context), - ), + const SizedBox(height: 4), + Text(label!.value, style: STextStyles.w500_14(context)), ], ), ), const _Div(), RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -440,38 +426,32 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Transaction ID", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), isDesktop - ? IconCopyButton( - data: utxo!.txid, - ) - : SimpleCopyButton( - data: utxo!.txid, - ), + ? tdv.IconCopyButton(data: utxo!.txid) + : SimpleCopyButton(data: utxo!.txid), ], ), - const SizedBox( - height: 4, - ), - Text( - utxo!.txid, - style: STextStyles.w500_14(context), - ), + const SizedBox(height: 4), + Text(utxo!.txid, style: STextStyles.w500_14(context)), ], ), ), const _Div(), RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -479,14 +459,13 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Confirmations", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), - const SizedBox( - height: 4, - ), + const SizedBox(height: 4), Text( "${utxo!.getConfirmations(currentHeight)}", style: STextStyles.w500_14(context), @@ -501,14 +480,16 @@ class _UtxoDetailsViewState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ RoundedContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, + padding: + isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -519,9 +500,10 @@ class _UtxoDetailsViewState extends ConsumerState { Text( "Freeze reason", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of(context) + .extension()! + .textSubtitle1, ), ), SimpleEditButton( @@ -529,17 +511,13 @@ class _UtxoDetailsViewState extends ConsumerState { editLabel: "freeze reason", onValueChanged: (newReason) { MainDB.instance.putUTXO( - utxo!.copyWith( - blockedReason: newReason, - ), + utxo!.copyWith(blockedReason: newReason), ); }, ), ], ), - const SizedBox( - height: 4, - ), + const SizedBox(height: 4), Text( utxo!.blockedReason ?? "", style: STextStyles.w500_14(context), @@ -556,10 +534,7 @@ class _UtxoDetailsViewState extends ConsumerState { label: utxo!.isBlocked ? "Unfreeze" : "Freeze", onPressed: _toggleFreeze, ), - if (!isDesktop) - const SizedBox( - height: 16, - ), + if (!isDesktop) const SizedBox(height: 16), ], ), ); @@ -581,9 +556,7 @@ class _Div extends StatelessWidget { color: Theme.of(context).extension()!.textFieldDefaultBG, ); } else { - return const SizedBox( - height: 12, - ); + return const SizedBox(height: 12); } } } diff --git a/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart b/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart index edfe6ba19..4a539ec9d 100644 --- a/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart +++ b/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../app_config.dart'; diff --git a/lib/pages/exchange_view/exchange_view.dart b/lib/pages/exchange_view/exchange_view.dart index 1c70a64d0..276f7e73f 100644 --- a/lib/pages/exchange_view/exchange_view.dart +++ b/lib/pages/exchange_view/exchange_view.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../db/isar/main_db.dart'; @@ -94,10 +94,9 @@ class _ExchangeViewState extends ConsumerState { children: [ child, Material( - color: Theme.of(context) - .extension()! - .overlay - .withOpacity(0.6), + color: Theme.of( + context, + ).extension()!.overlay.withOpacity(0.6), child: const CustomLoadingOverlay( message: "Updating exchange data", subMessage: "This could take a few minutes", @@ -113,15 +112,12 @@ class _ExchangeViewState extends ConsumerState { headerSliverBuilder: (context, innerBoxIsScrolled) { return [ SliverOverlapAbsorber( - handle: - NestedScrollView.sliverOverlapAbsorberHandleFor(context), + handle: NestedScrollView.sliverOverlapAbsorberHandleFor( + context, + ), sliver: const SliverToBoxAdapter( child: Padding( - padding: EdgeInsets.only( - left: 16, - right: 16, - top: 16, - ), + padding: EdgeInsets.only(left: 16, right: 16, top: 16), child: ExchangeForm(), ), ), @@ -130,8 +126,9 @@ class _ExchangeViewState extends ConsumerState { }, body: Builder( builder: (buildContext) { - final trades = ref - .watch(tradesServiceProvider.select((value) => value.trades)); + final trades = ref.watch( + tradesServiceProvider.select((value) => value.trades), + ); final tradeCount = trades.length; final hasHistory = tradeCount > 0; @@ -150,98 +147,94 @@ class _ExchangeViewState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Text( "Trades", style: STextStyles.itemSubtitle(context).copyWith( - color: Theme.of(context) - .extension()! - .textDark3, + color: + Theme.of( + context, + ).extension()!.textDark3, ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), ], ), ), ), if (hasHistory) SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - return Padding( - padding: const EdgeInsets.all(4), - child: TradeCard( - key: Key("tradeCard_${trades[index].uuid}"), - trade: trades[index], - onTap: () async { - final String tradeId = trades[index].tradeId; + delegate: SliverChildBuilderDelegate((context, index) { + return Padding( + padding: const EdgeInsets.all(4), + child: TradeCard( + key: Key("tradeCard_${trades[index].uuid}"), + trade: trades[index], + onTap: () async { + final String tradeId = trades[index].tradeId; - final lookup = ref - .read(tradeSentFromStackLookupProvider) - .all; + final lookup = + ref + .read(tradeSentFromStackLookupProvider) + .all; - //todo: check if print needed - // debugPrint("ALL: $lookup"); + //todo: check if print needed + // debugPrint("ALL: $lookup"); - final String? txid = ref - .read(tradeSentFromStackLookupProvider) - .getTxidForTradeId(tradeId); - final List? walletIds = ref - .read(tradeSentFromStackLookupProvider) - .getWalletIdsForTradeId(tradeId); + final String? txid = ref + .read(tradeSentFromStackLookupProvider) + .getTxidForTradeId(tradeId); + final List? walletIds = ref + .read(tradeSentFromStackLookupProvider) + .getWalletIdsForTradeId(tradeId); - if (txid != null && - walletIds != null && - walletIds.isNotEmpty) { - final wallet = ref - .read(pWallets) - .getWallet(walletIds.first); + if (txid != null && + walletIds != null && + walletIds.isNotEmpty) { + final wallet = ref + .read(pWallets) + .getWallet(walletIds.first); - //todo: check if print needed - // debugPrint("name: ${manager.walletName}"); + //todo: check if print needed + // debugPrint("name: ${manager.walletName}"); - final tx = await MainDB.instance - .getTransactions(walletIds.first) - .filter() - .txidEqualTo(txid) - .findFirst(); + final tx = + await MainDB.instance + .getTransactions(walletIds.first) + .filter() + .txidEqualTo(txid) + .findFirst(); - if (mounted) { - unawaited( - Navigator.of(context).pushNamed( - TradeDetailsView.routeName, - arguments: Tuple4( - tradeId, - tx, - walletIds.first, - wallet.info.name, - ), - ), - ); - } - } else { + if (mounted) { unawaited( Navigator.of(context).pushNamed( TradeDetailsView.routeName, arguments: Tuple4( tradeId, - null, - walletIds?.first, - null, + tx, + walletIds.first, + wallet.info.name, ), ), ); } - }, - ), - ); - }, - childCount: tradeCount, - ), + } else { + unawaited( + Navigator.of(context).pushNamed( + TradeDetailsView.routeName, + arguments: Tuple4( + tradeId, + null, + walletIds?.first, + null, + ), + ), + ); + } + }, + ), + ); + }, childCount: tradeCount), ), if (!hasHistory) SliverToBoxAdapter( @@ -249,9 +242,10 @@ class _ExchangeViewState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: 4), child: Container( decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .popupBG, + color: + Theme.of( + context, + ).extension()!.popupBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index 6e56e5755..39623c3d8 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -57,7 +57,7 @@ import '../../widgets/rounded_container.dart'; import '../../widgets/rounded_white_container.dart'; import '../../widgets/stack_dialog.dart'; import '../wallet_view/transaction_views/edit_note_view.dart'; -import '../wallet_view/transaction_views/transaction_details_view.dart'; +import '../wallet_view/transaction_views/transaction_details_view.dart' as tdv; import 'edit_trade_note_view.dart'; import 'send_from_view.dart'; @@ -518,7 +518,7 @@ class _TradeDetailsViewState extends ConsumerState { ), ], ), - IconCopyButton(data: trade.payInAmount), + tdv.IconCopyButton(data: trade.payInAmount), ], ), const SizedBox(height: 6), @@ -604,20 +604,20 @@ class _TradeDetailsViewState extends ConsumerState { maxHeight: MediaQuery.of(context).size.height - 64, maxWidth: 580, - child: TransactionDetailsView( + child: tdv.TransactionDetailsView( coin: coin, transaction: transactionIfSentFromStack!, walletId: walletId!, ), ), const RouteSettings( - name: TransactionDetailsView.routeName, + name: tdv.TransactionDetailsView.routeName, ), ), ); } else { Navigator.of(context).pushNamed( - TransactionDetailsView.routeName, + tdv.TransactionDetailsView.routeName, arguments: Tuple3( transactionIfSentFromStack!, coin, @@ -664,7 +664,7 @@ class _TradeDetailsViewState extends ConsumerState { ], ), ), - if (isDesktop) IconCopyButton(data: trade.payInAddress), + if (isDesktop) tdv.IconCopyButton(data: trade.payInAddress), ], ), ), @@ -687,7 +687,7 @@ class _TradeDetailsViewState extends ConsumerState { style: STextStyles.itemSubtitle(context), ), isDesktop - ? IconCopyButton(data: trade.payInAddress) + ? tdv.IconCopyButton(data: trade.payInAddress) : GestureDetector( onTap: () async { final address = trade.payInAddress; @@ -840,7 +840,7 @@ class _TradeDetailsViewState extends ConsumerState { children: [ Text("Memo", style: STextStyles.itemSubtitle(context)), isDesktop - ? IconCopyButton(data: trade.payInExtraId) + ? tdv.IconCopyButton(data: trade.payInExtraId) : GestureDetector( onTap: () async { final address = trade.payInExtraId; @@ -904,7 +904,7 @@ class _TradeDetailsViewState extends ConsumerState { style: STextStyles.itemSubtitle(context), ), isDesktop - ? IconPencilButton( + ? tdv.IconPencilButton( onPressed: () { showDialog( context: context, @@ -984,7 +984,7 @@ class _TradeDetailsViewState extends ConsumerState { style: STextStyles.itemSubtitle(context), ), isDesktop - ? IconPencilButton( + ? tdv.IconPencilButton( onPressed: () { showDialog( context: context, @@ -1088,7 +1088,7 @@ class _TradeDetailsViewState extends ConsumerState { style: STextStyles.itemSubtitle12(context), ), if (isDesktop) - IconCopyButton( + tdv.IconCopyButton( data: Format.extractDateFrom( trade.timestamp.millisecondsSinceEpoch ~/ 1000, ), @@ -1121,7 +1121,7 @@ class _TradeDetailsViewState extends ConsumerState { ), ], ), - if (isDesktop) IconCopyButton(data: trade.exchangeName), + if (isDesktop) tdv.IconCopyButton(data: trade.exchangeName), if (!isDesktop) SelectableText( trade.exchangeName, @@ -1155,7 +1155,7 @@ class _TradeDetailsViewState extends ConsumerState { ), ], ), - if (isDesktop) IconCopyButton(data: trade.tradeId), + if (isDesktop) tdv.IconCopyButton(data: trade.tradeId), if (!isDesktop) Row( children: [ diff --git a/lib/pages/finalize_view/finalize_view.dart b/lib/pages/finalize_view/finalize_view.dart new file mode 100644 index 000000000..e0a341590 --- /dev/null +++ b/lib/pages/finalize_view/finalize_view.dart @@ -0,0 +1,340 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../notifications/show_flush_bar.dart'; +import '../../providers/global/barcode_scanner_provider.dart'; +import '../../providers/global/wallets_provider.dart'; +import '../../themes/stack_colors.dart'; +import '../../utilities/barcode_scanner_interface.dart'; +import '../../utilities/clipboard_interface.dart'; +import '../../utilities/constants.dart'; +import '../../utilities/logger.dart'; +import '../../utilities/show_loading.dart'; +import '../../utilities/text_styles.dart'; +import '../../utilities/util.dart'; +import '../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; +import '../../widgets/background.dart'; +import '../../widgets/conditional_parent.dart'; +import '../../widgets/custom_buttons/app_bar_icon_button.dart'; +import '../../widgets/desktop/primary_button.dart'; +import '../../widgets/icon_widgets/clipboard_icon.dart'; +import '../../widgets/icon_widgets/qrcode_icon.dart'; +import '../../widgets/icon_widgets/x_icon.dart'; +import '../../widgets/stack_dialog.dart'; +import '../../widgets/stack_text_field.dart'; +import '../../widgets/textfield_icon_button.dart'; + +class FinalizeView extends ConsumerStatefulWidget { + const FinalizeView({ + super.key, + required this.walletId, + this.clipboard = const ClipboardWrapper(), + }); + + static const String routeName = "/finalizeView"; + + final String walletId; + final ClipboardInterface clipboard; + + @override + ConsumerState createState() => _FinalizeViewState(); +} + +class _FinalizeViewState extends ConsumerState { + late final TextEditingController _slateController; + late final FocusNode _slateFocusNode; + + bool _slateToggleFlag = false; + + Future _pasteSlatepack() async { + final ClipboardData? data = await widget.clipboard.getData( + Clipboard.kTextPlain, + ); + if (data?.text != null && data!.text!.isNotEmpty) { + _slateController.text = data.text!; + setState(() { + _slateToggleFlag = _slateController.text.isNotEmpty; + }); + } + } + + Future _scanQr() async { + try { + if (!Util.isDesktop && _slateFocusNode.hasFocus) { + _slateFocusNode.unfocus(); + await Future.delayed(const Duration(milliseconds: 75)); + } + + if (mounted) { + final qrResult = await ref.read(pBarcodeScanner).scan(context: context); + if (qrResult.rawContent.isNotEmpty && qrResult.rawContent != "null") { + _slateController.text = qrResult.rawContent; + setState(() { + _slateToggleFlag = _slateController.text.isNotEmpty; + }); + } + } + } on PlatformException catch (e, s) { + if (mounted) { + try { + await checkCamPermDeniedMobileAndOpenAppSettings( + context, + logging: Logging.instance, + ); + } catch (e, s) { + Logging.instance.e( + "Failed to check cam permissions", + error: e, + stackTrace: s, + ); + } + } else { + Logging.instance.e( + "Failed to get camera permissions while trying to scan qr code in SendView: ", + error: e, + stackTrace: s, + ); + } + } + } + + Future _finalize() async { + // add delay for showloading exception catching hack fix + await Future.delayed(const Duration(seconds: 1)); + + final wallet = + ref.read(pWallets).getWallet(widget.walletId) as MimblewimblecoinWallet; + + final decoded = await wallet.decodeSlatepack(_slateController.text); + if (!decoded.success) { + throw Exception(decoded.error ?? "Failed to decode slatepack"); + } + + final analysis = await wallet.analyzeSlatepack(_slateController.text); + if (analysis.status != "S2") { + throw Exception("Invalid slatepack type: ${analysis.status}"); + } + + final result = await wallet.finalizeSlatepack(_slateController.text); + + if (!result.success) { + throw Exception( + result.error ?? "Finalize failed without providing an error???", + ); + } + } + + Future _finalizePressed() async { + if (!Util.isDesktop && _slateFocusNode.hasFocus) { + _slateFocusNode.unfocus(); + await Future.delayed(const Duration(milliseconds: 75)); + } + if (mounted) { + Exception? ex; + await showLoading( + whileFuture: _finalize(), + context: context, + message: "Finalizing slatepack...", + rootNavigator: Util.isDesktop, + onException: (e) => ex = e, + ); + + if (mounted) { + if (ex != null) { + await showDialog( + context: context, + builder: + (context) => StackOkDialog( + desktopPopRootNavigator: Util.isDesktop, + title: "Slatepack finalize error", + message: + ex?.toString() ?? "Unexpected result without exception", + maxWidth: Util.isDesktop ? 400 : null, + ), + ); + } else { + setState(() { + _slateController.text = ""; + }); + unawaited( + showFloatingFlushBar( + type: FlushBarType.success, + message: "Transaction finalized and broadcast successfully!", + context: context, + ), + ); + } + } + } + } + + @override + void initState() { + super.initState(); + _slateController = TextEditingController(); + _slateFocusNode = FocusNode(); + } + + @override + void dispose() { + _slateController.dispose(); + _slateFocusNode.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + debugPrint("BUILD: $runtimeType"); + + return ConditionalParent( + condition: !Util.isDesktop, + builder: + (child) => Background( + child: Scaffold( + backgroundColor: + Theme.of(context).extension()!.background, + appBar: AppBar( + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + title: Text( + "Finalize slatepack", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: Constants.size.standardPadding, + ), + child: child, + ), + ), + ), + ); + }, + ), + ), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + minLines: 1, + maxLines: 5, + key: const Key("finalizeSlatepackFieldKey"), + controller: _slateController, + readOnly: false, + autocorrect: false, + enableSuggestions: false, + toolbarOptions: const ToolbarOptions( + copy: false, + cut: false, + paste: true, + selectAll: false, + ), + onChanged: (newValue) { + setState(() { + _slateToggleFlag = newValue.isNotEmpty; + }); + }, + focusNode: _slateFocusNode, + style: STextStyles.field(context), + decoration: standardInputDecoration( + "Enter Final Slatepack Message", + _slateFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 12, // Adjust vertical padding for better alignment + ), + suffixIcon: Padding( + padding: + _slateController.text.isEmpty + ? const EdgeInsets.only(right: 8) + : const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _slateToggleFlag + ? TextFieldIconButton( + key: const Key( + "slateFinalizeClearFieldButtonKey", + ), + onTap: () { + _slateController.text = ""; + setState(() { + _slateToggleFlag = false; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + key: const Key( + "slateFinalizePasteFieldButtonKey", + ), + onTap: _pasteSlatepack, + child: + _slateController.text.isEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + if (_slateController.text.isEmpty) + TextFieldIconButton( + semanticsLabel: + "Scan QR Button. Opens Camera For Scanning QR Code.", + key: const Key("sendViewScanQrButtonKey"), + onTap: _scanQr, + child: const QrCodeIcon(), + ), + ], + ), + ), + ), + ), + ), + ), + Util.isDesktop ? const SizedBox(height: 24) : const Spacer(), + PrimaryButton( + label: "Finalize Slatepack", + enabled: _slateToggleFlag, + onPressed: _slateToggleFlag ? _finalizePressed : null, + ), + + if (!Util.isDesktop) SizedBox(height: Constants.size.standardPadding), + ], + ), + ); + } +} diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart index 126a16bfb..9c5af137c 100644 --- a/lib/pages/home_view/home_view.dart +++ b/lib/pages/home_view/home_view.dart @@ -29,6 +29,7 @@ import '../../utilities/constants.dart'; import '../../utilities/idle_monitor.dart'; import '../../utilities/prefs.dart'; import '../../utilities/text_styles.dart'; +import '../../utilities/util.dart'; import '../../widgets/animated_widgets/rotate_icon.dart'; import '../../widgets/app_icon.dart'; import '../../widgets/background.dart'; @@ -56,6 +57,9 @@ class HomeView extends ConsumerStatefulWidget { class _HomeViewState extends ConsumerState { final GlobalKey _key = GlobalKey(); + // keep reference to be able to remove listener in dispose without requiring the riverpod ref + late final Prefs _prefs; + late final PageController _pageController; late final RotateIconController _rotateIconController; @@ -76,17 +80,16 @@ class _HomeViewState extends ConsumerState { context, RouteGenerator.getRoute( shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, - builder: - (_) => const LockscreenView( - showBackButton: false, - popOnSuccess: true, - routeOnSuccessArguments: true, - routeOnSuccess: "", - biometricsCancelButtonString: "CANCEL", - biometricsLocalizedReason: - "Authenticate to unlock ${AppConfig.appName}", - biometricsAuthenticationTitle: "Unlock ${AppConfig.appName}", - ), + builder: (_) => const LockscreenView( + showBackButton: false, + popOnSuccess: true, + routeOnSuccessArguments: true, + routeOnSuccess: "", + biometricsCancelButtonString: "CANCEL", + biometricsLocalizedReason: + "Authenticate to unlock ${AppConfig.appName}", + biometricsAuthenticationTitle: "Unlock ${AppConfig.appName}", + ), settings: const RouteSettings(name: "/unlockTimedOutAppScreen"), ), ); @@ -132,14 +135,13 @@ class _HomeViewState extends ConsumerState { await showDialog( context: context, barrierDismissible: false, - builder: - (_) => WillPopScope( - onWillPop: () async { - _exitEnabled = true; - return true; - }, - child: const StackDialog(title: "Tap back again to exit"), - ), + builder: (_) => WillPopScope( + onWillPop: () async { + _exitEnabled = true; + return true; + }, + child: const StackDialog(title: "Tap back again to exit"), + ), ).timeout( timeout, onTimeout: () { @@ -171,8 +173,44 @@ class _HomeViewState extends ConsumerState { ); } + Future precacheSettingsIcons(BuildContext context) async { + if (Util.isDesktop) return; + + final icons = [ + Assets.svg.addressBook, + Assets.svg.downloadFolder, + Assets.svg.lock, + Assets.svg.dollarSign, + Assets.svg.language, + Assets.svg.node, + Assets.svg.arrowRotate, + Assets.svg.arrowUpRight, + Assets.svg.sun, + Assets.svg.circleAlert, + Assets.svg.ellipsis, + Assets.svg.solidSliders, + Assets.svg.questionMessage, + ]; + + for (final asset in icons) { + final loader = SvgAssetLoader(asset); + await svg.cache.putIfAbsent( + loader.cacheKey(context), + () => loader.loadBytes(context), + ); + } + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + + precacheSettingsIcons(context); + } + @override void initState() { + _prefs = ref.read(prefsChangeNotifierProvider); _autoLockInfo = ref.read(prefsChangeNotifierProvider).autoLockInfo; if (_autoLockInfo.enabled) { _idleMonitor = IdleMonitor( @@ -206,7 +244,7 @@ class _HomeViewState extends ConsumerState { @override dispose() { - ref.read(prefsChangeNotifierProvider).removeListener(_prefsTimeoutListener); + _prefs.removeListener(_prefsTimeoutListener); _idleMonitor?.detach(); _pageController.dispose(); _rotateIconController.forward = null; @@ -260,8 +298,9 @@ class _HomeViewState extends ConsumerState { key: _key, appBar: AppBar( automaticallyImplyLeading: false, - backgroundColor: - Theme.of(context).extension()!.backgroundAppBar, + backgroundColor: Theme.of( + context, + ).extension()!.backgroundAppBar, title: Row( children: [ GestureDetector( @@ -281,10 +320,11 @@ class _HomeViewState extends ConsumerState { ], ), actions: [ - const Padding( - padding: EdgeInsets.only(top: 10, bottom: 10, right: 10), - child: AspectRatio(aspectRatio: 1, child: SmallTorIcon()), - ), + if (AppConfig.hasFeature(AppFeature.tor)) + const Padding( + padding: EdgeInsets.only(top: 10, bottom: 10, right: 10), + child: AspectRatio(aspectRatio: 1, child: SmallTorIcon()), + ), Padding( padding: const EdgeInsets.only(top: 10, bottom: 10, right: 10), child: AspectRatio( @@ -295,54 +335,51 @@ class _HomeViewState extends ConsumerState { key: const Key("walletsViewAlertsButton"), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.backgroundAppBar, + color: Theme.of( + context, + ).extension()!.backgroundAppBar, icon: ref.watch( - notificationsProvider.select( - (value) => value.hasUnreadNotifications, - ), - ) - ? SvgPicture.file( - File( - ref.watch( - themeProvider.select( - (value) => value.assets.bellNew, - ), + notificationsProvider.select( + (value) => value.hasUnreadNotifications, + ), + ) + ? SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.bellNew, ), ), - width: 20, - height: 20, - color: - ref.watch( - notificationsProvider.select( - (value) => - value.hasUnreadNotifications, - ), - ) - ? null - : Theme.of(context) - .extension()! - .topNavIconPrimary, - ) - : SvgPicture.asset( - Assets.svg.bell, - width: 20, - height: 20, - color: - ref.watch( - notificationsProvider.select( - (value) => - value.hasUnreadNotifications, - ), - ) - ? null - : Theme.of(context) - .extension()! - .topNavIconPrimary, ), + width: 20, + height: 20, + color: + ref.watch( + notificationsProvider.select( + (value) => value.hasUnreadNotifications, + ), + ) + ? null + : Theme.of( + context, + ).extension()!.topNavIconPrimary, + ) + : SvgPicture.asset( + Assets.svg.bell, + width: 20, + height: 20, + color: + ref.watch( + notificationsProvider.select( + (value) => value.hasUnreadNotifications, + ), + ) + ? null + : Theme.of( + context, + ).extension()!.topNavIconPrimary, + ), onPressed: () { // reset unread state ref.refresh(unreadNotificationsStateProvider); @@ -350,10 +387,9 @@ class _HomeViewState extends ConsumerState { Navigator.of( context, ).pushNamed(NotificationsView.routeName).then((_) { - final Set unreadNotificationIds = - ref - .read(unreadNotificationsStateProvider.state) - .state; + final Set unreadNotificationIds = ref + .read(unreadNotificationsStateProvider.state) + .state; if (unreadNotificationIds.isEmpty) return; final List> futures = []; @@ -393,16 +429,14 @@ class _HomeViewState extends ConsumerState { key: const Key("walletsViewSettingsButton"), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.backgroundAppBar, + color: Theme.of( + context, + ).extension()!.backgroundAppBar, icon: SvgPicture.asset( Assets.svg.gear, - color: - Theme.of( - context, - ).extension()!.topNavIconPrimary, + color: Theme.of( + context, + ).extension()!.topNavIconPrimary, width: 20, height: 20, ), @@ -425,21 +459,20 @@ class _HomeViewState extends ConsumerState { ref.watch(prefsChangeNotifierProvider).enableExchange) Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.backgroundAppBar, + color: Theme.of( + context, + ).extension()!.backgroundAppBar, boxShadow: Theme.of(context) - .extension()! - .homeViewButtonBarBoxShadow != - null - ? [ - Theme.of(context) - .extension()! - .homeViewButtonBarBoxShadow!, - ] - : null, + .extension()! + .homeViewButtonBarBoxShadow != + null + ? [ + Theme.of(context) + .extension()! + .homeViewButtonBarBoxShadow!, + ] + : null, ), child: const Padding( padding: EdgeInsets.only( @@ -476,8 +509,9 @@ class _HomeViewState extends ConsumerState { onPageChanged: (pageIndex) { if (!_lock) { ref - .read(homeViewPageIndexStateProvider.state) - .state = pageIndex; + .read(homeViewPageIndexStateProvider.state) + .state = + pageIndex; } }, ); diff --git a/lib/pages/namecoin_names/sub_widgets/manage_domains_option_widget.dart b/lib/pages/namecoin_names/sub_widgets/manage_domains_option_widget.dart index f4a7df875..f7961c360 100644 --- a/lib/pages/namecoin_names/sub_widgets/manage_domains_option_widget.dart +++ b/lib/pages/namecoin_names/sub_widgets/manage_domains_option_widget.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:namecoin/namecoin.dart'; import '../../../models/isar/models/blockchain_data/utxo.dart'; @@ -12,10 +12,7 @@ import '../../../wallets/isar/providers/wallet_info_provider.dart'; import 'owned_name_card.dart'; class ManageDomainsOptionWidget extends ConsumerStatefulWidget { - const ManageDomainsOptionWidget({ - super.key, - required this.walletId, - }); + const ManageDomainsOptionWidget({super.key, required this.walletId}); final String walletId; @@ -62,40 +59,37 @@ class _ManageDomainsWidgetState builder: (context, snapshot) { List<(UTXO, OpNameData)> list = []; if (snapshot.hasData) { - list = snapshot.data!.map((utxo) { - final data = jsonDecode(utxo.otherData!) as Map; + list = snapshot.data! + .map((utxo) { + final data = jsonDecode(utxo.otherData!) as Map; - final nameData = jsonDecode(data["nameOpData"] as String) as Map; + final nameData = + jsonDecode(data["nameOpData"] as String) as Map; - return ( - utxo, - OpNameData(nameData.cast(), utxo.blockHeight ?? height) - ); - }).toList(growable: false); + return ( + utxo, + OpNameData(nameData.cast(), utxo.blockHeight ?? height), + ); + }) + .toList(growable: false); } return Column( children: [ ...list.map( (e) => Padding( - padding: const EdgeInsets.only( - bottom: 10, - ), + padding: const EdgeInsets.only(bottom: 10), child: OwnedNameCard( key: ValueKey(e), utxo: e.$1, opNameData: e.$2, firstColWidth: _width, - calculatedFirstColWidth: (value) => _sillyHack( - value, - list.length, - ), + calculatedFirstColWidth: + (value) => _sillyHack(value, list.length), ), ), ), - SizedBox( - height: Util.isDesktop ? 14 : 6, - ), + SizedBox(height: Util.isDesktop ? 14 : 6), ], ); }, diff --git a/lib/pages/namecoin_names/sub_widgets/name_details.dart b/lib/pages/namecoin_names/sub_widgets/name_details.dart index 7fa77f807..560297af0 100644 --- a/lib/pages/namecoin_names/sub_widgets/name_details.dart +++ b/lib/pages/namecoin_names/sub_widgets/name_details.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:namecoin/namecoin.dart'; import '../../../models/isar/models/isar_models.dart'; @@ -23,7 +23,8 @@ import '../../../widgets/desktop/desktop_dialog_close_button.dart'; import '../../../widgets/desktop/secondary_button.dart'; import '../../../widgets/dialogs/s_dialog.dart'; import '../../../widgets/rounded_container.dart'; -import '../../wallet_view/transaction_views/transaction_details_view.dart'; +import '../../wallet_view/transaction_views/transaction_details_view.dart' + as tdv; import '../manage_domain_view.dart'; import 'transfer_option_widget.dart'; import 'update_option_widget.dart'; @@ -60,8 +61,10 @@ class _ManageDomainsWidgetState extends ConsumerState { final data = jsonDecode(utxo.otherData!) as Map; final nameData = jsonDecode(data["nameOpData"] as String) as Map; - opNameData = - OpNameData(nameData.cast(), utxo.blockHeight ?? currentHeight); + opNameData = OpNameData( + nameData.cast(), + utxo.blockHeight ?? currentHeight, + ); _setName(); } @@ -76,32 +79,29 @@ class _ManageDomainsWidgetState extends ConsumerState { ref .read(secureStoreProvider) .read( - key: nameSaltKeyBuilder( - utxo!.txid, - widget.walletId, - utxo!.vout, - ), + key: nameSaltKeyBuilder(utxo!.txid, widget.walletId, utxo!.vout), ) .then((onValue) { - if (onValue != null) { - final data = (jsonDecode(onValue) as Map).cast(); - WidgetsBinding.instance.addPostFrameCallback((_) { - constructedName = data["name"]!; - value = data["value"]!; - if (mounted) { - setState(() {}); - } - }); - } else { - WidgetsBinding.instance.addPostFrameCallback((_) { - constructedName = "UNKNOWN"; - value = ""; - if (mounted) { - setState(() {}); + if (onValue != null) { + final data = + (jsonDecode(onValue) as Map).cast(); + WidgetsBinding.instance.addPostFrameCallback((_) { + constructedName = data["name"]!; + value = data["value"]!; + if (mounted) { + setState(() {}); + } + }); + } else { + WidgetsBinding.instance.addPostFrameCallback((_) { + constructedName = "UNKNOWN"; + value = ""; + if (mounted) { + setState(() {}); + } + }); } }); - } - }); } } } @@ -114,10 +114,7 @@ class _ManageDomainsWidgetState extends ConsumerState { message = "Expires in $blocksNameExpiration+ blocks"; color = theme.accentColorGreen; } else { - final remaining = opNameData?.expiredBlockLeft( - currentChainHeight, - false, - ); + final remaining = opNameData?.expiredBlockLeft(currentChainHeight, false); final semiRemaining = opNameData?.expiredBlockLeft( currentChainHeight, true, @@ -141,10 +138,7 @@ class _ManageDomainsWidgetState extends ConsumerState { bool _checkConfirmedUtxo(int currentHeight) { return (ref.read(pWallets).getWallet(widget.walletId) as NamecoinWallet) - .checkUtxoConfirmed( - utxo!, - currentHeight, - ); + .checkUtxoConfirmed(utxo!, currentHeight); } @override @@ -165,10 +159,9 @@ class _ManageDomainsWidgetState extends ConsumerState { _setName(); if (utxo?.address != null) { - label = ref.read(mainDBProvider).getAddressLabelSync( - widget.walletId, - utxo!.address!, - ); + label = ref + .read(mainDBProvider) + .getAddressLabelSync(widget.walletId, utxo!.address!); if (label != null) { streamLabel = ref.read(mainDBProvider).watchAddressLabel(id: label!.id); @@ -187,67 +180,73 @@ class _ManageDomainsWidgetState extends ConsumerState { Theme.of(context).extension()!, ); - final canManage = utxo != null && + final canManage = + utxo != null && _checkConfirmedUtxo(currentHeight) && (opNameData?.op == OpName.nameUpdate || opNameData?.op == OpName.nameFirstUpdate); return ConditionalParent( condition: !Util.isDesktop, - builder: (child) => Background( - child: Scaffold( - backgroundColor: Colors.transparent, - appBar: AppBar( - backgroundColor: Colors.transparent, - // Theme.of(context).extension()!.background, - leading: const AppBarBackButton(), - title: Text( - "Domain details", - style: STextStyles.navBarTitle(context), - ), - actions: canManage - ? [ - Padding( - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - right: 10, - ), - child: CustomTextButton( - key: const Key("addAddressBookEntryFavoriteButtonKey"), - text: "Manage", - onTap: () { - Navigator.of(context).pushNamed( - ManageDomainView.routeName, - arguments: (walletId: widget.walletId, utxo: utxo!), - ); - }, - ), - ), - ] - : null, - ), - body: SafeArea( - child: LayoutBuilder( - builder: (context, constraints) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: IntrinsicHeight( - child: child, + builder: + (child) => Background( + child: Scaffold( + backgroundColor: Colors.transparent, + appBar: AppBar( + backgroundColor: Colors.transparent, + // Theme.of(context).extension()!.background, + leading: const AppBarBackButton(), + title: Text( + "Domain details", + style: STextStyles.navBarTitle(context), + ), + actions: + canManage + ? [ + Padding( + padding: const EdgeInsets.only( + top: 10, + bottom: 10, + right: 10, + ), + child: CustomTextButton( + key: const Key( + "addAddressBookEntryFavoriteButtonKey", + ), + text: "Manage", + onTap: () { + Navigator.of(context).pushNamed( + ManageDomainView.routeName, + arguments: ( + walletId: widget.walletId, + utxo: utxo!, + ), + ); + }, + ), + ), + ] + : null, + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight(child: child), + ), ), - ), - ), - ); - }, + ); + }, + ), + ), ), ), - ), - ), child: ConditionalParent( condition: Util.isDesktop, builder: (child) { @@ -278,9 +277,10 @@ class _ManageDomainsWidgetState extends ConsumerState { child: RoundedContainer( padding: EdgeInsets.zero, color: Colors.transparent, - borderColor: Theme.of(context) - .extension()! - .textFieldDefaultBG, + borderColor: + Theme.of( + context, + ).extension()!.textFieldDefaultBG, child: child, ), ), @@ -341,9 +341,7 @@ class _ManageDomainsWidgetState extends ConsumerState { }, ), ), - const SizedBox( - width: 32, - ), + const SizedBox(width: 32), Expanded( child: SecondaryButton( label: "Update", @@ -398,10 +396,7 @@ class _ManageDomainsWidgetState extends ConsumerState { ], ), ), - if (canManage) - const SizedBox( - height: 32, - ), + if (canManage) const SizedBox(height: 32), ], ), ); @@ -415,193 +410,148 @@ class _ManageDomainsWidgetState extends ConsumerState { return utxo == null ? Center( - child: Text( - "Missing output. Was it used recently?", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .accentColorRed, - ), + child: Text( + "Missing output. Was it used recently?", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.accentColorRed, ), - ) + ), + ) : Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - // if (!isDesktop) - // const SizedBox( - // height: 10, - // ), - RoundedContainer( - padding: const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SelectableText( - constructedName ?? "", - style: STextStyles.pageTitleH2(context), - ), - if (Util.isDesktop) - SelectableText( - opNameData!.op.name, - style: STextStyles.w500_14(context), - ), - ], - ), - if (!Util.isDesktop) + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + // if (!isDesktop) + // const SizedBox( + // height: 10, + // ), + RoundedContainer( + padding: const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ SelectableText( - opNameData!.op.name, - style: STextStyles.w500_14(context), + constructedName ?? "", + style: STextStyles.pageTitleH2(context), ), - ], - ), - ), - const _Div(), - RoundedContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Value", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), + if (Util.isDesktop) + SelectableText( + opNameData!.op.name, + style: STextStyles.w500_14(context), ), - ], - ), - const SizedBox( - height: 4, - ), + ], + ), + if (!Util.isDesktop) SelectableText( - value ?? "", + opNameData!.op.name, style: STextStyles.w500_14(context), ), - ], - ), + ], ), - const _Div(), - RoundedContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Address", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), + ), + const _Div(), + RoundedContainer( + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Value", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), - Util.isDesktop - ? IconCopyButton( - data: utxo!.address!, - ) - : SimpleCopyButton( - data: utxo!.address!, - ), - ], - ), - const SizedBox( - height: 4, - ), - SelectableText( - utxo!.address!, - style: STextStyles.w500_14(context), - ), - ], - ), + ), + ], + ), + const SizedBox(height: 4), + SelectableText( + value ?? "", + style: STextStyles.w500_14(context), + ), + ], ), - if (label != null && label!.value.isNotEmpty) - const _Div(), - if (label != null && label!.value.isNotEmpty) - RoundedContainer( - padding: Util.isDesktop + ), + const _Div(), + RoundedContainer( + padding: + Util.isDesktop ? const EdgeInsets.all(16) : const EdgeInsets.all(12), - color: Util.isDesktop + color: + Util.isDesktop ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, + : Theme.of( + context, + ).extension()!.popupBG, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - "Address label", - style: - STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), - ), - Util.isDesktop - ? IconCopyButton( - data: label!.value, - ) - : SimpleCopyButton( - data: label!.value, - ), - ], - ), - const SizedBox( - height: 4, - ), - SelectableText( - label!.value, - style: STextStyles.w500_14(context), + Text( + "Address", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, + ), ), + Util.isDesktop + ? tdv.IconCopyButton(data: utxo!.address!) + : SimpleCopyButton(data: utxo!.address!), ], ), - ), - const _Div(), + const SizedBox(height: 4), + SelectableText( + utxo!.address!, + style: STextStyles.w500_14(context), + ), + ], + ), + ), + if (label != null && label!.value.isNotEmpty) const _Div(), + if (label != null && label!.value.isNotEmpty) RoundedContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -610,100 +560,138 @@ class _ManageDomainsWidgetState extends ConsumerState { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "Transaction ID", + "Address label", style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of(context) + .extension()! + .textSubtitle1, ), ), Util.isDesktop - ? IconCopyButton( - data: utxo!.txid, - ) - : SimpleCopyButton( - data: utxo!.txid, - ), + ? tdv.IconCopyButton(data: label!.value) + : SimpleCopyButton(data: label!.value), ], ), - const SizedBox( - height: 4, - ), + const SizedBox(height: 4), SelectableText( - utxo!.txid, + label!.value, style: STextStyles.w500_14(context), ), ], ), ), - const _Div(), - RoundedContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Expiry", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), - ), - const SizedBox( - height: 4, - ), - SelectableText( - message, - style: STextStyles.w500_14(context).copyWith( - color: color, + const _Div(), + RoundedContainer( + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Transaction ID", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, + ), ), - ), - ], - ), + Util.isDesktop + ? tdv.IconCopyButton(data: utxo!.txid) + : SimpleCopyButton(data: utxo!.txid), + ], + ), + const SizedBox(height: 4), + SelectableText( + utxo!.txid, + style: STextStyles.w500_14(context), + ), + ], ), - const _Div(), - RoundedContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - color: Util.isDesktop - ? Colors.transparent - : Theme.of(context) - .extension()! - .popupBG, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Confirmations", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), - ), - const SizedBox( - height: 4, + ), + const _Div(), + RoundedContainer( + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Expiry", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), - SelectableText( - "${utxo!.getConfirmations(currentHeight)}", - style: STextStyles.w500_14(context), + ), + const SizedBox(height: 4), + SelectableText( + message, + style: STextStyles.w500_14( + context, + ).copyWith(color: color), + ), + ], + ), + ), + const _Div(), + RoundedContainer( + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + color: + Util.isDesktop + ? Colors.transparent + : Theme.of( + context, + ).extension()!.popupBG, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Confirmations", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), - ], - ), + ), + const SizedBox(height: 4), + SelectableText( + "${utxo!.getConfirmations(currentHeight)}", + style: STextStyles.w500_14(context), + ), + ], ), - ], - ); + ), + ], + ); }, ), ), @@ -723,9 +711,7 @@ class _Div extends StatelessWidget { color: Theme.of(context).extension()!.textFieldDefaultBG, ); } else { - return const SizedBox( - height: 12, - ); + return const SizedBox(height: 12); } } } diff --git a/lib/pages/ordinals/ordinal_details_view.dart b/lib/pages/ordinals/ordinal_details_view.dart index 05d7eb227..996f20db6 100644 --- a/lib/pages/ordinals/ordinal_details_view.dart +++ b/lib/pages/ordinals/ordinal_details_view.dart @@ -8,6 +8,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; +import '../../app_config.dart'; import '../../models/isar/models/blockchain_data/utxo.dart'; import '../../models/isar/ordinal.dart'; import '../../networking/http.dart'; @@ -64,8 +65,9 @@ class _OrdinalDetailsViewState extends ConsumerState { child: Scaffold( backgroundColor: Theme.of(context).extension()!.background, appBar: AppBar( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, leading: const AppBarBackButton(), title: Text( "Ordinal details", @@ -104,17 +106,16 @@ class _OrdinalDetailsViewState extends ConsumerState { const SizedBox(height: _spacing), _DetailsItemWCopy( title: "Amount", - data: - utxo == null - ? "ERROR" - : ref - .watch(pAmountFormatter(coin)) - .format( - Amount( - rawValue: BigInt.from(utxo!.value), - fractionDigits: coin.fractionDigits, - ), + data: utxo == null + ? "ERROR" + : ref + .watch(pAmountFormatter(coin)) + .format( + Amount( + rawValue: BigInt.from(utxo!.value), + fractionDigits: coin.fractionDigits, ), + ), ), const SizedBox(height: _spacing), _DetailsItemWCopy( @@ -170,20 +171,18 @@ class _DetailsItemWCopy extends StatelessWidget { children: [ SvgPicture.asset( Assets.svg.copy, - color: - Theme.of( - context, - ).extension()!.infoItemIcons, + color: Theme.of( + context, + ).extension()!.infoItemIcons, width: 12, ), const SizedBox(width: 6), Text( "Copy", style: STextStyles.infoSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemIcons, + color: Theme.of( + context, + ).extension()!.infoItemIcons, ), ), ], @@ -216,10 +215,11 @@ class _OrdinalImageGroup extends ConsumerWidget { final response = await client.get( url: Uri.parse(ordinal.content), - proxyInfo: - ref.read(prefsChangeNotifierProvider).useTor - ? ref.read(pTorService).getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : ref.read(prefsChangeNotifierProvider).useTor + ? ref.read(pTorService).getProxyInfo() + : null, ); if (response.code != 200) { @@ -230,10 +230,9 @@ class _OrdinalImageGroup extends ConsumerWidget { final bytes = response.bodyBytes; - final dir = - Platform.isAndroid - ? await StackFileSystem.wtfAndroidDocumentsPath() - : await getApplicationDocumentsDirectory(); + final dir = Platform.isAndroid + ? await StackFileSystem.wtfAndroidDocumentsPath() + : await getApplicationDocumentsDirectory(); final filePath = path.join( dir.path, "ordinal_${ordinal.inscriptionNumber}.png", @@ -289,10 +288,9 @@ class _OrdinalImageGroup extends ConsumerWidget { Assets.svg.arrowDown, width: 10, height: 12, - color: - Theme.of( - context, - ).extension()!.buttonTextSecondary, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, ), buttonHeight: ButtonHeight.l, iconSpacing: 4, diff --git a/lib/pages/ordinals/widgets/ordinals_list.dart b/lib/pages/ordinals/widgets/ordinals_list.dart index ec67d7ef8..ff69da8da 100644 --- a/lib/pages/ordinals/widgets/ordinals_list.dart +++ b/lib/pages/ordinals/widgets/ordinals_list.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/ordinal.dart'; import '../../../providers/db/main_db_provider.dart'; @@ -13,10 +13,7 @@ import '../../../widgets/rounded_white_container.dart'; import 'ordinal_card.dart'; class OrdinalsList extends ConsumerStatefulWidget { - const OrdinalsList({ - super.key, - required this.walletId, - }); + const OrdinalsList({super.key, required this.walletId}); final String walletId; @@ -33,23 +30,25 @@ class _OrdinalsListState extends ConsumerState { @override void initState() { - _stream = ref - .read(mainDBProvider) - .isar - .ordinals - .where() - .filter() - .walletIdEqualTo(widget.walletId) - .watch(); + _stream = + ref + .read(mainDBProvider) + .isar + .ordinals + .where() + .filter() + .walletIdEqualTo(widget.walletId) + .watch(); - _data = ref - .read(mainDBProvider) - .isar - .ordinals - .where() - .filter() - .walletIdEqualTo(widget.walletId) - .findAllSync(); + _data = + ref + .read(mainDBProvider) + .isar + .ordinals + .where() + .filter() + .walletIdEqualTo(widget.walletId) + .findAllSync(); super.initState(); } @@ -71,13 +70,15 @@ class _OrdinalsListState extends ConsumerState { child: Center( child: Text( "Your ordinals will appear here", - style: Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, - ) - : STextStyles.label(context), + style: + Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textSubtitle1, + ) + : STextStyles.label(context), ), ), ), @@ -89,18 +90,19 @@ class _OrdinalsListState extends ConsumerState { return Wrap( spacing: _spacing, runSpacing: _spacing, - children: _data - .map( - (e) => SizedBox( - width: 220, - height: 270, - child: OrdinalCard( - walletId: widget.walletId, - ordinal: e, - ), - ), - ) - .toList(), + children: + _data + .map( + (e) => SizedBox( + width: 220, + height: 270, + child: OrdinalCard( + walletId: widget.walletId, + ordinal: e, + ), + ), + ) + .toList(), ); } else { return GridView.builder( @@ -112,10 +114,9 @@ class _OrdinalsListState extends ConsumerState { crossAxisCount: Util.isDesktop ? 4 : 2, childAspectRatio: 6 / 7, // was 3/4, less data displayed now ), - itemBuilder: (_, i) => OrdinalCard( - walletId: widget.walletId, - ordinal: _data[i], - ), + itemBuilder: + (_, i) => + OrdinalCard(walletId: widget.walletId, ordinal: _data[i]), ); } }, diff --git a/lib/pages/paynym/subwidgets/paynym_bot.dart b/lib/pages/paynym/subwidgets/paynym_bot.dart index 384e471e5..3307665a4 100644 --- a/lib/pages/paynym/subwidgets/paynym_bot.dart +++ b/lib/pages/paynym/subwidgets/paynym_bot.dart @@ -12,6 +12,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; +import '../../../app_config.dart'; import '../../../networking/http.dart'; import '../../../services/tor_service.dart'; import '../../../utilities/paynym_is_api.dart'; @@ -52,12 +53,15 @@ class PayNymBot extends StatelessWidget { Future _fetchImage() async { final HTTP client = HTTP(); - final Uri uri = - Uri.parse("${PaynymIsApi.baseURL}/$paymentCodeString/avatar"); + final Uri uri = Uri.parse( + "${PaynymIsApi.baseURL}/$paymentCodeString/avatar", + ); final response = await client.get( url: uri, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); diff --git a/lib/pages/receive_view/addresses/address_card.dart b/lib/pages/receive_view/addresses/address_card.dart index 59074d979..901cd578b 100644 --- a/lib/pages/receive_view/addresses/address_card.dart +++ b/lib/pages/receive_view/addresses/address_card.dart @@ -18,7 +18,7 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:path_provider/path_provider.dart'; import 'package:share_plus/share_plus.dart'; @@ -76,8 +76,9 @@ class _AddressCardState extends ConsumerState { final RenderRepaintBoundary boundary = _qrKey.currentContext?.findRenderObject() as RenderRepaintBoundary; final ui.Image image = await boundary.toImage(); - final ByteData? byteData = - await image.toByteData(format: ui.ImageByteFormat.png); + final ByteData? byteData = await image.toByteData( + format: ui.ImageByteFormat.png, + ); final Uint8List pngBytes = byteData!.buffer.asUint8List(); if (shouldSaveInsteadOfShare) { @@ -129,10 +130,9 @@ class _AddressCardState extends ConsumerState { final file = await File("${tempDir.path}/qrcode.png").create(); await file.writeAsBytes(pngBytes); - await Share.shareFiles( - ["${tempDir.path}/qrcode.png"], - text: "Receive URI QR Code", - ); + await Share.shareFiles([ + "${tempDir.path}/qrcode.png", + ], text: "Receive URI QR Code"); } } catch (e) { //todo: comeback to this @@ -142,10 +142,11 @@ class _AddressCardState extends ConsumerState { @override void initState() { - address = MainDB.instance.isar.addresses - .where() - .idEqualTo(widget.addressId) - .findFirstSync()!; + address = + MainDB.instance.isar.addresses + .where() + .idEqualTo(widget.addressId) + .findFirstSync()!; label = MainDB.instance.getAddressLabelSync(widget.walletId, address.value); Id? id = label?.id; @@ -154,9 +155,10 @@ class _AddressCardState extends ConsumerState { walletId: widget.walletId, addressString: address.value, value: "", - tags: address.subType == AddressSubType.receiving - ? ["receiving"] - : address.subType == AddressSubType.change + tags: + address.subType == AddressSubType.receiving + ? ["receiving"] + : address.subType == AddressSubType.change ? ["change"] : null, ); @@ -180,26 +182,19 @@ class _AddressCardState extends ConsumerState { return ConditionalParent( condition: isDesktop, - builder: (child) => Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SvgPicture.file( - File( - ref.watch( - coinIconProvider(widget.coin), + builder: + (child) => Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SvgPicture.file( + File(ref.watch(coinIconProvider(widget.coin))), + width: 32, + height: 32, ), - ), - width: 32, - height: 32, - ), - const SizedBox( - width: 12, - ), - Expanded( - child: child, + const SizedBox(width: 12), + Expanded(child: child), + ], ), - ], - ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -218,17 +213,13 @@ class _AddressCardState extends ConsumerState { disableIcon: true, onValueChanged: (value) { MainDB.instance.putAddressLabel( - label!.copyWith( - label: value, - ), + label!.copyWith(label: value), ); }, ), ], ), - SizedBox( - height: isDesktop ? 2 : 8, - ), + SizedBox(height: isDesktop ? 2 : 8), Row( children: [ Expanded( @@ -239,36 +230,28 @@ class _AddressCardState extends ConsumerState { ), ], ), - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), Row( children: [ CustomTextButton( text: "Copy address", onTap: () { widget.clipboard - .setData( - ClipboardData( - text: address.value, - ), - ) + .setData(ClipboardData(text: address.value)) .then((value) { - if (context.mounted) { - unawaited( - showFloatingFlushBar( - type: FlushBarType.info, - message: "Copied to clipboard", - context: context, - ), - ); - } - }); + if (context.mounted) { + unawaited( + showFloatingFlushBar( + type: FlushBarType.info, + message: "Copied to clipboard", + context: context, + ), + ); + } + }); }, ), - const SizedBox( - width: 16, - ), + const SizedBox(width: 16), CustomTextButton( text: "Show QR code", onTap: () async { @@ -284,21 +267,19 @@ class _AddressCardState extends ConsumerState { style: STextStyles.w600_18(context), ), if (label!.value.isNotEmpty) - const SizedBox( - height: 8, - ), + const SizedBox(height: 8), Text( address.value, - style: - STextStyles.w500_16(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + style: STextStyles.w500_16( + context, + ).copyWith( + color: + Theme.of(context) + .extension()! + .textSubtitle1, ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), Center( child: RepaintBoundary( key: _qrKey, @@ -312,25 +293,25 @@ class _AddressCardState extends ConsumerState { ), ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), Row( children: [ if (!isDesktop) Expanded( child: SecondaryButton( label: "Share", - buttonHeight: isDesktop - ? ButtonHeight.l - : null, + buttonHeight: + isDesktop + ? ButtonHeight.l + : null, icon: SvgPicture.asset( Assets.svg.share, width: 14, height: 14, - color: Theme.of(context) - .extension()! - .buttonTextSecondary, + color: + Theme.of(context) + .extension()! + .buttonTextSecondary, ), onPressed: () async { await _capturePng(false); @@ -340,9 +321,10 @@ class _AddressCardState extends ConsumerState { if (isDesktop) Expanded( child: PrimaryButton( - buttonHeight: isDesktop - ? ButtonHeight.l - : null, + buttonHeight: + isDesktop + ? ButtonHeight.l + : null, onPressed: () async { // TODO: add save functionality instead of share // save works on linux at the moment @@ -353,9 +335,10 @@ class _AddressCardState extends ConsumerState { Assets.svg.arrowDown, width: 20, height: 20, - color: Theme.of(context) - .extension()! - .buttonTextPrimary, + color: + Theme.of(context) + .extension()! + .buttonTextPrimary, ), ), ), diff --git a/lib/pages/receive_view/addresses/address_details_view.dart b/lib/pages/receive_view/addresses/address_details_view.dart index 96c2e66a6..aa6fd9be3 100644 --- a/lib/pages/receive_view/addresses/address_details_view.dart +++ b/lib/pages/receive_view/addresses/address_details_view.dart @@ -11,7 +11,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/isar/main_db.dart'; import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; @@ -38,7 +38,8 @@ import '../../../widgets/qr.dart'; import '../../../widgets/rounded_white_container.dart'; import '../../../widgets/transaction_card.dart'; import '../../wallet_view/sub_widgets/no_transactions_found.dart'; -import '../../wallet_view/transaction_views/transaction_details_view.dart'; +import '../../wallet_view/transaction_views/transaction_details_view.dart' + as tdv; import '../../wallet_view/transaction_views/tx_v2/transaction_v2_card.dart'; import 'address_tag.dart'; @@ -306,7 +307,7 @@ class _AddressDetailsViewState extends ConsumerState { detail: address.value, button: isDesktop - ? IconCopyButton(data: address.value) + ? tdv.IconCopyButton(data: address.value) : SimpleCopyButton(data: address.value), ), const _Div(height: 12), diff --git a/lib/pages/receive_view/addresses/edit_address_label_view.dart b/lib/pages/receive_view/addresses/edit_address_label_view.dart index f0508f4a5..78a8ea9ea 100644 --- a/lib/pages/receive_view/addresses/edit_address_label_view.dart +++ b/lib/pages/receive_view/addresses/edit_address_label_view.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/isar/main_db.dart'; import '../../../models/isar/models/address_label.dart'; diff --git a/lib/pages/receive_view/addresses/wallet_addresses_view.dart b/lib/pages/receive_view/addresses/wallet_addresses_view.dart index 8b87fd074..7dcf0ea84 100644 --- a/lib/pages/receive_view/addresses/wallet_addresses_view.dart +++ b/lib/pages/receive_view/addresses/wallet_addresses_view.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../db/isar/main_db.dart'; diff --git a/lib/pages/receive_view/receive_view.dart b/lib/pages/receive_view/receive_view.dart index fe44acc9b..5fa78b359 100644 --- a/lib/pages/receive_view/receive_view.dart +++ b/lib/pages/receive_view/receive_view.dart @@ -15,7 +15,7 @@ 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:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../models/isar/models/isar_models.dart'; import '../../models/keys/view_only_wallet_data.dart'; @@ -33,6 +33,7 @@ import '../../utilities/text_styles.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../../wallets/wallet/impl/bitcoin_wallet.dart'; +import '../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../wallets/wallet/intermediate/bip39_hd_wallet.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart'; @@ -47,10 +48,14 @@ import '../../widgets/custom_buttons/blue_text_button.dart'; import '../../widgets/custom_loading_overlay.dart'; import '../../widgets/desktop/primary_button.dart'; import '../../widgets/desktop/secondary_button.dart'; +import '../../widgets/dialogs/s_dialog.dart'; import '../../widgets/qr.dart'; import '../../widgets/rounded_white_container.dart'; +import '../../widgets/stack_dialog.dart'; import 'addresses/wallet_addresses_view.dart'; import 'generate_receiving_uri_qr_code_view.dart'; +import 'sub_widgets/mwc_slatepack_import_dialog.dart'; +import 'sub_widgets/slatepack_entry_dialog.dart'; class ReceiveView extends ConsumerStatefulWidget { const ReceiveView({ @@ -84,6 +89,71 @@ class _ReceiveViewState extends ConsumerState { final Map _addressMap = {}; final Map> _addressSubMap = {}; + Future _importSlatepack() async { + final slatepackString = await showDialog( + context: context, + builder: (context) => const SlatepackEntryDialog(), + ); + + if (slatepackString == null) return; + if (mounted) { + final wallet = + ref.read(pWallets).getWallet(walletId) as MimblewimblecoinWallet; + + Exception? ex; + final result = await showLoading( + whileFuture: wallet.fullDecodeSlatepack(slatepackString), + context: context, + message: "Decoding slatepack...", + onException: (e) => ex = e, + ); + + if (result == null || ex != null) { + if (mounted) { + await showDialog( + context: context, + builder: + (context) => StackOkDialog( + title: "Slatepack receive error", + message: + ex?.toString() ?? "Unexpected result without exception", + ), + ); + } + return; + } + + if (mounted) { + final response = + await showDialog<({String responseSlatepack, bool wasEncrypted})>( + context: context, + builder: + (context) => SDialog( + child: MwcSlatepackImportDialog( + walletId: widget.walletId, + clipboard: widget.clipboard, + rawSlatepack: result.raw, + decoded: result.result, + slatepackType: result.type, + ), + ), + ); + + if (mounted && response != null) { + await showDialog( + context: context, + barrierDismissible: false, + builder: + (context) => SlatepackResponseDialog( + responseSlatepack: response.responseSlatepack, + wasEncrypted: response.wasEncrypted, + ), + ); + } + } + } + } + Future generateNewAddress() async { final wallet = ref.read(pWallets).getWallet(walletId); @@ -692,6 +762,14 @@ class _ReceiveViewState extends ConsumerState { ? generateNewSparkAddress : generateNewAddress, ), + // MWC Slatepack import button. + if (coin is Mimblewimblecoin) ...[ + const SizedBox(height: 12), + SecondaryButton( + label: "Import Slatepack", + onPressed: _importSlatepack, + ), + ], const SizedBox(height: 30), RoundedWhiteContainer( child: Padding( diff --git a/lib/pages/receive_view/sub_widgets/mwc_slatepack_import_dialog.dart b/lib/pages/receive_view/sub_widgets/mwc_slatepack_import_dialog.dart new file mode 100644 index 000000000..6b1bc060d --- /dev/null +++ b/lib/pages/receive_view/sub_widgets/mwc_slatepack_import_dialog.dart @@ -0,0 +1,361 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../../models/mwc_slatepack_models.dart'; +import '../../../providers/global/wallets_provider.dart'; +import '../../../themes/stack_colors.dart'; +import '../../../utilities/amount/amount.dart'; +import '../../../utilities/amount/amount_formatter.dart'; +import '../../../utilities/clipboard_interface.dart'; +import '../../../utilities/show_loading.dart'; +import '../../../utilities/text_styles.dart'; +import '../../../utilities/util.dart'; +import '../../../wallets/isar/providers/wallet_info_provider.dart'; +import '../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; +import '../../../widgets/conditional_parent.dart'; +import '../../../widgets/custom_buttons/simple_copy_button.dart'; +import '../../../widgets/desktop/desktop_dialog_close_button.dart'; +import '../../../widgets/desktop/primary_button.dart'; +import '../../../widgets/desktop/secondary_button.dart'; +import '../../../widgets/detail_item.dart'; +import '../../../widgets/dialogs/s_dialog.dart'; +import '../../../widgets/rounded_white_container.dart'; +import '../../../widgets/stack_dialog.dart'; + +class MwcSlatepackImportDialog extends ConsumerStatefulWidget { + const MwcSlatepackImportDialog({ + super.key, + required this.walletId, + required this.rawSlatepack, + required this.decoded, + required this.slatepackType, + this.clipboard = const ClipboardWrapper(), + }); + + final String walletId; + final String rawSlatepack; + final SlatepackDecodeResult decoded; + final String slatepackType; + final ClipboardInterface clipboard; + + @override + ConsumerState createState() => + _MwcSlatepackImportDialogState(); +} + +class _MwcSlatepackImportDialogState + extends ConsumerState { + Future<({String responseSlatepack, bool wasEncrypted})> + _processSlatepack() async { + // add delay for showloading exception catching hack fix + await Future.delayed(const Duration(seconds: 1)); + + final wallet = + ref.read(pWallets).getWallet(widget.walletId) as MimblewimblecoinWallet; + + // Determine action based on slatepack type. + if (widget.slatepackType.contains("S1")) { + // This is an initial slatepack - receive it and create response. + final result = await wallet.receiveSlatepack(widget.rawSlatepack); + + if (result.success && result.responseSlatepack != null) { + return ( + responseSlatepack: result.responseSlatepack!, + wasEncrypted: result.wasEncrypted ?? false, + ); + } else { + throw Exception(result.error ?? 'Failed to process slatepack'); + } + } else { + throw Exception('Unsupported slatepack type: ${widget.slatepackType}'); + } + } + + Future _processPressed() async { + Exception? ex; + final result = await showLoading( + whileFuture: _processSlatepack(), + context: context, + message: "Processing slatepack...", + onException: (e) => ex = e, + ); + + if (result == null || ex != null) { + if (mounted) { + await showDialog( + context: context, + useRootNavigator: true, + builder: + (context) => StackOkDialog( + desktopPopRootNavigator: true, + maxWidth: Util.isDesktop ? 400 : null, + title: "Slatepack receive error", + message: + ex?.toString() ?? "Unexpected result without exception", + ), + ); + } + return; + } + + if (mounted) { + Navigator.of(context).pop(result); + } + } + + late final Amount? _amount; + + // late final Amount? _fee; + + @override + void initState() { + final map = jsonDecode(widget.decoded.slateJson!) as Map; + + final rawAmount = BigInt.tryParse(map["amount"].toString()); + _amount = + rawAmount == null + ? null + : Amount( + rawValue: rawAmount, + fractionDigits: + ref.read(pWalletCoin(widget.walletId)).fractionDigits, + ); + + // final rawFee = BigInt.tryParse(map["fee"].toString()); + // _fee = + // rawFee == null + // ? null + // : Amount( + // rawValue: rawFee, + // fractionDigits: + // ref.read(pWalletCoin(widget.walletId)).fractionDigits, + // ); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + final isDesktop = Util.isDesktop; + + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (isDesktop) + // Header with title and close button. + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(left: 32), + child: Text( + "Import Slatepack", + style: STextStyles.pageTitleH2(context), + ), + ), + const DesktopDialogCloseButton(), + ], + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: isDesktop ? 32 : 24), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ConditionalParent( + condition: isDesktop, + builder: + (child) => RoundedWhiteContainer( + borderColor: + isDesktop + ? Theme.of( + context, + ).extension()!.backgroundAppBar + : null, + padding: const EdgeInsets.all(0), + child: child, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + if (!isDesktop) + Padding( + padding: const EdgeInsets.only(top: 24, bottom: 24), + child: Text( + "Import slatepack", + style: STextStyles.pageTitleH2(context), + ), + ), + + // DetailItem(title: "Type", detail: widget.slatepackType), + // const DetailDivider(), + // DetailItem( + // title: "Encrypted", + // detail: (widget.decoded.wasEncrypted ?? false).toString(), + // ), + // if (widget.decoded.senderAddress != null) + // const DetailDivider(), + // if (widget.decoded.senderAddress != null) + // DetailItem( + // title: "From", + // detail: widget.decoded.senderAddress!, + // ), + // if (widget.decoded.recipientAddress != null) + // const DetailDivider(), + // if (widget.decoded.recipientAddress != null) + // DetailItem( + // title: "To", + // detail: widget.decoded.recipientAddress!, + // ), + // if (_amount != null) const DetailDivider(), + if (_amount != null) + DetailItem( + title: "Amount", + detail: ref + .watch( + pAmountFormatter( + ref.watch(pWalletCoin(widget.walletId)), + ), + ) + .format(_amount), + ), + // if (_fee != null) const DetailDivider(), + // if (_fee != null) + // DetailItem( + // title: "Fee", + // detail: ref + // .watch( + // pAmountFormatter( + // ref.watch(pWalletCoin(widget.walletId)), + // ), + // ) + // .format(_fee), + // ), + ], + ), + ), + const SizedBox(height: 24), + ConditionalParent( + condition: isDesktop, + builder: + (child) => Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [child], + ), + child: PrimaryButton( + width: isDesktop ? 220 : null, + + buttonHeight: isDesktop ? ButtonHeight.l : null, + label: "Process", + onPressed: _processPressed, + ), + ), + if (!isDesktop) const SizedBox(height: 12), + if (!isDesktop) + SecondaryButton( + label: "Cancel", + onPressed: Navigator.of(context).pop, + ), + ], + ), + ), + isDesktop ? const SizedBox(height: 32) : const SizedBox(height: 24), + ], + ); + } +} + +class SlatepackResponseDialog extends StatelessWidget { + const SlatepackResponseDialog({ + super.key, + required this.responseSlatepack, + required this.wasEncrypted, + }); + + final String responseSlatepack; + final bool wasEncrypted; + + @override + Widget build(BuildContext context) { + return SDialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Header with title and close button. + if (Util.isDesktop) + Padding( + padding: const EdgeInsets.only(left: 32), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Response Slatepack", + style: STextStyles.pageTitleH2(context), + ), + const DesktopDialogCloseButton(), + ], + ), + ), + Padding( + padding: + Util.isDesktop + ? const EdgeInsets.only(left: 32, right: 32, bottom: 32) + : const EdgeInsets.only(left: 24, right: 24, bottom: 24), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (!Util.isDesktop) const SizedBox(height: 24), + Text( + "Return this slatepack to the sender to complete the transaction.", + style: STextStyles.pageTitleH2(context), + ), + const SizedBox(height: 24), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Response slatepack", + style: STextStyles.itemSubtitle(context), + ), + SimpleCopyButton(data: responseSlatepack), + ], + ), + const SizedBox(height: 8), + ConditionalParent( + condition: !Util.isDesktop, + builder: + (child) => SizedBox( + height: 220, + child: SingleChildScrollView(child: child), + ), + child: SelectableText( + responseSlatepack, + style: STextStyles.w500_14(context), + ), + ), + const SizedBox(height: 24), + ConditionalParent( + condition: Util.isDesktop, + builder: + (child) => Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [child], + ), + child: PrimaryButton( + label: "Done", + width: Util.isDesktop ? 220 : null, + buttonHeight: Util.isDesktop ? ButtonHeight.l : null, + onPressed: Navigator.of(context).pop, + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/receive_view/sub_widgets/slatepack_entry_dialog.dart b/lib/pages/receive_view/sub_widgets/slatepack_entry_dialog.dart new file mode 100644 index 000000000..ec9aee0c3 --- /dev/null +++ b/lib/pages/receive_view/sub_widgets/slatepack_entry_dialog.dart @@ -0,0 +1,223 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../../providers/global/barcode_scanner_provider.dart'; +import '../../../themes/stack_colors.dart'; +import '../../../utilities/barcode_scanner_interface.dart'; +import '../../../utilities/clipboard_interface.dart'; +import '../../../utilities/constants.dart'; +import '../../../utilities/logger.dart'; +import '../../../utilities/text_styles.dart'; +import '../../../widgets/desktop/primary_button.dart'; +import '../../../widgets/desktop/secondary_button.dart'; +import '../../../widgets/icon_widgets/clipboard_icon.dart'; +import '../../../widgets/icon_widgets/qrcode_icon.dart'; +import '../../../widgets/icon_widgets/x_icon.dart'; +import '../../../widgets/stack_dialog.dart'; +import '../../../widgets/stack_text_field.dart'; +import '../../../widgets/textfield_icon_button.dart'; + +class SlatepackEntryDialog extends ConsumerStatefulWidget { + const SlatepackEntryDialog({ + super.key, + this.clipboard = const ClipboardWrapper(), + }); + + final ClipboardInterface clipboard; + + @override + ConsumerState createState() => + _SlatepackEntryDialogState(); +} + +class _SlatepackEntryDialogState extends ConsumerState { + final _receiveSlateController = TextEditingController(); + final _slateFocusNode = FocusNode(); + + bool _slateToggleFlag = false; + + Future _pasteSlatepack() async { + final ClipboardData? data = await widget.clipboard.getData( + Clipboard.kTextPlain, + ); + if (data?.text != null && data!.text!.isNotEmpty) { + _receiveSlateController.text = data.text!; + setState(() { + _slateToggleFlag = _receiveSlateController.text.isNotEmpty; + }); + } + } + + Future _scanQr() async { + try { + if (_slateFocusNode.hasFocus) { + _slateFocusNode.unfocus(); + await Future.delayed(const Duration(milliseconds: 75)); + } + + if (mounted) { + final qrResult = await ref.read(pBarcodeScanner).scan(context: context); + if (qrResult.rawContent.isNotEmpty && qrResult.rawContent != "null") { + _receiveSlateController.text = qrResult.rawContent; + setState(() { + _slateToggleFlag = _receiveSlateController.text.isNotEmpty; + }); + } + } + } on PlatformException catch (e, s) { + if (mounted) { + try { + await checkCamPermDeniedMobileAndOpenAppSettings( + context, + logging: Logging.instance, + ); + } catch (e, s) { + Logging.instance.e( + "Failed to check cam permissions", + error: e, + stackTrace: s, + ); + } + } else { + Logging.instance.e( + "Failed to get camera permissions while trying to scan qr code in SendView: ", + error: e, + stackTrace: s, + ); + } + } + } + + @override + void dispose() { + _receiveSlateController.dispose(); + _slateFocusNode.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return StackDialogBase( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "Receive Slatepack", + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, + ), + textAlign: TextAlign.left, + ), + const SizedBox(height: 12), + ClipRRect( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + minLines: 1, + maxLines: 5, + key: const Key("receiveViewSlatepackFieldKey"), + controller: _receiveSlateController, + readOnly: false, + autocorrect: false, + enableSuggestions: false, + toolbarOptions: const ToolbarOptions( + copy: false, + cut: false, + paste: true, + selectAll: false, + ), + onChanged: (newValue) { + setState(() { + _slateToggleFlag = newValue.isNotEmpty; + }); + }, + focusNode: _slateFocusNode, + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textFieldActiveText, + height: 1.8, + ), + decoration: standardInputDecoration( + "Enter Slatepack Message", + _slateFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 12, // Adjust vertical padding for better alignment + ), + suffixIcon: Padding( + padding: + _receiveSlateController.text.isEmpty + ? const EdgeInsets.only(right: 8) + : const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _slateToggleFlag + ? TextFieldIconButton( + key: const Key( + "receiveViewClearSlatepackFieldButtonKey", + ), + onTap: () { + _receiveSlateController.text = ""; + setState(() { + _slateToggleFlag = false; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + key: const Key( + "receiveViewPasteSlatepackFieldButtonKey", + ), + onTap: _pasteSlatepack, + child: + _receiveSlateController.text.isEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + if (_receiveSlateController.text.isEmpty) + TextFieldIconButton( + semanticsLabel: + "Scan QR Button. Opens Camera For Scanning QR Code.", + key: const Key("sendViewScanQrButtonKey"), + onTap: _scanQr, + child: const QrCodeIcon(), + ), + ], + ), + ), + ), + ), + ), + ), + const SizedBox(height: 16), + PrimaryButton( + label: "Import", + enabled: _slateToggleFlag, + onPressed: + !_slateToggleFlag + ? null + : () => + Navigator.of(context).pop(_receiveSlateController.text), + ), + const SizedBox(height: 16), + SecondaryButton( + label: "Cancel", + onPressed: Navigator.of(context).pop, + ), + ], + ), + ); + } +} diff --git a/lib/pages/salvium_stake/salvium_create_stake_view.dart b/lib/pages/salvium_stake/salvium_create_stake_view.dart new file mode 100644 index 000000000..58a9a5af4 --- /dev/null +++ b/lib/pages/salvium_stake/salvium_create_stake_view.dart @@ -0,0 +1,414 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../pages_desktop_specific/desktop_home_view.dart'; +import '../../providers/global/locale_provider.dart'; +import '../../providers/global/wallets_provider.dart'; +import '../../route_generator.dart'; +import '../../themes/stack_colors.dart'; +import '../../utilities/amount/amount.dart'; +import '../../utilities/amount/amount_formatter.dart'; +import '../../utilities/amount/amount_input_formatter.dart'; +import '../../utilities/amount/amount_unit.dart'; +import '../../utilities/enums/fee_rate_type_enum.dart'; +import '../../utilities/logger.dart'; +import '../../utilities/text_styles.dart'; +import '../../utilities/util.dart'; +import '../../wallets/isar/providers/wallet_info_provider.dart'; +import '../../wallets/models/tx_data.dart'; +import '../../wallets/wallet/impl/salvium_wallet.dart'; +import '../../widgets/background.dart'; +import '../../widgets/conditional_parent.dart'; +import '../../widgets/custom_buttons/app_bar_icon_button.dart'; +import '../../widgets/desktop/desktop_dialog.dart'; +import '../../widgets/desktop/desktop_dialog_close_button.dart'; +import '../../widgets/desktop/primary_button.dart'; +import '../../widgets/desktop/secondary_button.dart'; +import '../../widgets/stack_dialog.dart'; +import '../../wl_gen/interfaces/cs_salvium_interface.dart'; +import '../send_view/confirm_transaction_view.dart'; +import '../send_view/sub_widgets/building_transaction_dialog.dart'; + +class SalviumCreateStakeView extends ConsumerStatefulWidget { + const SalviumCreateStakeView({super.key, required this.walletId}); + + final String walletId; + + static const routeName = "/salviumCreateStakeView"; + + @override + ConsumerState createState() => + _SalviumCreateStakeViewState(); +} + +class _SalviumCreateStakeViewState + extends ConsumerState { + final _amountController = TextEditingController(); + final _amountFocus = FocusNode(); + + Amount? _amount; + + void _clearSendForm() { + if (mounted) { + _amountController.text = ""; + } + } + + void _parseAmount(String string) { + final cryptoAmount = ref + .read(pAmountFormatter(ref.read(pWalletCoin(widget.walletId)))) + .tryParse(string); + + if (_amount != cryptoAmount) { + setState(() { + _amount = cryptoAmount; + }); + } + } + + bool _lock = false; + Future _previewPressed() async { + if (_lock) return; + _lock = true; + + try { + bool wasCancelled = false; + + unawaited( + showDialog( + context: context, + useSafeArea: false, + barrierDismissible: false, + builder: (context) { + return ConditionalParent( + condition: Util.isDesktop, + builder: (child) => DesktopDialog( + maxWidth: 400, + maxHeight: double.infinity, + child: Padding(padding: const EdgeInsets.all(32), child: child), + ), + child: BuildingTransactionDialog( + coin: ref.read(pWalletCoin(widget.walletId)), + isSpark: false, + onCancel: () { + wasCancelled = true; + Navigator.of(context).pop(); + }, + ), + ); + }, + ), + ); + + final wallet = + ref.read(pWallets).getWallet(widget.walletId) as SalviumWallet; + + final address = csSalvium.getAddress(wallet.wallet!); + + final time = Future.delayed(const Duration(milliseconds: 2500)); + + final txDataFuture = wallet.prepareSend( + txData: TxData( + recipients: [ + TxRecipient( + address: address, + amount: _amount!, + isChange: false, + addressType: wallet.cryptoCurrency.getAddressType(address)!, + ), + ], + feeRateType: FeeRateType.average, + note: "Stake transaction", + salviumStakeTx: true, + ), + ); + + final results = await Future.wait([txDataFuture, time]); + final txData = results.first as TxData; + + if (!wasCancelled && mounted) { + // pop building dialog + Navigator.of(context, rootNavigator: Util.isDesktop).pop(); + + if (Util.isDesktop) { + unawaited( + showDialog( + context: context, + builder: (context) => DesktopDialog( + maxHeight: MediaQuery.of(context).size.height - 64, + maxWidth: 580, + child: ConfirmTransactionView( + txData: txData, + walletId: widget.walletId, + onSuccess: _clearSendForm, + routeOnSuccessName: DesktopHomeView.routeName, + ), + ), + ), + ); + } else { + unawaited( + Navigator.of(context).push( + RouteGenerator.getRoute( + shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, + builder: (_) => ConfirmTransactionView( + txData: txData, + walletId: widget.walletId, + onSuccess: _clearSendForm, + ), + settings: const RouteSettings( + name: ConfirmTransactionView.routeName, + ), + ), + ), + ); + } + } + } catch (e, s) { + Logging.instance.e("Salvium stake preview: ", error: e, stackTrace: s); + + if (mounted) { + // pop building dialog + Navigator.of(context, rootNavigator: Util.isDesktop).pop(); + + unawaited( + showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return Util.isDesktop + ? DesktopDialog( + maxWidth: 450, + maxHeight: double.infinity, + child: Padding( + padding: const EdgeInsets.only(left: 32, bottom: 32), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Transaction failed", + style: STextStyles.desktopH3(context), + ), + const DesktopDialogCloseButton(), + ], + ), + const SizedBox(height: 12), + Padding( + padding: const EdgeInsets.only(right: 32), + child: Text( + e.toString(), + textAlign: TextAlign.left, + style: STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith(fontSize: 18), + ), + ), + const SizedBox(height: 40), + Row( + children: [ + Expanded( + child: SecondaryButton( + buttonHeight: ButtonHeight.l, + label: "Ok", + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + ), + ), + const SizedBox(width: 32), + ], + ), + ], + ), + ), + ) + : StackDialog( + title: "Transaction failed", + message: e.toString(), + rightButton: TextButton( + style: Theme.of(context) + .extension()! + .getSecondaryEnabledButtonStyle(context), + child: Text( + "Ok", + style: STextStyles.button(context).copyWith( + color: Theme.of( + context, + ).extension()!.accentColorDark, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ); + }, + ), + ); + } + } finally { + _lock = false; + } + } + + @override + void initState() { + super.initState(); + _amountController.addListener(() { + if (mounted) { + _parseAmount(_amountController.text); + } + }); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (mounted) { + _amountFocus.requestFocus(); + } + }); + } + + @override + void dispose() { + _amountController.dispose(); + _amountFocus.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final coin = ref.watch(pWalletCoin(widget.walletId)); + final locale = ref.watch( + localeServiceChangeNotifierProvider.select((s) => s.locale), + ); + + return ConditionalParent( + condition: !Util.isDesktop, + builder: (child) => Background( + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.transparent, + // Theme.of(context).extension()!.background, + leading: const AppBarBackButton(), + title: Text( + "Stake transaction", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight(child: child), + ), + ), + ); + }, + ), + ), + ), + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Amount", + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, + ), + textAlign: TextAlign.left, + ), + ], + ), + const SizedBox(height: 10), + TextField( + autocorrect: Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop ? false : true, + style: STextStyles.smallMed14(context).copyWith( + color: Theme.of(context).extension()!.textDark, + ), + key: const Key("amountStakingInputFieldCryptoTextFieldKey"), + controller: _amountController, + focusNode: _amountFocus, + keyboardType: Util.isDesktop + ? null + : const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), + textAlign: TextAlign.right, + inputFormatters: [ + AmountInputFormatter( + decimals: coin.fractionDigits, + unit: ref.watch(pAmountUnit(coin)), + locale: locale, + ), + ], + decoration: InputDecoration( + contentPadding: Util.isDesktop + ? const EdgeInsets.only(top: 22, right: 12, bottom: 22) + : const EdgeInsets.only(top: 12, right: 12), + hintText: "0", + hintStyle: Util.isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( + context, + ).extension()!.textFieldDefaultText, + ) + : STextStyles.fieldLabel(context).copyWith(fontSize: 14), + prefixIcon: FittedBox( + fit: BoxFit.scaleDown, + child: Padding( + padding: const EdgeInsets.all(12), + child: Text( + ref.watch(pAmountUnit(coin)).unitForCoin(coin), + style: STextStyles.smallMed14(context).copyWith( + color: Theme.of( + context, + ).extension()!.accentColorDark, + ), + ), + ), + ), + ), + ), + const SizedBox(height: 32), + if (!Util.isDesktop) const Spacer(), + ConditionalParent( + condition: Util.isDesktop, + builder: (child) => Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [child], + ), + child: PrimaryButton( + width: Util.isDesktop ? 200 : null, + buttonHeight: Util.isDesktop ? ButtonHeight.l : null, + label: "Preview", + onPressed: _amount == null ? null : _previewPressed, + enabled: _amount != null, + ), + ), + if (!Util.isDesktop) const SizedBox(height: 16), + ], + ), + ); + } +} diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index 220d0e04f..5cb12e02a 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -9,11 +9,11 @@ */ import 'dart:async'; +import 'dart:convert'; import 'dart:io'; import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/lib.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -34,11 +34,13 @@ import '../../utilities/text_styles.dart'; import '../../utilities/util.dart'; import '../../wallets/crypto_currency/coins/epiccash.dart'; import '../../wallets/crypto_currency/coins/ethereum.dart'; +import '../../wallets/crypto_currency/coins/mimblewimblecoin.dart'; import '../../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../../wallets/isar/providers/eth/current_token_wallet_provider.dart'; import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../../wallets/models/tx_data.dart'; import '../../wallets/wallet/impl/firo_wallet.dart'; +import '../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart'; import '../../widgets/background.dart'; import '../../widgets/conditional_parent.dart'; @@ -52,8 +54,10 @@ import '../../widgets/rounded_white_container.dart'; import '../../widgets/stack_dialog.dart'; import '../../widgets/stack_text_field.dart'; import '../../widgets/textfield_icon_button.dart'; +import '../../wl_gen/interfaces/libepiccash_interface.dart'; import '../pinpad_views/lock_screen_view.dart'; import '../wallet_view/wallet_view.dart'; +import 'sub_widgets/mwc_slatepack_dialog.dart'; import 'sub_widgets/sending_transaction_dialog.dart'; class ConfirmTransactionView extends ConsumerStatefulWidget { @@ -99,6 +103,88 @@ class _ConfirmTransactionViewState late final FocusNode _onChainNoteFocusNode; late final TextEditingController onChainNoteController; + /// Handle MWC slatepack creation for manual exchange. + Future _handleMwcSlatepackCreation( + BuildContext context, + MimblewimblecoinWallet wallet, + ) async { + try { + // Close the progress dialog first. + Navigator.of(context).pop(); + + // Get recipient information from txData. + final recipient = widget.txData.recipients?.first; + if (recipient == null) { + throw Exception('No recipient found in transaction data'); + } + + // Create slatepack. + final slatepackResult = await wallet.createSlatepack( + amount: recipient.amount, + recipientAddress: recipient.address.isNotEmpty + ? recipient.address + : null, + message: onChainNoteController.text.isNotEmpty + ? onChainNoteController.text + : null, + encrypt: recipient + .address + .isNotEmpty, // Encrypt if we have a recipient address. + ); + + if (!slatepackResult.success || slatepackResult.slatepack == null) { + throw Exception(slatepackResult.error ?? 'Failed to create slatepack'); + } + + // Show slatepack dialog. + if (context.mounted) { + await showDialog( + context: context, + barrierDismissible: false, + builder: (context) => + MwcSlatepackDialog(slatepackResult: slatepackResult), + ); + + // After slatepack dialog is closed, navigate back to wallet. + if (context.mounted) { + widget.onSuccess.call(); + if (widget.onSuccessInsteadOfRouteOnSuccess == null) { + Navigator.of( + context, + ).popUntil(ModalRoute.withName(routeOnSuccessName)); + } else { + widget.onSuccessInsteadOfRouteOnSuccess!.call(); + } + } + } + } catch (e, s) { + Logging.instance.e('Failed to create MWC slatepack: $e\n$s'); + + if (context.mounted) { + // Show user-friendly error message. + final errorMessage = e.toString().contains('insufficient funds') + ? 'Insufficient funds for this transaction' + : e.toString().contains('wallet not open') + ? 'Wallet not accessible. Please restart the app.' + : 'Failed to create slatepack: ${e.toString()}'; + + await showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('Slatepack Creation Failed'), + content: Text('Failed to create slatepack: $e'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('OK'), + ), + ], + ), + ); + } + } + } + Future _attemptSend(BuildContext context) async { final wallet = ref.read(pWallets).getWallet(walletId); final coin = wallet.info.coin; @@ -155,7 +241,30 @@ class _ConfirmTransactionViewState break; } } else { - if (coin is Epiccash) { + if (coin is Mimblewimblecoin) { + // Check if this is a slatepack transaction (manual exchange). + final otherDataMap = widget.txData.otherData != null + ? jsonDecode(widget.txData.otherData!) + : null; + final transactionMethod = + otherDataMap?['transactionMethod'] as String?; + + if (transactionMethod == 'slatepack') { + // Handle slatepack creation instead of direct send. + await _handleMwcSlatepackCreation( + context, + wallet as MimblewimblecoinWallet, + ); + return; // Exit early, don't continue with normal transaction flow. + } else { + // Handle MWCMQS or HTTP transactions normally. + txDataFuture = wallet.confirmSend( + txData: widget.txData.copyWith( + noteOnChain: onChainNoteController.text, + ), + ); + } + } else if (coin is Epiccash) { txDataFuture = wallet.confirmSend( txData: widget.txData.copyWith( noteOnChain: onChainNoteController.text, @@ -209,7 +318,7 @@ class _ConfirmTransactionViewState widget.onSuccessInsteadOfRouteOnSuccess!.call(); } } - } on BadEpicHttpAddressException catch (_) { + } on BadHttpAddressException catch (_) { if (context.mounted) { // pop building dialog Navigator.of(context).pop(); @@ -282,10 +391,9 @@ class _ConfirmTransactionViewState child: Text( "Ok", style: STextStyles.button(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), onPressed: () { @@ -380,81 +488,76 @@ class _ConfirmTransactionViewState return ConditionalParent( condition: !isDesktop, - builder: - (child) => Background( - child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, - appBar: AppBar( - backgroundColor: - Theme.of(context).extension()!.background, - leading: AppBarBackButton( - onPressed: () async { - // if (FocusScope.of(context).hasFocus) { - // FocusScope.of(context).unfocus(); - // await Future.delayed(Duration(milliseconds: 50)); - // } - Navigator.of(context).pop(); - }, - ), - title: Text( - "Confirm transaction", - style: STextStyles.navBarTitle(context), - ), - ), - body: SafeArea( - child: LayoutBuilder( - builder: (builderContext, constraints) { - return Padding( - padding: const EdgeInsets.only( - left: 12, - top: 12, - right: 12, + builder: (child) => Background( + child: Scaffold( + backgroundColor: Theme.of( + context, + ).extension()!.background, + appBar: AppBar( + backgroundColor: Theme.of( + context, + ).extension()!.background, + leading: AppBarBackButton( + onPressed: () async { + // if (FocusScope.of(context).hasFocus) { + // FocusScope.of(context).unfocus(); + // await Future.delayed(Duration(milliseconds: 50)); + // } + Navigator.of(context).pop(); + }, + ), + title: Text( + "Confirm transaction", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (builderContext, constraints) { + return Padding( + padding: const EdgeInsets.only(left: 12, top: 12, right: 12), + child: SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight - 24, ), - child: SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight - 24, - ), - child: IntrinsicHeight( - child: Padding( - padding: const EdgeInsets.all(4), - child: child, - ), - ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(4), + child: child, ), ), - ); - }, - ), - ), + ), + ), + ); + }, ), ), + ), + ), child: ConditionalParent( condition: isDesktop, - builder: - (child) => Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisSize: MainAxisSize.min, + builder: (child) => Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.min, + children: [ + Row( children: [ - Row( - children: [ - AppBarBackButton( - size: 40, - iconSize: 24, - onPressed: - () => - Navigator.of(context, rootNavigator: true).pop(), - ), - Text( - "Confirm $unit transaction", - style: STextStyles.desktopH3(context), - ), - ], + AppBarBackButton( + size: 40, + iconSize: 24, + onPressed: () => + Navigator.of(context, rootNavigator: true).pop(), + ), + Text( + "Confirm $unit transaction", + style: STextStyles.desktopH3(context), ), - Flexible(child: SingleChildScrollView(child: child)), ], ), + Flexible(child: SingleChildScrollView(child: child)), + ], + ), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisSize: isDesktop ? MainAxisSize.min : MainAxisSize.max, @@ -480,7 +583,11 @@ class _ConfirmTransactionViewState widget.isPaynymTransaction ? widget.txData.paynymAccountLite!.nymName : widget.txData.recipients?.first.address ?? - widget.txData.sparkRecipients!.first.address, + widget + .txData + .sparkRecipients! + .first + .address, style: STextStyles.itemSubtitle12(context), ), ], @@ -497,12 +604,11 @@ class _ConfirmTransactionViewState .watch(pAmountFormatter(coin)) .format( amountWithoutChange, - ethContract: - widget.isTokenTx - ? ref - .watch(pCurrentTokenWallet)! - .tokenContract - : null, + ethContract: widget.isTokenTx + ? ref + .watch(pCurrentTokenWallet)! + .tokenContract + : null, ), style: STextStyles.itemSubtitle12(context), textAlign: TextAlign.right, @@ -562,9 +668,11 @@ class _ConfirmTransactionViewState ], ), ), - if (coin is Epiccash && widget.txData.noteOnChain!.isNotEmpty) + if ((coin is Epiccash || coin is Mimblewimblecoin) && + widget.txData.noteOnChain!.isNotEmpty) const SizedBox(height: 12), - if (coin is Epiccash && widget.txData.noteOnChain!.isNotEmpty) + if ((coin is Epiccash || coin is Mimblewimblecoin) && + widget.txData.noteOnChain!.isNotEmpty) RoundedWhiteContainer( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, @@ -589,7 +697,9 @@ class _ConfirmTransactionViewState crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text( - (coin is Epiccash) ? "Local Note" : "Note", + (coin is Epiccash || coin is Mimblewimblecoin) + ? "Local Note" + : "Note", style: STextStyles.smallMed12(context), ), const SizedBox(height: 4), @@ -612,18 +722,18 @@ class _ConfirmTransactionViewState ), child: RoundedWhiteContainer( padding: const EdgeInsets.all(0), - borderColor: - Theme.of(context).extension()!.background, + borderColor: Theme.of( + context, + ).extension()!.background, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, borderRadius: BorderRadius.only( topLeft: Radius.circular( Constants.size.circularBorderRadius, @@ -683,37 +793,35 @@ class _ConfirmTransactionViewState String fiatAmount = "N/A"; if (externalCalls) { - final price = - widget.isTokenTx - ? ref - .read( - priceAnd24hChangeNotifierProvider, - ) - .getTokenPrice( - ref - .read(pCurrentTokenWallet)! - .tokenContract - .address, - ) - ?.value - : ref - .read( - priceAnd24hChangeNotifierProvider, - ) - .getPrice(coin) - ?.value; - if (price != null && price > Decimal.zero) { - fiatAmount = (amountWithoutChange.decimal * - price) - .toAmount(fractionDigits: 2) - .fiatString( - locale: + final price = widget.isTokenTx + ? ref + .read( + priceAnd24hChangeNotifierProvider, + ) + .getTokenPrice( ref + .read(pCurrentTokenWallet)! + .tokenContract + .address, + ) + ?.value + : ref + .read( + priceAnd24hChangeNotifierProvider, + ) + .getPrice(coin) + ?.value; + if (price != null && price > Decimal.zero) { + fiatAmount = + (amountWithoutChange.decimal * price) + .toAmount(fractionDigits: 2) + .fiatString( + locale: ref .read( localeServiceChangeNotifierProvider, ) .locale, - ); + ); } } @@ -724,23 +832,21 @@ class _ConfirmTransactionViewState .watch(pAmountFormatter(coin)) .format( amountWithoutChange, - ethContract: - widget.isTokenTx - ? ref - .watch( - pCurrentTokenWallet, - )! - .tokenContract - : null, + ethContract: widget.isTokenTx + ? ref + .watch( + pCurrentTokenWallet, + )! + .tokenContract + : null, ), style: STextStyles.desktopTextExtraExtraSmall( context, ).copyWith( - color: - Theme.of(context) - .extension()! - .textDark, + color: Theme.of(context) + .extension()! + .textDark, ), ), if (externalCalls) @@ -768,10 +874,9 @@ class _ConfirmTransactionViewState ), Container( height: 1, - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, ), Padding( padding: const EdgeInsets.all(12), @@ -793,19 +898,19 @@ class _ConfirmTransactionViewState widget.isPaynymTransaction ? widget.txData.paynymAccountLite!.nymName : widget.txData.recipients?.first.address ?? - widget - .txData - .sparkRecipients! - .first - .address, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + widget + .txData + .sparkRecipients! + .first + .address, + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( context, ).extension()!.textDark, - ), + ), ), ], ), @@ -813,10 +918,9 @@ class _ConfirmTransactionViewState if (widget.isPaynymTransaction) Container( height: 1, - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, ), if (widget.isPaynymTransaction) Padding( @@ -834,14 +938,14 @@ class _ConfirmTransactionViewState const SizedBox(height: 2), SelectableText( ref.watch(pAmountFormatter(coin)).format(fee!), - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( context, ).extension()!.textDark, - ), + ), ), ], ), @@ -849,10 +953,9 @@ class _ConfirmTransactionViewState if (coin is Ethereum) Container( height: 1, - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, ), if (coin is Ethereum) Padding( @@ -870,14 +973,14 @@ class _ConfirmTransactionViewState const SizedBox(height: 2), SelectableText( widget.txData.nonce.toString(), - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( context, ).extension()!.textDark, - ), + ), ), ], ), @@ -926,14 +1029,15 @@ class _ConfirmTransactionViewState mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) Text( "On chain Note (optional)", style: STextStyles.smallMed12(context), textAlign: TextAlign.left, ), - if (coin is Epiccash) const SizedBox(height: 8), - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) + const SizedBox(height: 8), + if (coin is Epiccash || coin is Mimblewimblecoin) ClipRRect( borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, @@ -946,48 +1050,50 @@ class _ConfirmTransactionViewState focusNode: _onChainNoteFocusNode, style: STextStyles.field(context), onChanged: (_) => setState(() {}), - decoration: standardInputDecoration( - "Type something...", - _onChainNoteFocusNode, - context, - ).copyWith( - suffixIcon: - onChainNoteController.text.isNotEmpty + decoration: + standardInputDecoration( + "Type something...", + _onChainNoteFocusNode, + context, + ).copyWith( + suffixIcon: + onChainNoteController.text.isNotEmpty ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - onChainNoteController.text = - ""; - }); - }, - ), - ], + padding: const EdgeInsets.only( + right: 0, ), - ), - ) + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + onChainNoteController.text = + ""; + }); + }, + ), + ], + ), + ), + ) : null, - ), + ), ), ), - if (coin is Epiccash) const SizedBox(height: 12), + if (coin is Epiccash || coin is Mimblewimblecoin) + const SizedBox(height: 12), SelectableText( - (coin is Epiccash) + (coin is Epiccash || coin is Mimblewimblecoin) ? "Local Note (optional)" : "Note (optional)", - style: STextStyles.desktopTextExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) .extension()! .textFieldActiveSearchIconRight, - ), + ), textAlign: TextAlign.left, ), const SizedBox(height: 10), @@ -1002,49 +1108,48 @@ class _ConfirmTransactionViewState enableSuggestions: isDesktop ? false : true, controller: noteController, focusNode: _noteFocusNode, - style: STextStyles.desktopTextExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of( context, ).extension()!.textFieldActiveText, - height: 1.8, - ), + height: 1.8, + ), onChanged: (_) => setState(() {}), - decoration: standardInputDecoration( - "Type something...", - _noteFocusNode, - context, - desktopMed: true, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 11, - bottom: 12, - right: 5, - ), - suffixIcon: - noteController.text.isNotEmpty + decoration: + standardInputDecoration( + "Type something...", + _noteFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 11, + bottom: 12, + right: 5, + ), + suffixIcon: noteController.text.isNotEmpty ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState( - () => noteController.text = "", - ); - }, - ), - ], + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState( + () => + noteController.text = "", + ); + }, + ), + ], + ), ), - ), - ) + ) : null, - ), + ), ), ), const SizedBox(height: 20), @@ -1067,10 +1172,9 @@ class _ConfirmTransactionViewState horizontal: 16, vertical: 18, ), - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, child: SelectableText( ref.watch(pAmountFormatter(coin)).format(fee!), style: STextStyles.itemSubtitle(context), @@ -1099,10 +1203,9 @@ class _ConfirmTransactionViewState horizontal: 16, vertical: 18, ), - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, child: SelectableText( "~${fee!.raw.toInt() ~/ widget.txData.vSize!}", style: STextStyles.itemSubtitle(context), @@ -1113,64 +1216,52 @@ class _ConfirmTransactionViewState SizedBox(height: isDesktop ? 23 : 12), if (!widget.isTokenTx) Padding( - padding: - isDesktop - ? const EdgeInsets.symmetric(horizontal: 32) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.symmetric(horizontal: 32) + : const EdgeInsets.all(0), child: RoundedContainer( - padding: - isDesktop - ? const EdgeInsets.symmetric( - horizontal: 16, - vertical: 18, - ) - : const EdgeInsets.all(12), - color: - Theme.of( - context, - ).extension()!.snackBarBackSuccess, + padding: isDesktop + ? const EdgeInsets.symmetric(horizontal: 16, vertical: 18) + : const EdgeInsets.all(12), + color: Theme.of( + context, + ).extension()!.snackBarBackSuccess, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( isDesktop ? "Total amount to send" : "Total amount", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension()! - .textConfirmTotalAmount, - ) - : STextStyles.titleBold12(context).copyWith( - color: - Theme.of(context) - .extension()! - .textConfirmTotalAmount, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ) + : STextStyles.titleBold12(context).copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ), ), SelectableText( ref .watch(pAmountFormatter(coin)) .format(amountWithoutChange + fee!), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension()! - .textConfirmTotalAmount, - ) - : STextStyles.itemSubtitle12(context).copyWith( - color: - Theme.of(context) - .extension()! - .textConfirmTotalAmount, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ) + : STextStyles.itemSubtitle12(context).copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ), textAlign: TextAlign.right, ), ], @@ -1179,10 +1270,9 @@ class _ConfirmTransactionViewState ), SizedBox(height: isDesktop ? 28 : 16), Padding( - padding: - isDesktop - ? const EdgeInsets.symmetric(horizontal: 32) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.symmetric(horizontal: 32) + : const EdgeInsets.all(0), child: PrimaryButton( label: "Send", buttonHeight: isDesktop ? ButtonHeight.l : null, @@ -1190,28 +1280,27 @@ class _ConfirmTransactionViewState if (isDesktop) { final unlocked = await showDialog( context: context, - builder: - (context) => DesktopDialog( - maxWidth: 580, - maxHeight: double.infinity, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [DesktopDialogCloseButton()], - ), - Padding( - padding: const EdgeInsets.only( - left: 32, - right: 32, - bottom: 32, - ), - child: DesktopAuthSend(coin: coin), - ), - ], + builder: (context) => DesktopDialog( + maxWidth: 580, + maxHeight: double.infinity, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [DesktopDialogCloseButton()], ), - ), + Padding( + padding: const EdgeInsets.only( + left: 32, + right: 32, + bottom: 32, + ), + child: DesktopAuthSend(coin: coin), + ), + ], + ), + ), ); if (context.mounted && unlocked is bool) { if (unlocked) { @@ -1232,18 +1321,16 @@ class _ConfirmTransactionViewState RouteGenerator.getRoute( shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, - builder: - (_) => const LockscreenView( - showBackButton: true, - popOnSuccess: true, - routeOnSuccessArguments: true, - routeOnSuccess: "", - biometricsCancelButtonString: "CANCEL", - biometricsLocalizedReason: - "Authenticate to send transaction", - biometricsAuthenticationTitle: - "Confirm Transaction", - ), + builder: (_) => const LockscreenView( + showBackButton: true, + popOnSuccess: true, + routeOnSuccessArguments: true, + routeOnSuccess: "", + biometricsCancelButtonString: "CANCEL", + biometricsLocalizedReason: + "Authenticate to send transaction", + biometricsAuthenticationTitle: "Confirm Transaction", + ), settings: const RouteSettings( name: "/confirmsendlockscreen", ), @@ -1257,10 +1344,9 @@ class _ConfirmTransactionViewState unawaited( showFloatingFlushBar( type: FlushBarType.warning, - message: - Util.isDesktop - ? "Invalid passphrase" - : "Invalid PIN", + message: Util.isDesktop + ? "Invalid passphrase" + : "Invalid PIN", context: context, ), ); diff --git a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_1b.dart b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_1b.dart index e5f6581a1..2ce537697 100644 --- a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_1b.dart +++ b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_1b.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../frost_route_generator.dart'; import '../../../../models/input.dart'; @@ -8,7 +8,6 @@ import '../../../../models/isar/models/isar_models.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../providers/global/wallets_provider.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/format.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; @@ -19,6 +18,7 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/frost_step_user_steps.dart'; import '../../../../widgets/stack_dialog.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; class FrostSendStep1b extends ConsumerStatefulWidget { const FrostSendStep1b({super.key}); @@ -65,43 +65,40 @@ class _FrostSendStep1bState extends ConsumerState { ref.read(pWallets).getWallet(ref.read(pFrostScaffoldArgs)!.walletId!) as BitcoinFrostWallet; - final data = Frost.extractDataFromSignConfig( + final data = frostInterface.extractDataFromSignConfig( signConfig: config, coin: wallet.cryptoCurrency, serializedKeys: (await wallet.getSerializedKeys())!, ); - final utxos = - await ref - .read(mainDBProvider) - .getUTXOs(wallet.walletId) - .filter() - .anyOf( - data.inputs, - (q, e) => q - .txidEqualTo(Format.uint8listToString(e.hash)) - .and() - .valueEqualTo(e.value) - .and() - .voutEqualTo(e.vout), - ) - .findAll(); + final utxos = await ref + .read(mainDBProvider) + .getUTXOs(wallet.walletId) + .filter() + .anyOf( + data.inputs, + (q, e) => q + .txidEqualTo(Format.uint8listToString(e.hash)) + .and() + .valueEqualTo(e.value) + .and() + .voutEqualTo(e.vout), + ) + .findAll(); // TODO add more data from 'data' and display to user ? ref.read(pFrostTxData.notifier).state = TxData( frostMSConfig: config, - recipients: - data.recipients - .map( - (e) => TxRecipient( - address: e.address, - amount: e.amount, - isChange: false, - addressType: - wallet.cryptoCurrency.getAddressType(e.address)!, - ), - ) - .toList(), + recipients: data.recipients + .map( + (e) => TxRecipient( + address: e.address, + amount: e.amount, + isChange: false, + addressType: wallet.cryptoCurrency.getAddressType(e.address)!, + ), + ) + .toList(), utxos: utxos.map((e) => StandardInput(e)).toSet(), ); @@ -123,12 +120,11 @@ class _FrostSendStep1bState extends ConsumerState { if (mounted) { await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: "Import and attempt sign config failed", - message: e.toString(), - desktopPopRootNavigator: Util.isDesktop, - ), + builder: (_) => StackOkDialog( + title: "Import and attempt sign config failed", + message: e.toString(), + desktopPopRootNavigator: Util.isDesktop, + ), ); } } finally { diff --git a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_2.dart b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_2.dart index febae8b54..b0a5c6695 100644 --- a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_2.dart +++ b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_2.dart @@ -4,7 +4,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../providers/global/wallets_provider.dart'; -import '../../../../services/frost.dart'; import '../../../../themes/stack_colors.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/text_styles.dart'; @@ -17,6 +16,7 @@ import '../../../../widgets/detail_item.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/rounded_white_container.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostSendStep2 extends ConsumerStatefulWidget { @@ -56,15 +56,16 @@ class _FrostSendStep2State extends ConsumerState { @override void initState() { - final wallet = ref.read(pWallets).getWallet( - ref.read(pFrostScaffoldArgs)!.walletId!, - ) as BitcoinFrostWallet; + final wallet = + ref.read(pWallets).getWallet(ref.read(pFrostScaffoldArgs)!.walletId!) + as BitcoinFrostWallet; final frostInfo = wallet.frostInfo; myName = frostInfo.myName; threshold = frostInfo.threshold; - participantsWithoutMe = - List.from(frostInfo.participants); // Copy so it isn't fixed-length. + participantsWithoutMe = List.from( + frostInfo.participants, + ); // Copy so it isn't fixed-length. myIndex = participantsWithoutMe.indexOf(frostInfo.myName); myPreprocess = ref.read(pFrostAttemptSignData.state).state!.preprocess; @@ -103,13 +104,8 @@ class _FrostSendStep2State extends ConsumerState { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "1.", - style: STextStyles.w500_12(context), - ), - const SizedBox( - width: 4, - ), + Text("1.", style: STextStyles.w500_12(context)), + const SizedBox(width: 4), Expanded( child: Text( "Share your preprocess with other signing group members.", @@ -118,19 +114,12 @@ class _FrostSendStep2State extends ConsumerState { ), ], ), - const SizedBox( - height: 4, - ), + const SizedBox(height: 4), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "2.", - style: STextStyles.w500_12(context), - ), - const SizedBox( - width: 4, - ), + Text("2.", style: STextStyles.w500_12(context)), + const SizedBox(width: 4), Expanded( child: RichText( text: TextSpan( @@ -141,7 +130,8 @@ class _FrostSendStep2State extends ConsumerState { style: STextStyles.w500_12(context), ), TextSpan( - text: "You must have the threshold number of " + text: + "You must have the threshold number of " "preprocesses (including yours) to send this transaction.", style: STextStyles.w600_12(context).copyWith( color: Theme.of(context) @@ -158,58 +148,38 @@ class _FrostSendStep2State extends ConsumerState { ], ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), DetailItem( title: "Threshold", detail: "$threshold signatures", horizontal: true, ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), DetailItem( title: "My name", detail: myName, button: Util.isDesktop - ? IconCopyButton( - data: myName, - ) - : SimpleCopyButton( - data: myName, - ), - ), - const SizedBox( - height: 12, + ? IconCopyButton(data: myName) + : SimpleCopyButton(data: myName), ), + const SizedBox(height: 12), DetailItem( title: "My preprocess", detail: myPreprocess, button: Util.isDesktop - ? IconCopyButton( - data: myPreprocess, - ) - : SimpleCopyButton( - data: myPreprocess, - ), + ? IconCopyButton(data: myPreprocess) + : SimpleCopyButton(data: myPreprocess), ), const SizedBox(height: 12), - FrostQrDialogPopupButton( - data: myPreprocess, - ), - const SizedBox( - height: 12, - ), + FrostQrDialogPopupButton(data: myPreprocess), + const SizedBox(height: 12), RoundedWhiteContainer( child: Text( "You need to obtain ${threshold - 1} preprocess from signing members to send this transaction.", style: STextStyles.label(context), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Builder( builder: (context) { final count = countPreprocesses(); @@ -224,9 +194,7 @@ class _FrostSendStep2State extends ConsumerState { ); }, ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -247,9 +215,7 @@ class _FrostSendStep2State extends ConsumerState { ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), PrimaryButton( label: "Generate shares", enabled: countPreprocesses() >= threshold, @@ -271,12 +237,14 @@ class _FrostSendStep2State extends ConsumerState { preprocesses.insert(myIndex, ""); try { - ref.read(pFrostContinueSignData.notifier).state = - Frost.continueSigning( - machinePtr: - ref.read(pFrostAttemptSignData.state).state!.machinePtr, - preprocesses: preprocesses, - ); + ref.read(pFrostContinueSignData.notifier).state = frostInterface + .continueSigning( + machinePtr: ref + .read(pFrostAttemptSignData.state) + .state! + .machinePtr, + preprocesses: preprocesses, + ); ref.read(pFrostCreateCurrentStep.state).state = 3; await Navigator.of(context).pushNamed( @@ -291,7 +259,7 @@ class _FrostSendStep2State extends ConsumerState { // arguments: widget.walletId, // ); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (context.mounted) { return await showDialog( diff --git a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_3.dart b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_3.dart index f3ddc90cc..d3e9f91a2 100644 --- a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_3.dart +++ b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_3.dart @@ -5,7 +5,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; import '../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../providers/global/wallets_provider.dart'; -import '../../../../services/frost.dart'; import '../../../../utilities/amount/amount.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/util.dart'; @@ -18,6 +17,7 @@ import '../../../../widgets/detail_item.dart'; import '../../../../widgets/dialogs/frost/frost_error_dialog.dart'; import '../../../../widgets/frost_step_user_steps.dart'; import '../../../../widgets/textfields/frost_step_field.dart'; +import '../../../../wl_gen/interfaces/frost_interface.dart'; import '../../../wallet_view/transaction_views/transaction_details_view.dart'; class FrostSendStep3 extends ConsumerStatefulWidget { @@ -62,13 +62,12 @@ class _FrostSendStep3State extends ConsumerState { myIndex = frostInfo.participants.indexOf(frostInfo.myName); myShare = ref.read(pFrostContinueSignData.state).state!.share; - participantsWithoutMe = - frostInfo.participants - .toSet() - .intersection( - ref.read(pFrostSelectParticipantsUnordered.state).state!.toSet(), - ) - .toList(); + participantsWithoutMe = frostInfo.participants + .toSet() + .intersection( + ref.read(pFrostSelectParticipantsUnordered.state).state!.toSet(), + ) + .toList(); participantsWithoutMe.remove(myName); @@ -104,19 +103,17 @@ class _FrostSendStep3State extends ConsumerState { DetailItem( title: "My name", detail: myName, - button: - Util.isDesktop - ? IconCopyButton(data: myName) - : SimpleCopyButton(data: myName), + button: Util.isDesktop + ? IconCopyButton(data: myName) + : SimpleCopyButton(data: myName), ), const SizedBox(height: 12), DetailItem( title: "My share", detail: myShare, - button: - Util.isDesktop - ? IconCopyButton(data: myShare) - : SimpleCopyButton(data: myShare), + button: Util.isDesktop + ? IconCopyButton(data: myShare) + : SimpleCopyButton(data: myShare), ), const SizedBox(height: 12), FrostQrDialogPopupButton(data: myShare), @@ -172,9 +169,11 @@ class _FrostSendStep3State extends ConsumerState { } try { - final rawTx = Frost.completeSigning( - machinePtr: - ref.read(pFrostContinueSignData.state).state!.machinePtr, + final rawTx = frostInterface.completeSigning( + machinePtr: ref + .read(pFrostContinueSignData.state) + .state! + .machinePtr, shares: shares, ); @@ -216,10 +215,9 @@ class _FrostSendStep3State extends ConsumerState { if (context.mounted) { return await showDialog( context: context, - builder: - (_) => const FrostErrorDialog( - title: "Failed to complete signing process", - ), + builder: (_) => const FrostErrorDialog( + title: "Failed to complete signing process", + ), ); } } diff --git a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_4.dart b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_4.dart index ee45a6e70..927a09b3c 100644 --- a/lib/pages/send_view/frost_ms/send_steps/frost_send_step_4.dart +++ b/lib/pages/send_view/frost_ms/send_steps/frost_send_step_4.dart @@ -21,7 +21,8 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/detail_item.dart'; import '../../../../widgets/expandable.dart'; import '../../../../widgets/stack_dialog.dart'; -import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; +import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tvd; import '../../../wallet_view/wallet_view.dart'; class FrostSendStep4 extends ConsumerStatefulWidget { @@ -43,9 +44,9 @@ class _FrostSendStep4State extends ConsumerState { @override void initState() { - final wallet = ref.read(pWallets).getWallet( - ref.read(pFrostScaffoldArgs)!.walletId!, - ) as BitcoinFrostWallet; + final wallet = + ref.read(pWallets).getWallet(ref.read(pFrostScaffoldArgs)!.walletId!) + as BitcoinFrostWallet; cryptoCurrency = wallet.cryptoCurrency; @@ -80,79 +81,70 @@ class _FrostSendStep4State extends ConsumerState { DetailItem( title: "Tx hex (debug mode only)", detail: ref.watch(pFrostTxData)!.raw!, - button: Util.isDesktop - ? IconCopyButton( - data: ref.watch(pFrostTxData)!.raw!, - ) - : SimpleCopyButton( - data: ref.watch(pFrostTxData)!.raw!, - ), - ), - if (kDebugMode) - const SizedBox( - height: 12, + button: + Util.isDesktop + ? tvd.IconCopyButton(data: ref.watch(pFrostTxData)!.raw!) + : SimpleCopyButton(data: ref.watch(pFrostTxData)!.raw!), ), + if (kDebugMode) const SizedBox(height: 12), Text( "Send ${cryptoCurrency.ticker}", style: STextStyles.w600_20(context), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), recipients.length == 1 ? _Recipient( - address: recipients[0].address, - amount: ref - .watch(pAmountFormatter(cryptoCurrency)) - .format(recipients[0].amount), - ) + address: recipients[0].address, + amount: ref + .watch(pAmountFormatter(cryptoCurrency)) + .format(recipients[0].amount), + ) : Column( - children: [ - for (int i = 0; i < recipients.length; i++) - Padding( - padding: const EdgeInsets.only(top: 10), - child: Expandable( - onExpandChanged: (state) { - setState(() { - _expandedStates[i] = - state == ExpandableState.expanded; - }); - }, - header: Padding( - padding: const EdgeInsets.only(top: 12, bottom: 6), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Recipient ${i + 1}", - style: STextStyles.itemSubtitle(context), - ), - SvgPicture.asset( - _expandedStates[i] - ? Assets.svg.chevronUp - : Assets.svg.chevronDown, - width: 12, - height: 6, - color: Theme.of(context) - .extension()! - .textSubtitle1, - ), - ], - ), - ), - body: _Recipient( - address: recipients[i].address, - amount: ref - .watch(pAmountFormatter(cryptoCurrency)) - .format(recipients[i].amount), + children: [ + for (int i = 0; i < recipients.length; i++) + Padding( + padding: const EdgeInsets.only(top: 10), + child: Expandable( + onExpandChanged: (state) { + setState(() { + _expandedStates[i] = + state == ExpandableState.expanded; + }); + }, + header: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 6), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Recipient ${i + 1}", + style: STextStyles.itemSubtitle(context), + ), + SvgPicture.asset( + _expandedStates[i] + ? Assets.svg.chevronUp + : Assets.svg.chevronDown, + width: 12, + height: 6, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, + ), + ], ), ), + body: _Recipient( + address: recipients[i].address, + amount: ref + .watch(pAmountFormatter(cryptoCurrency)) + .format(recipients[i].amount), + ), ), - ], - ), - const SizedBox( - height: 12, - ), + ), + ], + ), + const SizedBox(height: 12), DetailItem( title: "Transaction fee", detail: ref @@ -160,38 +152,27 @@ class _FrostSendStep4State extends ConsumerState { .format(ref.watch(pFrostTxData)!.fee!), horizontal: true, ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), DetailItem( title: "Total", - detail: ref.watch(pAmountFormatter(cryptoCurrency)).format( + detail: ref + .watch(pAmountFormatter(cryptoCurrency)) + .format( ref.watch(pFrostTxData)!.fee! + recipients.map((e) => e.amount).reduce((v, e) => v += e), ), horizontal: true, ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), DetailItem( title: "Note", detail: ref.watch(pFrostTxData)!.note ?? "", ), - const SizedBox( - height: 12, - ), - DetailItem( - title: "Signers", - detail: signers, - ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), + DetailItem(title: "Signers", detail: signers), + const SizedBox(height: 12), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), PrimaryButton( label: "Approve transaction", onPressed: () async { @@ -205,12 +186,8 @@ class _FrostSendStep4State extends ConsumerState { final txData = await showLoading( whileFuture: ref .read(pWallets) - .getWallet( - ref.read(pFrostScaffoldArgs)!.walletId!, - ) - .confirmSend( - txData: ref.read(pFrostTxData)!, - ), + .getWallet(ref.read(pFrostScaffoldArgs)!.walletId!) + .confirmSend(txData: ref.read(pFrostTxData)!), context: context, message: "Broadcasting transaction to network", rootNavigator: true, // used to pop using root nav @@ -227,7 +204,10 @@ class _FrostSendStep4State extends ConsumerState { if (txData != null) { ref.read(pFrostScaffoldCanPopDesktop.notifier).state = true; ref.read(pFrostTxData.state).state = txData; - ref.read(pFrostScaffoldArgs)!.parentNav.popUntil( + ref + .read(pFrostScaffoldArgs)! + .parentNav + .popUntil( ModalRoute.withName( Util.isDesktop ? MyStackView.routeName @@ -237,17 +217,18 @@ class _FrostSendStep4State extends ConsumerState { } } } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (context.mounted) { return await showDialog( context: context, - builder: (_) => StackOkDialog( - title: "Broadcast error", - message: e.toString(), - desktopPopRootNavigator: Util.isDesktop, - onOkPressed: - Navigator.of(context, rootNavigator: true).pop, - ), + builder: + (_) => StackOkDialog( + title: "Broadcast error", + message: e.toString(), + desktopPopRootNavigator: Util.isDesktop, + onOkPressed: + Navigator.of(context, rootNavigator: true).pop, + ), ); } } finally { @@ -262,11 +243,7 @@ class _FrostSendStep4State extends ConsumerState { } class _Recipient extends StatelessWidget { - const _Recipient({ - super.key, - required this.address, - required this.amount, - }); + const _Recipient({super.key, required this.address, required this.amount}); final String address; final String amount; @@ -276,18 +253,9 @@ class _Recipient extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - DetailItem( - title: "Address", - detail: address, - ), - const SizedBox( - height: 6, - ), - DetailItem( - title: "Amount", - detail: amount, - horizontal: true, - ), + DetailItem(title: "Address", detail: address), + const SizedBox(height: 6), + DetailItem(title: "Amount", detail: amount, horizontal: true), ], ); } diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index cfaa41f64..e7fcea333 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -11,7 +11,6 @@ import 'dart:async'; import 'dart:io'; -import 'package:cs_monero/cs_monero.dart' as lib_monero; import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -21,6 +20,7 @@ import 'package:tuple/tuple.dart'; import '../../models/input.dart'; import '../../models/isar/models/isar_models.dart'; +import '../../models/mwc_slatepack_models.dart'; import '../../models/paynym/paynym_account_lite.dart'; import '../../models/send_view_auto_fill_data.dart'; import '../../providers/providers.dart'; @@ -45,6 +45,7 @@ import '../../utilities/eth_commons.dart'; import '../../utilities/extensions/extensions.dart'; import '../../utilities/logger.dart'; import '../../utilities/prefs.dart'; +import '../../utilities/show_loading.dart'; import '../../utilities/text_styles.dart'; import '../../utilities/util.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; @@ -52,6 +53,7 @@ import '../../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../../wallets/models/tx_data.dart'; import '../../wallets/wallet/impl/firo_wallet.dart'; +import '../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/coin_control_interface.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart'; import '../../wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart'; @@ -67,15 +69,18 @@ import '../../widgets/icon_widgets/addressbook_icon.dart'; import '../../widgets/icon_widgets/clipboard_icon.dart'; import '../../widgets/icon_widgets/qrcode_icon.dart'; import '../../widgets/icon_widgets/x_icon.dart'; +import '../../widgets/mwc_txs_method_toggle.dart'; import '../../widgets/rounded_white_container.dart'; import '../../widgets/stack_dialog.dart'; import '../../widgets/stack_text_field.dart'; import '../../widgets/textfield_icon_button.dart'; +import '../../wl_gen/interfaces/cs_monero_interface.dart'; import '../address_book_views/address_book_view.dart'; import '../coin_control/coin_control_view.dart'; import 'confirm_transaction_view.dart'; import 'sub_widgets/building_transaction_dialog.dart'; import 'sub_widgets/dual_balance_selection_sheet.dart'; +import 'sub_widgets/mwc_slatepack_dialog.dart'; import 'sub_widgets/transaction_fee_selection_sheet.dart'; class SendView extends ConsumerStatefulWidget { @@ -242,9 +247,11 @@ class _SendViewState extends ConsumerState { }); } } catch (e) { + // strip http:// and https:// if content contains @ if (coin is Epiccash) { - // strip http:// and https:// if content contains @ content = AddressUtils().formatEpicCashAddress(content); + } else if (coin is Mimblewimblecoin) { + content = AddressUtils().formatAddressMwc(content); } await _checkSparkNameAndOrSetAddress(content); @@ -337,18 +344,19 @@ class _SendViewState extends ConsumerState { ); final Amount? amount; if (baseAmount != null) { - final _price = - ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin)?.value; + final _price = ref + .read(priceAnd24hChangeNotifierProvider) + .getPrice(coin) + ?.value; if (_price == null || _price == Decimal.zero) { amount = 0.toAmountAsRaw(fractionDigits: coin.fractionDigits); } else { - amount = - baseAmount <= Amount.zero - ? 0.toAmountAsRaw(fractionDigits: coin.fractionDigits) - : (baseAmount.decimal / _price) - .toDecimal(scaleOnInfinitePrecision: coin.fractionDigits) - .toAmount(fractionDigits: coin.fractionDigits); + amount = baseAmount <= Amount.zero + ? 0.toAmountAsRaw(fractionDigits: coin.fractionDigits) + : (baseAmount.decimal / _price) + .toDecimal(scaleOnInfinitePrecision: coin.fractionDigits) + .toAmount(fractionDigits: coin.fractionDigits); } if (_cachedAmountToSend != null && _cachedAmountToSend == amount) { return; @@ -389,8 +397,10 @@ class _SendViewState extends ConsumerState { } _cachedAmountToSend = amount; - final price = - ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin)?.value; + final price = ref + .read(priceAnd24hChangeNotifierProvider) + .getPrice(coin) + ?.value; if (price != null && price > Decimal.zero) { baseAmountController.text = (amount.decimal * price) @@ -408,7 +418,9 @@ class _SendViewState extends ConsumerState { _cryptoAmountChangedFeeUpdateTimer?.cancel(); _cryptoAmountChangedFeeUpdateTimer = Timer(updateFeesTimerDuration, () { - if (coin is! Epiccash && !_baseFocus.hasFocus) { + if (coin is! Epiccash && + coin is! Mimblewimblecoin && + !_baseFocus.hasFocus) { setState(() { _calculateFeesFuture = calculateFees( amount ?? 0.toAmountAsRaw(fractionDigits: coin.fractionDigits), @@ -427,7 +439,9 @@ class _SendViewState extends ConsumerState { void _baseAmountChanged() { _baseAmountChangedFeeUpdateTimer?.cancel(); _baseAmountChangedFeeUpdateTimer = Timer(updateFeesTimerDuration, () { - if (coin is! Epiccash && !_cryptoFocus.hasFocus) { + if (coin is! Epiccash && + coin is! Mimblewimblecoin && + !_cryptoFocus.hasFocus) { setState(() { _calculateFeesFuture = calculateFees( ref.read(pSendAmount) == null @@ -451,12 +465,11 @@ class _SendViewState extends ConsumerState { fee = fee.split(" ").first; } - final value = - fee.contains(",") - ? Decimal.parse( - fee.replaceFirst(",", "."), - ).toAmount(fractionDigits: coin.fractionDigits) - : Decimal.parse(fee).toAmount(fractionDigits: coin.fractionDigits); + final value = fee.contains(",") + ? Decimal.parse( + fee.replaceFirst(",", "."), + ).toAmount(fractionDigits: coin.fractionDigits) + : Decimal.parse(fee).toAmount(fractionDigits: coin.fractionDigits); if (shouldSetState) { setState(() => _currentFee = value); @@ -547,25 +560,22 @@ class _SendViewState extends ConsumerState { Amount fee; if (coin is Monero) { - lib_monero.TransactionPriority specialMoneroId; + final int specialMoneroId; switch (ref.read(feeRateTypeMobileStateProvider.state).state) { case FeeRateType.fast: - specialMoneroId = lib_monero.TransactionPriority.high; + specialMoneroId = csMonero.getTxPriorityHigh(); break; case FeeRateType.average: - specialMoneroId = lib_monero.TransactionPriority.medium; + specialMoneroId = csMonero.getTxPriorityMedium(); break; case FeeRateType.slow: - specialMoneroId = lib_monero.TransactionPriority.normal; + specialMoneroId = csMonero.getTxPriorityNormal(); break; default: throw ArgumentError("custom fee not available for monero"); } - fee = await wallet.estimateFeeFor( - amount, - BigInt.from(specialMoneroId.value), - ); + fee = await wallet.estimateFeeFor(amount, BigInt.from(specialMoneroId)); cachedFees[amount] = ref .read(pAmountFormatter(coin)) .format(fee, withUnitName: true, indicatePrecisionLoss: false); @@ -599,6 +609,94 @@ class _SendViewState extends ConsumerState { } } + Future _createSlatepack() async { + // wait for keyboard to disappear + FocusScope.of(context).unfocus(); + await Future.delayed(const Duration(milliseconds: 100)); + + try { + if (mounted) { + final wallet = + ref.read(pWallets).getWallet(walletId) as MimblewimblecoinWallet; + + final amount = ref.read(pSendAmount)!; + + Future wrappedFutureWithDelay() async { + await Future.delayed(const Duration(seconds: 1)); + return wallet.createSlatepack( + amount: amount, + recipientAddress: null, + // No specific recipient for manual slatepack. + message: onChainNoteController.text.isNotEmpty == true + ? onChainNoteController.text + : null, + encrypt: false, // No encryption without recipient address. + ); + } + + // Create slatepack. + Exception? ex; + final slatepackResult = await showLoading( + whileFuture: wrappedFutureWithDelay(), + context: context, + message: "Building slatepack...", + delay: const Duration(seconds: 2), + onException: (e) => ex = e, + ); + + if (slatepackResult == null || + !slatepackResult.success || + slatepackResult.slatepack == null || + ex != null) { + String error = + ex?.toString() ?? + slatepackResult?.error ?? + 'Failed to create slatepack'; + if (error.startsWith("Exception:")) { + error = error.replaceFirst("Exception:", "").trim(); + } + throw Exception(error); + } + + // refresh asap to show the pending slate tx in history + unawaited(() async { + await Future.delayed(Duration.zero); + await wallet.refresh(); + }()); + + // Show slatepack dialog. + if (mounted) { + await showDialog( + context: context, + barrierDismissible: false, + builder: (context) => StackDialogBase( + child: MwcSlatepackDialog(slatepackResult: slatepackResult), + ), + ); + + // Clear form after slatepack dialog is closed. + clearSendForm(); + } + } + } catch (e, s) { + Logging.instance.e( + 'Failed to create MWC slatepack on mobile', + error: e, + stackTrace: s, + ); + + if (mounted) { + await showDialog( + context: context, + builder: (context) => StackOkDialog( + title: "Slatepack Creation Failed", + message: e.toString(), + ), + ); + } + } + } + Future _previewTransaction() async { // wait for keyboard to disappear FocusScope.of(context).unfocus(); @@ -613,18 +711,18 @@ class _SendViewState extends ConsumerState { availableBalance = wallet.info.cachedBalance.spendable; break; case BalanceType.private: - availableBalance = - isFiro - ? wallet.info.cachedBalanceTertiary.spendable - : wallet.info.cachedBalanceSecondary.spendable; + availableBalance = isFiro + ? wallet.info.cachedBalanceTertiary.spendable + : wallet.info.cachedBalanceSecondary.spendable; break; } } else { availableBalance = ref.read(pWalletBalance(walletId)).spendable; } - final coinControlEnabled = - ref.read(prefsChangeNotifierProvider).enableCoinControl; + final coinControlEnabled = ref + .read(prefsChangeNotifierProvider) + .enableCoinControl; if (coin is! Ethereum && !(wallet is CoinControlInterface && coinControlEnabled) || @@ -651,10 +749,9 @@ class _SendViewState extends ConsumerState { child: Text( "Cancel", style: STextStyles.button(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), onPressed: () { @@ -730,10 +827,10 @@ class _SendViewState extends ConsumerState { feeRateType: feeRate, utxos: (wallet is CoinControlInterface && - coinControlEnabled && - selectedUTXOs.isNotEmpty) - ? selectedUTXOs - : null, + coinControlEnabled && + selectedUTXOs.isNotEmpty) + ? selectedUTXOs + : null, ), ); } else if (wallet is FiroWallet) { @@ -752,10 +849,9 @@ class _SendViewState extends ConsumerState { ], feeRateType: ref.read(feeRateTypeMobileStateProvider), satsPerVByte: isCustomFee.value ? customFeeRate : null, - utxos: - (coinControlEnabled && selectedUTXOs.isNotEmpty) - ? selectedUTXOs - : null, + utxos: (coinControlEnabled && selectedUTXOs.isNotEmpty) + ? selectedUTXOs + : null, ), ); } else { @@ -766,16 +862,16 @@ class _SendViewState extends ConsumerState { address: _address!, amount: amount, isChange: false, - addressType: - wallet.cryptoCurrency.getAddressType(_address!)!, + addressType: wallet.cryptoCurrency.getAddressType( + _address!, + )!, ), ], feeRateType: ref.read(feeRateTypeMobileStateProvider), satsPerVByte: isCustomFee.value ? customFeeRate : null, - utxos: - (coinControlEnabled && selectedUTXOs.isNotEmpty) - ? selectedUTXOs - : null, + utxos: (coinControlEnabled && selectedUTXOs.isNotEmpty) + ? selectedUTXOs + : null, ), ); } @@ -784,31 +880,28 @@ class _SendViewState extends ConsumerState { case BalanceType.private: txDataFuture = wallet.prepareSendSpark( txData: TxData( - recipients: - ref.read(pValidSparkSendToAddress) - ? null - : [ - TxRecipient( - address: _address!, - amount: amount, - isChange: false, - addressType: - wallet.cryptoCurrency.getAddressType( - _address!, - )!, - ), - ], - sparkRecipients: - ref.read(pValidSparkSendToAddress) - ? [ - ( - address: _address!, - amount: amount, - memo: memoController.text, - isChange: false, - ), - ] - : null, + recipients: ref.read(pValidSparkSendToAddress) + ? null + : [ + TxRecipient( + address: _address!, + amount: amount, + isChange: false, + addressType: wallet.cryptoCurrency.getAddressType( + _address!, + )!, + ), + ], + sparkRecipients: ref.read(pValidSparkSendToAddress) + ? [ + ( + address: _address!, + amount: amount, + memo: memoController.text, + isChange: false, + ), + ] + : null, ), ); break; @@ -856,10 +949,10 @@ class _SendViewState extends ConsumerState { ethEIP1559Fee: ethFee, utxos: (wallet is CoinControlInterface && - coinControlEnabled && - selectedUTXOs.isNotEmpty) - ? selectedUTXOs - : null, + coinControlEnabled && + selectedUTXOs.isNotEmpty) + ? selectedUTXOs + : null, ), ); } @@ -872,10 +965,9 @@ class _SendViewState extends ConsumerState { if (isPaynymSend) { txData = txData.copyWith( paynymAccountLite: widget.accountLite!, - note: - noteController.text.isNotEmpty - ? noteController.text - : "PayNym send", + note: noteController.text.isNotEmpty + ? noteController.text + : "PayNym send", ); } else { txData = txData.copyWith(note: noteController.text); @@ -889,13 +981,12 @@ class _SendViewState extends ConsumerState { Navigator.of(context).push( RouteGenerator.getRoute( shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, - builder: - (_) => ConfirmTransactionView( - txData: txData, - walletId: walletId, - isPaynymTransaction: isPaynymSend, - onSuccess: clearSendForm, - ), + builder: (_) => ConfirmTransactionView( + txData: txData, + walletId: walletId, + isPaynymTransaction: isPaynymSend, + onSuccess: clearSendForm, + ), settings: const RouteSettings( name: ConfirmTransactionView.routeName, ), @@ -925,10 +1016,9 @@ class _SendViewState extends ConsumerState { child: Text( "Ok", style: STextStyles.button(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), onPressed: () { @@ -986,10 +1076,9 @@ class _SendViewState extends ConsumerState { break; case BalanceType.private: - amount = - isFiro - ? ref.read(pWalletBalanceTertiary(walletId)).spendable - : ref.read(pWalletBalanceSecondary(walletId)).spendable; + amount = isFiro + ? ref.read(pWalletBalanceTertiary(walletId)).spendable + : ref.read(pWalletBalanceSecondary(walletId)).spendable; break; } } else { @@ -1050,32 +1139,32 @@ class _SendViewState extends ConsumerState { shape: const RoundedRectangleBorder( borderRadius: BorderRadius.vertical(top: Radius.circular(20)), ), - builder: - (_) => TransactionFeeSelectionSheet( - walletId: walletId, - amount: (Decimal.tryParse(cryptoAmountController.text) ?? + builder: (_) => TransactionFeeSelectionSheet( + walletId: walletId, + amount: + (Decimal.tryParse(cryptoAmountController.text) ?? ref.watch(pSendAmount)?.decimal ?? Decimal.zero) .toAmount(fractionDigits: coin.fractionDigits), - updateChosen: (String fee) { - if (fee == "custom") { - if (!isCustomFee.value) { - setState(() { - isCustomFee.value = true; - }); - } - return; - } - - _setCurrentFee(fee, true); + updateChosen: (String fee) { + if (fee == "custom") { + if (!isCustomFee.value) { setState(() { - _calculateFeesFuture = Future(() => fee); - if (isCustomFee.value) { - isCustomFee.value = false; - } + isCustomFee.value = true; }); - }, - ), + } + return; + } + + _setCurrentFee(fee, true); + setState(() { + _calculateFeesFuture = Future(() => fee); + if (isCustomFee.value) { + isCustomFee.value = false; + } + }); + }, + ), ); } @@ -1286,6 +1375,9 @@ class _SendViewState extends ConsumerState { ); } + final isMwcSlatepack = + coin is Mimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)); + return Background( child: Scaffold( backgroundColor: Theme.of(context).extension()!.background, @@ -1325,10 +1417,9 @@ class _SendViewState extends ConsumerState { children: [ Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.popupBG, + color: Theme.of( + context, + ).extension()!.popupBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -1381,38 +1472,31 @@ class _SendViewState extends ConsumerState { if (showPrivateBalance) { switch (balType) { case BalanceType.public: - amount = - ref - .read( - pWalletBalance( - walletId, - ), - ) - .spendable; + amount = ref + .read( + pWalletBalance(walletId), + ) + .spendable; break; case BalanceType.private: - amount = - ref - .read( - isMwebEnabled - ? pWalletBalanceSecondary( - walletId, - ) - : pWalletBalanceTertiary( - walletId, - ), - ) - .spendable; - break; - } - } else { - amount = - ref + amount = ref .read( - pWalletBalance(walletId), + isMwebEnabled + ? pWalletBalanceSecondary( + walletId, + ) + : pWalletBalanceTertiary( + walletId, + ), ) .spendable; + break; + } + } else { + amount = ref + .read(pWalletBalance(walletId)) + .spendable; } return GestureDetector( @@ -1461,34 +1545,46 @@ class _SendViewState extends ConsumerState { ), ), const SizedBox(height: 16), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - isPaynymSend - ? "Send to PayNym address" - : "Send to", - style: STextStyles.smallMed12(context), - textAlign: TextAlign.left, - ), - // if (coin is Monero) - // CustomTextButton( - // text: "Use OpenAlias", - // onTap: () async { - // await showModalBottomSheet( - // context: context, - // builder: (context) => - // OpenAliasBottomSheet( - // onSelected: (address) { - // sendToController.text = address; - // }, - // ), - // ); - // }, - // ), - ], - ), - const SizedBox(height: 8), + + // MWC Transaction Method Selector. + if (coin is Mimblewimblecoin) ...[ + const SizedBox( + height: 40, + child: MwcTxsMethodToggle(), + ), + const SizedBox(height: 16), + ], + + if (!isMwcSlatepack) + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text( + isPaynymSend + ? "Send to PayNym address" + : "Send to", + style: STextStyles.smallMed12(context), + textAlign: TextAlign.left, + ), + // if (coin is Monero) + // CustomTextButton( + // text: "Use OpenAlias", + // onTap: () async { + // await showModalBottomSheet( + // context: context, + // builder: (context) => + // OpenAliasBottomSheet( + // onSelected: (address) { + // sendToController.text = address; + // }, + // ), + // ); + // }, + // ), + ], + ), + if (!isMwcSlatepack) const SizedBox(height: 8), if (isPaynymSend) TextField( key: const Key("sendViewPaynymAddressFieldKey"), @@ -1497,7 +1593,7 @@ class _SendViewState extends ConsumerState { readOnly: true, style: STextStyles.fieldLabel(context), ), - if (!isPaynymSend) + if (!isPaynymSend && !isMwcSlatepack) ClipRRect( borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, @@ -1552,93 +1648,103 @@ class _SendViewState extends ConsumerState { }, focusNode: _addressFocusNode, style: STextStyles.field(context), - decoration: standardInputDecoration( - "Enter ${coin.ticker} address", - _addressFocusNode, - context, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 6, - bottom: 8, - right: 5, - ), - suffixIcon: Padding( - padding: - sendToController.text.isEmpty + decoration: + standardInputDecoration( + isMwcSlatepack + ? "Enter ${coin.ticker} address (optional)" + : "Enter ${coin.ticker} address", + _addressFocusNode, + context, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 6, + bottom: 8, + right: 5, + ), + suffixIcon: Padding( + padding: sendToController.text.isEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - _addressToggleFlag - ? TextFieldIconButton( - semanticsLabel: - "Clear Button. Clears The Address Field Input.", - key: const Key( - "sendViewClearAddressFieldButtonKey", + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + _addressToggleFlag + ? TextFieldIconButton( + semanticsLabel: + "Clear Button. Clears The Address Field Input.", + key: const Key( + "sendViewClearAddressFieldButtonKey", + ), + onTap: () { + sendToController + .text = + ""; + _address = ""; + _setValidAddressProviders( + _address, + ); + setState(() { + _addressToggleFlag = + false; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + semanticsLabel: + "Paste Button. Pastes From Clipboard To Address Field Input.", + key: const Key( + "sendViewPasteAddressFieldButtonKey", + ), + onTap: _pasteAddress, + child: + sendToController + .text + .isEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + if (sendToController + .text + .isEmpty) + TextFieldIconButton( + semanticsLabel: + "Address Book Button. Opens Address Book For Address Field.", + key: const Key( + "sendViewAddressBookButtonKey", + ), + onTap: () { + Navigator.of( + context, + ).pushNamed( + AddressBookView + .routeName, + arguments: widget.coin, + ); + }, + child: + const AddressBookIcon(), ), - onTap: () { - sendToController.text = ""; - _address = ""; - _setValidAddressProviders( - _address, - ); - setState(() { - _addressToggleFlag = - false; - }); - }, - child: const XIcon(), - ) - : TextFieldIconButton( - semanticsLabel: - "Paste Button. Pastes From Clipboard To Address Field Input.", - key: const Key( - "sendViewPasteAddressFieldButtonKey", + if (sendToController + .text + .isEmpty) + TextFieldIconButton( + semanticsLabel: + "Scan QR Button. Opens Camera For Scanning QR Code.", + key: const Key( + "sendViewScanQrButtonKey", + ), + onTap: _scanQr, + child: const QrCodeIcon(), ), - onTap: _pasteAddress, - child: - sendToController - .text - .isEmpty - ? const ClipboardIcon() - : const XIcon(), - ), - if (sendToController.text.isEmpty) - TextFieldIconButton( - semanticsLabel: - "Address Book Button. Opens Address Book For Address Field.", - key: const Key( - "sendViewAddressBookButtonKey", - ), - onTap: () { - Navigator.of( - context, - ).pushNamed( - AddressBookView.routeName, - arguments: widget.coin, - ); - }, - child: const AddressBookIcon(), - ), - if (sendToController.text.isEmpty) - TextFieldIconButton( - semanticsLabel: - "Scan QR Button. Opens Camera For Scanning QR Code.", - key: const Key( - "sendViewScanQrButtonKey", - ), - onTap: _scanQr, - child: const QrCodeIcon(), - ), - ], + ], + ), + ), ), ), - ), - ), ), ), const SizedBox(height: 10), @@ -1660,72 +1766,79 @@ class _SendViewState extends ConsumerState { onChanged: (_) { setState(() {}); }, - decoration: standardInputDecoration( - "Enter memo (optional)", - _memoFocus, - context, - ).copyWith( - counterText: '', - contentPadding: const EdgeInsets.only( - left: 16, - top: 6, - bottom: 8, - right: 5, - ), - suffixIcon: Padding( - padding: - memoController.text.isEmpty + decoration: + standardInputDecoration( + "Enter memo (optional)", + _memoFocus, + context, + ).copyWith( + counterText: '', + contentPadding: const EdgeInsets.only( + left: 16, + top: 6, + bottom: 8, + right: 5, + ), + suffixIcon: Padding( + padding: memoController.text.isEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - memoController.text.isNotEmpty - ? TextFieldIconButton( - semanticsLabel: - "Clear Button. Clears The Memo Field Input.", - key: const Key( - "sendViewClearMemoFieldButtonKey", - ), - onTap: () { - memoController.text = ""; - setState(() {}); - }, - child: const XIcon(), - ) - : TextFieldIconButton( - semanticsLabel: - "Paste Button. Pastes From Clipboard To Memo Field Input.", - key: const Key( - "sendViewPasteMemoFieldButtonKey", - ), - onTap: () async { - final ClipboardData? data = - await clipboard.getData( - Clipboard.kTextPlain, - ); - if (data?.text != null && - data! - .text! - .isNotEmpty) { - final String content = - data.text!.trim(); - - memoController.text = - content.trim(); - - setState(() {}); - } - }, - child: const ClipboardIcon(), - ), - ], + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + memoController.text.isNotEmpty + ? TextFieldIconButton( + semanticsLabel: + "Clear Button. Clears The Memo Field Input.", + key: const Key( + "sendViewClearMemoFieldButtonKey", + ), + onTap: () { + memoController.text = + ""; + setState(() {}); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + semanticsLabel: + "Paste Button. Pastes From Clipboard To Memo Field Input.", + key: const Key( + "sendViewPasteMemoFieldButtonKey", + ), + onTap: () async { + final ClipboardData? + data = await clipboard + .getData( + Clipboard + .kTextPlain, + ); + if (data?.text != + null && + data! + .text! + .isNotEmpty) { + final String + content = data.text! + .trim(); + + memoController + .text = content + .trim(); + + setState(() {}); + } + }, + child: + const ClipboardIcon(), + ), + ], + ), + ), ), ), - ), - ), ), ), Builder( @@ -1768,14 +1881,12 @@ class _SendViewState extends ConsumerState { child: Text( error, textAlign: TextAlign.left, - style: STextStyles.label( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.label(context) + .copyWith( + color: Theme.of(context) .extension()! .textError, - ), + ), ), ), ); @@ -1797,8 +1908,9 @@ class _SendViewState extends ConsumerState { children: [ TextField( autocorrect: Util.isDesktop ? false : true, - enableSuggestions: - Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop + ? false + : true, readOnly: true, textInputAction: TextInputAction.none, ), @@ -1807,10 +1919,9 @@ class _SendViewState extends ConsumerState { horizontal: 12, ), child: RawMaterialButton( - splashColor: - Theme.of( - context, - ).extension()!.highlight, + splashColor: Theme.of( + context, + ).extension()!.highlight, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, @@ -1825,8 +1936,8 @@ class _SendViewState extends ConsumerState { top: Radius.circular(20), ), ), - builder: - (_) => DualBalanceSelectionSheet( + builder: (_) => + DualBalanceSelectionSheet( walletId: walletId, ), ); @@ -1855,28 +1966,26 @@ class _SendViewState extends ConsumerState { ) .state) { case BalanceType.public: - amount = - ref - .watch( - pWalletBalance( - walletId, - ), - ) - .spendable; + amount = ref + .watch( + pWalletBalance( + walletId, + ), + ) + .spendable; break; case BalanceType.private: - amount = - ref - .watch( - isFiro - ? pWalletBalanceTertiary( - walletId, - ) - : pWalletBalanceSecondary( - walletId, - ), - ) - .spendable; + amount = ref + .watch( + isFiro + ? pWalletBalanceTertiary( + walletId, + ) + : pWalletBalanceSecondary( + walletId, + ), + ) + .spendable; break; } @@ -1901,10 +2010,9 @@ class _SendViewState extends ConsumerState { Assets.svg.chevronDown, width: 8, height: 4, - color: - Theme.of(context) - .extension()! - .textSubtitle2, + color: Theme.of(context) + .extension()! + .textSubtitle2, ), ], ), @@ -1927,8 +2035,8 @@ class _SendViewState extends ConsumerState { showCoinControl, selectedUTXOs, ), - onTap: - () => _sendAllTapped(showCoinControl), + onTap: () => + _sendAllTapped(showCoinControl), ), ], ), @@ -1937,23 +2045,21 @@ class _SendViewState extends ConsumerState { autocorrect: Util.isDesktop ? false : true, enableSuggestions: Util.isDesktop ? false : true, style: STextStyles.smallMed14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark, + color: Theme.of( + context, + ).extension()!.textDark, ), key: const Key( "amountInputFieldCryptoTextFieldKey", ), controller: cryptoAmountController, focusNode: _cryptoFocus, - keyboardType: - Util.isDesktop - ? null - : const TextInputType.numberWithOptions( - signed: false, - decimal: true, - ), + keyboardType: Util.isDesktop + ? null + : const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), textAlign: TextAlign.right, inputFormatters: [ AmountInputFormatter( @@ -1989,14 +2095,12 @@ class _SendViewState extends ConsumerState { ref .watch(pAmountUnit(coin)) .unitForCoin(coin), - style: STextStyles.smallMed14( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.smallMed14(context) + .copyWith( + color: Theme.of(context) .extension()! .accentColorDark, - ), + ), ), ), ), @@ -2007,26 +2111,25 @@ class _SendViewState extends ConsumerState { if (Prefs.instance.externalCalls) TextField( autocorrect: Util.isDesktop ? false : true, - enableSuggestions: - Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop + ? false + : true, style: STextStyles.smallMed14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark, + color: Theme.of( + context, + ).extension()!.textDark, ), key: const Key( "amountInputFieldFiatTextFieldKey", ), controller: baseAmountController, focusNode: _baseFocus, - keyboardType: - Util.isDesktop - ? null - : const TextInputType.numberWithOptions( - signed: false, - decimal: true, - ), + keyboardType: Util.isDesktop + ? null + : const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), textAlign: TextAlign.right, inputFormatters: [ AmountInputFormatter( @@ -2062,14 +2165,12 @@ class _SendViewState extends ConsumerState { (value) => value.currency, ), ), - style: STextStyles.smallMed14( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.smallMed14(context) + .copyWith( + color: Theme.of(context) .extension()! .accentColorDark, - ), + ), ), ), ), @@ -2084,20 +2185,17 @@ class _SendViewState extends ConsumerState { children: [ Text( "Coin control", - style: STextStyles.w500_14( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.w500_14(context) + .copyWith( + color: Theme.of(context) .extension()! .textSubtitle1, - ), + ), ), CustomTextButton( - text: - selectedUTXOs.isEmpty - ? "Select coins" - : "Selected coins (${selectedUTXOs.length})", + text: selectedUTXOs.isEmpty + ? "Select coins" + : "Selected coins (${selectedUTXOs.length})", onTap: () async { if (FocusScope.of(context).hasFocus) { FocusScope.of(context).unfocus(); @@ -2107,12 +2205,9 @@ class _SendViewState extends ConsumerState { } if (context.mounted) { - final spendable = - ref - .read( - pWalletBalance(walletId), - ) - .spendable; + final spendable = ref + .read(pWalletBalance(walletId)) + .spendable; Amount? amount; if (ref.read(pSendAmount) != null) { @@ -2125,28 +2220,26 @@ class _SendViewState extends ConsumerState { } } - final result = await Navigator.of( - context, - ).pushNamed( - CoinControlView.routeName, - arguments: Tuple4( - walletId, - CoinControlViewType.use, - amount, - selectedUTXOs - .map((e) => e.utxo) - .toSet(), - ), - ); + final result = + await Navigator.of( + context, + ).pushNamed( + CoinControlView.routeName, + arguments: Tuple4( + walletId, + CoinControlViewType.use, + amount, + selectedUTXOs + .map((e) => e.utxo) + .toSet(), + ), + ); if (result is Set) { setState(() { - selectedUTXOs = - result - .map( - (e) => StandardInput(e), - ) - .toSet(); + selectedUTXOs = result + .map((e) => StandardInput(e)) + .toSet(); }); } } @@ -2170,47 +2263,53 @@ class _SendViewState extends ConsumerState { ), child: TextField( autocorrect: Util.isDesktop ? false : true, - enableSuggestions: - Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop + ? false + : true, maxLength: 256, controller: onChainNoteController, focusNode: _onChainNoteFocusNode, style: STextStyles.field(context), onChanged: (_) => setState(() {}), - decoration: standardInputDecoration( - "Type something...", - _onChainNoteFocusNode, - context, - ).copyWith( - suffixIcon: - onChainNoteController.text.isNotEmpty + decoration: + standardInputDecoration( + "Type something...", + _onChainNoteFocusNode, + context, + ).copyWith( + suffixIcon: + onChainNoteController + .text + .isNotEmpty ? Padding( - padding: const EdgeInsets.only( - right: 0, - ), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - onChainNoteController - .text = ""; - }); - }, - ), - ], + padding: const EdgeInsets.only( + right: 0, ), - ), - ) + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + onChainNoteController + .text = + ""; + }); + }, + ), + ], + ), + ), + ) : null, - ), + ), ), ), - if (coin is Epiccash) const SizedBox(height: 12), + if (coin is Epiccash || coin is Mimblewimblecoin) + const SizedBox(height: 12), Text( - (coin is Epiccash) + (coin is Epiccash || coin is Mimblewimblecoin) ? "Local Note (optional)" : "Note (optional)", style: STextStyles.smallMed12(context), @@ -2223,62 +2322,70 @@ class _SendViewState extends ConsumerState { ), child: TextField( autocorrect: Util.isDesktop ? false : true, - enableSuggestions: - Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop + ? false + : true, controller: noteController, focusNode: _noteFocusNode, style: STextStyles.field(context), onChanged: (_) => setState(() {}), - decoration: standardInputDecoration( - "Type something...", - _noteFocusNode, - context, - ).copyWith( - suffixIcon: - noteController.text.isNotEmpty + decoration: + standardInputDecoration( + "Type something...", + _noteFocusNode, + context, + ).copyWith( + suffixIcon: noteController.text.isNotEmpty ? Padding( - padding: const EdgeInsets.only( - right: 0, - ), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - noteController.text = - ""; - }); - }, - ), - ], + padding: const EdgeInsets.only( + right: 0, ), - ), - ) + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + noteController.text = + ""; + }); + }, + ), + ], + ), + ), + ) : null, - ), + ), ), ), const SizedBox(height: 12), - if (hasFees) + if (coin is! Epiccash && + coin is! Mimblewimblecoin && + coin is! NanoCurrency && + coin is! Tezos) Text( - "Transaction fee ${isEth - ? isCustomFee.value - ? "" - : "(max)" - : "(estimated)"}", + "Transaction fee (estimated)", style: STextStyles.smallMed12(context), textAlign: TextAlign.left, ), - if (hasFees) const SizedBox(height: 8), - if (hasFees) + if (coin is! Epiccash && + coin is! Mimblewimblecoin && + coin is! NanoCurrency && + coin is! Tezos) + const SizedBox(height: 8), + if (coin is! Epiccash && + coin is! Mimblewimblecoin && + coin is! NanoCurrency && + coin is! Tezos) Stack( children: [ TextField( autocorrect: Util.isDesktop ? false : true, - enableSuggestions: - Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop + ? false + : true, controller: feeController, readOnly: true, textInputAction: TextInputAction.none, @@ -2287,45 +2394,45 @@ class _SendViewState extends ConsumerState { padding: const EdgeInsets.symmetric( horizontal: 12, ), - child: RawMaterialButton( - splashColor: - Theme.of( - context, - ).extension()!.highlight, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 12, ), - onPressed: - isFiro && - ref - .watch( - publicPrivateBalanceStateProvider - .state, - ) - .state != - BalanceType.public - ? null - : _onFeeSelectPressed, - child: - (isFiro && - ref - .watch( - publicPrivateBalanceStateProvider - .state, - ) - .state != - BalanceType.public) - ? Row( + child: RawMaterialButton( + splashColor: Theme.of( + context, + ).extension()!.highlight, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + onPressed: + isFiro && + ref + .watch( + publicPrivateBalanceStateProvider + .state, + ) + .state != + BalanceType.public + ? null + : _onFeeSelectPressed, + child: + (isFiro && + ref + .watch( + publicPrivateBalanceStateProvider + .state, + ) + .state != + BalanceType.public) + ? Row( children: [ FutureBuilder( future: _calculateFeesFuture, - builder: ( - context, - snapshot, - ) { + builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState .done && @@ -2355,7 +2462,7 @@ class _SendViewState extends ConsumerState { ), ], ) - : Row( + : Row( mainAxisAlignment: MainAxisAlignment .spaceBetween, @@ -2379,10 +2486,7 @@ class _SendViewState extends ConsumerState { FutureBuilder( future: _calculateFeesFuture, - builder: ( - context, - snapshot, - ) { + builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState .done && @@ -2419,15 +2523,15 @@ class _SendViewState extends ConsumerState { Assets.svg.chevronDown, width: 8, height: 4, - color: - Theme.of(context) - .extension< - StackColors - >()! - .textSubtitle2, + color: Theme.of(context) + .extension< + StackColors + >()! + .textSubtitle2, ), ], ), + ), ), ), ], @@ -2457,20 +2561,21 @@ class _SendViewState extends ConsumerState { TextButton( onPressed: ref.watch(pPreviewTxButtonEnabled(coin)) - ? _previewTransaction - : null, - style: - ref.watch(pPreviewTxButtonEnabled(coin)) - ? Theme.of(context) - .extension()! - .getPrimaryEnabledButtonStyle(context) - : Theme.of(context) - .extension()! - .getPrimaryDisabledButtonStyle( - context, - ), + ? ref.watch(pIsSlatepack(widget.walletId)) + ? _createSlatepack + : _previewTransaction + : null, + style: ref.watch(pPreviewTxButtonEnabled(coin)) + ? Theme.of(context) + .extension()! + .getPrimaryEnabledButtonStyle(context) + : Theme.of(context) + .extension()! + .getPrimaryDisabledButtonStyle(context), child: Text( - "Preview", + ref.watch(pIsSlatepack(widget.walletId)) + ? "Create slatepack" + : "Preview", style: STextStyles.button(context), ), ), diff --git a/lib/pages/send_view/sub_widgets/mwc_slatepack_dialog.dart b/lib/pages/send_view/sub_widgets/mwc_slatepack_dialog.dart new file mode 100644 index 000000000..ec57cf0a5 --- /dev/null +++ b/lib/pages/send_view/sub_widgets/mwc_slatepack_dialog.dart @@ -0,0 +1,214 @@ +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 '../../../models/mwc_slatepack_models.dart'; +import '../../../notifications/show_flush_bar.dart'; +import '../../../themes/stack_colors.dart'; +import '../../../utilities/assets.dart'; +import '../../../utilities/clipboard_interface.dart'; +import '../../../utilities/text_styles.dart'; +import '../../../utilities/util.dart'; +import '../../../widgets/conditional_parent.dart'; +import '../../../widgets/desktop/desktop_dialog_close_button.dart'; +import '../../../widgets/desktop/primary_button.dart'; +import '../../../widgets/qr.dart'; +import '../../../widgets/rounded_container.dart'; +import '../../../widgets/rounded_white_container.dart'; + +class MwcSlatepackDialog extends ConsumerStatefulWidget { + const MwcSlatepackDialog({ + super.key, + required this.slatepackResult, + this.clipboard = const ClipboardWrapper(), + }); + + final SlatepackResult slatepackResult; + final ClipboardInterface clipboard; + + @override + ConsumerState createState() => _MwcSlatepackDialogState(); +} + +class _MwcSlatepackDialogState extends ConsumerState { + void _copySlatepack() { + widget.clipboard.setData( + ClipboardData(text: widget.slatepackResult.slatepack!), + ); + showFloatingFlushBar( + type: FlushBarType.info, + message: "Slatepack copied to clipboard", + iconAsset: Assets.svg.copy, + context: context, + ); + } + + void _shareSlatepack() { + // TODO: Implement file sharing for desktop platforms. + showFloatingFlushBar( + type: FlushBarType.info, + message: "Share functionality coming soon", + context: context, + ); + } + + @override + Widget build(BuildContext context) { + return ConditionalParent( + condition: Util.isDesktop, + builder: + (child) => Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Header with title and close button. + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(left: 32), + child: Text( + "Send Slatepack", + style: STextStyles.pageTitleH2(context), + ), + ), + const DesktopDialogCloseButton(), + ], + ), + Padding(padding: const EdgeInsets.all(32), child: child), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + // Instructions. + RoundedContainer( + color: + Theme.of(context).extension()!.textFieldDefaultBG, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Next Steps:", + style: STextStyles.label( + context, + ).copyWith(fontWeight: FontWeight.w600), + ), + const SizedBox(height: 8), + Text( + "1. Share this slatepack with the recipient\n" + "2. Wait for them to return the response slatepack\n" + "3. Import their response to finalize the transaction", + style: STextStyles.w400_14(context), + ), + ], + ), + ), + + // Encryption status. + // we don't encrypt so ignore for now + // if (widget.slatepackResult.wasEncrypted == true) + // Container( + // padding: const EdgeInsets.symmetric( + // horizontal: 12, + // vertical: 8, + // ), + // decoration: BoxDecoration( + // color: Theme.of( + // context, + // ).extension()!.infoItemIcons.withOpacity(0.1), + // borderRadius: BorderRadius.circular(8), + // ), + // child: Row( + // mainAxisSize: MainAxisSize.min, + // children: [ + // Icon( + // Icons.lock, + // size: 16, + // color: + // Theme.of( + // context, + // ).extension()!.infoItemIcons, + // ), + // const SizedBox(width: 8), + // Text( + // "Encrypted for recipient", + // style: STextStyles.label(context).copyWith( + // color: + // Theme.of( + // context, + // ).extension()!.infoItemIcons, + // ), + // ), + // ], + // ), + // ), + const SizedBox(height: 12), + + // QR Code view. + Center( + child: QR( + data: widget.slatepackResult.slatepack!, + size: 220, + // errorCorrectionLevel: QrErrorCorrectLevel.M, + ), + ), + + const SizedBox(height: 12), + + // Slatepack text view. + RoundedWhiteContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + children: [ + Text("Slatepack", style: STextStyles.itemSubtitle(context)), + const Spacer(), + GestureDetector( + onTap: _copySlatepack, + child: Row( + children: [ + SvgPicture.asset( + Assets.svg.copy, + width: 10, + height: 10, + color: + Theme.of( + context, + ).extension()!.infoItemIcons, + ), + const SizedBox(width: 4), + Text("Copy", style: STextStyles.link2(context)), + ], + ), + ), + ], + ), + const SizedBox(height: 8), + Container( + constraints: const BoxConstraints( + maxHeight: 200, + minHeight: 100, + ), + child: SingleChildScrollView( + child: SelectableText( + widget.slatepackResult.slatepack!, + style: STextStyles.w400_14( + context, + ).copyWith(fontFamily: 'monospace'), + ), + ), + ), + ], + ), + ), + + if (!Util.isDesktop) + PrimaryButton(label: "Done", onPressed: Navigator.of(context).pop), + ], + ), + ); + } +} diff --git a/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart b/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart index 3ec7048a3..8c05fa973 100644 --- a/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart +++ b/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart @@ -8,7 +8,6 @@ * */ -import 'package:cs_monero/cs_monero.dart' as lib_monero; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -29,6 +28,7 @@ import '../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../wallets/wallet/impl/firo_wallet.dart'; import '../../../wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart'; import '../../../widgets/animated_text.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; final feeSheetSessionCacheProvider = ChangeNotifierProvider((ref) { @@ -91,7 +91,7 @@ class _TransactionFeeSelectionSheetState if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.high.value), + BigInt.from(csMonero.getTxPriorityHigh()), ); ref.read(feeSheetSessionCacheProvider).fast[amount] = fee; } else if (coin is Firo) { @@ -128,7 +128,7 @@ class _TransactionFeeSelectionSheetState if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.medium.value), + BigInt.from(csMonero.getTxPriorityMedium()), ); ref.read(feeSheetSessionCacheProvider).average[amount] = fee; } else if (coin is Firo) { @@ -164,7 +164,7 @@ class _TransactionFeeSelectionSheetState if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.normal.value), + BigInt.from(csMonero.getTxPriorityNormal()), ); ref.read(feeSheetSessionCacheProvider).slow[amount] = fee; } else if (coin is Firo) { @@ -254,10 +254,9 @@ class _TransactionFeeSelectionSheetState Center( child: Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -268,10 +267,9 @@ class _TransactionFeeSelectionSheetState ), const SizedBox(height: 36), FutureBuilder( - future: - widget.isToken - ? ref.read(pCurrentTokenWallet)!.fees - : wallet.fees, + future: widget.isToken + ? ref.read(pCurrentTokenWallet)!.fees + : wallet.fees, builder: (context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done && snapshot.hasData) { @@ -289,10 +287,9 @@ class _TransactionFeeSelectionSheetState const SizedBox(height: 16), GestureDetector( onTap: () { - final state = - ref - .read(feeRateTypeMobileStateProvider.state) - .state; + final state = ref + .read(feeRateTypeMobileStateProvider.state) + .state; if (state != FeeRateType.fast) { ref.read(feeRateTypeMobileStateProvider.state).state = FeeRateType.fast; @@ -318,25 +315,23 @@ class _TransactionFeeSelectionSheetState width: 20, height: 20, child: Radio( - activeColor: - Theme.of(context) - .extension()! - .radioButtonIconEnabled, + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, value: FeeRateType.fast, - groupValue: - ref - .watch( - feeRateTypeMobileStateProvider - .state, - ) - .state, + groupValue: ref + .watch( + feeRateTypeMobileStateProvider.state, + ) + .state, onChanged: (x) { ref - .read( - feeRateTypeMobileStateProvider - .state, - ) - .state = FeeRateType.fast; + .read( + feeRateTypeMobileStateProvider + .state, + ) + .state = + FeeRateType.fast; Navigator.of(context).pop(); }, @@ -373,30 +368,33 @@ class _TransactionFeeSelectionSheetState feeRate: feeObject!.fast, amount: amount, ), - builder: ( - _, - AsyncSnapshot snapshot, - ) { - if (snapshot.connectionState == - ConnectionState.done && - snapshot.hasData) { - return Text( - "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", - style: STextStyles.itemSubtitle( - context, - ), - textAlign: TextAlign.left, - ); - } else { - return AnimatedText( - stringsToLoopThrough: - stringsToLoopThrough, - style: STextStyles.itemSubtitle( - context, - ), - ); - } - }, + builder: + ( + _, + AsyncSnapshot snapshot, + ) { + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + return Text( + "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", + style: + STextStyles.itemSubtitle( + context, + ), + textAlign: TextAlign.left, + ); + } else { + return AnimatedText( + stringsToLoopThrough: + stringsToLoopThrough, + style: + STextStyles.itemSubtitle( + context, + ), + ); + } + }, ), ], ), @@ -426,10 +424,9 @@ class _TransactionFeeSelectionSheetState const SizedBox(height: 16), GestureDetector( onTap: () { - final state = - ref - .read(feeRateTypeMobileStateProvider.state) - .state; + final state = ref + .read(feeRateTypeMobileStateProvider.state) + .state; if (state != FeeRateType.average) { ref.read(feeRateTypeMobileStateProvider.state).state = FeeRateType.average; @@ -454,25 +451,23 @@ class _TransactionFeeSelectionSheetState width: 20, height: 20, child: Radio( - activeColor: - Theme.of(context) - .extension()! - .radioButtonIconEnabled, + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, value: FeeRateType.average, - groupValue: - ref - .watch( - feeRateTypeMobileStateProvider - .state, - ) - .state, + groupValue: ref + .watch( + feeRateTypeMobileStateProvider.state, + ) + .state, onChanged: (x) { ref - .read( - feeRateTypeMobileStateProvider - .state, - ) - .state = FeeRateType.average; + .read( + feeRateTypeMobileStateProvider + .state, + ) + .state = + FeeRateType.average; Navigator.of(context).pop(); }, ), @@ -508,30 +503,33 @@ class _TransactionFeeSelectionSheetState feeRate: feeObject!.medium, amount: amount, ), - builder: ( - _, - AsyncSnapshot snapshot, - ) { - if (snapshot.connectionState == - ConnectionState.done && - snapshot.hasData) { - return Text( - "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", - style: STextStyles.itemSubtitle( - context, - ), - textAlign: TextAlign.left, - ); - } else { - return AnimatedText( - stringsToLoopThrough: - stringsToLoopThrough, - style: STextStyles.itemSubtitle( - context, - ), - ); - } - }, + builder: + ( + _, + AsyncSnapshot snapshot, + ) { + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + return Text( + "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", + style: + STextStyles.itemSubtitle( + context, + ), + textAlign: TextAlign.left, + ); + } else { + return AnimatedText( + stringsToLoopThrough: + stringsToLoopThrough, + style: + STextStyles.itemSubtitle( + context, + ), + ); + } + }, ), ], ), @@ -561,10 +559,9 @@ class _TransactionFeeSelectionSheetState const SizedBox(height: 16), GestureDetector( onTap: () { - final state = - ref - .read(feeRateTypeMobileStateProvider.state) - .state; + final state = ref + .read(feeRateTypeMobileStateProvider.state) + .state; if (state != FeeRateType.slow) { ref.read(feeRateTypeMobileStateProvider.state).state = FeeRateType.slow; @@ -586,25 +583,23 @@ class _TransactionFeeSelectionSheetState width: 20, height: 20, child: Radio( - activeColor: - Theme.of(context) - .extension()! - .radioButtonIconEnabled, + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, value: FeeRateType.slow, - groupValue: - ref - .watch( - feeRateTypeMobileStateProvider - .state, - ) - .state, + groupValue: ref + .watch( + feeRateTypeMobileStateProvider.state, + ) + .state, onChanged: (x) { ref - .read( - feeRateTypeMobileStateProvider - .state, - ) - .state = FeeRateType.slow; + .read( + feeRateTypeMobileStateProvider + .state, + ) + .state = + FeeRateType.slow; Navigator.of(context).pop(); }, ), @@ -640,30 +635,33 @@ class _TransactionFeeSelectionSheetState feeRate: feeObject!.slow, amount: amount, ), - builder: ( - _, - AsyncSnapshot snapshot, - ) { - if (snapshot.connectionState == - ConnectionState.done && - snapshot.hasData) { - return Text( - "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", - style: STextStyles.itemSubtitle( - context, - ), - textAlign: TextAlign.left, - ); - } else { - return AnimatedText( - stringsToLoopThrough: - stringsToLoopThrough, - style: STextStyles.itemSubtitle( - context, - ), - ); - } - }, + builder: + ( + _, + AsyncSnapshot snapshot, + ) { + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + return Text( + "(~${ref.watch(pAmountFormatter(coin)).format(snapshot.data!, indicatePrecisionLoss: false)})", + style: + STextStyles.itemSubtitle( + context, + ), + textAlign: TextAlign.left, + ); + } else { + return AnimatedText( + stringsToLoopThrough: + stringsToLoopThrough, + style: + STextStyles.itemSubtitle( + context, + ), + ); + } + }, ), ], ), @@ -694,14 +692,14 @@ class _TransactionFeeSelectionSheetState if (wallet is ElectrumXInterface || coin is Ethereum) GestureDetector( onTap: () { - final state = - ref - .read(feeRateTypeMobileStateProvider.state) - .state; + final state = ref + .read(feeRateTypeMobileStateProvider.state) + .state; if (state != FeeRateType.custom) { ref - .read(feeRateTypeMobileStateProvider.state) - .state = FeeRateType.custom; + .read(feeRateTypeMobileStateProvider.state) + .state = + FeeRateType.custom; } widget.updateChosen("custom"); @@ -718,25 +716,24 @@ class _TransactionFeeSelectionSheetState width: 20, height: 20, child: Radio( - activeColor: - Theme.of(context) - .extension()! - .radioButtonIconEnabled, + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, value: FeeRateType.custom, - groupValue: - ref - .watch( - feeRateTypeMobileStateProvider - .state, - ) - .state, + groupValue: ref + .watch( + feeRateTypeMobileStateProvider + .state, + ) + .state, onChanged: (x) { ref - .read( - feeRateTypeMobileStateProvider - .state, - ) - .state = FeeRateType.custom; + .read( + feeRateTypeMobileStateProvider + .state, + ) + .state = + FeeRateType.custom; Navigator.of(context).pop(); }, ), diff --git a/lib/pages/settings_views/global_settings_view/about_view.dart b/lib/pages/settings_views/global_settings_view/about_view.dart index 06c3774a4..88ed1a06f 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -218,6 +218,95 @@ class AboutView extends ConsumerWidget { }, ), const SizedBox(height: 12), + if (AppConfig.coins + .whereType() + .isNotEmpty) + const SizedBox(height: 12), + if (AppConfig.coins + .whereType() + .isNotEmpty) + FutureBuilder( + future: + GitStatus.getMimblewimblecoinCommitStatus(), + builder: ( + context, + AsyncSnapshot snapshot, + ) { + CommitStatus stateOfCommit = + CommitStatus.notLoaded; + + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + stateOfCommit = snapshot.data!; + } + + return RoundedWhiteContainer( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.stretch, + children: [ + Text( + "Mimblewimblecoin Build Commit", + style: STextStyles.titleBold12(context), + ), + const SizedBox(height: 4), + SelectableText( + GitStatus.mimblewimblecoinCommit, + style: GitStatus.styleForStatus( + stateOfCommit, + context, + ), + ), + ], + ), + ); + }, + ), + if (AppConfig.coins.whereType().isNotEmpty) + const SizedBox(height: 12), + // if (AppConfig.coins.whereType().isNotEmpty) + // FutureBuilder( + // future: GitStatus.getMoneroCommitStatus(), + // builder: ( + // context, + // AsyncSnapshot snapshot, + // ) { + // CommitStatus stateOfCommit = + // CommitStatus.notLoaded; + // + // if (snapshot.connectionState == + // ConnectionState.done && + // snapshot.hasData) { + // stateOfCommit = snapshot.data!; + // } + // return RoundedWhiteContainer( + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.stretch, + // children: [ + // Text( + // "Monero Build Commit", + // style: STextStyles.titleBold12(context), + // ), + // const SizedBox( + // height: 4, + // ), + // SelectableText( + // GitStatus.moneroCommit, + // style: GitStatus.styleForStatus( + // stateOfCommit, + // context, + // ), + // ), + // ], + // ), + // ); + // }, + // ), + // const SizedBox( + // height: 12, + // ), RoundedWhiteContainer( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -239,6 +328,30 @@ class AboutView extends ConsumerWidget { ], ), ), + if (AppConfig.coins.whereType().isNotEmpty) + const SizedBox(height: 12), + if (AppConfig.coins.whereType().isNotEmpty) + RoundedWhiteContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Website", + style: STextStyles.titleBold12(context), + ), + const SizedBox(height: 4), + CustomTextButton( + text: "https://stackwallet.com", + onTap: () { + launchUrl( + Uri.parse("https://stackwallet.com"), + mode: LaunchMode.externalApplication, + ); + }, + ), + ], + ), + ), if (AppConfig.coins.whereType().isNotEmpty) const SizedBox(height: 12), if (AppConfig.coins.whereType().isNotEmpty) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart b/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart index 06cbfe852..b350fa527 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart @@ -14,7 +14,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../../models/isar/stack_theme.dart'; import '../../../../../notifications/show_flush_bar.dart'; @@ -34,10 +34,7 @@ import '../../../../../widgets/rounded_white_container.dart'; import '../../../../../widgets/stack_dialog.dart'; class StackThemeCard extends ConsumerStatefulWidget { - const StackThemeCard({ - super.key, - required this.data, - }); + const StackThemeCard({super.key, required this.data}); final StackThemeMetaData data; @@ -57,29 +54,33 @@ class _StackThemeCardState extends ConsumerState { final service = ref.read(pThemeService); try { - final data = await service.fetchTheme( - themeMetaData: widget.data, - ); + final data = await service.fetchTheme(themeMetaData: widget.data); await service.install(themeArchiveData: data); return true; } catch (e, s) { - Logging.instance.w("Failed _downloadAndInstall of ${widget.data.id}: ", error: e, stackTrace: s); + Logging.instance.w( + "Failed _downloadAndInstall of ${widget.data.id}: ", + error: e, + stackTrace: s, + ); return false; } } Future _downloadPressed() async { - final result = (await showLoading( - whileFuture: _downloadAndInstall(), - context: context, - message: "Downloading and installing theme...", - ))!; + final result = + (await showLoading( + whileFuture: _downloadAndInstall(), + context: context, + message: "Downloading and installing theme...", + ))!; if (mounted) { - final message = result - ? "${widget.data.name} theme installed!" - : "Failed to install ${widget.data.name} theme"; + final message = + result + ? "${widget.data.name} theme installed!" + : "Failed to install ${widget.data.name} theme"; if (isDesktop) { await showFloatingFlushBar( type: result ? FlushBarType.success : FlushBarType.warning, @@ -89,15 +90,16 @@ class _StackThemeCardState extends ConsumerState { } else { await showDialog( context: context, - builder: (_) => StackOkDialog( - title: message, - onOkPressed: (_) { - setState(() { - _needsUpdate = !result; - _hasTheme = result; - }); - }, - ), + builder: + (_) => StackOkDialog( + title: message, + onOkPressed: (_) { + setState(() { + _needsUpdate = !result; + _hasTheme = result; + }); + }, + ), ); } } @@ -128,8 +130,9 @@ class _StackThemeCardState extends ConsumerState { final themeDir = Directory("${themesDir.path}/${widget.data.id}"); int bytes = 0; if (await themeDir.exists()) { - await for (final FileSystemEntity entity - in themeDir.list(recursive: true)) { + await for (final FileSystemEntity entity in themeDir.list( + recursive: true, + )) { if (entity is File) { bytes += await entity.length(); } @@ -152,13 +155,14 @@ class _StackThemeCardState extends ConsumerState { } } - StackTheme? getInstalled() => ref - .read(mainDBProvider) - .isar - .stackThemes - .where() - .themeIdEqualTo(widget.data.id) - .findFirstSync(); + StackTheme? getInstalled() => + ref + .read(mainDBProvider) + .isar + .stackThemes + .where() + .themeIdEqualTo(widget.data.id) + .findFirstSync(); @override void initState() { @@ -174,20 +178,20 @@ class _StackThemeCardState extends ConsumerState { .stackThemes .watchLazy() .listen((event) async { - final installedTheme = getInstalled(); - final hasTheme = installedTheme != null; - if (_hasTheme != hasTheme && mounted) { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - setState(() { - _hasTheme = hasTheme; - if (hasTheme) { - _needsUpdate = - widget.data.version > (installedTheme.version ?? 0); - } - }); + final installedTheme = getInstalled(); + final hasTheme = installedTheme != null; + if (_hasTheme != hasTheme && mounted) { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + setState(() { + _hasTheme = hasTheme; + if (hasTheme) { + _needsUpdate = + widget.data.version > (installedTheme.version ?? 0); + } + }); + }); + } }); - } - }); _subscription.resume(); super.initState(); @@ -203,67 +207,46 @@ class _StackThemeCardState extends ConsumerState { Widget build(BuildContext context) { return RoundedWhiteContainer( radiusMultiplier: isDesktop ? 2.5 : 1, - borderColor: isDesktop - ? Theme.of(context).extension()!.textSubtitle6 - : null, + borderColor: + isDesktop + ? Theme.of(context).extension()!.textSubtitle6 + : null, child: Column( mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.symmetric( - horizontal: 18, - ), - child: widget.data.previewImageUrl.isNotEmpty - ? AspectRatio( - aspectRatio: 1, - child: ClipRRect( - borderRadius: BorderRadius.circular(100), - child: Image.network( - widget.data.previewImageUrl, + padding: const EdgeInsets.symmetric(horizontal: 18), + child: + widget.data.previewImageUrl.isNotEmpty + ? AspectRatio( + aspectRatio: 1, + child: ClipRRect( + borderRadius: BorderRadius.circular(100), + child: Image.network(widget.data.previewImageUrl), ), - ), - ) - : Builder( - builder: (context) { - final themePreview = ref - .watch(pThemeService) - .getTheme(themeId: widget.data.id) - ?.assets - .themePreview ?? - ""; + ) + : Builder( + builder: (context) { + final themePreview = + ref + .watch(pThemeService) + .getTheme(themeId: widget.data.id) + ?.assets + .themePreview ?? + ""; - return (themePreview.endsWith(".png")) - ? Image.file( - File( - themePreview, - ), - height: 100, - ) - : SvgPicture.file( - File( - themePreview, - ), - height: 100, - ); - }, - ), - ), - const SizedBox( - height: 12, - ), - Text( - widget.data.name, - style: STextStyles.itemSubtitle12(context), - ), - const SizedBox( - height: 6, + return (themePreview.endsWith(".png")) + ? Image.file(File(themePreview), height: 100) + : SvgPicture.file(File(themePreview), height: 100); + }, + ), ), + const SizedBox(height: 12), + Text(widget.data.name, style: STextStyles.itemSubtitle12(context)), + const SizedBox(height: 6), FutureBuilder( future: getThemeDirectorySize(), - builder: ( - context, - AsyncSnapshot snapshot, - ) { + builder: (context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done && snapshot.hasData) { _cachedSize = snapshot.data; @@ -279,31 +262,24 @@ class _StackThemeCardState extends ConsumerState { style: STextStyles.label(context), ); } else { - return Text( - _cachedSize!, - style: STextStyles.label(context), - ); + return Text(_cachedSize!, style: STextStyles.label(context)); } }, ), - if (_hasTheme && _needsUpdate) - const SizedBox( - height: 12, - ), + if (_hasTheme && _needsUpdate) const SizedBox(height: 12), if (_hasTheme && _needsUpdate) PrimaryButton( label: "Update", buttonHeight: isDesktop ? ButtonHeight.s : ButtonHeight.l, onPressed: _downloadPressed, ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), AnimatedCrossFade( duration: const Duration(milliseconds: 300), - crossFadeState: _hasTheme - ? CrossFadeState.showSecond - : CrossFadeState.showFirst, + crossFadeState: + _hasTheme + ? CrossFadeState.showSecond + : CrossFadeState.showFirst, firstChild: PrimaryButton( label: "Download", buttonHeight: isDesktop ? ButtonHeight.s : ButtonHeight.l, diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart index ca5b825ad..e0ebd4c53 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart @@ -89,6 +89,10 @@ class _AddEditNodeViewState extends ConsumerState { ref.read(nodeFormDataProvider).host = data.host; ref.read(nodeFormDataProvider).port = data.port; ref.read(nodeFormDataProvider).useSSL = data.useSSL; + } else if (coin is Mimblewimblecoin) { + ref.read(nodeFormDataProvider).host = data.host; + ref.read(nodeFormDataProvider).port = data.port; + ref.read(nodeFormDataProvider).useSSL = data.useSSL; } else if (coin is CryptonoteCurrency) { ref.read(nodeFormDataProvider).host = data.host; } @@ -928,6 +932,8 @@ class _NodeFormState extends ConsumerState { if (widget.coin is Epiccash) { enableSSLCheckbox = !node.host.startsWith("http"); + } else if (widget.coin is Mimblewimblecoin) { + enableSSLCheckbox = !node.host.startsWith("http"); } else { enableSSLCheckbox = true; } @@ -1101,6 +1107,17 @@ class _NodeFormState extends ConsumerState { _useSSL = true; } } + if (widget.coin is Mimblewimblecoin) { + if (newValue.startsWith("https://")) { + _useSSL = true; + enableSSLCheckbox = false; + } else if (newValue.startsWith("http://")) { + _useSSL = false; + enableSSLCheckbox = false; + } else { + enableSSLCheckbox = true; + } + } _updateState(); setState(() {}); }, @@ -1353,9 +1370,15 @@ class _NodeFormState extends ConsumerState { ), ], ), - if (widget.coin is! CryptonoteCurrency && widget.coin is! Epiccash) - const SizedBox(height: 8), - if (widget.coin is! CryptonoteCurrency && widget.coin is! Epiccash) + if (widget.coin is! CryptonoteCurrency && + widget.coin is! Epiccash && + widget.coin is! Mimblewimblecoin) + const SizedBox( + height: 8, + ), + if (widget.coin is! CryptonoteCurrency && + widget.coin is! Epiccash && + widget.coin is! Mimblewimblecoin) Row( children: [ GestureDetector( diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 1d8d9c90f..355fc6643 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -13,8 +13,7 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; -import 'package:frostdart/frostdart.dart' as frost; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:stack_wallet_backup/stack_wallet_backup.dart'; import 'package:tuple/tuple.dart'; import 'package:uuid/uuid.dart'; @@ -33,7 +32,6 @@ import '../../../../../models/stack_restoring_ui_state.dart'; import '../../../../../models/trade_wallet_lookup.dart'; import '../../../../../models/wallet_restore_state.dart'; import '../../../../../services/address_book_service.dart'; -import '../../../../../services/frost.dart'; import '../../../../../services/node_service.dart'; import '../../../../../services/trade_notes_service.dart'; import '../../../../../services/trade_sent_from_stack_service.dart'; @@ -52,6 +50,7 @@ import '../../../../../wallets/isar/models/frost_wallet_info.dart'; import '../../../../../wallets/isar/models/wallet_info.dart'; import '../../../../../wallets/wallet/impl/bitcoin_frost_wallet.dart'; import '../../../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../../../wallets/wallet/impl/monero_wallet.dart'; import '../../../../../wallets/wallet/impl/wownero_wallet.dart'; import '../../../../../wallets/wallet/impl/xelis_wallet.dart'; @@ -61,6 +60,7 @@ import '../../../../../wallets/wallet/wallet.dart'; import '../../../../../wallets/wallet/wallet_mixin_interfaces/mnemonic_interface.dart'; import '../../../../../wallets/wallet/wallet_mixin_interfaces/private_key_interface.dart'; import '../../../../../wallets/wallet/wallet_mixin_interfaces/view_only_option_interface.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; class PreRestoreState { final Set walletIds; @@ -242,12 +242,11 @@ abstract class SWB { Logging.instance.i("...createStackWalletJSON DB.instance.mutex acquired"); Logging.instance.i("SWB backing up nodes"); try { - final nodesFuture = - nodeService.nodes.map((e) async { - final map = e.toMap(); - map["password"] = await e.getPassword(_secureStore); - return map; - }).toList(); + final nodesFuture = nodeService.nodes.map((e) async { + final map = e.toMap(); + map["password"] = await e.getPassword(_secureStore); + return map; + }).toList(); final nodes = await Future.wait(nodesFuture); backupJson['nodes'] = nodes; } catch (e, s) { @@ -279,8 +278,9 @@ abstract class SWB { final AddressBookService addressBookService = AddressBookService(); final addresses = addressBookService.contacts; - backupJson['addressBookEntries'] = - addresses.map((e) => e.toMap()).toList(); + backupJson['addressBookEntries'] = addresses + .map((e) => e.toMap()) + .toList(); Logging.instance.d("SWB backing up wallets"); @@ -297,8 +297,8 @@ abstract class SWB { (await wallet.getViewOnlyWalletData()).toJsonEncodedString(); } else if (wallet is MnemonicInterface) { backupWallet['mnemonic'] = await wallet.getMnemonic(); - backupWallet['mnemonicPassphrase'] = - await wallet.getMnemonicPassphrase(); + backupWallet['mnemonicPassphrase'] = await wallet + .getMnemonicPassphrase(); } else if (wallet is PrivateKeyInterface) { backupWallet['privateKey'] = await wallet.getPrivateKey(); } else if (wallet is BitcoinFrostWallet) { @@ -331,11 +331,10 @@ abstract class SWB { backupWallet['restoreHeight'] = wallet.info.restoreHeight; - final isarNotes = - await MainDB.instance.isar.transactionNotes - .where() - .walletIdEqualTo(wallet.walletId) - .findAll(); + final isarNotes = await MainDB.instance.isar.transactionNotes + .where() + .walletIdEqualTo(wallet.walletId) + .findAll(); final notes = isarNotes.asMap().map( (key, value) => MapEntry(value.txid, value.value), @@ -358,8 +357,9 @@ abstract class SWB { // back up trade history lookup data for trades send from stack wallet final tradeTxidLookupDataService = TradeSentFromStackService(); - final lookupData = - tradeTxidLookupDataService.all.map((e) => e.toMap()).toList(); + final lookupData = tradeTxidLookupDataService.all + .map((e) => e.toMap()) + .toList(); backupJson["tradeTxidLookupData"] = lookupData; Logging.instance.d("SWB backing up trade notes"); @@ -438,10 +438,10 @@ abstract class SWB { serializedKeys = frostData["keys"] as String; multisigConfig = frostData["config"] as String; - final myNameIndex = frost.getParticipantIndexFromKeys( + final myNameIndex = frostInterface.participantIndexFromKeys( serializedKeys: serializedKeys, ); - final participants = Frost.getParticipants( + final participants = frostInterface.getParticipants( multisigConfig: multisigConfig, ); final myName = participants[myNameIndex]; @@ -451,7 +451,9 @@ abstract class SWB { knownSalts: [], participants: participants, myName: myName, - threshold: frost.multisigThreshold(multisigConfig: multisigConfig), + threshold: frostInterface.getMultisigThreshold( + multisigConfig: multisigConfig, + ), ); await MainDB.instance.isar.writeTxn(() async { @@ -476,6 +478,10 @@ abstract class SWB { await (wallet as EpiccashWallet).init(isRestore: true); break; + case const (MimblewimblecoinWallet): + await (wallet as MimblewimblecoinWallet).init(isRestore: true); + break; + case const (MoneroWallet): await (wallet as MoneroWallet).init(isRestore: true); break; @@ -496,7 +502,8 @@ abstract class SWB { if (restoreHeight <= 0) { if (wallet is EpiccashWallet || wallet is LibMoneroWallet || - wallet is LibSalviumWallet) { + wallet is LibSalviumWallet || + wallet is MimblewimblecoinWallet) { restoreHeight = 0; } else { restoreHeight = walletbackup['storedChainHeight'] as int? ?? 0; @@ -687,11 +694,10 @@ abstract class SWB { ); Logging.instance.d("SWB temp backup created"); - final List _currentWalletIds = - await MainDB.instance.isar.walletInfo - .where() - .walletIdProperty() - .findAll(); + final List _currentWalletIds = await MainDB.instance.isar.walletInfo + .where() + .walletIdProperty() + .findAll(); final preRestoreState = PreRestoreState( _currentWalletIds.toSet(), @@ -920,12 +926,11 @@ abstract class SWB { // ensure this contact's data matches the pre restore state final List addresses = []; for (final address in (contact['addresses'] as List)) { - final entry = - ContactAddressEntry() - ..coinName = address['coin'] as String - ..address = address['address'] as String - ..label = address['label'] as String - ..other = address['other'] as String?; + final entry = ContactAddressEntry() + ..coinName = address['coin'] as String + ..address = address['address'] as String + ..label = address['label'] as String + ..other = address['other'] as String?; try { entry.coin; @@ -1101,12 +1106,11 @@ abstract class SWB { _prefs.language = prefs['language'] as String; _prefs.showFavoriteWallets = prefs['showFavoriteWallets'] as bool; _prefs.wifiOnly = prefs['wifiOnly'] as bool; - _prefs.syncType = - prefs['syncType'] == "currentWalletOnly" - ? SyncingType.currentWalletOnly - : prefs['syncType'] == "selectedWalletsAtStartup" - ? SyncingType.currentWalletOnly - : SyncingType.allWalletsOnStartup; // + _prefs.syncType = prefs['syncType'] == "currentWalletOnly" + ? SyncingType.currentWalletOnly + : prefs['syncType'] == "selectedWalletsAtStartup" + ? SyncingType.currentWalletOnly + : SyncingType.allWalletsOnStartup; // _prefs.walletIdsSyncOnStartup = (prefs['walletIdsSyncOnStartup'] as List) .map((e) => e as String) @@ -1130,12 +1134,11 @@ abstract class SWB { for (final contact in addressBookEntries) { final List addresses = []; for (final address in (contact['addresses'] as List)) { - final entry = - ContactAddressEntry() - ..coinName = address['coin'] as String - ..address = address['address'] as String - ..label = address['label'] as String - ..other = address['other'] as String?; + final entry = ContactAddressEntry() + ..coinName = address['coin'] as String + ..address = address['address'] as String + ..label = address['label'] as String + ..other = address['other'] as String?; try { entry.coin; @@ -1169,11 +1172,10 @@ abstract class SWB { secureStorageInterface: secureStorageInterface, ); if (nodes != null) { - final primaryIds = - primaryNodes - ?.map((e) => e["id"] as String?) - .whereType() - .toSet(); + final primaryIds = primaryNodes + ?.map((e) => e["id"] as String?) + .whereType() + .toSet(); for (final node in nodes) { final id = node['id'] as String; @@ -1244,8 +1246,9 @@ abstract class SWB { final json = Map.from(tradeTxidLookupData[i] as Map); TradeWalletLookup lookup = TradeWalletLookup.fromJson(json); // update walletIds - final List walletIds = - lookup.walletIds.map((e) => oldToNewWalletIdMap[e]!).toList(); + final List walletIds = lookup.walletIds + .map((e) => oldToNewWalletIdMap[e]!) + .toList(); lookup = lookup.copyWith(walletIds: walletIds); final oldLookup = DB.instance.get( diff --git a/lib/pages/settings_views/global_settings_view/tor_settings/tor_settings_view.dart b/lib/pages/settings_views/global_settings_view/tor_settings/tor_settings_view.dart index 24800936d..ea8461b0f 100644 --- a/lib/pages/settings_views/global_settings_view/tor_settings/tor_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/tor_settings/tor_settings_view.dart @@ -50,8 +50,9 @@ class _TorSettingsViewState extends ConsumerState { backgroundColor: Colors.transparent, appBar: AppBar( automaticallyImplyLeading: false, - backgroundColor: - Theme.of(context).extension()!.backgroundAppBar, + backgroundColor: Theme.of( + context, + ).extension()!.backgroundAppBar, leading: AppBarBackButton( onPressed: () { Navigator.of(context).pop(); @@ -98,12 +99,12 @@ class _TorSettingsViewState extends ConsumerState { children: [ Padding( padding: EdgeInsets.all(10.0), - child: TorAnimatedButton(), + child: _TorAnimatedButton(), ), ], ), const SizedBox(height: 30), - const TorButton(), + const _TorButton(), const SizedBox(height: 8), RoundedWhiteContainer( child: Consumer( @@ -144,8 +145,9 @@ class _TorSettingsViewState extends ConsumerState { " connection is disrupted or compromised.", rightButton: SecondaryButton( label: "Close", - onPressed: - Navigator.of(context).pop, + onPressed: Navigator.of( + context, + ).pop, ), ); }, @@ -155,10 +157,9 @@ class _TorSettingsViewState extends ConsumerState { Assets.svg.circleInfo, height: 16, width: 16, - color: - Theme.of(context) - .extension()! - .infoItemLabel, + color: Theme.of( + context, + ).extension()!.infoItemLabel, ), ), ], @@ -174,8 +175,9 @@ class _TorSettingsViewState extends ConsumerState { ), onValueChanged: (newValue) { ref - .read(prefsChangeNotifierProvider) - .torKillSwitch = newValue; + .read(prefsChangeNotifierProvider) + .torKillSwitch = + newValue; }, ), ), @@ -195,14 +197,14 @@ class _TorSettingsViewState extends ConsumerState { } } -class TorAnimatedButton extends ConsumerStatefulWidget { - const TorAnimatedButton({super.key}); +class _TorAnimatedButton extends ConsumerStatefulWidget { + const _TorAnimatedButton({super.key}); @override - ConsumerState createState() => _TorAnimatedButtonState(); + ConsumerState<_TorAnimatedButton> createState() => _TorAnimatedButtonState(); } -class _TorAnimatedButtonState extends ConsumerState +class _TorAnimatedButtonState extends ConsumerState<_TorAnimatedButton> with SingleTickerProviderStateMixin { late final AnimationController controller1; @@ -224,7 +226,6 @@ class _TorAnimatedButtonState extends ConsumerState case TorConnectionStatus.connected: await disconnectTor(ref, context); - break; case TorConnectionStatus.connecting: @@ -365,7 +366,7 @@ class _TorAnimatedButtonState extends ConsumerState }, ), ), - const UpperCaseTorText(), + const _UpperCaseTorText(), ], ), ), @@ -373,14 +374,14 @@ class _TorAnimatedButtonState extends ConsumerState } } -class TorButton extends ConsumerStatefulWidget { - const TorButton({super.key}); +class _TorButton extends ConsumerStatefulWidget { + const _TorButton({super.key}); @override - ConsumerState createState() => _TorButtonState(); + ConsumerState<_TorButton> createState() => _TorButtonState(); } -class _TorButtonState extends ConsumerState { +class _TorButtonState extends ConsumerState<_TorButton> { late TorConnectionStatus _status; Color _color(TorConnectionStatus status, StackColors colors) { @@ -483,14 +484,14 @@ class _TorButtonState extends ConsumerState { } } -class UpperCaseTorText extends ConsumerStatefulWidget { - const UpperCaseTorText({super.key}); +class _UpperCaseTorText extends ConsumerStatefulWidget { + const _UpperCaseTorText({super.key}); @override - ConsumerState createState() => _UpperCaseTorTextState(); + ConsumerState<_UpperCaseTorText> createState() => _UpperCaseTorTextState(); } -class _UpperCaseTorTextState extends ConsumerState { +class _UpperCaseTorTextState extends ConsumerState<_UpperCaseTorText> { late TorConnectionStatus _status; Color _color(TorConnectionStatus status, StackColors colors) { diff --git a/lib/pages/settings_views/wallet_settings_view/frost_ms/frost_participants_view.dart b/lib/pages/settings_views/wallet_settings_view/frost_ms/frost_participants_view.dart index a0b502da2..71064a134 100644 --- a/lib/pages/settings_views/wallet_settings_view/frost_ms/frost_participants_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/frost_ms/frost_participants_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; + import '../../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart'; import '../../../../providers/db/main_db_provider.dart'; import '../../../../themes/stack_colors.dart'; @@ -15,12 +15,11 @@ import '../../../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../../../widgets/desktop/desktop_app_bar.dart'; import '../../../../widgets/desktop/desktop_scaffold.dart'; import '../../../../widgets/rounded_white_container.dart'; +import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tdv; class FrostParticipantsView extends ConsumerWidget { - const FrostParticipantsView({ - super.key, - required this.walletId, - }); + const FrostParticipantsView({super.key, required this.walletId}); static const String routeName = "/frostParticipantsView"; @@ -29,74 +28,73 @@ class FrostParticipantsView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { // TODO: optimize this by creating watcher providers (similar to normal WalletInfo) - final frostInfo = ref - .read(mainDBProvider) - .isar - .frostWalletInfo - .getByWalletIdSync(walletId)!; + final frostInfo = + ref + .read(mainDBProvider) + .isar + .frostWalletInfo + .getByWalletIdSync(walletId)!; return ConditionalParent( condition: Util.isDesktop, - builder: (child) => DesktopScaffold( - background: Theme.of(context).extension()!.background, - appBar: const DesktopAppBar( - isCompactHeight: false, - leading: AppBarBackButton(), - trailing: ExitToMyStackButton(), - ), - body: SizedBox( - width: 480, - child: child, - ), - ), + builder: + (child) => DesktopScaffold( + background: Theme.of(context).extension()!.background, + appBar: const DesktopAppBar( + isCompactHeight: false, + leading: AppBarBackButton(), + trailing: ExitToMyStackButton(), + ), + body: SizedBox(width: 480, child: child), + ), child: ConditionalParent( condition: !Util.isDesktop, - builder: (child) => Background( - child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, - appBar: AppBar( - leading: AppBarBackButton( - onPressed: () { - Navigator.of(context).pop(); - }, - ), - title: Text( - "Participants", - style: STextStyles.navBarTitle(context), - ), - ), - body: SafeArea( - child: LayoutBuilder( - builder: (context, constraints) { - return SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: IntrinsicHeight( - child: Padding( - padding: const EdgeInsets.all(16), - child: child, + builder: + (child) => Background( + child: Scaffold( + backgroundColor: + Theme.of(context).extension()!.background, + appBar: AppBar( + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + title: Text( + "Participants", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(16), + child: child, + ), + ), ), - ), - ), - ); - }, + ); + }, + ), + ), ), ), - ), - ), child: Column( - crossAxisAlignment: Util.isDesktop - ? CrossAxisAlignment.start - : CrossAxisAlignment.stretch, + crossAxisAlignment: + Util.isDesktop + ? CrossAxisAlignment.start + : CrossAxisAlignment.stretch, children: [ for (int i = 0; i < frostInfo.participants.length; i++) Padding( - padding: const EdgeInsets.symmetric( - vertical: 5, - ), + padding: const EdgeInsets.symmetric(vertical: 5), child: RoundedWhiteContainer( child: Row( children: [ @@ -104,12 +102,11 @@ class FrostParticipantsView extends ConsumerWidget { width: 26, height: 26, decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldActiveBG, - borderRadius: BorderRadius.circular( - 200, - ), + color: + Theme.of( + context, + ).extension()!.textFieldActiveBG, + borderRadius: BorderRadius.circular(200), ), child: Center( child: SvgPicture.asset( @@ -119,9 +116,7 @@ class FrostParticipantsView extends ConsumerWidget { ), ), ), - const SizedBox( - width: 8, - ), + const SizedBox(width: 8), Expanded( child: Text( frostInfo.participants[i] == frostInfo.myName @@ -130,12 +125,8 @@ class FrostParticipantsView extends ConsumerWidget { style: STextStyles.w500_14(context), ), ), - const SizedBox( - width: 8, - ), - IconCopyButton( - data: frostInfo.participants[i], - ), + const SizedBox(width: 8), + tdv.IconCopyButton(data: frostInfo.participants[i]), ], ), ), diff --git a/lib/pages/settings_views/wallet_settings_view/frost_ms/initiate_resharing/complete_reshare_config_view.dart b/lib/pages/settings_views/wallet_settings_view/frost_ms/initiate_resharing/complete_reshare_config_view.dart index afc48647d..1198e59b8 100644 --- a/lib/pages/settings_views/wallet_settings_view/frost_ms/initiate_resharing/complete_reshare_config_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/frost_ms/initiate_resharing/complete_reshare_config_view.dart @@ -3,14 +3,14 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:frostdart/frostdart.dart'; + +// import 'package:frostdart/frostdart.dart'; import '../../../../../frost_route_generator.dart'; import '../../../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart'; import '../../../../../providers/db/main_db_provider.dart'; import '../../../../../providers/frost_wallet/frost_wallet_providers.dart'; import '../../../../../providers/global/wallets_provider.dart'; -import '../../../../../services/frost.dart'; import '../../../../../themes/stack_colors.dart'; import '../../../../../utilities/format.dart'; import '../../../../../utilities/logger.dart'; @@ -27,6 +27,7 @@ import '../../../../../widgets/desktop/primary_button.dart'; import '../../../../../widgets/frost_scaffold.dart'; import '../../../../../widgets/rounded_white_container.dart'; import '../../../../../widgets/stack_dialog.dart'; +import '../../../../../wl_gen/interfaces/frost_interface.dart'; final class CompleteReshareConfigView extends ConsumerStatefulWidget { const CompleteReshareConfigView({ @@ -84,20 +85,21 @@ class _CompleteReshareConfigViewState ); } - final List newParticipants = - controllers.map((e) => e.text.trim()).toList(); + final List newParticipants = controllers + .map((e) => e.text.trim()) + .toList(); if (_includeMeInReshare) { newParticipants.insert(0, myName); } - final config = Frost.createResharerConfig( + final config = frostInterface.createResharerConfig( newThreshold: int.parse(_newThresholdController.text), resharers: widget.resharers.values.toList(), newParticipants: newParticipants, ); final salt = Format.uint8listToString( - resharerSalt(resharerConfig: config), + frostInterface.getResharerSalt(resharerConfig: config), ); if (frostInfo.knownSalts.contains(salt)) { @@ -122,10 +124,8 @@ class _CompleteReshareConfigViewState } ref.read(pFrostResharingData).myName = myName; - ref.read(pFrostResharingData).resharerRConfig = Frost.encodeRConfig( - config, - widget.resharers, - ); + ref.read(pFrostResharingData).resharerRConfig = frostInterface + .encodeRConfig(config, widget.resharers); final wallet = ref.read(pWallets).getWallet(widget.walletId) as BitcoinFrostWallet; @@ -143,12 +143,10 @@ class _CompleteReshareConfigViewState callerRouteName: CompleteReshareConfigView.routeName, ); - await Navigator.of(context).pushNamed( - FrostStepScaffold.routeName, - ); + await Navigator.of(context).pushNamed(FrostStepScaffold.routeName); } } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); if (mounted) { await showDialog( context: context, @@ -269,17 +267,15 @@ class _CompleteReshareConfigViewState leading: AppBarBackButton(), trailing: ExitToMyStackButton(), ), - body: SizedBox( - width: 480, - child: child, - ), + body: SizedBox(width: 480, child: child), ), child: ConditionalParent( condition: !Util.isDesktop, builder: (child) => Background( child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: AppBarBackButton( onPressed: () { @@ -318,9 +314,7 @@ class _CompleteReshareConfigViewState ? CrossAxisAlignment.start : CrossAxisAlignment.stretch, children: [ - const SizedBox( - height: 8, - ), + const SizedBox(height: 8), GestureDetector( onTap: () { setState(() { @@ -340,18 +334,14 @@ class _CompleteReshareConfigViewState materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, value: _includeMeInReshare, onChanged: (value) { - setState( - () => _includeMeInReshare = value == true, - ); + setState(() => _includeMeInReshare = value == true); _participantsCountChanged( _newParticipantsCountController.text, ); }, ), ), - const SizedBox( - width: 12, - ), + const SizedBox(width: 12), Expanded( child: Text( "I will be a signer in the new config", @@ -362,19 +352,16 @@ class _CompleteReshareConfigViewState ), ), ), - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), Text( "New threshold", style: STextStyles.w500_14(context).copyWith( - color: - Theme.of(context).extension()!.textSubtitle1, + color: Theme.of( + context, + ).extension()!.textSubtitle1, ), ), - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), TextField( keyboardType: TextInputType.number, inputFormatters: [FilteringTextInputFormatter.digitsOnly], @@ -384,31 +371,27 @@ class _CompleteReshareConfigViewState hintStyle: STextStyles.fieldLabel(context), ), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), RoundedWhiteContainer( child: Text( "Enter number of signatures required for fund management.", style: STextStyles.w500_12(context).copyWith( - color: - Theme.of(context).extension()!.textSubtitle2, + color: Theme.of( + context, + ).extension()!.textSubtitle2, ), ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), Text( "New number of participants", style: STextStyles.w500_14(context).copyWith( - color: - Theme.of(context).extension()!.textSubtitle1, + color: Theme.of( + context, + ).extension()!.textSubtitle1, ), ), - const SizedBox( - height: 10, - ), + const SizedBox(height: 10), TextField( keyboardType: TextInputType.number, inputFormatters: [FilteringTextInputFormatter.digitsOnly], @@ -419,42 +402,37 @@ class _CompleteReshareConfigViewState hintStyle: STextStyles.fieldLabel(context), ), ), - const SizedBox( - height: 6, - ), + const SizedBox(height: 6), RoundedWhiteContainer( child: Text( "The number of participants must be equal to or greater than the" " number of required signatures.", style: STextStyles.w500_12(context).copyWith( - color: - Theme.of(context).extension()!.textSubtitle2, + color: Theme.of( + context, + ).extension()!.textSubtitle2, ), ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), if (controllers.isNotEmpty) Text( "Participants", style: STextStyles.w500_14(context).copyWith( - color: - Theme.of(context).extension()!.textSubtitle1, + color: Theme.of( + context, + ).extension()!.textSubtitle1, ), ), - if (controllers.isNotEmpty) - const SizedBox( - height: 10, - ), + if (controllers.isNotEmpty) const SizedBox(height: 10), if (controllers.isNotEmpty) RoundedWhiteContainer( child: Text( "Type each name in one word without spaces.", style: STextStyles.w500_12(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle2, + color: Theme.of( + context, + ).extension()!.textSubtitle2, ), ), ), @@ -463,9 +441,7 @@ class _CompleteReshareConfigViewState children: [ for (int i = 0; i < controllers.length; i++) Padding( - padding: const EdgeInsets.only( - top: 10, - ), + padding: const EdgeInsets.only(top: 10), child: TextField( controller: controllers[i], decoration: InputDecoration( @@ -477,9 +453,7 @@ class _CompleteReshareConfigViewState ], ), if (!Util.isDesktop) const Spacer(), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), PrimaryButton( label: "Generate config", onPressed: () async { diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart index d94cca088..dded7630c 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart @@ -39,7 +39,8 @@ import '../../../../widgets/qr.dart'; import '../../../../widgets/rounded_white_container.dart'; import '../../../../widgets/stack_dialog.dart'; import '../../../add_wallet_views/new_wallet_recovery_phrase_view/sub_widgets/mnemonic_table.dart'; -import '../../../wallet_view/transaction_views/transaction_details_view.dart'; +import '../../../wallet_view/transaction_views/transaction_details_view.dart' + as tdv; import '../../sub_widgets/view_only_wallet_data_widget.dart'; import 'cn_wallet_keys.dart'; import 'wallet_xprivs.dart'; @@ -323,7 +324,7 @@ class _FrostKeys extends StatelessWidget { detail: frostWalletData!.config, button: Util.isDesktop - ? IconCopyButton(data: frostWalletData!.config) + ? tdv.IconCopyButton(data: frostWalletData!.config) : SimpleCopyButton(data: frostWalletData!.config), ), const SizedBox(height: 16), @@ -332,7 +333,7 @@ class _FrostKeys extends StatelessWidget { detail: frostWalletData!.keys, button: Util.isDesktop - ? IconCopyButton(data: frostWalletData!.keys) + ? tdv.IconCopyButton(data: frostWalletData!.keys) : SimpleCopyButton(data: frostWalletData!.keys), ), if (prevGen) const SizedBox(height: 24), @@ -350,7 +351,7 @@ class _FrostKeys extends StatelessWidget { detail: frostWalletData!.prevGen!.config, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: frostWalletData!.prevGen!.config, ) : SimpleCopyButton( @@ -364,7 +365,7 @@ class _FrostKeys extends StatelessWidget { detail: frostWalletData!.prevGen!.keys, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: frostWalletData!.prevGen!.keys, ) : SimpleCopyButton( diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart index 27e7cc63c..2e3ffbb5a 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart @@ -18,6 +18,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:tuple/tuple.dart'; import 'package:wakelock_plus/wakelock_plus.dart'; +import '../../../../app_config.dart'; import '../../../../providers/providers.dart'; import '../../../../route_generator.dart'; import '../../../../services/event_bus/events/global/blocks_remaining_event.dart'; @@ -34,11 +35,13 @@ import '../../../../utilities/text_styles.dart'; import '../../../../utilities/util.dart'; import '../../../../wallets/crypto_currency/coins/epiccash.dart'; import '../../../../wallets/crypto_currency/coins/litecoin.dart'; +import '../../../../wallets/crypto_currency/coins/mimblewimblecoin.dart'; import '../../../../wallets/crypto_currency/coins/monero.dart'; import '../../../../wallets/crypto_currency/coins/salvium.dart'; import '../../../../wallets/crypto_currency/coins/wownero.dart'; import '../../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../../wallets/wallet/impl/salvium_wallet.dart'; import '../../../../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart'; @@ -156,31 +159,26 @@ class _WalletNetworkSettingsViewState context: context, useSafeArea: false, barrierDismissible: true, - builder: - (context) => ConditionalParent( - condition: isDesktop, - builder: - (child) => DesktopDialog( - maxHeight: 150, - maxWidth: 500, - child: child, - ), - child: StackDialog( - title: "Rescan completed", - rightButton: TextButton( - style: Theme.of(context) - .extension()! - .getSecondaryEnabledButtonStyle(context), - child: Text( - "Ok", - style: STextStyles.itemSubtitle12(context), - ), - onPressed: () { - Navigator.of(context, rootNavigator: isDesktop).pop(); - }, - ), + builder: (context) => ConditionalParent( + condition: isDesktop, + builder: (child) => + DesktopDialog(maxHeight: 150, maxWidth: 500, child: child), + child: StackDialog( + title: "Rescan completed", + rightButton: TextButton( + style: Theme.of(context) + .extension()! + .getSecondaryEnabledButtonStyle(context), + child: Text( + "Ok", + style: STextStyles.itemSubtitle12(context), ), + onPressed: () { + Navigator.of(context, rootNavigator: isDesktop).pop(); + }, ), + ), + ), ); } } catch (e) { @@ -195,23 +193,19 @@ class _WalletNetworkSettingsViewState context: context, useSafeArea: false, barrierDismissible: true, - builder: - (context) => StackDialog( - title: "Rescan failed", - message: e.toString(), - rightButton: TextButton( - style: Theme.of(context) - .extension()! - .getSecondaryEnabledButtonStyle(context), - child: Text( - "Ok", - style: STextStyles.itemSubtitle12(context), - ), - onPressed: () { - Navigator.of(context, rootNavigator: isDesktop).pop(); - }, - ), - ), + builder: (context) => StackDialog( + title: "Rescan failed", + message: e.toString(), + rightButton: TextButton( + style: Theme.of(context) + .extension()! + .getSecondaryEnabledButtonStyle(context), + child: Text("Ok", style: STextStyles.itemSubtitle12(context)), + onPressed: () { + Navigator.of(context, rootNavigator: isDesktop).pop(); + }, + ), + ), ); } } @@ -247,8 +241,9 @@ class _WalletNetworkSettingsViewState _blocksRemaining = -1; } - eventBus = - widget.eventBus != null ? widget.eventBus! : GlobalEventBus.instance; + eventBus = widget.eventBus != null + ? widget.eventBus! + : GlobalEventBus.instance; _syncStatusSubscription = eventBus .on() @@ -277,6 +272,7 @@ class _WalletNetworkSettingsViewState coin is Wownero || coin is Epiccash || coin is Salvium || + coin is Mimblewimblecoin || (coin is Litecoin && ref.read(pWalletInfo(widget.walletId)).isMwebEnabled)) { _blocksRemainingSubscription = eventBus.on().listen( @@ -331,10 +327,9 @@ class _WalletNetworkSettingsViewState Widget build(BuildContext context) { final screenWidth = MediaQuery.of(context).size.width; - final progressLength = - isDesktop - ? 430.0 - : screenWidth - (_padding * 2) - (_boxPadding * 3) - _iconSize; + final progressLength = isDesktop + ? 430.0 + : screenWidth - (_padding * 2) - (_boxPadding * 3) - _iconSize; final coin = ref.watch(pWalletCoin(widget.walletId)); @@ -366,6 +361,14 @@ class _WalletNetworkSettingsViewState if (_percent < highestPercent) { _percent = highestPercent.clamp(0.0, 1.0); } + } else if (coin is Mimblewimblecoin) { + final double highestPercent = + (ref.watch(pWallets).getWallet(widget.walletId) + as MimblewimblecoinWallet) + .highestPercent; + if (_percent < highestPercent) { + _percent = highestPercent.clamp(0.0, 1.0); + } } return ConditionalParent( @@ -373,8 +376,9 @@ class _WalletNetworkSettingsViewState builder: (child) { return Background( child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: AppBarBackButton( onPressed: () { @@ -383,7 +387,11 @@ class _WalletNetworkSettingsViewState ), title: Text("Network", style: STextStyles.navBarTitle(context)), actions: [ - if (ref.watch(pWalletCoin(widget.walletId)) is! Epiccash) + if (ref.watch(pWalletCoin(widget.walletId)) is! Epiccash && + ref.watch(pWalletCoin(widget.walletId)) + is! Mimblewimblecoin || + ref.watch(pWalletCoin(widget.walletId)) + is! Mimblewimblecoin) Padding( padding: const EdgeInsets.only( top: 10, @@ -398,16 +406,14 @@ class _WalletNetworkSettingsViewState ), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, icon: SvgPicture.asset( Assets.svg.verticalEllipsis, - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, width: 20, height: 20, ), @@ -424,10 +430,9 @@ class _WalletNetworkSettingsViewState right: 10, child: Container( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.popupBG, + color: Theme.of( + context, + ).extension()!.popupBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -505,10 +510,9 @@ class _WalletNetworkSettingsViewState Text( "Blockchain status", textAlign: TextAlign.left, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.smallMed12(context), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.smallMed12(context), ), CustomTextButton( text: "Resync", @@ -521,14 +525,12 @@ class _WalletNetworkSettingsViewState SizedBox(height: isDesktop ? 12 : 9), if (_currentSyncStatus == WalletSyncStatus.synced) RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( children: [ Container( @@ -546,10 +548,9 @@ class _WalletNetworkSettingsViewState Assets.svg.radio, height: isDesktop ? 19 : 14, width: isDesktop ? 19 : 14, - color: - Theme.of( - context, - ).extension()!.accentColorGreen, + color: Theme.of( + context, + ).extension()!.accentColorGreen, ), ), ), @@ -572,14 +573,12 @@ class _WalletNetworkSettingsViewState ProgressBar( width: progressLength, height: 5, - fillColor: - Theme.of( - context, - ).extension()!.accentColorGreen, - backgroundColor: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + fillColor: Theme.of( + context, + ).extension()!.accentColorGreen, + backgroundColor: Theme.of( + context, + ).extension()!.textFieldDefaultBG, percent: 1, ), ], @@ -589,14 +588,12 @@ class _WalletNetworkSettingsViewState ), if (_currentSyncStatus == WalletSyncStatus.syncing) RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( children: [ Container( @@ -614,10 +611,9 @@ class _WalletNetworkSettingsViewState Assets.svg.radioSyncing, height: 14, width: 14, - color: - Theme.of( - context, - ).extension()!.accentColorYellow, + color: Theme.of( + context, + ).extension()!.accentColorYellow, ), ), ), @@ -642,19 +638,18 @@ class _WalletNetworkSettingsViewState children: [ Text( _percentString(_percent), - style: STextStyles.syncPercent( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.syncPercent(context) + .copyWith( + color: Theme.of(context) .extension()! .accentColorYellow, - ), + ), ), if (coin is Monero || coin is Wownero || coin is Epiccash || coin is Salvium || + coin is Mimblewimblecoin || (coin is Litecoin && ref.watch( pWalletInfo( @@ -663,14 +658,12 @@ class _WalletNetworkSettingsViewState ))) Text( " (Blocks to go: ${_blocksRemaining == -1 ? "?" : _blocksRemaining})", - style: STextStyles.syncPercent( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.syncPercent(context) + .copyWith( + color: Theme.of(context) .extension()! .accentColorYellow, - ), + ), ), ], ), @@ -681,14 +674,12 @@ class _WalletNetworkSettingsViewState ProgressBar( width: progressLength, height: 5, - fillColor: - Theme.of( - context, - ).extension()!.accentColorYellow, - backgroundColor: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + fillColor: Theme.of( + context, + ).extension()!.accentColorYellow, + backgroundColor: Theme.of( + context, + ).extension()!.textFieldDefaultBG, percent: _percent, ), ], @@ -698,14 +689,12 @@ class _WalletNetworkSettingsViewState ), if (_currentSyncStatus == WalletSyncStatus.unableToSync) RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( children: [ Container( @@ -723,10 +712,9 @@ class _WalletNetworkSettingsViewState Assets.svg.radioProblem, height: 14, width: 14, - color: - Theme.of( - context, - ).extension()!.accentColorRed, + color: Theme.of( + context, + ).extension()!.accentColorRed, ), ), ), @@ -741,19 +729,17 @@ class _WalletNetworkSettingsViewState Text( "Unable to synchronize", style: STextStyles.w600_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorRed, + color: Theme.of( + context, + ).extension()!.accentColorRed, ), ), Text( "0%", style: STextStyles.syncPercent(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorRed, + color: Theme.of( + context, + ).extension()!.accentColorRed, ), ), ], @@ -763,14 +749,12 @@ class _WalletNetworkSettingsViewState ProgressBar( width: progressLength, height: 5, - fillColor: - Theme.of( - context, - ).extension()!.accentColorRed, - backgroundColor: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + fillColor: Theme.of( + context, + ).extension()!.accentColorRed, + backgroundColor: Theme.of( + context, + ).extension()!.textFieldDefaultBG, percent: 0, ), ], @@ -782,39 +766,36 @@ class _WalletNetworkSettingsViewState Padding( padding: const EdgeInsets.only(top: 12), child: RoundedContainer( - color: - Theme.of( - context, - ).extension()!.warningBackground, + color: Theme.of( + context, + ).extension()!.warningBackground, child: Text( "Please check your internet connection and make sure your current node is not having issues.", style: STextStyles.baseXS(context).copyWith( - color: - Theme.of( - context, - ).extension()!.warningForeground, + color: Theme.of( + context, + ).extension()!.warningForeground, ), ), ), ), SizedBox(height: isDesktop ? 12 : 9), RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop ? const EdgeInsets.all(16) : const EdgeInsets.all(12), + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "Current height", textAlign: TextAlign.left, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.smallMed12(context), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.smallMed12(context), ), Text( ref.watch(pWalletChainHeight(widget.walletId)).toString(), @@ -823,140 +804,140 @@ class _WalletNetworkSettingsViewState ], ), ), - SizedBox(height: isDesktop ? 32 : 20), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Tor status", - textAlign: TextAlign.left, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.smallMed12(context), - ), - CustomTextButton( - text: - ref.watch( - prefsChangeNotifierProvider.select( - (value) => value.useTor, - ), - ) - ? "Disconnect" - : "Connect", - onTap: onTorTapped, - ), - ], - ), - SizedBox(height: isDesktop ? 12 : 9), - RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop ? const EdgeInsets.all(16) : const EdgeInsets.all(12), - child: Row( + if (AppConfig.hasFeature(AppFeature.tor)) + SizedBox(height: isDesktop ? 32 : 20), + if (AppConfig.hasFeature(AppFeature.tor)) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - if (ref.watch( - prefsChangeNotifierProvider.select((value) => value.useTor), - )) - Container( - width: _iconSize, - height: _iconSize, - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .accentColorGreen - .withOpacity(0.2), - borderRadius: BorderRadius.circular(_iconSize), - ), - child: Center( - child: SvgPicture.asset( - Assets.svg.tor, - height: isDesktop ? 19 : 14, - width: isDesktop ? 19 : 14, - color: - Theme.of( - context, - ).extension()!.accentColorGreen, + Text( + "Tor status", + textAlign: TextAlign.left, + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.smallMed12(context), + ), + CustomTextButton( + text: + ref.watch( + prefsChangeNotifierProvider.select( + (value) => value.useTor, + ), + ) + ? "Disconnect" + : "Connect", + onTap: onTorTapped, + ), + ], + ), + if (AppConfig.hasFeature(AppFeature.tor)) + SizedBox(height: isDesktop ? 12 : 9), + if (AppConfig.hasFeature(AppFeature.tor)) + RoundedWhiteContainer( + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + child: Row( + children: [ + if (ref.watch( + prefsChangeNotifierProvider.select((value) => value.useTor), + )) + Container( + width: _iconSize, + height: _iconSize, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .accentColorGreen + .withOpacity(0.2), + borderRadius: BorderRadius.circular(_iconSize), ), - ), - ), - if (!ref.watch( - prefsChangeNotifierProvider.select((value) => value.useTor), - )) - Container( - width: _iconSize, - height: _iconSize, - decoration: BoxDecoration( - color: Theme.of( - context, - ).extension()!.textDark.withOpacity(0.08), - borderRadius: BorderRadius.circular(_iconSize), - ), - child: Center( - child: SvgPicture.asset( - Assets.svg.tor, - height: isDesktop ? 19 : 14, - width: isDesktop ? 19 : 14, - color: - Theme.of( - context, - ).extension()!.textDark, + child: Center( + child: SvgPicture.asset( + Assets.svg.tor, + height: isDesktop ? 19 : 14, + width: isDesktop ? 19 : 14, + color: Theme.of( + context, + ).extension()!.accentColorGreen, + ), ), ), - ), - SizedBox(width: _boxPadding), - TorSubscription( - onTorStatusChanged: (status) { - setState(() { - _torConnectionStatus = status; - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Tor status", - style: STextStyles.desktopTextExtraExtraSmall( + if (!ref.watch( + prefsChangeNotifierProvider.select((value) => value.useTor), + )) + Container( + width: _iconSize, + height: _iconSize, + decoration: BoxDecoration( + color: Theme.of( context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark, - ), + ).extension()!.textDark.withOpacity(0.08), + borderRadius: BorderRadius.circular(_iconSize), ), - if (_torConnectionStatus == TorConnectionStatus.connected) - Text( - "Connected", - style: STextStyles.desktopTextExtraExtraSmall( + child: Center( + child: SvgPicture.asset( + Assets.svg.tor, + height: isDesktop ? 19 : 14, + width: isDesktop ? 19 : 14, + color: Theme.of( context, - ), + ).extension()!.textDark, ), - if (_torConnectionStatus == - TorConnectionStatus.connecting) + ), + ), + SizedBox(width: _boxPadding), + TorSubscription( + onTorStatusChanged: (status) { + setState(() { + _torConnectionStatus = status; + }); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Text( - "Connecting...", - style: STextStyles.desktopTextExtraExtraSmall( - context, - ), + "Tor status", + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of( + context, + ).extension()!.textDark, + ), ), - if (_torConnectionStatus == - TorConnectionStatus.disconnected) - Text( - "Disconnected", - style: STextStyles.desktopTextExtraExtraSmall( - context, + if (_torConnectionStatus == + TorConnectionStatus.connected) + Text( + "Connected", + style: STextStyles.desktopTextExtraExtraSmall( + context, + ), ), - ), - ], + if (_torConnectionStatus == + TorConnectionStatus.connecting) + Text( + "Connecting...", + style: STextStyles.desktopTextExtraExtraSmall( + context, + ), + ), + if (_torConnectionStatus == + TorConnectionStatus.disconnected) + Text( + "Disconnected", + style: STextStyles.desktopTextExtraExtraSmall( + context, + ), + ), + ], + ), ), - ), - ], + ], + ), ), - ), SizedBox(height: isDesktop ? 32 : 20), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -964,10 +945,9 @@ class _WalletNetworkSettingsViewState Text( "${ref.watch(pWalletCoin(widget.walletId)).prettyName} nodes", textAlign: TextAlign.left, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.smallMed12(context), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.smallMed12(context), ), CustomTextButton( text: "Add new node", @@ -990,9 +970,13 @@ class _WalletNetworkSettingsViewState coin: ref.watch(pWalletCoin(widget.walletId)), popBackToRoute: WalletNetworkSettingsView.routeName, ), - if (isDesktop && ref.watch(pWalletCoin(widget.walletId)) is! Epiccash) + if (isDesktop && + ref.watch(pWalletCoin(widget.walletId)) is! Epiccash && + ref.watch(pWalletCoin(widget.walletId)) is! Mimblewimblecoin) const SizedBox(height: 32), - if (isDesktop && ref.watch(pWalletCoin(widget.walletId)) is! Epiccash) + if (isDesktop && + ref.watch(pWalletCoin(widget.walletId)) is! Epiccash && + ref.watch(pWalletCoin(widget.walletId)) is! Mimblewimblecoin) Padding( padding: const EdgeInsets.only(bottom: 12), child: Row( @@ -1006,16 +990,16 @@ class _WalletNetworkSettingsViewState ], ), ), - if (isDesktop && ref.watch(pWalletCoin(widget.walletId)) is! Epiccash) + if (isDesktop && + ref.watch(pWalletCoin(widget.walletId)) is! Epiccash && + ref.watch(pWalletCoin(widget.walletId)) is! Mimblewimblecoin) RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of(context).extension()!.background - : null, - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Expandable( onExpandChanged: (state) { setState(() { @@ -1031,20 +1015,18 @@ class _WalletNetworkSettingsViewState width: _iconSize, height: _iconSize, decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular(_iconSize), ), child: Center( child: SvgPicture.asset( Assets.svg.networkWired, width: 24, - color: - Theme.of( - context, - ).extension()!.textDark, + color: Theme.of( + context, + ).extension()!.textDark, ), ), ), @@ -1055,14 +1037,14 @@ class _WalletNetworkSettingsViewState children: [ Text( "Advanced", - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( context, ).extension()!.textDark, - ), + ), ), Text( "Rescan blockchain", @@ -1080,10 +1062,9 @@ class _WalletNetworkSettingsViewState : Assets.svg.chevronDown, width: 12, height: 6, - color: - Theme.of( - context, - ).extension()!.textSubtitle1, + color: Theme.of( + context, + ).extension()!.textSubtitle1, ), ], ), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart index 3d899add7..b1b485451 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart @@ -18,6 +18,7 @@ import 'package:tuple/tuple.dart'; import '../../../db/hive/db.dart'; import '../../../db/sqlite/firo_cache.dart'; import '../../../models/epicbox_config_model.dart'; +import '../../../models/mwcmqs_config_model.dart'; import '../../../models/keys/key_data_interface.dart'; import '../../../models/keys/view_only_wallet_data.dart'; import '../../../notifications/show_flush_bar.dart'; @@ -39,6 +40,7 @@ import '../../../wallets/wallet/impl/bitcoin_frost_wallet.dart'; import '../../../wallets/wallet/impl/epiccash_wallet.dart'; import '../../../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../../../wallets/wallet/intermediate/lib_salvium_wallet.dart'; +import '../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart'; import '../../../wallets/wallet/wallet_mixin_interfaces/mnemonic_interface.dart'; import '../../../wallets/wallet/wallet_mixin_interfaces/view_only_option_interface.dart'; @@ -704,3 +706,103 @@ class _EpiBoxInfoFormState extends ConsumerState { ); } } + +class MwcMqsInfoForm extends ConsumerStatefulWidget { + const MwcMqsInfoForm({ + super.key, + required this.walletId, + }); + + final String walletId; + + @override + ConsumerState createState() => _MwcmqsInfoFormState(); +} + +class _MwcmqsInfoFormState extends ConsumerState { + final hostController = TextEditingController(); + final portController = TextEditingController(); + + late MimblewimblecoinWallet wallet; + + @override + void initState() { + wallet = + ref.read(pWallets).getWallet(widget.walletId) as MimblewimblecoinWallet; + + wallet.getMwcMqsConfig().then((MwcMqsConfigModel mwcmqsConfig) { + hostController.text = mwcmqsConfig.host; + portController.text = "${mwcmqsConfig.port ?? 443}"; + }); + super.initState(); + } + + @override + void dispose() { + hostController.dispose(); + portController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return RoundedWhiteContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + TextField( + autocorrect: Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop ? false : true, + controller: hostController, + decoration: const InputDecoration(hintText: "Host"), + ), + const SizedBox( + height: 8, + ), + TextField( + autocorrect: Util.isDesktop ? false : true, + enableSuggestions: Util.isDesktop ? false : true, + controller: portController, + decoration: const InputDecoration(hintText: "Port"), + keyboardType: + Util.isDesktop ? null : const TextInputType.numberWithOptions(), + ), + const SizedBox( + height: 8, + ), + TextButton( + onPressed: () async { + try { + await wallet.updateMwcmqsConfig( + hostController.text, + int.parse(portController.text), + ); + if (mounted) { + await showFloatingFlushBar( + context: context, + message: "Mwcmqs info saved!", + type: FlushBarType.success, + ); + } + unawaited(wallet.refresh()); + } catch (e) { + await showFloatingFlushBar( + context: context, + message: "Failed to save mwcmqs info: $e", + type: FlushBarType.warning, + ); + } + }, + child: Text( + "Save", + style: STextStyles.button(context).copyWith( + color: + Theme.of(context).extension()!.accentColorDark, + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart index 03ba8cdf0..2bcf90827 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart @@ -35,7 +35,8 @@ import '../../../../widgets/rounded_white_container.dart'; import '../../../../widgets/stack_dialog.dart'; import '../../../add_wallet_views/new_wallet_recovery_phrase_view/sub_widgets/mnemonic_table.dart'; import '../../../home_view/home_view.dart'; -import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; +import '../../../wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tdv; class DeleteWalletRecoveryPhraseView extends ConsumerStatefulWidget { const DeleteWalletRecoveryPhraseView({ @@ -236,7 +237,7 @@ class _DeleteWalletRecoveryPhraseViewState detail: widget.frostWalletData!.config, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: widget .frostWalletData! @@ -255,7 +256,7 @@ class _DeleteWalletRecoveryPhraseViewState detail: widget.frostWalletData!.keys, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: widget.frostWalletData!.keys, ) @@ -283,7 +284,7 @@ class _DeleteWalletRecoveryPhraseViewState .config, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: widget .frostWalletData! @@ -306,7 +307,7 @@ class _DeleteWalletRecoveryPhraseViewState widget.frostWalletData!.prevGen!.keys, button: Util.isDesktop - ? IconCopyButton( + ? tdv.IconCopyButton( data: widget .frostWalletData! diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart index f1d0aa5f9..f6f6b156c 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart @@ -10,6 +10,7 @@ import '../../../../themes/stack_colors.dart'; import '../../../../utilities/constants.dart'; import '../../../../utilities/text_styles.dart'; import '../../../../utilities/util.dart'; +import '../../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../../../../widgets/background.dart'; import '../../../../widgets/conditional_parent.dart'; @@ -20,6 +21,7 @@ import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/icon_widgets/x_icon.dart'; import '../../../../widgets/stack_text_field.dart'; import '../../../../widgets/textfield_icon_button.dart'; +import '../../../../wl_gen/interfaces/cs_monero_interface.dart'; class EditRefreshHeightView extends ConsumerStatefulWidget { const EditRefreshHeightView({super.key, required this.walletId}); @@ -34,7 +36,6 @@ class EditRefreshHeightView extends ConsumerStatefulWidget { } class _EditRefreshHeightViewState extends ConsumerState { - late final LibMoneroWallet _wallet; late final TextEditingController _controller; final _focusNode = FocusNode(); @@ -48,11 +49,17 @@ class _EditRefreshHeightViewState extends ConsumerState { try { final newHeight = int.tryParse(_controller.text); if (newHeight != null && newHeight >= 0) { - await _wallet.info.updateRestoreHeight( - newRestoreHeight: newHeight, - isar: ref.read(mainDBProvider).isar, - ); - _wallet.libMoneroWallet!.setRefreshFromBlockHeight(newHeight); + await ref + .read(pWalletInfo(widget.walletId)) + .updateRestoreHeight( + newRestoreHeight: newHeight, + isar: ref.read(mainDBProvider).isar, + ); + final wallet = + ref.read(pWallets).getWallet(widget.walletId) as LibMoneroWallet?; + if (wallet?.wallet != null) { + csMonero.setRefreshFromBlockHeight(wallet!.wallet!, newHeight); + } } else { errMessage = "Invalid height: ${_controller.text}"; } @@ -88,11 +95,19 @@ class _EditRefreshHeightViewState extends ConsumerState { @override void initState() { super.initState(); - _wallet = ref.read(pWallets).getWallet(widget.walletId) as LibMoneroWallet; - _controller = - TextEditingController() - ..text = - _wallet.libMoneroWallet!.getRefreshFromBlockHeight().toString(); + _controller = TextEditingController(); + final wallet = + ref.read(pWallets).getWallet(widget.walletId) as LibMoneroWallet?; + if (wallet?.wallet != null) { + _controller.text = csMonero + .getRefreshFromBlockHeight(wallet!.wallet!) + .toString(); + } else { + _controller.text = ref + .read(pWalletInfo(widget.walletId)) + .restoreHeight + .toString(); + } } @override @@ -118,8 +133,10 @@ class _EditRefreshHeightViewState extends ConsumerState { mainAxisAlignment: MainAxisAlignment.end, children: [ DesktopDialogCloseButton( - onPressedOverride: - Navigator.of(context, rootNavigator: true).pop, + onPressedOverride: Navigator.of( + context, + rootNavigator: true, + ).pop, ), ], ), @@ -137,8 +154,9 @@ class _EditRefreshHeightViewState extends ConsumerState { builder: (child) { return Background( child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: AppBarBackButton( onPressed: () { @@ -167,51 +185,47 @@ class _EditRefreshHeightViewState extends ConsumerState { key: const Key("restoreHeightFieldKey"), controller: _controller, focusNode: _focusNode, - style: - Util.isDesktop - ? STextStyles.desktopTextMedium( - context, - ).copyWith(height: 2) - : STextStyles.field(context), + style: Util.isDesktop + ? STextStyles.desktopTextMedium(context).copyWith(height: 2) + : STextStyles.field(context), enableSuggestions: false, autocorrect: false, autofocus: true, onSubmitted: (_) => _save(), onChanged: (_) => setState(() {}), - decoration: standardInputDecoration( - "Restore height", - _focusNode, - context, - ).copyWith( - suffixIcon: - _controller.text.isNotEmpty + decoration: + standardInputDecoration( + "Restore height", + _focusNode, + context, + ).copyWith( + suffixIcon: _controller.text.isNotEmpty ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: ConditionalParent( - condition: Util.isDesktop, - builder: - (child) => - SizedBox(height: 70, child: child), - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - _controller.text = ""; - }); - }, - ), - ], + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: ConditionalParent( + condition: Util.isDesktop, + builder: (child) => + SizedBox(height: 70, child: child), + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + _controller.text = ""; + }); + }, + ), + ], + ), ), ), - ), - ) + ) : Util.isDesktop ? const SizedBox(height: 70) : null, - ), + ), ), ), Util.isDesktop ? const SizedBox(height: 32) : const Spacer(), diff --git a/lib/pages/spark_names/buy_spark_name_view.dart b/lib/pages/spark_names/buy_spark_name_view.dart index 036a551d3..478893dc8 100644 --- a/lib/pages/spark_names/buy_spark_name_view.dart +++ b/lib/pages/spark_names/buy_spark_name_view.dart @@ -3,10 +3,9 @@ import 'dart:async'; import 'package:decimal/decimal.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../providers/providers.dart'; import '../../../utilities/amount/amount.dart'; @@ -32,6 +31,7 @@ import '../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../widgets/custom_buttons/blue_text_button.dart'; import '../../widgets/dialogs/s_dialog.dart'; import '../../widgets/rounded_white_container.dart'; +import '../../wl_gen/interfaces/lib_spark_interface.dart'; import 'confirm_spark_name_transaction_view.dart'; class BuySparkNameView extends ConsumerStatefulWidget { @@ -69,11 +69,22 @@ class _BuySparkNameViewState extends ConsumerState { try { final wallet = ref.read(pWallets).getWallet(widget.walletId) as SparkInterface; - final myAddress = await wallet.getCurrentReceivingSparkAddress(); + Address? myAddress = await wallet.getCurrentReceivingSparkAddress(); if (myAddress == null) { throw Exception("No spark address found"); } - addressController.text = myAddress.value; + + final db = ref.read(pDrift(widget.walletId)); + final myNames = await db.select(db.sparkNames).get(); + while (myNames.where((e) => e.address == myAddress!.value).isNotEmpty) { + Logging.instance.t( + "Found address that already has a spark name. Generating next address...", + ); + myAddress = await wallet.generateNextSparkAddress(); + await ref.read(mainDBProvider).updateOrPutAddresses([myAddress]); + } + + addressController.text = myAddress!.value; } catch (e, s) { Logging.instance.e("_fillCurrentReceiving", error: e, stackTrace: s); } finally { @@ -97,16 +108,15 @@ class _BuySparkNameViewState extends ConsumerState { throw Exception("Invalid Spark address selected"); } - final myAddresses = - await wallet.mainDB.isar.addresses - .where() - .walletIdEqualTo(widget.walletId) - .filter() - .typeEqualTo(AddressType.spark) - .and() - .subTypeEqualTo(AddressSubType.receiving) - .valueProperty() - .findAll(); + final myAddresses = await wallet.mainDB.isar.addresses + .where() + .walletIdEqualTo(widget.walletId) + .filter() + .typeEqualTo(AddressType.spark) + .and() + .subTypeEqualTo(AddressSubType.receiving) + .valueProperty() + .findAll(); if (!myAddresses.contains(chosenAddress)) { throw Exception("Selected Spark address does not belong to this wallet"); @@ -126,30 +136,28 @@ class _BuySparkNameViewState extends ConsumerState { if (_preRegLock) return; _preRegLock = true; try { - final txData = - (await showLoading( - whileFuture: _preRegFuture(), - context: context, - message: "Preparing transaction...", - onException: (e) { - throw e; - }, - ))!; + final txData = (await showLoading( + whileFuture: _preRegFuture(), + context: context, + message: "Preparing transaction...", + onException: (e) { + throw e; + }, + ))!; if (mounted) { if (Util.isDesktop) { await showDialog( context: context, - builder: - (context) => SDialog( - child: SizedBox( - width: 580, - child: ConfirmSparkNameTransactionView( - txData: txData, - walletId: widget.walletId, - ), - ), + builder: (context) => SDialog( + child: SizedBox( + width: 580, + child: ConfirmSparkNameTransactionView( + txData: txData, + walletId: widget.walletId, ), + ), + ), ); } else { await Navigator.of(context).pushNamed( @@ -169,13 +177,12 @@ class _BuySparkNameViewState extends ConsumerState { await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: "Error", - message: err, - desktopPopRootNavigator: Util.isDesktop, - maxWidth: Util.isDesktop ? 600 : null, - ), + builder: (_) => StackOkDialog( + title: "Error", + message: err, + desktopPopRootNavigator: Util.isDesktop, + maxWidth: Util.isDesktop ? 600 : null, + ), ); } } finally { @@ -249,10 +256,9 @@ class _BuySparkNameViewState extends ConsumerState { ); }, child: Column( - crossAxisAlignment: - Util.isDesktop - ? CrossAxisAlignment.start - : CrossAxisAlignment.stretch, + crossAxisAlignment: Util.isDesktop + ? CrossAxisAlignment.start + : CrossAxisAlignment.stretch, children: [ RoundedWhiteContainer( padding: EdgeInsets.all(Util.isDesktop ? 0 : 12), @@ -261,27 +267,23 @@ class _BuySparkNameViewState extends ConsumerState { children: [ Text( "Name", - style: - Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ) - : STextStyles.w500_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ), + style: Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ) + : STextStyles.w500_12(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ), ), Text( widget.name, - style: - Util.isDesktop - ? STextStyles.w500_14(context) - : STextStyles.w500_12(context), + style: Util.isDesktop + ? STextStyles.w500_14(context) + : STextStyles.w500_12(context), ), ], ), @@ -296,20 +298,17 @@ class _BuySparkNameViewState extends ConsumerState { children: [ Text( "Spark address", - style: - Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ) - : STextStyles.w500_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ), + style: Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ) + : STextStyles.w500_12(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ), ), CustomTextButton( text: "Use current", @@ -350,20 +349,17 @@ class _BuySparkNameViewState extends ConsumerState { children: [ Text( "Additional info", - style: - Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ) - : STextStyles.w500_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ), + style: Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ) + : STextStyles.w500_12(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ), ), ], ), @@ -399,20 +395,17 @@ class _BuySparkNameViewState extends ConsumerState { children: [ Text( "${isRenewal ? "Renew" : "Register"} for", - style: - Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ) - : STextStyles.w500_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ), + style: Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ) + : STextStyles.w500_12(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ), ), SizedBox( width: Util.isDesktop ? 180 : 140, @@ -440,10 +433,9 @@ class _BuySparkNameViewState extends ConsumerState { isExpanded: true, buttonStyleData: ButtonStyleData( decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -456,10 +448,9 @@ class _BuySparkNameViewState extends ConsumerState { Assets.svg.chevronDown, width: 12, height: 6, - color: - Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, ), ), ), @@ -468,10 +459,9 @@ class _BuySparkNameViewState extends ConsumerState { elevation: 0, maxHeight: 250, decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -497,20 +487,17 @@ class _BuySparkNameViewState extends ConsumerState { children: [ Text( "Cost", - style: - Util.isDesktop - ? STextStyles.w500_14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ) - : STextStyles.w500_12(context).copyWith( - color: - Theme.of( - context, - ).extension()!.infoItemLabel, - ), + style: Util.isDesktop + ? STextStyles.w500_14(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ) + : STextStyles.w500_12(context).copyWith( + color: Theme.of( + context, + ).extension()!.infoItemLabel, + ), ), Text( ref @@ -518,15 +505,15 @@ class _BuySparkNameViewState extends ConsumerState { .format( Amount.fromDecimal( Decimal.fromInt( - kStandardSparkNamesFee[widget.name.length] * _years, + libSpark.standardSparkNamesFee[widget.name.length] * + _years, ), fractionDigits: coin.fractionDigits, ), ), - style: - Util.isDesktop - ? STextStyles.w500_14(context) - : STextStyles.w500_12(context), + style: Util.isDesktop + ? STextStyles.w500_14(context) + : STextStyles.w500_12(context), ), ], ), diff --git a/lib/pages/spark_names/confirm_spark_name_transaction_view.dart b/lib/pages/spark_names/confirm_spark_name_transaction_view.dart index c98409dfd..3282b1f1f 100644 --- a/lib/pages/spark_names/confirm_spark_name_transaction_view.dart +++ b/lib/pages/spark_names/confirm_spark_name_transaction_view.dart @@ -16,6 +16,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; +import '../../models/isar/models/blockchain_data/address.dart'; import '../../models/isar/models/transaction_note.dart'; import '../../notifications/show_flush_bar.dart'; import '../../pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart'; @@ -128,6 +129,25 @@ class _ConfirmSparkNameTransactionViewState ); } + final address = txData.sparkNameInfo?.sparkAddress; + final currentReceiving = await wallet.getCurrentReceivingSparkAddress(); + if (currentReceiving?.value == address?.value) { + final address = await wallet.generateNextSparkAddress(); + await ref.read(mainDBProvider).isar.writeTxn(() async { + await ref.read(mainDBProvider).isar.addresses.put(address); + }); + } + + final db = ref.read(pDrift(walletId)); + await db.upsertSparkNames([ + ( + name: txData.sparkNameInfo!.name, + address: txData.sparkNameInfo!.sparkAddress.value, + validUntil: -99999, + additionalInfo: txData.sparkNameInfo!.additionalInfo, + ), + ]); + unawaited(wallet.refresh()); if (mounted) { diff --git a/lib/pages/spark_names/sub_widgets/buy_spark_name_option_widget.dart b/lib/pages/spark_names/sub_widgets/buy_spark_name_option_widget.dart index 18b6bb6f4..61c35fe93 100644 --- a/lib/pages/spark_names/sub_widgets/buy_spark_name_option_widget.dart +++ b/lib/pages/spark_names/sub_widgets/buy_spark_name_option_widget.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'package:drift/drift.dart' as drift; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -21,6 +21,7 @@ import '../../../widgets/desktop/secondary_button.dart'; import '../../../widgets/dialogs/s_dialog.dart'; import '../../../widgets/rounded_white_container.dart'; import '../../../widgets/stack_dialog.dart'; +import '../../../wl_gen/interfaces/lib_spark_interface.dart'; import '../buy_spark_name_view.dart'; class BuySparkNameOptionWidget extends ConsumerStatefulWidget { @@ -55,6 +56,15 @@ class _BuySparkNameWidgetState extends ConsumerState { )) { rethrow; } + final db = ref.read(pDrift(widget.walletId)); + final results = await (db.select( + db.sparkNames, + )..where((e) => e.name.lower().equals(name))).get(); + + if (results.isNotEmpty) { + return false; + } + // name not found return true; } @@ -99,12 +109,11 @@ class _BuySparkNameWidgetState extends ConsumerState { if (mounted) { await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: message, - desktopPopRootNavigator: Util.isDesktop, - maxWidth: Util.isDesktop ? 600 : null, - ), + builder: (_) => StackOkDialog( + title: message, + desktopPopRootNavigator: Util.isDesktop, + maxWidth: Util.isDesktop ? 600 : null, + ), ); } } finally { @@ -132,8 +141,9 @@ class _BuySparkNameWidgetState extends ConsumerState { @override Widget build(BuildContext context) { return Column( - crossAxisAlignment: - Util.isDesktop ? CrossAxisAlignment.start : CrossAxisAlignment.center, + crossAxisAlignment: Util.isDesktop + ? CrossAxisAlignment.start + : CrossAxisAlignment.center, children: [ SizedBox( height: 48, @@ -144,10 +154,9 @@ class _BuySparkNameWidgetState extends ConsumerState { height: 48, width: 100, decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.all( Radius.circular(Constants.size.circularBorderRadius), ), @@ -158,7 +167,9 @@ class _BuySparkNameWidgetState extends ConsumerState { Expanded( child: TextField( inputFormatters: [ - LengthLimitingTextInputFormatter(kMaxNameLength), + LengthLimitingTextInputFormatter( + libSpark.maxNameLength, + ), ], textInputAction: TextInputAction.search, focusNode: _nameFieldFocus, @@ -173,10 +184,9 @@ class _BuySparkNameWidgetState extends ConsumerState { Assets.svg.search, width: 20, height: 20, - color: - Theme.of(context) - .extension()! - .textFieldDefaultSearchIconLeft, + color: Theme.of(context) + .extension()! + .textFieldDefaultSearchIconLeft, ), ), fillColor: Colors.transparent, @@ -196,7 +206,9 @@ class _BuySparkNameWidgetState extends ConsumerState { setState(() { _isInvalidCharacters = value.isNotEmpty && - !RegExp(kNameRegexString).hasMatch(value); + !RegExp( + libSpark.nameRegexString, + ).hasMatch(value); }); }, ), @@ -210,10 +222,9 @@ class _BuySparkNameWidgetState extends ConsumerState { ), const SizedBox(height: 4), Row( - mainAxisAlignment: - _isInvalidCharacters - ? MainAxisAlignment.spaceBetween - : MainAxisAlignment.end, + mainAxisAlignment: _isInvalidCharacters + ? MainAxisAlignment.spaceBetween + : MainAxisAlignment.end, children: [ if (_isInvalidCharacters) Text( @@ -228,12 +239,11 @@ class _BuySparkNameWidgetState extends ConsumerState { builder: (context) { final length = _nameController.text.length; return Text( - "$length/$kMaxNameLength", + "$length/${libSpark.maxNameLength}", style: STextStyles.w500_10(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textSubtitle2, + color: Theme.of( + context, + ).extension()!.textSubtitle2, ), ); }, @@ -246,7 +256,7 @@ class _BuySparkNameWidgetState extends ConsumerState { label: "Lookup", enabled: _nameController.text.isNotEmpty && - RegExp(kNameRegexString).hasMatch(_nameController.text), + RegExp(libSpark.nameRegexString).hasMatch(_nameController.text), buttonHeight: Util.isDesktop ? ButtonHeight.l : null, onPressed: _lookup, ), @@ -277,15 +287,13 @@ class _NameCard extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final availability = isAvailable ? "Available" : "Unavailable"; - final color = - isAvailable - ? Theme.of(context).extension()!.accentColorGreen - : Theme.of(context).extension()!.accentColorRed; + final color = isAvailable + ? Theme.of(context).extension()!.accentColorGreen + : Theme.of(context).extension()!.accentColorRed; - final style = - (Util.isDesktop - ? STextStyles.w500_16(context) - : STextStyles.w500_12(context)); + final style = (Util.isDesktop + ? STextStyles.w500_16(context) + : STextStyles.w500_12(context)); return RoundedWhiteContainer( padding: EdgeInsets.all(Util.isDesktop ? 24 : 16), @@ -311,51 +319,49 @@ class _NameCard extends ConsumerWidget { PrimaryButton( label: "Buy name", enabled: isAvailable, - buttonHeight: - Util.isDesktop ? ButtonHeight.m : ButtonHeight.l, + buttonHeight: Util.isDesktop + ? ButtonHeight.m + : ButtonHeight.l, width: Util.isDesktop ? 140 : 120, onPressed: () async { if (context.mounted) { if (Util.isDesktop) { await showDialog( context: context, - builder: - (context) => SDialog( - child: SizedBox( - width: 580, - child: Column( + builder: (context) => SDialog( + child: SizedBox( + width: 580, + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 32, - ), - child: Text( - "Buy name", - style: STextStyles.desktopH3( - context, - ), - ), - ), - const DesktopDialogCloseButton(), - ], - ), Padding( - padding: const EdgeInsets.symmetric( - horizontal: 32, + padding: const EdgeInsets.only( + left: 32, ), - child: BuySparkNameView( - walletId: walletId, - name: name, + child: Text( + "Buy name", + style: STextStyles.desktopH3(context), ), ), + const DesktopDialogCloseButton(), ], ), - ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 32, + ), + child: BuySparkNameView( + walletId: walletId, + name: name, + ), + ), + ], ), + ), + ), ); } else { await Navigator.of(context).pushNamed( diff --git a/lib/pages/spark_names/sub_widgets/owned_spark_name_card.dart b/lib/pages/spark_names/sub_widgets/owned_spark_name_card.dart index fc813efb9..3971fdd4e 100644 --- a/lib/pages/spark_names/sub_widgets/owned_spark_name_card.dart +++ b/lib/pages/spark_names/sub_widgets/owned_spark_name_card.dart @@ -32,7 +32,10 @@ class _OwnedSparkNameCardState extends ConsumerState { final remaining = widget.name.validUntil - currentChainHeight; - if (remaining <= 0) { + if (widget.name.validUntil == -99999) { + color = theme.accentColorYellow; + message = "Pending"; + } else if (remaining <= 0) { color = theme.accentColorRed; message = "Expired"; } else { diff --git a/lib/pages/spark_names/sub_widgets/spark_name_details.dart b/lib/pages/spark_names/sub_widgets/spark_name_details.dart index 3acaad8f5..372f7484e 100644 --- a/lib/pages/spark_names/sub_widgets/spark_name_details.dart +++ b/lib/pages/spark_names/sub_widgets/spark_name_details.dart @@ -17,7 +17,8 @@ import '../../../widgets/desktop/desktop_dialog_close_button.dart'; import '../../../widgets/desktop/primary_button.dart'; import '../../../widgets/dialogs/s_dialog.dart'; import '../../../widgets/rounded_container.dart'; -import '../../wallet_view/transaction_views/transaction_details_view.dart'; +import '../../wallet_view/transaction_views/transaction_details_view.dart' + as tvd; import '../buy_spark_name_view.dart'; class SparkNameDetailsView extends ConsumerStatefulWidget { @@ -53,7 +54,10 @@ class _SparkNameDetailsViewState extends ConsumerState { final remaining = name.validUntil - currentChainHeight; - if (remaining <= 0) { + if (widget.name.validUntil == -99999) { + color = theme.accentColorYellow; + message = "Pending"; + } else if (remaining <= 0) { color = theme.accentColorRed; message = "Expired"; } else { @@ -285,7 +289,7 @@ class _SparkNameDetailsViewState extends ConsumerState { ), ), Util.isDesktop - ? IconCopyButton(data: name.address) + ? tvd.IconCopyButton(data: name.address) : SimpleCopyButton(data: name.address), ], ), @@ -341,7 +345,9 @@ class _SparkNameDetailsViewState extends ConsumerState { ), ), Util.isDesktop - ? IconCopyButton(data: label!.value) + ? tvd.IconCopyButton( + data: label!.value, + ) : SimpleCopyButton( data: label!.value, ), diff --git a/lib/pages/token_view/sub_widgets/my_tokens_list.dart b/lib/pages/token_view/sub_widgets/my_tokens_list.dart index f6ef70c38..a25d34274 100644 --- a/lib/pages/token_view/sub_widgets/my_tokens_list.dart +++ b/lib/pages/token_view/sub_widgets/my_tokens_list.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/isar/main_db.dart'; import '../../../models/isar/models/ethereum/eth_contract.dart'; @@ -79,13 +79,11 @@ class MyTokensList extends StatelessWidget { final token = tokens[index]; return Padding( key: Key(token.address), - padding: isDesktop - ? const EdgeInsets.symmetric(vertical: 5) - : const EdgeInsets.all(4), - child: MyTokenSelectItem( - walletId: walletId, - token: token, - ), + padding: + isDesktop + ? const EdgeInsets.symmetric(vertical: 5) + : const EdgeInsets.all(4), + child: MyTokenSelectItem(walletId: walletId, token: token), ); }, ); diff --git a/lib/pages/token_view/sub_widgets/token_transaction_list_widget.dart b/lib/pages/token_view/sub_widgets/token_transaction_list_widget.dart index 657a5283a..dc8255726 100644 --- a/lib/pages/token_view/sub_widgets/token_transaction_list_widget.dart +++ b/lib/pages/token_view/sub_widgets/token_transaction_list_widget.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; import '../../wallet_view/sub_widgets/no_transactions_found.dart'; import '../../wallet_view/transaction_views/tx_v2/transaction_v2_list_item.dart'; diff --git a/lib/pages/token_view/token_contract_details_view.dart b/lib/pages/token_view/token_contract_details_view.dart index 08e82e0ae..3f292054b 100644 --- a/lib/pages/token_view/token_contract_details_view.dart +++ b/lib/pages/token_view/token_contract_details_view.dart @@ -10,7 +10,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../db/isar/main_db.dart'; import '../../models/isar/models/isar_models.dart'; import '../../themes/stack_colors.dart'; @@ -47,10 +48,11 @@ class _TokenContractDetailsViewState @override void initState() { - contract = MainDB.instance.isar.ethContracts - .where() - .addressEqualTo(widget.contractAddress) - .findFirstSync()!; + contract = + MainDB.instance.isar.ethContracts + .where() + .addressEqualTo(widget.contractAddress) + .findFirstSync()!; super.initState(); } @@ -59,92 +61,77 @@ class _TokenContractDetailsViewState Widget build(BuildContext context) { return ConditionalParent( condition: !isDesktop, - builder: (child) => Background( - child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, - appBar: AppBar( - backgroundColor: - Theme.of(context).extension()!.backgroundAppBar, - leading: AppBarBackButton( - onPressed: () { - Navigator.of(context).pop(); - }, - ), - titleSpacing: 0, - title: Text( - "Contract details", - style: STextStyles.navBarTitle(context), - ), - ), - body: SafeArea( - child: LayoutBuilder( - builder: (builderContext, constraints) { - return SingleChildScrollView( - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: constraints.maxHeight, - ), - child: Padding( - padding: const EdgeInsets.all(16), - child: child, - ), - ), - ); - }, + builder: + (child) => Background( + child: Scaffold( + backgroundColor: + Theme.of(context).extension()!.background, + appBar: AppBar( + backgroundColor: + Theme.of( + context, + ).extension()!.backgroundAppBar, + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + titleSpacing: 0, + title: Text( + "Contract details", + style: STextStyles.navBarTitle(context), + ), + ), + body: SafeArea( + child: LayoutBuilder( + builder: (builderContext, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: Padding( + padding: const EdgeInsets.all(16), + child: child, + ), + ), + ); + }, + ), + ), ), ), - ), - ), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ _Item( title: "Contract address", data: contract.address, - button: SimpleCopyButton( - data: contract.address, - ), - ), - const SizedBox( - height: 12, + button: SimpleCopyButton(data: contract.address), ), + const SizedBox(height: 12), _Item( title: "Name", data: contract.name, - button: SimpleCopyButton( - data: contract.name, - ), - ), - const SizedBox( - height: 12, + button: SimpleCopyButton(data: contract.name), ), + const SizedBox(height: 12), _Item( title: "Symbol", data: contract.symbol, - button: SimpleCopyButton( - data: contract.symbol, - ), - ), - const SizedBox( - height: 12, + button: SimpleCopyButton(data: contract.symbol), ), + const SizedBox(height: 12), _Item( title: "Type", data: contract.type.name, - button: SimpleCopyButton( - data: contract.type.name, - ), - ), - const SizedBox( - height: 12, + button: SimpleCopyButton(data: contract.type.name), ), + const SizedBox(height: 12), _Item( title: "Decimals", data: contract.decimals.toString(), - button: SimpleCopyButton( - data: contract.decimals.toString(), - ), + button: SimpleCopyButton(data: contract.decimals.toString()), ), ], ), @@ -173,29 +160,20 @@ class _Item extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - title, - style: STextStyles.itemSubtitle(context), - ), + Text(title, style: STextStyles.itemSubtitle(context)), button, ], ), - const SizedBox( - height: 5, - ), + const SizedBox(height: 5), data.isNotEmpty - ? SelectableText( - data, - style: STextStyles.w500_14(context), - ) + ? SelectableText(data, style: STextStyles.w500_14(context)) : Text( - "$title will appear here", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle3, - ), + "$title will appear here", + style: STextStyles.w500_14(context).copyWith( + color: + Theme.of(context).extension()!.textSubtitle3, ), + ), ], ), ); diff --git a/lib/pages/wallet_view/sub_widgets/transactions_list.dart b/lib/pages/wallet_view/sub_widgets/transactions_list.dart index 8e2fb5cb6..12c3d0a2c 100644 --- a/lib/pages/wallet_view/sub_widgets/transactions_list.dart +++ b/lib/pages/wallet_view/sub_widgets/transactions_list.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../models/isar/models/isar_models.dart'; @@ -36,10 +36,7 @@ import '../wallet_view.dart'; import 'no_transactions_found.dart'; class TransactionsList extends ConsumerStatefulWidget { - const TransactionsList({ - super.key, - required this.walletId, - }); + const TransactionsList({super.key, required this.walletId}); final String walletId; @@ -57,23 +54,15 @@ class _TransactionsListState extends ConsumerState { BorderRadius get _borderRadiusFirst { return BorderRadius.only( - topLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - topRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + topLeft: Radius.circular(Constants.size.circularBorderRadius), + topRight: Radius.circular(Constants.size.circularBorderRadius), ); } BorderRadius get _borderRadiusLast { return BorderRadius.only( - bottomLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - bottomRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + bottomLeft: Radius.circular(Constants.size.circularBorderRadius), + bottomRight: Radius.circular(Constants.size.circularBorderRadius), ); } @@ -120,58 +109,62 @@ class _TransactionsListState extends ConsumerState { if (Util.isDesktop) { await showDialog( context: context, - builder: (context) => Navigator( - initialRoute: TradeDetailsView.routeName, - onGenerateRoute: RouteGenerator.generateRoute, - onGenerateInitialRoutes: (_, __) { - return [ - FadePageRoute( - DesktopDialog( - maxHeight: null, - maxWidth: 580, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 32, - bottom: 16, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - "Trade details", - style: STextStyles.desktopH3(context), + builder: + (context) => Navigator( + initialRoute: TradeDetailsView.routeName, + onGenerateRoute: RouteGenerator.generateRoute, + onGenerateInitialRoutes: (_, __) { + return [ + FadePageRoute( + DesktopDialog( + maxHeight: null, + maxWidth: 580, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 32, + bottom: 16, ), - DesktopDialogCloseButton( - onPressedOverride: Navigator.of( - context, - rootNavigator: true, - ).pop, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text( + "Trade details", + style: STextStyles.desktopH3( + context, + ), + ), + DesktopDialogCloseButton( + onPressedOverride: + Navigator.of( + context, + rootNavigator: true, + ).pop, + ), + ], ), - ], - ), - ), - Flexible( - child: TradeDetailsView( - tradeId: trade.tradeId, - transactionIfSentFromStack: tx, - walletName: walletName, - walletId: widget.walletId, - ), + ), + Flexible( + child: TradeDetailsView( + tradeId: trade.tradeId, + transactionIfSentFromStack: tx, + walletName: walletName, + walletId: widget.walletId, + ), + ), + ], ), - ], + ), + const RouteSettings( + name: TradeDetailsView.routeName, + ), ), - ), - const RouteSettings( - name: TradeDetailsView.routeName, - ), - ), - ]; - }, - ), + ]; + }, + ), ); } else { unawaited( @@ -209,13 +202,14 @@ class _TransactionsListState extends ConsumerState { @override void initState() { - _query = ref - .read(mainDBProvider) - .isar - .transactions - .where() - .walletIdEqualTo(widget.walletId) - .sortByTimestampDesc(); + _query = + ref + .read(mainDBProvider) + .isar + .transactions + .where() + .walletIdEqualTo(widget.walletId) + .sortByTimestampDesc(); _subscription = _query.watch().listen((event) { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -252,15 +246,8 @@ class _TransactionsListState extends ConsumerState { return const Column( children: [ Spacer(), - Center( - child: LoadingIndicator( - height: 50, - width: 50, - ), - ), - Spacer( - flex: 4, - ), + Center(child: LoadingIndicator(height: 50, width: 50)), + Spacer(flex: 4), ], ); } @@ -278,64 +265,66 @@ class _TransactionsListState extends ConsumerState { onRefresh: () async { await ref.read(pWallets).getWallet(widget.walletId).refresh(); }, - child: Util.isDesktop - ? ListView.separated( - shrinkWrap: true, - itemBuilder: (context, index) { - BorderRadius? radius; - if (_transactions2.length == 1) { - radius = BorderRadius.circular( - Constants.size.circularBorderRadius, - ); - } else if (index == _transactions2.length - 1) { - radius = _borderRadiusLast; - } else if (index == 0) { - radius = _borderRadiusFirst; - } - final tx = _transactions2[index]; - return itemBuilder(context, tx, radius, coin, height); - }, - separatorBuilder: (context, index) { - return Container( - width: double.infinity, - height: 2, - color: Theme.of(context) - .extension()! - .background, - ); - }, - itemCount: _transactions2.length, - ) - : ListView.builder( - itemCount: _transactions2.length, - itemBuilder: (context, index) { - BorderRadius? radius; - bool shouldWrap = false; - if (_transactions2.length == 1) { - radius = BorderRadius.circular( - Constants.size.circularBorderRadius, - ); - } else if (index == _transactions2.length - 1) { - radius = _borderRadiusLast; - shouldWrap = true; - } else if (index == 0) { - radius = _borderRadiusFirst; - } - final tx = _transactions2[index]; - if (shouldWrap) { - return Column( - children: [ - itemBuilder(context, tx, radius, coin, height), - const SizedBox( - height: WalletView.navBarHeight + 14, - ), - ], - ); - } else { + child: + Util.isDesktop + ? ListView.separated( + shrinkWrap: true, + itemBuilder: (context, index) { + BorderRadius? radius; + if (_transactions2.length == 1) { + radius = BorderRadius.circular( + Constants.size.circularBorderRadius, + ); + } else if (index == _transactions2.length - 1) { + radius = _borderRadiusLast; + } else if (index == 0) { + radius = _borderRadiusFirst; + } + final tx = _transactions2[index]; return itemBuilder(context, tx, radius, coin, height); - } - }, - ), + }, + separatorBuilder: (context, index) { + return Container( + width: double.infinity, + height: 2, + color: + Theme.of( + context, + ).extension()!.background, + ); + }, + itemCount: _transactions2.length, + ) + : ListView.builder( + itemCount: _transactions2.length, + itemBuilder: (context, index) { + BorderRadius? radius; + bool shouldWrap = false; + if (_transactions2.length == 1) { + radius = BorderRadius.circular( + Constants.size.circularBorderRadius, + ); + } else if (index == _transactions2.length - 1) { + radius = _borderRadiusLast; + shouldWrap = true; + } else if (index == 0) { + radius = _borderRadiusFirst; + } + final tx = _transactions2[index]; + if (shouldWrap) { + return Column( + children: [ + itemBuilder(context, tx, radius, coin, height), + const SizedBox( + height: WalletView.navBarHeight + 14, + ), + ], + ); + } else { + return itemBuilder(context, tx, radius, coin, height); + } + }, + ), ); } }, diff --git a/lib/pages/wallet_view/transaction_views/all_transactions_view.dart b/lib/pages/wallet_view/transaction_views/all_transactions_view.dart index 9fcbfc3f4..98996a780 100644 --- a/lib/pages/wallet_view/transaction_views/all_transactions_view.dart +++ b/lib/pages/wallet_view/transaction_views/all_transactions_view.dart @@ -14,7 +14,7 @@ import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; @@ -22,7 +22,6 @@ import '../../../models/isar/models/contact_entry.dart'; import '../../../models/isar/models/transaction_note.dart'; import '../../../models/transaction_filter.dart'; import '../../../notifications/show_flush_bar.dart'; -import '../../../providers/db/main_db_provider.dart'; import '../../../providers/global/address_book_service_provider.dart'; import '../../../providers/providers.dart'; import '../../../providers/ui/transaction_filter_provider.dart'; @@ -49,7 +48,7 @@ import '../../../widgets/stack_text_field.dart'; import '../../../widgets/textfield_icon_button.dart'; import '../../../widgets/transaction_card.dart'; import '../sub_widgets/tx_icon.dart'; -import 'transaction_details_view.dart'; +import 'transaction_details_view.dart' as tvd; import 'transaction_search_filter_view.dart'; typedef _GroupedTransactions = @@ -853,6 +852,10 @@ class _DesktopTransactionCardRowState return "Restored Funds"; } + if (coin is Mimblewimblecoin && _transaction.slateId == null) { + return "Restored Funds"; + } + if (_transaction.subType == TransactionSubType.mint) { if (_transaction.isConfirmed(height, minConfirms)) { return "Anonymized"; @@ -954,6 +957,19 @@ class _DesktopTransactionCardRowState ); return; } + + if (coin is Mimblewimblecoin && _transaction.slateId == null) { + unawaited( + showFloatingFlushBar( + context: context, + message: + "Restored Mimblewimblecoin funds from your Seed have no Data.", + type: FlushBarType.warning, + duration: const Duration(seconds: 5), + ), + ); + return; + } if (Util.isDesktop) { await showDialog( context: context, @@ -961,7 +977,7 @@ class _DesktopTransactionCardRowState (context) => DesktopDialog( maxHeight: MediaQuery.of(context).size.height - 64, maxWidth: 580, - child: TransactionDetailsView( + child: tvd.TransactionDetailsView( transaction: _transaction, coin: coin, walletId: walletId, @@ -971,7 +987,7 @@ class _DesktopTransactionCardRowState } else { unawaited( Navigator.of(context).pushNamed( - TransactionDetailsView.routeName, + tvd.TransactionDetailsView.routeName, arguments: Tuple3(_transaction, coin, walletId), ), ); diff --git a/lib/pages/wallet_view/transaction_views/dialogs/cancelling_transaction_progress_dialog.dart b/lib/pages/wallet_view/transaction_views/dialogs/cancelling_transaction_progress_dialog.dart index f1824d17e..da9c45a68 100644 --- a/lib/pages/wallet_view/transaction_views/dialogs/cancelling_transaction_progress_dialog.dart +++ b/lib/pages/wallet_view/transaction_views/dialogs/cancelling_transaction_progress_dialog.dart @@ -9,7 +9,10 @@ */ import 'package:flutter/material.dart'; + +import '../../../../utilities/util.dart'; import '../../../../widgets/animated_widgets/rotating_arrows.dart'; +import '../../../../widgets/conditional_parent.dart'; import '../../../../widgets/stack_dialog.dart'; class CancellingTransactionProgressDialog extends StatefulWidget { @@ -28,28 +31,33 @@ class _CancellingTransactionProgressDialogState onWillPop: () async { return false; }, - child: const StackDialog( - title: "Cancelling transaction", - message: "This may take a while. Please do not exit this screen.", - icon: RotatingArrows( - width: 24, - height: 24, + child: ConditionalParent( + condition: Util.isDesktop, + builder: + (child) => Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [SizedBox(width: 400, child: child)], + ), + child: const StackDialog( + title: "Cancelling transaction", + message: "This may take a while. Please do not exit this screen.", + icon: RotatingArrows(width: 24, height: 24), + // rightButton: TextButton( + // style: Theme.of(context).textButtonTheme.style?.copyWith( + // backgroundColor: MaterialStateProperty.all( + // CFColors.buttonGray, + // ), + // ), + // child: Text( + // "Cancel", + // style: STextStyles.itemSubtitle12(context), + // ), + // onPressed: () { + // Navigator.of(context).pop(); + // onCancel.call(); + // }, + // ), ), - // rightButton: TextButton( - // style: Theme.of(context).textButtonTheme.style?.copyWith( - // backgroundColor: MaterialStateProperty.all( - // CFColors.buttonGray, - // ), - // ), - // child: Text( - // "Cancel", - // style: STextStyles.itemSubtitle12(context), - // ), - // onPressed: () { - // Navigator.of(context).pop(); - // onCancel.call(); - // }, - // ), ), ); } diff --git a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart index 7dc810ac8..1e3aa7c72 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -38,6 +38,7 @@ import '../../../wallets/crypto_currency/crypto_currency.dart'; import '../../../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../widgets/background.dart'; import '../../../widgets/conditional_parent.dart'; import '../../../widgets/custom_buttons/app_bar_icon_button.dart'; @@ -99,12 +100,11 @@ class _TransactionDetailsViewState isTokenTx = _transaction.subType == TransactionSubType.ethToken; walletId = widget.walletId; - minConfirms = - ref - .read(pWallets) - .getWallet(widget.walletId) - .cryptoCurrency - .minConfirms; + minConfirms = ref + .read(pWallets) + .getWallet(widget.walletId) + .cryptoCurrency + .minConfirms; coin = widget.coin; amount = _transaction.realAmount; fee = _transaction.fee.toAmountAsRaw(fractionDigits: coin.fractionDigits); @@ -115,12 +115,9 @@ class _TransactionDetailsViewState amountPrefix = _transaction.type == TransactionType.outgoing ? "-" : "+"; } - ethContract = - isTokenTx - ? ref - .read(mainDBProvider) - .getEthContractSync(_transaction.otherData!) - : null; + ethContract = isTokenTx + ? ref.read(mainDBProvider).getEthContractSync(_transaction.otherData!) + : null; unit = isTokenTx ? ethContract!.symbol : coin.ticker; @@ -216,10 +213,9 @@ class _TransactionDetailsViewState .read(addressBookServiceProvider) .contacts .where( - (element) => - element.addresses - .where((element) => element.address == address) - .isNotEmpty, + (element) => element.addresses + .where((element) => element.address == address) + .isNotEmpty, ); if (contacts.isNotEmpty) { return contacts.first.name; @@ -255,8 +251,9 @@ class _TransactionDetailsViewState onChanged: (value) { if (value is bool) { ref - .read(prefsChangeNotifierProvider) - .hideBlockExplorerWarning = value; + .read(prefsChangeNotifierProvider) + .hideBlockExplorerWarning = + value; setState(() {}); } }, @@ -276,10 +273,9 @@ class _TransactionDetailsViewState child: Text( "Cancel", style: STextStyles.button(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), ), @@ -318,8 +314,9 @@ class _TransactionDetailsViewState onChanged: (value) { if (value is bool) { ref - .read(prefsChangeNotifierProvider) - .hideBlockExplorerWarning = value; + .read(prefsChangeNotifierProvider) + .hideBlockExplorerWarning = + value; setState(() {}); } }, @@ -382,10 +379,9 @@ class _TransactionDetailsViewState )) { price = ref.watch( priceAnd24hChangeNotifierProvider.select( - (value) => - isTokenTx - ? value.getTokenPrice(_transaction.otherData!)?.value - : value.getPrice(coin)?.value, + (value) => isTokenTx + ? value.getTokenPrice(_transaction.otherData!)?.value + : value.getPrice(coin)?.value, ), ); } @@ -394,38 +390,36 @@ class _TransactionDetailsViewState condition: !isDesktop, builder: (child) => Background(child: child), child: Scaffold( - backgroundColor: - isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.background, - appBar: - isDesktop - ? null - : AppBar( - backgroundColor: - Theme.of(context).extension()!.background, - leading: AppBarBackButton( - onPressed: () async { - // if (FocusScope.of(context).hasFocus) { - // FocusScope.of(context).unfocus(); - // await Future.delayed(Duration(milliseconds: 50)); - // } - Navigator.of(context).pop(); - }, - ), - title: Text( - "Transaction details", - style: STextStyles.navBarTitle(context), - ), + backgroundColor: isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.background, + appBar: isDesktop + ? null + : AppBar( + backgroundColor: Theme.of( + context, + ).extension()!.background, + leading: AppBarBackButton( + onPressed: () async { + // if (FocusScope.of(context).hasFocus) { + // FocusScope.of(context).unfocus(); + // await Future.delayed(Duration(milliseconds: 50)); + // } + Navigator.of(context).pop(); + }, + ), + title: Text( + "Transaction details", + style: STextStyles.navBarTitle(context), ), + ), body: ConditionalParent( condition: !isDesktop, builder: (child) => SafeArea(child: child), child: Padding( - padding: - isDesktop - ? const EdgeInsets.only(left: 32) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.only(left: 32) + : const EdgeInsets.all(12), child: Column( children: [ if (isDesktop) @@ -441,20 +435,18 @@ class _TransactionDetailsViewState ), Expanded( child: Padding( - padding: - isDesktop - ? const EdgeInsets.only(right: 32, bottom: 32) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.only(right: 32, bottom: 32) + : const EdgeInsets.all(0), child: ConditionalParent( condition: isDesktop, builder: (child) { return RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of( - context, - ).extension()!.backgroundAppBar - : null, + borderColor: isDesktop + ? Theme.of( + context, + ).extension()!.backgroundAppBar + : null, padding: const EdgeInsets.all(0), child: child, ); @@ -462,40 +454,35 @@ class _TransactionDetailsViewState child: SingleChildScrollView( primary: isDesktop ? false : null, child: Padding( - padding: - isDesktop - ? const EdgeInsets.all(0) - : const EdgeInsets.all(4), + padding: isDesktop + ? const EdgeInsets.all(0) + : const EdgeInsets.all(4), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(0) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(0) + : const EdgeInsets.all(12), child: Container( - decoration: - isDesktop - ? BoxDecoration( - color: - Theme.of(context) - .extension()! - .backgroundAppBar, - borderRadius: BorderRadius.vertical( - top: Radius.circular( - Constants - .size - .circularBorderRadius, - ), + decoration: isDesktop + ? BoxDecoration( + color: Theme.of(context) + .extension()! + .backgroundAppBar, + borderRadius: BorderRadius.vertical( + top: Radius.circular( + Constants + .size + .circularBorderRadius, ), - ) - : null, + ), + ) + : null, child: Padding( - padding: - isDesktop - ? const EdgeInsets.all(12) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.all(12) + : const EdgeInsets.all(0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -512,12 +499,12 @@ class _TransactionDetailsViewState SelectableText( _transaction.isCancelled ? coin is Ethereum - ? "Failed" - : "Cancelled" + ? "Failed" + : "Cancelled" : whatIsIt( - _transaction, - currentHeight, - ), + _transaction, + currentHeight, + ), style: STextStyles.desktopTextMedium( context, @@ -526,41 +513,37 @@ class _TransactionDetailsViewState ], ), Column( - crossAxisAlignment: - isDesktop - ? CrossAxisAlignment.end - : CrossAxisAlignment.start, + crossAxisAlignment: isDesktop + ? CrossAxisAlignment.end + : CrossAxisAlignment.start, children: [ SelectableText( "$amountPrefix${ref.watch(pAmountFormatter(coin)).format(amount, ethContract: ethContract)}", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.titleBold12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.titleBold12( + context, + ), ), const SizedBox(height: 2), if (price != null) SelectableText( "$amountPrefix${(amount.decimal * price).toAmount(fractionDigits: 2).fiatString(locale: ref.watch(localeServiceChangeNotifierProvider.select((value) => value.locale)))} ${ref.watch(prefsChangeNotifierProvider.select((value) => value.currency))}", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), ], ), @@ -580,24 +563,20 @@ class _TransactionDetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "Status", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), // Flexible( // child: FittedBox( @@ -606,35 +585,31 @@ class _TransactionDetailsViewState SelectableText( _transaction.isCancelled ? coin is Ethereum - ? "Failed" - : "Cancelled" + ? "Failed" + : "Cancelled" : whatIsIt( - _transaction, - currentHeight, - ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - _transaction.type == - TransactionType - .outgoing - ? Theme.of(context) - .extension< - StackColors - >()! - .accentColorOrange - : Theme.of(context) - .extension< - StackColors - >()! - .accentColorGreen, - ) - : STextStyles.itemSubtitle12( - context, - ), + _transaction, + currentHeight, + ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + _transaction.type == + TransactionType.outgoing + ? Theme.of(context) + .extension< + StackColors + >()! + .accentColorOrange + : Theme.of(context) + .extension< + StackColors + >()! + .accentColorGreen, + ) + : STextStyles.itemSubtitle12(context), ), // ), // ), @@ -657,10 +632,9 @@ class _TransactionDetailsViewState _transaction.subType == TransactionSubType.mint)) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -687,24 +661,19 @@ class _TransactionDetailsViewState if (isDesktop) { showDialog( context: context, - builder: - ( - _, - ) => DesktopDialog( - maxHeight: - double - .infinity, - child: AddressDetailsView( - addressId: - _transaction - .address - .value! - .id, - walletId: - widget - .walletId, - ), - ), + builder: (_) => DesktopDialog( + maxHeight: double + .infinity, + child: AddressDetailsView( + addressId: + _transaction + .address + .value! + .id, + walletId: widget + .walletId, + ), + ), ); } else { Navigator.of( @@ -731,74 +700,70 @@ class _TransactionDetailsViewState TransactionType.outgoing ? "Sent to" : "Receiving address", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), ), const SizedBox(height: 8), _transaction.type == TransactionType.incoming ? FutureBuilder( - future: fetchContactNameFor( - _transaction - .address - .value! - .value, - ), - builder: ( - builderContext, - AsyncSnapshot - snapshot, - ) { - String - addressOrContactName = - _transaction - .address - .value! - .value; - if (snapshot.connectionState == - ConnectionState - .done && - snapshot.hasData) { - addressOrContactName = - snapshot.data!; - } - return SelectableText( - addressOrContactName, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) + future: fetchContactNameFor( + _transaction + .address + .value! + .value, + ), + builder: + ( + builderContext, + AsyncSnapshot + snapshot, + ) { + String + addressOrContactName = + _transaction + .address + .value! + .value; + if (snapshot.connectionState == + ConnectionState + .done && + snapshot + .hasData) { + addressOrContactName = + snapshot.data!; + } + return SelectableText( + addressOrContactName, + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) .extension< StackColors >()! .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), - ); - }, - ) + ) + : STextStyles.itemSubtitle12( + context, + ), + ); + }, + ) : SelectableText( - _transaction - .address - .value! - .value, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + _transaction + .address + .value! + .value, + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( context, ).copyWith( color: @@ -810,10 +775,10 @@ class _TransactionDetailsViewState >()! .textDark, ) - : STextStyles.itemSubtitle12( + : STextStyles.itemSubtitle12( context, ), - ), + ), ], ), ), @@ -831,10 +796,9 @@ class _TransactionDetailsViewState : const SizedBox(height: 12), if (coin is Epiccash) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -848,33 +812,30 @@ class _TransactionDetailsViewState children: [ Text( "On chain note", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), const SizedBox(height: 8), SelectableText( _transaction.otherData ?? "", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -890,10 +851,9 @@ class _TransactionDetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -905,66 +865,67 @@ class _TransactionDetailsViewState (coin is Epiccash) ? "Local Note" : "Note ", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), isDesktop ? IconPencilButton( - onPressed: () { - showDialog( - context: context, - builder: (context) { - return DesktopDialog( - maxWidth: 580, - maxHeight: 360, - child: EditNoteView( - txid: _transaction.txid, - walletId: walletId, - ), - ); - }, - ); - }, - ) + onPressed: () { + showDialog( + context: context, + builder: (context) { + return DesktopDialog( + maxWidth: 580, + maxHeight: 360, + child: EditNoteView( + txid: + _transaction.txid, + walletId: walletId, + ), + ); + }, + ); + }, + ) : GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - EditNoteView.routeName, - arguments: Tuple2( - _transaction.txid, - walletId, - ), - ); - }, - child: Row( - children: [ - SvgPicture.asset( - Assets.svg.pencil, - width: 10, - height: 10, - color: - Theme.of(context) - .extension< - StackColors - >()! - .infoItemIcons, - ), - const SizedBox(width: 4), - Text( - "Edit", - style: STextStyles.link2( - context, + onTap: () { + Navigator.of( + context, + ).pushNamed( + EditNoteView.routeName, + arguments: Tuple2( + _transaction.txid, + walletId, ), - ), - ], + ); + }, + child: Row( + children: [ + SvgPicture.asset( + Assets.svg.pencil, + width: 10, + height: 10, + color: Theme.of(context) + .extension< + StackColors + >()! + .infoItemIcons, + ), + const SizedBox(width: 4), + Text( + "Edit", + style: STextStyles.link2( + context, + ), + ), + ], + ), ), - ), ], ), const SizedBox(height: 8), @@ -978,21 +939,15 @@ class _TransactionDetailsViewState ) ?.value ?? "", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12(context), ), ], ), @@ -1001,10 +956,9 @@ class _TransactionDetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1016,14 +970,13 @@ class _TransactionDetailsViewState children: [ Text( "Date", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), @@ -1032,21 +985,19 @@ class _TransactionDetailsViewState Format.extractDateFrom( _transaction.timestamp, ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1055,21 +1006,17 @@ class _TransactionDetailsViewState Format.extractDateFrom( _transaction.timestamp, ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton( @@ -1086,19 +1033,17 @@ class _TransactionDetailsViewState : const SizedBox(height: 12), if (coin is! NanoCurrency) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Builder( builder: (context) { - final String feeString = - showFeePending - ? _transaction.isConfirmed( - currentHeight, - minConfirms, - ) - ? ref + final String feeString = showFeePending + ? _transaction.isConfirmed( + currentHeight, + minConfirms, + ) + ? ref .watch( pAmountFormatter(coin), ) @@ -1106,13 +1051,13 @@ class _TransactionDetailsViewState fee, withUnitName: isTokenTx, ) - : "Pending" - : ref - .watch(pAmountFormatter(coin)) - .format( - fee, - withUnitName: isTokenTx, - ); + : "Pending" + : ref + .watch(pAmountFormatter(coin)) + .format( + fee, + withUnitName: isTokenTx, + ); return Row( mainAxisAlignment: @@ -1126,58 +1071,52 @@ class _TransactionDetailsViewState children: [ Text( "Transaction fee", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), - ), - if (isDesktop) - const SizedBox(height: 2), - if (isDesktop) + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), + ), + if (isDesktop) + const SizedBox(height: 2), + if (isDesktop) SelectableText( feeString, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), if (!isDesktop) SelectableText( feeString, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: feeString), @@ -1200,9 +1139,9 @@ class _TransactionDetailsViewState widget.coin is Ecash) { height = _transaction.height != null && - _transaction.height! > 0 - ? "${_transaction.height!}" - : "Pending"; + _transaction.height! > 0 + ? "${_transaction.height!}" + : "Pending"; confirmations = confirms.toString(); } else if (widget.coin is Epiccash && _transaction.slateId == null) { @@ -1217,10 +1156,9 @@ class _TransactionDetailsViewState height = "${_transaction.height == 0 ? "Unknown" : _transaction.height}"; } else { - height = - confirms > 0 - ? "${_transaction.height}" - : "Pending"; + height = confirms > 0 + ? "${_transaction.height}" + : "Pending"; } confirmations = confirms.toString(); @@ -1229,10 +1167,9 @@ class _TransactionDetailsViewState return Column( children: [ RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1245,58 +1182,54 @@ class _TransactionDetailsViewState children: [ Text( "Block height", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), if (isDesktop) SelectableText( height, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), if (!isDesktop) SelectableText( height, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: height), @@ -1307,10 +1240,9 @@ class _TransactionDetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1323,58 +1255,54 @@ class _TransactionDetailsViewState children: [ Text( "Confirmations", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), if (isDesktop) SelectableText( confirmations, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), if (!isDesktop) SelectableText( confirmations, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: height), @@ -1391,10 +1319,9 @@ class _TransactionDetailsViewState : const SizedBox(height: 12), if (coin is Ethereum) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1403,32 +1330,25 @@ class _TransactionDetailsViewState children: [ Text( "Nonce", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), SelectableText( _transaction.nonce.toString(), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1439,10 +1359,9 @@ class _TransactionDetailsViewState : const SizedBox(height: 12), if (kDebugMode) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1451,32 +1370,25 @@ class _TransactionDetailsViewState children: [ Text( "Tx sub type", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), SelectableText( _transaction.subType.toString(), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1485,10 +1397,9 @@ class _TransactionDetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: @@ -1501,14 +1412,13 @@ class _TransactionDetailsViewState children: [ Text( "Transaction ID", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), const SizedBox(height: 8), // Flexible( @@ -1517,21 +1427,19 @@ class _TransactionDetailsViewState // child: SelectableText( _transaction.txid, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (coin is! Epiccash) const SizedBox(height: 8), @@ -1569,24 +1477,24 @@ class _TransactionDetailsViewState try { await launchUrl( uri, - mode: - LaunchMode - .externalApplication, + mode: LaunchMode + .externalApplication, ); } catch (_) { if (context.mounted) { unawaited( showDialog( context: context, - builder: - ( - _, - ) => StackOkDialog( - title: - "Could not open in block explorer", - message: - "Failed to open \"${uri.toString()}\"", - ), + builder: (_) => StackOkDialog( + title: + "Could not open in block explorer", + message: + "Failed to open \"${uri.toString()}\"", + maxWidth: + Util.isDesktop + ? 400 + : null, + ), ), ); } @@ -1696,10 +1604,9 @@ class _TransactionDetailsViewState : const SizedBox(height: 12), if (coin is Epiccash) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1712,14 +1619,13 @@ class _TransactionDetailsViewState children: [ Text( "Slate ID", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), // Flexible( // child: FittedBox( @@ -1727,21 +1633,19 @@ class _TransactionDetailsViewState // child: SelectableText( _transaction.slateId ?? "Unknown", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), // ), // ), @@ -1770,105 +1674,155 @@ class _TransactionDetailsViewState ), floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButton: - (coin is Epiccash && - _transaction.getConfirmations(currentHeight) < 1 && - _transaction.isCancelled == false) - ? ConditionalParent( - condition: isDesktop, - builder: - (child) => Padding( - padding: const EdgeInsets.symmetric( - horizontal: 32, - vertical: 16, - ), - child: child, - ), - child: SizedBox( - width: MediaQuery.of(context).size.width - 32, - child: TextButton( - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - Theme.of(context).extension()!.textError, - ), + ((coin is Epiccash || coin is Mimblewimblecoin) && + _transaction.getConfirmations(currentHeight) < 1 && + _transaction.isCancelled == false) + ? ConditionalParent( + condition: isDesktop, + builder: (child) => Padding( + padding: const EdgeInsets.symmetric( + horizontal: 32, + vertical: 16, + ), + child: child, + ), + child: SizedBox( + width: MediaQuery.of(context).size.width - 32, + child: TextButton( + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all( + Theme.of(context).extension()!.textError, ), - onPressed: () async { - final wallet = ref.read(pWallets).getWallet(walletId); - - if (wallet is EpiccashWallet) { - final String? id = _transaction.slateId; - if (id == null) { - unawaited( - showFloatingFlushBar( - type: FlushBarType.warning, - message: "Could not find Epic transaction ID", - context: context, - ), - ); - return; - } + ), + onPressed: () async { + final wallet = ref.read(pWallets).getWallet(walletId); + if (wallet is EpiccashWallet) { + final String? id = _transaction.slateId; + if (id == null) { unawaited( - showDialog( - barrierDismissible: false, + showFloatingFlushBar( + type: FlushBarType.warning, + message: "Could not find Epic transaction ID", context: context, - builder: - (_) => - const CancellingTransactionProgressDialog(), ), ); + return; + } - final result = await wallet - .cancelPendingTransactionAndPost(id); - if (context.mounted) { - // pop progress dialog - Navigator.of(context).pop(); + unawaited( + showDialog( + barrierDismissible: false, + context: context, + builder: (_) => + const CancellingTransactionProgressDialog(), + ), + ); - if (result.isEmpty) { - await showDialog( - context: context, - builder: - (_) => StackOkDialog( - title: "Transaction cancelled", - onOkPressed: (_) { - wallet.refresh(); - Navigator.of(context).popUntil( - ModalRoute.withName( - WalletView.routeName, - ), - ); - }, - ), - ); - } else { - await showDialog( - context: context, - builder: - (_) => StackOkDialog( - title: "Failed to cancel transaction", - message: result, - ), - ); - } + final result = await wallet + .cancelPendingTransactionAndPost(id); + + if (context.mounted) { + // pop progress dialog + Navigator.of(context).pop(); + + if (result.isEmpty) { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Transaction cancelled", + maxWidth: Util.isDesktop ? 400 : null, + onOkPressed: (_) { + Navigator.of(context).popUntil( + ModalRoute.withName(WalletView.routeName), + ); + }, + ), + ); + } else { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Failed to cancel transaction", + message: result, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); } - } else { + } + } else if (wallet is MimblewimblecoinWallet) { + final String? id = _transaction.slateId; + if (id == null) { unawaited( showFloatingFlushBar( type: FlushBarType.warning, - message: "ERROR: Wallet type is not Epic Cash", + message: "Could not find MWC transaction ID", context: context, ), ); return; } - }, - child: Text( - "Cancel Transaction", - style: STextStyles.button(context), - ), + + unawaited( + showDialog( + barrierDismissible: false, + context: context, + builder: (_) => + const CancellingTransactionProgressDialog(), + ), + ); + + final result = await wallet + .cancelPendingTransactionAndPost(id); + + if (context.mounted) { + // pop progress dialog + Navigator.of(context).pop(); + + if (result.isEmpty) { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Transaction cancelled", + maxWidth: Util.isDesktop ? 400 : null, + onOkPressed: (_) { + Navigator.of(context).popUntil( + ModalRoute.withName(WalletView.routeName), + ); + }, + ), + ); + } else { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Failed to cancel transaction", + message: result, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); + } + } + } else { + unawaited( + showFloatingFlushBar( + type: FlushBarType.warning, + message: + "ERROR: Wallet type is not Epic Cash or MimbleWimbleCoin", + context: context, + ), + ); + return; + } + }, + child: Text( + "Cancel Transaction", + style: STextStyles.button(context), ), ), - ) - : null, + ), + ) + : null, ), ); } @@ -1897,8 +1851,9 @@ class IconCopyButton extends StatelessWidget { height: 26, width: 26, child: RawMaterialButton( - fillColor: - Theme.of(context).extension()!.buttonBackSecondary, + fillColor: Theme.of( + context, + ).extension()!.buttonBackSecondary, elevation: 0, hoverElevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), @@ -1938,8 +1893,9 @@ class IconPencilButton extends StatelessWidget { height: 26, width: 26, child: RawMaterialButton( - fillColor: - Theme.of(context).extension()!.buttonBackSecondary, + fillColor: Theme.of( + context, + ).extension()!.buttonBackSecondary, elevation: 0, hoverElevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), diff --git a/lib/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart b/lib/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart index 353264600..356d106f8 100644 --- a/lib/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart +++ b/lib/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart @@ -15,13 +15,12 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; import '../../../../models/isar/models/contact_entry.dart'; import '../../../../models/isar/models/isar_models.dart'; import '../../../../models/transaction_filter.dart'; -import '../../../../providers/db/main_db_provider.dart'; import '../../../../providers/global/address_book_service_provider.dart'; import '../../../../providers/providers.dart'; import '../../../../providers/ui/transaction_filter_provider.dart'; @@ -51,7 +50,7 @@ import '../../../../widgets/textfield_icon_button.dart'; import '../../sub_widgets/tx_icon.dart'; import '../transaction_search_filter_view.dart'; import 'transaction_v2_card.dart'; -import 'transaction_v2_details_view.dart'; +import 'transaction_v2_details_view.dart' as tvd; typedef _GroupedTransactions = ({String label, DateTime startDate, List transactions}); @@ -992,7 +991,7 @@ class _DesktopTransactionCardRowState (context) => DesktopDialog( maxHeight: MediaQuery.of(context).size.height - 64, maxWidth: 580, - child: TransactionV2DetailsView( + child: tvd.TransactionV2DetailsView( transaction: _transaction, coin: coin, walletId: walletId, @@ -1002,7 +1001,7 @@ class _DesktopTransactionCardRowState } else { unawaited( Navigator.of(context).pushNamed( - TransactionV2DetailsView.routeName, + tvd.TransactionV2DetailsView.routeName, arguments: (tx: _transaction, coin: coin, walletId: walletId), ), ); diff --git a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_card.dart b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_card.dart index 3fb0aaaab..a8b30fd5a 100644 --- a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_card.dart +++ b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_card.dart @@ -25,7 +25,7 @@ import '../../../../widgets/coin_ticker_tag.dart'; import '../../../../widgets/conditional_parent.dart'; import '../../../../widgets/desktop/desktop_dialog.dart'; import '../../sub_widgets/tx_icon.dart'; -import 'transaction_v2_details_view.dart'; +import 'transaction_v2_details_view.dart' as tvd; class TransactionCardV2 extends ConsumerStatefulWidget { const TransactionCardV2({super.key, required this.transaction}); @@ -200,7 +200,7 @@ class _TransactionCardStateV2 extends ConsumerState { (context) => DesktopDialog( maxHeight: MediaQuery.of(context).size.height - 64, maxWidth: 580, - child: TransactionV2DetailsView( + child: tvd.TransactionV2DetailsView( transaction: _transaction, coin: coin, walletId: walletId, @@ -210,7 +210,7 @@ class _TransactionCardStateV2 extends ConsumerState { } else { unawaited( Navigator.of(context).pushNamed( - TransactionV2DetailsView.routeName, + tvd.TransactionV2DetailsView.routeName, arguments: (tx: _transaction, coin: coin, walletId: walletId), ), ); diff --git a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart index c2a7e9adf..21d76faaf 100644 --- a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart @@ -16,7 +16,7 @@ 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:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -42,6 +42,7 @@ import '../../../../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../../../../wallets/isar/models/spark_coin.dart'; import '../../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../../../../wallets/wallet/intermediate/lib_salvium_wallet.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/rbf_interface.dart'; @@ -134,36 +135,33 @@ class _TransactionV2DetailsViewState if (mounted) { await showDialog( context: context, - builder: - (context) => DesktopDialog( - maxHeight: null, - maxWidth: 580, - child: Column( - mainAxisSize: MainAxisSize.min, + builder: (context) => DesktopDialog( + maxHeight: null, + maxWidth: 580, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: const EdgeInsets.only(left: 32), - child: Text( - "Boost transaction", - style: STextStyles.desktopH3(context), - ), - ), - const DesktopDialogCloseButton(), - ], - ), - Flexible( - child: SingleChildScrollView( - child: BoostTransactionView( - transaction: _transaction, - ), + Padding( + padding: const EdgeInsets.only(left: 32), + child: Text( + "Boost transaction", + style: STextStyles.desktopH3(context), ), ), + const DesktopDialogCloseButton(), ], ), - ), + Flexible( + child: SingleChildScrollView( + child: BoostTransactionView(transaction: _transaction), + ), + ), + ], + ), + ), ); } } else { @@ -213,8 +211,11 @@ class _TransactionV2DetailsViewState unit = coin.ticker; } - minConfirms = - ref.read(pWallets).getWallet(walletId).cryptoCurrency.minConfirms; + minConfirms = ref + .read(pWallets) + .getWallet(walletId) + .cryptoCurrency + .minConfirms; final fractionDigits = ethContract?.decimals ?? coin.fractionDigits; @@ -244,25 +245,70 @@ class _TransactionV2DetailsViewState ); break; } - data = - _transaction.outputs - .map( - (e) => ( - addresses: e.addresses, - amount: Amount( - rawValue: e.value, - fractionDigits: coin.fractionDigits, - ), - ), - ) - .toList(); + data = _transaction.outputs + .map( + (e) => ( + addresses: e.addresses, + amount: Amount( + rawValue: e.value, + fractionDigits: coin.fractionDigits, + ), + ), + ) + .toList(); } else if (_transaction.subType == TransactionSubType.cashFusion) { amount = _transaction.getAmountReceivedInThisWallet( fractionDigits: fractionDigits, ); - data = - _transaction.outputs - .where((e) => e.walletOwns) + data = _transaction.outputs + .where((e) => e.walletOwns) + .map( + (e) => ( + addresses: e.addresses, + amount: Amount( + rawValue: e.value, + fractionDigits: coin.fractionDigits, + ), + ), + ) + .toList(); + } else if (_transaction.isMimblewimblecoinTransaction) { + switch (_transaction.type) { + case TransactionType.outgoing: + case TransactionType.unknown: + amount = _transaction.getAmountSentFromThisWallet( + fractionDigits: fractionDigits, + subtractFee: coin is! Ethereum, + ); + break; + + case TransactionType.incoming: + case TransactionType.sentToSelf: + amount = _transaction.getAmountReceivedInThisWallet( + fractionDigits: fractionDigits, + ); + break; + } + data = _transaction.outputs + .map( + (e) => ( + addresses: e.addresses, + amount: Amount( + rawValue: e.value, + fractionDigits: coin.fractionDigits, + ), + ), + ) + .toList(); + } else { + switch (_transaction.type) { + case TransactionType.outgoing: + amount = _transaction.getAmountSentFromThisWallet( + fractionDigits: fractionDigits, + subtractFee: coin is! Ethereum, + ); + data = _transaction.outputs + .where((e) => !e.walletOwns) .map( (e) => ( addresses: e.addresses, @@ -273,57 +319,36 @@ class _TransactionV2DetailsViewState ), ) .toList(); - } else { - switch (_transaction.type) { - case TransactionType.outgoing: - amount = _transaction.getAmountSentFromThisWallet( - fractionDigits: fractionDigits, - subtractFee: coin is! Ethereum, - ); - data = - _transaction.outputs - .where((e) => !e.walletOwns) - .map( - (e) => ( - addresses: e.addresses, - amount: Amount( - rawValue: e.value, - fractionDigits: coin.fractionDigits, - ), - ), - ) - .toList(); break; case TransactionType.incoming: case TransactionType.sentToSelf: if (_transaction.subType == TransactionSubType.sparkMint || _transaction.subType == TransactionSubType.sparkSpend) { - _sparkMemo = - ref - .read(mainDBProvider) - .isar - .sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .memoIsNotEmpty() - .and() - .heightEqualTo(_transaction.height) - .anyOf( - _transaction.outputs - .where( - (e) => - e.walletOwns && - e.addresses.isEmpty && - e.scriptPubKeyHex.length >= 488, - ) - .map((e) => e.scriptPubKeyHex.substring(2, 488)) - .toList(), - (q, element) => q.serializedCoinB64StartsWith(element), - ) - .memoProperty() - .findFirstSync(); + _sparkMemo = ref + .read(mainDBProvider) + .isar + .sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .memoIsNotEmpty() + .and() + .heightEqualTo(_transaction.height) + .anyOf( + _transaction.outputs + .where( + (e) => + e.walletOwns && + e.addresses.isEmpty && + e.scriptPubKeyHex.length >= 488, + ) + .map((e) => e.scriptPubKeyHex.substring(2, 488)) + .toList(), + (q, element) => q.serializedCoinB64StartsWith(element), + ) + .memoProperty() + .findFirstSync(); } if (_transaction.subType == TransactionSubType.sparkMint) { @@ -347,19 +372,18 @@ class _TransactionV2DetailsViewState fractionDigits: fractionDigits, ); } - data = - _transaction.outputs - .where((e) => e.walletOwns) - .map( - (e) => ( - addresses: e.addresses, - amount: Amount( - rawValue: e.value, - fractionDigits: coin.fractionDigits, - ), - ), - ) - .toList(); + data = _transaction.outputs + .where((e) => e.walletOwns) + .map( + (e) => ( + addresses: e.addresses, + amount: Amount( + rawValue: e.value, + fractionDigits: coin.fractionDigits, + ), + ), + ) + .toList(); break; case TransactionType.unknown: @@ -367,19 +391,18 @@ class _TransactionV2DetailsViewState fractionDigits: fractionDigits, subtractFee: coin is! Ethereum, ); - data = - _transaction.inputs - .where((e) => e.walletOwns) - .map( - (e) => ( - addresses: e.addresses, - amount: Amount( - rawValue: e.value, - fractionDigits: coin.fractionDigits, - ), - ), - ) - .toList(); + data = _transaction.inputs + .where((e) => e.walletOwns) + .map( + (e) => ( + addresses: e.addresses, + amount: Amount( + rawValue: e.value, + fractionDigits: coin.fractionDigits, + ), + ), + ) + .toList(); break; } } @@ -395,12 +418,11 @@ class _TransactionV2DetailsViewState String whatIsIt(TransactionV2 tx, int height) => tx.statusLabel( currentChainHeight: height, minConfirms: minConfirms, - minCoinbaseConfirms: - ref - .read(pWallets) - .getWallet(walletId) - .cryptoCurrency - .minCoinbaseConfirms, + minCoinbaseConfirms: ref + .read(pWallets) + .getWallet(walletId) + .cryptoCurrency + .minCoinbaseConfirms, ); Future fetchContactNameFor(String address) async { @@ -412,10 +434,9 @@ class _TransactionV2DetailsViewState .read(addressBookServiceProvider) .contacts .where( - (element) => - element.addresses - .where((element) => element.address == address) - .isNotEmpty, + (element) => element.addresses + .where((element) => element.address == address) + .isNotEmpty, ); if (contacts.isNotEmpty) { return contacts.first.name; @@ -451,8 +472,9 @@ class _TransactionV2DetailsViewState onChanged: (value) { if (value is bool) { ref - .read(prefsChangeNotifierProvider) - .hideBlockExplorerWarning = value; + .read(prefsChangeNotifierProvider) + .hideBlockExplorerWarning = + value; setState(() {}); } }, @@ -472,10 +494,9 @@ class _TransactionV2DetailsViewState child: Text( "Cancel", style: STextStyles.button(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), ), @@ -514,8 +535,9 @@ class _TransactionV2DetailsViewState onChanged: (value) { if (value is bool) { ref - .read(prefsChangeNotifierProvider) - .hideBlockExplorerWarning = value; + .read(prefsChangeNotifierProvider) + .hideBlockExplorerWarning = + value; setState(() {}); } }, @@ -598,10 +620,9 @@ class _TransactionV2DetailsViewState )) { price = ref.watch( priceAnd24hChangeNotifierProvider.select( - (value) => - isTokenTx - ? value.getTokenPrice(_transaction.contractAddress!)?.value - : value.getPrice(coin)?.value, + (value) => isTokenTx + ? value.getTokenPrice(_transaction.contractAddress!)?.value + : value.getPrice(coin)?.value, ), ); } @@ -610,38 +631,36 @@ class _TransactionV2DetailsViewState condition: !isDesktop, builder: (child) => Background(child: child), child: Scaffold( - backgroundColor: - isDesktop - ? Colors.transparent - : Theme.of(context).extension()!.background, - appBar: - isDesktop - ? null - : AppBar( - backgroundColor: - Theme.of(context).extension()!.background, - leading: AppBarBackButton( - onPressed: () async { - // if (FocusScope.of(context).hasFocus) { - // FocusScope.of(context).unfocus(); - // await Future.delayed(Duration(milliseconds: 50)); - // } - Navigator.of(context).pop(); - }, - ), - title: Text( - "Transaction details", - style: STextStyles.navBarTitle(context), - ), + backgroundColor: isDesktop + ? Colors.transparent + : Theme.of(context).extension()!.background, + appBar: isDesktop + ? null + : AppBar( + backgroundColor: Theme.of( + context, + ).extension()!.background, + leading: AppBarBackButton( + onPressed: () async { + // if (FocusScope.of(context).hasFocus) { + // FocusScope.of(context).unfocus(); + // await Future.delayed(Duration(milliseconds: 50)); + // } + Navigator.of(context).pop(); + }, + ), + title: Text( + "Transaction details", + style: STextStyles.navBarTitle(context), ), + ), body: ConditionalParent( condition: !isDesktop, builder: (child) => SafeArea(child: child), child: Padding( - padding: - isDesktop - ? const EdgeInsets.only(left: 32) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.only(left: 32) + : const EdgeInsets.all(12), child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -658,20 +677,18 @@ class _TransactionV2DetailsViewState ), Flexible( child: Padding( - padding: - isDesktop - ? const EdgeInsets.only(right: 32, bottom: 32) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.only(right: 32, bottom: 32) + : const EdgeInsets.all(0), child: ConditionalParent( condition: isDesktop, builder: (child) { return RoundedWhiteContainer( - borderColor: - isDesktop - ? Theme.of( - context, - ).extension()!.backgroundAppBar - : null, + borderColor: isDesktop + ? Theme.of( + context, + ).extension()!.backgroundAppBar + : null, padding: const EdgeInsets.all(0), child: child, ); @@ -679,41 +696,36 @@ class _TransactionV2DetailsViewState child: SingleChildScrollView( primary: isDesktop ? false : null, child: Padding( - padding: - isDesktop - ? const EdgeInsets.all(0) - : const EdgeInsets.all(4), + padding: isDesktop + ? const EdgeInsets.all(0) + : const EdgeInsets.all(4), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(0) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(0) + : const EdgeInsets.all(12), child: Container( - decoration: - isDesktop - ? BoxDecoration( - color: - Theme.of(context) - .extension()! - .backgroundAppBar, - borderRadius: BorderRadius.vertical( - top: Radius.circular( - Constants - .size - .circularBorderRadius, - ), + decoration: isDesktop + ? BoxDecoration( + color: Theme.of(context) + .extension()! + .backgroundAppBar, + borderRadius: BorderRadius.vertical( + top: Radius.circular( + Constants + .size + .circularBorderRadius, ), - ) - : null, + ), + ) + : null, child: Padding( - padding: - isDesktop - ? const EdgeInsets.all(12) - : const EdgeInsets.all(0), + padding: isDesktop + ? const EdgeInsets.all(12) + : const EdgeInsets.all(0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -740,28 +752,25 @@ class _TransactionV2DetailsViewState ], ), Column( - crossAxisAlignment: - isDesktop - ? CrossAxisAlignment.end - : CrossAxisAlignment.start, + crossAxisAlignment: isDesktop + ? CrossAxisAlignment.end + : CrossAxisAlignment.start, children: [ SelectableText( "$amountPrefix${ref.watch(pAmountFormatter(coin)).format(amount, ethContract: ethContract)}", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.titleBold12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.titleBold12( + context, + ), ), const SizedBox(height: 2), if (price != null) @@ -777,9 +786,8 @@ class _TransactionV2DetailsViewState locale: ref.watch( localeServiceChangeNotifierProvider .select( - (value) => - value - .locale, + (value) => value + .locale, ), ), ); @@ -792,14 +800,13 @@ class _TransactionV2DetailsViewState ); return SelectableText( "$amountPrefix$formatted $ticker", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ); }, ), @@ -821,24 +828,20 @@ class _TransactionV2DetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "Status", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), // Flexible( // child: FittedBox( @@ -846,33 +849,29 @@ class _TransactionV2DetailsViewState // child: SelectableText( whatIsIt(_transaction, currentHeight), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - _transaction.type == - TransactionType - .outgoing && - _transaction - .subType != - TransactionSubType - .cashFusion - ? Theme.of(context) - .extension< - StackColors - >()! - .accentColorOrange - : Theme.of(context) - .extension< - StackColors - >()! - .accentColorGreen, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + _transaction.type == + TransactionType + .outgoing && + _transaction.subType != + TransactionSubType + .cashFusion + ? Theme.of(context) + .extension< + StackColors + >()! + .accentColorOrange + : Theme.of(context) + .extension< + StackColors + >()! + .accentColorGreen, + ) + : STextStyles.itemSubtitle12(context), ), // ), // ), @@ -895,10 +894,9 @@ class _TransactionV2DetailsViewState _transaction.subType == TransactionSubType.mint)) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -965,14 +963,13 @@ class _TransactionV2DetailsViewState }, child: Text( outputLabel, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), ), const SizedBox(height: 8), @@ -993,45 +990,43 @@ class _TransactionV2DetailsViewState .addresses .first, ), - builder: ( - builderContext, - AsyncSnapshot - snapshot, - ) { - String - addressOrContactName = - data - .first - .addresses - .first; - if (snapshot.connectionState == - ConnectionState - .done && - snapshot.hasData) { - addressOrContactName = - snapshot.data!; - } - return SelectableText( - addressOrContactName, - style: - isDesktop + builder: + ( + builderContext, + AsyncSnapshot + snapshot, + ) { + String + addressOrContactName = + data + .first + .addresses + .first; + if (snapshot.connectionState == + ConnectionState + .done && + snapshot + .hasData) { + addressOrContactName = + snapshot.data!; + } + return SelectableText( + addressOrContactName, + style: isDesktop ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) : STextStyles.itemSubtitle12( - context, - ), - ); - }, + context, + ), + ); + }, ) else for ( @@ -1041,16 +1036,15 @@ class _TransactionV2DetailsViewState ) ConditionalParent( condition: i > 0, - builder: - (child) => Column( - crossAxisAlignment: - CrossAxisAlignment - .stretch, - children: [ - const _Divider(), - child, - ], - ), + builder: (child) => Column( + crossAxisAlignment: + CrossAxisAlignment + .stretch, + children: [ + const _Divider(), + child, + ], + ), child: Padding( padding: const EdgeInsets.all( @@ -1069,37 +1063,36 @@ class _TransactionV2DetailsViewState fetchContactNameFor( e, ), - builder: ( - builderContext, - AsyncSnapshot< - String - > - snapshot, - ) { - final String - addressOrContactName; - if (snapshot.connectionState == - ConnectionState - .done && - snapshot - .hasData) { - addressOrContactName = - snapshot - .data!; - } else { - addressOrContactName = - e; - } - - return OutputCard( - address: - addressOrContactName, - amount: - data[i] - .amount, - coin: coin, - ); - }, + builder: + ( + builderContext, + AsyncSnapshot< + String + > + snapshot, + ) { + final String + addressOrContactName; + if (snapshot.connectionState == + ConnectionState.done && + snapshot + .hasData) { + addressOrContactName = + snapshot.data!; + } else { + addressOrContactName = + e; + } + + return OutputCard( + address: + addressOrContactName, + amount: + data[i].amount, + coin: + coin, + ); + }, ); }), ], @@ -1118,16 +1111,15 @@ class _TransactionV2DetailsViewState ], ), ), - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) isDesktop ? const _Divider() : const SizedBox(height: 12), - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1141,33 +1133,30 @@ class _TransactionV2DetailsViewState children: [ Text( "On chain note", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), const SizedBox(height: 8), SelectableText( _transaction.onChainNote ?? "", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1183,10 +1172,9 @@ class _TransactionV2DetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -1195,101 +1183,99 @@ class _TransactionV2DetailsViewState MainAxisAlignment.spaceBetween, children: [ Text( - (coin is Epiccash) + (coin is Epiccash || + coin is Mimblewimblecoin) ? "Local Note" : "Note ", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), isDesktop ? IconPencilButton( - onPressed: () { - showDialog( - context: context, - builder: (context) { - return DesktopDialog( - maxWidth: 580, - maxHeight: 360, - child: EditNoteView( - txid: _transaction.txid, - walletId: walletId, - ), - ); - }, - ); - }, - ) + onPressed: () { + showDialog( + context: context, + builder: (context) { + return DesktopDialog( + maxWidth: 580, + maxHeight: 360, + child: EditNoteView( + txid: + _transaction.txid, + walletId: walletId, + ), + ); + }, + ); + }, + ) : GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - EditNoteView.routeName, - arguments: Tuple2( - _transaction.txid, - walletId, - ), - ); - }, - child: Row( - children: [ - SvgPicture.asset( - Assets.svg.pencil, - width: 10, - height: 10, - color: - Theme.of(context) - .extension< - StackColors - >()! - .infoItemIcons, - ), - const SizedBox(width: 4), - Text( - "Edit", - style: STextStyles.link2( - context, + onTap: () { + Navigator.of( + context, + ).pushNamed( + EditNoteView.routeName, + arguments: Tuple2( + _transaction.txid, + walletId, ), - ), - ], - ), - ), - ], - ), + ); + }, + child: Row( + children: [ + SvgPicture.asset( + Assets.svg.pencil, + width: 10, + height: 10, + color: Theme.of(context) + .extension< + StackColors + >()! + .infoItemIcons, + ), + const SizedBox(width: 4), + Text( + "Edit", + style: STextStyles.link2( + context, + ), + ), + ], + ), + ), + ], + ), const SizedBox(height: 8), SelectableText( ref .watch( pTransactionNote(( txid: - (coin is Epiccash) - ? _transaction.slateId - .toString() - : _transaction.txid, + (coin is Epiccash || + coin + is Mimblewimblecoin) + ? _transaction.slateId + .toString() + : _transaction.txid, walletId: walletId, )), ) ?.value ?? "", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12(context), ), ], ), @@ -1300,10 +1286,9 @@ class _TransactionV2DetailsViewState : const SizedBox(height: 12), if (_sparkMemo != null) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -1312,35 +1297,30 @@ class _TransactionV2DetailsViewState children: [ Text( "Memo", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), ], ), const SizedBox(height: 8), SelectableText( _sparkMemo!, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1349,10 +1329,9 @@ class _TransactionV2DetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1364,14 +1343,13 @@ class _TransactionV2DetailsViewState children: [ Text( "Date", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), @@ -1380,21 +1358,19 @@ class _TransactionV2DetailsViewState Format.extractDateFrom( _transaction.timestamp, ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1403,21 +1379,17 @@ class _TransactionV2DetailsViewState Format.extractDateFrom( _transaction.timestamp, ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton( @@ -1440,28 +1412,26 @@ class _TransactionV2DetailsViewState _transaction.type == TransactionType.incoming)) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Builder( builder: (context) { - final String feeString = - showFeePending - ? _transaction.isConfirmed( - currentHeight, - minConfirms, - coin.minCoinbaseConfirms, - ) - ? ref + final String feeString = showFeePending + ? _transaction.isConfirmed( + currentHeight, + minConfirms, + coin.minCoinbaseConfirms, + ) + ? ref .watch( pAmountFormatter(coin), ) .format(fee) - : "Pending" - : ref - .watch(pAmountFormatter(coin)) - .format(fee); + : "Pending" + : ref + .watch(pAmountFormatter(coin)) + .format(fee); return Row( mainAxisAlignment: @@ -1475,37 +1445,33 @@ class _TransactionV2DetailsViewState children: [ Text( "Transaction fee", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), if (isDesktop) SelectableText( feeString, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (supportsRbf && !confirmedTxn) const SizedBox(height: 8), @@ -1519,21 +1485,19 @@ class _TransactionV2DetailsViewState if (!isDesktop) SelectableText( feeString, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: feeString), @@ -1556,9 +1520,9 @@ class _TransactionV2DetailsViewState widget.coin is Ecash) { height = _transaction.height != null && - _transaction.height! > 0 - ? "${_transaction.height!}" - : "Pending"; + _transaction.height! > 0 + ? "${_transaction.height!}" + : "Pending"; confirmations = confirms.toString(); } else if (widget.coin is Epiccash && _transaction.slateId == null) { @@ -1574,10 +1538,9 @@ class _TransactionV2DetailsViewState height = "${_transaction.height == 0 ? "Unknown" : _transaction.height}"; } else { - height = - confirms > 0 - ? "${_transaction.height}" - : "Pending"; + height = confirms > 0 + ? "${_transaction.height}" + : "Pending"; } confirmations = confirms.toString(); @@ -1586,10 +1549,9 @@ class _TransactionV2DetailsViewState return Column( children: [ RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1602,58 +1564,54 @@ class _TransactionV2DetailsViewState children: [ Text( "Block height", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), if (isDesktop) SelectableText( height, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), if (!isDesktop) SelectableText( height, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: height), @@ -1664,10 +1622,9 @@ class _TransactionV2DetailsViewState ? const _Divider() : const SizedBox(height: 12), RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -1680,58 +1637,54 @@ class _TransactionV2DetailsViewState children: [ Text( "Confirmations", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), if (isDesktop) const SizedBox(height: 2), if (isDesktop) SelectableText( confirmations, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: + Theme.of( + context, + ) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), if (!isDesktop) SelectableText( confirmations, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), if (isDesktop) IconCopyButton(data: height), @@ -1750,10 +1703,9 @@ class _TransactionV2DetailsViewState if (coin is Ethereum && _transaction.type != TransactionType.incoming) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1762,32 +1714,72 @@ class _TransactionV2DetailsViewState children: [ Text( "Nonce", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), SelectableText( _transaction.nonce.toString(), - style: - isDesktop + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), + ), + ], + ), + ), + if (coin is Salvium && + _transaction.salviumTypeString != null) + isDesktop + ? const _Divider() + : const SizedBox(height: 12), + if (coin is Salvium && + _transaction.salviumTypeString != null) + RoundedWhiteContainer( + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + "Type", + style: isDesktop ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + context, + ) + : STextStyles.itemSubtitle( + context, + ), + ), + ], + ), + const SizedBox(height: 8), + SelectableText( + _transaction.salviumTypeString!, + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1797,11 +1789,10 @@ class _TransactionV2DetailsViewState ? const _Divider() : const SizedBox(height: 12), if (kDebugMode) - RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + RoundedWhiteContainer( + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1810,32 +1801,25 @@ class _TransactionV2DetailsViewState children: [ Text( "Tx sub type", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle(context), ), SelectableText( _transaction.subType.toString(), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), ], ), @@ -1857,58 +1841,54 @@ class _TransactionV2DetailsViewState _transaction.subType == TransactionSubType.mweb ? RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ConditionalParent( - condition: !isDesktop, - builder: - (child) => Row( - children: [ - Expanded(child: child), - SimpleCopyButton( - data: _transaction - .txid - .replaceFirst( - "mweb_outputId_", - "", - ), - ), - ], - ), - child: Text( - "MWEB Output ID", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + ConditionalParent( + condition: !isDesktop, + builder: (child) => Row( + children: [ + Expanded(child: child), + SimpleCopyButton( + data: _transaction.txid + .replaceFirst( + "mweb_outputId_", + "", + ), + ), + ], + ), + child: Text( + "MWEB Output ID", + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( context, ) - : STextStyles.itemSubtitle( + : STextStyles.itemSubtitle( context, ), + ), ), - ), - const SizedBox(height: 8), - SelectableText( - _transaction.txid.replaceFirst( - "mweb_outputId_", - "", - ), - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + const SizedBox(height: 8), + SelectableText( + _transaction.txid + .replaceFirst( + "mweb_outputId_", + "", + ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( context, ).copyWith( color: @@ -1918,142 +1898,137 @@ class _TransactionV2DetailsViewState >()! .textDark, ) - : STextStyles.itemSubtitle12( + : STextStyles.itemSubtitle12( context, ), - ), - // if (coin is Litecoin && - // coin.network == - // CryptoCurrencyNetwork - // .main) - // const SizedBox(height: 8), - // if (coin is Litecoin && - // coin.network == - // CryptoCurrencyNetwork - // .main) - // CustomTextButton( - // text: - // "Open in block explorer", - // onTap: () async { - // final uri = - // getBlockExplorerTransactionUrlFor( - // coin: coin, - // txid: _transaction - // .txid - // .replaceFirst( - // "mweb_outputId_", - // "", - // ), - // ); - // - // if (ref - // .read( - // prefsChangeNotifierProvider, - // ) - // .hideBlockExplorerWarning == - // false) { - // final shouldContinue = - // await showExplorerWarning( - // "${uri.scheme}://${uri.host}", - // ); - // - // if (!shouldContinue) { - // return; - // } - // } - // try { - // await launchUrl( - // uri, - // mode: - // LaunchMode - // .externalApplication, - // ); - // } catch (_) { - // if (context.mounted) { - // unawaited( - // showDialog( - // context: context, - // builder: - // ( - // _, - // ) => StackOkDialog( - // title: - // "Could not open in block explorer", - // message: - // "Failed to open \"${uri.toString()}\"", - // ), - // ), - // ); - // } - // } - // }, - // ), - ], - ), - ), - if (isDesktop) - const SizedBox(width: 12), - if (isDesktop) - IconCopyButton( - data: _transaction.txid - .replaceFirst( - "mweb_outputId_", - "", ), + // if (coin is Litecoin && + // coin.network == + // CryptoCurrencyNetwork + // .main) + // const SizedBox(height: 8), + // if (coin is Litecoin && + // coin.network == + // CryptoCurrencyNetwork + // .main) + // CustomTextButton( + // text: + // "Open in block explorer", + // onTap: () async { + // final uri = + // getBlockExplorerTransactionUrlFor( + // coin: coin, + // txid: _transaction + // .txid + // .replaceFirst( + // "mweb_outputId_", + // "", + // ), + // ); + // + // if (ref + // .read( + // prefsChangeNotifierProvider, + // ) + // .hideBlockExplorerWarning == + // false) { + // final shouldContinue = + // await showExplorerWarning( + // "${uri.scheme}://${uri.host}", + // ); + // + // if (!shouldContinue) { + // return; + // } + // } + // try { + // await launchUrl( + // uri, + // mode: + // LaunchMode + // .externalApplication, + // ); + // } catch (_) { + // if (context.mounted) { + // unawaited( + // showDialog( + // context: context, + // builder: + // ( + // _, + // ) => StackOkDialog( + // title: + // "Could not open in block explorer", + // message: + // "Failed to open \"${uri.toString()}\"", + // ), + // ), + // ); + // } + // } + // }, + // ), + ], + ), ), - ], - ), - ) + if (isDesktop) + const SizedBox(width: 12), + if (isDesktop) + IconCopyButton( + data: _transaction.txid + .replaceFirst( + "mweb_outputId_", + "", + ), + ), + ], + ), + ) : RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ConditionalParent( - condition: !isDesktop, - builder: - (child) => Row( - children: [ - Expanded(child: child), - SimpleCopyButton( - data: - _transaction.txid, - ), - ], - ), - child: Text( - "Transaction ID", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + ConditionalParent( + condition: !isDesktop, + builder: (child) => Row( + children: [ + Expanded(child: child), + SimpleCopyButton( + data: _transaction.txid, + ), + ], + ), + child: Text( + "Transaction ID", + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( context, ) - : STextStyles.itemSubtitle( + : STextStyles.itemSubtitle( context, ), + ), ), - ), - const SizedBox(height: 8), - // Flexible( - // child: FittedBox( - // fit: BoxFit.scaleDown, - // child: - SelectableText( - _transaction.txid, - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + const SizedBox(height: 8), + // Flexible( + // child: FittedBox( + // fit: BoxFit.scaleDown, + // child: + SelectableText( + _transaction.txid, + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( context, ).copyWith( color: @@ -2063,95 +2038,97 @@ class _TransactionV2DetailsViewState >()! .textDark, ) - : STextStyles.itemSubtitle12( + : STextStyles.itemSubtitle12( context, ), - ), - if (coin is! Epiccash) - const SizedBox(height: 8), - if (coin is! Epiccash) - CustomTextButton( - text: - "Open in block explorer", - onTap: () async { - final uri = - getBlockExplorerTransactionUrlFor( - coin: coin, - txid: - _transaction.txid, - ); - - if (ref - .read( - prefsChangeNotifierProvider, - ) - .hideBlockExplorerWarning == - false) { - final shouldContinue = - await showExplorerWarning( - "${uri.scheme}://${uri.host}", + ), + if (coin is! Epiccash && + coin is! Mimblewimblecoin) + const SizedBox(height: 8), + if (coin is! Epiccash && + coin is! Mimblewimblecoin) + CustomTextButton( + text: + "Open in block explorer", + onTap: () async { + final uri = + getBlockExplorerTransactionUrlFor( + coin: coin, + txid: _transaction + .txid, ); - if (!shouldContinue) { - return; + if (ref + .read( + prefsChangeNotifierProvider, + ) + .hideBlockExplorerWarning == + false) { + final shouldContinue = + await showExplorerWarning( + "${uri.scheme}://${uri.host}", + ); + + if (!shouldContinue) { + return; + } } - } - - // ref - // .read( - // shouldShowLockscreenOnResumeStateProvider - // .state) - // .state = false; - try { - await launchUrl( - uri, - mode: - LaunchMode - .externalApplication, - ); - } catch (_) { - if (context.mounted) { - unawaited( - showDialog( - context: context, - builder: - ( - _, - ) => StackOkDialog( - title: - "Could not open in block explorer", - message: - "Failed to open \"${uri.toString()}\"", - ), - ), + + // ref + // .read( + // shouldShowLockscreenOnResumeStateProvider + // .state) + // .state = false; + try { + await launchUrl( + uri, + mode: LaunchMode + .externalApplication, ); + } catch (_) { + if (context.mounted) { + unawaited( + showDialog( + context: context, + builder: (_) => StackOkDialog( + title: + "Could not open in block explorer", + message: + "Failed to open \"${uri.toString()}\"", + maxWidth: + Util.isDesktop + ? 400 + : null, + ), + ), + ); + } + } finally { + // Future.delayed( + // const Duration(seconds: 1), + // () => ref + // .read( + // shouldShowLockscreenOnResumeStateProvider + // .state) + // .state = true, + // ); } - } finally { - // Future.delayed( - // const Duration(seconds: 1), - // () => ref - // .read( - // shouldShowLockscreenOnResumeStateProvider - // .state) - // .state = true, - // ); - } - }, - ), - // ), - // ), - ], - ), - ), - if (isDesktop) - const SizedBox(width: 12), - if (isDesktop) - IconCopyButton( - data: _transaction.txid, + }, + ), + // ), + // ), + ], + ), ), - ], + if (isDesktop) + const SizedBox(width: 12), + if (isDesktop) + IconCopyButton( + data: _transaction.txid, + ), + ], + ), ), - ), // if ((coin is FiroTestNet || coin is Firo) && // _transaction.subType == "mint") // const SizedBox( @@ -2229,16 +2206,15 @@ class _TransactionV2DetailsViewState // ], // ), // ), - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) isDesktop ? const _Divider() : const SizedBox(height: 12), - if (coin is Epiccash) + if (coin is Epiccash || coin is Mimblewimblecoin) RoundedWhiteContainer( - padding: - isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -2251,14 +2227,13 @@ class _TransactionV2DetailsViewState children: [ Text( "Slate ID", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ) - : STextStyles.itemSubtitle( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ) + : STextStyles.itemSubtitle( + context, + ), ), // Flexible( // child: FittedBox( @@ -2266,21 +2241,19 @@ class _TransactionV2DetailsViewState // child: SelectableText( _transaction.slateId ?? "Unknown", - style: - isDesktop - ? STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .textDark, - ) - : STextStyles.itemSubtitle12( - context, - ), + style: isDesktop + ? STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context, + ), ), // ), // ), @@ -2313,111 +2286,165 @@ class _TransactionV2DetailsViewState ), ), ), + if ((coin is Epiccash || coin is Mimblewimblecoin) && + _transaction.getConfirmations(currentHeight) < 1 && + _transaction.isCancelled == false) + const SizedBox(height: 40), ], ), ), ), floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButton: - (coin is Epiccash && - _transaction.getConfirmations(currentHeight) < 1 && - _transaction.isCancelled == false) - ? ConditionalParent( - condition: isDesktop, - builder: - (child) => Padding( - padding: const EdgeInsets.symmetric( - horizontal: 32, - vertical: 16, - ), - child: child, - ), - child: SizedBox( - width: MediaQuery.of(context).size.width - 32, - child: TextButton( - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - Theme.of(context).extension()!.textError, - ), + ((coin is Epiccash || coin is Mimblewimblecoin) && + _transaction.getConfirmations(currentHeight) < 1 && + _transaction.isCancelled == false) + ? ConditionalParent( + condition: isDesktop, + builder: (child) => Padding( + padding: const EdgeInsets.symmetric( + horizontal: 32, + vertical: 16, + ), + child: child, + ), + child: SizedBox( + width: MediaQuery.of(context).size.width - 32, + child: TextButton( + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all( + Theme.of(context).extension()!.textError, ), - onPressed: () async { - final wallet = ref.read(pWallets).getWallet(walletId); - - if (wallet is EpiccashWallet) { - final String? id = _transaction.slateId; - if (id == null) { - unawaited( - showFloatingFlushBar( - type: FlushBarType.warning, - message: "Could not find Epic transaction ID", - context: context, - ), - ); - return; - } + ), + onPressed: () async { + final wallet = ref.read(pWallets).getWallet(walletId); + if (wallet is EpiccashWallet) { + final String? id = _transaction.slateId; + if (id == null) { unawaited( - showDialog( - barrierDismissible: false, + showFloatingFlushBar( + type: FlushBarType.warning, + message: "Could not find Epic transaction ID", context: context, - builder: - (_) => - const CancellingTransactionProgressDialog(), ), ); + return; + } - final result = await wallet - .cancelPendingTransactionAndPost(id); - if (context.mounted) { - // pop progress dialog - Navigator.of(context).pop(); - - if (result.isEmpty) { - await showDialog( - context: context, - builder: - (_) => StackOkDialog( - title: "Transaction cancelled", - onOkPressed: (_) { - wallet.refresh(); - Navigator.of(context).popUntil( - ModalRoute.withName( - WalletView.routeName, - ), - ); - }, - ), - ); - } else { - await showDialog( - context: context, - builder: - (_) => StackOkDialog( - title: "Failed to cancel transaction", - message: result, - ), - ); - } + unawaited( + showDialog( + barrierDismissible: false, + context: context, + builder: (_) => + const CancellingTransactionProgressDialog(), + ), + ); + + final result = await wallet + .cancelPendingTransactionAndPost(id); + if (context.mounted) { + // Pop progress dialog. + Navigator.of(context).pop(); + + if (result.isEmpty) { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Transaction cancelled", + onOkPressed: (_) { + Navigator.of(context).popUntil( + ModalRoute.withName(WalletView.routeName), + ); + }, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); + unawaited(wallet.refresh()); + } else { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Failed to cancel transaction", + message: result, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); } - } else { + } + } else if (wallet is MimblewimblecoinWallet) { + final String? id = _transaction.slateId; + if (id == null) { unawaited( showFloatingFlushBar( type: FlushBarType.warning, - message: "ERROR: Wallet type is not Epic Cash", + message: "Could not find MWC transaction ID", context: context, ), ); return; } - }, - child: Text( - "Cancel Transaction", - style: STextStyles.button(context), - ), + + unawaited( + showDialog( + barrierDismissible: false, + context: context, + builder: (_) => + const CancellingTransactionProgressDialog(), + ), + ); + + final result = await wallet + .cancelPendingTransactionAndPost(id); + if (context.mounted) { + // pop progress dialog + Navigator.of(context).pop(); + + if (result.isEmpty) { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Transaction cancelled", + onOkPressed: (_) { + Navigator.of(context).popUntil( + ModalRoute.withName(WalletView.routeName), + ); + }, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); + unawaited(wallet.refresh()); + } else { + await showDialog( + context: context, + builder: (_) => StackOkDialog( + title: "Failed to cancel transaction", + message: result, + maxWidth: Util.isDesktop ? 400 : null, + ), + ); + } + } + } else { + unawaited( + showFloatingFlushBar( + type: FlushBarType.warning, + message: + "ERROR: Wallet type is not Epic Cash or MimbleWimbleCoin", + context: context, + ), + ); + return; + } + }, + child: Text( + "Cancel Transaction", + style: STextStyles.button(context), ), ), - ) - : null, + ), + ) + : null, ), ); } @@ -2442,19 +2469,17 @@ class OutputCard extends ConsumerWidget { children: [ Text( "Address", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.itemSubtitle(context), + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.itemSubtitle(context), ), SelectableText( address, - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context).copyWith( - color: Theme.of(context).extension()!.textDark, - ) - : STextStyles.itemSubtitle12(context), + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context).copyWith( + color: Theme.of(context).extension()!.textDark, + ) + : STextStyles.itemSubtitle12(context), ), const SizedBox(height: 10), Row( @@ -2462,24 +2487,19 @@ class OutputCard extends ConsumerWidget { children: [ Text( "Amount", - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall(context) - : STextStyles.itemSubtitle(context), + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context) + : STextStyles.itemSubtitle(context), ), SelectableText( ref.watch(pAmountFormatter(coin)).format(amount), - style: - Util.isDesktop - ? STextStyles.desktopTextExtraExtraSmall( + style: Util.isDesktop + ? STextStyles.desktopTextExtraExtraSmall(context).copyWith( + color: Theme.of( context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textDark, - ) - : STextStyles.itemSubtitle12(context), + ).extension()!.textDark, + ) + : STextStyles.itemSubtitle12(context), ), ], ), @@ -2511,8 +2531,9 @@ class IconCopyButton extends StatelessWidget { height: 26, width: 26, child: RawMaterialButton( - fillColor: - Theme.of(context).extension()!.buttonBackSecondary, + fillColor: Theme.of( + context, + ).extension()!.buttonBackSecondary, elevation: 0, hoverElevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), @@ -2552,8 +2573,9 @@ class IconPencilButton extends StatelessWidget { height: 26, width: 26, child: RawMaterialButton( - fillColor: - Theme.of(context).extension()!.buttonBackSecondary, + fillColor: Theme.of( + context, + ).extension()!.buttonBackSecondary, elevation: 0, hoverElevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), diff --git a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart index b805cd819..9acb8b705 100644 --- a/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart +++ b/lib/pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../models/isar/models/blockchain_data/transaction.dart'; import '../../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; @@ -29,10 +29,7 @@ import 'fusion_tx_group_card.dart'; import 'transaction_v2_list_item.dart'; class TransactionsV2List extends ConsumerStatefulWidget { - const TransactionsV2List({ - super.key, - required this.walletId, - }); + const TransactionsV2List({super.key, required this.walletId}); final String walletId; @@ -50,48 +47,39 @@ class _TransactionsV2ListState extends ConsumerState { BorderRadius get _borderRadiusFirst { return BorderRadius.only( - topLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - topRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + topLeft: Radius.circular(Constants.size.circularBorderRadius), + topRight: Radius.circular(Constants.size.circularBorderRadius), ); } BorderRadius get _borderRadiusLast { return BorderRadius.only( - bottomLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - bottomRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + bottomLeft: Radius.circular(Constants.size.circularBorderRadius), + bottomRight: Radius.circular(Constants.size.circularBorderRadius), ); } @override void initState() { coin = ref.read(pWallets).getWallet(widget.walletId).info.coin; - _query = - ref.read(mainDBProvider).isar.transactionV2s.buildQuery( - whereClauses: [ - IndexWhereClause.equalTo( - indexName: 'walletId', - value: [widget.walletId], - ), - ], - filter: ref + _query = ref + .read(mainDBProvider) + .isar + .transactionV2s + .buildQuery( + whereClauses: [ + IndexWhereClause.equalTo( + indexName: 'walletId', + value: [widget.walletId], + ), + ], + filter: + ref .read(pWallets) .getWallet(widget.walletId) .transactionFilterOperation, - sortBy: [ - const SortProperty( - property: "timestamp", - sort: Sort.desc, - ), - ], - ); + sortBy: [const SortProperty(property: "timestamp", sort: Sort.desc)], + ); _subscription = _query.watch().listen((event) { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -124,15 +112,8 @@ class _TransactionsV2ListState extends ConsumerState { return const Column( children: [ Spacer(), - Center( - child: LoadingIndicator( - height: 50, - width: 50, - ), - ), - Spacer( - flex: 4, - ), + Center(child: LoadingIndicator(height: 50, width: 50)), + Spacer(flex: 4), ], ); } @@ -159,8 +140,9 @@ class _TransactionsV2ListState extends ConsumerState { final prevTime = DateTime.fromMillisecondsSinceEpoch( fusions.last.timestamp * 1000, ); - final thisTime = - DateTime.fromMillisecondsSinceEpoch(tx.timestamp * 1000); + final thisTime = DateTime.fromMillisecondsSinceEpoch( + tx.timestamp * 1000, + ); if (prevTime.difference(thisTime).inMinutes > 30) { _txns.add(FusionTxGroup(fusions)); @@ -190,76 +172,66 @@ class _TransactionsV2ListState extends ConsumerState { onRefresh: () async { await ref.read(pWallets).getWallet(widget.walletId).refresh(); }, - child: Util.isDesktop - ? ListView.separated( - shrinkWrap: true, - itemBuilder: (context, index) { - BorderRadius? radius; - if (_txns.length == 1) { - radius = BorderRadius.circular( - Constants.size.circularBorderRadius, - ); - } else if (index == _txns.length - 1) { - radius = _borderRadiusLast; - } else if (index == 0) { - radius = _borderRadiusFirst; - } - final tx = _txns[index]; - return TxListItem( - tx: tx, - coin: coin, - radius: radius, - ); - }, - separatorBuilder: (context, index) { - return Container( - width: double.infinity, - height: 2, - color: Theme.of(context) - .extension()! - .background, - ); - }, - itemCount: _txns.length, - ) - : ListView.builder( - itemCount: _txns.length, - itemBuilder: (context, index) { - BorderRadius? radius; - bool shouldWrap = false; - if (_txns.length == 1) { - radius = BorderRadius.circular( - Constants.size.circularBorderRadius, - ); - } else if (index == _txns.length - 1) { - radius = _borderRadiusLast; - shouldWrap = true; - } else if (index == 0) { - radius = _borderRadiusFirst; - } - final tx = _txns[index]; - if (shouldWrap) { - return Column( - children: [ - TxListItem( - tx: tx, - coin: coin, - radius: radius, - ), - const SizedBox( - height: WalletView.navBarHeight + 14, - ), - ], - ); - } else { - return TxListItem( - tx: tx, - coin: coin, - radius: radius, + child: + Util.isDesktop + ? ListView.separated( + shrinkWrap: true, + itemBuilder: (context, index) { + BorderRadius? radius; + if (_txns.length == 1) { + radius = BorderRadius.circular( + Constants.size.circularBorderRadius, + ); + } else if (index == _txns.length - 1) { + radius = _borderRadiusLast; + } else if (index == 0) { + radius = _borderRadiusFirst; + } + final tx = _txns[index]; + return TxListItem(tx: tx, coin: coin, radius: radius); + }, + separatorBuilder: (context, index) { + return Container( + width: double.infinity, + height: 2, + color: + Theme.of( + context, + ).extension()!.background, ); - } - }, - ), + }, + itemCount: _txns.length, + ) + : ListView.builder( + itemCount: _txns.length, + itemBuilder: (context, index) { + BorderRadius? radius; + bool shouldWrap = false; + if (_txns.length == 1) { + radius = BorderRadius.circular( + Constants.size.circularBorderRadius, + ); + } else if (index == _txns.length - 1) { + radius = _borderRadiusLast; + shouldWrap = true; + } else if (index == 0) { + radius = _borderRadiusFirst; + } + final tx = _txns[index]; + if (shouldWrap) { + return Column( + children: [ + TxListItem(tx: tx, coin: coin, radius: radius), + const SizedBox( + height: WalletView.navBarHeight + 14, + ), + ], + ); + } else { + return TxListItem(tx: tx, coin: coin, radius: radius); + } + }, + ), ); } }, diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index a479ae4eb..417ad227d 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -15,7 +15,7 @@ import 'package:event_bus/event_bus.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../app_config.dart'; @@ -51,6 +51,7 @@ import '../../wallets/crypto_currency/intermediate/frost_currency.dart'; import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../../wallets/wallet/impl/bitcoin_frost_wallet.dart'; import '../../wallets/wallet/impl/firo_wallet.dart'; +import '../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../wallets/wallet/impl/namecoin_wallet.dart'; import '../../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../../wallets/wallet/intermediate/lib_salvium_wallet.dart'; @@ -75,6 +76,7 @@ import '../../widgets/wallet_navigation_bar/components/icons/buy_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/churn_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/coin_control_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart'; +import '../../widgets/wallet_navigation_bar/components/icons/finalize_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/frost_sign_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/fusion_nav_icon.dart'; import '../../widgets/wallet_navigation_bar/components/icons/ordinals_nav_icon.dart'; @@ -88,6 +90,7 @@ import '../cashfusion/cashfusion_view.dart'; import '../churning/churning_view.dart'; import '../coin_control/coin_control_view.dart'; import '../exchange_view/wallet_initiated_exchange_view.dart'; +import '../finalize_view/finalize_view.dart'; import '../monkey/monkey_view.dart'; import '../namecoin_names/namecoin_names_home_view.dart'; import '../notification_views/notifications_view.dart'; @@ -95,6 +98,7 @@ import '../ordinals/ordinals_view.dart'; import '../paynym/paynym_claim_view.dart'; import '../paynym/paynym_home_view.dart'; import '../receive_view/receive_view.dart'; +import '../salvium_stake/salvium_create_stake_view.dart'; import '../send_view/frost_ms/frost_send_view.dart'; import '../send_view/send_view.dart'; import '../settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart'; @@ -180,8 +184,9 @@ class _WalletViewState extends ConsumerState { } } - eventBus = - widget.eventBus != null ? widget.eventBus! : GlobalEventBus.instance; + eventBus = widget.eventBus != null + ? widget.eventBus! + : GlobalEventBus.instance; _syncStatusSubscription = eventBus .on() @@ -351,27 +356,24 @@ class _WalletViewState extends ConsumerState { if (coin.network.isTestNet) { await showDialog( context: context, - builder: - (_) => const StackOkDialog( - title: "Exchange not available for test net coins", - ), + builder: (_) => const StackOkDialog( + title: "Exchange not available for test net coins", + ), ); } else { Future _future; final isar = await ExchangeDataLoadingService.instance.isar; try { - _future = - isar.currencies - .where() - .tickerEqualToAnyExchangeNameName(coin.ticker) - .findFirst(); + _future = isar.currencies + .where() + .tickerEqualToAnyExchangeNameName(coin.ticker) + .findFirst(); } catch (_) { _future = ExchangeDataLoadingService.instance.loadAll().then( - (_) => - isar.currencies - .where() - .tickerEqualToAnyExchangeNameName(coin.ticker) - .findFirst(), + (_) => isar.currencies + .where() + .tickerEqualToAnyExchangeNameName(coin.ticker) + .findFirst(), ); } @@ -401,18 +403,17 @@ class _WalletViewState extends ConsumerState { if (coin.network.isTestNet) { await showDialog( context: context, - builder: - (_) => const StackOkDialog( - title: "Buy not available for test net coins", - ), + builder: (_) => + const StackOkDialog(title: "Buy not available for test net coins"), ); } else { if (mounted) { unawaited( Navigator.of(context).pushNamed( BuyInWalletView.routeName, - arguments: - coin.hasBuySupport ? coin : Bitcoin(CryptoCurrencyNetwork.main), + arguments: coin.hasBuySupport + ? coin + : Bitcoin(CryptoCurrencyNetwork.main), ), ); } @@ -424,14 +425,13 @@ class _WalletViewState extends ConsumerState { unawaited( showDialog( context: context, - builder: - (context) => WillPopScope( - child: const CustomLoadingOverlay( - message: "Anonymizing balance", - eventBus: null, - ), - onWillPop: () async => shouldPop, - ), + builder: (context) => WillPopScope( + child: const CustomLoadingOverlay( + message: "Anonymizing balance", + eventBus: null, + ), + onWillPop: () async => shouldPop, + ), ), ); final wallet = ref.read(pWallets).getWallet(walletId); @@ -481,11 +481,10 @@ class _WalletViewState extends ConsumerState { ).popUntil(ModalRoute.withName(WalletView.routeName)); await showDialog( context: context, - builder: - (_) => StackOkDialog( - title: "Privatize all failed", - message: "Reason: $e", - ), + builder: (_) => StackOkDialog( + title: "Privatize all failed", + message: "Reason: $e", + ), ); } } @@ -518,40 +517,36 @@ class _WalletViewState extends ConsumerState { "Migration in progress\nThis could take a while\nPlease don't leave this screen", subMessage: "This only needs to run once per wallet", eventBus: null, - textColor: - Theme.of(context).extension()!.textDark, + textColor: Theme.of( + context, + ).extension()!.textDark, actionButton: SecondaryButton( label: "Cancel", onPressed: () async { await showDialog( context: context, - builder: - (context) => StackDialog( - title: "Warning!", - message: - "Skipping this process can completely" - " break your wallet. It is only meant to be done in" - " emergency situations where the migration fails" - " and will not let you continue. Still skip?", - leftButton: SecondaryButton( - label: "Cancel", - onPressed: - Navigator.of( - context, - rootNavigator: true, - ).pop, - ), - rightButton: SecondaryButton( - label: "Ok", - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - setState(() => _rescanningOnOpen = false); - }, - ), - ), + builder: (context) => StackDialog( + title: "Warning!", + message: + "Skipping this process can completely" + " break your wallet. It is only meant to be done in" + " emergency situations where the migration fails" + " and will not let you continue. Still skip?", + leftButton: SecondaryButton( + label: "Cancel", + onPressed: Navigator.of( + context, + rootNavigator: true, + ).pop, + ), + rightButton: SecondaryButton( + label: "Ok", + onPressed: () { + Navigator.of(context, rootNavigator: true).pop(); + setState(() => _rescanningOnOpen = false); + }, + ), + ), ); }, ), @@ -567,8 +562,9 @@ class _WalletViewState extends ConsumerState { child: Stack( children: [ Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: AppBarBackButton( onPressed: () { @@ -595,10 +591,18 @@ class _WalletViewState extends ConsumerState { ], ), actions: [ - const Padding( - padding: EdgeInsets.only(top: 10, bottom: 10, right: 10), - child: AspectRatio(aspectRatio: 1, child: SmallTorIcon()), - ), + if (AppConfig.hasFeature(AppFeature.tor)) + const Padding( + padding: EdgeInsets.only( + top: 10, + bottom: 10, + right: 10, + ), + child: AspectRatio( + aspectRatio: 1, + child: SmallTorIcon(), + ), + ), Padding( padding: const EdgeInsets.only( top: 10, @@ -613,10 +617,9 @@ class _WalletViewState extends ConsumerState { key: const Key("walletViewRadioButton"), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, icon: _buildNetworkIcon(_currentSyncStatus), onPressed: () { Navigator.of(context).pushNamed( @@ -645,59 +648,58 @@ class _WalletViewState extends ConsumerState { key: const Key("walletViewAlertsButton"), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, icon: ref.watch( - notificationsProvider.select( - (value) => value - .hasUnreadNotificationsFor(walletId), - ), - ) - ? SvgPicture.file( - File( - ref.watch( - themeProvider.select( - (value) => value.assets.bellNew, - ), + notificationsProvider.select( + (value) => + value.hasUnreadNotificationsFor(walletId), + ), + ) + ? SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.bellNew, ), ), - width: 20, - height: 20, - color: - ref.watch( - notificationsProvider.select( - (value) => value - .hasUnreadNotificationsFor( - walletId, - ), + ), + width: 20, + height: 20, + color: + ref.watch( + notificationsProvider.select( + (value) => + value.hasUnreadNotificationsFor( + walletId, ), - ) - ? null - : Theme.of(context) - .extension()! - .topNavIconPrimary, - ) - : SvgPicture.asset( - Assets.svg.bell, - width: 20, - height: 20, - color: - ref.watch( - notificationsProvider.select( - (value) => value - .hasUnreadNotificationsFor( - walletId, - ), + ), + ) + ? null + : Theme.of(context) + .extension()! + .topNavIconPrimary, + ) + : SvgPicture.asset( + Assets.svg.bell, + width: 20, + height: 20, + color: + ref.watch( + notificationsProvider.select( + (value) => + value.hasUnreadNotificationsFor( + walletId, ), - ) - ? null - : Theme.of(context) - .extension()! - .topNavIconPrimary, - ), + ), + ) + ? null + : Theme.of(context) + .extension()! + .topNavIconPrimary, + ), onPressed: () { // reset unread state ref.refresh(unreadNotificationsStateProvider); @@ -708,13 +710,11 @@ class _WalletViewState extends ConsumerState { arguments: walletId, ) .then((_) { - final Set unreadNotificationIds = - ref - .read( - unreadNotificationsStateProvider - .state, - ) - .state; + final Set unreadNotificationIds = ref + .read( + unreadNotificationsStateProvider.state, + ) + .state; if (unreadNotificationIds.isEmpty) return; final List> futures = []; @@ -762,16 +762,14 @@ class _WalletViewState extends ConsumerState { key: const Key("walletViewSettingsButton"), size: 36, shadows: const [], - color: - Theme.of( - context, - ).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, icon: SvgPicture.asset( Assets.svg.bars, - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, width: 20, height: 20, ), @@ -795,8 +793,9 @@ class _WalletViewState extends ConsumerState { ), body: SafeArea( child: Container( - color: - Theme.of(context).extension()!.background, + color: Theme.of( + context, + ).extension()!.background, child: Column( children: [ const SizedBox(height: 10), @@ -808,20 +807,26 @@ class _WalletViewState extends ConsumerState { aspectRatio: 1.75, initialSyncStatus: ref - .watch(pWallets) - .getWallet(walletId) - .refreshMutex - .isLocked - ? WalletSyncStatus.syncing - : WalletSyncStatus.synced, + .watch(pWallets) + .getWallet(walletId) + .refreshMutex + .isLocked + ? WalletSyncStatus.syncing + : WalletSyncStatus.synced, ), ), ), - if (isSparkWallet || - ref.watch(pWalletInfo(walletId)).isMwebEnabled) + if ((isSparkWallet || + ref + .watch(pWalletInfo(walletId)) + .isMwebEnabled) && + !viewOnly) const SizedBox(height: 10), - if (isSparkWallet || - ref.watch(pWalletInfo(walletId)).isMwebEnabled) + if ((isSparkWallet || + ref + .watch(pWalletInfo(walletId)) + .isMwebEnabled) && + !viewOnly) Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Row( @@ -836,60 +841,55 @@ class _WalletViewState extends ConsumerState { onPressed: () async { await showDialog( context: context, - builder: - (context) => StackDialog( - title: "Attention!", - message: - "You're about to privatize all of your public funds.", - leftButton: TextButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text( - "Cancel", - style: STextStyles.button( - context, - ).copyWith( - color: - Theme.of(context) - .extension< - StackColors - >()! - .accentColorDark, + builder: (context) => StackDialog( + title: "Attention!", + message: + "You're about to privatize all of your public funds.", + leftButton: TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text( + "Cancel", + style: STextStyles.button(context) + .copyWith( + color: Theme.of(context) + .extension< + StackColors + >()! + .accentColorDark, ), - ), - ), - rightButton: TextButton( - onPressed: () async { - Navigator.of(context).pop(); + ), + ), + rightButton: TextButton( + onPressed: () async { + Navigator.of(context).pop(); - unawaited(attemptAnonymize()); - }, - style: Theme.of(context) - .extension()! - .getPrimaryEnabledButtonStyle( - context, - ), - child: Text( - "Continue", - style: STextStyles.button( - context, - ), + unawaited(attemptAnonymize()); + }, + style: Theme.of(context) + .extension()! + .getPrimaryEnabledButtonStyle( + context, ), + child: Text( + "Continue", + style: STextStyles.button( + context, ), ), + ), + ), ); }, child: Text( "Privatize funds", - style: STextStyles.button( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.button(context) + .copyWith( + color: Theme.of(context) .extension()! .buttonTextSecondary, - ), + ), ), ), ), @@ -904,14 +904,12 @@ class _WalletViewState extends ConsumerState { children: [ Text( "Transactions", - style: STextStyles.itemSubtitle( - context, - ).copyWith( - color: - Theme.of( + style: STextStyles.itemSubtitle(context) + .copyWith( + color: Theme.of( context, ).extension()!.textDark3, - ), + ), ), CustomTextButton( text: "See all", @@ -973,18 +971,16 @@ class _WalletViewState extends ConsumerState { Expanded( child: ref - .read(pWallets) - .getWallet( - widget.walletId, - ) - .isarTransactionVersion == - 2 - ? TransactionsV2List( - walletId: widget.walletId, - ) - : TransactionsList( - walletId: walletId, - ), + .read(pWallets) + .getWallet(widget.walletId) + .isarTransactionVersion == + 2 + ? TransactionsV2List( + walletId: widget.walletId, + ) + : TransactionsList( + walletId: walletId, + ), ), ], ), @@ -1015,6 +1011,21 @@ class _WalletViewState extends ConsumerState { } }, ), + if (wallet is MimblewimblecoinWallet) + WalletNavigationBarItemData( + label: "Finalize", + icon: const FinalizeNavIcon(), + onTap: () { + if (mounted) { + unawaited( + Navigator.of(context).pushNamed( + FinalizeView.routeName, + arguments: walletId, + ), + ); + } + }, + ), if (ref.watch(pWalletCoin(walletId)) is FrostCurrency) WalletNavigationBarItemData( label: "Sign", @@ -1084,11 +1095,10 @@ class _WalletViewState extends ConsumerState { moreItems: [ if (ref.watch( pWallets.select( - (value) => - value - .getWallet(widget.walletId) - .cryptoCurrency - .hasTokenSupport, + (value) => value + .getWallet(widget.walletId) + .cryptoCurrency + .hasTokenSupport, ), )) WalletNavigationBarItemData( @@ -1107,10 +1117,9 @@ class _WalletViewState extends ConsumerState { Assets.svg.monkey, height: 20, width: 20, - color: - Theme.of( - context, - ).extension()!.bottomNavIconIcon, + color: Theme.of( + context, + ).extension()!.bottomNavIconIcon, ), label: "MonKey", onTap: () { @@ -1174,9 +1183,8 @@ class _WalletViewState extends ConsumerState { unawaited( showDialog( context: context, - builder: - (context) => - const LoadingIndicator(width: 100), + builder: (context) => + const LoadingIndicator(width: 100), ), ); @@ -1206,8 +1214,9 @@ class _WalletViewState extends ConsumerState { // account.value!.segwit ) { ref - .read(myPaynymAccountStateProvider.state) - .state = account.value!; + .read(myPaynymAccountStateProvider.state) + .state = + account.value!; await Navigator.of(context).pushNamed( PaynymHomeView.routeName, @@ -1239,7 +1248,9 @@ class _WalletViewState extends ConsumerState { ); }, ), - if (wallet is CashFusionInterface && !viewOnly) + if (AppConfig.hasFeature(AppFeature.tor) && + wallet is CashFusionInterface && + !viewOnly) WalletNavigationBarItemData( label: "Fusion", icon: const FusionNavIcon(), @@ -1250,6 +1261,17 @@ class _WalletViewState extends ConsumerState { ); }, ), + if (wallet is LibSalviumWallet) + WalletNavigationBarItemData( + label: "Staking", + icon: const PaynymNavIcon(), + onTap: () { + Navigator.of(context).pushNamed( + SalviumCreateStakeView.routeName, + arguments: widget.walletId, + ); + }, + ), if ((wallet is LibMoneroWallet || wallet is LibSalviumWallet) && !viewOnly) diff --git a/lib/pages/wallets_view/wallets_overview.dart b/lib/pages/wallets_view/wallets_overview.dart index 95e38b07d..d0cc2d12d 100644 --- a/lib/pages/wallets_view/wallets_overview.dart +++ b/lib/pages/wallets_view/wallets_overview.dart @@ -11,13 +11,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../app_config.dart'; import '../../models/add_wallet_list_entity/sub_classes/coin_entity.dart'; import '../../models/isar/models/ethereum/eth_contract.dart'; import '../../pages_desktop_specific/my_stack_view/dialogs/desktop_expanding_wallet_card.dart'; -import '../../providers/db/main_db_provider.dart'; import '../../providers/providers.dart'; import '../../services/event_bus/events/wallet_added_event.dart'; import '../../services/event_bus/global_event_bus.dart'; @@ -28,6 +27,7 @@ import '../../utilities/text_styles.dart'; import '../../utilities/util.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; import '../../wallets/isar/models/wallet_info.dart'; +import '../../wallets/isar/providers/all_wallets_info_provider.dart'; import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../../wallets/wallet/wallet.dart'; import '../../widgets/background.dart'; @@ -127,25 +127,22 @@ class _EthWalletsOverviewState extends ConsumerState { } void updateWallets() { - final walletsData = - ref.read(mainDBProvider).isar.walletInfo.where().findAllSync(); + final walletsData = ref.read(pAllWalletsInfo).toList(); + walletsData.removeWhere((e) => e.coin != widget.coin); if (widget.coin is Ethereum) { for (final data in walletsData) { final List contracts = []; - final contractAddresses = - ref.read(pWalletTokenAddresses(data.walletId)); + final contractAddresses = ref.read( + pWalletTokenAddresses(data.walletId), + ); // fetch each contract for (final contractAddress in contractAddresses) { final contract = ref - .read( - mainDBProvider, - ) - .getEthContractSync( - contractAddress, - ); + .read(mainDBProvider) + .getEthContractSync(contractAddress); // add it to list if it exists in DB if (contract != null) { @@ -155,9 +152,7 @@ class _EthWalletsOverviewState extends ConsumerState { // add tuple to list wallets[data.walletId] = ( - wallet: ref.read(pWallets).getWallet( - data.walletId, - ), + wallet: ref.read(pWallets).getWallet(data.walletId), contracts: contracts, ); } @@ -167,9 +162,7 @@ class _EthWalletsOverviewState extends ConsumerState { // desktop single coin apps may cause issues so lets just ignore the error and move on try { wallets[data.walletId] = ( - wallet: ref.read(pWallets).getWallet( - data.walletId, - ), + wallet: ref.read(pWallets).getWallet(data.walletId), contracts: [], ); } catch (_) { @@ -213,8 +206,9 @@ class _EthWalletsOverviewState extends ConsumerState { condition: !isDesktop && !AppConfig.isSingleCoinApp, builder: (child) => Background( child: Scaffold( - backgroundColor: - Theme.of(context).extension()!.background, + backgroundColor: Theme.of( + context, + ).extension()!.background, appBar: AppBar( leading: const AppBarBackButton(), title: Text( @@ -229,9 +223,9 @@ class _EthWalletsOverviewState extends ConsumerState { Assets.svg.plus, width: 18, height: 18, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, + color: Theme.of( + context, + ).extension()!.topNavIconPrimary, ), onPressed: () { Navigator.of(context).pushNamed( @@ -244,10 +238,7 @@ class _EthWalletsOverviewState extends ConsumerState { ], ), body: SafeArea( - child: Padding( - padding: const EdgeInsets.all(16), - child: child, - ), + child: Padding(padding: const EdgeInsets.all(16), child: child), ), ), ), @@ -269,55 +260,54 @@ class _EthWalletsOverviewState extends ConsumerState { }, style: isDesktop ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: Theme.of(context) - .extension()! - .textFieldActiveText, + color: Theme.of( + context, + ).extension()!.textFieldActiveText, height: 1.8, ) : STextStyles.field(context), - decoration: standardInputDecoration( - "Search...", - searchFieldFocusNode, - context, - desktopMed: isDesktop, - ).copyWith( - prefixIcon: Padding( - padding: EdgeInsets.symmetric( - horizontal: isDesktop ? 12 : 10, - vertical: isDesktop ? 18 : 16, - ), - child: SvgPicture.asset( - Assets.svg.search, - width: isDesktop ? 20 : 16, - height: isDesktop ? 20 : 16, - ), - ), - suffixIcon: _searchController.text.isNotEmpty - ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - _searchController.text = ""; - _searchString = ""; - }); - }, + decoration: + standardInputDecoration( + "Search...", + searchFieldFocusNode, + context, + desktopMed: isDesktop, + ).copyWith( + prefixIcon: Padding( + padding: EdgeInsets.symmetric( + horizontal: isDesktop ? 12 : 10, + vertical: isDesktop ? 18 : 16, + ), + child: SvgPicture.asset( + Assets.svg.search, + width: isDesktop ? 20 : 16, + height: isDesktop ? 20 : 16, + ), + ), + suffixIcon: _searchController.text.isNotEmpty + ? Padding( + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + _searchController.text = ""; + _searchString = ""; + }); + }, + ), + ], ), - ], - ), - ), - ) - : null, - ), + ), + ) + : null, + ), ), ), - const SizedBox( - height: 16, - ), + const SizedBox(height: 16), Expanded( child: Builder( builder: (context) { @@ -351,28 +341,28 @@ class _EthWalletsOverviewState extends ConsumerState { vertical: 14, horizontal: 20, ), - borderColor: Theme.of(context) - .extension()! - .backgroundAppBar, + borderColor: Theme.of( + context, + ).extension()!.backgroundAppBar, child: child, ), child: SimpleWalletCard( walletId: wallet.walletId, - popPrevious: widget - .overrideSimpleWalletCardPopPreviousValueWith == + popPrevious: + widget.overrideSimpleWalletCardPopPreviousValueWith == null ? isDesktop : widget - .overrideSimpleWalletCardPopPreviousValueWith!, - desktopNavigatorState: - isDesktop ? widget.navigatorState : null, + .overrideSimpleWalletCardPopPreviousValueWith!, + desktopNavigatorState: isDesktop + ? widget.navigatorState + : null, ), ); } }, - separatorBuilder: (_, __) => SizedBox( - height: isDesktop ? 10 : 8, - ), + separatorBuilder: (_, __) => + SizedBox(height: isDesktop ? 10 : 8), itemCount: data.length, ); }, diff --git a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart index f3037f527..534653226 100644 --- a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart +++ b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart @@ -11,7 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../models/isar/models/contact_entry.dart'; @@ -35,10 +35,7 @@ import 'desktop_address_card.dart'; import 'desktop_contact_options_menu_popup.dart'; class DesktopContactDetails extends ConsumerStatefulWidget { - const DesktopContactDetails({ - super.key, - required this.contactId, - }); + const DesktopContactDetails({super.key, required this.contactId}); final String contactId; @@ -51,24 +48,26 @@ class _DesktopContactDetailsState extends ConsumerState { List> _cachedTransactions = []; Future>> - _filteredTransactionsByContact() async { - final contact = - ref.read(addressBookServiceProvider).getContactById(widget.contactId); + _filteredTransactionsByContact() async { + final contact = ref + .read(addressBookServiceProvider) + .getContactById(widget.contactId); // TODO: optimise - final transactions = await ref - .read(mainDBProvider) - .isar - .transactions - .where() - .filter() - .anyOf( - contact.addresses.map((e) => e.address), - (q, String e) => q.address((q) => q.valueEqualTo(e)), - ) - .sortByTimestampDesc() - .findAll(); + final transactions = + await ref + .read(mainDBProvider) + .isar + .transactions + .where() + .filter() + .anyOf( + contact.addresses.map((e) => e.address), + (q, String e) => q.address((q) => q.valueEqualTo(e)), + ) + .sortByTimestampDesc() + .findAll(); final List> result = []; @@ -88,8 +87,9 @@ class _DesktopContactDetailsState extends ConsumerState { ContactEntry? _contact; try { _contact = ref.watch( - addressBookServiceProvider - .select((value) => value.getContactById(widget.contactId)), + addressBookServiceProvider.select( + (value) => value.getContactById(widget.contactId), + ), ); } catch (_) { return Container(); @@ -115,33 +115,27 @@ class _DesktopContactDetailsState extends ConsumerState { width: 32, height: 32, decoration: BoxDecoration( - color: contact.customId == "default" - ? Colors.transparent - : Theme.of(context) - .extension()! - .textFieldDefaultBG, + color: + contact.customId == "default" + ? Colors.transparent + : Theme.of(context) + .extension()! + .textFieldDefaultBG, borderRadius: BorderRadius.circular(32), ), - child: contact.customId == "default" - ? const Center( - child: AppIcon( - width: 32, - ), - ) - : contact.emojiChar != null - ? Center( - child: Text(contact.emojiChar!), - ) + child: + contact.customId == "default" + ? const Center(child: AppIcon(width: 32)) + : contact.emojiChar != null + ? Center(child: Text(contact.emojiChar!)) : Center( - child: SvgPicture.asset( - Assets.svg.user, - width: 18, - ), + child: SvgPicture.asset( + Assets.svg.user, + width: 18, ), + ), ), - const SizedBox( - width: 16, - ), + const SizedBox(width: 16), Text( contact.name, style: STextStyles.desktopTextSmall(context), @@ -167,9 +161,7 @@ class _DesktopContactDetailsState extends ConsumerState { ), ], ), - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), Flexible( child: ListView( primary: false, @@ -183,8 +175,9 @@ class _DesktopContactDetailsState extends ConsumerState { children: [ Text( "Addresses", - style: - STextStyles.desktopTextExtraExtraSmall(context), + style: STextStyles.desktopTextExtraExtraSmall( + context, + ), ), CustomTextButton( text: "Add new", @@ -195,69 +188,71 @@ class _DesktopContactDetailsState extends ConsumerState { await showDialog( context: context, - builder: (context) => DesktopDialog( - maxWidth: 580, - maxHeight: 566, - child: Column( - children: [ - Row( + builder: + (context) => DesktopDialog( + maxWidth: 580, + maxHeight: 566, + child: Column( children: [ - const SizedBox( - width: 8, - ), - const AppBarBackButton( - isCompact: true, + Row( + children: [ + const SizedBox(width: 8), + const AppBarBackButton( + isCompact: true, + ), + Text( + "Add new address", + style: STextStyles.desktopH3( + context, + ), + ), + ], ), - Text( - "Add new address", - style: - STextStyles.desktopH3(context), + Expanded( + child: Padding( + padding: const EdgeInsets.only( + top: 20, + left: 32, + right: 32, + bottom: 32, + ), + child: AddNewContactAddressView( + contactId: widget.contactId, + ), + ), ), ], ), - Expanded( - child: Padding( - padding: const EdgeInsets.only( - top: 20, - left: 32, - right: 32, - bottom: 32, - ), - child: AddNewContactAddressView( - contactId: widget.contactId, - ), - ), - ), - ], - ), - ), + ), ); }, ), ], ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), RoundedWhiteContainer( padding: const EdgeInsets.all(0), - borderColor: Theme.of(context) - .extension()! - .background, + borderColor: + Theme.of( + context, + ).extension()!.background, child: Column( mainAxisSize: MainAxisSize.min, children: [ - for (int i = 0; - i < contact.addressesSorted.length; - i++) + for ( + int i = 0; + i < contact.addressesSorted.length; + i++ + ) Column( mainAxisSize: MainAxisSize.min, children: [ if (i > 0) Container( - color: Theme.of(context) - .extension()! - .background, + color: + Theme.of(context) + .extension()! + .background, height: 1, ), Padding( @@ -273,14 +268,12 @@ class _DesktopContactDetailsState extends ConsumerState { ), ), Padding( - padding: const EdgeInsets.only( - top: 20, - bottom: 12, - ), + padding: const EdgeInsets.only(top: 20, bottom: 12), child: Text( "Transaction history", - style: - STextStyles.desktopTextExtraExtraSmall(context), + style: STextStyles.desktopTextExtraExtraSmall( + context, + ), ), ), FutureBuilder( @@ -288,7 +281,7 @@ class _DesktopContactDetailsState extends ConsumerState { builder: ( _, AsyncSnapshot>> - snapshot, + snapshot, ) { if (snapshot.connectionState == ConnectionState.done && @@ -298,9 +291,10 @@ class _DesktopContactDetailsState extends ConsumerState { if (_cachedTransactions.isNotEmpty) { return RoundedWhiteContainer( padding: const EdgeInsets.all(0), - borderColor: Theme.of(context) - .extension()! - .background, + borderColor: + Theme.of( + context, + ).extension()!.background, child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -333,9 +327,10 @@ class _DesktopContactDetailsState extends ConsumerState { } else { return RoundedWhiteContainer( padding: const EdgeInsets.all(0), - borderColor: Theme.of(context) - .extension()! - .background, + borderColor: + Theme.of( + context, + ).extension()!.background, child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/pages_desktop_specific/addresses/desktop_wallet_addresses_view.dart b/lib/pages_desktop_specific/addresses/desktop_wallet_addresses_view.dart index 9186b8f0b..f3bdb2bc2 100644 --- a/lib/pages_desktop_specific/addresses/desktop_wallet_addresses_view.dart +++ b/lib/pages_desktop_specific/addresses/desktop_wallet_addresses_view.dart @@ -11,7 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../models/isar/models/isar_models.dart'; import '../../pages/receive_view/addresses/address_details_view.dart'; @@ -27,10 +27,7 @@ import 'sub_widgets/desktop_address_list.dart'; final desktopSelectedAddressId = StateProvider.autoDispose((ref) => null); class DesktopWalletAddressesView extends ConsumerStatefulWidget { - const DesktopWalletAddressesView({ - super.key, - required this.walletId, - }); + const DesktopWalletAddressesView({super.key, required this.walletId}); static const String routeName = "/desktopWalletAddressesView"; @@ -82,32 +79,27 @@ class _DesktopWalletAddressesViewState leading: Expanded( child: Row( children: [ - const SizedBox( - width: 32, - ), + const SizedBox(width: 32), AppBarIconButton( size: 32, - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, + color: + Theme.of( + context, + ).extension()!.textFieldDefaultBG, shadows: const [], icon: SvgPicture.asset( Assets.svg.arrowLeft, width: 18, height: 18, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, + color: + Theme.of( + context, + ).extension()!.topNavIconPrimary, ), onPressed: Navigator.of(context).pop, ), - const SizedBox( - width: 12, - ), - Text( - "Address list", - style: STextStyles.desktopH3(context), - ), + const SizedBox(width: 12), + Text("Address list", style: STextStyles.desktopH3(context)), const Spacer(), ], ), @@ -129,15 +121,11 @@ class _DesktopWalletAddressesViewState walletId: widget.walletId, ), ), - const SizedBox( - width: 16, - ), + const SizedBox(width: 16), Expanded( child: Column( children: [ - const SizedBox( - height: _headerHeight, - ), + const SizedBox(height: _headerHeight), if (ref.watch(desktopSelectedAddressId.state).state != null) Expanded( @@ -147,9 +135,10 @@ class _DesktopWalletAddressesViewState "currentDesktopAddressDetails_key_${ref.watch(desktopSelectedAddressId.state).state}", ), walletId: widget.walletId, - addressId: ref - .watch(desktopSelectedAddressId.state) - .state!, + addressId: + ref + .watch(desktopSelectedAddressId.state) + .state!, ), ), ), diff --git a/lib/pages_desktop_specific/addresses/sub_widgets/desktop_address_list.dart b/lib/pages_desktop_specific/addresses/sub_widgets/desktop_address_list.dart index a0a183afe..67a315582 100644 --- a/lib/pages_desktop_specific/addresses/sub_widgets/desktop_address_list.dart +++ b/lib/pages_desktop_specific/addresses/sub_widgets/desktop_address_list.dart @@ -11,7 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/isar_models.dart'; import '../../../pages/receive_view/addresses/address_card.dart'; @@ -87,24 +87,25 @@ class _DesktopAddressListState extends ConsumerState { .findAllSync(); } - final labels = ref - .read(mainDBProvider) - .getAddressLabels(widget.walletId) - .filter() - .group( - (q) => q - .valueContains(term, caseSensitive: false) - .or() - .addressStringContains(term, caseSensitive: false) - .or() - .group( - (q) => q - .tagsIsNotNull() - .and() - .tagsElementContains(term, caseSensitive: false), - ), - ) - .findAllSync(); + final labels = + ref + .read(mainDBProvider) + .getAddressLabels(widget.walletId) + .filter() + .group( + (q) => q + .valueContains(term, caseSensitive: false) + .or() + .addressStringContains(term, caseSensitive: false) + .or() + .group( + (q) => q.tagsIsNotNull().and().tagsElementContains( + term, + caseSensitive: false, + ), + ), + ) + .findAllSync(); if (labels.isEmpty) { return []; @@ -188,14 +189,16 @@ class _DesktopAddressListState extends ConsumerState { _searchString = value; }); }, - style: isDesktop - ? STextStyles.desktopTextExtraSmall(context).copyWith( - color: Theme.of(context) - .extension()! - .textFieldActiveText, - height: 1.8, - ) - : STextStyles.field(context), + style: + isDesktop + ? STextStyles.desktopTextExtraSmall(context).copyWith( + color: + Theme.of( + context, + ).extension()!.textFieldActiveText, + height: 1.8, + ) + : STextStyles.field(context), decoration: standardInputDecoration( "Search...", searchFieldFocusNode, @@ -213,58 +216,61 @@ class _DesktopAddressListState extends ConsumerState { height: isDesktop ? 20 : 16, ), ), - suffixIcon: _searchController.text.isNotEmpty - ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - _searchController.text = ""; - _searchString = ""; - }); - }, - ), - ], + suffixIcon: + _searchController.text.isNotEmpty + ? Padding( + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + _searchController.text = ""; + _searchString = ""; + }); + }, + ), + ], + ), ), - ), - ) - : null, + ) + : null, ), ), ), ), ), - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), Expanded( child: RoundedWhiteContainer( padding: EdgeInsets.zero, child: ListView.separated( shrinkWrap: true, itemCount: ids.length, - separatorBuilder: (_, __) => Container( - height: 1, - color: Theme.of(context) - .extension()! - .backgroundAppBar, - ), - itemBuilder: (_, index) => Padding( - padding: const EdgeInsets.all(4), - child: AddressCard( - key: Key("addressCardDesktop_key_${ids[index]}"), - walletId: widget.walletId, - addressId: ids[index], - coin: coin, - onPressed: () { - ref.read(desktopSelectedAddressId.state).state = ids[index]; - }, - ), - ), + separatorBuilder: + (_, __) => Container( + height: 1, + color: + Theme.of( + context, + ).extension()!.backgroundAppBar, + ), + itemBuilder: + (_, index) => Padding( + padding: const EdgeInsets.all(4), + child: AddressCard( + key: Key("addressCardDesktop_key_${ids[index]}"), + walletId: widget.walletId, + addressId: ids[index], + coin: coin, + onPressed: () { + ref.read(desktopSelectedAddressId.state).state = + ids[index]; + }, + ), + ), ), ), ), diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart index a5e0ba924..d0959351a 100644 --- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart +++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart @@ -13,7 +13,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/input.dart'; diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart index 653da8a68..3489f6cf8 100644 --- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart +++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart @@ -13,7 +13,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/isar/models/blockchain_data/utxo.dart'; @@ -39,10 +39,7 @@ import 'freeze_button.dart'; import 'utxo_row.dart'; class DesktopCoinControlView extends ConsumerStatefulWidget { - const DesktopCoinControlView({ - super.key, - required this.walletId, - }); + const DesktopCoinControlView({super.key, required this.walletId}); static const String routeName = "/desktopCoinControl"; @@ -114,28 +111,26 @@ class _DesktopCoinControlViewState child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - const SizedBox( - width: 32, - ), + const SizedBox(width: 32), AppBarIconButton( size: 32, - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, + color: + Theme.of( + context, + ).extension()!.textFieldDefaultBG, shadows: const [], icon: SvgPicture.asset( Assets.svg.arrowLeft, width: 18, height: 18, - color: Theme.of(context) - .extension()! - .topNavIconPrimary, + color: + Theme.of( + context, + ).extension()!.topNavIconPrimary, ), onPressed: Navigator.of(context).pop, ), - const SizedBox( - width: 18, - ), + const SizedBox(width: 18), SvgPicture.asset( Assets.svg.coinControl.gamePad, width: 32, @@ -143,13 +138,8 @@ class _DesktopCoinControlViewState color: Theme.of(context).extension()!.textSubtitle1, ), - const SizedBox( - width: 12, - ), - Text( - "Coin control", - style: STextStyles.desktopH3(context), - ), + const SizedBox(width: 12), + Text("Coin control", style: STextStyles.desktopH3(context)), ], ), ), @@ -177,11 +167,13 @@ class _DesktopCoinControlViewState _searchString = value; }); }, - style: - STextStyles.desktopTextExtraSmall(context).copyWith( - color: Theme.of(context) - .extension()! - .textFieldActiveText, + style: STextStyles.desktopTextExtraSmall( + context, + ).copyWith( + color: + Theme.of( + context, + ).extension()!.textFieldActiveText, height: 1.8, ), decoration: standardInputDecoration( @@ -201,33 +193,32 @@ class _DesktopCoinControlViewState height: 20, ), ), - suffixIcon: _searchController.text.isNotEmpty - ? Padding( - padding: const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - _searchController.text = ""; - _searchString = ""; - }); - }, - ), - ], + suffixIcon: + _searchController.text.isNotEmpty + ? Padding( + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + _searchController.text = ""; + _searchString = ""; + }); + }, + ), + ], + ), ), - ), - ) - : null, + ) + : null, ), ), ), ), - const SizedBox( - width: 24, - ), + const SizedBox(width: 24), AnimatedCrossFade( firstChild: JDropdownButton( redrawOnScreenSizeChanged: true, @@ -247,16 +238,13 @@ class _DesktopCoinControlViewState key: Key("${_selectedUTXOs.length}"), selectedUTXOs: _selectedUTXOs, ), - crossFadeState: _selectedUTXOs.isEmpty - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: const Duration( - milliseconds: 200, - ), - ), - const SizedBox( - width: 24, + crossFadeState: + _selectedUTXOs.isEmpty + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + duration: const Duration(milliseconds: 200), ), + const SizedBox(width: 24), AnimatedCrossFade( firstChild: JDropdownButton( redrawOnScreenSizeChanged: true, @@ -278,155 +266,152 @@ class _DesktopCoinControlViewState label: "Clear selection (${_selectedUTXOs.length})", onPressed: () => setState(() => _selectedUTXOs.clear()), ), - crossFadeState: _selectedUTXOs.isEmpty - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: const Duration( - milliseconds: 200, - ), + crossFadeState: + _selectedUTXOs.isEmpty + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + duration: const Duration(milliseconds: 200), ), ], ), ), Expanded( child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 24, - ), - child: _list != null - ? ListView.separated( - itemCount: _list!.length, - separatorBuilder: (context, _) => const SizedBox( - height: 10, - ), - itemBuilder: (context, index) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(_list![index]) - .findFirstSync()!; - final data = UtxoRowData(utxo.id, false); - data.selected = _selectedUTXOs.contains(data); + padding: const EdgeInsets.symmetric(horizontal: 24), + child: + _list != null + ? ListView.separated( + itemCount: _list!.length, + separatorBuilder: + (context, _) => const SizedBox(height: 10), + itemBuilder: (context, index) { + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(_list![index]) + .findFirstSync()!; + final data = UtxoRowData(utxo.id, false); + data.selected = _selectedUTXOs.contains(data); - return UtxoRow( - key: Key( - "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}", - ), - data: data, - walletId: widget.walletId, - onSelectionChanged: (value) { - setState(() { - if (data.selected) { - _selectedUTXOs.add(value); + return UtxoRow( + key: Key( + "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}", + ), + data: data, + walletId: widget.walletId, + onSelectionChanged: (value) { + setState(() { + if (data.selected) { + _selectedUTXOs.add(value); + } else { + _selectedUTXOs.remove(value); + } + }); + }, + ); + }, + ) + : ListView.separated( + itemCount: _map!.entries.length, + separatorBuilder: + (context, _) => const SizedBox(height: 10), + itemBuilder: (context, index) { + final entry = _map!.entries.elementAt(index); + final _controller = RotateIconController(); + + return Expandable2( + border: + Theme.of( + context, + ).extension()!.backgroundAppBar, + background: + Theme.of( + context, + ).extension()!.popupBG, + animationDurationMultiplier: + 0.2 * entry.value.length, + onExpandWillChange: (state) { + if (state == Expandable2State.expanded) { + _controller.forward?.call(); } else { - _selectedUTXOs.remove(value); + _controller.reverse?.call(); } - }); - }, - ); - }, - ) - : ListView.separated( - itemCount: _map!.entries.length, - separatorBuilder: (context, _) => const SizedBox( - height: 10, - ), - itemBuilder: (context, index) { - final entry = _map!.entries.elementAt(index); - final _controller = RotateIconController(); - - return Expandable2( - border: Theme.of(context) - .extension()! - .backgroundAppBar, - background: Theme.of(context) - .extension()! - .popupBG, - animationDurationMultiplier: 0.2 * entry.value.length, - onExpandWillChange: (state) { - if (state == Expandable2State.expanded) { - _controller.forward?.call(); - } else { - _controller.reverse?.call(); - } - }, - header: RoundedContainer( - padding: const EdgeInsets.all(20), - color: Colors.transparent, - child: Row( - children: [ - SvgPicture.file( - File( - ref.watch(coinIconProvider(coin)), + }, + header: RoundedContainer( + padding: const EdgeInsets.all(20), + color: Colors.transparent, + child: Row( + children: [ + SvgPicture.file( + File(ref.watch(coinIconProvider(coin))), + width: 24, + height: 24, ), - width: 24, - height: 24, - ), - const SizedBox( - width: 12, - ), - Expanded( - child: Text( - entry.key, - style: STextStyles.w600_14(context), + const SizedBox(width: 12), + Expanded( + child: Text( + entry.key, + style: STextStyles.w600_14(context), + ), ), - ), - Expanded( - child: Text( - "${entry.value.length} " - "output${entry.value.length > 1 ? "s" : ""}", - style: - STextStyles.desktopTextExtraExtraSmall( - context, + Expanded( + child: Text( + "${entry.value.length} " + "output${entry.value.length > 1 ? "s" : ""}", + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ), ), ), - ), - RotateIcon( - animationDurationMultiplier: - 0.2 * entry.value.length, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 14, - color: Theme.of(context) - .extension()! - .textSubtitle1, + RotateIcon( + animationDurationMultiplier: + 0.2 * entry.value.length, + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 14, + color: + Theme.of(context) + .extension()! + .textSubtitle1, + ), + curve: Curves.easeInOut, + controller: _controller, ), - curve: Curves.easeInOut, - controller: _controller, - ), - ], + ], + ), ), - ), - children: entry.value.map( - (id) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(id) - .findFirstSync()!; - final data = UtxoRowData(utxo.id, false); - data.selected = _selectedUTXOs.contains(data); + children: + entry.value.map((id) { + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(id) + .findFirstSync()!; + final data = UtxoRowData(utxo.id, false); + data.selected = _selectedUTXOs.contains(data); - return UtxoRow( - key: Key( - "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}", - ), - data: data, - walletId: widget.walletId, - raiseOnSelected: false, - onSelectionChanged: (value) { - setState(() { - if (data.selected) { - _selectedUTXOs.add(value); - } else { - _selectedUTXOs.remove(value); - } - }); - }, - ); - }, - ).toList(), - ); - }, - ), + return UtxoRow( + key: Key( + "${utxo.walletId}_${utxo.id}_${utxo.isBlocked}", + ), + data: data, + walletId: widget.walletId, + raiseOnSelected: false, + onSelectionChanged: (value) { + setState(() { + if (data.selected) { + _selectedUTXOs.add(value); + } else { + _selectedUTXOs.remove(value); + } + }); + }, + ); + }).toList(), + ); + }, + ), ), ), ], diff --git a/lib/pages_desktop_specific/coin_control/freeze_button.dart b/lib/pages_desktop_specific/coin_control/freeze_button.dart index b012b01ad..d78df6898 100644 --- a/lib/pages_desktop_specific/coin_control/freeze_button.dart +++ b/lib/pages_desktop_specific/coin_control/freeze_button.dart @@ -10,7 +10,7 @@ import 'package:async/async.dart'; import 'package:flutter/material.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/isar/models/blockchain_data/utxo.dart'; @@ -19,10 +19,7 @@ import '../../widgets/desktop/primary_button.dart'; import 'utxo_row.dart'; class FreezeButton extends StatefulWidget { - const FreezeButton({ - super.key, - required this.selectedUTXOs, - }); + const FreezeButton({super.key, required this.selectedUTXOs}); final Set selectedUTXOs; @@ -56,10 +53,11 @@ class _FreezeButtonState extends State { switch (_freezeLabelCache) { case "Freeze": for (final e in widget.selectedUTXOs) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(e.utxoId) - .findFirstSync()!; + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(e.utxoId) + .findFirstSync()!; if (!utxo.isBlocked) { utxosToUpdate.add(utxo.copyWith(isBlocked: true)); } @@ -68,10 +66,11 @@ class _FreezeButtonState extends State { case "Unfreeze": for (final e in widget.selectedUTXOs) { - final utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(e.utxoId) - .findFirstSync()!; + final utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(e.utxoId) + .findFirstSync()!; if (utxo.isBlocked) { utxosToUpdate.add(utxo.copyWith(isBlocked: false)); } diff --git a/lib/pages_desktop_specific/coin_control/utxo_row.dart b/lib/pages_desktop_specific/coin_control/utxo_row.dart index 548e2c05e..e27d970fc 100644 --- a/lib/pages_desktop_specific/coin_control/utxo_row.dart +++ b/lib/pages_desktop_specific/coin_control/utxo_row.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/isar/models/isar_models.dart'; @@ -78,19 +78,19 @@ class _UtxoRowState extends ConsumerState { void _details() async { await showDialog( context: context, - builder: (context) => UtxoDetailsView( - utxoId: utxo.id, - walletId: widget.walletId, - ), + builder: + (context) => + UtxoDetailsView(utxoId: utxo.id, walletId: widget.walletId), ); } @override void initState() { - utxo = MainDB.instance.isar.utxos - .where() - .idEqualTo(widget.data.utxoId) - .findFirstSync()!; + utxo = + MainDB.instance.isar.utxos + .where() + .idEqualTo(widget.data.utxoId) + .findFirstSync()!; stream = MainDB.instance.watchUTXO(id: utxo.id); super.initState(); @@ -110,15 +110,21 @@ class _UtxoRowState extends ConsumerState { } return RoundedContainer( - borderColor: widget.compact && widget.compactWithBorder - ? Theme.of(context).extension()!.textFieldDefaultBG - : null, + borderColor: + widget.compact && widget.compactWithBorder + ? Theme.of( + context, + ).extension()!.textFieldDefaultBG + : null, color: Theme.of(context).extension()!.popupBG, - boxShadow: widget.data.selected && widget.raiseOnSelected - ? [ - Theme.of(context).extension()!.standardBoxShadow, - ] - : null, + boxShadow: + widget.data.selected && widget.raiseOnSelected + ? [ + Theme.of( + context, + ).extension()!.standardBoxShadow, + ] + : null, child: Row( children: [ if (!(widget.compact && utxo.isBlocked)) @@ -132,36 +138,37 @@ class _UtxoRowState extends ConsumerState { }, ), if (!(widget.compact && utxo.isBlocked)) - const SizedBox( - width: 10, - ), + const SizedBox(width: 10), UTXOStatusIcon( blocked: utxo.isBlocked, - status: (coin is Namecoin - ? (ref.watch(pWallets).getWallet(widget.walletId) - as NamecoinWallet) - .checkUtxoConfirmed( - utxo, - ref.watch(pWalletChainHeight(widget.walletId)), - ) - : utxo.isConfirmed( - ref.watch(pWalletChainHeight(widget.walletId)), - coin.minConfirms, - coin.minCoinbaseConfirms, - )) - ? UTXOStatusIconStatus.confirmed - : UTXOStatusIconStatus.unconfirmed, + status: + (coin is Namecoin + ? (ref.watch(pWallets).getWallet(widget.walletId) + as NamecoinWallet) + .checkUtxoConfirmed( + utxo, + ref.watch( + pWalletChainHeight(widget.walletId), + ), + ) + : utxo.isConfirmed( + ref.watch(pWalletChainHeight(widget.walletId)), + coin.minConfirms, + coin.minCoinbaseConfirms, + )) + ? UTXOStatusIconStatus.confirmed + : UTXOStatusIconStatus.unconfirmed, background: Theme.of(context).extension()!.popupBG, selected: false, width: 32, height: 32, ), - const SizedBox( - width: 10, - ), + const SizedBox(width: 10), if (!widget.compact) Text( - ref.watch(pAmountFormatter(coin)).format( + ref + .watch(pAmountFormatter(coin)) + .format( Amount( rawValue: BigInt.from(utxo.value), fractionDigits: coin.fractionDigits, @@ -170,10 +177,7 @@ class _UtxoRowState extends ConsumerState { textAlign: TextAlign.right, style: STextStyles.w600_14(context), ), - if (!widget.compact) - const SizedBox( - width: 10, - ), + if (!widget.compact) const SizedBox(width: 10), Expanded( child: ConditionalParent( condition: widget.compact, @@ -183,7 +187,9 @@ class _UtxoRowState extends ConsumerState { mainAxisSize: MainAxisSize.min, children: [ Text( - ref.watch(pAmountFormatter(coin)).format( + ref + .watch(pAmountFormatter(coin)) + .format( Amount( rawValue: BigInt.from(utxo.value), fractionDigits: coin.fractionDigits, @@ -192,9 +198,7 @@ class _UtxoRowState extends ConsumerState { textAlign: TextAlign.right, style: STextStyles.w600_14(context), ), - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), child, ], ); @@ -206,27 +210,23 @@ class _UtxoRowState extends ConsumerState { textAlign: widget.compact ? TextAlign.left : TextAlign.center, style: STextStyles.w500_12(context).copyWith( - color: Theme.of(context) - .extension()! - .textSubtitle1, + color: + Theme.of( + context, + ).extension()!.textSubtitle1, ), ), ), ), - const SizedBox( - width: 10, - ), + const SizedBox(width: 10), widget.compact - ? CustomTextButton( - text: "Details", - onTap: _details, - ) + ? CustomTextButton(text: "Details", onTap: _details) : SecondaryButton( - width: 120, - buttonHeight: ButtonHeight.xs, - label: "Details", - onPressed: _details, - ), + width: 120, + buttonHeight: ButtonHeight.xs, + label: "Details", + onPressed: _details, + ), ], ), ); diff --git a/lib/pages_desktop_specific/desktop_buy/desktop_buy_view.dart b/lib/pages_desktop_specific/desktop_buy/desktop_buy_view.dart index 6c5d2dc2d..77781396a 100644 --- a/lib/pages_desktop_specific/desktop_buy/desktop_buy_view.dart +++ b/lib/pages_desktop_specific/desktop_buy/desktop_buy_view.dart @@ -10,6 +10,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../../app_config.dart'; import '../../pages/buy_view/buy_form.dart'; import '../../services/event_bus/events/global/tor_connection_status_changed_event.dart'; import '../../services/tor_service.dart'; @@ -35,8 +37,9 @@ class _DesktopBuyViewState extends ConsumerState { @override void initState() { - torEnabled = - ref.read(pTorService).status != TorConnectionStatus.disconnected; + torEnabled = AppConfig.hasFeature(AppFeature.tor) + ? ref.read(pTorService).status != TorConnectionStatus.disconnected + : false; super.initState(); } @@ -54,9 +57,7 @@ class _DesktopBuyViewState extends ConsumerState { appBar: DesktopAppBar( isCompactHeight: true, leading: Padding( - padding: const EdgeInsets.only( - left: 24, - ), + padding: const EdgeInsets.only(left: 24), child: Text( "Buy crypto", style: STextStyles.desktopH3(context), @@ -64,11 +65,7 @@ class _DesktopBuyViewState extends ConsumerState { ), ), body: const Padding( - padding: EdgeInsets.only( - left: 24, - right: 24, - bottom: 24, - ), + padding: EdgeInsets.only(left: 24, right: 24, bottom: 24), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -77,9 +74,7 @@ class _DesktopBuyViewState extends ConsumerState { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 16, - ), + SizedBox(height: 16), RoundedWhiteContainer( padding: EdgeInsets.all(24), child: BuyForm(), @@ -87,9 +82,7 @@ class _DesktopBuyViewState extends ConsumerState { ], ), ), - SizedBox( - width: 16, - ), + SizedBox(width: 16), // Expanded( // child: Row( // children: const [ @@ -105,19 +98,16 @@ class _DesktopBuyViewState extends ConsumerState { ), if (torEnabled) Container( - color: Theme.of(context) - .extension()! - .overlay - .withOpacity(0.7), + color: Theme.of( + context, + ).extension()!.overlay.withOpacity(0.7), height: MediaQuery.of(context).size.height, width: MediaQuery.of(context).size.width, child: DesktopDialog( maxHeight: 200, maxWidth: 350, child: Padding( - padding: const EdgeInsets.all( - 15.0, - ), + padding: const EdgeInsets.all(15.0), child: Column( // crossAxisAlignment: CrossAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center, @@ -127,16 +117,14 @@ class _DesktopBuyViewState extends ConsumerState { textAlign: TextAlign.center, style: STextStyles.pageTitleH1(context), ), - const SizedBox( - height: 30, - ), + const SizedBox(height: 30), Text( "Purchasing not available while Tor is enabled", textAlign: TextAlign.center, style: STextStyles.desktopTextMedium(context).copyWith( - color: Theme.of(context) - .extension()! - .infoItemLabel, + color: Theme.of( + context, + ).extension()!.infoItemLabel, ), ), ], diff --git a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart index d2a053d74..61d763bf2 100644 --- a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart +++ b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart @@ -15,7 +15,7 @@ import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../db/isar/main_db.dart'; diff --git a/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart b/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart index d589e2118..0821d2477 100644 --- a/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart +++ b/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/isar/main_db.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; @@ -40,30 +40,23 @@ class DesktopTradeHistory extends ConsumerStatefulWidget { class _DesktopTradeHistoryState extends ConsumerState { BorderRadius get _borderRadiusFirst { return BorderRadius.only( - topLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - topRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + topLeft: Radius.circular(Constants.size.circularBorderRadius), + topRight: Radius.circular(Constants.size.circularBorderRadius), ); } BorderRadius get _borderRadiusLast { return BorderRadius.only( - bottomLeft: Radius.circular( - Constants.size.circularBorderRadius, - ), - bottomRight: Radius.circular( - Constants.size.circularBorderRadius, - ), + bottomLeft: Radius.circular(Constants.size.circularBorderRadius), + bottomRight: Radius.circular(Constants.size.circularBorderRadius), ); } @override Widget build(BuildContext context) { - final trades = - ref.watch(tradesServiceProvider.select((value) => value.trades)); + final trades = ref.watch( + tradesServiceProvider.select((value) => value.trades), + ); final tradeCount = trades.length; final hasHistory = tradeCount > 0; @@ -120,144 +113,150 @@ class _DesktopTradeHistoryState extends ConsumerState { //todo: check if print needed // debugPrint("name: ${manager.walletName}"); - final tx = await MainDB.instance - .getTransactions(walletIds.first) - .filter() - .txidEqualTo(txid) - .findFirst(); + final tx = + await MainDB.instance + .getTransactions(walletIds.first) + .filter() + .txidEqualTo(txid) + .findFirst(); if (mounted) { await showDialog( context: context, - builder: (context) => Navigator( - initialRoute: TradeDetailsView.routeName, - onGenerateRoute: RouteGenerator.generateRoute, - onGenerateInitialRoutes: (_, __) { - return [ - FadePageRoute( - DesktopDialog( - maxHeight: null, - maxWidth: 580, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 32, - bottom: 16, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Text( - "Trade details", - style: STextStyles.desktopH3( - context, - ), + builder: + (context) => Navigator( + initialRoute: TradeDetailsView.routeName, + onGenerateRoute: RouteGenerator.generateRoute, + onGenerateInitialRoutes: (_, __) { + return [ + FadePageRoute( + DesktopDialog( + maxHeight: null, + maxWidth: 580, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 32, + bottom: 16, ), - DesktopDialogCloseButton( - onPressedOverride: - Navigator.of( - context, - rootNavigator: true, - ).pop, + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + "Trade details", + style: + STextStyles.desktopH3( + context, + ), + ), + DesktopDialogCloseButton( + onPressedOverride: + Navigator.of( + context, + rootNavigator: true, + ).pop, + ), + ], ), - ], - ), - ), - Flexible( - child: SingleChildScrollView( - primary: false, - child: TradeDetailsView( - tradeId: tradeId, - transactionIfSentFromStack: tx, - walletName: ref.read( - pWalletName( - walletIds.first, + ), + Flexible( + child: SingleChildScrollView( + primary: false, + child: TradeDetailsView( + tradeId: tradeId, + transactionIfSentFromStack: + tx, + walletName: ref.read( + pWalletName( + walletIds.first, + ), + ), + walletId: walletIds.first, ), ), - walletId: walletIds.first, ), - ), + ], ), - ], + ), + const RouteSettings( + name: TradeDetailsView.routeName, + ), ), - ), - const RouteSettings( - name: TradeDetailsView.routeName, - ), - ), - ]; - }, - ), + ]; + }, + ), ); } } else { unawaited( showDialog( context: context, - builder: (context) => Navigator( - initialRoute: TradeDetailsView.routeName, - onGenerateRoute: RouteGenerator.generateRoute, - onGenerateInitialRoutes: (_, __) { - return [ - FadePageRoute( - DesktopDialog( - maxHeight: null, - maxWidth: 580, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 32, - bottom: 16, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Text( - "Trade details", - style: STextStyles.desktopH3( - context, - ), + builder: + (context) => Navigator( + initialRoute: TradeDetailsView.routeName, + onGenerateRoute: RouteGenerator.generateRoute, + onGenerateInitialRoutes: (_, __) { + return [ + FadePageRoute( + DesktopDialog( + maxHeight: null, + maxWidth: 580, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 32, + bottom: 16, ), - DesktopDialogCloseButton( - onPressedOverride: - Navigator.of( - context, - rootNavigator: true, - ).pop, + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + "Trade details", + style: + STextStyles.desktopH3( + context, + ), + ), + DesktopDialogCloseButton( + onPressedOverride: + Navigator.of( + context, + rootNavigator: true, + ).pop, + ), + ], + ), + ), + Flexible( + child: SingleChildScrollView( + primary: false, + child: TradeDetailsView( + tradeId: tradeId, + transactionIfSentFromStack: + null, + walletName: null, + walletId: walletIds?.first, + ), ), - ], - ), - ), - Flexible( - child: SingleChildScrollView( - primary: false, - child: TradeDetailsView( - tradeId: tradeId, - transactionIfSentFromStack: - null, - walletName: null, - walletId: walletIds?.first, ), - ), + ], ), - ], + ), + const RouteSettings( + name: TradeDetailsView.routeName, + ), ), - ), - const RouteSettings( - name: TradeDetailsView.routeName, - ), - ), - ]; - }, - ), + ]; + }, + ), ), ); } diff --git a/lib/pages_desktop_specific/desktop_menu.dart b/lib/pages_desktop_specific/desktop_menu.dart index 9c9b9cc1d..c0cbf107f 100644 --- a/lib/pages_desktop_specific/desktop_menu.dart +++ b/lib/pages_desktop_specific/desktop_menu.dart @@ -126,19 +126,13 @@ class _DesktopMenuState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - const SizedBox( - height: 25, - ), + const SizedBox(height: 25), AnimatedContainer( duration: duration, width: _width == expandedWidth ? 70 : 32, - child: LivingStackIcon( - onPressed: toggleMinimize, - ), - ), - const SizedBox( - height: 10, + child: LivingStackIcon(onPressed: toggleMinimize), ), + const SizedBox(height: 10), AnimatedOpacity( duration: duration, opacity: _width == expandedWidth ? 1 : 0, @@ -146,40 +140,40 @@ class _DesktopMenuState extends ConsumerState { height: 28, child: Text( AppConfig.appName, - style: STextStyles.desktopH2(context).copyWith( - fontSize: 18, - height: 23.4 / 18, - ), + style: STextStyles.desktopH2( + context, + ).copyWith(fontSize: 18, height: 23.4 / 18), ), ), ), - const SizedBox( - height: 5, - ), - AnimatedContainer( - duration: duration, - width: _width == expandedWidth - ? _width - 32 // 16 padding on either side - : _width - 16, // 8 padding on either side - child: DesktopTorStatusButton( - transitionDuration: duration, - controller: torButtonController, - onPressed: () { - ref.read(currentDesktopMenuItemProvider.state).state = - DesktopMenuItemId.settings; - ref.read(selectedSettingsMenuItemStateProvider.state).state = - 4; - }, + if (AppConfig.hasFeature(AppFeature.tor)) const SizedBox(height: 5), + if (AppConfig.hasFeature(AppFeature.tor)) + AnimatedContainer( + duration: duration, + width: _width == expandedWidth + ? _width - + 32 // 16 padding on either side + : _width - 16, // 8 padding on either side + child: DesktopTorStatusButton( + transitionDuration: duration, + controller: torButtonController, + onPressed: () { + ref.read(currentDesktopMenuItemProvider.state).state = + DesktopMenuItemId.settings; + ref + .read(selectedSettingsMenuItemStateProvider.state) + .state = + 4; + }, + ), ), - ), - const SizedBox( - height: 40, - ), + const SizedBox(height: 40), Expanded( child: AnimatedContainer( duration: duration, width: _width == expandedWidth - ? _width - 32 // 16 padding on either side + ? _width - + 32 // 16 padding on either side : _width - 16, // 8 padding on either side child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, @@ -196,9 +190,7 @@ class _DesktopMenuState extends ConsumerState { ), if (AppConfig.hasFeature(AppFeature.swap) && showExchange) ...[ - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('swap'), duration: duration, @@ -212,9 +204,7 @@ class _DesktopMenuState extends ConsumerState { ], if (AppConfig.hasFeature(AppFeature.buy) && showExchange) ...[ - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('buy'), duration: duration, @@ -226,9 +216,7 @@ class _DesktopMenuState extends ConsumerState { isExpandedInitially: !_isMinimized, ), ], - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('notifications'), duration: duration, @@ -239,9 +227,7 @@ class _DesktopMenuState extends ConsumerState { controller: controllers[3], isExpandedInitially: !_isMinimized, ), - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('addressBook'), duration: duration, @@ -252,9 +238,7 @@ class _DesktopMenuState extends ConsumerState { controller: controllers[4], isExpandedInitially: !_isMinimized, ), - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('settings'), duration: duration, @@ -265,9 +249,7 @@ class _DesktopMenuState extends ConsumerState { controller: controllers[5], isExpandedInitially: !_isMinimized, ), - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('support'), duration: duration, @@ -278,9 +260,7 @@ class _DesktopMenuState extends ConsumerState { controller: controllers[6], isExpandedInitially: !_isMinimized, ), - const SizedBox( - height: 2, - ), + const SizedBox(height: 2), DesktopMenuItem( key: const ValueKey('about'), duration: duration, diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart index 96363f1e2..39e4ad6c9 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart @@ -16,7 +16,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/sqlite/firo_cache.dart'; import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart index 5cea18ff2..607bf3f9c 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart @@ -15,14 +15,16 @@ 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:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../../../models/isar/models/isar_models.dart'; import '../../../../models/keys/view_only_wallet_data.dart'; import '../../../../notifications/show_flush_bar.dart'; import '../../../../pages/receive_view/generate_receiving_uri_qr_code_view.dart'; +import '../../../../pages/receive_view/sub_widgets/mwc_slatepack_import_dialog.dart'; import '../../../../providers/providers.dart'; +import '../../../../providers/ui/preview_tx_button_state_provider.dart'; import '../../../../route_generator.dart'; import '../../../../themes/stack_colors.dart'; import '../../../../utilities/address_utils.dart'; @@ -37,6 +39,7 @@ import '../../../../wallets/crypto_currency/crypto_currency.dart'; import '../../../../wallets/isar/providers/eth/current_token_wallet_provider.dart'; import '../../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../../wallets/wallet/impl/bitcoin_wallet.dart'; +import '../../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../../wallets/wallet/intermediate/bip39_hd_wallet.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart'; @@ -48,9 +51,17 @@ import '../../../../widgets/conditional_parent.dart'; import '../../../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../../../widgets/custom_loading_overlay.dart'; import '../../../../widgets/desktop/desktop_dialog.dart'; +import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/desktop/secondary_button.dart'; +import '../../../../widgets/dialogs/s_dialog.dart'; +import '../../../../widgets/icon_widgets/clipboard_icon.dart'; +import '../../../../widgets/icon_widgets/x_icon.dart'; +import '../../../../widgets/mwc_txs_method_toggle.dart'; import '../../../../widgets/qr.dart'; import '../../../../widgets/rounded_white_container.dart'; +import '../../../../widgets/stack_dialog.dart'; +import '../../../../widgets/stack_text_field.dart'; +import '../../../../widgets/textfield_icon_button.dart'; class DesktopReceive extends ConsumerStatefulWidget { const DesktopReceive({ @@ -75,6 +86,11 @@ class _DesktopReceiveState extends ConsumerState { late final bool supportsSpark; late bool supportsMweb; late final bool showMultiType; + late final bool isMimblewimblecoin; + late TextEditingController _receiveSlateController; + String? _slate; + bool _slateToggleFlag = false; + final _slateFocusNode = FocusNode(); int _currentIndex = 0; @@ -82,6 +98,77 @@ class _DesktopReceiveState extends ConsumerState { final Map _addressMap = {}; final Map> _addressSubMap = {}; + Future _pasteSlatepack() async { + final ClipboardData? data = await clipboard.getData(Clipboard.kTextPlain); + if (data?.text != null && data!.text!.isNotEmpty) { + _slate = data.text; + _receiveSlateController.text = _slate!; + setState(() { + _slateToggleFlag = _receiveSlateController.text.isNotEmpty; + }); + } + } + + Future _onReceiveSlatePressed() async { + final wallet = + ref.read(pWallets).getWallet(walletId) as MimblewimblecoinWallet; + + Exception? ex; + final result = await showLoading( + whileFuture: wallet.fullDecodeSlatepack(_receiveSlateController.text), + context: context, + message: "Decoding slatepack...", + rootNavigator: Util.isDesktop, + onException: (e) => ex = e, + ); + + if (result == null || ex != null) { + if (mounted) { + await showDialog( + context: context, + useRootNavigator: true, + builder: (context) => StackOkDialog( + desktopPopRootNavigator: true, + title: "Slatepack receive error", + message: ex?.toString() ?? "Unexpected result without exception", + maxWidth: 400, + ), + ); + } + return; + } + + if (mounted) { + final response = + await showDialog<({String responseSlatepack, bool wasEncrypted})>( + context: context, + builder: (context) => SDialog( + child: SizedBox( + width: 700, + child: MwcSlatepackImportDialog( + walletId: widget.walletId, + clipboard: widget.clipboard, + rawSlatepack: result.raw, + decoded: result.result, + slatepackType: result.type, + ), + ), + ), + ); + + if (mounted && response != null) { + await showDialog( + context: context, + barrierDismissible: false, + builder: (context) => SlatepackResponseDialog( + responseSlatepack: response.responseSlatepack, + wasEncrypted: response.wasEncrypted, + ), + ); + } + } + } + Future generateNewAddress() async { final wallet = ref.read(pWallets).getWallet(walletId); if (wallet is MultiAddressInterface) { @@ -227,6 +314,7 @@ class _DesktopReceiveState extends ConsumerState { @override void initState() { + _receiveSlateController = TextEditingController(); walletId = widget.walletId; coin = ref.read(pWalletInfo(walletId)).coin; clipboard = widget.clipboard; @@ -237,6 +325,8 @@ class _DesktopReceiveState extends ConsumerState { !wallet.info.isViewOnly && wallet.info.isMwebEnabled; + isMimblewimblecoin = wallet is MimblewimblecoinWallet; + if (wallet is ViewOnlyOptionInterface && wallet.isViewOnly) { showMultiType = false; } else { @@ -308,6 +398,7 @@ class _DesktopReceiveState extends ConsumerState { @override void dispose() { + _receiveSlateController.dispose(); for (final subscription in _addressSubMap.values) { subscription.cancel(); } @@ -393,164 +484,188 @@ class _DesktopReceiveState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - ConditionalParent( - condition: showMultiType, - builder: - (child) => Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - DropdownButtonHideUnderline( - child: DropdownButton2( - value: _currentIndex, - items: [ - for (int i = 0; i < _walletAddressTypes.length; i++) - DropdownMenuItem( - value: i, - child: Text( - supportsSpark && - _walletAddressTypes[i] == - AddressType.p2pkh - ? "Transparent address" - : "${_walletAddressTypes[i].readableName} address", - style: STextStyles.w500_14(context), - ), - ), - ], - onChanged: (value) { - if (value != null && value != _currentIndex) { - setState(() { - _currentIndex = value; - }); - } - }, - isExpanded: true, - iconStyleData: IconStyleData( - icon: Padding( - padding: const EdgeInsets.only(right: 10), - child: SvgPicture.asset( - Assets.svg.chevronDown, - width: 12, - height: 6, - color: - Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, + const SizedBox(height: 4), + if (isMimblewimblecoin) + Padding( + padding: const EdgeInsets.all(0), + child: Container( + decoration: BoxDecoration( + color: + Theme.of( + context, + ).extension()?.textFieldDefaultBG ?? + Colors.white, // Fallback color + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: + Theme.of( + context, + ).extension()?.backgroundAppBar ?? + Colors.grey, // Fallback color + width: 1, + ), + ), + child: const SizedBox( + height: + 60, // Provide an explicit height to avoid infinite constraints + child: MwcTxsMethodToggle(), + ), + ), + ), + if (!(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) + const SizedBox(height: 20), + if (!(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) + ConditionalParent( + condition: showMultiType, + builder: (child) => Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + DropdownButtonHideUnderline( + child: DropdownButton2( + value: _currentIndex, + items: [ + for (int i = 0; i < _walletAddressTypes.length; i++) + DropdownMenuItem( + value: i, + child: Text( + supportsSpark && + _walletAddressTypes[i] == AddressType.p2pkh + ? "Transparent address" + : "${_walletAddressTypes[i].readableName} address", + style: STextStyles.w500_14(context), ), ), - ), - buttonStyleData: ButtonStyleData( - decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), + ], + onChanged: (value) { + if (value != null && value != _currentIndex) { + setState(() { + _currentIndex = value; + }); + } + }, + isExpanded: true, + iconStyleData: IconStyleData( + icon: Padding( + padding: const EdgeInsets.only(right: 10), + child: SvgPicture.asset( + Assets.svg.chevronDown, + width: 12, + height: 6, + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, ), ), - dropdownStyleData: DropdownStyleData( - offset: const Offset(0, -10), - elevation: 0, - decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), + ), + buttonStyleData: ButtonStyleData( + decoration: BoxDecoration( + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, ), ), - menuItemStyleData: const MenuItemStyleData( - padding: EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, + ), + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, ), ), ), - ), - const SizedBox(height: 12), - child, - ], - ), - child: MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - onTap: () { - clipboard.setData(ClipboardData(text: address)); - 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()!.backgroundAppBar, - width: 1, - ), - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, + ), + ), ), ), - child: RoundedWhiteContainer( - child: Column( - children: [ - Row( - children: [ - Text( - "Your ${widget.contractAddress == null ? coin.ticker : ref.watch(pCurrentTokenWallet.select((value) => value!.tokenContract.symbol))} address", - style: STextStyles.itemSubtitle(context), - ), - const Spacer(), - Row( - children: [ - SvgPicture.asset( - Assets.svg.copy, - width: 15, - height: 15, - color: - Theme.of( - context, - ).extension()!.infoItemIcons, - ), - const SizedBox(width: 4), - Text("Copy", style: STextStyles.link2(context)), - ], - ), - ], - ), - const SizedBox(height: 8), - Row( - children: [ - Expanded( - child: Text( - address, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + const SizedBox(height: 12), + child, + ], + ), + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { + clipboard.setData(ClipboardData(text: address)); + 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()!.backgroundAppBar, + width: 1, + ), + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + child: RoundedWhiteContainer( + child: Column( + children: [ + Row( + children: [ + Text( + "Your ${widget.contractAddress == null ? coin.ticker : ref.watch(pCurrentTokenWallet.select((value) => value!.tokenContract.symbol))} address", + style: STextStyles.itemSubtitle(context), + ), + const Spacer(), + Row( + children: [ + SvgPicture.asset( + Assets.svg.copy, + width: 15, + height: 15, + color: Theme.of( + context, + ).extension()!.infoItemIcons, + ), + const SizedBox(width: 4), + Text("Copy", style: STextStyles.link2(context)), + ], + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + Expanded( + child: Text( + address, + style: + STextStyles.desktopTextExtraExtraSmall( context, - ).extension()!.textDark, + ).copyWith( + color: Theme.of( + context, + ).extension()!.textDark, + ), ), ), - ), - ], - ), - ], + ], + ), + ], + ), ), ), ), ), ), - ), if (canGen) const SizedBox(height: 20), @@ -559,111 +674,238 @@ class _DesktopReceiveState extends ConsumerState { buttonHeight: ButtonHeight.l, onPressed: supportsMweb && - _walletAddressTypes[_currentIndex] == AddressType.mweb - ? generateNewMwebAddress - : supportsSpark && - _walletAddressTypes[_currentIndex] == AddressType.spark - ? generateNewSparkAddress - : generateNewAddress, + _walletAddressTypes[_currentIndex] == AddressType.mweb + ? generateNewMwebAddress + : supportsSpark && + _walletAddressTypes[_currentIndex] == AddressType.spark + ? generateNewSparkAddress + : generateNewAddress, label: "Generate new address", ), - const SizedBox(height: 32), - Center( - child: QR( - data: AddressUtils.buildUriString(coin.uriScheme, address, {}), - size: 200, + const SizedBox(height: 20), + if (isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId))) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Label Text + Text( + "Receive Slatepack", + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, + ), + textAlign: TextAlign.left, + ), + const SizedBox(height: 8), + ClipRRect( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + minLines: 1, + maxLines: 5, + key: const Key("receiveViewSlatepackFieldKey"), + controller: _receiveSlateController, + readOnly: false, + autocorrect: false, + enableSuggestions: false, + toolbarOptions: const ToolbarOptions( + copy: false, + cut: false, + paste: true, + selectAll: false, + ), + onChanged: (newValue) { + _slate = newValue; + setState(() { + _slateToggleFlag = newValue.isNotEmpty; + }); + }, + focusNode: _slateFocusNode, + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of( + context, + ).extension()!.textFieldActiveText, + height: 1.8, + ), + decoration: + standardInputDecoration( + "Enter Slatepack Message", + _slateFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: + 12, // Adjust vertical padding for better alignment + ), + suffixIcon: Padding( + padding: _receiveSlateController.text.isEmpty + ? const EdgeInsets.only(right: 8) + : const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _slateToggleFlag + ? TextFieldIconButton( + key: const Key( + "receiveViewClearSlatepackFieldButtonKey", + ), + onTap: () { + _receiveSlateController.text = ""; + _slate = ""; + setState(() { + _slateToggleFlag = false; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + key: const Key( + "receiveViewPasteSlatepackFieldButtonKey", + ), + onTap: _pasteSlatepack, + child: + _receiveSlateController.text.isEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + ], + ), + ), + ), + ), + ), + ), + ], + ) + //Padding( + // padding: const EdgeInsets.symmetric(vertical: 8.0), + // child: TextField( + // maxLines: 8, // Set to a higher number to make the height larger + // minLines: 5, // Allow it to shrink if input is small + // decoration: InputDecoration( + // labelText: 'Enter Slatepack Message', + // alignLabelWithHint: true, + // border: OutlineInputBorder( + // borderRadius: BorderRadius.circular(8), + // ), + // filled: true, + // fillColor: Theme.of(context).extension()?.textFieldDefaultBG ?? Colors.white, + // contentPadding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0), + // ), + // onChanged: (value) { + // // Handle text input changes (e.g., store in a state variable) + // debugPrint('Slatepack Message: $value'); + // }, + // ), + //) + else + Center( + child: QR( + data: AddressUtils.buildUriString(coin.uriScheme, address, {}), + size: 200, + ), ), - ), const SizedBox(height: 32), + // TODO: create transparent button class to account for hover - GestureDetector( - onTap: () async { - if (Util.isDesktop) { - await showDialog( - context: context, - builder: - (context) => DesktopDialog( - maxHeight: double.infinity, - maxWidth: 580, - child: Column( - children: [ - Row( - children: [ - const AppBarBackButton(size: 40, iconSize: 24), - Text( - "Generate QR code", - style: STextStyles.desktopH3(context), + // Conditional logic for 'Submit' button or QR code + if (isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId))) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: PrimaryButton( + buttonHeight: ButtonHeight.l, + label: "Receive Slatepack", + enabled: _slateToggleFlag, + onPressed: _slateToggleFlag ? _onReceiveSlatePressed : null, + ), + ) + else + GestureDetector( + onTap: () async { + if (Util.isDesktop) { + await showDialog( + context: context, + builder: (context) => DesktopDialog( + maxHeight: double.infinity, + maxWidth: 580, + child: Column( + children: [ + Row( + children: [ + const AppBarBackButton(size: 40, iconSize: 24), + Text( + "Generate QR code", + style: STextStyles.desktopH3(context), + ), + ], + ), + IntrinsicHeight( + child: Navigator( + onGenerateRoute: RouteGenerator.generateRoute, + onGenerateInitialRoutes: (_, __) => [ + RouteGenerator.generateRoute( + RouteSettings( + name: GenerateUriQrCodeView.routeName, + arguments: Tuple2(coin, address), + ), ), ], ), - IntrinsicHeight( - child: Navigator( - onGenerateRoute: RouteGenerator.generateRoute, - onGenerateInitialRoutes: - (_, __) => [ - RouteGenerator.generateRoute( - RouteSettings( - name: GenerateUriQrCodeView.routeName, - arguments: Tuple2(coin, address), - ), - ), - ], - ), - ), - ], - ), - ), - ); - } else { - unawaited( - Navigator.of(context).push( - RouteGenerator.getRoute( - shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute, - builder: - (_) => GenerateUriQrCodeView( - coin: coin, - receivingAddress: address, ), - settings: const RouteSettings( - name: GenerateUriQrCodeView.routeName, + ], ), ), - ), - ); - } - }, - child: Container( - color: Colors.transparent, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - Assets.svg.qrcode, - width: 14, - height: 16, - color: - Theme.of( - context, - ).extension()!.accentColorBlue, - ), - const SizedBox(width: 8), - Padding( - padding: const EdgeInsets.only(bottom: 2), - child: Text( + ); + } else { + unawaited( + Navigator.of(context).push( + RouteGenerator.getRoute( + shouldUseMaterialRoute: + RouteGenerator.useMaterialPageRoute, + builder: (_) => GenerateUriQrCodeView( + coin: coin, + receivingAddress: address, + ), + settings: const RouteSettings( + name: GenerateUriQrCodeView.routeName, + ), + ), + ), + ); + } + }, + child: Container( + color: Colors.transparent, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + Assets.svg.qrcode, + width: 14, + height: 16, + color: Theme.of( + context, + ).extension()!.accentColorBlue, + ), + const SizedBox(width: 8), + Text( "Create new QR code", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorBlue, + color: Theme.of( + context, + ).extension()!.accentColorBlue, ), ), - ), - ], + ], + ), ), ), - ), ], ); } diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index b4c183c43..c476879db 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -20,10 +20,12 @@ import 'package:flutter_svg/flutter_svg.dart'; import '../../../../models/isar/models/blockchain_data/address.dart'; import '../../../../models/isar/models/blockchain_data/utxo.dart'; import '../../../../models/isar/models/contact_entry.dart'; +import '../../../../models/mwc_slatepack_models.dart'; import '../../../../models/paynym/paynym_account_lite.dart'; import '../../../../models/send_view_auto_fill_data.dart'; import '../../../../pages/send_view/confirm_transaction_view.dart'; import '../../../../pages/send_view/sub_widgets/building_transaction_dialog.dart'; +import '../../../../pages/send_view/sub_widgets/mwc_slatepack_dialog.dart'; import '../../../../pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart'; import '../../../../providers/providers.dart'; import '../../../../providers/ui/fee_rate_type_state_provider.dart'; @@ -42,6 +44,7 @@ import '../../../../utilities/clipboard_interface.dart'; import '../../../../utilities/constants.dart'; import '../../../../utilities/logger.dart'; import '../../../../utilities/prefs.dart'; +import '../../../../utilities/show_loading.dart'; import '../../../../utilities/text_styles.dart'; import '../../../../utilities/util.dart'; import '../../../../wallets/crypto_currency/crypto_currency.dart'; @@ -49,6 +52,7 @@ import '../../../../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../../../../wallets/isar/providers/wallet_info_provider.dart'; import '../../../../wallets/models/tx_data.dart'; import '../../../../wallets/wallet/impl/firo_wallet.dart'; +import '../../../../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/coin_control_interface.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart'; import '../../../../wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart'; @@ -65,6 +69,7 @@ import '../../../../widgets/icon_widgets/addressbook_icon.dart'; import '../../../../widgets/icon_widgets/clipboard_icon.dart'; import '../../../../widgets/icon_widgets/qrcode_icon.dart'; import '../../../../widgets/icon_widgets/x_icon.dart'; +import '../../../../widgets/mwc_txs_method_toggle.dart'; import '../../../../widgets/rounded_container.dart'; import '../../../../widgets/stack_text_field.dart'; import '../../../../widgets/textfield_icon_button.dart'; @@ -112,6 +117,7 @@ class _DesktopSendState extends ConsumerState { final _nonceFocusNode = FocusNode(); late final bool isStellar; + late final bool isMimblewimblecoin; String? _note; String? _onChainNote; @@ -160,9 +166,141 @@ class _DesktopSendState extends ConsumerState { } } + /// Handle MWC slatepack creation for desktop. + Future _handleDesktopSlatepackCreation( + MimblewimblecoinWallet wallet, + ) async { + try { + final amount = ref.read(pSendAmount)!; + + Future wrappedFutureWithDelay() async { + await Future.delayed(const Duration(seconds: 1)); + return wallet.createSlatepack( + amount: amount, + recipientAddress: null, // No specific recipient for manual slatepack. + message: _onChainNote?.isNotEmpty == true ? _onChainNote : null, + encrypt: false, // No encryption without recipient address. + ); + } + + // Create slatepack. + Exception? ex; + final slatepackResult = await showLoading( + whileFuture: wrappedFutureWithDelay(), + context: context, + rootNavigator: true, + message: "Building slatepack...", + delay: const Duration(seconds: 2), + onException: (e) => ex = e, + ); + + if (slatepackResult == null || + !slatepackResult.success || + slatepackResult.slatepack == null || + ex != null) { + String error = + ex?.toString() ?? + slatepackResult?.error ?? + 'Failed to create slatepack'; + if (error.startsWith("Exception:")) { + error = error.replaceFirst("Exception:", "").trim(); + } + throw Exception(error); + } + + // refresh asap to show the pending slate tx in history + unawaited(() async { + await Future.delayed(Duration.zero); + await wallet.refresh(); + }()); + + // Show slatepack dialog. + if (mounted) { + await showDialog( + context: context, + barrierDismissible: false, + builder: (context) => DesktopDialog( + maxHeight: double.infinity, + maxWidth: 700, + child: MwcSlatepackDialog(slatepackResult: slatepackResult), + ), + ); + + // Clear form after slatepack dialog is closed. + clearSendForm(); + } + } catch (e, s) { + Logging.instance.e( + 'Failed to create MWC slatepack on desktop', + error: e, + stackTrace: s, + ); + + if (mounted) { + await showDialog( + context: context, + builder: (context) => DesktopDialog( + maxWidth: 450, + maxHeight: double.infinity, + child: Padding( + padding: const EdgeInsets.only(left: 32, bottom: 32), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Slatepack Creation Failed', + style: STextStyles.desktopH3(context), + ), + const DesktopDialogCloseButton(), + ], + ), + const SizedBox(height: 12), + Padding( + padding: const EdgeInsets.only(right: 32), + child: Text( + 'Failed to create slatepack: $e', + textAlign: TextAlign.left, + style: STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith(fontSize: 18), + ), + ), + const SizedBox(height: 40), + Padding( + padding: const EdgeInsets.only(right: 32), + child: Row( + children: [ + Expanded( + child: PrimaryButton( + buttonHeight: ButtonHeight.l, + label: 'OK', + onPressed: () => Navigator.of(context).pop(), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } + } + } + Future previewSend() async { final wallet = ref.read(pWallets).getWallet(walletId); + // Handle MWC slatepack transactions directly. + if (isMimblewimblecoin && ref.read(pIsSlatepack(widget.walletId))) { + await _handleDesktopSlatepackCreation(wallet as MimblewimblecoinWallet); + return; + } + final Amount amount = ref.read(pSendAmount)!; final Amount availableBalance; if (coin is Firo || ref.read(pWalletInfo(walletId)).isMwebEnabled) { @@ -171,18 +309,18 @@ class _DesktopSendState extends ConsumerState { availableBalance = wallet.info.cachedBalance.spendable; break; case BalanceType.private: - availableBalance = - coin is Firo - ? wallet.info.cachedBalanceTertiary.spendable - : wallet.info.cachedBalanceSecondary.spendable; + availableBalance = coin is Firo + ? wallet.info.cachedBalanceTertiary.spendable + : wallet.info.cachedBalanceSecondary.spendable; break; } } else { availableBalance = wallet.info.cachedBalance.spendable; } - final coinControlEnabled = - ref.read(prefsChangeNotifierProvider).enableCoinControl; + final coinControlEnabled = ref + .read(prefsChangeNotifierProvider) + .enableCoinControl; if (!(wallet is CoinControlInterface && coinControlEnabled) || (coinControlEnabled && ref.read(desktopUseUTXOs).isEmpty)) { @@ -323,10 +461,10 @@ class _DesktopSendState extends ConsumerState { feeRateType: feeRate, utxos: (wallet is CoinControlInterface && - coinControlEnabled && - ref.read(pDesktopUseUTXOs).isNotEmpty) - ? ref.read(pDesktopUseUTXOs) - : null, + coinControlEnabled && + ref.read(pDesktopUseUTXOs).isNotEmpty) + ? ref.read(pDesktopUseUTXOs) + : null, ), ); } else if (wallet is FiroWallet) { @@ -347,9 +485,9 @@ class _DesktopSendState extends ConsumerState { satsPerVByte: isCustomFee ? customFeeRate : null, utxos: (coinControlEnabled && - ref.read(pDesktopUseUTXOs).isNotEmpty) - ? ref.read(pDesktopUseUTXOs) - : null, + ref.read(pDesktopUseUTXOs).isNotEmpty) + ? ref.read(pDesktopUseUTXOs) + : null, ), ); } else { @@ -360,17 +498,18 @@ class _DesktopSendState extends ConsumerState { address: _address!, amount: amount, isChange: false, - addressType: - wallet.cryptoCurrency.getAddressType(_address!)!, + addressType: wallet.cryptoCurrency.getAddressType( + _address!, + )!, ), ], feeRateType: ref.read(feeRateTypeDesktopStateProvider), satsPerVByte: isCustomFee ? customFeeRate : null, utxos: (coinControlEnabled && - ref.read(pDesktopUseUTXOs).isNotEmpty) - ? ref.read(pDesktopUseUTXOs) - : null, + ref.read(pDesktopUseUTXOs).isNotEmpty) + ? ref.read(pDesktopUseUTXOs) + : null, ), ); } @@ -379,31 +518,28 @@ class _DesktopSendState extends ConsumerState { case BalanceType.private: txDataFuture = wallet.prepareSendSpark( txData: TxData( - recipients: - ref.read(pValidSparkSendToAddress) - ? null - : [ - TxRecipient( - address: _address!, - amount: amount, - isChange: false, - addressType: - wallet.cryptoCurrency.getAddressType( - _address!, - )!, - ), - ], - sparkRecipients: - ref.read(pValidSparkSendToAddress) - ? [ - ( - address: _address!, - amount: amount, - memo: memoController.text, - isChange: false, - ), - ] - : null, + recipients: ref.read(pValidSparkSendToAddress) + ? null + : [ + TxRecipient( + address: _address!, + amount: amount, + isChange: false, + addressType: wallet.cryptoCurrency.getAddressType( + _address!, + )!, + ), + ], + sparkRecipients: ref.read(pValidSparkSendToAddress) + ? [ + ( + address: _address!, + amount: amount, + memo: memoController.text, + isChange: false, + ), + ] + : null, ), ); break; @@ -447,16 +583,15 @@ class _DesktopSendState extends ConsumerState { memo: memo, feeRateType: ref.read(feeRateTypeDesktopStateProvider), satsPerVByte: isCustomFee ? customFeeRate : null, - nonce: - wallet.cryptoCurrency is Ethereum - ? int.tryParse(nonceController.text) - : null, + nonce: wallet.cryptoCurrency is Ethereum + ? int.tryParse(nonceController.text) + : null, utxos: (wallet is CoinControlInterface && - coinControlEnabled && - ref.read(pDesktopUseUTXOs).isNotEmpty) - ? ref.read(pDesktopUseUTXOs) - : null, + coinControlEnabled && + ref.read(pDesktopUseUTXOs).isNotEmpty) + ? ref.read(pDesktopUseUTXOs) + : null, ethEIP1559Fee: ethFee, ), ); @@ -477,6 +612,9 @@ class _DesktopSendState extends ConsumerState { if (coin is Epiccash) { txData = txData.copyWith(noteOnChain: _onChainNote ?? ""); } + if (coin is Mimblewimblecoin) { + txData = txData.copyWith(noteOnChain: _onChainNote ?? ""); + } } // pop building dialog Navigator.of(context, rootNavigator: true).pop(); @@ -484,18 +622,17 @@ class _DesktopSendState extends ConsumerState { unawaited( showDialog( context: context, - builder: - (context) => DesktopDialog( - maxHeight: MediaQuery.of(context).size.height - 64, - maxWidth: 580, - child: ConfirmTransactionView( - txData: txData, - walletId: walletId, - onSuccess: clearSendForm, - isPaynymTransaction: isPaynymSend, - routeOnSuccessName: DesktopHomeView.routeName, - ), - ), + builder: (context) => DesktopDialog( + maxHeight: MediaQuery.of(context).size.height - 64, + maxWidth: 580, + child: ConfirmTransactionView( + txData: txData, + walletId: walletId, + onSuccess: clearSendForm, + isPaynymTransaction: isPaynymSend, + routeOnSuccessName: DesktopHomeView.routeName, + ), + ), ), ); } @@ -594,8 +731,10 @@ class _DesktopSendState extends ConsumerState { _cachedAmountToSend = amount; - final price = - ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin)?.value; + final price = ref + .read(priceAnd24hChangeNotifierProvider) + .getPrice(coin) + ?.value; if (price != null && price > Decimal.zero) { final String fiatAmountString = (amount.decimal * price) @@ -775,6 +914,9 @@ class _DesktopSendState extends ConsumerState { if (coin is Epiccash) { content = AddressUtils().formatEpicCashAddress(content); } + if (coin is Mimblewimblecoin) { + content = AddressUtils().formatAddressMwc(content); + } sendToController.text = content; _address = content; @@ -790,6 +932,10 @@ class _DesktopSendState extends ConsumerState { // strip http:// and https:// if content contains @ content = AddressUtils().formatEpicCashAddress(content); } + if (coin is Mimblewimblecoin) { + // strip http:// and https:// if content contains @ + content = AddressUtils().formatAddressMwc(content); + } await _checkSparkNameAndOrSetAddress(content); @@ -826,18 +972,19 @@ class _DesktopSendState extends ConsumerState { ); final Amount? amount; if (baseAmount != null) { - final _price = - ref.read(priceAnd24hChangeNotifierProvider).getPrice(coin)?.value; + final _price = ref + .read(priceAnd24hChangeNotifierProvider) + .getPrice(coin) + ?.value; if (_price == null || _price == Decimal.zero) { amount = Decimal.zero.toAmount(fractionDigits: coin.fractionDigits); } else { - amount = - baseAmount <= Amount.zero - ? Decimal.zero.toAmount(fractionDigits: coin.fractionDigits) - : (baseAmount.decimal / _price) - .toDecimal(scaleOnInfinitePrecision: coin.fractionDigits) - .toAmount(fractionDigits: coin.fractionDigits); + amount = baseAmount <= Amount.zero + ? Decimal.zero.toAmount(fractionDigits: coin.fractionDigits) + : (baseAmount.decimal / _price) + .toDecimal(scaleOnInfinitePrecision: coin.fractionDigits) + .toAmount(fractionDigits: coin.fractionDigits); } if (_cachedAmountToSend != null && _cachedAmountToSend == amount) { return; @@ -889,10 +1036,9 @@ class _DesktopSendState extends ConsumerState { amount = ref.read(pWalletBalance(walletId)).spendable; break; case BalanceType.private: - amount = - coin is Firo - ? ref.read(pWalletBalanceTertiary(walletId)).spendable - : ref.read(pWalletBalanceSecondary(walletId)).spendable; + amount = coin is Firo + ? ref.read(pWalletBalanceTertiary(walletId)).spendable + : ref.read(pWalletBalanceSecondary(walletId)).spendable; break; } } else { @@ -908,11 +1054,10 @@ class _DesktopSendState extends ConsumerState { final amount = ref.read(pSendAmount); await showDialog( context: context, - builder: - (context) => DesktopCoinControlUseDialog( - walletId: widget.walletId, - amountToSend: amount, - ), + builder: (context) => DesktopCoinControlUseDialog( + walletId: widget.walletId, + amountToSend: amount, + ), ); } @@ -932,6 +1077,7 @@ class _DesktopSendState extends ConsumerState { clipboard = widget.clipboard; isStellar = coin is Stellar; + isMimblewimblecoin = coin is Mimblewimblecoin; sendToController = TextEditingController(); cryptoAmountController = TextEditingController(); @@ -1026,6 +1172,21 @@ class _DesktopSendState extends ConsumerState { final balType = ref.watch(publicPrivateBalanceStateProvider); + if (coin is Mimblewimblecoin) { + sendToController.addListener(() { + _address = sendToController.text; + + if (_address != null && _address!.isNotEmpty) { + _address = _address!.trim(); + if (_address!.contains("\n")) { + _address = _address!.substring(0, _address!.indexOf("\n")); + } + + sendToController.text = formatAddressMwc(_address!); + } + }); + } + final isMwebEnabled = ref.watch( pWalletInfo(walletId).select((s) => s.isMwebEnabled), ); @@ -1059,14 +1220,42 @@ class _DesktopSendState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 4), - if (showPrivateBalance) + if (showPrivateBalance) const SizedBox(height: 4), + if (isMimblewimblecoin) + Padding( + padding: const EdgeInsets.only(bottom: 16), + child: Container( + decoration: BoxDecoration( + color: + Theme.of( + context, + ).extension()?.textFieldDefaultBG ?? + Colors.white, // Fallback color + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: + Theme.of( + context, + ).extension()?.backgroundAppBar ?? + Colors.grey, // Fallback color + width: 1, + ), + ), + child: const SizedBox( + height: + 60, // Provide an explicit height to avoid infinite constraints + child: MwcTxsMethodToggle(), + ), + ), + ), + + if (coin is Firo) Text( "Send from", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), textAlign: TextAlign.left, ), @@ -1147,10 +1336,9 @@ class _DesktopSendState extends ConsumerState { offset: const Offset(0, -10), elevation: 0, decoration: BoxDecoration( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -1192,10 +1380,9 @@ class _DesktopSendState extends ConsumerState { Text( "Amount", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), textAlign: TextAlign.left, ), @@ -1219,13 +1406,12 @@ class _DesktopSendState extends ConsumerState { key: const Key("amountInputFieldCryptoTextFieldKey"), controller: cryptoAmountController, focusNode: _cryptoFocus, - keyboardType: - Util.isDesktop - ? null - : const TextInputType.numberWithOptions( - signed: false, - decimal: true, - ), + keyboardType: Util.isDesktop + ? null + : const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), textAlign: TextAlign.right, inputFormatters: [ AmountInputFormatter( @@ -1249,10 +1435,9 @@ class _DesktopSendState extends ConsumerState { ), hintText: "0", hintStyle: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultText, + color: Theme.of( + context, + ).extension()!.textFieldDefaultText, ), prefixIcon: FittedBox( fit: BoxFit.scaleDown, @@ -1261,10 +1446,9 @@ class _DesktopSendState extends ConsumerState { child: Text( ref.watch(pAmountUnit(coin)).unitForCoin(coin), style: STextStyles.smallMed14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), ), @@ -1282,13 +1466,12 @@ class _DesktopSendState extends ConsumerState { key: const Key("amountInputFieldFiatTextFieldKey"), controller: baseAmountController, focusNode: _baseFocus, - keyboardType: - Util.isDesktop - ? null - : const TextInputType.numberWithOptions( - signed: false, - decimal: true, - ), + keyboardType: Util.isDesktop + ? null + : const TextInputType.numberWithOptions( + signed: false, + decimal: true, + ), textAlign: TextAlign.right, inputFormatters: [ AmountInputFormatter(decimals: 2, locale: locale), @@ -1308,10 +1491,9 @@ class _DesktopSendState extends ConsumerState { ), hintText: "0", hintStyle: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldDefaultText, + color: Theme.of( + context, + ).extension()!.textFieldDefaultText, ), prefixIcon: FittedBox( fit: BoxFit.scaleDown, @@ -1324,10 +1506,9 @@ class _DesktopSendState extends ConsumerState { ), ), style: STextStyles.smallMed14(context).copyWith( - color: - Theme.of( - context, - ).extension()!.accentColorDark, + color: Theme.of( + context, + ).extension()!.accentColorDark, ), ), ), @@ -1338,8 +1519,9 @@ class _DesktopSendState extends ConsumerState { if (showCoinControl) RoundedContainer( color: Colors.transparent, - borderColor: - Theme.of(context).extension()!.textFieldDefaultBG, + borderColor: Theme.of( + context, + ).extension()!.textFieldDefaultBG, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -1348,29 +1530,31 @@ class _DesktopSendState extends ConsumerState { style: STextStyles.desktopTextExtraExtraSmall(context), ), CustomTextButton( - text: - ref.watch(desktopUseUTXOs.state).state.isEmpty - ? "Select coins" - : "Selected coins (${ref.watch(desktopUseUTXOs.state).state.length})", + text: ref.watch(desktopUseUTXOs.state).state.isEmpty + ? "Select coins" + : "Selected coins (${ref.watch(desktopUseUTXOs.state).state.length})", onTap: _showDesktopCoinControl, ), ], ), ), const SizedBox(height: 20), - if (!isPaynymSend) + if (!isPaynymSend && + !(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) Text( "Send to", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), textAlign: TextAlign.left, ), - if (!isPaynymSend) const SizedBox(height: 10), - if (!isPaynymSend) + if (!isPaynymSend && + !(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) + const SizedBox(height: 10), + if (!isPaynymSend && + !(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) ClipRRect( borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, @@ -1421,132 +1605,135 @@ class _DesktopSendState extends ConsumerState { }, focusNode: _addressFocusNode, style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveText, + color: Theme.of( + context, + ).extension()!.textFieldActiveText, height: 1.8, ), - decoration: standardInputDecoration( - "Enter ${coin.ticker} address", - _addressFocusNode, - context, - desktopMed: true, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 11, - bottom: 12, - right: 5, - ), - suffixIcon: Padding( - padding: - sendToController.text.isEmpty + decoration: + standardInputDecoration( + ref.watch(pIsSlatepack(widget.walletId)) + ? "Enter ${coin.ticker} address (optional)" + : "Enter ${coin.ticker} address", + _addressFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 11, + bottom: 12, + right: 5, + ), + suffixIcon: Padding( + padding: sendToController.text.isEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _addressToggleFlag - ? TextFieldIconButton( - key: const Key( - "sendViewClearAddressFieldButtonKey", - ), - onTap: () { - sendToController.text = ""; - _address = ""; - _setValidAddressProviders(_address); - setState(() { - _addressToggleFlag = false; - }); - }, - child: const XIcon(), - ) - : TextFieldIconButton( - key: const Key( - "sendViewPasteAddressFieldButtonKey", - ), - onTap: pasteAddress, - child: - sendToController.text.isEmpty - ? const ClipboardIcon() - : const XIcon(), - ), - if (sendToController.text.isEmpty) - TextFieldIconButton( - key: const Key("sendViewAddressBookButtonKey"), - onTap: () async { - final entry = await showDialog< - ContactAddressEntry? - >( - context: context, - builder: - (context) => DesktopDialog( - maxWidth: 696, - maxHeight: 600, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _addressToggleFlag + ? TextFieldIconButton( + key: const Key( + "sendViewClearAddressFieldButtonKey", + ), + onTap: () { + sendToController.text = ""; + _address = ""; + _setValidAddressProviders(_address); + setState(() { + _addressToggleFlag = false; + }); + }, + child: const XIcon(), + ) + : TextFieldIconButton( + key: const Key( + "sendViewPasteAddressFieldButtonKey", + ), + onTap: pasteAddress, + child: sendToController.text.isEmpty + ? const ClipboardIcon() + : const XIcon(), + ), + if (sendToController.text.isEmpty) + TextFieldIconButton( + key: const Key("sendViewAddressBookButtonKey"), + onTap: () async { + final entry = + await showDialog( + context: context, + builder: (context) => DesktopDialog( + maxWidth: 696, + maxHeight: 600, + child: Column( + mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsets.only( - left: 32, - ), - child: Text( - "Address book", - style: STextStyles.desktopH3( - context, + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Padding( + padding: + const EdgeInsets.only( + left: 32, + ), + child: Text( + "Address book", + style: + STextStyles.desktopH3( + context, + ), + ), ), - ), + const DesktopDialogCloseButton(), + ], + ), + Expanded( + child: + AddressBookAddressChooser( + coin: coin, + ), ), - const DesktopDialogCloseButton(), ], ), - Expanded( - child: AddressBookAddressChooser( - coin: coin, - ), - ), - ], - ), - ), - ); + ), + ); - if (entry != null) { - sendToController.text = - entry.other ?? entry.label; + if (entry != null) { + sendToController.text = + entry.other ?? entry.label; - _address = entry.address; + _address = entry.address; - _setValidAddressProviders(_address); + _setValidAddressProviders(_address); - setState(() { - _addressToggleFlag = true; - }); - } - }, - child: const AddressBookIcon(), - ), - if (sendToController.text.isEmpty) - TextFieldIconButton( - semanticsLabel: - "Scan QR Button. Opens Camera For Scanning QR Code.", - key: const Key("sendViewScanQrButtonKey"), - onTap: scanWebcam, - child: const QrCodeIcon(), - ), - ], + setState(() { + _addressToggleFlag = true; + }); + } + }, + child: const AddressBookIcon(), + ), + if (sendToController.text.isEmpty) + TextFieldIconButton( + semanticsLabel: + "Scan QR Button. Opens Camera For Scanning QR Code.", + key: const Key("sendViewScanQrButtonKey"), + onTap: scanWebcam, + child: const QrCodeIcon(), + ), + ], + ), + ), ), ), - ), - ), ), ), - if (!isPaynymSend) + if (!isPaynymSend && + !(isMimblewimblecoin && ref.watch(pIsSlatepack(widget.walletId)))) Builder( builder: (_) { final String? error; @@ -1565,6 +1752,11 @@ class _DesktopSendState extends ConsumerState { } else { if (_data != null && _data.contactLabel == _address) { error = null; + } else if (coin is Mimblewimblecoin && + ref.watch(pIsSlatepack(widget.walletId))) { + // For MWC slatepack transactions, address validation is not required. + // TODO: When implementing encrypted slatepacks, address validation will be required. + error = null; } else if (!ref.watch(pValidSendToAddress)) { error = "Invalid address"; } else { @@ -1583,10 +1775,9 @@ class _DesktopSendState extends ConsumerState { error, textAlign: TextAlign.left, style: STextStyles.label(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textError, + color: Theme.of( + context, + ).extension()!.textError, ), ), ), @@ -1615,51 +1806,52 @@ class _DesktopSendState extends ConsumerState { setState(() {}); }, style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveText, + color: Theme.of( + context, + ).extension()!.textFieldActiveText, height: 1.8, ), - decoration: standardInputDecoration( - "Enter memo (optional)", - _memoFocus, - context, - desktopMed: true, - ).copyWith( - counterText: '', - contentPadding: const EdgeInsets.only( - left: 16, - top: 11, - bottom: 12, - right: 5, - ), - suffixIcon: Padding( - padding: - memoController.text.isEmpty + decoration: + standardInputDecoration( + "Enter memo (optional)", + _memoFocus, + context, + desktopMed: true, + ).copyWith( + counterText: '', + contentPadding: const EdgeInsets.only( + left: 16, + top: 11, + bottom: 12, + right: 5, + ), + suffixIcon: Padding( + padding: memoController.text.isEmpty ? const EdgeInsets.only(right: 8) : const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - TextFieldIconButton( - key: const Key("sendViewPasteMemoButtonKey"), - onTap: pasteMemo, - child: - memoController.text.isEmpty + child: UnconstrainedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + TextFieldIconButton( + key: const Key("sendViewPasteMemoButtonKey"), + onTap: pasteMemo, + child: memoController.text.isEmpty ? const ClipboardIcon() : const XIcon(), + ), + ], ), - ], + ), ), ), - ), - ), ), ), if (!isPaynymSend) const SizedBox(height: 20), - if (coin is! NanoCurrency && coin is! Epiccash && coin is! Tezos) + if (coin is! NanoCurrency && + coin is! Epiccash && + coin is! Tezos && + coin is! Mimblewimblecoin) DesktopSendFeeForm( walletId: walletId, isToken: false, @@ -1676,10 +1868,9 @@ class _DesktopSendState extends ConsumerState { Text( "Nonce", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), textAlign: TextAlign.left, ), @@ -1700,34 +1891,37 @@ class _DesktopSendState extends ConsumerState { keyboardType: const TextInputType.numberWithOptions(), focusNode: _nonceFocusNode, style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveText, + color: Theme.of( + context, + ).extension()!.textFieldActiveText, height: 1.8, ), - decoration: standardInputDecoration( - "Leave empty to auto select nonce", - _nonceFocusNode, - context, - desktopMed: true, - ).copyWith( - contentPadding: const EdgeInsets.only( - left: 16, - top: 11, - bottom: 12, - right: 5, - ), - ), + decoration: + standardInputDecoration( + "Leave empty to auto select nonce", + _nonceFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 11, + bottom: 12, + right: 5, + ), + ), ), ), const SizedBox(height: 36), PrimaryButton( buttonHeight: ButtonHeight.l, - label: "Preview send", + label: ref.watch(pIsSlatepack(widget.walletId)) + ? "Create slatepack" + : "Preview send", enabled: ref.watch(pPreviewTxButtonEnabled(coin)), - onPressed: - ref.watch(pPreviewTxButtonEnabled(coin)) ? previewSend : null, + onPressed: ref.watch(pPreviewTxButtonEnabled(coin)) + ? previewSend + : null, ), ], ); @@ -1752,3 +1946,29 @@ String formatAddress(String epicAddress) { } return epicAddress; } + +String formatAddressMwc(String mimblewimblecoinAddress) { + // strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an mwcmqs address) + if ((mimblewimblecoinAddress.startsWith("http://") || + mimblewimblecoinAddress.startsWith("https://")) && + mimblewimblecoinAddress.contains("@")) { + mimblewimblecoinAddress = mimblewimblecoinAddress.replaceAll("http://", ""); + mimblewimblecoinAddress = mimblewimblecoinAddress.replaceAll( + "https://", + "", + ); + } + // strip mailto: prefix + if (mimblewimblecoinAddress.startsWith("mailto:")) { + mimblewimblecoinAddress = mimblewimblecoinAddress.replaceAll("mailto:", ""); + } + // strip / suffix if the address contains an @ symbol (and is thus an mwcmqs address) + if (mimblewimblecoinAddress.endsWith("/") && + mimblewimblecoinAddress.contains("@")) { + mimblewimblecoinAddress = mimblewimblecoinAddress.substring( + 0, + mimblewimblecoinAddress.length - 1, + ); + } + return mimblewimblecoinAddress; +} diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send_fee_form.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send_fee_form.dart index 69757ac7c..462262d9c 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send_fee_form.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send_fee_form.dart @@ -1,4 +1,3 @@ -import 'package:cs_monero/cs_monero.dart' as lib_monero; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -22,6 +21,7 @@ import '../../../../widgets/custom_buttons/blue_text_button.dart'; import '../../../../widgets/desktop/desktop_fee_dialog.dart'; import '../../../../widgets/eth_fee_form.dart'; import '../../../../widgets/fee_slider.dart'; +import '../../../../wl_gen/interfaces/cs_monero_interface.dart'; class DesktopSendFeeForm extends ConsumerStatefulWidget { const DesktopSendFeeForm({ @@ -86,47 +86,44 @@ class _DesktopSendFeeFormState extends ConsumerState { children: [ ConditionalParent( condition: canEditFees, - builder: - (child) => Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - child, - CustomTextButton( - text: "Edit", - onTap: () async { - feeSelectionResult = - await showDialog<(FeeRateType, String?, String?)?>( - context: context, - builder: - (_) => DesktopFeeDialog( - walletId: widget.walletId, - isToken: widget.isToken, - ), - ); + builder: (child) => Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + child, + CustomTextButton( + text: "Edit", + onTap: () async { + feeSelectionResult = + await showDialog<(FeeRateType, String?, String?)?>( + context: context, + builder: (_) => DesktopFeeDialog( + walletId: widget.walletId, + isToken: widget.isToken, + ), + ); - if (feeSelectionResult != null) { - if (_isCustomFee && - feeSelectionResult!.$1 != FeeRateType.custom) { - _isCustomFee = false; - } else if (!_isCustomFee && - feeSelectionResult!.$1 == FeeRateType.custom) { - _isCustomFee = true; - } - } + if (feeSelectionResult != null) { + if (_isCustomFee && + feeSelectionResult!.$1 != FeeRateType.custom) { + _isCustomFee = false; + } else if (!_isCustomFee && + feeSelectionResult!.$1 == FeeRateType.custom) { + _isCustomFee = true; + } + } - setState(() {}); - }, - ), - ], + setState(() {}); + }, ), + ], + ), child: Text( "Transaction fee" "${_isCustomFee ? "" : " (${isEth ? "max" : "estimated"})"}", style: STextStyles.desktopTextExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveSearchIconRight, + color: Theme.of( + context, + ).extension()!.textFieldActiveSearchIconRight, ), textAlign: TextAlign.left, ), @@ -135,162 +132,155 @@ class _DesktopSendFeeFormState extends ConsumerState { if (!_isCustomFee) Padding( padding: const EdgeInsets.all(10), - child: - (feeSelectionResult?.$2 == null) - ? FutureBuilder( - future: ref.watch( - pWallets.select( - (value) => value.getWallet(widget.walletId).fees, - ), + child: (feeSelectionResult?.$2 == null) + ? FutureBuilder( + future: ref.watch( + pWallets.select( + (value) => value.getWallet(widget.walletId).fees, ), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done && - snapshot.hasData) { - return DesktopFeeItem( - feeObject: snapshot.data, - feeRateType: FeeRateType.average, - walletId: widget.walletId, - isButton: false, - feeFor: ({ - required Amount amount, - required FeeRateType feeRateType, - required BigInt feeRate, - required CryptoCurrency coin, - }) async { - if (ref - .read( - widget.isToken - ? tokenFeeSessionCacheProvider - : feeSheetSessionCacheProvider, - ) - .average[amount] == - null) { - if (widget.isToken == false) { - final wallet = ref - .read(pWallets) - .getWallet(widget.walletId); + ), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done && + snapshot.hasData) { + return DesktopFeeItem( + feeObject: snapshot.data, + feeRateType: FeeRateType.average, + walletId: widget.walletId, + isButton: false, + feeFor: + ({ + required Amount amount, + required FeeRateType feeRateType, + required BigInt feeRate, + required CryptoCurrency coin, + }) async { + if (ref + .read( + widget.isToken + ? tokenFeeSessionCacheProvider + : feeSheetSessionCacheProvider, + ) + .average[amount] == + null) { + if (widget.isToken == false) { + final wallet = ref + .read(pWallets) + .getWallet(widget.walletId); - if (coin is Monero || coin is Wownero) { - final fee = await wallet.estimateFeeFor( - amount, - BigInt.from( - lib_monero - .TransactionPriority - .medium - .value, - ), - ); - ref - .read(feeSheetSessionCacheProvider) - .average[amount] = - fee; - } else if ((coin is Firo) && + if (coin is Monero || coin is Wownero) { + final fee = await wallet.estimateFeeFor( + amount, + BigInt.from( + csMonero.getTxPriorityMedium(), + ), + ); ref + .read( + feeSheetSessionCacheProvider, + ) + .average[amount] = + fee; + } else if ((coin is Firo) && + ref + .read( + publicPrivateBalanceStateProvider + .state, + ) + .state != + BalanceType.public) { + final firoWallet = wallet as FiroWallet; + + if (ref .read( publicPrivateBalanceStateProvider .state, ) - .state != - BalanceType.public) { - final firoWallet = wallet as FiroWallet; - - if (ref - .read( - publicPrivateBalanceStateProvider - .state, - ) - .state == - BalanceType.private) { + .state == + BalanceType.private) { + ref + .read(feeSheetSessionCacheProvider) + .average[amount] = await firoWallet + .estimateFeeForSpark(amount); + } + } else { ref .read(feeSheetSessionCacheProvider) - .average[amount] = await firoWallet - .estimateFeeForSpark(amount); + .average[amount] = await wallet + .estimateFeeFor(amount, feeRate); } } else { - ref - .read(feeSheetSessionCacheProvider) - .average[amount] = await wallet + final tokenWallet = ref.read( + pCurrentTokenWallet, + )!; + final fee = await tokenWallet .estimateFeeFor(amount, feeRate); + ref + .read(tokenFeeSessionCacheProvider) + .average[amount] = + fee; } - } else { - final tokenWallet = - ref.read(pCurrentTokenWallet)!; - final fee = await tokenWallet.estimateFeeFor( - amount, - feeRate, - ); - ref - .read(tokenFeeSessionCacheProvider) - .average[amount] = - fee; } - } - return ref - .read( - widget.isToken - ? tokenFeeSessionCacheProvider - : feeSheetSessionCacheProvider, - ) - .average[amount]!; - }, - isSelected: true, - ); - } else { - return Row( - children: [ - AnimatedText( - stringsToLoopThrough: stringsToLoopThrough, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension()! - .textFieldActiveText, - ), - ), - ], - ); - } - }, - ) - : Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - feeSelectionResult?.$2 ?? "", - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveText, - ), - textAlign: TextAlign.left, - ), - Text( - feeSelectionResult?.$3 ?? "", - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, - ), - ), - ], - ), + return ref + .read( + widget.isToken + ? tokenFeeSessionCacheProvider + : feeSheetSessionCacheProvider, + ) + .average[amount]!; + }, + isSelected: true, + ); + } else { + return Row( + children: [ + AnimatedText( + stringsToLoopThrough: stringsToLoopThrough, + style: + STextStyles.desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of(context) + .extension()! + .textFieldActiveText, + ), + ), + ], + ); + } + }, + ) + : Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + feeSelectionResult?.$2 ?? "", + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of( + context, + ).extension()!.textFieldActiveText, + ), + textAlign: TextAlign.left, + ), + Text( + feeSelectionResult?.$3 ?? "", + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, + ), + ), + ], + ), ), if (_isCustomFee && isEth) EthFeeForm( - minGasLimit: - widget.isToken - ? kEthereumTokenMinGasLimit - : kEthereumMinGasLimit, - stateChanged: - (value) => widget.onCustomEip1559FeeOptionChanged?.call(value), + minGasLimit: widget.isToken + ? kEthereumTokenMinGasLimit + : kEthereumMinGasLimit, + stateChanged: (value) => + widget.onCustomEip1559FeeOptionChanged?.call(value), ), if (_isCustomFee && !isEth) Padding( diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart index e5b05270f..8d14c789d 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart @@ -24,6 +24,7 @@ import '../../../../pages/monkey/monkey_view.dart'; import '../../../../pages/namecoin_names/namecoin_names_home_view.dart'; import '../../../../pages/paynym/paynym_claim_view.dart'; import '../../../../pages/paynym/paynym_home_view.dart'; +import '../../../../pages/salvium_stake/salvium_create_stake_view.dart'; import '../../../../pages/spark_names/spark_names_home_view.dart'; import '../../../../providers/desktop/current_desktop_menu_item.dart'; import '../../../../providers/global/paynym_api_provider.dart'; @@ -54,6 +55,7 @@ import '../../../../wallets/wallet/wallet_mixin_interfaces/spark_interface.dart' import '../../../../wallets/wallet/wallet_mixin_interfaces/view_only_option_interface.dart'; import '../../../../widgets/custom_loading_overlay.dart'; import '../../../../widgets/desktop/desktop_dialog.dart'; +import '../../../../widgets/desktop/desktop_dialog_close_button.dart'; import '../../../../widgets/desktop/primary_button.dart'; import '../../../../widgets/desktop/secondary_button.dart'; import '../../../../widgets/loading_indicator.dart'; @@ -85,6 +87,7 @@ enum WalletFeature { churn("Churn", "Churning"), namecoinName("Domains", "Namecoin DNS"), sparkNames("Names", "Spark names"), + salviumStaking("Staking", "Staking"), // special cases clearSparkCache("", ""), @@ -126,9 +129,8 @@ class _DesktopWalletFeaturesState extends ConsumerState { ) async { await showDialog( context: context, - builder: - (_) => - MoreFeaturesDialog(walletId: widget.walletId, options: options), + builder: (_) => + MoreFeaturesDialog(walletId: widget.walletId, options: options), ); } @@ -154,49 +156,48 @@ class _DesktopWalletFeaturesState extends ConsumerState { await showDialog( context: context, barrierDismissible: false, - builder: - (context) => DesktopDialog( - maxWidth: 500, - maxHeight: double.infinity, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 20), - child: Column( + builder: (context) => DesktopDialog( + maxWidth: 500, + maxHeight: double.infinity, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 20), + child: Column( + children: [ + Text("Attention!", style: STextStyles.desktopH2(context)), + const SizedBox(height: 16), + Text( + "You're about to privatize all of your public funds.", + style: STextStyles.desktopTextSmall(context), + ), + const SizedBox(height: 32), + Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("Attention!", style: STextStyles.desktopH2(context)), - const SizedBox(height: 16), - Text( - "You're about to privatize all of your public funds.", - style: STextStyles.desktopTextSmall(context), + SecondaryButton( + width: 200, + buttonHeight: ButtonHeight.l, + label: "Cancel", + onPressed: () { + Navigator.of(context).pop(); + }, ), - const SizedBox(height: 32), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SecondaryButton( - width: 200, - buttonHeight: ButtonHeight.l, - label: "Cancel", - onPressed: () { - Navigator.of(context).pop(); - }, - ), - const SizedBox(width: 20), - PrimaryButton( - width: 200, - buttonHeight: ButtonHeight.l, - label: "Continue", - onPressed: () { - Navigator.of(context).pop(); - - unawaited(_attemptAnonymize()); - }, - ), - ], + const SizedBox(width: 20), + PrimaryButton( + width: 200, + buttonHeight: ButtonHeight.l, + label: "Continue", + onPressed: () { + Navigator.of(context).pop(); + + unawaited(_attemptAnonymize()); + }, ), ], ), - ), + ], ), + ), + ), ); } @@ -205,14 +206,13 @@ class _DesktopWalletFeaturesState extends ConsumerState { unawaited( showDialog( context: context, - builder: - (context) => WillPopScope( - child: const CustomLoadingOverlay( - message: "Privatizing balance", - eventBus: null, - ), - onWillPop: () async => shouldPop, - ), + builder: (context) => WillPopScope( + child: const CustomLoadingOverlay( + message: "Privatizing balance", + eventBus: null, + ), + onWillPop: () async => shouldPop, + ), ), ); @@ -265,46 +265,44 @@ class _DesktopWalletFeaturesState extends ConsumerState { ).popUntil(ModalRoute.withName(DesktopWalletView.routeName)); await showDialog( context: context, - builder: - (_) => DesktopDialog( - maxWidth: 400, - maxHeight: 300, - child: Padding( - padding: const EdgeInsets.all(24), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + builder: (_) => DesktopDialog( + maxWidth: 400, + maxHeight: 300, + child: Padding( + padding: const EdgeInsets.all(24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Privatize all failed", + style: STextStyles.desktopH3(context), + ), + const Spacer(flex: 1), + Text( + "Reason: $e", + style: STextStyles.desktopTextSmall(context), + ), + const Spacer(flex: 2), + Row( children: [ - Text( - "Privatize all failed", - style: STextStyles.desktopH3(context), - ), - const Spacer(flex: 1), - Text( - "Reason: $e", - style: STextStyles.desktopTextSmall(context), - ), - const Spacer(flex: 2), - Row( - children: [ - const Spacer(), - const SizedBox(width: 16), - Expanded( - child: PrimaryButton( - label: "Ok", - buttonHeight: ButtonHeight.l, - onPressed: - Navigator.of( - context, - rootNavigator: true, - ).pop, - ), - ), - ], + const Spacer(), + const SizedBox(width: 16), + Expanded( + child: PrimaryButton( + label: "Ok", + buttonHeight: ButtonHeight.l, + onPressed: Navigator.of( + context, + rootNavigator: true, + ).pop, + ), ), ], ), - ), + ], ), + ), + ), ); } } @@ -386,6 +384,39 @@ class _DesktopWalletFeaturesState extends ConsumerState { ).pushNamed(SparkNamesHomeView.routeName, arguments: widget.walletId); } + Future _onSalviumStakePressed() async { + await showDialog( + context: context, + builder: (context) => DesktopDialog( + maxWidth: 500, + maxHeight: double.infinity, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(left: 32), + child: Text( + "Create stake transaction", + style: STextStyles.desktopH3(context), + ), + ), + const DesktopDialogCloseButton(), + ], + ), + const SizedBox(height: 20), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 32), + child: SalviumCreateStakeView(walletId: widget.walletId), + ), + const SizedBox(height: 32), + ], + ), + ), + ); + } + List<(WalletFeature, String, FutureOr Function())> _getOptions( Wallet wallet, bool showExchange, @@ -417,6 +448,13 @@ class _DesktopWalletFeaturesState extends ConsumerState { if (showExchange && AppConfig.hasFeature(AppFeature.buy)) (WalletFeature.buy, Assets.svg.swap, _onBuyPressed), + if (wallet is LibSalviumWallet) + ( + WalletFeature.salviumStaking, + Assets.svg.recycle, + _onSalviumStakePressed, + ), + if (showCoinControl) ( WalletFeature.coinControl, @@ -447,7 +485,9 @@ class _DesktopWalletFeaturesState extends ConsumerState { if (wallet.info.coin is Banano) (WalletFeature.monkey, Assets.svg.monkey, _onMonkeyPressed), - if (!isViewOnly && wallet is CashFusionInterface) + if (AppConfig.hasFeature(AppFeature.tor) && + !isViewOnly && + wallet is CashFusionInterface) (WalletFeature.fusion, Assets.svg.cashFusion, _onFusionPressed), if (!isViewOnly && @@ -493,8 +533,8 @@ class _DesktopWalletFeaturesState extends ConsumerState { canGen = (wallet is MultiAddressInterface || - wallet is SparkInterface || - supportsMweb); + wallet is SparkInterface || + supportsMweb); } final showMwebOption = wallet is MwebInterface && !wallet.isViewOnly; @@ -523,16 +563,14 @@ class _DesktopWalletFeaturesState extends ConsumerState { Assets.svg.bars, height: 20, width: 20, - color: - Theme.of( - context, - ).extension()!.buttonTextSecondary, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, ), - onPressed: - () => _onMorePressed([ - ...options.sublist(options.length - count), - ...extraOptions, - ]), + onPressed: () => _onMorePressed([ + ...options.sublist(options.length - count), + ...extraOptions, + ]), ), ); }, @@ -545,30 +583,27 @@ class _DesktopWalletFeaturesState extends ConsumerState { label: option.$1.label, padding: const EdgeInsets.symmetric(horizontal: 16), buttonHeight: ButtonHeight.l, - icon: - option.$1 == WalletFeature.buy - ? SvgPicture.file( - File( - ref.watch( - themeProvider.select((value) => value.assets.buy), - ), + icon: option.$1 == WalletFeature.buy + ? SvgPicture.file( + File( + ref.watch( + themeProvider.select((value) => value.assets.buy), ), - height: 20, - width: 20, - color: - Theme.of( - context, - ).extension()!.buttonTextSecondary, - ) - : SvgPicture.asset( - option.$2, - height: 20, - width: 20, - color: - Theme.of( - context, - ).extension()!.buttonTextSecondary, ), + height: 20, + width: 20, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, + ) + : SvgPicture.asset( + option.$2, + height: 20, + width: 20, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, + ), onPressed: () => option.$3(), ), ), diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart index 622630c4a..9a8d94da6 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart @@ -12,6 +12,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../../frost_route_generator.dart'; +import '../../../../pages/finalize_view/finalize_view.dart'; import '../../../../pages/send_view/frost_ms/frost_send_view.dart'; import '../../../../pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart'; import '../../../../providers/global/wallets_provider.dart'; @@ -28,11 +29,7 @@ import 'desktop_send.dart'; import 'desktop_token_send.dart'; class MyWallet extends ConsumerStatefulWidget { - const MyWallet({ - super.key, - required this.walletId, - this.contractAddress, - }); + const MyWallet({super.key, required this.walletId, this.contractAddress}); final String walletId; final String? contractAddress; @@ -42,14 +39,12 @@ class MyWallet extends ConsumerStatefulWidget { } class _MyWalletState extends ConsumerState { - final titles = [ - "Send", - "Receive", - ]; + final titles = ["Send", "Receive"]; late final bool isEth; late final CryptoCurrency coin; late final bool isFrost; + late final bool isMimblewimblecoin; late final bool isViewOnly; @override @@ -58,6 +53,11 @@ class _MyWalletState extends ConsumerState { coin = wallet.info.coin; isFrost = wallet is BitcoinFrostWallet; isEth = coin is Ethereum; + isMimblewimblecoin = coin is Mimblewimblecoin; + + if (isMimblewimblecoin) { + titles.add("Finalize"); + } if (isEth && widget.contractAddress == null) { titles.add("Transactions"); @@ -102,64 +102,57 @@ class _MyWalletState extends ConsumerState { widget.contractAddress == null ? isFrost ? Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: - const EdgeInsets.fromLTRB(0, 20, 0, 0), - child: SecondaryButton( - width: 200, - buttonHeight: ButtonHeight.l, - label: "Import sign config", - onPressed: () async { - final wallet = ref - .read(pWallets) - .getWallet(widget.walletId) - as BitcoinFrostWallet; - ref.read(pFrostScaffoldArgs.state).state = - ( - info: ( - walletName: wallet.info.name, - frostCurrency: wallet.cryptoCurrency, - ), - walletId: widget.walletId, - stepRoutes: FrostRouteGenerator - .signFrostTxStepRoutes, - parentNav: Navigator.of(context), - frostInterruptionDialogType: - FrostInterruptionDialogType - .transactionCreation, - callerRouteName: MyStackView.routeName, - ); - - await Navigator.of(context).pushNamed( - FrostStepScaffold.routeName, - ); - }, - ), + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(0, 20, 0, 0), + child: SecondaryButton( + width: 200, + buttonHeight: ButtonHeight.l, + label: "Import sign config", + onPressed: () async { + final wallet = + ref + .read(pWallets) + .getWallet(widget.walletId) + as BitcoinFrostWallet; + ref.read(pFrostScaffoldArgs.state).state = ( + info: ( + walletName: wallet.info.name, + frostCurrency: wallet.cryptoCurrency, + ), + walletId: widget.walletId, + stepRoutes: + FrostRouteGenerator + .signFrostTxStepRoutes, + parentNav: Navigator.of(context), + frostInterruptionDialogType: + FrostInterruptionDialogType + .transactionCreation, + callerRouteName: MyStackView.routeName, + ); + + await Navigator.of( + context, + ).pushNamed(FrostStepScaffold.routeName); + }, ), - ], - ), - FrostSendView( - walletId: widget.walletId, - coin: coin, - ), - ], - ) - : Padding( - padding: const EdgeInsets.all(20), - child: DesktopSend( - walletId: widget.walletId, + ), + ], ), - ) + FrostSendView(walletId: widget.walletId, coin: coin), + ], + ) + : Padding( + padding: const EdgeInsets.all(20), + child: DesktopSend(walletId: widget.walletId), + ) : Padding( - padding: const EdgeInsets.all(20), - child: DesktopTokenSend( - walletId: widget.walletId, - ), - ), + padding: const EdgeInsets.all(20), + child: DesktopTokenSend(walletId: widget.walletId), + ), Padding( padding: const EdgeInsets.all(20), child: DesktopReceive( @@ -167,6 +160,12 @@ class _MyWalletState extends ConsumerState { contractAddress: widget.contractAddress, ), ), + if (isMimblewimblecoin) + Padding( + padding: const EdgeInsets.all(20), + child: FinalizeView(walletId: widget.walletId), + ), + if (isEth && widget.contractAddress == null) Padding( padding: const EdgeInsets.only(top: 8.0), @@ -174,9 +173,7 @@ class _MyWalletState extends ConsumerState { constraints: BoxConstraints( maxHeight: MediaQuery.of(context).size.height - 362, ), - child: TransactionsV2List( - walletId: widget.walletId, - ), + child: TransactionsV2List(walletId: widget.walletId), ), ), ], diff --git a/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart b/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart index aea4a8f02..6c2a12e1d 100644 --- a/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart +++ b/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart @@ -6,6 +6,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; +import '../../app_config.dart'; import '../../models/isar/models/blockchain_data/utxo.dart'; import '../../models/isar/ordinal.dart'; import '../../networking/http.dart'; @@ -57,10 +58,11 @@ class _DesktopOrdinalDetailsViewState final response = await client.get( url: Uri.parse(widget.ordinal.content), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code != 200) { @@ -71,10 +73,9 @@ class _DesktopOrdinalDetailsViewState final bytes = response.bodyBytes; - final dir = - Platform.isAndroid - ? await StackFileSystem.wtfAndroidDocumentsPath() - : await getApplicationDocumentsDirectory(); + final dir = Platform.isAndroid + ? await StackFileSystem.wtfAndroidDocumentsPath() + : await getApplicationDocumentsDirectory(); final filePath = path.join( dir.path, @@ -109,19 +110,17 @@ class _DesktopOrdinalDetailsViewState const SizedBox(width: 32), AppBarIconButton( size: 32, - color: - Theme.of( - context, - ).extension()!.textFieldDefaultBG, + color: Theme.of( + context, + ).extension()!.textFieldDefaultBG, shadows: const [], icon: SvgPicture.asset( Assets.svg.arrowLeft, width: 18, height: 18, - color: - Theme.of( - context, - ).extension()!.topNavIconPrimary, + color: Theme.of( + context, + ).extension()!.topNavIconPrimary, ), onPressed: Navigator.of(context).pop, ), @@ -213,10 +212,9 @@ class _DesktopOrdinalDetailsViewState Assets.svg.arrowDown, width: 13, height: 18, - color: - Theme.of(context) - .extension()! - .buttonTextSecondary, + color: Theme.of( + context, + ).extension()!.buttonTextSecondary, ), buttonHeight: ButtonHeight.l, iconSpacing: 8, @@ -276,28 +274,26 @@ class _DesktopOrdinalDetailsViewState const _Divider(), Consumer( builder: (context, ref, _) { - final coin = - ref - .watch(pWallets) - .getWallet(widget.walletId) - .info - .coin; + final coin = ref + .watch(pWallets) + .getWallet(widget.walletId) + .info + .coin; return _DetailsItemWCopy( title: "Amount", - data: - utxo == null - ? "ERROR" - : ref - .watch(pAmountFormatter(coin)) - .format( - Amount( - rawValue: BigInt.from( - utxo!.value, - ), - fractionDigits: - coin.fractionDigits, + data: utxo == null + ? "ERROR" + : ref + .watch(pAmountFormatter(coin)) + .format( + Amount( + rawValue: BigInt.from( + utxo!.value, ), + fractionDigits: + coin.fractionDigits, ), + ), ); }, ), diff --git a/lib/pages_desktop_specific/password/delete_password_warning_view.dart b/lib/pages_desktop_specific/password/delete_password_warning_view.dart index 1eb1331a7..984784fe3 100644 --- a/lib/pages_desktop_specific/password/delete_password_warning_view.dart +++ b/lib/pages_desktop_specific/password/delete_password_warning_view.dart @@ -13,7 +13,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../app_config.dart'; import '../../db/hive/db.dart'; @@ -30,10 +30,7 @@ import '../../widgets/desktop/primary_button.dart'; import '../../widgets/desktop/secondary_button.dart'; class DeletePasswordWarningView extends ConsumerStatefulWidget { - const DeletePasswordWarningView({ - super.key, - required this.shouldCreateNew, - }); + const DeletePasswordWarningView({super.key, required this.shouldCreateNew}); static const String routeName = "/deletePasswordWarning"; @@ -63,10 +60,18 @@ class _ForgotPasswordDesktopViewState await epicDir.delete(recursive: true); } + final mimblewimblecoinDir = Directory( + "${appRoot.path}/mimblewimblecoin", + ); + if (mimblewimblecoinDir.existsSync()) { + await mimblewimblecoinDir.delete(recursive: true); + } + await Isar.getInstance("desktopStore")?.close(deleteFromDisk: true); - await (await StackFileSystem.applicationHiveDirectory()) - .delete(recursive: true); + await (await StackFileSystem.applicationHiveDirectory()).delete( + recursive: true, + ); } else if (Platform.isLinux) { await appRoot.delete(recursive: true); } else { @@ -79,15 +84,24 @@ class _ForgotPasswordDesktopViewState if (epicDir.existsSync()) { await epicDir.delete(recursive: true); } - await (await StackFileSystem.applicationHiveDirectory()) - .delete(recursive: true); - await (await StackFileSystem.applicationIsarDirectory()) - .delete(recursive: true); + final mimblewimblecoinDir = Directory( + "${appRoot.path}/mimblewimblecoin", + ); + if (mimblewimblecoinDir.existsSync()) { + await mimblewimblecoinDir.delete(recursive: true); + } + + await (await StackFileSystem.applicationHiveDirectory()).delete( + recursive: true, + ); + await (await StackFileSystem.applicationIsarDirectory()).delete( + recursive: true, + ); } await DB.instance.init(); } catch (e, s) { - Logging.instance.f("$e\n$s", error: e, stackTrace: s,); + Logging.instance.f("$e\n$s", error: e, stackTrace: s); return false; } @@ -116,19 +130,10 @@ class _ForgotPasswordDesktopViewState child: Column( mainAxisSize: MainAxisSize.min, children: [ - const AppIcon( - width: 100, - ), - const SizedBox( - height: 42, - ), - Text( - "Warning!", - style: STextStyles.desktopH1(context), - ), - const SizedBox( - height: 24, - ), + const AppIcon(width: 100), + const SizedBox(height: 42), + Text("Warning!", style: STextStyles.desktopH1(context)), + const SizedBox(height: 24), SizedBox( width: 480, child: RichText( @@ -140,9 +145,10 @@ class _ForgotPasswordDesktopViewState style: STextStyles.desktopTextSmall(context), ), TextSpan( - text: widget.shouldCreateNew - ? "create a new ${AppConfig.prefix}" - : "restore from backup", + text: + widget.shouldCreateNew + ? "create a new ${AppConfig.prefix}" + : "restore from backup", style: STextStyles.desktopTextSmallBold(context), ), TextSpan( @@ -162,9 +168,7 @@ class _ForgotPasswordDesktopViewState ), ), ), - const SizedBox( - height: 48, - ), + const SizedBox(height: 48), PrimaryButton( label: "Delete and continue", enabled: !_deleteInProgress, @@ -211,9 +215,7 @@ class _ForgotPasswordDesktopViewState } }, ), - const SizedBox( - height: 24, - ), + const SizedBox(height: 24), SecondaryButton( label: "Take me back!", enabled: !_deleteInProgress, @@ -221,9 +223,7 @@ class _ForgotPasswordDesktopViewState Navigator.of(context).pop(); }, ), - const SizedBox( - height: kDesktopAppBarHeight, - ), + const SizedBox(height: kDesktopAppBarHeight), ], ), ), diff --git a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart index 179ce7650..22c00c51a 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart @@ -365,63 +365,122 @@ class DesktopAboutView extends ConsumerWidget { ); }, ), - // if (AppConfig.coins - // .whereType() - // .isNotEmpty) - // FutureBuilder( - // future: GitStatus - // .getMoneroCommitStatus(), - // builder: ( - // context, - // AsyncSnapshot - // snapshot, - // ) { - // CommitStatus stateOfCommit = - // CommitStatus.notLoaded; + if (AppConfig.coins + .whereType() + .isNotEmpty) + FutureBuilder( + future: GitStatus + .getMimblewimblecoinCommitStatus(), + builder: ( + context, + AsyncSnapshot + snapshot, + ) { + CommitStatus stateOfCommit = + CommitStatus.notLoaded; + + if (snapshot.connectionState == + ConnectionState + .done && + snapshot.hasData) { + stateOfCommit = + snapshot.data!; + } + + return Column( + mainAxisSize: + MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Text( + "Mimblewimblecoin Build Commit", + style: STextStyles + .desktopTextExtraExtraSmall( + context, + ).copyWith( + color: Theme.of( + context, + ) + .extension< + StackColors>()! + .textDark, + ), + ), + const SizedBox( + height: 2, + ), + SelectableText( + GitStatus + .mimblewimblecoinCommit, + style: GitStatus + .styleForStatus( + stateOfCommit, + context, + ), + ), + ], + ); + }, + ), + //if (AppConfig.coins + // .whereType() + // .isNotEmpty) + // FutureBuilder( + // future: GitStatus + // .getMoneroCommitStatus(), + // builder: ( + // context, + // AsyncSnapshot + // snapshot, + // ) { + // CommitStatus stateOfCommit = + // CommitStatus.notLoaded; // - // if (snapshot.connectionState == - // ConnectionState - // .done && - // snapshot.hasData) { - // stateOfCommit = - // snapshot.data!; - // } - // return Column( - // mainAxisSize: - // MainAxisSize.min, - // crossAxisAlignment: - // CrossAxisAlignment - // .start, - // children: [ - // Text( - // "Monero Build Commit", - // style: STextStyles - // .desktopTextExtraExtraSmall( - // context, - // ).copyWith( - // color: Theme.of( - // context, - // ) - // .extension< - // StackColors>()! - // .textDark, - // ), - // ), - // const SizedBox( - // height: 2, - // ), - // SelectableText( - // GitStatus.moneroCommit, - // style: GitStatus - // .styleForStatus( - // stateOfCommit, - // context, - // ), - // ), - // ], - // ); - // }, - // ), + // if (snapshot.connectionState == + // ConnectionState + // .done && + // snapshot.hasData) { + // stateOfCommit = + // snapshot.data!; + // } + // return Column( + // mainAxisSize: + // MainAxisSize.min, + // crossAxisAlignment: + // CrossAxisAlignment + // .start, + // children: [ + // Text( + // "Monero Build Commit", + // style: STextStyles + // .desktopTextExtraExtraSmall( + // context, + // ).copyWith( + // color: Theme.of( + // context, + // ) + // .extension< + // StackColors>()! + // .textDark, + // ), + // ), + // const SizedBox( + // height: 2, + // ), + // SelectableText( + // GitStatus.moneroCommit, + // style: GitStatus + // .styleForStatus( + // stateOfCommit, + // context, + // ), + // ), + // ], + // ); + // }, + // ), ], ), const SizedBox(height: 35), diff --git a/lib/providers/frost_wallet/frost_wallet_providers.dart b/lib/providers/frost_wallet/frost_wallet_providers.dart index c5b934e8e..bee42aa28 100644 --- a/lib/providers/frost_wallet/frost_wallet_providers.dart +++ b/lib/providers/frost_wallet/frost_wallet_providers.dart @@ -1,55 +1,50 @@ -import 'dart:ffi'; import 'dart:typed_data'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:frostdart/frostdart_bindings_generated.dart'; -import '../../services/frost.dart'; + import '../../wallets/models/incomplete_frost_wallet.dart'; import '../../wallets/models/tx_data.dart'; +import '../../wl_gen/interfaces/frost_interface.dart'; // =================== wallet creation ========================================= final pFrostMultisigConfig = StateProvider((ref) => null); final pFrostMyName = StateProvider((ref) => null); -final pFrostStartKeyGenData = StateProvider< - ({ - String seed, - String commitments, - Pointer multisigConfigWithNamePtr, - Pointer secretShareMachineWrapperPtr, - })?>((_) => null); - -final pFrostSecretSharesData = StateProvider< - ({ - String share, - Pointer secretSharesResPtr, - })?>((ref) => null); - -final pFrostCompletedKeyGenData = StateProvider< - ({ - Uint8List multisigId, - String recoveryString, - String serializedKeys, - })?>((ref) => null); +final pFrostStartKeyGenData = + StateProvider< + ({ + String seed, + String commitments, + OpaqueWrapper multisigConfigWithNamePtr, + OpaqueWrapper secretShareMachineWrapperPtr, + })? + >((_) => null); + +final pFrostSecretSharesData = + StateProvider<({String share, OpaqueWrapper secretSharesResPtr})?>( + (ref) => null, + ); + +final pFrostCompletedKeyGenData = + StateProvider< + ({Uint8List multisigId, String recoveryString, String serializedKeys})? + >((ref) => null); // ================= transaction creation ====================================== final pFrostTxData = StateProvider((ref) => null); -final pFrostAttemptSignData = StateProvider< - ({ - Pointer machinePtr, - String preprocess, - })?>((ref) => null); +final pFrostAttemptSignData = + StateProvider<({OpaqueWrapper machinePtr, String preprocess})?>( + (ref) => null, + ); -final pFrostContinueSignData = StateProvider< - ({ - Pointer machinePtr, - String share, - })?>((ref) => null); +final pFrostContinueSignData = + StateProvider<({OpaqueWrapper machinePtr, String share})?>((ref) => null); // ===================== shared/util =========================================== -final pFrostSelectParticipantsUnordered = - StateProvider?>((ref) => null); +final pFrostSelectParticipantsUnordered = StateProvider?>( + (ref) => null, +); // ========================= resharing ========================================= final pFrostResharingData = Provider((ref) => _ResharingData()); @@ -66,31 +61,23 @@ class _ResharingData { int newThreshold, Map resharers, List newParticipants, - })? get configData => resharerRConfig != null - ? Frost.extractResharerConfigData(rConfig: resharerRConfig!) + })? + get configData => resharerRConfig != null + ? frostInterface.extractResharerConfigData(rConfig: resharerRConfig!) : null; // resharer start string (for sharing) and machine - ({ - String resharerStart, - Pointer machine, - })? startResharerData; + ({String resharerStart, OpaqueWrapper machine})? startResharerData; // reshared start string (for sharing) and machine - ({ - String resharedStart, - Pointer prior, - })? startResharedData; + ({String resharedStart, OpaqueWrapper prior})? startResharedData; // resharer complete string (for sharing) String? resharerComplete; // new keys and config with an ID - ({ - String multisigConfig, - String serializedKeys, - String resharedId, - })? newWalletData; + ({String multisigConfig, String serializedKeys, String resharedId})? + newWalletData; // reset/clear all data void reset() { diff --git a/lib/providers/global/global_nav_key_provider.dart b/lib/providers/global/global_nav_key_provider.dart new file mode 100644 index 000000000..1cf0ad7ba --- /dev/null +++ b/lib/providers/global/global_nav_key_provider.dart @@ -0,0 +1,4 @@ +import 'package:flutter/widgets.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +final pNavKey = Provider((_) => GlobalKey()); diff --git a/lib/providers/progress_report/xelis_table_progress_provider.dart b/lib/providers/progress_report/xelis_table_progress_provider.dart index cbebe8224..82a6b353e 100644 --- a/lib/providers/progress_report/xelis_table_progress_provider.dart +++ b/lib/providers/progress_report/xelis_table_progress_provider.dart @@ -1,8 +1,6 @@ -import 'package:xelis_flutter/src/api/api.dart' as xelis_api; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter/foundation.dart'; -import 'dart:math' as math; +import '../../wl_gen/interfaces/lib_xelis_interface.dart'; enum XelisTableGenerationStep { t1PointsGeneration, @@ -47,32 +45,6 @@ class XelisTableProgressState { } } -final xelisTableProgressProvider = StreamProvider((ref) { - double lastPrintedProgress = 0.0; - return xelis_api.createProgressReportStream().map((report) { - return report.when( - tableGeneration: (progress, step, _) { - final currentStep = XelisTableGenerationStep.fromString(step); - final stepIndex = switch(currentStep) { - XelisTableGenerationStep.t1PointsGeneration => 0, - XelisTableGenerationStep.t1CuckooSetup => 1, - XelisTableGenerationStep.t2Table => 2, - XelisTableGenerationStep.unknown => 0, - }; - - if ((progress - lastPrintedProgress).abs() >= 0.05 || - currentStep != XelisTableGenerationStep.fromString(step) || - progress >= 0.99) { - debugPrint("Xelis Table Generation: $step - ${progress*100.0}%"); - lastPrintedProgress = progress; - } - - return XelisTableProgressState( - tableProgress: progress, - currentStep: currentStep, - ); - }, - misc: (_) => const XelisTableProgressState(), - ); - }); -}); \ No newline at end of file +final xelisTableProgressProvider = StreamProvider( + (ref) => libXelis.createProgressReportStream(), +); diff --git a/lib/providers/providers.dart b/lib/providers/providers.dart index d86e4de3b..598f3a3d0 100644 --- a/lib/providers/providers.dart +++ b/lib/providers/providers.dart @@ -27,6 +27,7 @@ export './global/mweb_service_provider.dart'; export './global/node_service_provider.dart'; export './global/notifications_provider.dart'; export './global/prefs_provider.dart'; +export './global/global_nav_key_provider.dart'; export './global/price_provider.dart'; export './global/should_show_lockscreen_on_resume_state_provider.dart'; export './global/wallets_provider.dart'; diff --git a/lib/providers/ui/preview_tx_button_state_provider.dart b/lib/providers/ui/preview_tx_button_state_provider.dart index 9ff71aca7..e800869f0 100644 --- a/lib/providers/ui/preview_tx_button_state_provider.dart +++ b/lib/providers/ui/preview_tx_button_state_provider.dart @@ -11,7 +11,9 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../utilities/amount/amount.dart'; +import '../../utilities/enums/mwc_transaction_method.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; +import '../../wallets/isar/providers/wallet_info_provider.dart'; import '../wallet/public_private_balance_state_provider.dart'; final pSendAmount = StateProvider.autoDispose((_) => null); @@ -20,10 +22,32 @@ final pValidSparkSendToAddress = StateProvider.autoDispose((_) => false); final pIsExchangeAddress = StateProvider((_) => false); +// MWC Transaction Method Provider. +final pSelectedMwcTransactionMethod = StateProvider( + (_) => MwcTransactionMethod.slatepack, +); + +final pIsSlatepack = Provider.family((ref, walletId) { + if (ref.watch(pWalletCoin(walletId)) is Mimblewimblecoin) { + return ref.watch(pSelectedMwcTransactionMethod) == + MwcTransactionMethod.slatepack; + } + + return false; +}); + final pPreviewTxButtonEnabled = Provider.autoDispose .family((ref, coin) { final amount = ref.watch(pSendAmount) ?? Amount.zero; + // For MWC slatepack transactions, address validation is not required. + if (coin is Mimblewimblecoin) { + final selectedMethod = ref.watch(pSelectedMwcTransactionMethod); + if (selectedMethod == MwcTransactionMethod.slatepack) { + return amount > Amount.zero; + } + } + if (coin is Firo) { final firoType = ref.watch(publicPrivateBalanceStateProvider); switch (firoType) { diff --git a/lib/providers/wallet/transaction_note_provider.dart b/lib/providers/wallet/transaction_note_provider.dart index 050dfe841..9069c6974 100644 --- a/lib/providers/wallet/transaction_note_provider.dart +++ b/lib/providers/wallet/transaction_note_provider.dart @@ -12,7 +12,8 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../models/isar/models/transaction_note.dart'; import '../db/main_db_provider.dart'; @@ -30,13 +31,13 @@ class _TransactionNoteWatcher extends ChangeNotifier { .txidWalletIdEqualTo(key.txid, key.walletId) .watch(fireImmediately: true) .listen((event) { - if (event.isEmpty) { - _value = null; - } else { - _value = event.first; - } - notifyListeners(); - }); + if (event.isEmpty) { + _value = null; + } else { + _value = event.first; + } + notifyListeners(); + }); } @override @@ -46,29 +47,30 @@ class _TransactionNoteWatcher extends ChangeNotifier { } } -final _wiProvider = ChangeNotifierProvider.family<_TransactionNoteWatcher, - ({String walletId, String txid})>( - (ref, key) { - final isar = ref.watch(mainDBProvider).isar; +final _wiProvider = ChangeNotifierProvider.family< + _TransactionNoteWatcher, + ({String walletId, String txid}) +>((ref, key) { + final isar = ref.watch(mainDBProvider).isar; - final watcher = _TransactionNoteWatcher( - isar.transactionNotes - .where() - .txidWalletIdEqualTo(key.txid, key.walletId) - .findFirstSync(), - key, - isar, - ); + final watcher = _TransactionNoteWatcher( + isar.transactionNotes + .where() + .txidWalletIdEqualTo(key.txid, key.walletId) + .findFirstSync(), + key, + isar, + ); - ref.onDispose(() => watcher.dispose()); + ref.onDispose(() => watcher.dispose()); - return watcher; - }, -); + return watcher; +}); final pTransactionNote = - Provider.family( - (ref, key) { - return ref.watch(_wiProvider(key).select((value) => value.value)); - }, -); + Provider.family(( + ref, + key, + ) { + return ref.watch(_wiProvider(key).select((value) => value.value)); + }); diff --git a/lib/route_generator.dart b/lib/route_generator.dart index ee09bdba0..b44550baf 100644 --- a/lib/route_generator.dart +++ b/lib/route_generator.dart @@ -10,9 +10,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; +import 'app_config.dart'; import 'db/drift/database.dart'; import 'models/add_wallet_list_entity/add_wallet_list_entity.dart'; import 'models/add_wallet_list_entity/sub_classes/eth_token_entity.dart'; @@ -68,6 +69,7 @@ import 'pages/exchange_view/exchange_step_views/step_4_view.dart'; import 'pages/exchange_view/send_from_view.dart'; import 'pages/exchange_view/trade_details_view.dart'; import 'pages/exchange_view/wallet_initiated_exchange_view.dart'; +import 'pages/finalize_view/finalize_view.dart'; import 'pages/generic/single_field_edit_view.dart'; import 'pages/home_view/home_view.dart'; import 'pages/intro_view.dart'; @@ -91,6 +93,7 @@ import 'pages/receive_view/addresses/edit_address_label_view.dart'; import 'pages/receive_view/addresses/wallet_addresses_view.dart'; import 'pages/receive_view/generate_receiving_uri_qr_code_view.dart'; import 'pages/receive_view/receive_view.dart'; +import 'pages/salvium_stake/salvium_create_stake_view.dart'; import 'pages/send_view/confirm_transaction_view.dart'; import 'pages/send_view/frost_ms/frost_send_view.dart'; import 'pages/send_view/send_view.dart'; @@ -165,7 +168,8 @@ import 'pages/wallet_view/transaction_views/transaction_search_filter_view.dart' import 'pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart'; import 'pages/wallet_view/transaction_views/tx_v2/boost_transaction_view.dart'; import 'pages/wallet_view/transaction_views/tx_v2/fusion_group_details_view.dart'; -import 'pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; +import 'pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tvd; import 'pages/wallet_view/wallet_view.dart'; import 'pages/wallets_view/wallets_overview.dart'; import 'pages/wallets_view/wallets_view.dart'; @@ -287,12 +291,11 @@ class RouteGenerator { if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => ChooseCoinView( - title: args.item1, - coinAdditional: args.item2, - nextRouteName: args.item3, - ), + builder: (_) => ChooseCoinView( + title: args.item1, + coinAdditional: args.item2, + nextRouteName: args.item3, + ), settings: RouteSettings(name: settings.name), ); } @@ -342,11 +345,10 @@ class RouteGenerator { } else if (args is Tuple2>) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => EditWalletTokensView( - walletId: args.item1, - contractsToMarkSelected: args.item2, - ), + builder: (_) => EditWalletTokensView( + walletId: args.item1, + contractsToMarkSelected: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -393,11 +395,10 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TokenContractDetailsView( - contractAddress: args.item1, - walletId: args.item2, - ), + builder: (_) => TokenContractDetailsView( + contractAddress: args.item1, + walletId: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -407,11 +408,10 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SingleFieldEditView( - initialValue: args.item1, - label: args.item2, - ), + builder: (_) => SingleFieldEditView( + initialValue: args.item1, + label: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -431,11 +431,10 @@ class RouteGenerator { if (args is ({String walletName, FrostCurrency frostCurrency})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => CreateNewFrostMsWalletView( - walletName: args.walletName, - frostCurrency: args.frostCurrency, - ), + builder: (_) => CreateNewFrostMsWalletView( + walletName: args.walletName, + frostCurrency: args.frostCurrency, + ), settings: RouteSettings(name: settings.name), ); } @@ -445,11 +444,10 @@ class RouteGenerator { if (args is ({String walletName, FrostCurrency frostCurrency})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => RestoreFrostMsWalletView( - walletName: args.walletName, - frostCurrency: args.frostCurrency, - ), + builder: (_) => RestoreFrostMsWalletView( + walletName: args.walletName, + frostCurrency: args.frostCurrency, + ), settings: RouteSettings(name: settings.name), ); } @@ -459,11 +457,10 @@ class RouteGenerator { if (args is ({String walletName, FrostCurrency frostCurrency})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SelectNewFrostImportTypeView( - walletName: args.walletName, - frostCurrency: args.frostCurrency, - ), + builder: (_) => SelectNewFrostImportTypeView( + walletName: args.walletName, + frostCurrency: args.frostCurrency, + ), settings: RouteSettings(name: settings.name), ); } @@ -510,11 +507,10 @@ class RouteGenerator { if (args is ({String walletId, Map resharers})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => CompleteReshareConfigView( - walletId: args.walletId, - resharers: args.resharers, - ), + builder: (_) => CompleteReshareConfigView( + walletId: args.walletId, + resharers: args.resharers, + ), settings: RouteSettings(name: settings.name), ); } @@ -524,8 +520,8 @@ class RouteGenerator { if (args is ({String walletId, CryptoCurrency coin})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => FrostSendView(walletId: args.walletId, coin: args.coin), + builder: (_) => + FrostSendView(walletId: args.walletId, coin: args.coin), settings: RouteSettings(name: settings.name), ); } @@ -550,21 +546,20 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => CoinControlView(walletId: args.item1, type: args.item2), + builder: (_) => + CoinControlView(walletId: args.item1, type: args.item2), settings: RouteSettings(name: settings.name), ); } else if (args is Tuple4?>) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => CoinControlView( - walletId: args.item1, - type: args.item2, - requestedTotal: args.item3, - selectedUTXOs: args.item4, - ), + builder: (_) => CoinControlView( + walletId: args.item1, + type: args.item2, + requestedTotal: args.item3, + selectedUTXOs: args.item4, + ), settings: RouteSettings(name: settings.name), ); } @@ -594,11 +589,10 @@ class RouteGenerator { if (args is ({Ordinal ordinal, String walletId})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => OrdinalDetailsView( - walletId: args.walletId, - ordinal: args.ordinal, - ), + builder: (_) => OrdinalDetailsView( + walletId: args.walletId, + ordinal: args.ordinal, + ), settings: RouteSettings(name: settings.name), ); } @@ -608,11 +602,10 @@ class RouteGenerator { if (args is ({Ordinal ordinal, String walletId})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => DesktopOrdinalDetailsView( - walletId: args.walletId, - ordinal: args.ordinal, - ), + builder: (_) => DesktopOrdinalDetailsView( + walletId: args.walletId, + ordinal: args.ordinal, + ), settings: RouteSettings(name: settings.name), ); } @@ -629,9 +622,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => - UtxoDetailsView(walletId: args.item2, utxoId: args.item1), + builder: (_) => + UtxoDetailsView(walletId: args.item2, utxoId: args.item1), settings: RouteSettings(name: settings.name), ); } @@ -681,7 +673,9 @@ class RouteGenerator { if (args is String) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: (_) => CashFusionView(walletId: args), + builder: (_) => AppConfig.hasFeature(AppFeature.tor) + ? CashFusionView(walletId: args) + : throw Exception("Tor not configured in prebuild setup"), settings: RouteSettings(name: settings.name), ); } @@ -697,13 +691,22 @@ class RouteGenerator { } return _routeError("${settings.name} invalid args: ${args.toString()}"); + case SalviumCreateStakeView.routeName: + if (args is String) { + return getRoute( + shouldUseMaterialRoute: useMaterialPageRoute, + builder: (_) => SalviumCreateStakeView(walletId: args), + settings: RouteSettings(name: settings.name), + ); + } + return _routeError("${settings.name} invalid args: ${args.toString()}"); + case ManageDomainView.routeName: if (args is ({String walletId, UTXO utxo})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => - ManageDomainView(walletId: args.walletId, utxo: args.utxo), + builder: (_) => + ManageDomainView(walletId: args.walletId, utxo: args.utxo), settings: RouteSettings(name: settings.name), ); } @@ -823,21 +826,19 @@ class RouteGenerator { if (args is ({String walletId, String name})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => - BuySparkNameView(walletId: args.walletId, name: args.name), + builder: (_) => + BuySparkNameView(walletId: args.walletId, name: args.name), settings: RouteSettings(name: settings.name), ); } else if (args is ({String walletId, String name, SparkName? nameToRenew})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => BuySparkNameView( - walletId: args.walletId, - name: args.name, - nameToRenew: args.nameToRenew, - ), + builder: (_) => BuySparkNameView( + walletId: args.walletId, + name: args.name, + nameToRenew: args.nameToRenew, + ), settings: RouteSettings(name: settings.name), ); } @@ -847,11 +848,10 @@ class RouteGenerator { if (args is ({String walletId, TxData txData})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => ConfirmSparkNameTransactionView( - walletId: args.walletId, - txData: args.txData, - ), + builder: (_) => ConfirmSparkNameTransactionView( + walletId: args.walletId, + txData: args.txData, + ), settings: RouteSettings(name: settings.name), ); } @@ -861,11 +861,8 @@ class RouteGenerator { if (args is ({String walletId, SparkName name})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SparkNameDetailsView( - walletId: args.walletId, - name: args.name, - ), + builder: (_) => + SparkNameDetailsView(walletId: args.walletId, name: args.name), settings: RouteSettings(name: settings.name), ); } @@ -875,7 +872,9 @@ class RouteGenerator { if (args is String) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: (_) => FusionProgressView(walletId: args), + builder: (_) => AppConfig.hasFeature(AppFeature.tor) + ? FusionProgressView(walletId: args) + : throw Exception("Tor not configured in prebuild setup"), settings: RouteSettings(name: settings.name), ); } @@ -1022,14 +1021,18 @@ class RouteGenerator { case TorSettingsView.routeName: return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: (_) => const TorSettingsView(), + builder: (_) => AppConfig.hasFeature(AppFeature.tor) + ? const TorSettingsView() + : throw Exception("Tor not configured in prebuild setup"), settings: RouteSettings(name: settings.name), ); case TorSettings.routeName: return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: (_) => const TorSettings(), + builder: (_) => AppConfig.hasFeature(AppFeature.tor) + ? const TorSettings() + : throw Exception("Tor not configured in prebuild setup"), settings: RouteSettings(name: settings.name), ); @@ -1206,12 +1209,11 @@ class RouteGenerator { if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => NodeDetailsView( - coin: args.item1, - nodeId: args.item2, - popRouteName: args.item3, - ), + builder: (_) => NodeDetailsView( + coin: args.item1, + nodeId: args.item2, + popRouteName: args.item3, + ), settings: RouteSettings(name: settings.name), ); } @@ -1221,8 +1223,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => EditNoteView(txid: args.item1, walletId: args.item2), + builder: (_) => + EditNoteView(txid: args.item1, walletId: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -1242,8 +1244,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => EditTradeNoteView(tradeId: args.item1, note: args.item2), + builder: (_) => + EditTradeNoteView(tradeId: args.item1, note: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -1254,13 +1256,12 @@ class RouteGenerator { is Tuple4) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => AddEditNodeView( - viewType: args.item1, - coin: args.item2, - nodeId: args.item3, - routeOnSuccessOrDelete: args.item4, - ), + builder: (_) => AddEditNodeView( + viewType: args.item1, + coin: args.item2, + nodeId: args.item3, + routeOnSuccessOrDelete: args.item4, + ), settings: RouteSettings(name: settings.name), ); } @@ -1300,11 +1301,10 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => EditContactAddressView( - contactId: args.item1, - addressEntry: args.item2, - ), + builder: (_) => EditContactAddressView( + contactId: args.item1, + addressEntry: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -1321,12 +1321,11 @@ class RouteGenerator { if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletNetworkSettingsView( - walletId: args.item1, - initialSyncStatus: args.item2, - initialNodeStatus: args.item3, - ), + builder: (_) => WalletNetworkSettingsView( + walletId: args.item1, + initialSyncStatus: args.item2, + initialNodeStatus: args.item3, + ), settings: RouteSettings(name: settings.name), ); } @@ -1336,11 +1335,10 @@ class RouteGenerator { if (args is ({String walletId, List mnemonic})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletBackupView( - walletId: args.walletId, - mnemonic: args.mnemonic, - ), + builder: (_) => WalletBackupView( + walletId: args.walletId, + mnemonic: args.mnemonic, + ), settings: RouteSettings(name: settings.name), ); } else if (args @@ -1357,12 +1355,11 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletBackupView( - walletId: args.walletId, - mnemonic: args.mnemonic, - frostWalletData: args.frostWalletData, - ), + builder: (_) => WalletBackupView( + walletId: args.walletId, + mnemonic: args.mnemonic, + frostWalletData: args.frostWalletData, + ), settings: RouteSettings(name: settings.name), ); } else if (args @@ -1373,12 +1370,11 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletBackupView( - walletId: args.walletId, - mnemonic: args.mnemonic, - keyData: args.keyData, - ), + builder: (_) => WalletBackupView( + walletId: args.walletId, + mnemonic: args.mnemonic, + keyData: args.keyData, + ), settings: RouteSettings(name: settings.name), ); } else if (args @@ -1396,13 +1392,12 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletBackupView( - walletId: args.walletId, - mnemonic: args.mnemonic, - frostWalletData: args.frostWalletData, - keyData: args.keyData, - ), + builder: (_) => WalletBackupView( + walletId: args.walletId, + mnemonic: args.mnemonic, + frostWalletData: args.frostWalletData, + keyData: args.keyData, + ), settings: RouteSettings(name: settings.name), ); } @@ -1412,11 +1407,10 @@ class RouteGenerator { if (args is ({String walletId, KeyDataInterface keyData})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => MobileKeyDataView( - walletId: args.walletId, - keyData: args.keyData, - ), + builder: (_) => MobileKeyDataView( + walletId: args.walletId, + keyData: args.keyData, + ), settings: RouteSettings(name: settings.name), ); } @@ -1466,11 +1460,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => NameYourWalletView( - addWalletType: args.item1, - coin: args.item2, - ), + builder: (_) => + NameYourWalletView(addWalletType: args.item1, coin: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -1480,11 +1471,10 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => NewWalletRecoveryPhraseWarningView( - walletName: args.item1, - coin: args.item2, - ), + builder: (_) => NewWalletRecoveryPhraseWarningView( + walletName: args.item1, + coin: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -1494,11 +1484,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => RestoreOptionsView( - walletName: args.item1, - coin: args.item2, - ), + builder: (_) => + RestoreOptionsView(walletName: args.item1, coin: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -1508,11 +1495,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => NewWalletOptionsView( - walletName: args.item1, - coin: args.item2, - ), + builder: (_) => + NewWalletOptionsView(walletName: args.item1, coin: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -1522,14 +1506,13 @@ class RouteGenerator { if (args is Tuple5) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => RestoreWalletView( - walletName: args.item1, - coin: args.item2, - seedWordsLength: args.item3, - restoreBlockHeight: args.item4, - mnemonicPassphrase: args.item5, - ), + builder: (_) => RestoreWalletView( + walletName: args.item1, + coin: args.item2, + seedWordsLength: args.item3, + restoreBlockHeight: args.item4, + mnemonicPassphrase: args.item5, + ), settings: RouteSettings(name: settings.name), ); } @@ -1544,12 +1527,11 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => RestoreViewOnlyWalletView( - walletName: args.walletName, - coin: args.coin, - restoreBlockHeight: args.restoreBlockHeight, - ), + builder: (_) => RestoreViewOnlyWalletView( + walletName: args.walletName, + coin: args.coin, + restoreBlockHeight: args.restoreBlockHeight, + ), settings: RouteSettings(name: settings.name), ); } @@ -1559,11 +1541,10 @@ class RouteGenerator { if (args is Tuple2>) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => NewWalletRecoveryPhraseView( - wallet: args.item1, - mnemonic: args.item2, - ), + builder: (_) => NewWalletRecoveryPhraseView( + wallet: args.item1, + mnemonic: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -1573,11 +1554,10 @@ class RouteGenerator { if (args is Tuple2>) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => VerifyRecoveryPhraseView( - wallet: args.item1, - mnemonic: args.item2, - ), + builder: (_) => VerifyRecoveryPhraseView( + wallet: args.item1, + mnemonic: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -1603,28 +1583,26 @@ class RouteGenerator { if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TransactionDetailsView( - transaction: args.item1, - coin: args.item2, - walletId: args.item3, - ), + builder: (_) => TransactionDetailsView( + transaction: args.item1, + coin: args.item2, + walletId: args.item3, + ), settings: RouteSettings(name: settings.name), ); } return _routeError("${settings.name} invalid args: ${args.toString()}"); - case TransactionV2DetailsView.routeName: + case tvd.TransactionV2DetailsView.routeName: if (args is ({TransactionV2 tx, CryptoCurrency coin, String walletId})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TransactionV2DetailsView( - transaction: args.tx, - coin: args.coin, - walletId: args.walletId, - ), + builder: (_) => tvd.TransactionV2DetailsView( + transaction: args.tx, + coin: args.coin, + walletId: args.walletId, + ), settings: RouteSettings(name: settings.name), ); } @@ -1639,12 +1617,11 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => FusionGroupDetailsView( - transactions: args.transactions, - coin: args.coin, - walletId: args.walletId, - ), + builder: (_) => FusionGroupDetailsView( + transactions: args.transactions, + coin: args.coin, + walletId: args.walletId, + ), settings: RouteSettings(name: settings.name), ); } @@ -1671,11 +1648,10 @@ class RouteGenerator { if (args is ({String walletId, String contractAddress})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => AllTransactionsV2View( - walletId: args.walletId, - contractAddress: args.contractAddress, - ), + builder: (_) => AllTransactionsV2View( + walletId: args.walletId, + contractAddress: args.contractAddress, + ), settings: RouteSettings(name: settings.name), ); } @@ -1701,11 +1677,18 @@ class RouteGenerator { } else if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => ReceiveView( - walletId: args.item1, - tokenContract: args.item2, - ), + builder: (_) => + ReceiveView(walletId: args.item1, tokenContract: args.item2), + settings: RouteSettings(name: settings.name), + ); + } + return _routeError("${settings.name} invalid args: ${args.toString()}"); + + case FinalizeView.routeName: + if (args is String) { + return getRoute( + shouldUseMaterialRoute: useMaterialPageRoute, + builder: (_) => FinalizeView(walletId: args), settings: RouteSettings(name: settings.name), ); } @@ -1725,11 +1708,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => AddressDetailsView( - walletId: args.item2, - addressId: args.item1, - ), + builder: (_) => + AddressDetailsView(walletId: args.item2, addressId: args.item1), settings: RouteSettings(name: settings.name), ); } @@ -1746,23 +1726,21 @@ class RouteGenerator { is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SendView( - walletId: args.item1, - coin: args.item2, - autoFillData: args.item3, - ), + builder: (_) => SendView( + walletId: args.item1, + coin: args.item2, + autoFillData: args.item3, + ), settings: RouteSettings(name: settings.name), ); } else if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SendView( - walletId: args.item1, - coin: args.item2, - accountLite: args.item3, - ), + builder: (_) => SendView( + walletId: args.item1, + coin: args.item2, + accountLite: args.item3, + ), settings: RouteSettings(name: settings.name), ); } else if (args is ({CryptoCurrency coin, String walletId})) { @@ -1779,12 +1757,11 @@ class RouteGenerator { if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TokenSendView( - walletId: args.item1, - coin: args.item2, - tokenContract: args.item3, - ), + builder: (_) => TokenSendView( + walletId: args.item1, + coin: args.item2, + tokenContract: args.item3, + ), settings: RouteSettings(name: settings.name), ); } @@ -1794,12 +1771,11 @@ class RouteGenerator { if (args is (TxData, String, VoidCallback)) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => ConfirmTransactionView( - txData: args.$1, - walletId: args.$2, - onSuccess: args.$3, - ), + builder: (_) => ConfirmTransactionView( + txData: args.$1, + walletId: args.$2, + onSuccess: args.$3, + ), settings: RouteSettings(name: settings.name), ); } @@ -1809,11 +1785,8 @@ class RouteGenerator { if (args is (TxData, String)) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => ConfirmNameTransactionView( - txData: args.$1, - walletId: args.$2, - ), + builder: (_) => + ConfirmNameTransactionView(txData: args.$1, walletId: args.$2), settings: RouteSettings(name: settings.name), ); } @@ -1823,37 +1796,35 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => Stack( - children: [ - WalletInitiatedExchangeView( - walletId: args.item1, - coin: args.item2, - ), - // ExchangeLoadingOverlayView( - // unawaitedLoad: args.item3, - // ), - ], + builder: (_) => Stack( + children: [ + WalletInitiatedExchangeView( + walletId: args.item1, + coin: args.item2, ), + // ExchangeLoadingOverlayView( + // unawaitedLoad: args.item3, + // ), + ], + ), settings: RouteSettings(name: settings.name), ); } if (args is Tuple3) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => Stack( - children: [ - WalletInitiatedExchangeView( - walletId: args.item1, - coin: args.item2, - contract: args.item3, - ), - // ExchangeLoadingOverlayView( - // unawaitedLoad: args.item3, - // ), - ], + builder: (_) => Stack( + children: [ + WalletInitiatedExchangeView( + walletId: args.item1, + coin: args.item2, + contract: args.item3, ), + // ExchangeLoadingOverlayView( + // unawaitedLoad: args.item3, + // ), + ], + ), settings: RouteSettings(name: settings.name), ); } @@ -1879,13 +1850,12 @@ class RouteGenerator { >) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => WalletSettingsView( - walletId: args.item1, - coin: args.item2, - initialSyncStatus: args.item3, - initialNodeStatus: args.item4, - ), + builder: (_) => WalletSettingsView( + walletId: args.item1, + coin: args.item2, + initialSyncStatus: args.item3, + initialNodeStatus: args.item4, + ), settings: RouteSettings(name: settings.name), ); } @@ -1895,11 +1865,10 @@ class RouteGenerator { if (args is ({String walletId, List mnemonicWords})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => DeleteWalletRecoveryPhraseView( - mnemonic: args.mnemonicWords, - walletId: args.walletId, - ), + builder: (_) => DeleteWalletRecoveryPhraseView( + mnemonic: args.mnemonicWords, + walletId: args.walletId, + ), settings: RouteSettings(name: settings.name), ); } else if (args @@ -1916,12 +1885,11 @@ class RouteGenerator { })) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => DeleteWalletRecoveryPhraseView( - mnemonic: args.mnemonicWords, - walletId: args.walletId, - frostWalletData: args.frostWalletData, - ), + builder: (_) => DeleteWalletRecoveryPhraseView( + mnemonic: args.mnemonicWords, + walletId: args.walletId, + frostWalletData: args.frostWalletData, + ), settings: RouteSettings(name: settings.name), ); } @@ -1931,11 +1899,10 @@ class RouteGenerator { if (args is ({String walletId, ViewOnlyWalletData data})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => DeleteViewOnlyWalletKeysView( - data: args.data, - walletId: args.walletId, - ), + builder: (_) => DeleteViewOnlyWalletKeysView( + data: args.data, + walletId: args.walletId, + ), settings: RouteSettings(name: settings.name), ); } @@ -1987,13 +1954,12 @@ class RouteGenerator { if (args is Tuple4) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TradeDetailsView( - tradeId: args.item1, - transactionIfSentFromStack: args.item2, - walletId: args.item3, - walletName: args.item4, - ), + builder: (_) => TradeDetailsView( + tradeId: args.item1, + transactionIfSentFromStack: args.item2, + walletId: args.item3, + walletName: args.item4, + ), settings: RouteSettings(name: settings.name), ); } @@ -2013,13 +1979,12 @@ class RouteGenerator { if (args is Tuple4) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => SendFromView( - coin: args.item1, - amount: args.item2, - trade: args.item4, - address: args.item3, - ), + builder: (_) => SendFromView( + coin: args.item1, + amount: args.item2, + trade: args.item4, + address: args.item3, + ), settings: RouteSettings(name: settings.name), ); } @@ -2029,11 +1994,10 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => GenerateUriQrCodeView( - coin: args.item1, - receivingAddress: args.item2, - ), + builder: (_) => GenerateUriQrCodeView( + coin: args.item1, + receivingAddress: args.item2, + ), settings: RouteSettings(name: settings.name), ); } @@ -2083,11 +2047,10 @@ class RouteGenerator { if (args is ({String walletId, String domainName})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => BuyDomainView( - walletId: args.walletId, - domainName: args.domainName, - ), + builder: (_) => BuyDomainView( + walletId: args.walletId, + domainName: args.domainName, + ), settings: RouteSettings(name: settings.name), ); } @@ -2171,8 +2134,8 @@ class RouteGenerator { if (args is Tuple2) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => BuyInWalletView(coin: args.item1, contract: args.item2), + builder: (_) => + BuyInWalletView(coin: args.item1, contract: args.item2), settings: RouteSettings(name: settings.name), ); } @@ -2534,11 +2497,10 @@ class RouteGenerator { } else if (args is ({String walletId, bool popPrevious})) { return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: - (_) => TokenView( - walletId: args.walletId, - popPrevious: args.popPrevious, - ), + builder: (_) => TokenView( + walletId: args.walletId, + popPrevious: args.popPrevious, + ), settings: RouteSettings(name: settings.name), ); } diff --git a/lib/services/buy/simplex/simplex_api.dart b/lib/services/buy/simplex/simplex_api.dart index eed33ea1b..8fff4972c 100644 --- a/lib/services/buy/simplex/simplex_api.dart +++ b/lib/services/buy/simplex/simplex_api.dart @@ -51,15 +51,15 @@ class SimplexAPI { final Map headers = { 'Content-Type': 'application/x-www-form-urlencoded', }; - final Map data = { - 'ROUTE': 'supported_cryptos', - }; + final Map data = {'ROUTE': 'supported_cryptos'}; final Uri url = _buildUri('api.php', data); final res = await client.post( url: url, headers: headers, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -78,10 +78,7 @@ class SimplexAPI { stackTrace: s, ); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -107,16 +104,9 @@ class SimplexAPI { return BuyResponse(value: cryptos); } catch (e, s) { - Logging.instance.e( - "_parseSupported exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("_parseSupported exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -126,15 +116,15 @@ class SimplexAPI { final Map headers = { 'Content-Type': 'application/x-www-form-urlencoded', }; - final Map data = { - 'ROUTE': 'supported_fiats', - }; + final Map data = {'ROUTE': 'supported_fiats'}; final Uri url = _buildUri('api.php', data); final res = await client.post( url: url, headers: headers, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -147,13 +137,13 @@ class SimplexAPI { return _parseSupportedFiats(jsonArray); } catch (e, s) { - Logging.instance - .e("getAvailableCurrencies exception: ", error: e, stackTrace: s); + Logging.instance.e( + "getAvailableCurrencies exception: ", + error: e, + stackTrace: s, + ); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -169,8 +159,9 @@ class SimplexAPI { fiats.add( Fiat.fromJson({ 'ticker': "${fiat['ticker_symbol']}", - 'name': fiatFromTickerCaseInsensitive("${fiat['ticker_symbol']}") - .prettyName, + 'name': fiatFromTickerCaseInsensitive( + "${fiat['ticker_symbol']}", + ).prettyName, 'minAmount': "${fiat['min_amount']}", 'maxAmount': "${fiat['max_amount']}", 'image': "", @@ -181,16 +172,9 @@ class SimplexAPI { return BuyResponse(value: fiats); } catch (e, s) { - Logging.instance.e( - "_parseSupported exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("_parseSupported exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -222,7 +206,9 @@ class SimplexAPI { final res = await client.get( url: url, headers: headers, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -241,16 +227,9 @@ class SimplexAPI { return _parseQuote(jsonArray); } catch (e, s) { - Logging.instance.e( - "getQuote exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getQuote exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -280,8 +259,9 @@ class SimplexAPI { youPayFiatPrice: quote.buyWithFiat ? quote.youPayFiatPrice : Decimal.parse("${jsonArray['fiat_money']['base_amount']}"), - youReceiveCryptoAmount: - Decimal.parse("${jsonArray['digital_money']['amount']}"), + youReceiveCryptoAmount: Decimal.parse( + "${jsonArray['digital_money']['amount']}", + ), id: jsonArray['quote_id'] as String, receivingAddress: quote.receivingAddress, buyWithFiat: quote.buyWithFiat, @@ -289,16 +269,9 @@ class SimplexAPI { return BuyResponse(value: _quote); } catch (e, s) { - Logging.instance.e( - "_parseQuote exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("_parseQuote exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -329,8 +302,9 @@ class SimplexAPI { data['USER_ID'] = userID; } if (signupEpoch != null && signupEpoch != 0) { - final DateTime date = - DateTime.fromMillisecondsSinceEpoch(signupEpoch * 1000); + final DateTime date = DateTime.fromMillisecondsSinceEpoch( + signupEpoch * 1000, + ); data['SIGNUP_TIMESTAMP'] = date.toIso8601String() + timeZoneFormatter(date.timeZoneOffset); } @@ -339,7 +313,9 @@ class SimplexAPI { final res = await client.get( url: url, headers: headers, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -362,16 +338,9 @@ class SimplexAPI { return BuyResponse(value: _order); } catch (e, s) { - Logging.instance.e( - "newOrder exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("newOrder exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } @@ -394,16 +363,9 @@ class SimplexAPI { return BuyResponse(value: status); } catch (e, s) { - Logging.instance.e( - "newOrder exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("newOrder exception", error: e, stackTrace: s); return BuyResponse( - exception: BuyException( - e.toString(), - BuyExceptionType.generic, - ), + exception: BuyException(e.toString(), BuyExceptionType.generic), ); } } diff --git a/lib/services/churning_service.dart b/lib/services/churning_service.dart index 0aecefe08..b1449fd68 100644 --- a/lib/services/churning_service.dart +++ b/lib/services/churning_service.dart @@ -1,18 +1,14 @@ import 'dart:async'; import 'dart:math'; -import 'package:cs_monero/cs_monero.dart'; import 'package:flutter/cupertino.dart'; import 'package:mutex/mutex.dart'; +import '../utilities/logger.dart'; import '../wallets/wallet/intermediate/lib_monero_wallet.dart'; +import '../wl_gen/interfaces/cs_monero_interface.dart'; -enum ChurnStatus { - waiting, - running, - failed, - success; -} +enum ChurnStatus { waiting, running, failed, success } class ChurningService extends ChangeNotifier { // stack only uses account 0 at this point in time @@ -21,7 +17,7 @@ class ChurningService extends ChangeNotifier { ChurningService({required this.wallet}); final LibMoneroWallet wallet; - Wallet get csWallet => wallet.libMoneroWallet!; + String get walletId => wallet.walletId; int rounds = 1; // default bool ignoreErrors = false; // default @@ -36,7 +32,9 @@ class ChurningService extends ChangeNotifier { Object? lastSeenError; bool _canChurn() { - if (csWallet.getUnlockedBalance(accountIndex: kAccount) > BigInt.zero) { + if (wallet.wallet != null && + csMonero.getUnlockedBalance(wallet.wallet!, accountIndex: kAccount)! > + BigInt.zero) { return true; } else { return false; @@ -50,7 +48,9 @@ class ChurningService extends ChangeNotifier { return; } - final outputs = await csWallet.getOutputs(refresh: true); + final outputs = wallet.wallet == null + ? [] + : await csMonero.getOutputs(wallet.wallet!, refresh: true); final required = wallet.cryptoCurrency.minConfirms; int lowestNumberOfConfirms = required; @@ -127,14 +127,14 @@ class ChurningService extends ChangeNotifier { try { _stopConfirmsTimer(); - Logging.log?.i("Doing churn #${roundsCompleted + 1}"); + Logging.instance.i("Doing churn #${roundsCompleted + 1}"); await _churnTxSimple(); waitingForUnlockedBalance = ChurnStatus.success; makingChurnTransaction = ChurnStatus.success; roundsCompleted++; notifyListeners(); } catch (e, s) { - Logging.log?.e( + Logging.instance.e( "Churning round #${roundsCompleted + 1} failed", error: e, stackTrace: s, @@ -154,7 +154,7 @@ class ChurningService extends ChangeNotifier { } } } else { - Logging.log?.i("Can't churn yet, waiting..."); + Logging.instance.i("Can't churn yet, waiting..."); } if (!complete() && _running) { @@ -174,7 +174,7 @@ class ChurningService extends ChangeNotifier { done = true; _running = false; notifyListeners(); - Logging.log?.i("Churning complete"); + Logging.instance.i("Churning complete"); } void stopChurning() { @@ -184,24 +184,28 @@ class ChurningService extends ChangeNotifier { unpause(); } - Future _churnTxSimple({ - final TransactionPriority priority = TransactionPriority.normal, - }) async { - final address = csWallet.getAddress( + Future _churnTxSimple() async { + final address = csMonero.getAddress( + wallet.wallet!, accountIndex: kAccount, addressIndex: 0, ); - final pending = await csWallet.createTx( - output: Recipient( - address: address.value, - amount: BigInt.zero, // Doesn't matter if `sweep` is true + final height = await wallet.chainHeight; + + final pending = await csMonero.createTx( + wallet.wallet!, + output: CsRecipient( + address, + BigInt.zero, // Doesn't matter if `sweep` is true ), - priority: priority, + priority: csMonero.getTxPriorityNormal(), accountIndex: kAccount, sweep: true, + minConfirms: wallet.cryptoCurrency.minConfirms, + currentHeight: height, ); - await csWallet.commitTx(pending); + await csMonero.commitTx(wallet.wallet!, pending); } } diff --git a/lib/services/coins/tezos/api/tezos_account.dart b/lib/services/coins/tezos/api/tezos_account.dart deleted file mode 100644 index 8bf9a9f64..000000000 --- a/lib/services/coins/tezos/api/tezos_account.dart +++ /dev/null @@ -1,58 +0,0 @@ -class TezosAccount { - final int id; - final String type; - final String address; - final String? publicKey; - final bool revealed; - final int balance; - final int counter; - - TezosAccount({ - required this.id, - required this.type, - required this.address, - required this.publicKey, - required this.revealed, - required this.balance, - required this.counter, - }); - - TezosAccount copyWith({ - int? id, - String? type, - String? address, - String? publicKey, - bool? revealed, - int? balance, - int? counter, - }) { - return TezosAccount( - id: id ?? this.id, - type: type ?? this.type, - address: address ?? this.address, - publicKey: publicKey ?? this.publicKey, - revealed: revealed ?? this.revealed, - balance: balance ?? this.balance, - counter: counter ?? this.counter, - ); - } - - factory TezosAccount.fromMap(Map map) { - return TezosAccount( - id: map['id'] as int, - type: map['type'] as String, - address: map['address'] as String, - publicKey: map['publicKey'] as String?, - revealed: map['revealed'] as bool, - balance: map['balance'] as int, - counter: map['counter'] as int, - ); - } - - @override - String toString() { - return 'UserData{id: $id, type: $type, address: $address, ' - 'publicKey: $publicKey, revealed: $revealed,' - ' balance: $balance, counter: $counter}'; - } -} diff --git a/lib/services/coins/tezos/api/tezos_api.dart b/lib/services/coins/tezos/api/tezos_api.dart deleted file mode 100644 index 6c2193577..000000000 --- a/lib/services/coins/tezos/api/tezos_api.dart +++ /dev/null @@ -1,110 +0,0 @@ -import 'dart:convert'; - -import '../../../../networking/http.dart'; -import '../../../../utilities/logger.dart'; -import '../../../../utilities/prefs.dart'; -import '../../../tor_service.dart'; -import 'tezos_account.dart'; -import 'tezos_transaction.dart'; - -abstract final class TezosAPI { - static final HTTP _client = HTTP(); - static const String _baseURL = 'https://api.tzkt.io'; - - static Future getCounter(String address) async { - try { - final uriString = "$_baseURL/v1/accounts/$address/counter"; - final response = await _client.get( - url: Uri.parse(uriString), - headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, - ); - - final result = jsonDecode(response.body); - return result as int; - } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting counter for $address: ", error: e, stackTrace: s); - rethrow; - } - } - - static Future getAccount( - String address, { - String type = "user", - }) async { - try { - final uriString = "$_baseURL/v1/accounts/$address?legacy=false"; - final response = await _client.get( - url: Uri.parse(uriString), - headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, - ); - - final result = jsonDecode(response.body) as Map; - - final account = TezosAccount.fromMap(Map.from(result)); - - return account; - } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting account for $address: ", error: e, stackTrace: s); - rethrow; - } - } - - static Future> getTransactions(String address) async { - try { - final transactionsCall = - "$_baseURL/v1/accounts/$address/operations?type=transaction"; - - final response = await _client.get( - url: Uri.parse(transactionsCall), - headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, - ); - - final result = jsonDecode(response.body) as List; - - final List txs = []; - for (final tx in result) { - if (tx["type"] == "transaction") { - final theTx = TezosTransaction( - id: tx["id"] as int, - hash: tx["hash"] as String, - type: tx["type"] as String, - height: tx["level"] as int, - timestamp: DateTime.parse(tx["timestamp"].toString()) - .toUtc() - .millisecondsSinceEpoch ~/ - 1000, - cycle: tx["cycle"] as int?, - counter: tx["counter"] as int, - opN: tx["op_n"] as int?, - opP: tx["op_p"] as int?, - status: tx["status"] as String, - gasLimit: tx["gasLimit"] as int, - gasUsed: tx["gasUsed"] as int, - storageLimit: tx["storageLimit"] as int?, - amountInMicroTez: tx["amount"] as int, - feeInMicroTez: (tx["bakerFee"] as int? ?? 0) + - (tx["storageFee"] as int? ?? 0) + - (tx["allocationFee"] as int? ?? 0), - burnedAmountInMicroTez: tx["burned"] as int?, - senderAddress: tx["sender"]["address"] as String, - receiverAddress: tx["target"]["address"] as String, - ); - txs.add(theTx); - } - } - return txs; - } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting transactions for $address: ", error: e, stackTrace: s); - rethrow; - } - } -} diff --git a/lib/services/coins/tezos/api/tezos_rpc_api.dart b/lib/services/coins/tezos/api/tezos_rpc_api.dart deleted file mode 100644 index 688d9f68e..000000000 --- a/lib/services/coins/tezos/api/tezos_rpc_api.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'dart:convert'; - -import '../../../../networking/http.dart'; -import '../../../../utilities/logger.dart'; -import '../../../../utilities/prefs.dart'; -import '../../../tor_service.dart'; - -abstract final class TezosRpcAPI { - static final HTTP _client = HTTP(); - - static Future getBalance({ - required ({String host, int port}) nodeInfo, - required String address, - }) async { - try { - final String balanceCall = - "${nodeInfo.host}:${nodeInfo.port}/chains/main/blocks/head/context/contracts/$address/balance"; - - final response = await _client.get( - url: Uri.parse(balanceCall), - headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, - ); - - final balance = - BigInt.parse(response.body.substring(1, response.body.length - 2)); - return balance; - } catch (e, s) { - Logging.instance.e( - "Error occurred in tezos_rpc_api.dart while getting balance for $address", - error: e, - stackTrace: s, - ); - } - return null; - } - - static Future getChainHeight({ - required ({String host, int port}) nodeInfo, - }) async { - try { - final api = - "${nodeInfo.host}:${nodeInfo.port}/chains/main/blocks/head/header/shell"; - - final response = await _client.get( - url: Uri.parse(api), - headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, - ); - - final jsonParsedResponse = jsonDecode(response.body); - return int.parse(jsonParsedResponse["level"].toString()); - } catch (e, s) { - Logging.instance.e( - "Error occurred in tezos_rpc_api.dart while getting chain height for tezos", - error: e, - stackTrace: s, - ); - } - return null; - } - - static Future testNetworkConnection({ - required ({String host, int port}) nodeInfo, - }) async { - final result = await getChainHeight(nodeInfo: nodeInfo); - return result != null; - } -} diff --git a/lib/services/coins/tezos/api/tezos_transaction.dart b/lib/services/coins/tezos/api/tezos_transaction.dart deleted file mode 100644 index e1e6bc88b..000000000 --- a/lib/services/coins/tezos/api/tezos_transaction.dart +++ /dev/null @@ -1,43 +0,0 @@ -class TezosTransaction { - final int? id; - final String hash; - final String? type; - final int height; - final int timestamp; - final int? cycle; - final int? counter; - final int? opN; - final int? opP; - final String? status; - final bool? isSuccess; - final int? gasLimit; - final int? gasUsed; - final int? storageLimit; - final int amountInMicroTez; - final int feeInMicroTez; - final int? burnedAmountInMicroTez; - final String senderAddress; - final String receiverAddress; - - TezosTransaction({ - this.id, - required this.hash, - this.type, - required this.height, - required this.timestamp, - this.cycle, - this.counter, - this.opN, - this.opP, - this.status, - this.isSuccess, - this.gasLimit, - this.gasUsed, - this.storageLimit, - required this.amountInMicroTez, - required this.feeInMicroTez, - this.burnedAmountInMicroTez, - required this.senderAddress, - required this.receiverAddress, - }); -} diff --git a/lib/services/ethereum/cached_eth_token_balance.dart b/lib/services/ethereum/cached_eth_token_balance.dart index ce6efe1b4..f21a0ee73 100644 --- a/lib/services/ethereum/cached_eth_token_balance.dart +++ b/lib/services/ethereum/cached_eth_token_balance.dart @@ -8,7 +8,7 @@ * */ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../db/isar/main_db.dart'; import '../../models/balance.dart'; @@ -33,10 +33,11 @@ class CachedEthTokenBalance { contractAddress: token.address, ); - final info = await mainDB.isar.tokenWalletInfo - .where() - .walletIdTokenAddressEqualTo(walletId, token.address) - .findFirst(); + final info = + await mainDB.isar.tokenWalletInfo + .where() + .walletIdTokenAddressEqualTo(walletId, token.address) + .findFirst(); if (response.value != null && info != null) { await info.updateCachedBalance( diff --git a/lib/services/ethereum/ethereum_api.dart b/lib/services/ethereum/ethereum_api.dart index fd644944a..efffc5105 100644 --- a/lib/services/ethereum/ethereum_api.dart +++ b/lib/services/ethereum/ethereum_api.dart @@ -10,6 +10,7 @@ import 'dart:convert'; +import '../../app_config.dart'; import '../../dto/ethereum/eth_token_tx_dto.dart'; import '../../dto/ethereum/eth_tx_dto.dart'; import '../../models/isar/models/ethereum/eth_contract.dart'; @@ -57,10 +58,11 @@ abstract class EthereumAPI { url: Uri.parse( "$stackBaseServer/export?addrs=$address&firstBlock=$firstBlock&unripe=true", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -110,10 +112,11 @@ abstract class EthereumAPI { url: Uri.parse( "$stackBaseServer/export?addrs=$address&emitter=$tokenContractAddress&logs=true", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -164,10 +167,11 @@ abstract class EthereumAPI { ); final response = await client.get( url: uri, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -203,10 +207,11 @@ abstract class EthereumAPI { try { final response = await client.get( url: Uri.parse("$stackBaseServer/gas-prices"), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -267,10 +272,11 @@ abstract class EthereumAPI { url: Uri.parse( "$stackBaseServer/names?terms=$contractAddress&autoname=$contractAddress&all", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); } @@ -284,10 +290,11 @@ abstract class EthereumAPI { // "$stackBaseServer/tokens?addrs=$contractAddress&parts=all", "$stackBaseServer/names?terms=$contractAddress&all", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -371,10 +378,11 @@ abstract class EthereumAPI { url: Uri.parse( "$stackBaseServer/abis?addrs=$contractAddress&verbose=true", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { @@ -408,10 +416,11 @@ abstract class EthereumAPI { url: Uri.parse( "$stackBaseServer/state?addrs=$contractAddress&parts=proxy", ), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); if (response.code == 200) { final json = jsonDecode(response.body); diff --git a/lib/services/exchange/change_now/change_now_api.dart b/lib/services/exchange/change_now/change_now_api.dart index 7b5cd0737..870287448 100644 --- a/lib/services/exchange/change_now/change_now_api.dart +++ b/lib/services/exchange/change_now/change_now_api.dart @@ -13,6 +13,7 @@ import 'dart:convert'; import 'package:decimal/decimal.dart'; import 'package:flutter/foundation.dart'; +import '../../../app_config.dart'; import '../../../exceptions/exchange/exchange_exception.dart'; import '../../../exceptions/exchange/pair_unavailable_exception.dart'; import '../../../external_api_keys.dart'; @@ -73,10 +74,11 @@ class ChangeNowAPI { "Content-Type": "application/json", "x-changenow-api-key": apiKey, }, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final data = response.body; @@ -103,10 +105,11 @@ class ChangeNowAPI { "x-changenow-api-key": apiKey, }, body: jsonEncode(body), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); String? data; @@ -209,10 +212,9 @@ class ChangeNowAPI { currencies.add( Currency.fromJson( map, - rateType: - (map["supportsFixedRate"] as bool) - ? SupportedRateType.both - : SupportedRateType.estimated, + rateType: (map["supportsFixedRate"] as bool) + ? SupportedRateType.both + : SupportedRateType.estimated, exchangeName: ChangeNowExchange.exchangeName, ), ); diff --git a/lib/services/exchange/exchange_data_loading_service.dart b/lib/services/exchange/exchange_data_loading_service.dart index 35a167795..1bf16504d 100644 --- a/lib/services/exchange/exchange_data_loading_service.dart +++ b/lib/services/exchange/exchange_data_loading_service.dart @@ -11,7 +11,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tuple/tuple.dart'; import '../../app_config.dart'; diff --git a/lib/services/exchange/nanswap/nanswap_api.dart b/lib/services/exchange/nanswap/nanswap_api.dart index 6e2848586..00aea8d21 100644 --- a/lib/services/exchange/nanswap/nanswap_api.dart +++ b/lib/services/exchange/nanswap/nanswap_api.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; +import '../../../app_config.dart'; import '../../../exceptions/exchange/exchange_exception.dart'; import '../../../external_api_keys.dart'; import '../../../networking/http.dart'; @@ -34,10 +35,11 @@ class NanswapAPI { final response = await _client.get( url: uri, headers: {'Accept': 'application/json'}, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); code = response.code; @@ -66,10 +68,11 @@ class NanswapAPI { 'Accept': 'application/json', }, body: jsonEncode(body), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); code = response.code; diff --git a/lib/services/exchange/simpleswap/simpleswap_api.dart b/lib/services/exchange/simpleswap/simpleswap_api.dart index 0a532822d..d7440121f 100644 --- a/lib/services/exchange/simpleswap/simpleswap_api.dart +++ b/lib/services/exchange/simpleswap/simpleswap_api.dart @@ -15,6 +15,7 @@ import 'package:flutter/foundation.dart'; import 'package:tuple/tuple.dart'; import 'package:uuid/uuid.dart'; +import '../../../app_config.dart'; import '../../../exceptions/exchange/exchange_exception.dart'; import '../../../external_api_keys.dart'; import '../../../models/exchange/response_objects/fixed_rate_market.dart'; @@ -48,7 +49,9 @@ class SimpleSwapAPI { try { final response = await client.get( url: uri, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -59,22 +62,24 @@ class SimpleSwapAPI { return parsed; } catch (e, s) { - Logging.instance - .e("_makeRequest($uri) HTTP:$code threw: ", error: e, stackTrace: s); + Logging.instance.e( + "_makeRequest($uri) HTTP:$code threw: ", + error: e, + stackTrace: s, + ); rethrow; } } - Future _makePostRequest( - Uri uri, - Map body, - ) async { + Future _makePostRequest(Uri uri, Map body) async { try { final response = await client.post( url: uri, headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -86,11 +91,7 @@ class SimpleSwapAPI { throw Exception("response: ${response.body}"); } catch (e, s) { - Logging.instance.e( - "_makeRequest($uri) threw", - error: e, - stackTrace: s, - ); + Logging.instance.e("_makeRequest($uri) threw", error: e, stackTrace: s); rethrow; } } @@ -117,8 +118,9 @@ class SimpleSwapAPI { "extraIdTo": extraIdTo, }; - final uri = - _buildUri("/create_exchange", {"api_key": apiKey ?? kSimpleSwapApiKey}); + final uri = _buildUri("/create_exchange", { + "api_key": apiKey ?? kSimpleSwapApiKey, + }); try { final jsonObject = await _makePostRequest(uri, body); @@ -150,8 +152,11 @@ class SimpleSwapAPI { ); return ExchangeResponse(value: trade, exception: null); } catch (e, s) { - Logging.instance - .e("getAvailableCurrencies exception: ", error: e, stackTrace: s); + Logging.instance.e( + "getAvailableCurrencies exception: ", + error: e, + stackTrace: s, + ); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -166,18 +171,20 @@ class SimpleSwapAPI { String? apiKey, required bool fixedRate, }) async { - final uri = _buildUri( - "/get_all_currencies", - {"api_key": apiKey ?? kSimpleSwapApiKey}, - ); + final uri = _buildUri("/get_all_currencies", { + "api_key": apiKey ?? kSimpleSwapApiKey, + }); try { final jsonArray = await _makeGetRequest(uri); return await compute(_parseAvailableCurrenciesJson, jsonArray as List); } catch (e, s) { - Logging.instance - .e("getAvailableCurrencies exception: ", error: e, stackTrace: s); + Logging.instance.e( + "getAvailableCurrencies exception: ", + error: e, + stackTrace: s, + ); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -195,8 +202,9 @@ class SimpleSwapAPI { for (final json in jsonArray) { try { - currencies - .add(SPCurrency.fromJson(Map.from(json as Map))); + currencies.add( + SPCurrency.fromJson(Map.from(json as Map)), + ); } catch (_) { return ExchangeResponse( exception: ExchangeException( @@ -227,13 +235,10 @@ class SimpleSwapAPI { required String symbol, String? apiKey, }) async { - final uri = _buildUri( - "/get_currency", - { - "api_key": apiKey ?? kSimpleSwapApiKey, - "symbol": symbol, - }, - ); + final uri = _buildUri("/get_currency", { + "api_key": apiKey ?? kSimpleSwapApiKey, + "symbol": symbol, + }); try { final jsonObject = await _makeGetRequest(uri); @@ -244,11 +249,7 @@ class SimpleSwapAPI { ), ); } catch (e, s) { - Logging.instance.e( - "getCurrency exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getCurrency exception", error: e, stackTrace: s); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -264,13 +265,10 @@ class SimpleSwapAPI { required bool isFixedRate, String? apiKey, }) async { - final uri = _buildUri( - "/get_all_pairs", - { - "api_key": apiKey ?? kSimpleSwapApiKey, - "fixed": isFixedRate.toString(), - }, - ); + final uri = _buildUri("/get_all_pairs", { + "api_key": apiKey ?? kSimpleSwapApiKey, + "fixed": isFixedRate.toString(), + }); try { final jsonObject = await _makeGetRequest(uri); @@ -280,11 +278,7 @@ class SimpleSwapAPI { ); return result; } catch (e, s) { - Logging.instance.e( - "getAllPairs exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getAllPairs exception", error: e, stackTrace: s); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -347,27 +341,20 @@ class SimpleSwapAPI { required String amount, String? apiKey, }) async { - final uri = _buildUri( - "/get_estimated", - { - "api_key": apiKey ?? kSimpleSwapApiKey, - "fixed": isFixedRate.toString(), - "currency_from": currencyFrom, - "currency_to": currencyTo, - "amount": amount, - }, - ); + final uri = _buildUri("/get_estimated", { + "api_key": apiKey ?? kSimpleSwapApiKey, + "fixed": isFixedRate.toString(), + "currency_from": currencyFrom, + "currency_to": currencyTo, + "amount": amount, + }); try { final jsonObject = await _makeGetRequest(uri); return ExchangeResponse(value: jsonObject as String); } catch (e, s) { - Logging.instance.e( - "getEstimated exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getEstimated exception", error: e, stackTrace: s); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -383,13 +370,10 @@ class SimpleSwapAPI { String? apiKey, Trade? oldTrade, }) async { - final uri = _buildUri( - "/get_exchange", - { - "api_key": apiKey ?? kSimpleSwapApiKey, - "id": exchangeId, - }, - ); + final uri = _buildUri("/get_exchange", { + "api_key": apiKey ?? kSimpleSwapApiKey, + "id": exchangeId, + }); try { final jsonObject = await _makeGetRequest(uri); @@ -423,11 +407,7 @@ class SimpleSwapAPI { return ExchangeResponse(value: trade); } catch (e, s) { - Logging.instance.e( - "getExchange exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getExchange exception", error: e, stackTrace: s); return ExchangeResponse( exception: ExchangeException( e.toString(), @@ -444,15 +424,12 @@ class SimpleSwapAPI { required String currencyTo, String? apiKey, }) async { - final uri = _buildUri( - "/get_ranges", - { - "api_key": apiKey ?? kSimpleSwapApiKey, - "fixed": isFixedRate.toString(), - "currency_from": currencyFrom, - "currency_to": currencyTo, - }, - ); + final uri = _buildUri("/get_ranges", { + "api_key": apiKey ?? kSimpleSwapApiKey, + "fixed": isFixedRate.toString(), + "currency_from": currencyFrom, + "currency_to": currencyTo, + }); try { final jsonObject = await _makeGetRequest(uri); @@ -465,11 +442,7 @@ class SimpleSwapAPI { ), ); } catch (e, s) { - Logging.instance.e( - "getRange exception", - error: e, - stackTrace: s, - ); + Logging.instance.e("getRange exception", error: e, stackTrace: s); return ExchangeResponse( exception: ExchangeException( e.toString(), diff --git a/lib/services/exchange/trocador/trocador_api.dart b/lib/services/exchange/trocador/trocador_api.dart index 917fee3f3..2869cef7a 100644 --- a/lib/services/exchange/trocador/trocador_api.dart +++ b/lib/services/exchange/trocador/trocador_api.dart @@ -12,6 +12,7 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; +import '../../../app_config.dart'; import '../../../exceptions/exchange/exchange_exception.dart'; import '../../../networking/http.dart'; import '../../../utilities/extensions/extensions.dart'; @@ -56,10 +57,11 @@ abstract class TrocadorAPI { "Content-Type": "application/json", "API-KEY": kTrocadorApiKey, }, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); code = response.code; @@ -99,8 +101,9 @@ abstract class TrocadorAPI { if (json is List) { final list = List>.from(json); - final List coins = - list.map((e) => TrocadorCoin.fromMap(e)).toList(); + final List coins = list + .map((e) => TrocadorCoin.fromMap(e)) + .toList(); return ExchangeResponse(value: coins); } else { diff --git a/lib/services/fusion_tor_service.dart b/lib/services/fusion_tor_service.dart index caa0ec2ee..1ad9beb4f 100644 --- a/lib/services/fusion_tor_service.dart +++ b/lib/services/fusion_tor_service.dart @@ -1,49 +1,18 @@ import 'dart:io'; -import 'package:tor_ffi_plugin/tor_ffi_plugin.dart'; +import '../wl_gen/generated/tor_service_impl.dart'; -import '../utilities/logger.dart'; - -class FusionTorService { - Tor? _tor; - String? _torDataDirPath; - - TorStatus get status => _tor!.status; - - /// Singleton instance of the TorService. - /// - /// Use this to access the TorService and its properties. - static final sharedInstance = FusionTorService._(); - - // private constructor for singleton - FusionTorService._(); +abstract class FusionTorService { + static FusionTorService get sharedInstance => fusionTorService; /// Getter for the proxyInfo. /// /// Throws if Tor is not connected. - ({ - InternetAddress host, - int port, - }) getProxyInfo() { - try { - return ( - host: InternetAddress.loopbackIPv4, - port: _tor!.port, - ); - } catch (_) { - throw Exception("Tor proxy info fetched while not connected!"); - } - } + ({InternetAddress host, int port}) getProxyInfo(); /// Initialize the tor ffi lib instance if it hasn't already been set. Nothing /// changes if _tor is already been set. - void init({ - required String torDataDirPath, - Tor? mockableOverride, - }) { - _tor ??= mockableOverride ?? Tor.instance; - _torDataDirPath ??= torDataDirPath; - } + void init({required String torDataDirPath}); /// Start the Tor service. /// @@ -53,17 +22,5 @@ class FusionTorService { /// service fails to start. /// /// Returns a Future that completes when the Tor service has started. - Future start() async { - if (_tor == null || _torDataDirPath == null) { - throw Exception("FusionTorService.init has not been called!"); - } - - // Start the Tor service. - try { - await _tor!.start(torDataDirPath: _torDataDirPath!); - } catch (e, s) { - Logging.instance.w("FusionTorService.start failed: ", error: e, stackTrace: s); - rethrow; - } - } + Future start(); } diff --git a/lib/services/litescribe_api.dart b/lib/services/litescribe_api.dart index 9a41f4f2b..244043f9a 100644 --- a/lib/services/litescribe_api.dart +++ b/lib/services/litescribe_api.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import '../app_config.dart'; import '../dto/ordinals/inscription_data.dart'; import '../dto/ordinals/litescribe_response.dart'; import '../networking/http.dart'; @@ -22,7 +23,9 @@ class LitescribeAPI { Future _getResponse(String endpoint) async { final response = await client.get( url: Uri.parse('$baseUrl$endpoint'), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); diff --git a/lib/services/monkey_service.dart b/lib/services/monkey_service.dart index 0ae745d34..bbdd49ac3 100644 --- a/lib/services/monkey_service.dart +++ b/lib/services/monkey_service.dart @@ -2,6 +2,7 @@ import 'dart:typed_data'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../app_config.dart'; import '../networking/http.dart'; import '../utilities/logger.dart'; import '../utilities/prefs.dart'; @@ -26,7 +27,9 @@ class MonKeyService { final response = await client.get( url: Uri.parse(url), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -34,12 +37,14 @@ class MonKeyService { if (response.code == 200) { return Uint8List.fromList(response.bodyBytes); } else { - throw Exception( - "statusCode=${response.code} body=${response.body}", - ); + throw Exception("statusCode=${response.code} body=${response.body}"); } } catch (e, s) { - Logging.instance.e("Failed fetchMonKey($address): ", error: e, stackTrace: s); + Logging.instance.e( + "Failed fetchMonKey($address): ", + error: e, + stackTrace: s, + ); rethrow; } } diff --git a/lib/services/mwebd_service.dart b/lib/services/mwebd_service.dart index cc5e6bdc0..246225750 100644 --- a/lib/services/mwebd_service.dart +++ b/lib/services/mwebd_service.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'dart:io'; import 'dart:math'; -import 'package:flutter_mwebd/flutter_mwebd.dart'; import 'package:mutex/mutex.dart'; import 'package:mweb_client/mweb_client.dart'; @@ -11,6 +10,7 @@ import '../utilities/logger.dart'; import '../utilities/prefs.dart'; import '../utilities/stack_file_system.dart'; import '../wallets/crypto_currency/crypto_currency.dart'; +import '../wl_gen/interfaces/mwebd_server_interface.dart'; import 'event_bus/events/global/tor_connection_status_changed_event.dart'; import 'event_bus/events/global/tor_status_changed_event.dart'; import 'event_bus/global_event_bus.dart'; @@ -24,7 +24,10 @@ final class MwebdService { CryptoCurrencyNetwork.test4 => throw UnimplementedError(), }; - final Map + final Map< + CryptoCurrencyNetwork, + ({OpaqueMwebdServer server, MwebClient client}) + > _map = {}; late final StreamSubscription @@ -80,38 +83,32 @@ final class MwebdService { // update function called when Tor pref changed Future _update(({InternetAddress host, int port})? proxyInfo) async { await _updateLock.protect(() async { - final proxy = - proxyInfo == null - ? "" - : "socks5://${proxyInfo.host.address}:${proxyInfo.port}"; + final proxy = proxyInfo == null + ? "" + : "socks5://${proxyInfo.host.address}:${proxyInfo.port}"; final nets = _map.keys; for (final net in nets) { final old = _map.remove(net)!; - await old.client.cleanup(); - await old.server.stopServer(); + final oldServerInfo = await mwebdServerInterface.stopServer(old.server); final port = await _getRandomUnusedPort(); if (port == null) { throw Exception("Could not find an unused port for mwebd"); } - final newServer = MwebdServer( - chain: old.server.chain, - dataDir: old.server.dataDir, - peer: old.server.peer, + final serverData = await mwebdServerInterface.createAndStartServer( + net, + chain: oldServerInfo.chain, + dataDir: oldServerInfo.dataDir, + peer: oldServerInfo.peer, proxy: proxy, serverPort: port, ); - await newServer.createServer(); - await newServer.startServer(); - final newClient = MwebClient.fromHost( - "127.0.0.1", - newServer.serverPort, - ); + final newClient = MwebClient.fromHost("127.0.0.1", serverData.port); - _map[net] = (server: newServer, client: newClient); + _map[net] = (server: serverData.server, client: newClient); } }); } @@ -128,7 +125,7 @@ final class MwebdService { for (final old in _map.values) { try { await old.client.cleanup(); - await old.server.stopServer(); + await mwebdServerInterface.stopServer(old.server); } catch (e, s) { Logging.instance.i( "Switching mwebd chain. Error likely expected here.", @@ -163,28 +160,27 @@ final class MwebdService { proxy = ""; } - final newServer = MwebdServer( + final serverData = await mwebdServerInterface.createAndStartServer( + net, chain: chain, dataDir: dir.path, peer: defaultPeer(net), proxy: proxy, serverPort: port, ); - await newServer.createServer(); - await newServer.startServer(); - final newClient = MwebClient.fromHost("127.0.0.1", newServer.serverPort); + final newClient = MwebClient.fromHost("127.0.0.1", serverData.port); - _map[net] = (server: newServer, client: newClient); + _map[net] = (server: serverData.server, client: newClient); Logging.instance.i("MwebdService init($net) completed!"); }); } /// Get server status. Returns null if no server was initialized. - Future getServerStatus(CryptoCurrencyNetwork net) async { - return await _updateLock.protect(() async { - return await _map[net]?.server.getStatus(); + Future getServerStatus(CryptoCurrencyNetwork net) { + return _updateLock.protect(() { + return mwebdServerInterface.getServerStatus(_map[net]?.server); }); } diff --git a/lib/services/nano_api.dart b/lib/services/nano_api.dart index 8627b67b3..9e425dd14 100644 --- a/lib/services/nano_api.dart +++ b/lib/services/nano_api.dart @@ -2,16 +2,14 @@ import 'dart:convert'; import 'package:nanodart/nanodart.dart'; +import '../app_config.dart'; import '../networking/http.dart'; import '../utilities/prefs.dart'; import 'tor_service.dart'; class NanoAPI { - static Future< - ({ - NAccountInfo? accountInfo, - Exception? exception, - })> getAccountInfo({ + static Future<({NAccountInfo? accountInfo, Exception? exception})> + getAccountInfo({ required Uri server, required bool representative, required String account, @@ -31,7 +29,9 @@ class NanoAPI { "representative": "true", "account": account, }), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -99,11 +99,7 @@ class NanoAPI { block["signature"] = signature; - final map = await postBlock( - server: server, - block: block, - headers: headers, - ); + final map = await postBlock(server: server, block: block, headers: headers); if (map is Map && map["error"] != null) { throw Exception(map["error"].toString()); @@ -129,7 +125,9 @@ class NanoAPI { "subtype": "change", "block": block, }), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); diff --git a/lib/services/price.dart b/lib/services/price.dart index 9641d0328..ee08952ee 100644 --- a/lib/services/price.dart +++ b/lib/services/price.dart @@ -34,6 +34,7 @@ class PriceAPI { Dash: "dash", Dogecoin: "dogecoin", Epiccash: "epic-cash", + Mimblewimblecoin: "mimblewimblecoin", Ecash: "ecash", Ethereum: "ethereum", Fact0rn: "fact0rn", @@ -147,10 +148,11 @@ class PriceAPI { final coinGeckoResponse = await client.get( url: uri, headers: {'Content-Type': 'application/json'}, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final coinGeckoData = jsonDecode(coinGeckoResponse.body) as List; @@ -161,10 +163,9 @@ class PriceAPI { try { final price = Decimal.parse(map["current_price"].toString()); - final change24h = - map["price_change_percentage_24h"] != null - ? double.parse(map["price_change_percentage_24h"].toString()) - : 0.0; + final change24h = map["price_change_percentage_24h"] != null + ? double.parse(map["price_change_percentage_24h"].toString()) + : 0.0; result[coin] = (value: price, change24h: change24h); } catch (_) { @@ -203,10 +204,11 @@ class PriceAPI { final response = await client.get( url: uri, headers: {'Content-Type': 'application/json'}, - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final json = jsonDecode(response.body) as List; diff --git a/lib/services/price_service.dart b/lib/services/price_service.dart index 43eb68e32..51fa4fab4 100644 --- a/lib/services/price_service.dart +++ b/lib/services/price_service.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'package:decimal/decimal.dart'; import 'package:flutter/foundation.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../db/isar/main_db.dart'; import '../models/isar/models/isar_models.dart'; diff --git a/lib/services/tor_service.dart b/lib/services/tor_service.dart index 542032df7..a4d43c1cf 100644 --- a/lib/services/tor_service.dart +++ b/lib/services/tor_service.dart @@ -1,56 +1,26 @@ import 'dart:io'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:tor_ffi_plugin/tor_ffi_plugin.dart'; -import '../utilities/logger.dart'; +import '../wl_gen/generated/tor_service_impl.dart'; import 'event_bus/events/global/tor_connection_status_changed_event.dart'; -import 'event_bus/global_event_bus.dart'; -final pTorService = Provider((_) => TorService.sharedInstance); +final pTorService = Provider((_) => torService); -class TorService { - Tor? _tor; - String? _torDataDirPath; +abstract class TorService { + static TorService get sharedInstance => torService; /// Current status. Same as that fired on the event bus. - TorConnectionStatus get status => _status; - TorConnectionStatus _status = TorConnectionStatus.disconnected; - - /// Singleton instance of the TorService. - /// - /// Use this to access the TorService and its properties. - static final sharedInstance = TorService._(); - - // private constructor for singleton - TorService._(); + TorConnectionStatus get status; /// Getter for the proxyInfo. /// /// Throws if Tor is not connected. - ({ - InternetAddress host, - int port, - }) getProxyInfo() { - if (status == TorConnectionStatus.connected) { - return ( - host: InternetAddress.loopbackIPv4, - port: _tor!.port, - ); - } else { - throw Exception("Tor proxy info fetched while not connected!"); - } - } + ({InternetAddress host, int port}) getProxyInfo(); /// Initialize the tor ffi lib instance if it hasn't already been set. Nothing /// changes if _tor is already been set. - void init({ - required String torDataDirPath, - Tor? mockableOverride, - }) { - _tor ??= mockableOverride ?? Tor.instance; - _torDataDirPath ??= torDataDirPath; - } + void init({required String torDataDirPath}); /// Start the Tor service. /// @@ -60,75 +30,8 @@ class TorService { /// service fails to start. /// /// Returns a Future that completes when the Tor service has started. - Future start() async { - if (_tor == null || _torDataDirPath == null) { - throw Exception("TorService.init has not been called!"); - } - - // Start the Tor service. - try { - _updateStatusAndFireEvent( - status: TorConnectionStatus.connecting, - message: "TorService.start call in progress", - ); - - await _tor!.start(torDataDirPath: _torDataDirPath!); - - // no exception or error so we can (probably?) assume tor - // has started successfully - // Fire a TorConnectionStatusChangedEvent on the event bus. - _updateStatusAndFireEvent( - status: TorConnectionStatus.connected, - message: "TorService.start call success", - ); - - // Complete the future. - return; - } catch (e, s) { - Logging.instance.w("TorService.start failed: ", error: e, stackTrace: s); - // _enabled should already be false - - // Fire a TorConnectionStatusChangedEvent on the event bus. - _updateStatusAndFireEvent( - status: TorConnectionStatus.disconnected, - message: "TorService.start call failed", - ); - rethrow; - } - } + Future start(); /// Disable Tor. - Future disable() async { - if (_tor == null) { - throw Exception("TorService.init has not been called!"); - } - - // No need to update status and fire event if status won't change. - if (_status == TorConnectionStatus.disconnected) { - return; - } - - _tor!.disable(); - await _tor?.stop(); - - _updateStatusAndFireEvent( - status: TorConnectionStatus.disconnected, - message: "TorService.disable call success", - ); - - return; - } - - void _updateStatusAndFireEvent({ - required TorConnectionStatus status, - required String message, - }) { - _status = status; - GlobalEventBus.instance.fire( - TorConnectionStatusChangedEvent( - _status, - message, - ), - ); - } + Future disable(); } diff --git a/lib/services/wallets.dart b/lib/services/wallets.dart index 7b5f9a376..ffdfbdc0a 100644 --- a/lib/services/wallets.dart +++ b/lib/services/wallets.dart @@ -12,7 +12,7 @@ import 'dart:async'; import 'dart:io'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../app_config.dart'; import '../db/hive/db.dart'; @@ -26,6 +26,7 @@ import '../wallets/crypto_currency/crypto_currency.dart'; import '../wallets/crypto_currency/intermediate/cryptonote_currency.dart'; import '../wallets/isar/models/wallet_info.dart'; import '../wallets/wallet/impl/epiccash_wallet.dart'; +import '../wallets/wallet/impl/mimblewimblecoin_wallet.dart'; import '../wallets/wallet/intermediate/lib_monero_wallet.dart'; import '../wallets/wallet/intermediate/lib_salvium_wallet.dart'; import '../wallets/wallet/wallet.dart'; @@ -132,6 +133,14 @@ class Wallets { Logging.instance.d( "epic wallet: $walletId deleted with result: $deleteResult", ); + } else if (info.coin is Mimblewimblecoin) { + final deleteResult = await deleteMimblewimblecoinWallet( + walletId: walletId, + secureStore: secureStorage, + ); + Logging.instance.i( + "Mimblewimblecoin wallet: $walletId deleted with result: $deleteResult", + ); } // delete wallet data in main db diff --git a/lib/themes/coin_icon_provider.dart b/lib/themes/coin_icon_provider.dart index 4a789ad76..1deb22b4e 100644 --- a/lib/themes/coin_icon_provider.dart +++ b/lib/themes/coin_icon_provider.dart @@ -28,6 +28,8 @@ final coinIconProvider = Provider.family((ref, coin) { return assets.dogecoin; case const (Epiccash): return assets.epicCash; + case const (Mimblewimblecoin): + return assets.mimblewimblecoin; case const (Firo): return assets.firo; case const (Monero): diff --git a/lib/themes/theme_service.dart b/lib/themes/theme_service.dart index 3479f7ecf..04e32f6de 100644 --- a/lib/themes/theme_service.dart +++ b/lib/themes/theme_service.dart @@ -15,7 +15,7 @@ import 'package:archive/archive_io.dart'; import 'package:crypto/crypto.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../app_config.dart'; import '../db/isar/main_db.dart'; @@ -92,12 +92,11 @@ class ThemeService { Future remove({required String themeId}) async { final themesDir = StackFileSystem.themesDir!; - final isarId = - await db.isar.stackThemes - .where() - .themeIdEqualTo(themeId) - .idProperty() - .findFirst(); + final isarId = await db.isar.stackThemes + .where() + .themeIdEqualTo(themeId) + .idProperty() + .findFirst(); if (isarId != null) { await db.isar.writeTxn(() async { await db.isar.stackThemes.delete(isarId); @@ -149,8 +148,10 @@ class ThemeService { // TODO more thorough check/verification of theme Future verifyInstalled({required String themeId}) async { - final theme = - await db.isar.stackThemes.where().themeIdEqualTo(themeId).findFirst(); + final theme = await db.isar.stackThemes + .where() + .themeIdEqualTo(themeId) + .findFirst(); if (theme != null) { try { theme.assets; @@ -159,10 +160,12 @@ class ThemeService { } final themesDir = StackFileSystem.themesDir!; - final jsonFileExists = - await File("${themesDir.path}/$themeId/theme.json").exists(); - final assetsDirExists = - await Directory("${themesDir.path}/$themeId/assets").exists(); + final jsonFileExists = await File( + "${themesDir.path}/$themeId/theme.json", + ).exists(); + final assetsDirExists = await Directory( + "${themesDir.path}/$themeId/assets", + ).exists(); if (!jsonFileExists || !assetsDirExists) { Logging.instance.w( @@ -181,19 +184,19 @@ class ThemeService { try { final response = await client.get( url: Uri.parse("$baseServerUrl/themes"), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final jsonList = jsonDecode(response.body) as List; - final result = - List>.from(jsonList) - .map((e) => StackThemeMetaData.fromMap(e)) - .where((e) => e.id != "light" && e.id != "dark") - .toList(); + final result = List>.from(jsonList) + .map((e) => StackThemeMetaData.fromMap(e)) + .where((e) => e.id != "light" && e.id != "dark") + .toList(); return result; } catch (e, s) { @@ -212,10 +215,11 @@ class ThemeService { try { final response = await client.get( url: Uri.parse("$baseServerUrl/theme/${themeMetaData.id}"), - proxyInfo: - Prefs.instance.useTor - ? TorService.sharedInstance.getProxyInfo() - : null, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final bytes = Uint8List.fromList(response.bodyBytes); diff --git a/lib/utilities/address_utils.dart b/lib/utilities/address_utils.dart index 9e63370e1..ff0880cec 100644 --- a/lib/utilities/address_utils.dart +++ b/lib/utilities/address_utils.dart @@ -261,6 +261,31 @@ class AddressUtils { } return epicAddress; } + + /// Formats an address string to remove any unnecessary prefixes or suffixes. + String formatAddressMwc(String mimblewimblecoinAddress) { + // strip http:// or https:// prefixes if the address contains an @ symbol (and is thus an mwcmqs address) + if ((mimblewimblecoinAddress.startsWith("http://") || + mimblewimblecoinAddress.startsWith("https://")) && + mimblewimblecoinAddress.contains("@")) { + mimblewimblecoinAddress = + mimblewimblecoinAddress.replaceAll("http://", ""); + mimblewimblecoinAddress = + mimblewimblecoinAddress.replaceAll("https://", ""); + } + // strip mailto: prefix + if (mimblewimblecoinAddress.startsWith("mailto:")) { + mimblewimblecoinAddress = + mimblewimblecoinAddress.replaceAll("mailto:", ""); + } + // strip / suffix if the address contains an @ symbol (and is thus an mwcmqs address) + if (mimblewimblecoinAddress.endsWith("/") && + mimblewimblecoinAddress.contains("@")) { + mimblewimblecoinAddress = mimblewimblecoinAddress.substring( + 0, mimblewimblecoinAddress.length - 1); + } + return mimblewimblecoinAddress; + } } class PaymentUriData { diff --git a/lib/utilities/amount/amount_unit.dart b/lib/utilities/amount/amount_unit.dart index a8cbfa701..79e45232b 100644 --- a/lib/utilities/amount/amount_unit.dart +++ b/lib/utilities/amount/amount_unit.dart @@ -63,6 +63,7 @@ enum AmountUnit { // case Coin.dogecoin: // case Coin.eCash: // case Coin.epicCash: + // case Coin.mimblewimblecoin: // case Coin.stellar: // TODO: check if this is correct // case Coin.stellarTestnet: // case Coin.tezos: diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index d14cdc38c..e75bf8eb4 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -246,6 +246,7 @@ class _SVG { String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg"; String get dogecoin => "assets/svg/coin_icons/Dogecoin.svg"; String get epicCash => "assets/svg/coin_icons/EpicCash.svg"; + String get mimblewimblecoin => "assets/svg/coin_icons/Mimblewimblecoin.svg"; String get ethereum => "assets/svg/coin_icons/Ethereum.svg"; String get firo => "assets/svg/coin_icons/Firo.svg"; String get monero => "assets/svg/coin_icons/Monero.svg"; diff --git a/lib/utilities/connection_check/electrum_connection_check.dart b/lib/utilities/connection_check/electrum_connection_check.dart index 325cfa059..478d5e5b3 100644 --- a/lib/utilities/connection_check/electrum_connection_check.dart +++ b/lib/utilities/connection_check/electrum_connection_check.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:electrum_adapter/electrum_adapter.dart'; +import '../../app_config.dart'; import '../../services/event_bus/events/global/tor_connection_status_changed_event.dart'; import '../../services/tor_service.dart'; import '../logger.dart'; @@ -15,13 +16,12 @@ Future checkElectrumServer({ TorService? overrideTorService, }) async { final _prefs = overridePrefs ?? Prefs.instance; - final _torService = overrideTorService ?? TorService.sharedInstance; ({InternetAddress host, int port})? proxyInfo; try { - // If we're supposed to use Tor... - if (_prefs.useTor) { + if (AppConfig.hasFeature(AppFeature.tor) && _prefs.useTor) { + final _torService = overrideTorService ?? TorService.sharedInstance; // But Tor isn't running... if (_torService.status != TorConnectionStatus.connected) { // And the killswitch isn't set... @@ -43,29 +43,26 @@ Future checkElectrumServer({ } } - final client = await ElectrumClient.connect( - host: host, - port: port, - useSSL: useSSL && !host.endsWith('.onion'), - proxyInfo: proxyInfo, - ).timeout( + final client = + await ElectrumClient.connect( + host: host, + port: port, + useSSL: useSSL && !host.endsWith('.onion'), + proxyInfo: proxyInfo, + ).timeout( + Duration(seconds: (proxyInfo == null ? 5 : 30)), + onTimeout: () => throw Exception( + "The checkElectrumServer connect() call timed out.", + ), + ); + + await client.ping().timeout( Duration(seconds: (proxyInfo == null ? 5 : 30)), - onTimeout: () => throw Exception( - "The checkElectrumServer connect() call timed out.", - ), ); - await client - .ping() - .timeout(Duration(seconds: (proxyInfo == null ? 5 : 30))); - return true; } catch (e, s) { - Logging.instance.e( - "$e\n$s", - error: e, - stackTrace: s, - ); + Logging.instance.e("$e\n$s", error: e, stackTrace: s); return false; } } diff --git a/lib/utilities/default_mwcmqs.dart b/lib/utilities/default_mwcmqs.dart new file mode 100644 index 000000000..84e7356d8 --- /dev/null +++ b/lib/utilities/default_mwcmqs.dart @@ -0,0 +1,53 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import '../models/mwcmqs_server_model.dart'; + +abstract class DefaultMwcMqs { + static const String defaultName = "Default"; + + static List get all => [americas, asia, europe]; + static List get defaultIds => ['americas', 'asia', 'europe']; + + static MwcMqsServerModel get americas => MwcMqsServerModel( + host: 'mqs.mwc.mw', + port: 443, + name: 'Americas', + id: 'americas', + useSSL: true, + enabled: true, + isFailover: true, + isDown: false, + ); + + static MwcMqsServerModel get asia => MwcMqsServerModel( + host: 'mqs.mwc.mw', + port: 443, + name: 'Asia', + id: 'asia', + useSSL: true, + enabled: true, + isFailover: true, + isDown: false, + ); + + static MwcMqsServerModel get europe => MwcMqsServerModel( + host: 'mqs.mwc.mw', + port: 443, + name: 'Europe', + id: 'europe', + useSSL: true, + enabled: true, + isFailover: true, + isDown: false, + ); + + static final defaultMwcMqsServer = americas; +} diff --git a/lib/utilities/desktop_password_service.dart b/lib/utilities/desktop_password_service.dart index 39243962b..1649a5d3b 100644 --- a/lib/utilities/desktop_password_service.dart +++ b/lib/utilities/desktop_password_service.dart @@ -8,7 +8,7 @@ * */ -import 'package:hive/hive.dart' show Box; +import 'package:hive_ce/hive.dart' show Box; import 'package:stack_wallet_backup/secure_storage.dart'; import '../db/hive/db.dart'; @@ -68,7 +68,11 @@ class DPS { await _put(key: _kKeyBlobKey, value: await _handler!.getKeyBlob()); await _updateStoredKeyBlobVersion(kLatestBlobVersion); } catch (e, s) { - Logging.instance.e("${_getMessageFromException(e)}\n$s", error: e, stackTrace: s); + Logging.instance.e( + "${_getMessageFromException(e)}\n$s", + error: e, + stackTrace: s, + ); rethrow; } } @@ -101,7 +105,11 @@ class DPS { await _updateStoredKeyBlobVersion(kLatestBlobVersion); } } catch (e, s) { - Logging.instance.e("${_getMessageFromException(e)}\n$s", error: e, stackTrace: s); + Logging.instance.e( + "${_getMessageFromException(e)}\n$s", + error: e, + stackTrace: s, + ); throw Exception(_getMessageFromException(e)); } } @@ -119,7 +127,11 @@ class DPS { // existing passphrase matches key blob return true; } catch (e, s) { - Logging.instance.w("${_getMessageFromException(e)}\n$s", error: e, stackTrace: s,); + Logging.instance.w( + "${_getMessageFromException(e)}\n$s", + error: e, + stackTrace: s, + ); // password is wrong or some other error return false; } @@ -143,16 +155,17 @@ class DPS { final blobVersion = await _getStoredKeyBlobVersion(); await _handler!.resetPassphrase(passphraseNew, blobVersion); - await _put( - key: _kKeyBlobKey, - value: await _handler!.getKeyBlob(), - ); + await _put(key: _kKeyBlobKey, value: await _handler!.getKeyBlob()); await _updateStoredKeyBlobVersion(blobVersion); // successfully updated passphrase return true; } catch (e, s) { - Logging.instance.w("${_getMessageFromException(e)}\n$s", error: e, stackTrace: s,); + Logging.instance.w( + "${_getMessageFromException(e)}\n$s", + error: e, + stackTrace: s, + ); return false; } } diff --git a/lib/utilities/enums/mwc_transaction_method.dart b/lib/utilities/enums/mwc_transaction_method.dart new file mode 100644 index 000000000..4b24ad37f --- /dev/null +++ b/lib/utilities/enums/mwc_transaction_method.dart @@ -0,0 +1,70 @@ +/// Enum to represent different MWC transaction methods. +enum MwcTransactionMethod { + /// Manual slatepack exchange (copy/paste, QR codes, files). + slatepack, + + /// Automatic transaction via MWCMQS. + mwcmqs; + + // /// Direct HTTP/HTTPS to recipient's wallet. + // http, + // + // /// Unknown or unsupported method. + // unknown; + + /// Human readable name for the transaction method. + String get displayName { + switch (this) { + case MwcTransactionMethod.slatepack: + return 'Slatepack'; + case MwcTransactionMethod.mwcmqs: + return 'MWCMQS'; + // case MwcTransactionMethod.http: + // return 'HTTP'; + // case MwcTransactionMethod.unknown: + // return 'Unknown'; + } + } + + /// Description of how the transaction method works. + String get description { + switch (this) { + case MwcTransactionMethod.slatepack: + return 'Manual exchange via text, QR codes, or files'; + case MwcTransactionMethod.mwcmqs: + return 'Automatic exchange via MWCMQS messaging'; + // case MwcTransactionMethod.http: + // return 'Direct connection to recipient wallet'; + // case MwcTransactionMethod.unknown: + // return 'Unsupported transaction method'; + } + } + + /// Whether this method requires manual intervention. + bool get isManual { + switch (this) { + case MwcTransactionMethod.slatepack: + return true; + case MwcTransactionMethod.mwcmqs: + return false; + // case MwcTransactionMethod.http: + // return false; + // case MwcTransactionMethod.unknown: + // return true; + } + } + + /// Whether this method works offline. + bool get worksOffline { + switch (this) { + case MwcTransactionMethod.slatepack: + return true; + case MwcTransactionMethod.mwcmqs: + return false; + // case MwcTransactionMethod.http: + // return false; + // case MwcTransactionMethod.unknown: + // return false; + } + } +} diff --git a/lib/utilities/flutter_secure_storage_interface.dart b/lib/utilities/flutter_secure_storage_interface.dart index 1c81119ab..10f5055a1 100644 --- a/lib/utilities/flutter_secure_storage_interface.dart +++ b/lib/utilities/flutter_secure_storage_interface.dart @@ -9,7 +9,7 @@ */ import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:stack_wallet_backup/secure_storage.dart'; import '../models/isar/models/encrypted_string_value.dart'; @@ -81,9 +81,7 @@ class DesktopSecureStore { await isar.close(); } - Future read({ - required String key, - }) async { + Future read({required String key}) async { final value = await isar.encryptedStringValues.filter().keyEqualTo(key).findFirst(); @@ -95,10 +93,7 @@ class DesktopSecureStore { return await handler.decryptValue(key, value.value); } - Future write({ - required String key, - required String? value, - }) async { + Future write({required String key, required String? value}) async { if (value == null) { // here we assume that a value is to be deleted await isar.writeTxn(() async { @@ -117,9 +112,7 @@ class DesktopSecureStore { } } - Future delete({ - required String key, - }) async { + Future delete({required String key}) async { await isar.writeTxn(() async { await isar.encryptedStringValues.deleteByKey(key); }); @@ -138,16 +131,12 @@ class SecureStorageWrapper implements SecureStorageInterface { @override dynamic get store => _store; - const SecureStorageWrapper({ - required dynamic store, - required bool isDesktop, - }) : assert( - isDesktop - ? store is DesktopSecureStore - : store is FlutterSecureStorage, - ), - _store = store, - _isDesktop = isDesktop; + const SecureStorageWrapper({required dynamic store, required bool isDesktop}) + : assert( + isDesktop ? store is DesktopSecureStore : store is FlutterSecureStorage, + ), + _store = store, + _isDesktop = isDesktop; @override Future read({ diff --git a/lib/utilities/git_status.dart b/lib/utilities/git_status.dart index c89cf2439..a6d79f386 100644 --- a/lib/utilities/git_status.dart +++ b/lib/utilities/git_status.dart @@ -1,13 +1,14 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as epic_versions; import 'package:http/http.dart'; import '../../../themes/stack_colors.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/text_styles.dart'; import '../app_config.dart'; +import '../wl_gen/generated/libepiccash_interface_impl.dart'; +import '../wl_gen/interfaces/libmwc_interface.dart'; const kGithubAPI = "https://api.github.com"; const kGithubSearch = "/search/commits"; @@ -16,8 +17,9 @@ const kGithubHead = "/repos"; enum CommitStatus { isHead, isOldCommit, notACommit, notLoaded } abstract class GitStatus { - static String get epicCashCommit => epic_versions.getPluginVersion(); + static String get epicCashCommit => libEpic.getPluginVersion(); // static String get moneroCommit => monero_versions.getPluginVersion(); + static String get mimblewimblecoinCommit => libMwc.getPluginVersion(); static String get appCommitHash => AppConfig.commitHash; @@ -51,6 +53,60 @@ abstract class GitStatus { return _cachedEpicStatus!; } + static CommitStatus? _cachedMimblewimblecoinStatus; + static Future getMimblewimblecoinCommitStatus() async { + if (_cachedMimblewimblecoinStatus != null) { + return _cachedMimblewimblecoinStatus!; + } + final List results = await Future.wait([ + _doesCommitExist("cypherstack", "flutter_libmwc", mimblewimblecoinCommit), + _isHeadCommit( + "cypherstack", + "flutter_libmwc", + "main", + mimblewimblecoinCommit, + ), + ]); + + final commitExists = results[0]; + final commitIsHead = results[1]; + + if (commitExists && commitIsHead) { + _cachedMimblewimblecoinStatus = CommitStatus.isHead; + } else if (commitExists) { + _cachedMimblewimblecoinStatus = CommitStatus.isOldCommit; + } else { + _cachedMimblewimblecoinStatus = CommitStatus.notACommit; + } + + return _cachedMimblewimblecoinStatus!; + } + + //static CommitStatus? _cachedMoneroStatus; + //static Future getMoneroCommitStatus() async { + // if (_cachedMoneroStatus != null) { + // return _cachedMoneroStatus!; + // } + // + // final List results = await Future.wait([ + // _doesCommitExist("cypherstack", "flutter_libmonero", moneroCommit), + // _isHeadCommit("cypherstack", "flutter_libmonero", "main", moneroCommit), + // ]); + // + // final commitExists = results[0]; + // final commitIsHead = results[1]; + // + // if (commitExists && commitIsHead) { + // _cachedMoneroStatus = CommitStatus.isHead; + // } else if (commitExists) { + // _cachedMoneroStatus = CommitStatus.isOldCommit; + // } else { + // _cachedMoneroStatus = CommitStatus.notACommit; + // } + // + // return _cachedMoneroStatus!; + //} + static TextStyle styleForStatus(CommitStatus status, BuildContext context) { final Color color; switch (status) { diff --git a/lib/utilities/logger.dart b/lib/utilities/logger.dart index d4cc03dcf..b5ae5f00d 100644 --- a/lib/utilities/logger.dart +++ b/lib/utilities/logger.dart @@ -14,7 +14,6 @@ import 'dart:core'; import 'dart:isolate'; import 'dart:ui'; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart' as spark; import 'package:logger/logger.dart'; import 'util.dart'; @@ -23,26 +22,6 @@ export 'enums/log_level_enum.dart'; const _kLoggerPortName = "logger_port"; -// convenience conversion for spark -extension LoggingLevelExt on spark.LoggingLevel { - Level getLoggerLevel() { - switch (this) { - case spark.LoggingLevel.info: - return Level.info; - case spark.LoggingLevel.warning: - return Level.warning; - case spark.LoggingLevel.error: - return Level.error; - case spark.LoggingLevel.fatal: - return Level.fatal; - case spark.LoggingLevel.debug: - return Level.debug; - case spark.LoggingLevel.trace: - return Level.trace; - } - } -} - class Logging { Logging._(); static final Logging _instance = Logging._(); @@ -82,8 +61,9 @@ class Logging { PrettyPrinter prettyPrinter(bool toFile) => PrettyPrinter( printEmojis: false, methodCount: 0, - dateTimeFormat: - toFile ? DateTimeFormat.none : DateTimeFormat.dateAndTime, + dateTimeFormat: toFile + ? DateTimeFormat.none + : DateTimeFormat.dateAndTime, colors: !toFile, noBoxingByDefault: toFile, ); @@ -132,8 +112,8 @@ class Logging { String _stringifyMessage(dynamic message) => !(message is Map || message is Iterable) - ? message.toString() - : JsonEncoder.withIndent(' ', (o) => o.toString()).convert(message); + ? message.toString() + : JsonEncoder.withIndent(' ', (o) => o.toString()).convert(message); void log( Level level, diff --git a/lib/utilities/paynym_is_api.dart b/lib/utilities/paynym_is_api.dart index f81fc855a..9285fef7f 100644 --- a/lib/utilities/paynym_is_api.dart +++ b/lib/utilities/paynym_is_api.dart @@ -12,6 +12,7 @@ import 'dart:convert'; import 'package:tuple/tuple.dart'; +import '../app_config.dart'; import '../models/paynym/created_paynym.dart'; import '../models/paynym/paynym_account.dart'; import '../models/paynym/paynym_claim.dart'; @@ -44,14 +45,16 @@ class PaynymIsApi { final headers = { 'Content-Type': 'application/json; charset=UTF-8', - 'content-length': - contentLength.toString(), // Set the Content-Length header. + 'content-length': contentLength + .toString(), // Set the Content-Length header. }..addAll(additionalHeaders); final response = await client.post( url: uri, headers: headers, body: jsonEncode(body), - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -414,13 +417,8 @@ class PaynymIsApi { ) async { final result = await _post( "/follow", - { - "target": target, - "signature": signature, - }, - { - "auth-token": token, - }, + {"target": target, "signature": signature}, + {"auth-token": token}, ); String message; @@ -495,13 +493,8 @@ class PaynymIsApi { ) async { final result = await _post( "/unfollow", - { - "target": target, - "signature": signature, - }, - { - "auth-token": token, - }, + {"target": target, "signature": signature}, + {"auth-token": token}, ); String message; @@ -579,14 +572,8 @@ class PaynymIsApi { ) async { final result = await _post( "/nym/add", - { - "nym": nym, - "code": code, - "signature": signature, - }, - { - "auth-token": token, - }, + {"nym": nym, "code": code, "signature": signature}, + {"auth-token": token}, ); String message; diff --git a/lib/utilities/test_epic_box_connection.dart b/lib/utilities/test_epic_box_connection.dart index 1c39390e2..89eefd442 100644 --- a/lib/utilities/test_epic_box_connection.dart +++ b/lib/utilities/test_epic_box_connection.dart @@ -10,6 +10,7 @@ import 'dart:convert'; +import '../app_config.dart'; import '../networking/http.dart'; import '../pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart'; import '../services/tor_service.dart'; @@ -24,7 +25,9 @@ Future _testEpicBoxNodeConnection(Uri uri) async { .get( url: uri, headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ) @@ -41,7 +44,7 @@ Future _testEpicBoxNodeConnection(Uri uri) async { return false; } } catch (e, s) { - Logging.instance.w("$e\n$s", error: e, stackTrace: s,); + Logging.instance.w("$e\n$s", error: e, stackTrace: s); return false; } } @@ -87,7 +90,7 @@ Future testEpicNodeConnection(NodeFormData data) async { return null; } } catch (e, s) { - Logging.instance.w("$e\n$s", error: e, stackTrace: s,); + Logging.instance.w("$e\n$s", error: e, stackTrace: s); return null; } } diff --git a/lib/utilities/test_monero_node_connection.dart b/lib/utilities/test_monero_node_connection.dart index 7eba0ee30..6a4fbfa45 100644 --- a/lib/utilities/test_monero_node_connection.dart +++ b/lib/utilities/test_monero_node_connection.dart @@ -16,7 +16,7 @@ import 'package:flutter/material.dart'; import 'package:http/io_client.dart'; import 'package:monero_rpc/monero_rpc.dart'; import 'package:socks5_proxy/socks.dart'; -import 'package:tor_ffi_plugin/socks_socket.dart'; +import 'package:socks_socket/socks_socket.dart'; import '../widgets/desktop/primary_button.dart'; import '../widgets/desktop/secondary_button.dart'; diff --git a/lib/utilities/test_mwcmqs_connection.dart b/lib/utilities/test_mwcmqs_connection.dart new file mode 100644 index 000000000..c199afcbf --- /dev/null +++ b/lib/utilities/test_mwcmqs_connection.dart @@ -0,0 +1,92 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import 'dart:convert'; + +import '../app_config.dart'; +import '../networking/http.dart'; +import '../pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart'; +import '../services/tor_service.dart'; +import 'logger.dart'; +import 'prefs.dart'; + +Future _testMwcMqsNodeConnection(Uri uri) async { + final HTTP client = HTTP(); + try { + final headers = {'Content-Type': 'application/json'}; + + if (uri.toString() == 'https://mwc713.mwc.mw/v1/version') { + const username = 'mwcmain'; + const password = '11ne3EAUtOXVKwhxm84U'; + final credentials = base64Encode(utf8.encode('$username:$password')); + headers['Authorization'] = 'Basic $credentials'; + } + final response = await client + .get( + url: uri, + headers: headers, + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, + ) + .timeout( + const Duration(milliseconds: 2000), + onTimeout: () async => Response(utf8.encode('Error'), 408), + ); + + final json = jsonDecode(response.body); + + if (response.code == 200 && json["node_version"] != null) { + return true; + } else { + return false; + } + } catch (e, s) { + Logging.instance.w("$e\n$s"); + return false; + } +} + +// returns node data with properly formatted host/url if successful, otherwise null +Future testMwcNodeConnection(NodeFormData data) async { + if (data.host == null || data.port == null || data.useSSL == null) { + return null; + } + const String path_postfix = "/v1/version"; + + if (data.host!.startsWith("https://")) { + data.useSSL = true; + } else if (data.host!.startsWith("http://")) { + data.useSSL = false; + } else { + if (data.useSSL!) { + data.host = "https://${data.host!}"; + } else { + data.host = "http://${data.host!}"; + } + } + + Uri uri = Uri.parse(data.host! + path_postfix); + + uri = uri.replace(port: data.port); + + try { + if (await _testMwcMqsNodeConnection(uri)) { + return data; + } else { + return null; + } + } catch (e, s) { + Logging.instance.w("$e\n$s"); + return null; + } +} diff --git a/lib/utilities/test_node_connection.dart b/lib/utilities/test_node_connection.dart index 7e8616ac2..c6b5ee00d 100644 --- a/lib/utilities/test_node_connection.dart +++ b/lib/utilities/test_node_connection.dart @@ -7,6 +7,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:on_chain/ada/ada.dart'; import 'package:socks5_proxy/socks.dart'; +import '../app_config.dart'; import '../networking/http.dart'; import '../pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart'; import '../providers/global/prefs_provider.dart'; @@ -18,24 +19,21 @@ import '../wallets/crypto_currency/interfaces/electrumx_currency_interface.dart' import '../wallets/crypto_currency/intermediate/cryptonote_currency.dart'; import '../wallets/crypto_currency/intermediate/nano_currency.dart'; import '../wallets/wallet/impl/solana_wallet.dart'; +import '../wl_gen/interfaces/lib_xelis_interface.dart'; import 'connection_check/electrum_connection_check.dart'; import 'logger.dart'; import 'test_epic_box_connection.dart'; import 'test_eth_node_connection.dart'; import 'test_monero_node_connection.dart'; +import 'test_mwcmqs_connection.dart'; import 'test_stellar_node_connection.dart'; import 'tor_plain_net_option_enum.dart'; -import 'package:xelis_dart_sdk/xelis_dart_sdk.dart' as xelis_sdk; - Future _xmrHelper( NodeFormData nodeFormData, BuildContext context, void Function(NodeFormData)? onSuccess, - ({ - InternetAddress host, - int port, - })? proxyInfo, + ({InternetAddress host, int port})? proxyInfo, ) async { final data = nodeFormData; final url = data.host!; @@ -128,17 +126,28 @@ Future testNodeConnection({ onSuccess?.call(data); } } catch (e, s) { - Logging.instance.w( - "$e\n$s", - error: e, - stackTrace: s, - ); + Logging.instance.w("$e\n$s", error: e, stackTrace: s); + } + break; + + case Mimblewimblecoin(): + try { + final data = await testMwcNodeConnection(formData); + + if (data != null) { + testPassed = true; + onSuccess?.call(data); + } + } catch (e, s) { + Logging.instance.w("$e\n$s"); } break; case CryptonoteCurrency(): try { - final proxyInfo = ref.read(prefsChangeNotifierProvider).useTor + final proxyInfo = !AppConfig.hasFeature(AppFeature.tor) + ? null + : ref.read(prefsChangeNotifierProvider).useTor ? ref.read(pTorService).getProxyInfo() : null; @@ -179,11 +188,7 @@ Future testNodeConnection({ } } } catch (e, s) { - Logging.instance.w( - "$e\n$s", - error: e, - stackTrace: s, - ); + Logging.instance.w("$e\n$s", error: e, stackTrace: s); } break; @@ -214,8 +219,10 @@ Future testNodeConnection({ case Stellar(): try { - testPassed = - await testStellarNodeConnection(formData.host!, formData.port!); + testPassed = await testStellarNodeConnection( + formData.host!, + formData.port!, + ); } catch (_) {} break; @@ -226,12 +233,10 @@ Future testNodeConnection({ final response = await HTTP().post( url: uri, headers: {"Content-Type": "application/json"}, - body: jsonEncode( - { - "action": "version", - }, - ), - proxyInfo: ref.read(prefsChangeNotifierProvider).useTor + body: jsonEncode({"action": "version"}), + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : ref.read(prefsChangeNotifierProvider).useTor ? ref.read(pTorService).getProxyInfo() : null, ); @@ -259,9 +264,7 @@ Future testNodeConnection({ ); final health = await rpcClient.getHealth(); - Logging.instance.i( - "Solana testNodeConnection \"health=$health\"", - ); + Logging.instance.i("Solana testNodeConnection \"health=$health\""); return true; } catch (_) { testPassed = false; @@ -271,12 +274,10 @@ Future testNodeConnection({ case Cardano(): try { final client = HttpClient(); - if (ref.read(prefsChangeNotifierProvider).useTor) { + if (AppConfig.hasFeature(AppFeature.tor) && + ref.read(prefsChangeNotifierProvider).useTor) { final proxyInfo = TorService.sharedInstance.getProxyInfo(); - final proxySettings = ProxySettings( - proxyInfo.host, - proxyInfo.port, - ); + final proxySettings = ProxySettings(proxyInfo.host, proxyInfo.port); SocksTCPClient.assignToHttpClient(client, [proxySettings]); } final blockfrostProvider = BlockforestProvider( @@ -290,9 +291,7 @@ Future testNodeConnection({ BlockfrostRequestBackendHealthStatus(), ); - Logging.instance.i( - "Cardano testNodeConnection \"health=$health\"", - ); + Logging.instance.i("Cardano testNodeConnection \"health=$health\""); return health; } catch (_) { @@ -302,22 +301,11 @@ Future testNodeConnection({ case Xelis(): try { - final daemon = xelis_sdk.DaemonClient( - endPoint: "${formData.host!}:${formData.port!}", - secureWebSocket: formData.useSSL ?? false, - timeout: 5000 - ); - daemon.connect(); - - final xelis_sdk.GetInfoResult networkInfo = await daemon.getInfo(); - testPassed = networkInfo.height != null; - - daemon.disconnect(); - - Logging.instance.i( - "Xelis testNodeConnection result: \"${networkInfo.toString()}\"", + testPassed = await libXelis.testDaemonConnection( + "${formData.host!}:${formData.port!}", + formData.useSSL ?? false, ); - } catch (e, s) { + } catch (_) { testPassed = false; } break; diff --git a/lib/utilities/test_stellar_node_connection.dart b/lib/utilities/test_stellar_node_connection.dart index 2fd2f9fcc..3af380f63 100644 --- a/lib/utilities/test_stellar_node_connection.dart +++ b/lib/utilities/test_stellar_node_connection.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:stellar_flutter_sdk/stellar_flutter_sdk.dart'; +import '../app_config.dart'; import '../networking/http.dart' as http; import '../services/tor_service.dart'; import 'prefs.dart'; @@ -14,7 +15,9 @@ Future testStellarNodeConnection(String host, int port) async { .get( url: uri, headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ) diff --git a/lib/utilities/wallet_tools.dart b/lib/utilities/wallet_tools.dart index b38578370..6b122334a 100644 --- a/lib/utilities/wallet_tools.dart +++ b/lib/utilities/wallet_tools.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../db/isar/main_db.dart'; import '../models/isar/models/blockchain_data/v2/transaction_v2.dart'; diff --git a/lib/wallets/api/tezos/tezos_api.dart b/lib/wallets/api/tezos/tezos_api.dart index 49065433e..6bd7496cd 100644 --- a/lib/wallets/api/tezos/tezos_api.dart +++ b/lib/wallets/api/tezos/tezos_api.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import '../../../app_config.dart'; import '../../../networking/http.dart'; import '../../../services/tor_service.dart'; import '../../../utilities/logger.dart'; @@ -17,7 +18,9 @@ abstract final class TezosAPI { final response = await _client.get( url: Uri.parse(uriString), headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -25,7 +28,11 @@ abstract final class TezosAPI { final result = jsonDecode(response.body); return result as int; } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting counter for $address: ", error: e, stackTrace: s); + Logging.instance.e( + "Error occurred in TezosAPI while getting counter for $address: ", + error: e, + stackTrace: s, + ); rethrow; } } @@ -39,7 +46,9 @@ abstract final class TezosAPI { final response = await _client.get( url: Uri.parse(uriString), headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -50,7 +59,11 @@ abstract final class TezosAPI { return account; } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting account for $address: ", error: e, stackTrace: s); + Logging.instance.e( + "Error occurred in TezosAPI while getting account for $address: ", + error: e, + stackTrace: s, + ); rethrow; } } @@ -63,7 +76,9 @@ abstract final class TezosAPI { final response = await _client.get( url: Uri.parse(transactionsCall), headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); @@ -78,9 +93,10 @@ abstract final class TezosAPI { hash: tx["hash"] as String, type: tx["type"] as String, height: tx["level"] as int, - timestamp: DateTime.parse(tx["timestamp"].toString()) - .toUtc() - .millisecondsSinceEpoch ~/ + timestamp: + DateTime.parse( + tx["timestamp"].toString(), + ).toUtc().millisecondsSinceEpoch ~/ 1000, cycle: tx["cycle"] as int?, counter: tx["counter"] as int, @@ -91,7 +107,8 @@ abstract final class TezosAPI { gasUsed: tx["gasUsed"] as int, storageLimit: tx["storageLimit"] as int?, amountInMicroTez: tx["amount"] as int, - feeInMicroTez: (tx["bakerFee"] as int? ?? 0) + + feeInMicroTez: + (tx["bakerFee"] as int? ?? 0) + (tx["storageFee"] as int? ?? 0) + (tx["allocationFee"] as int? ?? 0), burnedAmountInMicroTez: tx["burned"] as int?, @@ -103,7 +120,11 @@ abstract final class TezosAPI { } return txs; } catch (e, s) { - Logging.instance.e("Error occurred in TezosAPI while getting transactions for $address: ", error: e, stackTrace: s); + Logging.instance.e( + "Error occurred in TezosAPI while getting transactions for $address: ", + error: e, + stackTrace: s, + ); rethrow; } } diff --git a/lib/wallets/api/tezos/tezos_rpc_api.dart b/lib/wallets/api/tezos/tezos_rpc_api.dart index 4f9c71fe8..721d8b0fa 100644 --- a/lib/wallets/api/tezos/tezos_rpc_api.dart +++ b/lib/wallets/api/tezos/tezos_rpc_api.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import '../../../app_config.dart'; import '../../../networking/http.dart'; import '../../../services/tor_service.dart'; import '../../../utilities/logger.dart'; @@ -19,13 +20,16 @@ abstract final class TezosRpcAPI { final response = await _client.get( url: Uri.parse(balanceCall), headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); - final balance = - BigInt.parse(response.body.substring(1, response.body.length - 2)); + final balance = BigInt.parse( + response.body.substring(1, response.body.length - 2), + ); return balance; } catch (e, s) { Logging.instance.e( @@ -47,7 +51,9 @@ abstract final class TezosRpcAPI { final response = await _client.get( url: Uri.parse(api), headers: {'Content-Type': 'application/json'}, - proxyInfo: Prefs.instance.useTor + proxyInfo: !AppConfig.hasFeature(AppFeature.tor) + ? null + : Prefs.instance.useTor ? TorService.sharedInstance.getProxyInfo() : null, ); diff --git a/lib/wallets/crypto_currency/coins/epiccash.dart b/lib/wallets/crypto_currency/coins/epiccash.dart index b715f9623..e60f90f6d 100644 --- a/lib/wallets/crypto_currency/coins/epiccash.dart +++ b/lib/wallets/crypto_currency/coins/epiccash.dart @@ -1,9 +1,8 @@ -import 'package:flutter_libepiccash/lib.dart' as epic; - import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/node_model.dart'; import '../../../utilities/default_nodes.dart'; import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../wl_gen/interfaces/libepiccash_interface.dart'; import '../crypto_currency.dart'; import '../intermediate/bip39_currency.dart'; @@ -63,7 +62,7 @@ class Epiccash extends Bip39Currency { } } - return epic.LibEpiccash.validateSendAddress(address: address); + return libEpic.validateSendAddress(address: address); } @override @@ -115,10 +114,9 @@ class Epiccash extends Bip39Currency { int get targetBlockTimeSeconds => 60; @override - DerivePathType get defaultDerivePathType => - throw UnsupportedError( - "$runtimeType does not use bitcoin style derivation paths", - ); + DerivePathType get defaultDerivePathType => throw UnsupportedError( + "$runtimeType does not use bitcoin style derivation paths", + ); @override Uri defaultBlockExplorer(String txid) { diff --git a/lib/wallets/crypto_currency/coins/fact0rn.dart b/lib/wallets/crypto_currency/coins/fact0rn.dart index a168c9dec..20c17fe16 100644 --- a/lib/wallets/crypto_currency/coins/fact0rn.dart +++ b/lib/wallets/crypto_currency/coins/fact0rn.dart @@ -175,7 +175,7 @@ class Fact0rn extends Bip39HDCurrency with ElectrumXCurrencyInterface { switch (network) { case CryptoCurrencyNetwork.main: return NodeModel( - host: "electrumx.fact0rn.io", + host: "electrumx1.projectfactor.io", port: 50002, name: DefaultNodes.defaultName, id: DefaultNodes.buildId(this), diff --git a/lib/wallets/crypto_currency/coins/mimblewimblecoin.dart b/lib/wallets/crypto_currency/coins/mimblewimblecoin.dart new file mode 100644 index 000000000..c9d57878a --- /dev/null +++ b/lib/wallets/crypto_currency/coins/mimblewimblecoin.dart @@ -0,0 +1,154 @@ +import '../../../models/isar/models/blockchain_data/address.dart'; +import '../../../models/node_model.dart'; +import '../../../utilities/default_nodes.dart'; +import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../utilities/enums/mwc_transaction_method.dart'; +import '../../../wl_gen/interfaces/libmwc_interface.dart'; +import '../crypto_currency.dart'; +import '../intermediate/bip39_currency.dart'; + +class Mimblewimblecoin extends Bip39Currency { + Mimblewimblecoin(super.network) { + _idMain = "mimblewimblecoin"; + _uriScheme = "mimblewimblecoin"; // ? + switch (network) { + case CryptoCurrencyNetwork.main: + _id = _idMain; + _name = "MimbleWimbleCoin"; + _ticker = "MWC"; + default: + throw Exception("Unsupported network: $network"); + } + } + + late final String _id; + @override + String get identifier => _id; + + late final String _idMain; + @override + String get mainNetId => _idMain; + + late final String _name; + @override + String get prettyName => _name; + + late final String _uriScheme; + @override + String get uriScheme => _uriScheme; + + late final String _ticker; + @override + String get ticker => _ticker; + + @override + String get genesisHash { + return "not used in mimblewimblecoin"; + } + + @override + // change this to change the number of confirms a tx needs in order to show as confirmed + int get minConfirms => 3; + + @override + bool validateAddress(String address) { + // Use libmwc for address validation. + return libMwc.validateSendAddress(address: address); + } + + /// Check if data is a slatepack. + bool isSlatepack(String data) { + return data.trim().startsWith('BEGINSLATE') && + (data.trim().endsWith('ENDSLATEPACK') || + data.trim().endsWith('ENDSLATEPACK.') || + data.trim().endsWith('ENDSLATE_BIN') || + data.trim().endsWith('ENDSLATE_BIN.')); + } + + /// Check if address is MWCMQS format. + bool isMwcmqsAddress(String address) { + return address.startsWith('mwcmqs://'); + } + + /// Detect transaction type based on address/data format. + MwcTransactionMethod getTransactionMethod(String addressOrData) { + if (isSlatepack(addressOrData)) { + return MwcTransactionMethod.slatepack; + } else if (isMwcmqsAddress(addressOrData)) { + return MwcTransactionMethod.mwcmqs; + // } else if (isHttpAddress(addressOrData)) { + // return MwcTransactionMethod.http; + } else { + throw Exception("Unknown MwcTransactionMethod found!"); + // return MwcTransactionMethod.unknown; + } + } + + @override + NodeModel defaultNode({required bool isPrimary}) { + switch (network) { + case CryptoCurrencyNetwork.main: + return NodeModel( + host: "https://mwc713.mwc.mw", + port: 443, + name: DefaultNodes.defaultName, + id: DefaultNodes.buildId(this), + useSSL: true, + enabled: true, + coinName: identifier, + isFailover: true, + isDown: false, + torEnabled: true, + clearnetEnabled: true, + isPrimary: true, + ); + + default: + throw UnimplementedError(); + } + } + + @override + int get defaultSeedPhraseLength => 12; + + @override + int get fractionDigits => 9; + + @override + bool get hasBuySupport => false; + + @override + bool get hasMnemonicPassphraseSupport => false; + + @override + List get possibleMnemonicLengths => [defaultSeedPhraseLength, 24]; + + @override + AddressType get defaultAddressType => AddressType.mimbleWimble; + + @override + BigInt get satsPerCoin => BigInt.from(1000000000); + + @override + int get targetBlockTimeSeconds => 60; + + @override + DerivePathType get defaultDerivePathType => throw UnsupportedError( + "$runtimeType does not use bitcoin style derivation paths", + ); + + @override + Uri defaultBlockExplorer(String txid) { + switch (network) { + default: + throw Exception( + "Unsupported network for defaultBlockExplorer(): $network", + ); + } + } + + @override + AddressType? getAddressType(String address) { + return AddressType.mimbleWimble; + } +} diff --git a/lib/wallets/crypto_currency/coins/monero.dart b/lib/wallets/crypto_currency/coins/monero.dart index 4d1535179..3a983cf9f 100644 --- a/lib/wallets/crypto_currency/coins/monero.dart +++ b/lib/wallets/crypto_currency/coins/monero.dart @@ -1,9 +1,7 @@ -import 'package:cs_monero/src/ffi_bindings/monero_wallet_bindings.dart' - as xmr_wallet_ffi; - import '../../../models/node_model.dart'; import '../../../utilities/default_nodes.dart'; import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; import '../crypto_currency.dart'; import '../intermediate/cryptonote_currency.dart'; @@ -54,7 +52,7 @@ class Monero extends CryptonoteCurrency { } switch (network) { case CryptoCurrencyNetwork.main: - return xmr_wallet_ffi.validateAddress(address, 0); + return csMonero.validateAddress(address, 0, csCoin: CsCoin.monero); default: throw Exception("Unsupported network: $network"); } @@ -107,10 +105,9 @@ class Monero extends CryptonoteCurrency { int get targetBlockTimeSeconds => 120; @override - DerivePathType get defaultDerivePathType => - throw UnsupportedError( - "$runtimeType does not use bitcoin style derivation paths", - ); + DerivePathType get defaultDerivePathType => throw UnsupportedError( + "$runtimeType does not use bitcoin style derivation paths", + ); @override Uri defaultBlockExplorer(String txid) { diff --git a/lib/wallets/crypto_currency/coins/salvium.dart b/lib/wallets/crypto_currency/coins/salvium.dart index db794dc53..ab0f1b56e 100644 --- a/lib/wallets/crypto_currency/coins/salvium.dart +++ b/lib/wallets/crypto_currency/coins/salvium.dart @@ -1,9 +1,7 @@ -import 'package:cs_salvium/src/ffi_bindings/salvium_wallet_bindings.dart' - as sal_wallet_ffi; - import '../../../models/node_model.dart'; import '../../../utilities/default_nodes.dart'; import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../crypto_currency.dart'; import '../intermediate/cryptonote_currency.dart'; @@ -16,6 +14,10 @@ class Salvium extends CryptonoteCurrency { _id = _idMain; _name = "Salvium"; _ticker = "SAL"; + case CryptoCurrencyNetwork.test: + _id = "${_idMain}TestNet"; + _name = "tSalvium"; + _ticker = "tSAL"; default: throw Exception("Unsupported network: $network"); } @@ -54,7 +56,9 @@ class Salvium extends CryptonoteCurrency { } switch (network) { case CryptoCurrencyNetwork.main: - return sal_wallet_ffi.validateAddress(address, 0); + return csSalvium.validateAddress(address, 0); + case CryptoCurrencyNetwork.test: + return csSalvium.validateAddress(address, 1); default: throw Exception("Unsupported network: $network"); } @@ -79,6 +83,22 @@ class Salvium extends CryptonoteCurrency { clearnetEnabled: true, isPrimary: isPrimary, ); + case CryptoCurrencyNetwork.test: + return NodeModel( + host: "http://127.0.0.1", + port: 29081, + name: DefaultNodes.defaultName, + id: DefaultNodes.buildId(this), + useSSL: false, + enabled: true, + coinName: identifier, + isFailover: true, + isDown: false, + trusted: true, + torEnabled: true, + clearnetEnabled: true, + isPrimary: isPrimary, + ); default: throw UnimplementedError(); @@ -107,10 +127,9 @@ class Salvium extends CryptonoteCurrency { int get targetBlockTimeSeconds => 120; @override - DerivePathType get defaultDerivePathType => - throw UnsupportedError( - "$runtimeType does not use bitcoin style derivation paths", - ); + DerivePathType get defaultDerivePathType => throw UnsupportedError( + "$runtimeType does not use bitcoin style derivation paths", + ); @override Uri defaultBlockExplorer(String txid) { diff --git a/lib/wallets/crypto_currency/coins/wownero.dart b/lib/wallets/crypto_currency/coins/wownero.dart index 0c702af40..66d27c3e0 100644 --- a/lib/wallets/crypto_currency/coins/wownero.dart +++ b/lib/wallets/crypto_currency/coins/wownero.dart @@ -1,9 +1,7 @@ -import 'package:cs_monero/src/ffi_bindings/wownero_wallet_bindings.dart' - as wow_wallet_ffi; - import '../../../models/node_model.dart'; import '../../../utilities/default_nodes.dart'; import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; import '../crypto_currency.dart'; import '../intermediate/cryptonote_currency.dart'; @@ -54,7 +52,7 @@ class Wownero extends CryptonoteCurrency { } switch (network) { case CryptoCurrencyNetwork.main: - return wow_wallet_ffi.validateAddress(address, 0); + return csMonero.validateAddress(address, 0, csCoin: CsCoin.wownero); default: throw Exception("Unsupported network: $network"); } @@ -107,10 +105,9 @@ class Wownero extends CryptonoteCurrency { int get targetBlockTimeSeconds => 120; @override - DerivePathType get defaultDerivePathType => - throw UnsupportedError( - "$runtimeType does not use bitcoin style derivation paths", - ); + DerivePathType get defaultDerivePathType => throw UnsupportedError( + "$runtimeType does not use bitcoin style derivation paths", + ); @override Uri defaultBlockExplorer(String txid) { diff --git a/lib/wallets/crypto_currency/coins/xelis.dart b/lib/wallets/crypto_currency/coins/xelis.dart index 62b33326b..e036c2442 100644 --- a/lib/wallets/crypto_currency/coins/xelis.dart +++ b/lib/wallets/crypto_currency/coins/xelis.dart @@ -1,9 +1,8 @@ -import 'package:xelis_flutter/src/api/utils.dart' as x_utils; - import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/node_model.dart'; import '../../../utilities/default_nodes.dart'; import '../../../utilities/enums/derive_path_type_enum.dart'; +import '../../../wl_gen/interfaces/lib_xelis_interface.dart'; import '../crypto_currency.dart'; import '../intermediate/electrum_currency.dart'; @@ -94,7 +93,7 @@ class Xelis extends ElectrumCurrency { @override bool validateAddress(String address) { try { - return x_utils.isAddressValid(strAddress: address); + return libXelis.isAddressValid(address: address); } catch (_) { return false; } diff --git a/lib/wallets/crypto_currency/crypto_currency.dart b/lib/wallets/crypto_currency/crypto_currency.dart index 0c2f2cb83..8d02b130c 100644 --- a/lib/wallets/crypto_currency/crypto_currency.dart +++ b/lib/wallets/crypto_currency/crypto_currency.dart @@ -11,6 +11,7 @@ export 'coins/dash.dart'; export 'coins/dogecoin.dart'; export 'coins/ecash.dart'; export 'coins/epiccash.dart'; +export 'coins/mimblewimblecoin.dart'; export 'coins/ethereum.dart'; export 'coins/fact0rn.dart'; export 'coins/firo.dart'; @@ -65,7 +66,7 @@ abstract class CryptoCurrency { int get minConfirms; int get minCoinbaseConfirms => minConfirms; - // TODO: [prio=low] could be handled differently as (at least) epiccash does not use this + // TODO: [prio=low] could be handled differently as (at least) epiccash/mimblewimblecoin does not use this String get genesisHash; bool validateAddress(String address); diff --git a/lib/wallets/isar/isar_id_interface.dart b/lib/wallets/isar/isar_id_interface.dart index c98455284..437139747 100644 --- a/lib/wallets/isar/isar_id_interface.dart +++ b/lib/wallets/isar/isar_id_interface.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; abstract interface class IsarId { Id get id; diff --git a/lib/wallets/isar/models/frost_wallet_info.dart b/lib/wallets/isar/models/frost_wallet_info.dart index fd3d1a11a..92d35fed1 100644 --- a/lib/wallets/isar/models/frost_wallet_info.dart +++ b/lib/wallets/isar/models/frost_wallet_info.dart @@ -1,4 +1,5 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../isar_id_interface.dart'; part 'frost_wallet_info.g.dart'; diff --git a/lib/wallets/isar/models/frost_wallet_info.g.dart b/lib/wallets/isar/models/frost_wallet_info.g.dart index a2c7534d0..459bff7e1 100644 --- a/lib/wallets/isar/models/frost_wallet_info.g.dart +++ b/lib/wallets/isar/models/frost_wallet_info.g.dart @@ -22,11 +22,7 @@ const FrostWalletInfoSchema = CollectionSchema( name: r'knownSalts', type: IsarType.stringList, ), - r'myName': PropertySchema( - id: 1, - name: r'myName', - type: IsarType.string, - ), + r'myName': PropertySchema(id: 1, name: r'myName', type: IsarType.string), r'participants': PropertySchema( id: 2, name: r'participants', @@ -41,8 +37,9 @@ const FrostWalletInfoSchema = CollectionSchema( id: 4, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _frostWalletInfoEstimateSize, serialize: _frostWalletInfoSerialize, deserialize: _frostWalletInfoDeserialize, @@ -59,16 +56,17 @@ const FrostWalletInfoSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _frostWalletInfoGetId, getLinks: _frostWalletInfoGetLinks, attach: _frostWalletInfoAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _frostWalletInfoEstimateSize( @@ -157,7 +155,10 @@ List> _frostWalletInfoGetLinks(FrostWalletInfo object) { } void _frostWalletInfoAttach( - IsarCollection col, Id id, FrostWalletInfo object) { + IsarCollection col, + Id id, + FrostWalletInfo object, +) { object.id = id; } @@ -210,8 +211,10 @@ extension FrostWalletInfoByIndex on IsarCollection { return putAllByIndex(r'walletId', objects); } - List putAllByWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'walletId', objects, saveLinks: saveLinks); } } @@ -228,17 +231,15 @@ extension FrostWalletInfoQueryWhereSort extension FrostWalletInfoQueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder - idNotEqualTo(Id id) { + idNotEqualTo(Id id) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -261,7 +262,7 @@ extension FrostWalletInfoQueryWhere } QueryBuilder - idGreaterThan(Id id, {bool include = false}) { + idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -270,8 +271,9 @@ extension FrostWalletInfoQueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -286,56 +288,65 @@ extension FrostWalletInfoQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo(String walletId) { + walletIdEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } @@ -344,109 +355,111 @@ extension FrostWalletInfoQueryWhere extension FrostWalletInfoQueryFilter on QueryBuilder { QueryBuilder - idEqualTo(Id value) { + idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + idGreaterThan(Id value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idLessThan( - Id value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + idLessThan(Id value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idBetween( + idBetween( Id lower, Id upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - knownSaltsElementEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + knownSaltsElementEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementGreaterThan( + knownSaltsElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementLessThan( + knownSaltsElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementBetween( + knownSaltsElementBetween( String lower, String upper, { bool includeLower = true, @@ -454,160 +467,126 @@ extension FrostWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'knownSalts', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'knownSalts', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + knownSaltsElementStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + knownSaltsElementEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'knownSalts', - value: value, - caseSensitive: caseSensitive, - )); + knownSaltsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'knownSalts', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'knownSalts', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + knownSaltsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'knownSalts', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - knownSaltsElementIsEmpty() { + knownSaltsElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'knownSalts', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'knownSalts', value: ''), + ); }); } QueryBuilder - knownSaltsElementIsNotEmpty() { + knownSaltsElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'knownSalts', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'knownSalts', value: ''), + ); }); } QueryBuilder - knownSaltsLengthEqualTo(int length) { + knownSaltsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'knownSalts', - length, - true, - length, - true, - ); + return query.listLength(r'knownSalts', length, true, length, true); }); } QueryBuilder - knownSaltsIsEmpty() { + knownSaltsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'knownSalts', - 0, - true, - 0, - true, - ); + return query.listLength(r'knownSalts', 0, true, 0, true); }); } QueryBuilder - knownSaltsIsNotEmpty() { + knownSaltsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'knownSalts', - 0, - false, - 999999, - true, - ); + return query.listLength(r'knownSalts', 0, false, 999999, true); }); } QueryBuilder - knownSaltsLengthLessThan( - int length, { - bool include = false, - }) { + knownSaltsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'knownSalts', - 0, - true, - length, - include, - ); + return query.listLength(r'knownSalts', 0, true, length, include); }); } QueryBuilder - knownSaltsLengthGreaterThan( - int length, { - bool include = false, - }) { + knownSaltsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'knownSalts', - length, - include, - 999999, - true, - ); + return query.listLength(r'knownSalts', length, include, 999999, true); }); } QueryBuilder - knownSaltsLengthBetween( + knownSaltsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -625,53 +604,56 @@ extension FrostWalletInfoQueryFilter } QueryBuilder - myNameEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + myNameEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameGreaterThan( + myNameGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameLessThan( + myNameLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameBetween( + myNameBetween( String lower, String upper, { bool includeLower = true, @@ -679,135 +661,140 @@ extension FrostWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'myName', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'myName', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + myNameStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + myNameEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'myName', - value: value, - caseSensitive: caseSensitive, - )); + myNameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'myName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'myName', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + myNameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'myName', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - myNameIsEmpty() { + myNameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'myName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'myName', value: ''), + ); }); } QueryBuilder - myNameIsNotEmpty() { + myNameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'myName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'myName', value: ''), + ); }); } QueryBuilder - participantsElementEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + participantsElementEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementGreaterThan( + participantsElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementLessThan( + participantsElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementBetween( + participantsElementBetween( String lower, String upper, { bool includeLower = true, @@ -815,160 +802,126 @@ extension FrostWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'participants', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'participants', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + participantsElementStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + participantsElementEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'participants', - value: value, - caseSensitive: caseSensitive, - )); + participantsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'participants', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'participants', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + participantsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'participants', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - participantsElementIsEmpty() { + participantsElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'participants', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'participants', value: ''), + ); }); } QueryBuilder - participantsElementIsNotEmpty() { + participantsElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'participants', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'participants', value: ''), + ); }); } QueryBuilder - participantsLengthEqualTo(int length) { + participantsLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'participants', - length, - true, - length, - true, - ); + return query.listLength(r'participants', length, true, length, true); }); } QueryBuilder - participantsIsEmpty() { + participantsIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'participants', - 0, - true, - 0, - true, - ); + return query.listLength(r'participants', 0, true, 0, true); }); } QueryBuilder - participantsIsNotEmpty() { + participantsIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'participants', - 0, - false, - 999999, - true, - ); + return query.listLength(r'participants', 0, false, 999999, true); }); } QueryBuilder - participantsLengthLessThan( - int length, { - bool include = false, - }) { + participantsLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'participants', - 0, - true, - length, - include, - ); + return query.listLength(r'participants', 0, true, length, include); }); } QueryBuilder - participantsLengthGreaterThan( - int length, { - bool include = false, - }) { + participantsLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'participants', - length, - include, - 999999, - true, - ); + return query.listLength(r'participants', length, include, 999999, true); }); } QueryBuilder - participantsLengthBetween( + participantsLengthBetween( int lower, int upper, { bool includeLower = true, @@ -986,109 +939,111 @@ extension FrostWalletInfoQueryFilter } QueryBuilder - thresholdEqualTo(int value) { + thresholdEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'threshold', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'threshold', value: value), + ); }); } QueryBuilder - thresholdGreaterThan( - int value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'threshold', - value: value, - )); + thresholdGreaterThan(int value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'threshold', + value: value, + ), + ); }); } QueryBuilder - thresholdLessThan( - int value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'threshold', - value: value, - )); + thresholdLessThan(int value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'threshold', + value: value, + ), + ); }); } QueryBuilder - thresholdBetween( + thresholdBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'threshold', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'threshold', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -1096,84 +1051,86 @@ extension FrostWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + walletIdMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -1193,35 +1150,35 @@ extension FrostWalletInfoQuerySortBy } QueryBuilder - sortByMyNameDesc() { + sortByMyNameDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myName', Sort.desc); }); } QueryBuilder - sortByThreshold() { + sortByThreshold() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'threshold', Sort.asc); }); } QueryBuilder - sortByThresholdDesc() { + sortByThresholdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'threshold', Sort.desc); }); } QueryBuilder - sortByWalletId() { + sortByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1249,35 +1206,35 @@ extension FrostWalletInfoQuerySortThenBy } QueryBuilder - thenByMyNameDesc() { + thenByMyNameDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'myName', Sort.desc); }); } QueryBuilder - thenByThreshold() { + thenByThreshold() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'threshold', Sort.asc); }); } QueryBuilder - thenByThresholdDesc() { + thenByThresholdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'threshold', Sort.desc); }); } QueryBuilder - thenByWalletId() { + thenByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1287,35 +1244,37 @@ extension FrostWalletInfoQuerySortThenBy extension FrostWalletInfoQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByKnownSalts() { + distinctByKnownSalts() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'knownSalts'); }); } - QueryBuilder distinctByMyName( - {bool caseSensitive = true}) { + QueryBuilder distinctByMyName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'myName', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByParticipants() { + distinctByParticipants() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'participants'); }); } QueryBuilder - distinctByThreshold() { + distinctByThreshold() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'threshold'); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -1331,7 +1290,7 @@ extension FrostWalletInfoQueryProperty } QueryBuilder, QQueryOperations> - knownSaltsProperty() { + knownSaltsProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'knownSalts'); }); @@ -1344,7 +1303,7 @@ extension FrostWalletInfoQueryProperty } QueryBuilder, QQueryOperations> - participantsProperty() { + participantsProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'participants'); }); diff --git a/lib/wallets/isar/models/spark_coin.dart b/lib/wallets/isar/models/spark_coin.dart index c16cee253..b770361c7 100644 --- a/lib/wallets/isar/models/spark_coin.dart +++ b/lib/wallets/isar/models/spark_coin.dart @@ -1,6 +1,6 @@ import 'dart:math'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; part 'spark_coin.g.dart'; diff --git a/lib/wallets/isar/models/spark_coin.g.dart b/lib/wallets/isar/models/spark_coin.g.dart index c84e0db40..adbb522c6 100644 --- a/lib/wallets/isar/models/spark_coin.g.dart +++ b/lib/wallets/isar/models/spark_coin.g.dart @@ -17,11 +17,7 @@ const SparkCoinSchema = CollectionSchema( name: r'SparkCoin', id: -187103855721793545, properties: { - r'address': PropertySchema( - id: 0, - name: r'address', - type: IsarType.string, - ), + r'address': PropertySchema(id: 0, name: r'address', type: IsarType.string), r'contextB64': PropertySchema( id: 1, name: r'contextB64', @@ -37,41 +33,17 @@ const SparkCoinSchema = CollectionSchema( name: r'encryptedDiversifier', type: IsarType.longList, ), - r'groupId': PropertySchema( - id: 4, - name: r'groupId', - type: IsarType.long, - ), - r'height': PropertySchema( - id: 5, - name: r'height', - type: IsarType.long, - ), - r'isUsed': PropertySchema( - id: 6, - name: r'isUsed', - type: IsarType.bool, - ), + r'groupId': PropertySchema(id: 4, name: r'groupId', type: IsarType.long), + r'height': PropertySchema(id: 5, name: r'height', type: IsarType.long), + r'isUsed': PropertySchema(id: 6, name: r'isUsed', type: IsarType.bool), r'lTagHash': PropertySchema( id: 7, name: r'lTagHash', type: IsarType.string, ), - r'memo': PropertySchema( - id: 8, - name: r'memo', - type: IsarType.string, - ), - r'nonce': PropertySchema( - id: 9, - name: r'nonce', - type: IsarType.longList, - ), - r'serial': PropertySchema( - id: 10, - name: r'serial', - type: IsarType.longList, - ), + r'memo': PropertySchema(id: 8, name: r'memo', type: IsarType.string), + r'nonce': PropertySchema(id: 9, name: r'nonce', type: IsarType.longList), + r'serial': PropertySchema(id: 10, name: r'serial', type: IsarType.longList), r'serialContext': PropertySchema( id: 11, name: r'serialContext', @@ -82,16 +54,8 @@ const SparkCoinSchema = CollectionSchema( name: r'serializedCoinB64', type: IsarType.string, ), - r'tag': PropertySchema( - id: 13, - name: r'tag', - type: IsarType.longList, - ), - r'txHash': PropertySchema( - id: 14, - name: r'txHash', - type: IsarType.string, - ), + r'tag': PropertySchema(id: 13, name: r'tag', type: IsarType.longList), + r'txHash': PropertySchema(id: 14, name: r'txHash', type: IsarType.string), r'type': PropertySchema( id: 15, name: r'type', @@ -112,8 +76,9 @@ const SparkCoinSchema = CollectionSchema( id: 18, name: r'zzzIsLocked', type: IsarType.bool, - ) + ), }, + estimateSize: _sparkCoinEstimateSize, serialize: _sparkCoinSerialize, deserialize: _sparkCoinDeserialize, @@ -135,16 +100,17 @@ const SparkCoinSchema = CollectionSchema( name: r'lTagHash', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _sparkCoinGetId, getLinks: _sparkCoinGetLinks, attach: _sparkCoinAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _sparkCoinEstimateSize( @@ -259,7 +225,8 @@ SparkCoin _sparkCoinDeserialize( serializedCoinB64: reader.readStringOrNull(offsets[12]), tag: reader.readLongList(offsets[13]), txHash: reader.readString(offsets[14]), - type: _SparkCointypeValueEnumMap[reader.readByteOrNull(offsets[15])] ?? + type: + _SparkCointypeValueEnumMap[reader.readByteOrNull(offsets[15])] ?? SparkCoinType.mint, valueIntString: reader.readString(offsets[16]), walletId: reader.readString(offsets[17]), @@ -308,7 +275,8 @@ P _sparkCoinDeserializeProp

( return (reader.readString(offset)) as P; case 15: return (_SparkCointypeValueEnumMap[reader.readByteOrNull(offset)] ?? - SparkCoinType.mint) as P; + SparkCoinType.mint) + as P; case 16: return (reader.readString(offset)) as P; case 17: @@ -320,10 +288,7 @@ P _sparkCoinDeserializeProp

( } } -const _SparkCointypeEnumValueMap = { - 'mint': 0, - 'spend': 1, -}; +const _SparkCointypeEnumValueMap = {'mint': 0, 'spend': 1}; const _SparkCointypeValueEnumMap = { 0: SparkCoinType.mint, 1: SparkCoinType.spend, @@ -359,10 +324,14 @@ extension SparkCoinByIndex on IsarCollection { } Future> getAllByWalletIdLTagHash( - List walletIdValues, List lTagHashValues) { + List walletIdValues, + List lTagHashValues, + ) { final len = walletIdValues.length; - assert(lTagHashValues.length == len, - 'All index values must have the same length'); + assert( + lTagHashValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], lTagHashValues[i]]); @@ -372,10 +341,14 @@ extension SparkCoinByIndex on IsarCollection { } List getAllByWalletIdLTagHashSync( - List walletIdValues, List lTagHashValues) { + List walletIdValues, + List lTagHashValues, + ) { final len = walletIdValues.length; - assert(lTagHashValues.length == len, - 'All index values must have the same length'); + assert( + lTagHashValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], lTagHashValues[i]]); @@ -385,10 +358,14 @@ extension SparkCoinByIndex on IsarCollection { } Future deleteAllByWalletIdLTagHash( - List walletIdValues, List lTagHashValues) { + List walletIdValues, + List lTagHashValues, + ) { final len = walletIdValues.length; - assert(lTagHashValues.length == len, - 'All index values must have the same length'); + assert( + lTagHashValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], lTagHashValues[i]]); @@ -398,10 +375,14 @@ extension SparkCoinByIndex on IsarCollection { } int deleteAllByWalletIdLTagHashSync( - List walletIdValues, List lTagHashValues) { + List walletIdValues, + List lTagHashValues, + ) { final len = walletIdValues.length; - assert(lTagHashValues.length == len, - 'All index values must have the same length'); + assert( + lTagHashValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], lTagHashValues[i]]); @@ -422,10 +403,15 @@ extension SparkCoinByIndex on IsarCollection { return putAllByIndex(r'walletId_lTagHash', objects); } - List putAllByWalletIdLTagHashSync(List objects, - {bool saveLinks = true}) { - return putAllByIndexSync(r'walletId_lTagHash', objects, - saveLinks: saveLinks); + List putAllByWalletIdLTagHashSync( + List objects, { + bool saveLinks = true, + }) { + return putAllByIndexSync( + r'walletId_lTagHash', + objects, + saveLinks: saveLinks, + ); } } @@ -442,10 +428,7 @@ extension SparkCoinQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -471,8 +454,10 @@ extension SparkCoinQueryWhere }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -480,8 +465,10 @@ extension SparkCoinQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -496,101 +483,125 @@ extension SparkCoinQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualToAnyLTagHash(String walletId) { + walletIdEqualToAnyLTagHash(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId_lTagHash', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'walletId_lTagHash', + value: [walletId], + ), + ); }); } QueryBuilder - walletIdNotEqualToAnyLTagHash(String walletId) { + walletIdNotEqualToAnyLTagHash(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder walletIdLTagHashEqualTo( - String walletId, String lTagHash) { + String walletId, + String lTagHash, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId_lTagHash', - value: [walletId, lTagHash], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'walletId_lTagHash', + value: [walletId, lTagHash], + ), + ); }); } QueryBuilder - walletIdEqualToLTagHashNotEqualTo(String walletId, String lTagHash) { + walletIdEqualToLTagHashNotEqualTo(String walletId, String lTagHash) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId], - upper: [walletId, lTagHash], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId, lTagHash], - includeLower: false, - upper: [walletId], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId], + upper: [walletId, lTagHash], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId, lTagHash], + includeLower: false, + upper: [walletId], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId, lTagHash], - includeLower: false, - upper: [walletId], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_lTagHash', - lower: [walletId], - upper: [walletId, lTagHash], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId, lTagHash], + includeLower: false, + upper: [walletId], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_lTagHash', + lower: [walletId], + upper: [walletId, lTagHash], + includeUpper: false, + ), + ); } }); } @@ -603,11 +614,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -617,12 +630,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -632,12 +647,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -649,14 +666,16 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'address', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'address', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -665,11 +684,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -678,71 +699,77 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'address', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'address', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'address', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'address', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder addressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'address', value: ''), + ); }); } QueryBuilder - addressIsNotEmpty() { + addressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'address', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'address', value: ''), + ); }); } QueryBuilder contextB64IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'contextB64', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'contextB64'), + ); }); } QueryBuilder - contextB64IsNotNull() { + contextB64IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'contextB64', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'contextB64'), + ); }); } @@ -751,27 +778,31 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contextB64GreaterThan( + contextB64GreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -781,12 +812,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -798,28 +831,29 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'contextB64', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'contextB64', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contextB64StartsWith( - String value, { - bool caseSensitive = true, - }) { + contextB64StartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -828,106 +862,115 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder contextB64Contains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'contextB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'contextB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder contextB64Matches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'contextB64', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'contextB64', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - contextB64IsEmpty() { + contextB64IsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'contextB64', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'contextB64', value: ''), + ); }); } QueryBuilder - contextB64IsNotEmpty() { + contextB64IsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'contextB64', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'contextB64', value: ''), + ); }); } QueryBuilder - diversifierIntStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + diversifierIntStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringGreaterThan( + diversifierIntStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringLessThan( + diversifierIntStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringBetween( + diversifierIntStringBetween( String lower, String upper, { bool includeLower = true, @@ -935,163 +978,170 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'diversifierIntString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'diversifierIntString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + diversifierIntStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + diversifierIntStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringContains(String value, {bool caseSensitive = true}) { + diversifierIntStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'diversifierIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'diversifierIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringMatches(String pattern, {bool caseSensitive = true}) { + diversifierIntStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'diversifierIntString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'diversifierIntString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - diversifierIntStringIsEmpty() { + diversifierIntStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'diversifierIntString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'diversifierIntString', value: ''), + ); }); } QueryBuilder - diversifierIntStringIsNotEmpty() { + diversifierIntStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'diversifierIntString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'diversifierIntString', + value: '', + ), + ); }); } QueryBuilder - encryptedDiversifierIsNull() { + encryptedDiversifierIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'encryptedDiversifier', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'encryptedDiversifier'), + ); }); } QueryBuilder - encryptedDiversifierIsNotNull() { + encryptedDiversifierIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'encryptedDiversifier', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'encryptedDiversifier'), + ); }); } QueryBuilder - encryptedDiversifierElementEqualTo(int value) { + encryptedDiversifierElementEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'encryptedDiversifier', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'encryptedDiversifier', + value: value, + ), + ); }); } QueryBuilder - encryptedDiversifierElementGreaterThan( - int value, { - bool include = false, - }) { + encryptedDiversifierElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'encryptedDiversifier', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'encryptedDiversifier', + value: value, + ), + ); }); } QueryBuilder - encryptedDiversifierElementLessThan( - int value, { - bool include = false, - }) { + encryptedDiversifierElementLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'encryptedDiversifier', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'encryptedDiversifier', + value: value, + ), + ); }); } QueryBuilder - encryptedDiversifierElementBetween( + encryptedDiversifierElementBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'encryptedDiversifier', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'encryptedDiversifier', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - encryptedDiversifierLengthEqualTo(int length) { + encryptedDiversifierLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { return query.listLength( r'encryptedDiversifier', @@ -1104,36 +1154,21 @@ extension SparkCoinQueryFilter } QueryBuilder - encryptedDiversifierIsEmpty() { + encryptedDiversifierIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'encryptedDiversifier', - 0, - true, - 0, - true, - ); + return query.listLength(r'encryptedDiversifier', 0, true, 0, true); }); } QueryBuilder - encryptedDiversifierIsNotEmpty() { + encryptedDiversifierIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'encryptedDiversifier', - 0, - false, - 999999, - true, - ); + return query.listLength(r'encryptedDiversifier', 0, false, 999999, true); }); } QueryBuilder - encryptedDiversifierLengthLessThan( - int length, { - bool include = false, - }) { + encryptedDiversifierLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.listLength( r'encryptedDiversifier', @@ -1146,10 +1181,7 @@ extension SparkCoinQueryFilter } QueryBuilder - encryptedDiversifierLengthGreaterThan( - int length, { - bool include = false, - }) { + encryptedDiversifierLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.listLength( r'encryptedDiversifier', @@ -1162,7 +1194,7 @@ extension SparkCoinQueryFilter } QueryBuilder - encryptedDiversifierLengthBetween( + encryptedDiversifierLengthBetween( int lower, int upper, { bool includeLower = true, @@ -1180,12 +1212,12 @@ extension SparkCoinQueryFilter } QueryBuilder groupIdEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'groupId', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'groupId', value: value), + ); }); } @@ -1194,11 +1226,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'groupId', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'groupId', + value: value, + ), + ); }); } @@ -1207,11 +1241,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'groupId', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'groupId', + value: value, + ), + ); }); } @@ -1222,39 +1258,41 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'groupId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'groupId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder heightIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'height'), + ); }); } QueryBuilder heightIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'height', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'height'), + ); }); } QueryBuilder heightEqualTo( - int? value) { + int? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'height', value: value), + ); }); } @@ -1263,11 +1301,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'height', + value: value, + ), + ); }); } @@ -1276,11 +1316,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'height', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'height', + value: value, + ), + ); }); } @@ -1291,23 +1333,25 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'height', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'height', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -1316,11 +1360,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1329,11 +1375,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1344,23 +1392,25 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder isUsedEqualTo( - bool value) { + bool value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isUsed', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isUsed', value: value), + ); }); } @@ -1369,11 +1419,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1383,12 +1435,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1398,12 +1452,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1415,14 +1471,16 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'lTagHash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'lTagHash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1431,11 +1489,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1444,70 +1504,76 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder lTagHashContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'lTagHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'lTagHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder lTagHashMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'lTagHash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'lTagHash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder lTagHashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'lTagHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'lTagHash', value: ''), + ); }); } QueryBuilder - lTagHashIsNotEmpty() { + lTagHashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'lTagHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'lTagHash', value: ''), + ); }); } QueryBuilder memoIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'memo', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'memo'), + ); }); } QueryBuilder memoIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'memo', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'memo'), + ); }); } @@ -1516,11 +1582,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1530,12 +1598,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1545,12 +1615,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1562,14 +1634,16 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'memo', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'memo', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1578,11 +1652,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1591,107 +1667,111 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder memoContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'memo', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'memo', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder memoMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'memo', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'memo', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder memoIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'memo', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'memo', value: ''), + ); }); } QueryBuilder memoIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'memo', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'memo', value: ''), + ); }); } QueryBuilder nonceIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'nonce'), + ); }); } QueryBuilder nonceIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'nonce', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'nonce'), + ); }); } QueryBuilder nonceElementEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'nonce', value: value), + ); }); } QueryBuilder - nonceElementGreaterThan( - int value, { - bool include = false, - }) { + nonceElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } QueryBuilder - nonceElementLessThan( - int value, { - bool include = false, - }) { + nonceElementLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'nonce', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'nonce', + value: value, + ), + ); }); } @@ -1702,50 +1782,35 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'nonce', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'nonce', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder nonceLengthEqualTo( - int length) { + int length, + ) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'nonce', - length, - true, - length, - true, - ); + return query.listLength(r'nonce', length, true, length, true); }); } QueryBuilder nonceIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'nonce', - 0, - true, - 0, - true, - ); + return query.listLength(r'nonce', 0, true, 0, true); }); } QueryBuilder nonceIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'nonce', - 0, - false, - 999999, - true, - ); + return query.listLength(r'nonce', 0, false, 999999, true); }); } @@ -1754,29 +1819,14 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'nonce', - 0, - true, - length, - include, - ); + return query.listLength(r'nonce', 0, true, length, include); }); } QueryBuilder - nonceLengthGreaterThan( - int length, { - bool include = false, - }) { + nonceLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'nonce', - length, - include, - 999999, - true, - ); + return query.listLength(r'nonce', length, include, 999999, true); }); } @@ -1799,142 +1849,106 @@ extension SparkCoinQueryFilter QueryBuilder serialIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'serial', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'serial'), + ); }); } QueryBuilder serialIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'serial', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'serial'), + ); }); } QueryBuilder - serialElementEqualTo(int value) { + serialElementEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'serial', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'serial', value: value), + ); }); } QueryBuilder - serialElementGreaterThan( - int value, { - bool include = false, - }) { + serialElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'serial', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'serial', + value: value, + ), + ); }); } QueryBuilder - serialElementLessThan( - int value, { - bool include = false, - }) { + serialElementLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'serial', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'serial', + value: value, + ), + ); }); } QueryBuilder - serialElementBetween( + serialElementBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'serial', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'serial', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder serialLengthEqualTo( - int length) { + int length, + ) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serial', - length, - true, - length, - true, - ); + return query.listLength(r'serial', length, true, length, true); }); } QueryBuilder serialIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serial', - 0, - true, - 0, - true, - ); + return query.listLength(r'serial', 0, true, 0, true); }); } QueryBuilder serialIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serial', - 0, - false, - 999999, - true, - ); + return query.listLength(r'serial', 0, false, 999999, true); }); } QueryBuilder - serialLengthLessThan( - int length, { - bool include = false, - }) { + serialLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serial', - 0, - true, - length, - include, - ); + return query.listLength(r'serial', 0, true, length, include); }); } QueryBuilder - serialLengthGreaterThan( - int length, { - bool include = false, - }) { + serialLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serial', - length, - include, - 999999, - true, - ); + return query.listLength(r'serial', length, include, 999999, true); }); } @@ -1956,152 +1970,115 @@ extension SparkCoinQueryFilter } QueryBuilder - serialContextIsNull() { + serialContextIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'serialContext', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'serialContext'), + ); }); } QueryBuilder - serialContextIsNotNull() { + serialContextIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'serialContext', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'serialContext'), + ); }); } QueryBuilder - serialContextElementEqualTo(int value) { + serialContextElementEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'serialContext', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'serialContext', value: value), + ); }); } QueryBuilder - serialContextElementGreaterThan( - int value, { - bool include = false, - }) { + serialContextElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'serialContext', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'serialContext', + value: value, + ), + ); }); } QueryBuilder - serialContextElementLessThan( - int value, { - bool include = false, - }) { + serialContextElementLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'serialContext', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'serialContext', + value: value, + ), + ); }); } QueryBuilder - serialContextElementBetween( + serialContextElementBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'serialContext', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'serialContext', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - serialContextLengthEqualTo(int length) { + serialContextLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serialContext', - length, - true, - length, - true, - ); + return query.listLength(r'serialContext', length, true, length, true); }); } QueryBuilder - serialContextIsEmpty() { + serialContextIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serialContext', - 0, - true, - 0, - true, - ); + return query.listLength(r'serialContext', 0, true, 0, true); }); } QueryBuilder - serialContextIsNotEmpty() { + serialContextIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serialContext', - 0, - false, - 999999, - true, - ); + return query.listLength(r'serialContext', 0, false, 999999, true); }); } QueryBuilder - serialContextLengthLessThan( - int length, { - bool include = false, - }) { + serialContextLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serialContext', - 0, - true, - length, - include, - ); + return query.listLength(r'serialContext', 0, true, length, include); }); } QueryBuilder - serialContextLengthGreaterThan( - int length, { - bool include = false, - }) { + serialContextLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'serialContext', - length, - include, - 999999, - true, - ); + return query.listLength(r'serialContext', length, include, 999999, true); }); } QueryBuilder - serialContextLengthBetween( + serialContextLengthBetween( int lower, int upper, { bool includeLower = true, @@ -2119,71 +2096,74 @@ extension SparkCoinQueryFilter } QueryBuilder - serializedCoinB64IsNull() { + serializedCoinB64IsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'serializedCoinB64', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'serializedCoinB64'), + ); }); } QueryBuilder - serializedCoinB64IsNotNull() { + serializedCoinB64IsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'serializedCoinB64', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'serializedCoinB64'), + ); }); } QueryBuilder - serializedCoinB64EqualTo( - String? value, { - bool caseSensitive = true, - }) { + serializedCoinB64EqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64GreaterThan( + serializedCoinB64GreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64LessThan( + serializedCoinB64LessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64Between( + serializedCoinB64Between( String? lower, String? upper, { bool includeLower = true, @@ -2191,124 +2171,125 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'serializedCoinB64', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'serializedCoinB64', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64StartsWith( - String value, { - bool caseSensitive = true, - }) { + serializedCoinB64StartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64EndsWith( - String value, { - bool caseSensitive = true, - }) { + serializedCoinB64EndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64Contains(String value, {bool caseSensitive = true}) { + serializedCoinB64Contains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'serializedCoinB64', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'serializedCoinB64', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64Matches(String pattern, {bool caseSensitive = true}) { + serializedCoinB64Matches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'serializedCoinB64', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'serializedCoinB64', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - serializedCoinB64IsEmpty() { + serializedCoinB64IsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'serializedCoinB64', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'serializedCoinB64', value: ''), + ); }); } QueryBuilder - serializedCoinB64IsNotEmpty() { + serializedCoinB64IsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'serializedCoinB64', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'serializedCoinB64', value: ''), + ); }); } QueryBuilder tagIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'tag', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'tag'), + ); }); } QueryBuilder tagIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'tag', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'tag'), + ); }); } QueryBuilder tagElementEqualTo( - int value) { + int value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tag', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tag', value: value), + ); }); } QueryBuilder - tagElementGreaterThan( - int value, { - bool include = false, - }) { + tagElementGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tag', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tag', + value: value, + ), + ); }); } @@ -2317,11 +2298,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tag', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tag', + value: value, + ), + ); }); } @@ -2332,50 +2315,35 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tag', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tag', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder tagLengthEqualTo( - int length) { + int length, + ) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - length, - true, - length, - true, - ); + return query.listLength(r'tag', length, true, length, true); }); } QueryBuilder tagIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - 0, - true, - 0, - true, - ); + return query.listLength(r'tag', 0, true, 0, true); }); } QueryBuilder tagIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - 0, - false, - 999999, - true, - ); + return query.listLength(r'tag', 0, false, 999999, true); }); } @@ -2384,29 +2352,14 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - 0, - true, - length, - include, - ); + return query.listLength(r'tag', 0, true, length, include); }); } QueryBuilder - tagLengthGreaterThan( - int length, { - bool include = false, - }) { + tagLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - length, - include, - 999999, - true, - ); + return query.listLength(r'tag', length, include, 999999, true); }); } @@ -2417,13 +2370,7 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tag', - lower, - includeLower, - upper, - includeUpper, - ); + return query.listLength(r'tag', lower, includeLower, upper, includeUpper); }); } @@ -2432,11 +2379,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2446,12 +2395,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2461,12 +2412,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2478,14 +2431,16 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'txHash', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'txHash', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2494,11 +2449,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2507,63 +2464,69 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txHashContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'txHash', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'txHash', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txHashMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'txHash', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'txHash', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder txHashIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'txHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'txHash', value: ''), + ); }); } QueryBuilder txHashIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'txHash', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'txHash', value: ''), + ); }); } QueryBuilder typeEqualTo( - SparkCoinType value) { + SparkCoinType value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'type', value: value), + ); }); } @@ -2572,11 +2535,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -2585,11 +2550,13 @@ extension SparkCoinQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'type', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + ), + ); }); } @@ -2600,64 +2567,69 @@ extension SparkCoinQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'type', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - valueIntStringEqualTo( - String value, { - bool caseSensitive = true, - }) { + valueIntStringEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringGreaterThan( + valueIntStringGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringLessThan( + valueIntStringLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringBetween( + valueIntStringBetween( String lower, String upper, { bool includeLower = true, @@ -2665,84 +2637,86 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'valueIntString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'valueIntString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + valueIntStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + valueIntStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringContains(String value, {bool caseSensitive = true}) { + valueIntStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'valueIntString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'valueIntString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringMatches(String pattern, {bool caseSensitive = true}) { + valueIntStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'valueIntString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'valueIntString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - valueIntStringIsEmpty() { + valueIntStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'valueIntString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'valueIntString', value: ''), + ); }); } QueryBuilder - valueIntStringIsNotEmpty() { + valueIntStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'valueIntString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'valueIntString', value: ''), + ); }); } @@ -2751,11 +2725,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2765,12 +2741,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2780,12 +2758,14 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2797,14 +2777,16 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2813,11 +2795,13 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2826,81 +2810,87 @@ extension SparkCoinQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } QueryBuilder isLockedIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'zzzIsLocked', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'zzzIsLocked'), + ); }); } QueryBuilder - isLockedIsNotNull() { + isLockedIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'zzzIsLocked', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'zzzIsLocked'), + ); }); } QueryBuilder isLockedEqualTo( - bool? value) { + bool? value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'zzzIsLocked', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'zzzIsLocked', value: value), + ); }); } } @@ -2937,14 +2927,14 @@ extension SparkCoinQuerySortBy on QueryBuilder { } QueryBuilder - sortByDiversifierIntString() { + sortByDiversifierIntString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'diversifierIntString', Sort.asc); }); } QueryBuilder - sortByDiversifierIntStringDesc() { + sortByDiversifierIntStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'diversifierIntString', Sort.desc); }); @@ -3017,7 +3007,7 @@ extension SparkCoinQuerySortBy on QueryBuilder { } QueryBuilder - sortBySerializedCoinB64Desc() { + sortBySerializedCoinB64Desc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'serializedCoinB64', Sort.desc); }); @@ -3111,14 +3101,14 @@ extension SparkCoinQuerySortThenBy } QueryBuilder - thenByDiversifierIntString() { + thenByDiversifierIntString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'diversifierIntString', Sort.asc); }); } QueryBuilder - thenByDiversifierIntStringDesc() { + thenByDiversifierIntStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'diversifierIntString', Sort.desc); }); @@ -3203,7 +3193,7 @@ extension SparkCoinQuerySortThenBy } QueryBuilder - thenBySerializedCoinB64Desc() { + thenBySerializedCoinB64Desc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'serializedCoinB64', Sort.desc); }); @@ -3272,30 +3262,35 @@ extension SparkCoinQuerySortThenBy extension SparkCoinQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByAddress( - {bool caseSensitive = true}) { + QueryBuilder distinctByAddress({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'address', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByContextB64( - {bool caseSensitive = true}) { + QueryBuilder distinctByContextB64({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'contextB64', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByDiversifierIntString( - {bool caseSensitive = true}) { + QueryBuilder distinctByDiversifierIntString({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'diversifierIntString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'diversifierIntString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByEncryptedDiversifier() { + distinctByEncryptedDiversifier() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'encryptedDiversifier'); }); @@ -3319,15 +3314,17 @@ extension SparkCoinQueryWhereDistinct }); } - QueryBuilder distinctByLTagHash( - {bool caseSensitive = true}) { + QueryBuilder distinctByLTagHash({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'lTagHash', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByMemo( - {bool caseSensitive = true}) { + QueryBuilder distinctByMemo({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'memo', caseSensitive: caseSensitive); }); @@ -3351,11 +3348,14 @@ extension SparkCoinQueryWhereDistinct }); } - QueryBuilder distinctBySerializedCoinB64( - {bool caseSensitive = true}) { + QueryBuilder distinctBySerializedCoinB64({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'serializedCoinB64', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'serializedCoinB64', + caseSensitive: caseSensitive, + ); }); } @@ -3365,8 +3365,9 @@ extension SparkCoinQueryWhereDistinct }); } - QueryBuilder distinctByTxHash( - {bool caseSensitive = true}) { + QueryBuilder distinctByTxHash({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'txHash', caseSensitive: caseSensitive); }); @@ -3378,16 +3379,20 @@ extension SparkCoinQueryWhereDistinct }); } - QueryBuilder distinctByValueIntString( - {bool caseSensitive = true}) { + QueryBuilder distinctByValueIntString({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'valueIntString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'valueIntString', + caseSensitive: caseSensitive, + ); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -3421,14 +3426,14 @@ extension SparkCoinQueryProperty } QueryBuilder - diversifierIntStringProperty() { + diversifierIntStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'diversifierIntString'); }); } QueryBuilder?, QQueryOperations> - encryptedDiversifierProperty() { + encryptedDiversifierProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'encryptedDiversifier'); }); @@ -3477,14 +3482,14 @@ extension SparkCoinQueryProperty } QueryBuilder?, QQueryOperations> - serialContextProperty() { + serialContextProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'serialContext'); }); } QueryBuilder - serializedCoinB64Property() { + serializedCoinB64Property() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'serializedCoinB64'); }); diff --git a/lib/wallets/isar/models/token_wallet_info.dart b/lib/wallets/isar/models/token_wallet_info.dart index f14491b32..842d04bf0 100644 --- a/lib/wallets/isar/models/token_wallet_info.dart +++ b/lib/wallets/isar/models/token_wallet_info.dart @@ -1,4 +1,5 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../../models/balance.dart'; import '../../../models/isar/models/isar_models.dart'; import '../../../utilities/amount/amount.dart'; @@ -14,9 +15,7 @@ class TokenWalletInfo implements IsarId { @Index( unique: true, replace: false, - composite: [ - CompositeIndex("tokenAddress"), - ], + composite: [CompositeIndex("tokenAddress")], ) final String walletId; @@ -40,24 +39,13 @@ class TokenWalletInfo implements IsarId { Balance getCachedBalance() { if (cachedBalanceJsonString == null) { return Balance( - total: Amount.zeroWith( - fractionDigits: tokenFractionDigits, - ), - spendable: Amount.zeroWith( - fractionDigits: tokenFractionDigits, - ), - blockedTotal: Amount.zeroWith( - fractionDigits: tokenFractionDigits, - ), - pendingSpendable: Amount.zeroWith( - fractionDigits: tokenFractionDigits, - ), + total: Amount.zeroWith(fractionDigits: tokenFractionDigits), + spendable: Amount.zeroWith(fractionDigits: tokenFractionDigits), + blockedTotal: Amount.zeroWith(fractionDigits: tokenFractionDigits), + pendingSpendable: Amount.zeroWith(fractionDigits: tokenFractionDigits), ); } - return Balance.fromJson( - cachedBalanceJsonString!, - tokenFractionDigits, - ); + return Balance.fromJson(cachedBalanceJsonString!, tokenFractionDigits); } Future updateCachedBalance( @@ -65,19 +53,18 @@ class TokenWalletInfo implements IsarId { required Isar isar, }) async { // // ensure we are updating using the latest entry of this in the db - final thisEntry = await isar.tokenWalletInfo - .where() - .walletIdTokenAddressEqualTo(walletId, tokenAddress) - .findFirst(); + final thisEntry = + await isar.tokenWalletInfo + .where() + .walletIdTokenAddressEqualTo(walletId, tokenAddress) + .findFirst(); if (thisEntry == null) { throw Exception( "Attempted to update cached token balance before object was saved in db", ); } else { await isar.writeTxn(() async { - await isar.tokenWalletInfo.delete( - thisEntry.id, - ); + await isar.tokenWalletInfo.delete(thisEntry.id); await isar.tokenWalletInfo.put( TokenWalletInfo( walletId: walletId, diff --git a/lib/wallets/isar/models/token_wallet_info.g.dart b/lib/wallets/isar/models/token_wallet_info.g.dart index f5d8555ab..7e0711224 100644 --- a/lib/wallets/isar/models/token_wallet_info.g.dart +++ b/lib/wallets/isar/models/token_wallet_info.g.dart @@ -36,8 +36,9 @@ const TokenWalletInfoSchema = CollectionSchema( id: 3, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _tokenWalletInfoEstimateSize, serialize: _tokenWalletInfoSerialize, deserialize: _tokenWalletInfoDeserialize, @@ -59,16 +60,17 @@ const TokenWalletInfoSchema = CollectionSchema( name: r'tokenAddress', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _tokenWalletInfoGetId, getLinks: _tokenWalletInfoGetLinks, attach: _tokenWalletInfoAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _tokenWalletInfoEstimateSize( @@ -145,36 +147,51 @@ List> _tokenWalletInfoGetLinks(TokenWalletInfo object) { } void _tokenWalletInfoAttach( - IsarCollection col, Id id, TokenWalletInfo object) { + IsarCollection col, + Id id, + TokenWalletInfo object, +) { object.id = id; } extension TokenWalletInfoByIndex on IsarCollection { Future getByWalletIdTokenAddress( - String walletId, String tokenAddress) { + String walletId, + String tokenAddress, + ) { return getByIndex(r'walletId_tokenAddress', [walletId, tokenAddress]); } TokenWalletInfo? getByWalletIdTokenAddressSync( - String walletId, String tokenAddress) { + String walletId, + String tokenAddress, + ) { return getByIndexSync(r'walletId_tokenAddress', [walletId, tokenAddress]); } Future deleteByWalletIdTokenAddress( - String walletId, String tokenAddress) { + String walletId, + String tokenAddress, + ) { return deleteByIndex(r'walletId_tokenAddress', [walletId, tokenAddress]); } bool deleteByWalletIdTokenAddressSync(String walletId, String tokenAddress) { - return deleteByIndexSync( - r'walletId_tokenAddress', [walletId, tokenAddress]); + return deleteByIndexSync(r'walletId_tokenAddress', [ + walletId, + tokenAddress, + ]); } Future> getAllByWalletIdTokenAddress( - List walletIdValues, List tokenAddressValues) { + List walletIdValues, + List tokenAddressValues, + ) { final len = walletIdValues.length; - assert(tokenAddressValues.length == len, - 'All index values must have the same length'); + assert( + tokenAddressValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], tokenAddressValues[i]]); @@ -184,10 +201,14 @@ extension TokenWalletInfoByIndex on IsarCollection { } List getAllByWalletIdTokenAddressSync( - List walletIdValues, List tokenAddressValues) { + List walletIdValues, + List tokenAddressValues, + ) { final len = walletIdValues.length; - assert(tokenAddressValues.length == len, - 'All index values must have the same length'); + assert( + tokenAddressValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], tokenAddressValues[i]]); @@ -197,10 +218,14 @@ extension TokenWalletInfoByIndex on IsarCollection { } Future deleteAllByWalletIdTokenAddress( - List walletIdValues, List tokenAddressValues) { + List walletIdValues, + List tokenAddressValues, + ) { final len = walletIdValues.length; - assert(tokenAddressValues.length == len, - 'All index values must have the same length'); + assert( + tokenAddressValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], tokenAddressValues[i]]); @@ -210,10 +235,14 @@ extension TokenWalletInfoByIndex on IsarCollection { } int deleteAllByWalletIdTokenAddressSync( - List walletIdValues, List tokenAddressValues) { + List walletIdValues, + List tokenAddressValues, + ) { final len = walletIdValues.length; - assert(tokenAddressValues.length == len, - 'All index values must have the same length'); + assert( + tokenAddressValues.length == len, + 'All index values must have the same length', + ); final values = >[]; for (var i = 0; i < len; i++) { values.add([walletIdValues[i], tokenAddressValues[i]]); @@ -226,20 +255,30 @@ extension TokenWalletInfoByIndex on IsarCollection { return putByIndex(r'walletId_tokenAddress', object); } - Id putByWalletIdTokenAddressSync(TokenWalletInfo object, - {bool saveLinks = true}) { - return putByIndexSync(r'walletId_tokenAddress', object, - saveLinks: saveLinks); + Id putByWalletIdTokenAddressSync( + TokenWalletInfo object, { + bool saveLinks = true, + }) { + return putByIndexSync( + r'walletId_tokenAddress', + object, + saveLinks: saveLinks, + ); } Future> putAllByWalletIdTokenAddress(List objects) { return putAllByIndex(r'walletId_tokenAddress', objects); } - List putAllByWalletIdTokenAddressSync(List objects, - {bool saveLinks = true}) { - return putAllByIndexSync(r'walletId_tokenAddress', objects, - saveLinks: saveLinks); + List putAllByWalletIdTokenAddressSync( + List objects, { + bool saveLinks = true, + }) { + return putAllByIndexSync( + r'walletId_tokenAddress', + objects, + saveLinks: saveLinks, + ); } } @@ -255,17 +294,15 @@ extension TokenWalletInfoQueryWhereSort extension TokenWalletInfoQueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder - idNotEqualTo(Id id) { + idNotEqualTo(Id id) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -288,7 +325,7 @@ extension TokenWalletInfoQueryWhere } QueryBuilder - idGreaterThan(Id id, {bool include = false}) { + idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -297,8 +334,9 @@ extension TokenWalletInfoQueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -313,102 +351,123 @@ extension TokenWalletInfoQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualToAnyTokenAddress(String walletId) { + walletIdEqualToAnyTokenAddress(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId_tokenAddress', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'walletId_tokenAddress', + value: [walletId], + ), + ); }); } QueryBuilder - walletIdNotEqualToAnyTokenAddress(String walletId) { + walletIdNotEqualToAnyTokenAddress(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } QueryBuilder - walletIdTokenAddressEqualTo(String walletId, String tokenAddress) { + walletIdTokenAddressEqualTo(String walletId, String tokenAddress) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId_tokenAddress', - value: [walletId, tokenAddress], - )); + return query.addWhereClause( + IndexWhereClause.equalTo( + indexName: r'walletId_tokenAddress', + value: [walletId, tokenAddress], + ), + ); }); } QueryBuilder - walletIdEqualToTokenAddressNotEqualTo( - String walletId, String tokenAddress) { + walletIdEqualToTokenAddressNotEqualTo(String walletId, String tokenAddress) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId], - upper: [walletId, tokenAddress], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId, tokenAddress], - includeLower: false, - upper: [walletId], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId], + upper: [walletId, tokenAddress], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId, tokenAddress], + includeLower: false, + upper: [walletId], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId, tokenAddress], - includeLower: false, - upper: [walletId], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId_tokenAddress', - lower: [walletId], - upper: [walletId, tokenAddress], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId, tokenAddress], + includeLower: false, + upper: [walletId], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId_tokenAddress', + lower: [walletId], + upper: [walletId, tokenAddress], + includeUpper: false, + ), + ); } }); } @@ -417,71 +476,74 @@ extension TokenWalletInfoQueryWhere extension TokenWalletInfoQueryFilter on QueryBuilder { QueryBuilder - cachedBalanceJsonStringIsNull() { + cachedBalanceJsonStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'cachedBalanceJsonString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'cachedBalanceJsonString'), + ); }); } QueryBuilder - cachedBalanceJsonStringIsNotNull() { + cachedBalanceJsonStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'cachedBalanceJsonString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'cachedBalanceJsonString'), + ); }); } QueryBuilder - cachedBalanceJsonStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + cachedBalanceJsonStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringGreaterThan( + cachedBalanceJsonStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringLessThan( + cachedBalanceJsonStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringBetween( + cachedBalanceJsonStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -489,193 +551,201 @@ extension TokenWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedBalanceJsonString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedBalanceJsonString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + cachedBalanceJsonStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + cachedBalanceJsonStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringContains(String value, - {bool caseSensitive = true}) { + cachedBalanceJsonStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'cachedBalanceJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'cachedBalanceJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringMatches(String pattern, - {bool caseSensitive = true}) { + cachedBalanceJsonStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'cachedBalanceJsonString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'cachedBalanceJsonString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceJsonStringIsEmpty() { + cachedBalanceJsonStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceJsonString', + value: '', + ), + ); }); } QueryBuilder - cachedBalanceJsonStringIsNotEmpty() { + cachedBalanceJsonStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'cachedBalanceJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'cachedBalanceJsonString', + value: '', + ), + ); }); } QueryBuilder - idEqualTo(Id value) { + idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { + idGreaterThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idLessThan( - Id value, { - bool include = false, - }) { + idLessThan(Id value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idBetween( + idBetween( Id lower, Id upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenAddressEqualTo( - String value, { - bool caseSensitive = true, - }) { + tokenAddressEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressGreaterThan( + tokenAddressGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressLessThan( + tokenAddressLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressBetween( + tokenAddressBetween( String lower, String upper, { bool includeLower = true, @@ -683,191 +753,195 @@ extension TokenWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenAddress', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenAddress', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressStartsWith( - String value, { - bool caseSensitive = true, - }) { + tokenAddressStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressEndsWith( - String value, { - bool caseSensitive = true, - }) { + tokenAddressEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressContains(String value, {bool caseSensitive = true}) { + tokenAddressContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'tokenAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'tokenAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressMatches(String pattern, {bool caseSensitive = true}) { + tokenAddressMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'tokenAddress', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'tokenAddress', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenAddressIsEmpty() { + tokenAddressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenAddress', value: ''), + ); }); } QueryBuilder - tokenAddressIsNotEmpty() { + tokenAddressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'tokenAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'tokenAddress', value: ''), + ); }); } QueryBuilder - tokenFractionDigitsEqualTo(int value) { + tokenFractionDigitsEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenFractionDigits', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenFractionDigits', value: value), + ); }); } QueryBuilder - tokenFractionDigitsGreaterThan( - int value, { - bool include = false, - }) { + tokenFractionDigitsGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenFractionDigits', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenFractionDigits', + value: value, + ), + ); }); } QueryBuilder - tokenFractionDigitsLessThan( - int value, { - bool include = false, - }) { + tokenFractionDigitsLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenFractionDigits', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenFractionDigits', + value: value, + ), + ); }); } QueryBuilder - tokenFractionDigitsBetween( + tokenFractionDigitsBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenFractionDigits', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenFractionDigits', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { + walletIdEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -875,84 +949,86 @@ extension TokenWalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { + walletIdContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { + walletIdMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -966,56 +1042,56 @@ extension TokenWalletInfoQueryLinks extension TokenWalletInfoQuerySortBy on QueryBuilder { QueryBuilder - sortByCachedBalanceJsonString() { + sortByCachedBalanceJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceJsonString', Sort.asc); }); } QueryBuilder - sortByCachedBalanceJsonStringDesc() { + sortByCachedBalanceJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceJsonString', Sort.desc); }); } QueryBuilder - sortByTokenAddress() { + sortByTokenAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenAddress', Sort.asc); }); } QueryBuilder - sortByTokenAddressDesc() { + sortByTokenAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenAddress', Sort.desc); }); } QueryBuilder - sortByTokenFractionDigits() { + sortByTokenFractionDigits() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenFractionDigits', Sort.asc); }); } QueryBuilder - sortByTokenFractionDigitsDesc() { + sortByTokenFractionDigitsDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenFractionDigits', Sort.desc); }); } QueryBuilder - sortByWalletId() { + sortByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1025,14 +1101,14 @@ extension TokenWalletInfoQuerySortBy extension TokenWalletInfoQuerySortThenBy on QueryBuilder { QueryBuilder - thenByCachedBalanceJsonString() { + thenByCachedBalanceJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceJsonString', Sort.asc); }); } QueryBuilder - thenByCachedBalanceJsonStringDesc() { + thenByCachedBalanceJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceJsonString', Sort.desc); }); @@ -1051,42 +1127,42 @@ extension TokenWalletInfoQuerySortThenBy } QueryBuilder - thenByTokenAddress() { + thenByTokenAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenAddress', Sort.asc); }); } QueryBuilder - thenByTokenAddressDesc() { + thenByTokenAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenAddress', Sort.desc); }); } QueryBuilder - thenByTokenFractionDigits() { + thenByTokenFractionDigits() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenFractionDigits', Sort.asc); }); } QueryBuilder - thenByTokenFractionDigitsDesc() { + thenByTokenFractionDigitsDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'tokenFractionDigits', Sort.desc); }); } QueryBuilder - thenByWalletId() { + thenByWalletId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.asc); }); } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -1096,29 +1172,32 @@ extension TokenWalletInfoQuerySortThenBy extension TokenWalletInfoQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByCachedBalanceJsonString({bool caseSensitive = true}) { + distinctByCachedBalanceJsonString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'cachedBalanceJsonString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'cachedBalanceJsonString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByTokenAddress({bool caseSensitive = true}) { + distinctByTokenAddress({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenAddress', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByTokenFractionDigits() { + distinctByTokenFractionDigits() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenFractionDigits'); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -1134,21 +1213,21 @@ extension TokenWalletInfoQueryProperty } QueryBuilder - cachedBalanceJsonStringProperty() { + cachedBalanceJsonStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'cachedBalanceJsonString'); }); } QueryBuilder - tokenAddressProperty() { + tokenAddressProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenAddress'); }); } QueryBuilder - tokenFractionDigitsProperty() { + tokenFractionDigitsProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenFractionDigits'); }); diff --git a/lib/wallets/isar/models/wallet_info.dart b/lib/wallets/isar/models/wallet_info.dart index 6df8dc456..5b2d6569c 100644 --- a/lib/wallets/isar/models/wallet_info.dart +++ b/lib/wallets/isar/models/wallet_info.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:uuid/uuid.dart'; import '../../../app_config.dart'; @@ -508,6 +508,7 @@ class WalletInfo implements IsarId { abstract class WalletInfoKeys { static const String tokenContractAddresses = "tokenContractAddressesKey"; static const String epiccashData = "epiccashDataKey"; + static const String mimblewimblecoinData = "mimblewimblecoinDataKey"; static const String bananoMonkeyImageBytes = "monkeyImageBytesKey"; static const String tezosDerivationPath = "tezosDerivationPathKey"; static const String xelisDerivationPath = "xelisDerivationPathKey"; @@ -521,4 +522,6 @@ abstract class WalletInfoKeys { "duressMarkedVisibleWalletKey"; static const String mwebEnabled = "mwebEnabledKey"; static const String mwebScanHeight = "mwebScanHeightKey"; + static const String firoSparkUsedTagsCacheResetVersion = + "firoSparkUsedTagsCacheResetVersionKey"; } diff --git a/lib/wallets/isar/models/wallet_info.g.dart b/lib/wallets/isar/models/wallet_info.g.dart index 3dda37c77..1db7d04fc 100644 --- a/lib/wallets/isar/models/wallet_info.g.dart +++ b/lib/wallets/isar/models/wallet_info.g.dart @@ -63,11 +63,7 @@ const WalletInfoSchema = CollectionSchema( type: IsarType.byte, enumMap: _WalletInfomainAddressTypeEnumValueMap, ), - r'name': PropertySchema( - id: 9, - name: r'name', - type: IsarType.string, - ), + r'name': PropertySchema(id: 9, name: r'name', type: IsarType.string), r'otherDataJsonString': PropertySchema( id: 10, name: r'otherDataJsonString', @@ -87,8 +83,9 @@ const WalletInfoSchema = CollectionSchema( id: 13, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _walletInfoEstimateSize, serialize: _walletInfoSerialize, deserialize: _walletInfoDeserialize, @@ -105,16 +102,17 @@ const WalletInfoSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _walletInfoGetId, getLinks: _walletInfoGetLinks, attach: _walletInfoAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _walletInfoEstimateSize( @@ -197,8 +195,10 @@ WalletInfo _walletInfoDeserialize( cachedReceivingAddress: reader.readStringOrNull(offsets[4]) ?? "", coinName: reader.readString(offsets[5]), favouriteOrderIndex: reader.readLongOrNull(offsets[6]) ?? -1, - mainAddressType: _WalletInfomainAddressTypeValueEnumMap[ - reader.readByteOrNull(offsets[8])] ?? + mainAddressType: + _WalletInfomainAddressTypeValueEnumMap[reader.readByteOrNull( + offsets[8], + )] ?? AddressType.p2pkh, name: reader.readString(offsets[9]), otherDataJsonString: reader.readStringOrNull(offsets[10]), @@ -233,9 +233,11 @@ P _walletInfoDeserializeProp

( case 7: return (reader.readBool(offset)) as P; case 8: - return (_WalletInfomainAddressTypeValueEnumMap[ - reader.readByteOrNull(offset)] ?? - AddressType.p2pkh) as P; + return (_WalletInfomainAddressTypeValueEnumMap[reader.readByteOrNull( + offset, + )] ?? + AddressType.p2pkh) + as P; case 9: return (reader.readString(offset)) as P; case 10: @@ -357,8 +359,10 @@ extension WalletInfoByIndex on IsarCollection { return putAllByIndex(r'walletId', objects); } - List putAllByWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'walletId', objects, saveLinks: saveLinks); } } @@ -376,10 +380,7 @@ extension WalletInfoQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } @@ -405,8 +406,10 @@ extension WalletInfoQueryWhere }); } - QueryBuilder idGreaterThan(Id id, - {bool include = false}) { + QueryBuilder idGreaterThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -414,8 +417,10 @@ extension WalletInfoQueryWhere }); } - QueryBuilder idLessThan(Id id, - {bool include = false}) { + QueryBuilder idLessThan( + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -430,56 +435,67 @@ extension WalletInfoQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder walletIdEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder walletIdNotEqualTo( - String walletId) { + String walletId, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } @@ -488,71 +504,79 @@ extension WalletInfoQueryWhere extension WalletInfoQueryFilter on QueryBuilder { QueryBuilder - cachedBalanceSecondaryStringIsNull() { + cachedBalanceSecondaryStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'cachedBalanceSecondaryString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'cachedBalanceSecondaryString'), + ); }); } QueryBuilder - cachedBalanceSecondaryStringIsNotNull() { + cachedBalanceSecondaryStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'cachedBalanceSecondaryString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull( + property: r'cachedBalanceSecondaryString', + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringEqualTo( + cachedBalanceSecondaryStringEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringGreaterThan( + cachedBalanceSecondaryStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringLessThan( + cachedBalanceSecondaryStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringBetween( + cachedBalanceSecondaryStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -560,155 +584,176 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedBalanceSecondaryString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedBalanceSecondaryString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringStartsWith( + cachedBalanceSecondaryStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringEndsWith( + cachedBalanceSecondaryStringEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringContains(String value, - {bool caseSensitive = true}) { + cachedBalanceSecondaryStringContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'cachedBalanceSecondaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'cachedBalanceSecondaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringMatches(String pattern, - {bool caseSensitive = true}) { + cachedBalanceSecondaryStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'cachedBalanceSecondaryString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'cachedBalanceSecondaryString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringIsEmpty() { + cachedBalanceSecondaryStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceSecondaryString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceSecondaryString', + value: '', + ), + ); }); } QueryBuilder - cachedBalanceSecondaryStringIsNotEmpty() { + cachedBalanceSecondaryStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'cachedBalanceSecondaryString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'cachedBalanceSecondaryString', + value: '', + ), + ); }); } QueryBuilder - cachedBalanceStringIsNull() { + cachedBalanceStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'cachedBalanceString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'cachedBalanceString'), + ); }); } QueryBuilder - cachedBalanceStringIsNotNull() { + cachedBalanceStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'cachedBalanceString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'cachedBalanceString'), + ); }); } QueryBuilder - cachedBalanceStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + cachedBalanceStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringGreaterThan( + cachedBalanceStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringLessThan( + cachedBalanceStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringBetween( + cachedBalanceStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -716,153 +761,166 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedBalanceString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedBalanceString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + cachedBalanceStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + cachedBalanceStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringContains(String value, {bool caseSensitive = true}) { + cachedBalanceStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'cachedBalanceString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'cachedBalanceString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringMatches(String pattern, {bool caseSensitive = true}) { + cachedBalanceStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'cachedBalanceString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'cachedBalanceString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceStringIsEmpty() { + cachedBalanceStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'cachedBalanceString', value: ''), + ); }); } QueryBuilder - cachedBalanceStringIsNotEmpty() { + cachedBalanceStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'cachedBalanceString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'cachedBalanceString', + value: '', + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringIsNull() { + cachedBalanceTertiaryStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'cachedBalanceTertiaryString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'cachedBalanceTertiaryString'), + ); }); } QueryBuilder - cachedBalanceTertiaryStringIsNotNull() { + cachedBalanceTertiaryStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'cachedBalanceTertiaryString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull( + property: r'cachedBalanceTertiaryString', + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringEqualTo( + cachedBalanceTertiaryStringEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringGreaterThan( + cachedBalanceTertiaryStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringLessThan( + cachedBalanceTertiaryStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringBetween( + cachedBalanceTertiaryStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -870,193 +928,213 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedBalanceTertiaryString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedBalanceTertiaryString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringStartsWith( + cachedBalanceTertiaryStringStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringEndsWith( + cachedBalanceTertiaryStringEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringContains(String value, - {bool caseSensitive = true}) { + cachedBalanceTertiaryStringContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'cachedBalanceTertiaryString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'cachedBalanceTertiaryString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringMatches(String pattern, - {bool caseSensitive = true}) { + cachedBalanceTertiaryStringMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'cachedBalanceTertiaryString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'cachedBalanceTertiaryString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringIsEmpty() { + cachedBalanceTertiaryStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedBalanceTertiaryString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedBalanceTertiaryString', + value: '', + ), + ); }); } QueryBuilder - cachedBalanceTertiaryStringIsNotEmpty() { + cachedBalanceTertiaryStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'cachedBalanceTertiaryString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'cachedBalanceTertiaryString', + value: '', + ), + ); }); } QueryBuilder - cachedChainHeightEqualTo(int value) { + cachedChainHeightEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedChainHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'cachedChainHeight', value: value), + ); }); } QueryBuilder - cachedChainHeightGreaterThan( - int value, { - bool include = false, - }) { + cachedChainHeightGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedChainHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedChainHeight', + value: value, + ), + ); }); } QueryBuilder - cachedChainHeightLessThan( - int value, { - bool include = false, - }) { + cachedChainHeightLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedChainHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedChainHeight', + value: value, + ), + ); }); } QueryBuilder - cachedChainHeightBetween( + cachedChainHeightBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedChainHeight', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedChainHeight', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - cachedReceivingAddressEqualTo( - String value, { - bool caseSensitive = true, - }) { + cachedReceivingAddressEqualTo(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressGreaterThan( + cachedReceivingAddressGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressLessThan( + cachedReceivingAddressLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressBetween( + cachedReceivingAddressBetween( String lower, String upper, { bool includeLower = true, @@ -1064,86 +1142,89 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'cachedReceivingAddress', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'cachedReceivingAddress', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressStartsWith( - String value, { - bool caseSensitive = true, - }) { + cachedReceivingAddressStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressEndsWith( - String value, { - bool caseSensitive = true, - }) { + cachedReceivingAddressEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressContains(String value, - {bool caseSensitive = true}) { + cachedReceivingAddressContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'cachedReceivingAddress', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'cachedReceivingAddress', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressMatches(String pattern, - {bool caseSensitive = true}) { + cachedReceivingAddressMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'cachedReceivingAddress', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'cachedReceivingAddress', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - cachedReceivingAddressIsEmpty() { + cachedReceivingAddressIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'cachedReceivingAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'cachedReceivingAddress', value: ''), + ); }); } QueryBuilder - cachedReceivingAddressIsNotEmpty() { + cachedReceivingAddressIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'cachedReceivingAddress', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'cachedReceivingAddress', + value: '', + ), + ); }); } @@ -1152,27 +1233,31 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameGreaterThan( + coinNameGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1182,12 +1267,14 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1199,28 +1286,29 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'coinName', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'coinName', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameStartsWith( - String value, { - bool caseSensitive = true, - }) { + coinNameStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1229,121 +1317,126 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder coinNameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'coinName', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'coinName', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder coinNameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'coinName', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'coinName', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - coinNameIsEmpty() { + coinNameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'coinName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'coinName', value: ''), + ); }); } QueryBuilder - coinNameIsNotEmpty() { + coinNameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'coinName', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'coinName', value: ''), + ); }); } QueryBuilder - favouriteOrderIndexEqualTo(int value) { + favouriteOrderIndexEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'favouriteOrderIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'favouriteOrderIndex', value: value), + ); }); } QueryBuilder - favouriteOrderIndexGreaterThan( - int value, { - bool include = false, - }) { + favouriteOrderIndexGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'favouriteOrderIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'favouriteOrderIndex', + value: value, + ), + ); }); } QueryBuilder - favouriteOrderIndexLessThan( - int value, { - bool include = false, - }) { + favouriteOrderIndexLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'favouriteOrderIndex', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'favouriteOrderIndex', + value: value, + ), + ); }); } QueryBuilder - favouriteOrderIndexBetween( + favouriteOrderIndexBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'favouriteOrderIndex', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'favouriteOrderIndex', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } @@ -1352,11 +1445,13 @@ extension WalletInfoQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1365,11 +1460,13 @@ extension WalletInfoQueryFilter bool include = false, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -1380,79 +1477,79 @@ extension WalletInfoQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - isFavouriteEqualTo(bool value) { + isFavouriteEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isFavourite', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isFavourite', value: value), + ); }); } QueryBuilder - mainAddressTypeEqualTo(AddressType value) { + mainAddressTypeEqualTo(AddressType value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'mainAddressType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'mainAddressType', value: value), + ); }); } QueryBuilder - mainAddressTypeGreaterThan( - AddressType value, { - bool include = false, - }) { + mainAddressTypeGreaterThan(AddressType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'mainAddressType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'mainAddressType', + value: value, + ), + ); }); } QueryBuilder - mainAddressTypeLessThan( - AddressType value, { - bool include = false, - }) { + mainAddressTypeLessThan(AddressType value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'mainAddressType', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'mainAddressType', + value: value, + ), + ); }); } QueryBuilder - mainAddressTypeBetween( + mainAddressTypeBetween( AddressType lower, AddressType upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'mainAddressType', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'mainAddressType', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } @@ -1461,11 +1558,13 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1475,12 +1574,14 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1490,12 +1591,14 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1507,14 +1610,16 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'name', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'name', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1523,11 +1628,13 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -1536,122 +1643,131 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'name', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'name', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'name', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'name', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'name', value: ''), + ); }); } QueryBuilder nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'name', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'name', value: ''), + ); }); } QueryBuilder - otherDataJsonStringIsNull() { + otherDataJsonStringIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNull( - property: r'otherDataJsonString', - )); + return query.addFilterCondition( + const FilterCondition.isNull(property: r'otherDataJsonString'), + ); }); } QueryBuilder - otherDataJsonStringIsNotNull() { + otherDataJsonStringIsNotNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'otherDataJsonString', - )); + return query.addFilterCondition( + const FilterCondition.isNotNull(property: r'otherDataJsonString'), + ); }); } QueryBuilder - otherDataJsonStringEqualTo( - String? value, { - bool caseSensitive = true, - }) { + otherDataJsonStringEqualTo(String? value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringGreaterThan( + otherDataJsonStringGreaterThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringLessThan( + otherDataJsonStringLessThan( String? value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringBetween( + otherDataJsonStringBetween( String? lower, String? upper, { bool includeLower = true, @@ -1659,191 +1775,201 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'otherDataJsonString', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'otherDataJsonString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringStartsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataJsonStringStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringEndsWith( - String value, { - bool caseSensitive = true, - }) { + otherDataJsonStringEndsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringContains(String value, {bool caseSensitive = true}) { + otherDataJsonStringContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'otherDataJsonString', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'otherDataJsonString', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringMatches(String pattern, {bool caseSensitive = true}) { + otherDataJsonStringMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'otherDataJsonString', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'otherDataJsonString', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - otherDataJsonStringIsEmpty() { + otherDataJsonStringIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'otherDataJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'otherDataJsonString', value: ''), + ); }); } QueryBuilder - otherDataJsonStringIsNotEmpty() { + otherDataJsonStringIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'otherDataJsonString', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'otherDataJsonString', + value: '', + ), + ); }); } QueryBuilder - restoreHeightEqualTo(int value) { + restoreHeightEqualTo(int value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'restoreHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'restoreHeight', value: value), + ); }); } QueryBuilder - restoreHeightGreaterThan( - int value, { - bool include = false, - }) { + restoreHeightGreaterThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'restoreHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'restoreHeight', + value: value, + ), + ); }); } QueryBuilder - restoreHeightLessThan( - int value, { - bool include = false, - }) { + restoreHeightLessThan(int value, {bool include = false}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'restoreHeight', - value: value, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'restoreHeight', + value: value, + ), + ); }); } QueryBuilder - restoreHeightBetween( + restoreHeightBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'restoreHeight', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'restoreHeight', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - tokenContractAddressesElementEqualTo( + tokenContractAddressesElementEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementGreaterThan( + tokenContractAddressesElementGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementLessThan( + tokenContractAddressesElementLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementBetween( + tokenContractAddressesElementBetween( String lower, String upper, { bool includeLower = true, @@ -1851,91 +1977,106 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'tokenContractAddresses', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'tokenContractAddresses', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementStartsWith( + tokenContractAddressesElementStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementEndsWith( + tokenContractAddressesElementEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementContains(String value, - {bool caseSensitive = true}) { + tokenContractAddressesElementContains( + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'tokenContractAddresses', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'tokenContractAddresses', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementMatches(String pattern, - {bool caseSensitive = true}) { + tokenContractAddressesElementMatches( + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'tokenContractAddresses', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'tokenContractAddresses', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - tokenContractAddressesElementIsEmpty() { + tokenContractAddressesElementIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'tokenContractAddresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'tokenContractAddresses', value: ''), + ); }); } QueryBuilder - tokenContractAddressesElementIsNotEmpty() { + tokenContractAddressesElementIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'tokenContractAddresses', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + property: r'tokenContractAddresses', + value: '', + ), + ); }); } QueryBuilder - tokenContractAddressesLengthEqualTo(int length) { + tokenContractAddressesLengthEqualTo(int length) { return QueryBuilder.apply(this, (query) { return query.listLength( r'tokenContractAddresses', @@ -1948,20 +2089,14 @@ extension WalletInfoQueryFilter } QueryBuilder - tokenContractAddressesIsEmpty() { + tokenContractAddressesIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.listLength( - r'tokenContractAddresses', - 0, - true, - 0, - true, - ); + return query.listLength(r'tokenContractAddresses', 0, true, 0, true); }); } QueryBuilder - tokenContractAddressesIsNotEmpty() { + tokenContractAddressesIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.listLength( r'tokenContractAddresses', @@ -1974,10 +2109,7 @@ extension WalletInfoQueryFilter } QueryBuilder - tokenContractAddressesLengthLessThan( - int length, { - bool include = false, - }) { + tokenContractAddressesLengthLessThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.listLength( r'tokenContractAddresses', @@ -1990,10 +2122,7 @@ extension WalletInfoQueryFilter } QueryBuilder - tokenContractAddressesLengthGreaterThan( - int length, { - bool include = false, - }) { + tokenContractAddressesLengthGreaterThan(int length, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.listLength( r'tokenContractAddresses', @@ -2006,7 +2135,7 @@ extension WalletInfoQueryFilter } QueryBuilder - tokenContractAddressesLengthBetween( + tokenContractAddressesLengthBetween( int lower, int upper, { bool includeLower = true, @@ -2028,27 +2157,31 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2058,12 +2191,14 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2075,28 +2210,29 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { + walletIdStartsWith(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } @@ -2105,55 +2241,61 @@ extension WalletInfoQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdContains( - String value, - {bool caseSensitive = true}) { + String value, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder walletIdMatches( - String pattern, - {bool caseSensitive = true}) { + String pattern, { + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -2167,42 +2309,42 @@ extension WalletInfoQueryLinks extension WalletInfoQuerySortBy on QueryBuilder { QueryBuilder - sortByCachedBalanceSecondaryString() { + sortByCachedBalanceSecondaryString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceSecondaryString', Sort.asc); }); } QueryBuilder - sortByCachedBalanceSecondaryStringDesc() { + sortByCachedBalanceSecondaryStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceSecondaryString', Sort.desc); }); } QueryBuilder - sortByCachedBalanceString() { + sortByCachedBalanceString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceString', Sort.asc); }); } QueryBuilder - sortByCachedBalanceStringDesc() { + sortByCachedBalanceStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceString', Sort.desc); }); } QueryBuilder - sortByCachedBalanceTertiaryString() { + sortByCachedBalanceTertiaryString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceTertiaryString', Sort.asc); }); } QueryBuilder - sortByCachedBalanceTertiaryStringDesc() { + sortByCachedBalanceTertiaryStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceTertiaryString', Sort.desc); }); @@ -2215,21 +2357,21 @@ extension WalletInfoQuerySortBy } QueryBuilder - sortByCachedChainHeightDesc() { + sortByCachedChainHeightDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedChainHeight', Sort.desc); }); } QueryBuilder - sortByCachedReceivingAddress() { + sortByCachedReceivingAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedReceivingAddress', Sort.asc); }); } QueryBuilder - sortByCachedReceivingAddressDesc() { + sortByCachedReceivingAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedReceivingAddress', Sort.desc); }); @@ -2248,14 +2390,14 @@ extension WalletInfoQuerySortBy } QueryBuilder - sortByFavouriteOrderIndex() { + sortByFavouriteOrderIndex() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favouriteOrderIndex', Sort.asc); }); } QueryBuilder - sortByFavouriteOrderIndexDesc() { + sortByFavouriteOrderIndexDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favouriteOrderIndex', Sort.desc); }); @@ -2280,7 +2422,7 @@ extension WalletInfoQuerySortBy } QueryBuilder - sortByMainAddressTypeDesc() { + sortByMainAddressTypeDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'mainAddressType', Sort.desc); }); @@ -2299,14 +2441,14 @@ extension WalletInfoQuerySortBy } QueryBuilder - sortByOtherDataJsonString() { + sortByOtherDataJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherDataJsonString', Sort.asc); }); } QueryBuilder - sortByOtherDataJsonStringDesc() { + sortByOtherDataJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherDataJsonString', Sort.desc); }); @@ -2340,42 +2482,42 @@ extension WalletInfoQuerySortBy extension WalletInfoQuerySortThenBy on QueryBuilder { QueryBuilder - thenByCachedBalanceSecondaryString() { + thenByCachedBalanceSecondaryString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceSecondaryString', Sort.asc); }); } QueryBuilder - thenByCachedBalanceSecondaryStringDesc() { + thenByCachedBalanceSecondaryStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceSecondaryString', Sort.desc); }); } QueryBuilder - thenByCachedBalanceString() { + thenByCachedBalanceString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceString', Sort.asc); }); } QueryBuilder - thenByCachedBalanceStringDesc() { + thenByCachedBalanceStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceString', Sort.desc); }); } QueryBuilder - thenByCachedBalanceTertiaryString() { + thenByCachedBalanceTertiaryString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceTertiaryString', Sort.asc); }); } QueryBuilder - thenByCachedBalanceTertiaryStringDesc() { + thenByCachedBalanceTertiaryStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedBalanceTertiaryString', Sort.desc); }); @@ -2388,21 +2530,21 @@ extension WalletInfoQuerySortThenBy } QueryBuilder - thenByCachedChainHeightDesc() { + thenByCachedChainHeightDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedChainHeight', Sort.desc); }); } QueryBuilder - thenByCachedReceivingAddress() { + thenByCachedReceivingAddress() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedReceivingAddress', Sort.asc); }); } QueryBuilder - thenByCachedReceivingAddressDesc() { + thenByCachedReceivingAddressDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'cachedReceivingAddress', Sort.desc); }); @@ -2421,14 +2563,14 @@ extension WalletInfoQuerySortThenBy } QueryBuilder - thenByFavouriteOrderIndex() { + thenByFavouriteOrderIndex() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favouriteOrderIndex', Sort.asc); }); } QueryBuilder - thenByFavouriteOrderIndexDesc() { + thenByFavouriteOrderIndexDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'favouriteOrderIndex', Sort.desc); }); @@ -2465,7 +2607,7 @@ extension WalletInfoQuerySortThenBy } QueryBuilder - thenByMainAddressTypeDesc() { + thenByMainAddressTypeDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'mainAddressType', Sort.desc); }); @@ -2484,14 +2626,14 @@ extension WalletInfoQuerySortThenBy } QueryBuilder - thenByOtherDataJsonString() { + thenByOtherDataJsonString() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherDataJsonString', Sort.asc); }); } QueryBuilder - thenByOtherDataJsonStringDesc() { + thenByOtherDataJsonStringDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'otherDataJsonString', Sort.desc); }); @@ -2525,53 +2667,62 @@ extension WalletInfoQuerySortThenBy extension WalletInfoQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByCachedBalanceSecondaryString({bool caseSensitive = true}) { + distinctByCachedBalanceSecondaryString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'cachedBalanceSecondaryString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'cachedBalanceSecondaryString', + caseSensitive: caseSensitive, + ); }); } - QueryBuilder distinctByCachedBalanceString( - {bool caseSensitive = true}) { + QueryBuilder + distinctByCachedBalanceString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'cachedBalanceString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'cachedBalanceString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByCachedBalanceTertiaryString({bool caseSensitive = true}) { + distinctByCachedBalanceTertiaryString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'cachedBalanceTertiaryString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'cachedBalanceTertiaryString', + caseSensitive: caseSensitive, + ); }); } QueryBuilder - distinctByCachedChainHeight() { + distinctByCachedChainHeight() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'cachedChainHeight'); }); } QueryBuilder - distinctByCachedReceivingAddress({bool caseSensitive = true}) { + distinctByCachedReceivingAddress({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'cachedReceivingAddress', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'cachedReceivingAddress', + caseSensitive: caseSensitive, + ); }); } - QueryBuilder distinctByCoinName( - {bool caseSensitive = true}) { + QueryBuilder distinctByCoinName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'coinName', caseSensitive: caseSensitive); }); } QueryBuilder - distinctByFavouriteOrderIndex() { + distinctByFavouriteOrderIndex() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'favouriteOrderIndex'); }); @@ -2589,18 +2740,21 @@ extension WalletInfoQueryWhereDistinct }); } - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctByName({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } - QueryBuilder distinctByOtherDataJsonString( - {bool caseSensitive = true}) { + QueryBuilder + distinctByOtherDataJsonString({bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(r'otherDataJsonString', - caseSensitive: caseSensitive); + return query.addDistinctBy( + r'otherDataJsonString', + caseSensitive: caseSensitive, + ); }); } @@ -2611,14 +2765,15 @@ extension WalletInfoQueryWhereDistinct } QueryBuilder - distinctByTokenContractAddresses() { + distinctByTokenContractAddresses() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'tokenContractAddresses'); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -2634,21 +2789,21 @@ extension WalletInfoQueryProperty } QueryBuilder - cachedBalanceSecondaryStringProperty() { + cachedBalanceSecondaryStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'cachedBalanceSecondaryString'); }); } QueryBuilder - cachedBalanceStringProperty() { + cachedBalanceStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'cachedBalanceString'); }); } QueryBuilder - cachedBalanceTertiaryStringProperty() { + cachedBalanceTertiaryStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'cachedBalanceTertiaryString'); }); @@ -2661,7 +2816,7 @@ extension WalletInfoQueryProperty } QueryBuilder - cachedReceivingAddressProperty() { + cachedReceivingAddressProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'cachedReceivingAddress'); }); @@ -2674,7 +2829,7 @@ extension WalletInfoQueryProperty } QueryBuilder - favouriteOrderIndexProperty() { + favouriteOrderIndexProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'favouriteOrderIndex'); }); @@ -2687,7 +2842,7 @@ extension WalletInfoQueryProperty } QueryBuilder - mainAddressTypeProperty() { + mainAddressTypeProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'mainAddressType'); }); @@ -2700,7 +2855,7 @@ extension WalletInfoQueryProperty } QueryBuilder - otherDataJsonStringProperty() { + otherDataJsonStringProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'otherDataJsonString'); }); @@ -2713,7 +2868,7 @@ extension WalletInfoQueryProperty } QueryBuilder, QQueryOperations> - tokenContractAddressesProperty() { + tokenContractAddressesProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'tokenContractAddresses'); }); diff --git a/lib/wallets/isar/models/wallet_info_meta.dart b/lib/wallets/isar/models/wallet_info_meta.dart index ce0820a1a..fa3766377 100644 --- a/lib/wallets/isar/models/wallet_info_meta.dart +++ b/lib/wallets/isar/models/wallet_info_meta.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../isar_id_interface.dart'; @@ -16,8 +16,5 @@ class WalletInfoMeta implements IsarId { /// and should not be displayed in the ui. final bool isMnemonicVerified; - WalletInfoMeta({ - required this.walletId, - required this.isMnemonicVerified, - }); + WalletInfoMeta({required this.walletId, required this.isMnemonicVerified}); } diff --git a/lib/wallets/isar/models/wallet_info_meta.g.dart b/lib/wallets/isar/models/wallet_info_meta.g.dart index d8f578929..4ec63249e 100644 --- a/lib/wallets/isar/models/wallet_info_meta.g.dart +++ b/lib/wallets/isar/models/wallet_info_meta.g.dart @@ -26,8 +26,9 @@ const WalletInfoMetaSchema = CollectionSchema( id: 1, name: r'walletId', type: IsarType.string, - ) + ), }, + estimateSize: _walletInfoMetaEstimateSize, serialize: _walletInfoMetaSerialize, deserialize: _walletInfoMetaDeserialize, @@ -44,16 +45,17 @@ const WalletInfoMetaSchema = CollectionSchema( name: r'walletId', type: IndexType.hash, caseSensitive: true, - ) + ), ], - ) + ), }, links: {}, embeddedSchemas: {}, + getId: _walletInfoMetaGetId, getLinks: _walletInfoMetaGetLinks, attach: _walletInfoMetaAttach, - version: '3.1.8', + version: '3.3.0-dev.2', ); int _walletInfoMetaEstimateSize( @@ -115,7 +117,10 @@ List> _walletInfoMetaGetLinks(WalletInfoMeta object) { } void _walletInfoMetaAttach( - IsarCollection col, Id id, WalletInfoMeta object) { + IsarCollection col, + Id id, + WalletInfoMeta object, +) { object.id = id; } @@ -168,8 +173,10 @@ extension WalletInfoMetaByIndex on IsarCollection { return putAllByIndex(r'walletId', objects); } - List putAllByWalletIdSync(List objects, - {bool saveLinks = true}) { + List putAllByWalletIdSync( + List objects, { + bool saveLinks = true, + }) { return putAllByIndexSync(r'walletId', objects, saveLinks: saveLinks); } } @@ -186,17 +193,16 @@ extension WalletInfoMetaQueryWhereSort extension WalletInfoMetaQueryWhere on QueryBuilder { QueryBuilder idEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: id, - upper: id, - )); + return query.addWhereClause(IdWhereClause.between(lower: id, upper: id)); }); } QueryBuilder idNotEqualTo( - Id id) { + Id id, + ) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query @@ -219,8 +225,9 @@ extension WalletInfoMetaQueryWhere } QueryBuilder idGreaterThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), @@ -229,8 +236,9 @@ extension WalletInfoMetaQueryWhere } QueryBuilder idLessThan( - Id id, - {bool include = false}) { + Id id, { + bool include = false, + }) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), @@ -245,56 +253,65 @@ extension WalletInfoMetaQueryWhere bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IdWhereClause.between( - lower: lowerId, - includeLower: includeLower, - upper: upperId, - includeUpper: includeUpper, - )); + return query.addWhereClause( + IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - walletIdEqualTo(String walletId) { + walletIdEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { - return query.addWhereClause(IndexWhereClause.equalTo( - indexName: r'walletId', - value: [walletId], - )); + return query.addWhereClause( + IndexWhereClause.equalTo(indexName: r'walletId', value: [walletId]), + ); }); } QueryBuilder - walletIdNotEqualTo(String walletId) { + walletIdNotEqualTo(String walletId) { return QueryBuilder.apply(this, (query) { if (query.whereSort == Sort.asc) { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ); } else { return query - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [walletId], - includeLower: false, - upper: [], - )) - .addWhereClause(IndexWhereClause.between( - indexName: r'walletId', - lower: [], - upper: [walletId], - includeUpper: false, - )); + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [walletId], + includeLower: false, + upper: [], + ), + ) + .addWhereClause( + IndexWhereClause.between( + indexName: r'walletId', + lower: [], + upper: [walletId], + includeUpper: false, + ), + ); } }); } @@ -303,40 +320,38 @@ extension WalletInfoMetaQueryWhere extension WalletInfoMetaQueryFilter on QueryBuilder { QueryBuilder idEqualTo( - Id value) { + Id value, + ) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'id', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'id', value: value), + ); }); } QueryBuilder - idGreaterThan( - Id value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'id', - value: value, - )); + idGreaterThan(Id value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + ), + ); }); } QueryBuilder - idLessThan( - Id value, { - bool include = false, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'id', - value: value, - )); + idLessThan(Id value, {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + ), + ); }); } @@ -347,74 +362,78 @@ extension WalletInfoMetaQueryFilter bool includeUpper = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'id', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + ), + ); }); } QueryBuilder - isMnemonicVerifiedEqualTo(bool value) { + isMnemonicVerifiedEqualTo(bool value) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'isMnemonicVerified', - value: value, - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'isMnemonicVerified', value: value), + ); }); } QueryBuilder - walletIdEqualTo( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdEqualTo(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.equalTo( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdGreaterThan( + walletIdGreaterThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.greaterThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdLessThan( + walletIdLessThan( String value, { bool include = false, bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.lessThan( - include: include, - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.lessThan( + include: include, + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdBetween( + walletIdBetween( String lower, String upper, { bool includeLower = true, @@ -422,84 +441,86 @@ extension WalletInfoMetaQueryFilter bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.between( - property: r'walletId', - lower: lower, - includeLower: includeLower, - upper: upper, - includeUpper: includeUpper, - caseSensitive: caseSensitive, - )); + return query.addFilterCondition( + FilterCondition.between( + property: r'walletId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdStartsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdStartsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.startsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdEndsWith( - String value, { - bool caseSensitive = true, - }) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdEndsWith(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.endsWith( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdContains(String value, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.contains( - property: r'walletId', - value: value, - caseSensitive: caseSensitive, - )); + walletIdContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.contains( + property: r'walletId', + value: value, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdMatches(String pattern, {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.matches( - property: r'walletId', - wildcard: pattern, - caseSensitive: caseSensitive, - )); + walletIdMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + FilterCondition.matches( + property: r'walletId', + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); }); } QueryBuilder - walletIdIsEmpty() { + walletIdIsEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.equalTo(property: r'walletId', value: ''), + ); }); } QueryBuilder - walletIdIsNotEmpty() { + walletIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletId', - value: '', - )); + return query.addFilterCondition( + FilterCondition.greaterThan(property: r'walletId', value: ''), + ); }); } } @@ -513,14 +534,14 @@ extension WalletInfoMetaQueryLinks extension WalletInfoMetaQuerySortBy on QueryBuilder { QueryBuilder - sortByIsMnemonicVerified() { + sortByIsMnemonicVerified() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isMnemonicVerified', Sort.asc); }); } QueryBuilder - sortByIsMnemonicVerifiedDesc() { + sortByIsMnemonicVerifiedDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isMnemonicVerified', Sort.desc); }); @@ -533,7 +554,7 @@ extension WalletInfoMetaQuerySortBy } QueryBuilder - sortByWalletIdDesc() { + sortByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -555,14 +576,14 @@ extension WalletInfoMetaQuerySortThenBy } QueryBuilder - thenByIsMnemonicVerified() { + thenByIsMnemonicVerified() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isMnemonicVerified', Sort.asc); }); } QueryBuilder - thenByIsMnemonicVerifiedDesc() { + thenByIsMnemonicVerifiedDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'isMnemonicVerified', Sort.desc); }); @@ -575,7 +596,7 @@ extension WalletInfoMetaQuerySortThenBy } QueryBuilder - thenByWalletIdDesc() { + thenByWalletIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'walletId', Sort.desc); }); @@ -585,14 +606,15 @@ extension WalletInfoMetaQuerySortThenBy extension WalletInfoMetaQueryWhereDistinct on QueryBuilder { QueryBuilder - distinctByIsMnemonicVerified() { + distinctByIsMnemonicVerified() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'isMnemonicVerified'); }); } - QueryBuilder distinctByWalletId( - {bool caseSensitive = true}) { + QueryBuilder distinctByWalletId({ + bool caseSensitive = true, + }) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive); }); @@ -608,7 +630,7 @@ extension WalletInfoMetaQueryProperty } QueryBuilder - isMnemonicVerifiedProperty() { + isMnemonicVerifiedProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'isMnemonicVerified'); }); diff --git a/lib/wallets/isar/providers/all_wallets_info_provider.dart b/lib/wallets/isar/providers/all_wallets_info_provider.dart index 2bdb932ca..bfa407611 100644 --- a/lib/wallets/isar/providers/all_wallets_info_provider.dart +++ b/lib/wallets/isar/providers/all_wallets_info_provider.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../app_config.dart'; import '../../../providers/db/main_db_provider.dart'; diff --git a/lib/wallets/isar/providers/eth/token_balance_provider.dart b/lib/wallets/isar/providers/eth/token_balance_provider.dart index 9a4f054a9..eb6a2a8e4 100644 --- a/lib/wallets/isar/providers/eth/token_balance_provider.dart +++ b/lib/wallets/isar/providers/eth/token_balance_provider.dart @@ -1,5 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../../models/balance.dart'; import '../../../../models/isar/models/isar_models.dart'; @@ -7,57 +7,55 @@ import '../../../../providers/db/main_db_provider.dart'; import '../../models/token_wallet_info.dart'; import '../util/watcher.dart'; -final _twiProvider = ChangeNotifierProvider.family( - (ref, data) { - final isar = ref.watch(mainDBProvider).isar; - - final collection = isar.tokenWalletInfo; - - TokenWalletInfo? initial = collection - .where() - .walletIdTokenAddressEqualTo(data.walletId, data.contractAddress) - .findFirstSync(); - - if (initial == null) { - initial = TokenWalletInfo( - walletId: data.walletId, - tokenAddress: data.contractAddress, - tokenFractionDigits: isar.ethContracts - .getByAddressSync(data.contractAddress) - ?.decimals ?? - 2, - ); +final _twiProvider = ChangeNotifierProvider.family< + Watcher, + ({String walletId, String contractAddress}) +>((ref, data) { + final isar = ref.watch(mainDBProvider).isar; + + final collection = isar.tokenWalletInfo; + + TokenWalletInfo? initial = + collection + .where() + .walletIdTokenAddressEqualTo(data.walletId, data.contractAddress) + .findFirstSync(); + + if (initial == null) { + initial = TokenWalletInfo( + walletId: data.walletId, + tokenAddress: data.contractAddress, + tokenFractionDigits: + isar.ethContracts.getByAddressSync(data.contractAddress)?.decimals ?? + 2, + ); - isar.writeTxnSync(() => isar.tokenWalletInfo.putSync(initial!)); - } + isar.writeTxnSync(() => isar.tokenWalletInfo.putSync(initial!)); + } - final watcher = Watcher( - initial, - collection: collection, - ); + final watcher = Watcher(initial, collection: collection); - ref.onDispose(() => watcher.dispose()); + ref.onDispose(() => watcher.dispose()); - return watcher; - }, -); + return watcher; +}); -final pTokenWalletInfo = Provider.family( - (ref, data) { - return ref.watch(_twiProvider(data).select((value) => value.value)) - as TokenWalletInfo; - }, -); +final pTokenWalletInfo = Provider.family< + TokenWalletInfo, + ({String walletId, String contractAddress}) +>((ref, data) { + return ref.watch(_twiProvider(data).select((value) => value.value)) + as TokenWalletInfo; +}); final pTokenBalance = - Provider.family( - (ref, data) { - return ref.watch( - _twiProvider(data).select( - (value) => (value.value as TokenWalletInfo).getCachedBalance(), - ), - ); - }, -); + Provider.family(( + ref, + data, + ) { + return ref.watch( + _twiProvider(data).select( + (value) => (value.value as TokenWalletInfo).getCachedBalance(), + ), + ); + }); diff --git a/lib/wallets/isar/providers/favourite_wallets_provider.dart b/lib/wallets/isar/providers/favourite_wallets_provider.dart index 8a0b2c0ef..78816a918 100644 --- a/lib/wallets/isar/providers/favourite_wallets_provider.dart +++ b/lib/wallets/isar/providers/favourite_wallets_provider.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../app_config.dart'; import '../../../providers/db/main_db_provider.dart'; diff --git a/lib/wallets/isar/providers/util/watcher.dart b/lib/wallets/isar/providers/util/watcher.dart index 0208baca0..43376a043 100644 --- a/lib/wallets/isar/providers/util/watcher.dart +++ b/lib/wallets/isar/providers/util/watcher.dart @@ -1,7 +1,8 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../isar_id_interface.dart'; class Watcher extends ChangeNotifier { @@ -11,10 +12,7 @@ class Watcher extends ChangeNotifier { T get value => _value; - Watcher( - this._value, { - required IsarCollection collection, - }) { + Watcher(this._value, {required IsarCollection collection}) { _streamSubscription = collection.watchObject(_value.id).listen((event) { if (event != null) { _value = event; diff --git a/lib/wallets/isar/providers/wallet_info_provider.dart b/lib/wallets/isar/providers/wallet_info_provider.dart index b4247dc6f..d6469879e 100644 --- a/lib/wallets/isar/providers/wallet_info_provider.dart +++ b/lib/wallets/isar/providers/wallet_info_provider.dart @@ -1,5 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/balance.dart'; import '../../../providers/db/main_db_provider.dart'; @@ -7,105 +7,102 @@ import '../../crypto_currency/crypto_currency.dart'; import '../models/wallet_info.dart'; import 'util/watcher.dart'; -final _wiProvider = ChangeNotifierProvider.family( - (ref, walletId) { - final collection = ref.watch(mainDBProvider).isar.walletInfo; +final _wiProvider = ChangeNotifierProvider.family(( + ref, + walletId, +) { + final collection = ref.watch(mainDBProvider).isar.walletInfo; - final watcher = Watcher( - collection.where().walletIdEqualTo(walletId).findFirstSync()!, - collection: collection, - ); + final watcher = Watcher( + collection.where().walletIdEqualTo(walletId).findFirstSync()!, + collection: collection, + ); - ref.onDispose(() => watcher.dispose()); + ref.onDispose(() => watcher.dispose()); - return watcher; - }, -); + return watcher; +}); -final pWalletInfo = Provider.family( - (ref, walletId) { - return ref.watch(_wiProvider(walletId)).value as WalletInfo; - }, -); +final pWalletInfo = Provider.family((ref, walletId) { + return ref.watch(_wiProvider(walletId)).value as WalletInfo; +}); -final pWalletCoin = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId).select((value) => (value.value as WalletInfo).coin), - ); - }, -); +final pWalletCoin = Provider.family((ref, walletId) { + return ref.watch( + _wiProvider(walletId).select((value) => (value.value as WalletInfo).coin), + ); +}); -final pWalletBalance = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId) - .select((value) => (value.value as WalletInfo).cachedBalance), - ); - }, -); +final pWalletBalance = Provider.family((ref, walletId) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).cachedBalance), + ); +}); -final pWalletBalanceSecondary = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId).select( - (value) => (value.value as WalletInfo).cachedBalanceSecondary, - ), - ); - }, -); +final pWalletBalanceSecondary = Provider.family(( + ref, + walletId, +) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).cachedBalanceSecondary), + ); +}); -final pWalletBalanceTertiary = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId) - .select((value) => (value.value as WalletInfo).cachedBalanceTertiary), - ); - }, -); +final pWalletBalanceTertiary = Provider.family(( + ref, + walletId, +) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).cachedBalanceTertiary), + ); +}); -final pWalletChainHeight = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId) - .select((value) => (value.value as WalletInfo).cachedChainHeight), - ); - }, -); +final pWalletChainHeight = Provider.family((ref, walletId) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).cachedChainHeight), + ); +}); -final pWalletIsFavourite = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId) - .select((value) => (value.value as WalletInfo).isFavourite), - ); - }, -); +final pWalletIsFavourite = Provider.family((ref, walletId) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).isFavourite), + ); +}); -final pWalletName = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId).select((value) => (value.value as WalletInfo).name), - ); - }, -); +final pWalletName = Provider.family((ref, walletId) { + return ref.watch( + _wiProvider(walletId).select((value) => (value.value as WalletInfo).name), + ); +}); -final pWalletReceivingAddress = Provider.family( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId).select( - (value) => (value.value as WalletInfo).cachedReceivingAddress, - ), - ); - }, -); +final pWalletReceivingAddress = Provider.family(( + ref, + walletId, +) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).cachedReceivingAddress), + ); +}); -final pWalletTokenAddresses = Provider.family, String>( - (ref, walletId) { - return ref.watch( - _wiProvider(walletId).select( - (value) => (value.value as WalletInfo).tokenContractAddresses, - ), - ); - }, -); +final pWalletTokenAddresses = Provider.family, String>(( + ref, + walletId, +) { + return ref.watch( + _wiProvider( + walletId, + ).select((value) => (value.value as WalletInfo).tokenContractAddresses), + ); +}); diff --git a/lib/wallets/models/tx_data.dart b/lib/wallets/models/tx_data.dart index 9a8dffd21..5db6d9483 100644 --- a/lib/wallets/models/tx_data.dart +++ b/lib/wallets/models/tx_data.dart @@ -1,5 +1,3 @@ -import 'package:cs_monero/cs_monero.dart' as lib_monero; -import 'package:cs_salvium/cs_salvium.dart' as lib_salvium; import 'package:tezart/tezart.dart' as tezart; import 'package:web3dart/web3dart.dart' as web3dart; @@ -10,6 +8,8 @@ import '../../models/paynym/paynym_account_lite.dart'; import '../../utilities/amount/amount.dart'; import '../../utilities/enums/fee_rate_type_enum.dart'; import '../../widgets/eth_fee_form.dart'; +import '../../wl_gen/interfaces/cs_monero_interface.dart' + show CsPendingTransaction; import '../isar/models/spark_coin.dart'; import 'name_op_state.dart'; import 'tx_recipient.dart'; @@ -67,10 +67,10 @@ class TxData { final int? nonce; final BigInt? chainId; // wownero and monero specific - final lib_monero.PendingTransaction? pendingTransaction; + final CsPendingTransaction? pendingTransaction; // salvium - final lib_salvium.PendingTransaction? pendingSalviumTransaction; + final CsPendingTransaction? pendingSalviumTransaction; // tezos specific final tezart.OperationsList? tezosOperationsList; @@ -100,6 +100,8 @@ class TxData { final TxType type; + final bool salviumStakeTx; + TxData({ this.feeRateType, this.feeRateAmount, @@ -135,6 +137,7 @@ class TxData { this.opNameState, this.sparkNameInfo, this.type = TxType.regular, + this.salviumStakeTx = false, }); Amount? get amount { @@ -169,10 +172,10 @@ class TxData { Amount? get amountSpark => sparkRecipients != null && sparkRecipients!.isNotEmpty - ? sparkRecipients! - .map((e) => e.amount) - .reduce((total, amount) => total += amount) - : null; + ? sparkRecipients! + .map((e) => e.amount) + .reduce((total, amount) => total += amount) + : null; Amount? get amountWithoutChange { if (recipients != null && recipients!.isNotEmpty) { @@ -230,10 +233,9 @@ class TxData { } } - int? get estimatedSatsPerVByte => - fee != null && vSize != null - ? (fee!.raw ~/ BigInt.from(vSize!)).toInt() - : null; + int? get estimatedSatsPerVByte => fee != null && vSize != null + ? (fee!.raw ~/ BigInt.from(vSize!)).toInt() + : null; TxData copyWith({ FeeRateType? feeRateType, @@ -259,8 +261,8 @@ class TxData { web3dart.Transaction? web3dartTransaction, int? nonce, BigInt? chainId, - lib_monero.PendingTransaction? pendingTransaction, - lib_salvium.PendingTransaction? pendingSalviumTransaction, + CsPendingTransaction? pendingTransaction, + CsPendingTransaction? pendingSalviumTransaction, int? jMintValue, List? spendCoinIndexes, int? height, diff --git a/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart b/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart index 95f015c01..00537b12b 100644 --- a/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart +++ b/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart @@ -1,12 +1,11 @@ import 'dart:async'; -import 'dart:ffi'; import 'dart:math'; import 'package:flutter/foundation.dart'; -import 'package:frostdart/frostdart.dart' as frost; -import 'package:frostdart/frostdart_bindings_generated.dart'; -import 'package:frostdart/util.dart'; -import 'package:isar/isar.dart'; +// import 'package:frostdart/frostdart.dart' as frost; +// import 'package:frostdart/frostdart_bindings_generated.dart'; +// import 'package:frostdart/util.dart'; +import 'package:isar_community/isar.dart'; import '../../../electrumx_rpc/cached_electrumx_client.dart'; import '../../../electrumx_rpc/electrumx_client.dart'; @@ -21,10 +20,10 @@ import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; import '../../../models/paymint/fee_object_model.dart'; import '../../../services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import '../../../services/event_bus/global_event_bus.dart'; -import '../../../services/frost.dart'; import '../../../utilities/amount/amount.dart'; import '../../../utilities/extensions/extensions.dart'; import '../../../utilities/logger.dart'; +import '../../../wl_gen/interfaces/frost_interface.dart'; import '../../crypto_currency/crypto_currency.dart'; import '../../crypto_currency/intermediate/frost_currency.dart'; import '../../isar/models/frost_wallet_info.dart'; @@ -40,11 +39,10 @@ class BitcoinFrostWallet extends Wallet BitcoinFrostWallet(CryptoCurrencyNetwork network) : super(BitcoinFrost(network) as T); - FrostWalletInfo get frostInfo => - mainDB.isar.frostWalletInfo - .where() - .walletIdEqualTo(walletId) - .findFirstSync()!; + FrostWalletInfo get frostInfo => mainDB.isar.frostWalletInfo + .where() + .walletIdEqualTo(walletId) + .findFirstSync()!; late ElectrumXClient electrumXClient; late CachedElectrumXClient electrumXCachedClient; @@ -61,7 +59,9 @@ class BitcoinFrostWallet extends Wallet Logging.instance.i("Generating new FROST wallet."); try { - final salt = frost.multisigSalt(multisigConfig: multisigConfig).toHex; + final salt = frostInterface + .getMultisigSalt(multisigConfig: multisigConfig) + .toHex; final FrostWalletInfo frostWalletInfo = FrostWalletInfo( walletId: info.walletId, @@ -90,14 +90,10 @@ class BitcoinFrostWallet extends Wallet serializedKeys: serializedKeys, secure: true, ); - } on FrostdartException catch (e) { - if (e.errorCode == 72) { - // rust doesn't like the addressDerivationData - index++; - continue; - } else { - rethrow; - } + } on FrostBadIndexException catch (_) { + // rust doesn't like the addressDerivationData + index++; + continue; } } @@ -125,24 +121,22 @@ class BitcoinFrostWallet extends Wallet .map((e) => e.amount) .reduce((value, e) => value += e); - final utxos = - await mainDB - .getUTXOs(walletId) - .filter() - .isBlockedEqualTo(false) - .findAll(); + final utxos = await mainDB + .getUTXOs(walletId) + .filter() + .isBlockedEqualTo(false) + .findAll(); if (utxos.isEmpty) { throw Exception("No UTXOs found"); } else { final currentHeight = await chainHeight; utxos.removeWhere( - (e) => - !e.isConfirmed( - currentHeight, - cryptoCurrency.minConfirms, - cryptoCurrency.minCoinbaseConfirms, - ), + (e) => !e.isConfirmed( + currentHeight, + cryptoCurrency.minConfirms, + cryptoCurrency.minCoinbaseConfirms, + ), ); if (utxos.isEmpty) { throw Exception("No confirmed UTXOs found"); @@ -174,10 +168,9 @@ class BitcoinFrostWallet extends Wallet } } - final int network = - cryptoCurrency.network == CryptoCurrencyNetwork.main - ? Network.Mainnet - : Network.Testnet; + final int network = cryptoCurrency.network == CryptoCurrencyNetwork.main + ? frostInterface.mainnet + : frostInterface.testnet; final List< ({ @@ -208,7 +201,7 @@ class BitcoinFrostWallet extends Wallet while (config == null) { try { - config = Frost.createSignConfig( + config = frostInterface.createSignConfig( network: network, inputs: inputs, outputs: txData.recipients!, @@ -216,9 +209,8 @@ class BitcoinFrostWallet extends Wallet feePerWeight: feePerWeight, serializedKeys: (await getSerializedKeys())!, ); - } on FrostdartException catch (e) { - if (e.errorCode == NOT_ENOUGH_FUNDS_ERROR && - utxosRemaining.isNotEmpty) { + } on FrostInsufficientFundsException catch (_) { + if (utxosRemaining.isNotEmpty) { // add extra utxo final utxo = utxosRemaining.take(1).first; final dData = await getDerivationData(utxo.address); @@ -281,17 +273,14 @@ class BitcoinFrostWallet extends Wallet } } - Future< - ({Pointer machinePtr, String preprocess}) - > + Future<({OpaqueWrapper machinePtr, String preprocess})> frostAttemptSignConfig({required String config}) async { - final int network = - cryptoCurrency.network == CryptoCurrencyNetwork.main - ? Network.Mainnet - : Network.Testnet; + final int network = cryptoCurrency.network == CryptoCurrencyNetwork.main + ? frostInterface.mainnet + : frostInterface.testnet; final serializedKeys = await getSerializedKeys(); - return Frost.attemptSignConfig( + return frostInterface.attemptSignConfig( network: network, config: config, serializedKeys: serializedKeys!, @@ -307,13 +296,15 @@ class BitcoinFrostWallet extends Wallet await _saveMultisigConfig(multisigConfig); await _updateThreshold( - frost.getThresholdFromKeys(serializedKeys: serializedKeys), + frostInterface.thresholdFromKeys(serializedKeys: serializedKeys), ); - final myNameIndex = frost.getParticipantIndexFromKeys( + final myNameIndex = frostInterface.participantIndexFromKeys( serializedKeys: serializedKeys, ); - final participants = Frost.getParticipants(multisigConfig: multisigConfig); + final participants = frostInterface.getParticipants( + multisigConfig: multisigConfig, + ); final myName = participants[myNameIndex]; await _updateParticipants(participants); @@ -409,16 +400,14 @@ class BitcoinFrostWallet extends Wallet await _fetchAddressesForElectrumXScan(); // Separate receiving and change addresses. - final Set receivingAddresses = - allAddressesOld - .where((e) => e.subType == AddressSubType.receiving) - .map((e) => e.value) - .toSet(); - final Set changeAddresses = - allAddressesOld - .where((e) => e.subType == AddressSubType.change) - .map((e) => e.value) - .toSet(); + final Set receivingAddresses = allAddressesOld + .where((e) => e.subType == AddressSubType.receiving) + .map((e) => e.value) + .toSet(); + final Set changeAddresses = allAddressesOld + .where((e) => e.subType == AddressSubType.change) + .map((e) => e.value) + .toSet(); // Remove duplicates. final allAddressesSet = {...receivingAddresses, ...changeAddresses}; @@ -433,13 +422,12 @@ class BitcoinFrostWallet extends Wallet final List> allTransactions = []; for (final txHash in allTxHashes) { - final storedTx = - await mainDB.isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .filter() - .txidEqualTo(txHash["tx_hash"] as String) - .findFirst(); + final storedTx = await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .txidEqualTo(txHash["tx_hash"] as String) + .findFirst(); if (storedTx == null || !storedTx.isConfirmed( @@ -766,21 +754,18 @@ class BitcoinFrostWallet extends Wallet numberOfBlocksFast: f, numberOfBlocksAverage: m, numberOfBlocksSlow: s, - fast: - Amount.fromDecimal( - fast, - fractionDigits: cryptoCurrency.fractionDigits, - ).raw, - medium: - Amount.fromDecimal( - medium, - fractionDigits: cryptoCurrency.fractionDigits, - ).raw, - slow: - Amount.fromDecimal( - slow, - fractionDigits: cryptoCurrency.fractionDigits, - ).raw, + fast: Amount.fromDecimal( + fast, + fractionDigits: cryptoCurrency.fractionDigits, + ).raw, + medium: Amount.fromDecimal( + medium, + fractionDigits: cryptoCurrency.fractionDigits, + ).raw, + slow: Amount.fromDecimal( + slow, + fractionDigits: cryptoCurrency.fractionDigits, + ).raw, ); Logging.instance.i("fetched fees: $feeObject"); @@ -827,8 +812,9 @@ class BitcoinFrostWallet extends Wallet try { await refreshMutex.protect(() async { if (!isRescan) { - final salt = - frost.multisigSalt(multisigConfig: multisigConfig!).toHex; + final salt = frostInterface + .getMultisigSalt(multisigConfig: multisigConfig!) + .toHex; final knownSalts = _getKnownSalts(); if (knownSalts.contains(salt)) { throw Exception("Known frost multisig salt found!"); @@ -1211,12 +1197,11 @@ class BitcoinFrostWallet extends Wallet // =================== DB ==================================================== - List _getKnownSalts() => - mainDB.isar.frostWalletInfo - .where() - .walletIdEqualTo(walletId) - .knownSaltsProperty() - .findFirstSync()!; + List _getKnownSalts() => mainDB.isar.frostWalletInfo + .where() + .walletIdEqualTo(walletId) + .knownSaltsProperty() + .findFirstSync()!; Future _updateKnownSalts(List knownSalts) async { final info = frostInfo; @@ -1229,12 +1214,11 @@ class BitcoinFrostWallet extends Wallet }); } - List _getParticipants() => - mainDB.isar.frostWalletInfo - .where() - .walletIdEqualTo(walletId) - .participantsProperty() - .findFirstSync()!; + List _getParticipants() => mainDB.isar.frostWalletInfo + .where() + .walletIdEqualTo(walletId) + .participantsProperty() + .findFirstSync()!; Future _updateParticipants(List participants) async { final info = frostInfo; @@ -1247,12 +1231,11 @@ class BitcoinFrostWallet extends Wallet }); } - int _getThreshold() => - mainDB.isar.frostWalletInfo - .where() - .walletIdEqualTo(walletId) - .thresholdProperty() - .findFirstSync()!; + int _getThreshold() => mainDB.isar.frostWalletInfo + .where() + .walletIdEqualTo(walletId) + .thresholdProperty() + .findFirstSync()!; Future _updateThreshold(int threshold) async { final info = frostInfo; @@ -1265,12 +1248,11 @@ class BitcoinFrostWallet extends Wallet }); } - String _getMyName() => - mainDB.isar.frostWalletInfo - .where() - .walletIdEqualTo(walletId) - .myNameProperty() - .findFirstSync()!; + String _getMyName() => mainDB.isar.frostWalletInfo + .where() + .walletIdEqualTo(walletId) + .myNameProperty() + .findFirstSync()!; Future _updateMyName(String myName) async { final info = frostInfo; @@ -1299,21 +1281,20 @@ class BitcoinFrostWallet extends Wallet // TODO [prio=low]: Use ElectrumXInterface method. Future _updateElectrumX() async { - final failovers = - nodeService - .failoverNodesFor(currency: cryptoCurrency) - .map( - (e) => ElectrumXNode( - address: e.host, - port: e.port, - name: e.name, - id: e.id, - useSSL: e.useSSL, - torEnabled: e.torEnabled, - clearnetEnabled: e.clearnetEnabled, - ), - ) - .toList(); + final failovers = nodeService + .failoverNodesFor(currency: cryptoCurrency) + .map( + (e) => ElectrumXNode( + address: e.host, + port: e.port, + name: e.name, + id: e.id, + useSSL: e.useSSL, + torEnabled: e.torEnabled, + clearnetEnabled: e.clearnetEnabled, + ), + ) + .toList(); final newNode = await _getCurrentElectrumXNode(); try { @@ -1477,10 +1458,9 @@ class BitcoinFrostWallet extends Wallet @override Future generateNewChangeAddress() async { final current = await getCurrentChangeAddress(); - int index = - current == null - ? kFrostSecureStartingIndex - : current.derivationIndex + 1; + int index = current == null + ? kFrostSecureStartingIndex + : current.derivationIndex + 1; const chain = 1; // change address final serializedKeys = (await getSerializedKeys())!; @@ -1494,14 +1474,10 @@ class BitcoinFrostWallet extends Wallet serializedKeys: serializedKeys, secure: true, ); - } on FrostdartException catch (e) { - if (e.errorCode == 72) { - // rust doesn't like the addressDerivationData - index++; - continue; - } else { - rethrow; - } + } on FrostBadIndexException catch (_) { + // rust doesn't like the addressDerivationData + index++; + continue; } } @@ -1511,10 +1487,9 @@ class BitcoinFrostWallet extends Wallet @override Future generateNewReceivingAddress() async { final current = await getCurrentReceivingAddress(); - int index = - current == null - ? kFrostSecureStartingIndex - : current.derivationIndex + 1; + int index = current == null + ? kFrostSecureStartingIndex + : current.derivationIndex + 1; const chain = 0; // receiving address final serializedKeys = (await getSerializedKeys())!; @@ -1528,14 +1503,10 @@ class BitcoinFrostWallet extends Wallet serializedKeys: serializedKeys, secure: true, ); - } on FrostdartException catch (e) { - if (e.errorCode == 72) { - // rust doesn't like the addressDerivationData - index++; - continue; - } else { - rethrow; - } + } on FrostBadIndexException catch (_) { + // rust doesn't like the addressDerivationData + index++; + continue; } } @@ -1627,14 +1598,10 @@ class BitcoinFrostWallet extends Wallet serializedKeys: serializedKeys, secure: true, ); - } on FrostdartException catch (e) { - if (e.errorCode == 72) { - // rust doesn't like the addressDerivationData - startingIndex++; - continue; - } else { - rethrow; - } + } on FrostBadIndexException catch (_) { + // rust doesn't like the addressDerivationData + startingIndex++; + continue; } } @@ -1657,13 +1624,12 @@ class BitcoinFrostWallet extends Wallet secure: secure, ); - final keys = frost.deserializeKeys(keys: serializedKeys); + final keys = frostInterface.getDeserializedKeys(keys: serializedKeys); - final addressString = frost.addressForKeys( - network: - cryptoCurrency.network == CryptoCurrencyNetwork.main - ? Network.Mainnet - : Network.Testnet, + final addressString = frostInterface.getAddressForKeys( + network: cryptoCurrency.network == CryptoCurrencyNetwork.main + ? frostInterface.mainnet + : frostInterface.testnet, keys: keys, addressDerivationData: addressDerivationData, secure: secure, @@ -1675,12 +1641,11 @@ class BitcoinFrostWallet extends Wallet publicKey: cryptoCurrency.addressToPubkey(address: addressString), derivationIndex: index, derivationPath: DerivationPath()..value = "$account/$change/$index", - subType: - change == 0 - ? AddressSubType.receiving - : change == 1 - ? AddressSubType.change - : AddressSubType.unknown, + subType: change == 0 + ? AddressSubType.receiving + : change == 1 + ? AddressSubType.change + : AddressSubType.unknown, type: AddressType.frostMS, zSafeFrost: secure && index >= kFrostSecureStartingIndex, ); @@ -1708,14 +1673,10 @@ class BitcoinFrostWallet extends Wallet serializedKeys: serializedKeys, secure: secure, ); - } on FrostdartException catch (e) { - if (e.errorCode == 72) { - // rust doesn't like the addressDerivationData - index++; - continue; - } else { - rethrow; - } + } on FrostBadIndexException catch (_) { + // rust doesn't like the addressDerivationData + index++; + continue; } } @@ -1746,18 +1707,17 @@ class BitcoinFrostWallet extends Wallet } Future> _fetchAddressesForElectrumXScan() async { - final allAddresses = - await mainDB - .getAddresses(walletId) - .filter() - .not() - .group( - (q) => q - .typeEqualTo(AddressType.nonWallet) - .or() - .subTypeEqualTo(AddressSubType.nonWallet), - ) - .findAll(); + final allAddresses = await mainDB + .getAddresses(walletId) + .filter() + .not() + .group( + (q) => q + .typeEqualTo(AddressType.nonWallet) + .or() + .subTypeEqualTo(AddressSubType.nonWallet), + ) + .findAll(); return allAddresses; } diff --git a/lib/wallets/wallet/impl/bitcoin_wallet.dart b/lib/wallets/wallet/impl/bitcoin_wallet.dart index 2ce942673..6361ec135 100644 --- a/lib/wallets/wallet/impl/bitcoin_wallet.dart +++ b/lib/wallets/wallet/impl/bitcoin_wallet.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../utilities/amount/amount.dart'; @@ -37,24 +37,29 @@ class BitcoinWallet extends Bip39HDWallet @override Future> fetchAddressesForElectrumXScan() async { - final allAddresses = await mainDB - .getAddresses(walletId) - .filter() - .not() - .group( - (q) => q - .typeEqualTo(AddressType.nonWallet) - .or() - .subTypeEqualTo(AddressSubType.nonWallet), - ) - .findAll(); + final allAddresses = + await mainDB + .getAddresses(walletId) + .filter() + .not() + .group( + (q) => q + .typeEqualTo(AddressType.nonWallet) + .or() + .subTypeEqualTo(AddressSubType.nonWallet), + ) + .findAll(); return allAddresses; } // =========================================================================== @override - Amount roughFeeEstimate(int inputCount, int outputCount, BigInt feeRatePerKB) { + Amount roughFeeEstimate( + int inputCount, + int outputCount, + BigInt feeRatePerKB, + ) { return Amount( rawValue: BigInt.from( ((42 + (272 * inputCount) + (128 * outputCount)) / 4).ceil() * @@ -68,6 +73,7 @@ class BitcoinWallet extends Bip39HDWallet int estimateTxFee({required int vSize, required BigInt feeRatePerKB}) { return vSize * (feeRatePerKB.toInt() / 1000).ceil(); } + // // @override // Future coinSelection({required TxData txData}) async { diff --git a/lib/wallets/wallet/impl/bitcoincash_wallet.dart b/lib/wallets/wallet/impl/bitcoincash_wallet.dart index cee690219..5edcbf9f7 100644 --- a/lib/wallets/wallet/impl/bitcoincash_wallet.dart +++ b/lib/wallets/wallet/impl/bitcoincash_wallet.dart @@ -1,5 +1,5 @@ import 'package:bitbox/bitbox.dart' as bitbox; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; diff --git a/lib/wallets/wallet/impl/cardano_wallet.dart b/lib/wallets/wallet/impl/cardano_wallet.dart index 5ae2d14a6..46544139e 100644 --- a/lib/wallets/wallet/impl/cardano_wallet.dart +++ b/lib/wallets/wallet/impl/cardano_wallet.dart @@ -6,11 +6,13 @@ import 'package:blockchain_utils/bip/cardano/cip1852/cip1852.dart'; import 'package:blockchain_utils/bip/cardano/cip1852/conf/cip1852_coins.dart'; import 'package:blockchain_utils/bip/cardano/mnemonic/cardano_icarus_seed_generator.dart'; import 'package:blockchain_utils/bip/cardano/shelley/cardano_shelley.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:on_chain/ada/ada.dart'; +import 'package:on_chain/ada/src/provider/exception/blockfrost_api_error.dart'; import 'package:socks5_proxy/socks.dart'; import 'package:tuple/tuple.dart'; +import '../../../app_config.dart'; import '../../../exceptions/wallet/node_tor_mismatch_config_exception.dart'; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -50,11 +52,10 @@ class CardanoWallet extends Bip39Wallet { ).change(Bip44Changes.chainExt).addressIndex(0); final paymentPublicKey = shelley.bip44.publicKey.compressed; final stakePublicKey = shelley.bip44Sk.publicKey.compressed; - final addressStr = - ADABaseAddress.fromPublicKey( - basePubkeyBytes: paymentPublicKey, - stakePubkeyBytes: stakePublicKey, - ).address; + final addressStr = ADABaseAddress.fromPublicKey( + basePubkeyBytes: paymentPublicKey, + stakePubkeyBytes: stakePublicKey, + ).address; return Address( walletId: walletId, value: addressStr, @@ -214,15 +215,14 @@ class CardanoWallet extends Bip39Wallet { } final body = TransactionBody( - inputs: - listOfUtxosToBeUsed - .map( - (e) => TransactionInput( - transactionId: TransactionHash.fromHex(e.txHash), - index: e.outputIndex, - ), - ) - .toList(), + inputs: listOfUtxosToBeUsed + .map( + (e) => TransactionInput( + transactionId: TransactionHash.fromHex(e.txHash), + index: e.outputIndex, + ), + ) + .toList(), outputs: [ change, TransactionOutput( @@ -363,15 +363,14 @@ class CardanoWallet extends Bip39Wallet { ]; } final body = TransactionBody( - inputs: - listOfUtxosToBeUsed - .map( - (e) => TransactionInput( - transactionId: TransactionHash.fromHex(e.txHash), - index: e.outputIndex, - ), - ) - .toList(), + inputs: listOfUtxosToBeUsed + .map( + (e) => TransactionInput( + transactionId: TransactionHash.fromHex(e.txHash), + index: e.outputIndex, + ), + ) + .toList(), outputs: outputs, fee: txData.fee!.raw, ); @@ -420,19 +419,45 @@ class CardanoWallet extends Bip39Wallet { }); } + Future _checkAddressIsFound() async { + try { + await blockfrostProvider!.request( + BlockfrostRequestSpecificAddress( + ADAAddress.fromAddress((await getCurrentReceivingAddress())!.value), + ), + ); + return true; + } on BlockfrostError catch (e, s) { + if (e.statusCode == 404 && e.error == "Not found") { + Logging.instance.i( + "Ada address not seen on network yet", + error: e, + stackTrace: s, + ); + return false; + } else { + rethrow; + } + } + } + @override Future updateBalance() async { try { await updateProvider(); - final addressUtxos = await blockfrostProvider!.request( - BlockfrostRequestAddressUTXOsOfAGivenAsset( - address: ADAAddress.fromAddress( - (await getCurrentReceivingAddress())!.value, - ), - asset: "lovelace", - ), - ); + final addressExists = await _checkAddressIsFound(); + + final addressUtxos = addressExists + ? await blockfrostProvider!.request( + BlockfrostRequestAddressUTXOsOfAGivenAsset( + address: ADAAddress.fromAddress( + (await getCurrentReceivingAddress())!.value, + ), + asset: "lovelace", + ), + ) + : []; BigInt totalBalanceInLovelace = BigInt.parse("0"); for (final utxo in addressUtxos) { @@ -500,13 +525,17 @@ class CardanoWallet extends Bip39Wallet { try { await updateProvider(); + final addressExists = await _checkAddressIsFound(); + final currentAddr = (await getCurrentReceivingAddress())!.value; - final txsList = await blockfrostProvider!.request( - BlockfrostRequestAddressTransactions( - ADAAddress.fromAddress(currentAddr), - ), - ); + final txsList = addressExists + ? await blockfrostProvider!.request( + BlockfrostRequestAddressTransactions( + ADAAddress.fromAddress(currentAddr), + ), + ) + : []; final parsedTxsList = List>.empty( growable: true, @@ -582,11 +611,10 @@ class CardanoWallet extends Bip39Wallet { type: txType, subType: isar.TransactionSubType.none, amount: amount, - amountString: - Amount( - rawValue: BigInt.from(amount), - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), + amountString: Amount( + rawValue: BigInt.from(amount), + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), fee: int.parse(txInfo.fees), height: txInfo.blockHeight, isCancelled: false, @@ -606,10 +634,9 @@ class CardanoWallet extends Bip39Wallet { derivationIndex: 0, derivationPath: DerivationPath()..value = _addressDerivationPath, type: AddressType.cardanoShelley, - subType: - txType == isar.TransactionType.outgoing - ? AddressSubType.unknown - : AddressSubType.receiving, + subType: txType == isar.TransactionType.outgoing + ? AddressSubType.unknown + : AddressSubType.receiving, ); parsedTxsList.add(Tuple2(transaction, txAddress)); @@ -637,7 +664,7 @@ class CardanoWallet extends Bip39Wallet { final currentNode = getCurrentNode(); final client = HttpClient(); - if (prefs.useTor) { + if (AppConfig.hasFeature(AppFeature.tor) && prefs.useTor) { final proxyInfo = TorService.sharedInstance.getProxyInfo(); final proxySettings = ProxySettings(proxyInfo.host, proxyInfo.port); SocksTCPClient.assignToHttpClient(client, [proxySettings]); @@ -667,17 +694,19 @@ class CustomBlockForestProvider extends BlockforestProvider { BlockforestRequestParam request, [ Duration? timeout, ]) async { - if (prefs.useTor) { - if (netOption == TorPlainNetworkOption.clear) { - throw NodeTorMismatchConfigException( - message: "TOR enabled but node set to clearnet only", - ); - } - } else { - if (netOption == TorPlainNetworkOption.tor) { - throw NodeTorMismatchConfigException( - message: "TOR off but node set to TOR only", - ); + if (AppConfig.hasFeature(AppFeature.tor)) { + if (prefs.useTor) { + if (netOption == TorPlainNetworkOption.clear) { + throw NodeTorMismatchConfigException( + message: "TOR enabled but node set to clearnet only", + ); + } + } else { + if (netOption == TorPlainNetworkOption.tor) { + throw NodeTorMismatchConfigException( + message: "TOR off but node set to TOR only", + ); + } } } diff --git a/lib/wallets/wallet/impl/dash_wallet.dart b/lib/wallets/wallet/impl/dash_wallet.dart index f9a90d5b8..9d39bd26f 100644 --- a/lib/wallets/wallet/impl/dash_wallet.dart +++ b/lib/wallets/wallet/impl/dash_wallet.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; diff --git a/lib/wallets/wallet/impl/dogecoin_wallet.dart b/lib/wallets/wallet/impl/dogecoin_wallet.dart index da24c5a9d..01a1eed40 100644 --- a/lib/wallets/wallet/impl/dogecoin_wallet.dart +++ b/lib/wallets/wallet/impl/dogecoin_wallet.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; diff --git a/lib/wallets/wallet/impl/ecash_wallet.dart b/lib/wallets/wallet/impl/ecash_wallet.dart index aacdc4f31..4a72b2b94 100644 --- a/lib/wallets/wallet/impl/ecash_wallet.dart +++ b/lib/wallets/wallet/impl/ecash_wallet.dart @@ -1,5 +1,5 @@ import 'package:bitbox/bitbox.dart' as bitbox; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; diff --git a/lib/wallets/wallet/impl/epiccash_wallet.dart b/lib/wallets/wallet/impl/epiccash_wallet.dart index ea6654b12..a734626f4 100644 --- a/lib/wallets/wallet/impl/epiccash_wallet.dart +++ b/lib/wallets/wallet/impl/epiccash_wallet.dart @@ -3,9 +3,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:decimal/decimal.dart'; -import 'package:flutter_libepiccash/lib.dart' as epiccash; -import 'package:flutter_libepiccash/models/transaction.dart' as epic_models; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; import 'package:stack_wallet_backup/generate_password.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; @@ -33,6 +31,7 @@ import '../../../utilities/logger.dart'; import '../../../utilities/stack_file_system.dart'; import '../../../utilities/test_epic_box_connection.dart'; import '../../../utilities/tor_plain_net_option_enum.dart'; +import '../../../wl_gen/interfaces/libepiccash_interface.dart'; import '../../crypto_currency/crypto_currency.dart'; import '../../models/tx_data.dart'; import '../intermediate/bip39_wallet.dart'; @@ -86,10 +85,11 @@ class EpiccashWallet extends Bip39Wallet { Future cancelPendingTransactionAndPost(String txSlateId) async { try { _hackedCheckTorNodePrefs(); - final String wallet = - (await secureStorageInterface.read(key: '${walletId}_wallet'))!; + final String wallet = (await secureStorageInterface.read( + key: '${walletId}_wallet', + ))!; - final result = await epiccash.LibEpiccash.cancelTransaction( + final result = await libEpic.cancelTransaction( wallet: wallet, transactionId: txSlateId, ); @@ -178,7 +178,7 @@ class EpiccashWallet extends Bip39Wallet { _hackedCheckTorNodePrefs(); final available = info.cachedBalance.spendable.raw.toInt(); - final transactionFees = await epiccash.LibEpiccash.getTransactionFees( + final transactionFees = await libEpic.getTransactionFees( wallet: wallet!, amount: satoshiAmount, minimumConfirmations: cryptoCurrency.minConfirms, @@ -187,8 +187,9 @@ class EpiccashWallet extends Bip39Wallet { int realFee = 0; try { - realFee = - (Decimal.parse(transactionFees.fee.toString())).toBigInt().toInt(); + realFee = (Decimal.parse( + transactionFees.fee.toString(), + )).toBigInt().toInt(); } catch (e, s) { //todo: come back to this Logging.instance.e("Error getting fees", error: e, stackTrace: s); @@ -208,7 +209,7 @@ class EpiccashWallet extends Bip39Wallet { if (!syncMutex.isLocked) { await syncMutex.protect(() async { // How does getWalletBalances start syncing???? - await epiccash.LibEpiccash.getWalletBalances( + await libEpic.getWalletBalances( wallet: wallet!, refreshFromNode: refreshFromNode, minimumConfirmations: 10, @@ -231,7 +232,7 @@ class EpiccashWallet extends Bip39Wallet { _hackedCheckTorNodePrefs(); final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); const refreshFromNode = 0; - return await epiccash.LibEpiccash.getWalletBalances( + return await libEpic.getWalletBalances( wallet: wallet!, refreshFromNode: refreshFromNode, minimumConfirmations: cryptoCurrency.minConfirms, @@ -329,7 +330,7 @@ class EpiccashWallet extends Bip39Wallet { ) async { final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); - final walletAddress = await epiccash.LibEpiccash.getAddressInfo( + final walletAddress = await libEpic.getAddressInfo( wallet: wallet!, index: index, epicboxConfig: epicboxConfig.toString(), @@ -353,7 +354,7 @@ class EpiccashWallet extends Bip39Wallet { Future _startScans() async { try { //First stop the current listener - epiccash.LibEpiccash.stopEpicboxListener(); + libEpic.stopEpicboxListener(); final wallet = await secureStorageInterface.read( key: '${walletId}_wallet', ); @@ -375,7 +376,7 @@ class EpiccashWallet extends Bip39Wallet { "chainHeight: $chainHeight, lastScannedBlock: $lastScannedBlock", ); - final int nextScannedBlock = await epiccash.LibEpiccash.scanOutputs( + final int nextScannedBlock = await libEpic.scanOutputs( wallet: wallet!, startHeight: lastScannedBlock, numberOfBlocks: scanChunkSize, @@ -408,7 +409,7 @@ class EpiccashWallet extends Bip39Wallet { Logging.instance.d("STARTING WALLET LISTENER ...."); final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); final EpicBoxConfigModel epicboxConfig = await getEpicBoxConfig(); - epiccash.LibEpiccash.startEpicboxListener( + libEpic.startEpicboxListener( wallet: wallet!, epicboxConfig: epicboxConfig.toString(), ); @@ -492,7 +493,7 @@ class EpiccashWallet extends Bip39Wallet { final String name = walletId; - await epiccash.LibEpiccash.initializeNewWallet( + await libEpic.initializeNewWallet( config: stringConfig, mnemonic: mnemonicString, password: password, @@ -500,7 +501,7 @@ class EpiccashWallet extends Bip39Wallet { ); //Open wallet - encodedWallet = await epiccash.LibEpiccash.openWallet( + encodedWallet = await libEpic.openWallet( config: stringConfig, password: password, ); @@ -542,7 +543,7 @@ class EpiccashWallet extends Bip39Wallet { key: '${walletId}_password', ); - final walletOpen = await epiccash.LibEpiccash.openWallet( + final walletOpen = await libEpic.openWallet( config: config, password: password!, ); @@ -591,7 +592,7 @@ class EpiccashWallet extends Bip39Wallet { if (receiverAddress.startsWith("http://") || receiverAddress.startsWith("https://")) { - transaction = await epiccash.LibEpiccash.txHttpSend( + transaction = await libEpic.txHttpSend( wallet: wallet!, selectionStrategyIsAll: 0, minimumConfirmations: cryptoCurrency.minConfirms, @@ -600,7 +601,7 @@ class EpiccashWallet extends Bip39Wallet { address: txData.recipients!.first.address, ); } else { - transaction = await epiccash.LibEpiccash.createTransaction( + transaction = await libEpic.createTransaction( wallet: wallet!, amount: txData.recipients!.first.amount.raw.toInt(), address: txData.recipients!.first.address, @@ -694,7 +695,7 @@ class EpiccashWallet extends Bip39Wallet { value: epicboxConfig.toString(), ); - await epiccash.LibEpiccash.recoverWallet( + await libEpic.recoverWallet( config: stringConfig, password: password, mnemonic: await getMnemonic(), @@ -717,7 +718,7 @@ class EpiccashWallet extends Bip39Wallet { ); //Open Wallet - final walletOpen = await epiccash.LibEpiccash.openWallet( + final walletOpen = await libEpic.openWallet( config: stringConfig, password: password, ); @@ -905,20 +906,19 @@ class EpiccashWallet extends Bip39Wallet { ); const refreshFromNode = 1; - final myAddresses = - await mainDB - .getAddresses(walletId) - .filter() - .typeEqualTo(AddressType.mimbleWimble) - .and() - .subTypeEqualTo(AddressSubType.receiving) - .and() - .valueIsNotEmpty() - .valueProperty() - .findAll(); + final myAddresses = await mainDB + .getAddresses(walletId) + .filter() + .typeEqualTo(AddressType.mimbleWimble) + .and() + .subTypeEqualTo(AddressSubType.receiving) + .and() + .valueIsNotEmpty() + .valueProperty() + .findAll(); final myAddressesSet = myAddresses.toSet(); - final transactions = await epiccash.LibEpiccash.getTransactions( + final transactions = await libEpic.getTransactions( wallet: wallet!, refreshFromNode: refreshFromNode, ); @@ -929,12 +929,12 @@ class EpiccashWallet extends Bip39Wallet { for (final tx in transactions) { final isIncoming = - tx.txType == epic_models.TransactionType.TxReceived || - tx.txType == epic_models.TransactionType.TxReceivedCancelled; + libEpic.txTypeIsReceived(tx.txType) || + libEpic.txTypeIsReceiveCancelled(tx.txType); final slateId = tx.txSlateId; final commitId = slatesToCommits[slateId]?['commitId'] as String?; - final numberOfMessages = tx.messages?.messages.length; - final onChainNote = tx.messages?.messages[0].message; + final numberOfMessages = tx.messages?.length; + final onChainNote = tx.messages?.first.message; final addressFrom = slatesToCommits[slateId]?["from"] as String?; final addressTo = slatesToCommits[slateId]?["to"] as String?; @@ -994,13 +994,12 @@ class EpiccashWallet extends Bip39Wallet { "slateId": slateId, "onChainNote": onChainNote, "isCancelled": - tx.txType == epic_models.TransactionType.TxSentCancelled || - tx.txType == epic_models.TransactionType.TxReceivedCancelled, - "overrideFee": - Amount( - rawValue: BigInt.from(fee), - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), + libEpic.txTypeIsSentCancelled(tx.txType) || + libEpic.txTypeIsReceiveCancelled(tx.txType), + "overrideFee": Amount( + rawValue: BigInt.from(fee), + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), }; final txn = TransactionV2( @@ -1087,9 +1086,7 @@ class EpiccashWallet extends Bip39Wallet { Future updateChainHeight() async { _hackedCheckTorNodePrefs(); final config = await _getRealConfig(); - final latestHeight = await epiccash.LibEpiccash.getChainHeight( - config: config, - ); + final latestHeight = await libEpic.getChainHeight(config: config); await info.updateCachedChainHeight( newHeight: latestHeight, isar: mainDB.isar, @@ -1132,7 +1129,7 @@ class EpiccashWallet extends Bip39Wallet { @override Future exit() async { - epiccash.LibEpiccash.stopEpicboxListener(); + libEpic.stopEpicboxListener(); timer?.cancel(); timer = null; await super.exit(); @@ -1185,7 +1182,7 @@ Future deleteEpicWallet({ return "Tried to delete non existent epic wallet file with walletId=$walletId"; } else { try { - return epiccash.LibEpiccash.deleteWallet(wallet: wallet, config: config!); + return libEpic.deleteWallet(wallet: wallet, config: config!); } catch (e, s) { Logging.instance.e("$e\n$s", error: e, stackTrace: s); return "deleteEpicWallet($walletId) failed..."; diff --git a/lib/wallets/wallet/impl/ethereum_wallet.dart b/lib/wallets/wallet/impl/ethereum_wallet.dart index efb19bcbc..743d380e1 100644 --- a/lib/wallets/wallet/impl/ethereum_wallet.dart +++ b/lib/wallets/wallet/impl/ethereum_wallet.dart @@ -4,7 +4,7 @@ import 'dart:convert'; import 'package:decimal/decimal.dart'; import 'package:ethereum_addresses/ethereum_addresses.dart'; import 'package:http/http.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:web3dart/json_rpc.dart' show RPCError; import 'package:web3dart/web3dart.dart' as web3; diff --git a/lib/wallets/wallet/impl/fact0rn_wallet.dart b/lib/wallets/wallet/impl/fact0rn_wallet.dart index 14a9d4be8..0f6a93d0d 100644 --- a/lib/wallets/wallet/impl/fact0rn_wallet.dart +++ b/lib/wallets/wallet/impl/fact0rn_wallet.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; diff --git a/lib/wallets/wallet/impl/firo_wallet.dart b/lib/wallets/wallet/impl/firo_wallet.dart index 0bb1b1fed..e55052e90 100644 --- a/lib/wallets/wallet/impl/firo_wallet.dart +++ b/lib/wallets/wallet/impl/firo_wallet.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'dart:math'; import 'package:decimal/decimal.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/sqlite/firo_cache.dart'; import '../../../models/isar/models/blockchain_data/v2/input_v2.dart'; diff --git a/lib/wallets/wallet/impl/litecoin_wallet.dart b/lib/wallets/wallet/impl/litecoin_wallet.dart index 76205c252..db497a904 100644 --- a/lib/wallets/wallet/impl/litecoin_wallet.dart +++ b/lib/wallets/wallet/impl/litecoin_wallet.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../db/drift/database.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -361,6 +361,10 @@ class LitecoinWallet } await mainDB.updateOrPutTransactionV2s(txns); + + if (info.isMwebEnabled) { + await checkMwebSpends(); + } } @override diff --git a/lib/wallets/wallet/impl/mimblewimblecoin_wallet.dart b/lib/wallets/wallet/impl/mimblewimblecoin_wallet.dart new file mode 100644 index 000000000..3850cb750 --- /dev/null +++ b/lib/wallets/wallet/impl/mimblewimblecoin_wallet.dart @@ -0,0 +1,1598 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:decimal/decimal.dart'; +import 'package:flutter/foundation.dart'; +import 'package:isar_community/isar.dart'; +import 'package:mutex/mutex.dart'; +import 'package:stack_wallet_backup/generate_password.dart'; + +import '../../../models/balance.dart'; +import '../../../models/isar/models/blockchain_data/address.dart'; +import '../../../models/isar/models/blockchain_data/transaction.dart'; +import '../../../models/isar/models/blockchain_data/v2/input_v2.dart'; +import '../../../models/isar/models/blockchain_data/v2/output_v2.dart'; +import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; +import '../../../models/mwc_slatepack_models.dart'; +import '../../../models/mwcmqs_config_model.dart'; +import '../../../models/node_model.dart'; +import '../../../models/paymint/fee_object_model.dart'; +import '../../../pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart'; +import '../../../services/event_bus/events/global/blocks_remaining_event.dart'; +import '../../../services/event_bus/events/global/node_connection_status_changed_event.dart'; +import '../../../services/event_bus/events/global/refresh_percent_changed_event.dart'; +import '../../../services/event_bus/events/global/wallet_sync_status_changed_event.dart'; +import '../../../services/event_bus/global_event_bus.dart'; +import '../../../utilities/amount/amount.dart'; +import '../../../utilities/default_mwcmqs.dart'; +import '../../../utilities/flutter_secure_storage_interface.dart'; +import '../../../utilities/logger.dart'; +import '../../../utilities/stack_file_system.dart'; +import '../../../utilities/test_mwcmqs_connection.dart'; +import '../../../wl_gen/interfaces/libmwc_interface.dart'; +import '../../crypto_currency/crypto_currency.dart'; +import '../../models/tx_data.dart'; +import '../intermediate/bip39_wallet.dart'; +import '../supporting/mimblewimblecoin_wallet_info_extension.dart'; + +class MimblewimblecoinWallet extends Bip39Wallet { + MimblewimblecoinWallet(CryptoCurrencyNetwork network) + : super(Mimblewimblecoin(network)); + + final syncMutex = Mutex(); + NodeModel? _mimblewimblecoinNode; + Timer? timer; + + double highestPercent = 0; + Future get getSyncPercent async { + final int lastScannedBlock = + info.mimblewimblecoinData?.lastScannedBlock ?? 0; + final _chainHeight = await chainHeight; + final double restorePercent = lastScannedBlock / _chainHeight; + GlobalEventBus.instance.fire( + RefreshPercentChangedEvent(highestPercent, walletId), + ); + if (restorePercent > highestPercent) { + highestPercent = restorePercent; + } + + final int blocksRemaining = _chainHeight - lastScannedBlock; + GlobalEventBus.instance.fire( + BlocksRemainingEvent(blocksRemaining, walletId), + ); + + return restorePercent < 0 ? 0.0 : restorePercent; + } + + Future updateMwcmqsConfig(String host, int port) async { + final String stringConfig = jsonEncode({ + "mwcmqs_domain": host, + "mwcmqs_port": port, + }); + await secureStorageInterface.write( + key: '${walletId}_mwcmqsConfig', + value: stringConfig, + ); + + // Restart MWCMQS listener with new configuration if wallet has a handle. + try { + final handle = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + if (handle != null && handle.isNotEmpty) { + await stopSlatepackListener(); + await startSlatepackListener(); + Logging.instance.i( + 'Restarted MWCMQS listener with new config: $host:$port', + ); + } + } catch (e, s) { + Logging.instance.e( + 'Failed to restart MWCMQS listener after config update: $e\n$s', + ); + } + } + + Future _ensureWalletOpen() async { + final existing = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + if (existing != null && existing.isNotEmpty) return existing; + + final config = await _getRealConfig(); + final password = await secureStorageInterface.read( + key: '${walletId}_password', + ); + if (password == null) { + throw Exception('Wallet password not found'); + } + final opened = await libMwc.openWallet(config: config, password: password); + await secureStorageInterface.write( + key: '${walletId}_wallet', + value: opened, + ); + return opened; + } + + /// Returns an empty String on success, error message on failure. + Future cancelPendingTransactionAndPost(String txSlateId) async { + try { + final String wallet = (await secureStorageInterface.read( + key: '${walletId}_wallet', + ))!; + + final result = await libMwc.cancelTransaction( + wallet: wallet, + transactionId: txSlateId, + ); + Logging.instance.i("cancel $txSlateId result: $result"); + return result; + } catch (e, s) { + Logging.instance.e("$e, $s"); + return e.toString(); + } + } + + Future getMwcMqsConfig() async { + // Check if there's a custom MWCMQS config stored. + final customConfigJson = await secureStorageInterface.read( + key: '${walletId}_mwcmqsConfig', + ); + + if (customConfigJson != null) { + try { + final customConfig = + jsonDecode(customConfigJson) as Map; + final host = customConfig['mwcmqs_domain'] as String?; + final port = customConfig['mwcmqs_port'] as int?; + + if (host != null && port != null) { + return MwcMqsConfigModel(host: host, port: port); + } + } catch (e) { + Logging.instance.w('Failed to parse custom MWCMQS config: $e'); + } + } + + // Fall back to default server. + return MwcMqsConfigModel.fromServer(DefaultMwcMqs.defaultMwcMqsServer); + } + + // ================= Slatepack Operations =================================== + + /// Create a slatepack for sending MWC. + Future createSlatepack({ + required Amount amount, + String? recipientAddress, + String? message, + bool encrypt = false, + int? minimumConfirmations, + }) async { + try { + final handle = await _ensureWalletOpen(); + + // Generate S1 slate JSON. + final s1Json = await libMwc.txInit( + wallet: handle, + amount: amount.raw.toInt(), + minimumConfirmations: + minimumConfirmations ?? cryptoCurrency.minConfirms, + selectionStrategyIsAll: false, + message: message ?? '', + ); + + // Encode to slatepack. + final encoded = await libMwc.encodeSlatepack( + slateJson: s1Json, + recipientAddress: recipientAddress, + encrypt: encrypt, + wallet: handle, + ); + + return SlatepackResult( + success: true, + slatepack: encoded.slatepack, + slateJson: s1Json, + wasEncrypted: encoded.wasEncrypted, + recipientAddress: encoded.recipientAddress, + ); + } catch (e, s) { + Logging.instance.e('Failed to create slatepack: $e\n$s'); + return SlatepackResult(success: false, error: e.toString()); + } + } + + // this isn't nearly the best way to handle this but better than copy pasting + // this function in two places (mobile and desktop widgets)... + Future<({SlatepackDecodeResult result, String type, String raw})?> + fullDecodeSlatepack(String slatepack) async { + // add delay for showloading exception catching hack fix + await Future.delayed(const Duration(seconds: 1)); + + if (slatepack.isEmpty) { + return null; + } + + // Basic format validation. + final coin = cryptoCurrency as Mimblewimblecoin; + if (!coin.isSlatepack(slatepack)) { + throw Exception("Invalid slatepack format"); + } + + // Attempt to decode. + final decoded = await decodeSlatepack(slatepack); + + if (decoded.success) { + final analysis = await analyzeSlatepack(slatepack); + + String _determineSlatepackType(SlatepackDecodeResult decoded) { + // Fallback analysis based on sender/recipient addresses. + if (decoded.senderAddress != null && decoded.recipientAddress != null) { + return "S2 (Response)"; + } else if (decoded.senderAddress != null) { + return "S1 (Initial)"; + } else { + return "Unknown"; + } + } + + final String slatepackType = switch (analysis.status) { + 'S1' => "S1 (Initial Send)", + 'S2' => "S2 (Response)", + 'S3' => "S3 (Finalized)", + _ => _determineSlatepackType(decoded), // Fallback. + }; + + return (result: decoded, type: slatepackType, raw: slatepack); + } else { + throw Exception(decoded.error ?? "Failed to decode slatepack"); + } + } + + /// Decode a slatepack. + Future decodeSlatepack(String slatepack) async { + try { + final handle = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + final result = handle != null + ? await libMwc.decodeSlatepackWithWallet( + wallet: handle, + slatepack: slatepack, + ) + : await libMwc.decodeSlatepack(slatepack: slatepack); + + return SlatepackDecodeResult( + success: true, + slateJson: result.slateJson, + wasEncrypted: result.wasEncrypted, + senderAddress: result.senderAddress, + recipientAddress: result.recipientAddress, + ); + } catch (e, s) { + Logging.instance.e('Failed to decode slatepack: $e\n$s'); + return SlatepackDecodeResult(success: false, error: e.toString()); + } + } + + /// Receive a slatepack and return response slatepack. + Future receiveSlatepack(String slatepack) async { + try { + final handle = await _ensureWalletOpen(); + + // Decode to get slate JSON and sender address. + final decoded = await libMwc.decodeSlatepackWithWallet( + wallet: handle, + slatepack: slatepack, + ); + + // Receive and get updated slate JSON. + final received = await libMwc.txReceiveDetailed( + wallet: handle, + slateJson: decoded.slateJson, + ); + + // Encode response back to sender if address available. + final encoded = await libMwc.encodeSlatepack( + slateJson: received.slateJson, + recipientAddress: decoded.senderAddress, + encrypt: decoded.senderAddress != null, + wallet: handle, + ); + + return ReceiveResult( + success: true, + slateId: received.slateId, + commitId: received.commitId, + responseSlatepack: encoded.slatepack, + wasEncrypted: encoded.wasEncrypted, + recipientAddress: decoded.senderAddress, + ); + } catch (e, s) { + Logging.instance.e('Failed to receive slatepack: $e\n$s'); + return ReceiveResult(success: false, error: e.toString()); + } + } + + /// Finalize a slatepack (sender step 3). + Future finalizeSlatepack(String slatepack) async { + try { + final handle = await _ensureWalletOpen(); + + // Decode to get slate JSON. + final decoded = await libMwc.decodeSlatepackWithWallet( + wallet: handle, + slatepack: slatepack, + ); + + // Finalize transaction. + final finalized = await libMwc.txFinalize( + wallet: handle, + slateJson: decoded.slateJson, + ); + + return FinalizeResult( + success: true, + slateId: finalized.slateId, + commitId: finalized.commitId, + ); + } catch (e, s) { + Logging.instance.e('Failed to finalize slatepack: $e\n$s'); + return FinalizeResult(success: false, error: e.toString()); + } + } + + /// Start MWCMQS listener for automatic transaction processing. + Future startSlatepackListener() async { + try { + await _ensureWalletOpen(); + final mwcmqsConfig = await getMwcMqsConfig(); + final wallet = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + libMwc.startMwcMqsListener( + wallet: wallet!, + mwcmqsConfig: mwcmqsConfig.toString(), + ); + } catch (e, s) { + Logging.instance.e('Failed to start slatepack listener: $e\n$s'); + rethrow; + } + } + + /// Stop MWCMQS listener. + Future stopSlatepackListener() async { + try { + libMwc.stopMwcMqsListener(); + } catch (e, s) { + Logging.instance.e('Failed to stop slatepack listener: $e\n$s'); + } + } + + /// Validate MWC address. + bool validateMwcAddress(String address) { + return libMwc.validateSendAddress(address: address); + } + + /// Detect if an address is a slatepack. + bool isSlatepack(String data) { + return data.trim().startsWith('BEGINSLATE') && + (data.trim().endsWith('ENDSLATEPACK') || + data.trim().endsWith('ENDSLATEPACK.') || + data.trim().endsWith('ENDSLATE_BIN') || + data.trim().endsWith('ENDSLATE_BIN.')); + } + + /// Detect if an address is MWCMQS format. + bool isMwcmqsAddress(String address) { + return address.startsWith('mwcmqs://'); + } + + /// Detect if an address is HTTP format. + bool isHttpAddress(String address) { + return address.startsWith('http://') || address.startsWith('https://'); + } + + /// Analyze a slatepack and determine transaction type and metadata. + /// Returns a record with transaction type and slate information. + Future< + ({ + String type, + String status, + String? amount, + bool wasEncrypted, + String? senderAddress, + String? recipientAddress, + String slateId, + }) + > + analyzeSlatepack(String slatepack) async { + try { + // Get wallet handle if available + final wallet = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + + // Decode the slatepack + final decoded = wallet != null + ? await libMwc.decodeSlatepackWithWallet( + wallet: wallet, + slatepack: slatepack, + ) + : await libMwc.decodeSlatepack(slatepack: slatepack); + + // Parse the slate JSON to extract metadata + final slateData = jsonDecode(decoded.slateJson); + final String slateId = "${slateData['id'] ?? ''}"; + final String? amountStr = slateData['amount']?.toString(); + + Logging.instance.d('Analyzed slatepack with ID: $slateId'); + + // Determine slate status from the slate structure + String status = 'Unknown'; + String type = 'Unknown'; + + // Check participant data to determine slate status + final List? participants = + slateData['participant_data'] as List?; + if (participants != null && participants.isNotEmpty) { + // Count how many participants have signatures + int signedParticipants = 0; + for (final participant in participants) { + if (participant['part_sig'] != null) { + signedParticipants++; + } + } + + // Determine status based on signatures and participant count + if (signedParticipants == 0) { + status = 'S1'; + type = 'Outgoing'; // Initial send slate - this is outgoing + } else if (signedParticipants == 1) { + status = 'S2'; + type = 'Incoming'; // Response slate - this means we're receiving + } else if (signedParticipants >= participants.length) { + status = 'S3'; + type = 'Outgoing'; // Finalized slate - completed outgoing transaction + } + } + + // Fallback: check for explicit 'sta' field (some slates may have this) + if (status == 'Unknown' && slateData['sta'] != null) { + status = "${slateData['sta']}"; + if (status == 'S1') { + type = 'Outgoing'; + } else if (status == 'S2') { + type = 'Incoming'; + } else if (status == 'S3') { + type = 'Outgoing'; + } + } + + return ( + type: type, + status: status, + amount: amountStr, + wasEncrypted: decoded.wasEncrypted, + senderAddress: decoded.senderAddress, + recipientAddress: decoded.recipientAddress, + slateId: slateId, + ); + } catch (e) { + // If we can't decode it, return unknown + return ( + type: 'Unknown', + status: 'Unknown', + amount: null, + wasEncrypted: false, + senderAddress: null, + recipientAddress: null, + slateId: '', + ); + } + } + + /// Improved transaction type detection for slatepacks. + /// This replaces "Unknown" types with better determined types based on slate analysis. + Future getSlatepackTransactionType(String address) async { + try { + // Check if the address is actually a slatepack + if (!isSlatepack(address)) { + return 'Unknown'; + } + + // Analyze the slatepack to determine the actual transaction type + final analysis = await analyzeSlatepack(address); + + // Map slate status to meaningful transaction types + switch (analysis.status) { + case 'S1': + return 'Outgoing'; // Initial send slate - this is outgoing + case 'S2': + return 'Incoming'; // Response slate - this means we're receiving + case 'S3': + return 'Outgoing'; // Finalized slate - completed outgoing transaction + default: + return analysis.type; // Fall back to our basic analysis + } + } catch (e) { + // If analysis fails, return Unknown + return 'Unknown'; + } + } + + /// Enhanced transaction type detection that can analyze slatepack transactions. + /// Use this method to improve "Unknown" transaction types after they're loaded. + Future getEnhancedTransactionType( + TransactionV2 transaction, + ) async { + try { + // If transaction is already properly typed, return as-is + if (transaction.type != TransactionType.unknown) { + return transaction.type; + } + + // Check if this is a MWC transaction with slatepack data + if (transaction.isMimblewimblecoinTransaction) { + // Try to analyze any slatepack addresses in the transaction + for (final output in transaction.outputs) { + for (final address in output.addresses) { + if (isSlatepack(address)) { + final slatepackType = await getSlatepackTransactionType(address); + switch (slatepackType) { + case 'Outgoing': + return TransactionType.outgoing; + case 'Incoming': + return TransactionType.incoming; + default: + continue; + } + } + } + } + } + + // If we can't determine a better type, return unknown + return TransactionType.unknown; + } catch (e) { + Logging.instance.w("Failed to enhance transaction type: $e"); + return transaction.type; + } + } + + // ================= Private ================================================= + + Future _getConfig() async { + if (_mimblewimblecoinNode == null) { + await updateNode(); + } + final NodeModel node = _mimblewimblecoinNode!; + final String nodeAddress = node.host; + final int port = node.port; + + final uri = Uri.parse(nodeAddress).replace(port: port); + + final String nodeApiAddress = uri.toString(); + final walletDir = await _currentWalletDirPath(); + + final Map config = {}; + config["wallet_dir"] = walletDir; + config["check_node_api_http_addr"] = nodeApiAddress; + config["chain"] = "mainnet"; + config["account"] = "default"; + final String stringConfig = jsonEncode(config); + return stringConfig; + } + + Future _currentWalletDirPath() async { + final Directory appDir = await StackFileSystem.applicationRootDirectory(); + + final path = "${appDir.path}/mimblewimblecoin"; + final String name = walletId.trim(); + return '$path/$name'; + } + + Future _nativeFee( + int satoshiAmount, { + bool ifErrorEstimateFee = false, + }) async { + final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); + try { + final available = info.cachedBalance.spendable.raw.toInt(); + final transactionFees = await libMwc.getTransactionFees( + wallet: wallet!, + amount: satoshiAmount, + minimumConfirmations: cryptoCurrency.minConfirms, + available: available, + ); + + int realFee = 0; + try { + realFee = (Decimal.parse( + transactionFees.fee.toString(), + )).toBigInt().toInt(); + } catch (e, s) { + //todo: come back to this + debugPrint("$e $s"); + } + return realFee; + } catch (e, s) { + Logging.instance.e("Error getting fees $e - $s"); + rethrow; + } + } + + Future _startSync() async { + Logging.instance.i("request start sync"); + final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); + const int refreshFromNode = 1; + if (!syncMutex.isLocked) { + await syncMutex.protect(() async { + // How does getWalletBalances start syncing???? + await libMwc.getWalletBalances( + wallet: wallet!, + refreshFromNode: refreshFromNode, + minimumConfirmations: 10, + ); + }); + } else { + Logging.instance.i("request start sync denied"); + } + } + + Future< + ({ + double awaitingFinalization, + double pending, + double spendable, + double total, + }) + > + _allWalletBalances() async { + final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); + const refreshFromNode = 0; + return await libMwc.getWalletBalances( + wallet: wallet!, + refreshFromNode: refreshFromNode, + minimumConfirmations: cryptoCurrency.minConfirms, + ); + } + + Future _putSendToAddresses( + ({String slateId, String commitId}) slateData, + Map txAddressInfo, + ) async { + try { + final slatesToCommits = info.mimblewimblecoinData?.slatesToCommits ?? {}; + final from = txAddressInfo['from']; + final to = txAddressInfo['to']; + slatesToCommits[slateData.slateId] = { + "commitId": slateData.commitId, + "from": from, + "to": to, + }; + await info.updateExtraMimblewimblecoinWalletInfo( + mimblewimblecoinData: info.mimblewimblecoinData!.copyWith( + slatesToCommits: slatesToCommits, + ), + isar: mainDB.isar, + ); + return true; + } catch (e, s) { + Logging.instance.e("ERROR STORING ADDRESS $e $s"); + return false; + } + } + + Future _getCurrentIndex() async { + try { + final int receivingIndex = info.mimblewimblecoinData!.receivingIndex; + // TODO: go through pendingarray and processed array and choose the index + // of the last one that has not been processed, or the index after the one most recently processed; + return receivingIndex; + } catch (e, s) { + Logging.instance.e("$e $s"); + return 0; + } + } + + Future

_generateAndStoreReceivingAddressForIndex(int index) async { + Address? address = await getCurrentReceivingAddress(); + + if (address == null) { + final mwcmqsConfig = await getMwcMqsConfig(); + address = await thisWalletAddress(index, mwcmqsConfig); + } + + if (info.cachedReceivingAddress != address.value) { + await info.updateReceivingAddress( + newAddress: address.value, + isar: mainDB.isar, + ); + } + return address; + } + + Future
thisWalletAddress( + int index, + MwcMqsConfigModel mwcmqsConfig, + ) async { + final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); + + final walletAddress = await libMwc.getAddressInfo( + wallet: wallet!, + index: index, + ); + + Logging.instance.i("WALLET_ADDRESS_IS $walletAddress"); + + final address = Address( + walletId: walletId, + value: walletAddress, + derivationIndex: index, + derivationPath: null, + type: AddressType.mimbleWimble, + subType: AddressSubType.receiving, + publicKey: [], // ?? + ); + await mainDB.updateOrPutAddresses([address]); + return address; + } + + Future _startScans() async { + try { + //First stop the current listener + libMwc.stopMwcMqsListener(); + final wallet = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + + // max number of blocks to scan per loop iteration + const scanChunkSize = 10000; + + // force firing of scan progress event + await getSyncPercent; + + // fetch current chain height and last scanned block (should be the + // restore height if full rescan or a wallet restore) + int chainHeight = await this.chainHeight; + int lastScannedBlock = info.mimblewimblecoinData!.lastScannedBlock; + + // loop while scanning in chain in chunks (of blocks?) + while (lastScannedBlock < chainHeight) { + Logging.instance.i( + "chainHeight: $chainHeight, lastScannedBlock: $lastScannedBlock", + ); + + final int nextScannedBlock = await libMwc.scanOutputs( + wallet: wallet!, + startHeight: lastScannedBlock, + numberOfBlocks: scanChunkSize, + ); + + // update local cache + await info.updateExtraMimblewimblecoinWalletInfo( + mimblewimblecoinData: info.mimblewimblecoinData!.copyWith( + lastScannedBlock: nextScannedBlock, + ), + isar: mainDB.isar, + ); + + // force firing of scan progress event + await getSyncPercent; + + // update while loop condition variables + chainHeight = await this.chainHeight; + lastScannedBlock = nextScannedBlock; + } + + Logging.instance.i("_startScans successfully at the tip"); + //Once scanner completes restart listener + await _listenToMwcmqs(); + } catch (e, s) { + Logging.instance.e("_startScans failed: $e\n$s"); + rethrow; + } + } + + Future _listenToMwcmqs() async { + Logging.instance.i("STARTING WALLET LISTENER ...."); + final wallet = await secureStorageInterface.read(key: '${walletId}_wallet'); + final MwcMqsConfigModel mwcmqsConfig = await getMwcMqsConfig(); + libMwc.startMwcMqsListener( + wallet: wallet!, + mwcmqsConfig: mwcmqsConfig.toString(), + ); + } + + // As opposed to fake config? + Future _getRealConfig() async { + String? config = await secureStorageInterface.read( + key: '${walletId}_config', + ); + if (Platform.isIOS) { + final walletDir = await _currentWalletDirPath(); + final editConfig = jsonDecode(config as String); + + editConfig["wallet_dir"] = walletDir; + config = jsonEncode(editConfig); + } + return config!; + } + + int _calculateRestoreHeightFrom({required DateTime date}) { + final int secondsSinceEpoch = date.millisecondsSinceEpoch ~/ 1000; + const int mimblewimblecoinFirstBlock = 1565370278; + const double overestimateSecondsPerBlock = 61; + final int chosenSeconds = secondsSinceEpoch - mimblewimblecoinFirstBlock; + final int approximateHeight = chosenSeconds ~/ overestimateSecondsPerBlock; + int height = approximateHeight; + if (height < 0) { + height = 0; + } + return height; + } + + // ============== Overrides ================================================== + + @override + int get isarTransactionVersion => 2; + + @override + FilterOperation? get changeAddressFilterOperation => + FilterGroup.and(standardChangeAddressFilters); + + @override + FilterOperation? get receivingAddressFilterOperation => + FilterGroup.and(standardReceivingAddressFilters); + + @override + Future checkSaveInitialReceivingAddress() async { + // epiccash seems ok with nothing here? + } + + @override + Future init({bool? isRestore}) async { + if (isRestore != true) { + String? encodedWallet = await secureStorageInterface.read( + key: "${walletId}_wallet", + ); + + // check if should create a new wallet + if (encodedWallet == null) { + await updateNode(); + final mnemonicString = await getMnemonic(); + + final String password = generatePassword(); + final String stringConfig = await _getConfig(); + final MwcMqsConfigModel mwcmqsConfig = await getMwcMqsConfig(); + //if (!_logsInitialized) { + // await libMwc.initLogs(config: stringConfig); + // _logsInitialized = true; // Set flag to true after initializing + // } + await secureStorageInterface.write( + key: '${walletId}_config', + value: stringConfig, + ); + await secureStorageInterface.write( + key: '${walletId}_password', + value: password, + ); + await secureStorageInterface.write( + key: '${walletId}_mwcmqsConfig', + value: mwcmqsConfig.toString(), + ); + + final String name = walletId; + + await libMwc.initializeNewWallet( + config: stringConfig, + mnemonic: mnemonicString, + password: password, + name: name, + ); + + //Open wallet + encodedWallet = await libMwc.openWallet( + config: stringConfig, + password: password, + ); + await secureStorageInterface.write( + key: '${walletId}_wallet', + value: encodedWallet, + ); + //Store MwcMqs address info + await _generateAndStoreReceivingAddressForIndex(0); + + // subtract a couple days to ensure we have a buffer for SWB + final bufferedCreateHeight = _calculateRestoreHeightFrom( + date: DateTime.now().subtract(const Duration(days: 2)), + ); + + final mimblewimblecoinData = ExtraMimblewimblecoinWalletInfo( + receivingIndex: 0, + changeIndex: 0, + slatesToAddresses: {}, + slatesToCommits: {}, + lastScannedBlock: bufferedCreateHeight, + restoreHeight: bufferedCreateHeight, + creationHeight: bufferedCreateHeight, + ); + + await info.updateExtraMimblewimblecoinWalletInfo( + mimblewimblecoinData: mimblewimblecoinData, + isar: mainDB.isar, + ); + } else { + try { + final config = await _getRealConfig(); + //if (!_logsInitialized) { + // await libMwc.initLogs(config: config); + // _logsInitialized = true; // Set flag to true after initializing + //} + final password = await secureStorageInterface.read( + key: '${walletId}_password', + ); + + final walletOpen = await libMwc.openWallet( + config: config, + password: password!, + ); + await secureStorageInterface.write( + key: '${walletId}_wallet', + value: walletOpen, + ); + + await updateNode(); + } catch (e, s) { + // do nothing, still allow user into wallet + Logging.instance.e("$runtimeType init() failed: $e\n$s"); + } + } + } + + return await super.init(); + } + + @override + Future confirmSend({required TxData txData}) async { + try { + final wallet = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + final MwcMqsConfigModel mwcmqsConfig = await getMwcMqsConfig(); + + // TODO determine whether it is worth sending change to a change address. + + final String receiverAddress = txData.recipients!.first.address; + + //if (!receiverAddress.startsWith("http://") || + // !receiverAddress.startsWith("https://")) { + // final bool isMwcmqsConnected = await _testMwcmqsServer( + // mwcmqsConfig, + // ); + // if (!isMwcmqsConnected) { + // throw Exception( + // "Failed to send TX : Unable to reach mimblewimblecoin server"); + // } + //} + + ({String commitId, String slateId}) transaction; + + if (receiverAddress.startsWith("http://") || + receiverAddress.startsWith("https://")) { + transaction = await libMwc.txHttpSend( + wallet: wallet!, + selectionStrategyIsAll: 0, + minimumConfirmations: cryptoCurrency.minConfirms, + message: txData.noteOnChain ?? "", + amount: txData.recipients!.first.amount.raw.toInt(), + address: txData.recipients!.first.address, + ); + } else if (receiverAddress.startsWith("mwcmqs://")) { + transaction = await libMwc.createTransaction( + wallet: wallet!, + amount: txData.recipients!.first.amount.raw.toInt(), + address: txData.recipients!.first.address, + secretKeyIndex: 0, + mwcmqsConfig: mwcmqsConfig.toString(), + minimumConfirmations: cryptoCurrency.minConfirms, + note: txData.noteOnChain!, + ); + } else { + throw Exception( + "Unsupported address format: $receiverAddress. Please use a valid address.", + ); + } + + final Map txAddressInfo = {}; + txAddressInfo['from'] = (await getCurrentReceivingAddress())!.value; + txAddressInfo['to'] = txData.recipients!.first.address; + await _putSendToAddresses(transaction, txAddressInfo); + + return txData.copyWith(txid: transaction.slateId); + } catch (e, s) { + Logging.instance.e("Mimblewimblecoin confirmSend: $e\n$s"); + rethrow; + } + } + + @override + Future prepareSend({required TxData txData}) async { + try { + if (txData.recipients?.length != 1) { + throw Exception( + "Mimblewimblecoin prepare send requires a single recipient!", + ); + } + + TxRecipient recipient = txData.recipients!.first; + final String receiverAddress = recipient.address; + + // Check if this is a slatepack being provided instead of an address. + if (isSlatepack(receiverAddress)) { + // For slatepack input, we need different handling + // This would be used for receiving/finalizing slatepacks. + return txData.copyWith( + fee: Amount.zeroWith(fractionDigits: cryptoCurrency.fractionDigits), + otherData: jsonEncode({'isSlatepackInput': true}), + ); + } + + // For regular address-based sends, calculate fee + final int realFee = await _nativeFee(recipient.amount.raw.toInt()); + final feeAmount = Amount( + rawValue: BigInt.from(realFee), + fractionDigits: cryptoCurrency.fractionDigits, + ); + + if (feeAmount > info.cachedBalance.spendable) { + throw Exception( + "Mimblewimblecoin prepare send fee is greater than available balance!", + ); + } + + if (info.cachedBalance.spendable == recipient.amount) { + recipient = TxRecipient( + address: recipient.address, + amount: recipient.amount - feeAmount, + isChange: recipient.isChange, + addressType: AddressType.mimbleWimble, + ); + } + + // Determine transaction method based on address format. + String txMethod = 'unknown'; + if (isMwcmqsAddress(receiverAddress)) { + txMethod = 'mwcmqs'; + } else if (isHttpAddress(receiverAddress)) { + txMethod = 'http'; + } else if (validateMwcAddress(receiverAddress)) { + txMethod = 'slatepack'; // Manual slatepack exchange. + } + + return txData.copyWith( + recipients: [recipient], + fee: feeAmount, + otherData: jsonEncode({'transactionMethod': txMethod}), + ); + } catch (e, s) { + Logging.instance.e("Mimblewimblecoin prepareSend: $e\n$s"); + rethrow; + } + } + + @override + Future recover({required bool isRescan}) async { + try { + await refreshMutex.protect(() async { + if (isRescan) { + // clear blockchain info + await mainDB.deleteWalletBlockchainData(walletId); + + await info.updateExtraMimblewimblecoinWalletInfo( + mimblewimblecoinData: info.mimblewimblecoinData!.copyWith( + lastScannedBlock: info.mimblewimblecoinData!.restoreHeight, + ), + isar: mainDB.isar, + ); + + unawaited(_startScans()); + } else { + await updateNode(); + final String password = generatePassword(); + + final String stringConfig = await _getConfig(); + final MwcMqsConfigModel mwcmqsConfig = await getMwcMqsConfig(); + + await secureStorageInterface.write( + key: '${walletId}_config', + value: stringConfig, + ); + await secureStorageInterface.write( + key: '${walletId}_password', + value: password, + ); + + await secureStorageInterface.write( + key: '${walletId}_mwcmqsConfig', + value: mwcmqsConfig.toString(), + ); + + await libMwc.recoverWallet( + config: stringConfig, + password: password, + mnemonic: await getMnemonic(), + name: info.walletId, + ); + + final mimblewimblecoinData = ExtraMimblewimblecoinWalletInfo( + receivingIndex: 0, + changeIndex: 0, + slatesToAddresses: {}, + slatesToCommits: {}, + lastScannedBlock: info.restoreHeight, + restoreHeight: info.restoreHeight, + creationHeight: + info.mimblewimblecoinData?.creationHeight ?? info.restoreHeight, + ); + + await info.updateExtraMimblewimblecoinWalletInfo( + mimblewimblecoinData: mimblewimblecoinData, + isar: mainDB.isar, + ); + + //Open Wallet + final walletOpen = await libMwc.openWallet( + config: stringConfig, + password: password, + ); + await secureStorageInterface.write( + key: '${walletId}_wallet', + value: walletOpen, + ); + + await _generateAndStoreReceivingAddressForIndex( + mimblewimblecoinData.receivingIndex, + ); + } + }); + + unawaited(refresh()); + } catch (e, s) { + Logging.instance.i( + "Exception rethrown from electrumx_mixin recover(): $e\n$s", + ); + + rethrow; + } + } + + @override + Future refresh() async { + // Awaiting this lock could be dangerous. + // Since refresh is periodic (generally) + if (refreshMutex.isLocked) { + return; + } + + try { + // this acquire should be almost instant due to above check. + // Slight possibility of race but should be irrelevant + await refreshMutex.acquire(); + + GlobalEventBus.instance.fire( + WalletSyncStatusChangedEvent( + WalletSyncStatus.syncing, + walletId, + cryptoCurrency, + ), + ); + + // if (info.epicData?.creationHeight == null) { + // await info.updateExtraEpiccashWalletInfo(epicData: inf, isar: isar) + // await epicUpdateCreationHeight(await chainHeight); + // } + + // this will always be zero???? + final int curAdd = await _getCurrentIndex(); + await _generateAndStoreReceivingAddressForIndex(curAdd); + + await _startScans(); + + unawaited(_startSync()); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.0, walletId)); + await updateChainHeight(); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.1, walletId)); + + // if (this is MultiAddressInterface) { + // await (this as MultiAddressInterface) + // .checkReceivingAddressForTransactions(); + // } + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.2, walletId)); + + // // TODO: [prio=low] handle this differently. Extra modification of this file for coin specific functionality should be avoided. + // if (this is MultiAddressInterface) { + // await (this as MultiAddressInterface) + // .checkChangeAddressForTransactions(); + // } + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.3, walletId)); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.50, walletId)); + final fetchFuture = updateTransactions(); + // if (currentHeight != storedHeight) { + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.60, walletId)); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.70, walletId)); + + await fetchFuture; + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.80, walletId)); + + // await getAllTxsToWatch(); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.90, walletId)); + + await updateBalance(); + + GlobalEventBus.instance.fire(RefreshPercentChangedEvent(1.0, walletId)); + GlobalEventBus.instance.fire( + WalletSyncStatusChangedEvent( + WalletSyncStatus.synced, + walletId, + cryptoCurrency, + ), + ); + + if (shouldAutoSync) { + timer ??= Timer.periodic(const Duration(seconds: 150), (timer) async { + // chain height check currently broken + // if ((await chainHeight) != (await storedChainHeight)) { + + // TODO: [prio=med] some kind of quick check if wallet needs to refresh to replace the old refreshIfThereIsNewData call + // if (await refreshIfThereIsNewData()) { + unawaited(refresh()); + + // } + // } + }); + } + } catch (error, strace) { + GlobalEventBus.instance.fire( + NodeConnectionStatusChangedEvent( + NodeConnectionStatus.disconnected, + walletId, + cryptoCurrency, + ), + ); + GlobalEventBus.instance.fire( + WalletSyncStatusChangedEvent( + WalletSyncStatus.unableToSync, + walletId, + cryptoCurrency, + ), + ); + Logging.instance.e( + "Caught exception in refreshWalletData(): $error\n$strace", + ); + } finally { + refreshMutex.release(); + } + } + + @override + Future updateBalance() async { + try { + final balances = await _allWalletBalances(); + final balance = Balance( + total: Amount.fromDecimal( + Decimal.parse(balances.total.toString()) + + Decimal.parse(balances.awaitingFinalization.toString()), + fractionDigits: cryptoCurrency.fractionDigits, + ), + spendable: Amount.fromDecimal( + Decimal.parse(balances.spendable.toString()), + fractionDigits: cryptoCurrency.fractionDigits, + ), + blockedTotal: Amount.zeroWith( + fractionDigits: cryptoCurrency.fractionDigits, + ), + pendingSpendable: Amount.fromDecimal( + Decimal.parse(balances.pending.toString()), + fractionDigits: cryptoCurrency.fractionDigits, + ), + ); + + await info.updateBalance(newBalance: balance, isar: mainDB.isar); + } catch (e, s) { + Logging.instance.e( + "Mimblewimblecoin wallet failed to update balance: $e\n$s", + ); + } + } + + @override + Future updateTransactions() async { + try { + final wallet = await secureStorageInterface.read( + key: '${walletId}_wallet', + ); + const refreshFromNode = 1; + + final myAddresses = await mainDB + .getAddresses(walletId) + .filter() + .typeEqualTo(AddressType.mimbleWimble) + .and() + .subTypeEqualTo(AddressSubType.receiving) + .and() + .valueIsNotEmpty() + .valueProperty() + .findAll(); + final myAddressesSet = myAddresses.toSet(); + + final transactions = await libMwc.getTransactions( + wallet: wallet!, + refreshFromNode: refreshFromNode, + ); + + final List txns = []; + + final slatesToCommits = info.mimblewimblecoinData?.slatesToCommits ?? {}; + + for (final tx in transactions) { + Logging.instance.i("tx: $tx"); + + final isIncoming = + libMwc.txTypeIsReceived(tx.txType) || + libMwc.txTypeIsReceiveCancelled(tx.txType); + final slateId = tx.txSlateId; + final commitId = slatesToCommits[slateId]?['commitId'] as String?; + final numberOfMessages = tx.messages?.length; + final onChainNote = tx.messages?.first.message; + final addressFrom = slatesToCommits[slateId]?["from"] as String?; + final addressTo = slatesToCommits[slateId]?["to"] as String?; + + final credit = int.parse(tx.amountCredited); + final debit = int.parse(tx.amountDebited); + final fee = int.tryParse(tx.fee ?? "0") ?? 0; + + // hack Mimblewimblecoin tx data into inputs and outputs + final List outputs = []; + final List inputs = []; + final addressFromIsMine = myAddressesSet.contains(addressFrom); + final addressToIsMine = myAddressesSet.contains(addressTo); + + OutputV2 output = OutputV2.isarCantDoRequiredInDefaultConstructor( + scriptPubKeyHex: "00", + valueStringSats: credit.toString(), + addresses: [if (addressFrom != null) addressFrom], + walletOwns: true, + ); + final InputV2 input = InputV2.isarCantDoRequiredInDefaultConstructor( + scriptSigHex: null, + scriptSigAsm: null, + sequence: null, + outpoint: null, + addresses: [if (addressTo != null) addressTo], + valueStringSats: debit.toString(), + witness: null, + innerRedeemScriptAsm: null, + coinbase: null, + walletOwns: true, + ); + + final TransactionType txType; + if (isIncoming) { + if (addressToIsMine && addressFromIsMine) { + txType = TransactionType.sentToSelf; + } else { + txType = TransactionType.incoming; + } + output = output.copyWith( + addresses: [ + myAddressesSet + .first, // Must be changed if we ever do more than a single wallet address!!! + ], + walletOwns: true, + ); + } else { + // For outgoing transactions, check if we have a slatepack address to analyze + TransactionType determinedType = TransactionType.outgoing; + + // Try to get better type determination for slatepack transactions + if (addressTo != null) { + try { + final slatepackType = await getSlatepackTransactionType( + addressTo, + ); + if (slatepackType == 'Incoming') { + determinedType = TransactionType.incoming; + } else if (slatepackType == 'Outgoing') { + determinedType = TransactionType.outgoing; + } + // If slatepackType is 'Unknown', we keep the original outgoing type + } catch (e) { + // If analysis fails, keep original type determination + Logging.instance.w( + "Failed to analyze slatepack for better type detection: $e", + ); + } + } + + txType = determinedType; + } + + outputs.add(output); + inputs.add(input); + + final otherData = { + "isMimblewimblecoinTransaction": true, + "numberOfMessages": numberOfMessages, + "slateId": slateId, + "onChainNote": onChainNote, + "isCancelled": + libMwc.txTypeIsSentCancelled(tx.txType) || + libMwc.txTypeIsReceiveCancelled(tx.txType), + "overrideFee": Amount( + rawValue: BigInt.from(fee), + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), + }; + + final txn = TransactionV2( + walletId: walletId, + blockHash: null, + hash: commitId ?? tx.id.toString(), + txid: commitId ?? tx.id.toString(), + timestamp: + DateTime.parse(tx.creationTs).millisecondsSinceEpoch ~/ 1000, + height: tx.confirmed ? tx.kernelLookupMinHeight ?? 1 : null, + inputs: List.unmodifiable(inputs), + outputs: List.unmodifiable(outputs), + version: 0, + type: txType, + subType: TransactionSubType.none, + otherData: jsonEncode(otherData), + ); + + txns.add(txn); + } + + await mainDB.isar.writeTxn(() async { + await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .deleteAll(); + await mainDB.isar.transactionV2s.putAll(txns); + }); + } catch (e, s) { + Logging.instance.w( + "${cryptoCurrency.runtimeType} ${cryptoCurrency.network} net wallet" + " \"${info.name}\"_${info.walletId} updateTransactions() failed: $e\n$s", + ); + } + } + + @override + Future updateUTXOs() async { + // not used for mimblewimblecoin + return false; + } + + @override + Future updateNode() async { + _mimblewimblecoinNode = getCurrentNode(); + + // TODO: [prio=low] move this out of secure storage if secure storage not needed + final String stringConfig = await _getConfig(); + await secureStorageInterface.write( + key: '${walletId}_config', + value: stringConfig, + ); + + // unawaited(refresh()); + } + + @override + Future pingCheck() async { + try { + final node = nodeService.getPrimaryNodeFor(currency: cryptoCurrency); + return await testMwcNodeConnection( + NodeFormData() + ..host = node!.host + ..useSSL = node.useSSL + ..port = node.port, + ) != + null; + } catch (e, s) { + Logging.instance.i("$e\n$s"); + return false; + } + } + + @override + Future updateChainHeight() async { + final config = await _getRealConfig(); + final latestHeight = await libMwc.getChainHeight(config: config); + await info.updateCachedChainHeight( + newHeight: latestHeight, + isar: mainDB.isar, + ); + } + + @override + Future estimateFeeFor(Amount amount, BigInt feeRate) async { + // setting ifErrorEstimateFee doesn't do anything as its not used in the nativeFee function????? + final int currentFee = await _nativeFee( + amount.raw.toInt(), + ifErrorEstimateFee: true, + ); + return Amount( + rawValue: BigInt.from(currentFee), + fractionDigits: cryptoCurrency.fractionDigits, + ); + } + + @override + Future get fees async { + // this wasn't done before the refactor either so... + // TODO: implement _getFees + return FeeObject( + numberOfBlocksFast: 10, + numberOfBlocksAverage: 10, + numberOfBlocksSlow: 10, + fast: BigInt.one, + medium: BigInt.one, + slow: BigInt.one, + ); + } + + @override + Future updateSentCachedTxData({required TxData txData}) async { + // TODO: [prio=low] Was not used before refactor so maybe not required(?) + return txData; + } + + @override + Future exit() async { + timer?.cancel(); + timer = null; + await super.exit(); + Logging.instance.i("Mimblewimblecoin_wallet exit finished"); + } +} + +Future deleteMimblewimblecoinWallet({ + required String walletId, + required SecureStorageInterface secureStore, +}) async { + final wallet = await secureStore.read(key: '${walletId}_wallet'); + String? config = await secureStore.read(key: '${walletId}_config'); + if (Platform.isIOS) { + final Directory appDir = await StackFileSystem.applicationRootDirectory(); + + final path = "${appDir.path}/mimblewimblecoin"; + final String name = walletId.trim(); + final walletDir = '$path/$name'; + + final editConfig = jsonDecode(config as String); + + editConfig["wallet_dir"] = walletDir; + config = jsonEncode(editConfig); + } + + if (wallet == null) { + return "Tried to delete non existent mimblewimblecoin wallet file with walletId=$walletId"; + } else { + try { + return libMwc.deleteWallet(wallet: wallet, config: config!); + } catch (e, s) { + Logging.instance.e("$e\n$s"); + return "deleteMimblewimblecoinWallet($walletId) failed..."; + } + } +} diff --git a/lib/wallets/wallet/impl/monero_wallet.dart b/lib/wallets/wallet/impl/monero_wallet.dart index 03bbfd5c3..876bec9bf 100644 --- a/lib/wallets/wallet/impl/monero_wallet.dart +++ b/lib/wallets/wallet/impl/monero_wallet.dart @@ -1,9 +1,11 @@ import 'dart:async'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:cs_monero/cs_monero.dart' as lib_monero; import '../../../utilities/amount/amount.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart' + show WrappedWallet; import '../../crypto_currency/crypto_currency.dart'; import '../intermediate/lib_monero_wallet.dart'; @@ -13,36 +15,16 @@ class MoneroWallet extends LibMoneroWallet { @override Future estimateFeeFor(Amount amount, BigInt feeRate) async { - if (libMoneroWallet == null || - syncStatus is! lib_monero_compat.SyncedSyncStatus) { + if (wallet == null || syncStatus is! lib_monero_compat.SyncedSyncStatus) { return Amount.zeroWith(fractionDigits: cryptoCurrency.fractionDigits); } - lib_monero.TransactionPriority priority; - switch (feeRate.toInt()) { - case 1: - priority = lib_monero.TransactionPriority.low; - break; - case 2: - priority = lib_monero.TransactionPriority.medium; - break; - case 3: - priority = lib_monero.TransactionPriority.high; - break; - case 4: - priority = lib_monero.TransactionPriority.last; - break; - case 0: - default: - priority = lib_monero.TransactionPriority.normal; - break; - } - int approximateFee = 0; await estimateFeeMutex.protect(() async { - approximateFee = await libMoneroWallet!.estimateFee( - priority, - amount.raw.toInt(), + approximateFee = await csMonero.estimateFee( + feeRate.toInt(), + amount.raw, + wallet: wallet!, ); }); @@ -53,76 +35,66 @@ class MoneroWallet extends LibMoneroWallet { } @override - bool walletExists(String path) => lib_monero.MoneroWallet.isWalletExist(path); + bool walletExists(String path) => + csMonero.walletExists(path, csCoin: CsCoin.monero); @override - Future loadWallet({ + Future loadWallet({ required String path, required String password, - }) async { - libMoneroWallet = await lib_monero.MoneroWallet.loadWallet( - path: path, - password: password, - ); - } + }) => csMonero.loadWallet( + walletId, + path: path, + password: password, + csCoin: CsCoin.monero, + ); @override - Future getCreatedWallet({ + Future getCreatedWallet({ required String path, required String password, required int wordCount, required String seedOffset, - }) async { - final lib_monero.MoneroSeedType type; - switch (wordCount) { - case 16: - type = lib_monero.MoneroSeedType.sixteen; - break; - - case 25: - type = lib_monero.MoneroSeedType.twentyFive; - break; - - default: - throw Exception("Invalid mnemonic word count: $wordCount"); - } - - return await lib_monero.MoneroWallet.create( - path: path, - password: password, - seedType: type, - seedOffset: seedOffset, - ); - } + }) => csMonero.getCreatedWallet( + csCoin: CsCoin.monero, + path: path, + password: password, + wordCount: wordCount, + seedOffset: seedOffset, + ); @override - Future getRestoredWallet({ + Future getRestoredWallet({ required String path, required String password, required String mnemonic, required String seedOffset, int height = 0, - }) async => await lib_monero.MoneroWallet.restoreWalletFromSeed( + }) => csMonero.getRestoredWallet( path: path, password: password, - seed: mnemonic, - restoreHeight: height, + mnemonic: mnemonic, + height: height, seedOffset: seedOffset, + csCoin: CsCoin.monero, + walletId: walletId, ); @override - Future getRestoredFromViewKeyWallet({ + Future getRestoredFromViewKeyWallet({ required String path, required String password, required String address, required String privateViewKey, int height = 0, - }) async => lib_monero.MoneroWallet.createViewOnlyWallet( + }) => csMonero.getRestoredFromViewKeyWallet( + walletId: walletId, + csCoin: CsCoin.monero, path: path, password: password, address: address, - viewKey: privateViewKey, - restoreHeight: height, + privateViewKey: privateViewKey, + height: height, ); @override diff --git a/lib/wallets/wallet/impl/namecoin_wallet.dart b/lib/wallets/wallet/impl/namecoin_wallet.dart index abf598c6f..a6dd6f74b 100644 --- a/lib/wallets/wallet/impl/namecoin_wallet.dart +++ b/lib/wallets/wallet/impl/namecoin_wallet.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'dart:typed_data'; import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:namecoin/namecoin.dart'; import '../../../models/input.dart'; diff --git a/lib/wallets/wallet/impl/particl_wallet.dart b/lib/wallets/wallet/impl/particl_wallet.dart index 4725110af..eb9fb6043 100644 --- a/lib/wallets/wallet/impl/particl_wallet.dart +++ b/lib/wallets/wallet/impl/particl_wallet.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:bitcoindart/bitcoindart.dart' as bitcoindart; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/input.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; diff --git a/lib/wallets/wallet/impl/peercoin_wallet.dart b/lib/wallets/wallet/impl/peercoin_wallet.dart index 09c69e2cc..8046f0d23 100644 --- a/lib/wallets/wallet/impl/peercoin_wallet.dart +++ b/lib/wallets/wallet/impl/peercoin_wallet.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; @@ -37,24 +37,29 @@ class PeercoinWallet @override Future> fetchAddressesForElectrumXScan() async { - final allAddresses = await mainDB - .getAddresses(walletId) - .filter() - .not() - .group( - (q) => q - .typeEqualTo(AddressType.nonWallet) - .or() - .subTypeEqualTo(AddressSubType.nonWallet), - ) - .findAll(); + final allAddresses = + await mainDB + .getAddresses(walletId) + .filter() + .not() + .group( + (q) => q + .typeEqualTo(AddressType.nonWallet) + .or() + .subTypeEqualTo(AddressSubType.nonWallet), + ) + .findAll(); return allAddresses; } // =========================================================================== @override - Amount roughFeeEstimate(int inputCount, int outputCount, BigInt feeRatePerKB) { + Amount roughFeeEstimate( + int inputCount, + int outputCount, + BigInt feeRatePerKB, + ) { // TODO: actually do this properly for peercoin // this is probably wrong for peercoin return Amount( @@ -75,12 +80,8 @@ class PeercoinWallet // =========================================================================== @override - Future< - ({ - bool blocked, - String? blockedReason, - String? utxoLabel, - })> checkBlockUTXO( + Future<({bool blocked, String? blockedReason, String? utxoLabel})> + checkBlockUTXO( Map jsonUTXO, String? scriptPubKeyHex, Map jsonTX, @@ -97,30 +98,34 @@ class PeercoinWallet await fetchAddressesForElectrumXScan(); // Separate receiving and change addresses. - final Set receivingAddresses = allAddressesOld - .where((e) => e.subType == AddressSubType.receiving) - .map((e) => e.value) - .toSet(); - final Set changeAddresses = allAddressesOld - .where((e) => e.subType == AddressSubType.change) - .map((e) => e.value) - .toSet(); + final Set receivingAddresses = + allAddressesOld + .where((e) => e.subType == AddressSubType.receiving) + .map((e) => e.value) + .toSet(); + final Set changeAddresses = + allAddressesOld + .where((e) => e.subType == AddressSubType.change) + .map((e) => e.value) + .toSet(); // Remove duplicates. final allAddressesSet = {...receivingAddresses, ...changeAddresses}; // Fetch history from ElectrumX. - final List> allTxHashes = - await fetchHistory(allAddressesSet); + final List> allTxHashes = await fetchHistory( + allAddressesSet, + ); // Only parse new txs (not in db yet). final List> allTransactions = []; for (final txHash in allTxHashes) { // Check for duplicates by searching for tx by tx_hash in db. - final storedTx = await mainDB.isar.transactionV2s - .where() - .txidWalletIdEqualTo(txHash["tx_hash"] as String, walletId) - .findFirst(); + final storedTx = + await mainDB.isar.transactionV2s + .where() + .txidWalletIdEqualTo(txHash["tx_hash"] as String, walletId) + .findFirst(); if (storedTx == null || storedTx.height == null || @@ -133,8 +138,9 @@ class PeercoinWallet ); // Only tx to list once. - if (allTransactions - .indexWhere((e) => e["txid"] == tx["txid"] as String) == + if (allTransactions.indexWhere( + (e) => e["txid"] == tx["txid"] as String, + ) == -1) { tx["height"] = txHash["height"]; allTransactions.add(tx); @@ -284,7 +290,8 @@ class PeercoinWallet txid: txData["txid"] as String, height: txData["height"] as int?, version: txData["version"] as int, - timestamp: txData["blocktime"] as int? ?? + timestamp: + txData["blocktime"] as int? ?? DateTime.timestamp().millisecondsSinceEpoch ~/ 1000, inputs: List.unmodifiable(inputs), outputs: List.unmodifiable(outputs), diff --git a/lib/wallets/wallet/impl/salvium_wallet.dart b/lib/wallets/wallet/impl/salvium_wallet.dart index f340776be..68d04d41f 100644 --- a/lib/wallets/wallet/impl/salvium_wallet.dart +++ b/lib/wallets/wallet/impl/salvium_wallet.dart @@ -1,48 +1,27 @@ import 'dart:async'; -import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:cs_salvium/cs_salvium.dart' as lib_salvium; - import '../../../utilities/amount/amount.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../../crypto_currency/crypto_currency.dart'; import '../intermediate/lib_salvium_wallet.dart'; class SalviumWallet extends LibSalviumWallet { - SalviumWallet(CryptoCurrencyNetwork network) - : super(Salvium(network)); + SalviumWallet(CryptoCurrencyNetwork network) : super(Salvium(network)); @override Future estimateFeeFor(Amount amount, BigInt feeRate) async { - if (libSalviumWallet == null /*|| - syncStatus is! lib_monero_compat.SyncedSyncStatus*/) { + if (wallet == + null /*|| + syncStatus is! lib_monero_compat.SyncedSyncStatus*/ ) { return Amount.zeroWith(fractionDigits: cryptoCurrency.fractionDigits); } - lib_salvium.TransactionPriority priority; - switch (feeRate.toInt()) { - case 1: - priority = lib_salvium.TransactionPriority.low; - break; - case 2: - priority = lib_salvium.TransactionPriority.medium; - break; - case 3: - priority = lib_salvium.TransactionPriority.high; - break; - case 4: - priority = lib_salvium.TransactionPriority.last; - break; - case 0: - default: - priority = lib_salvium.TransactionPriority.normal; - break; - } - int approximateFee = 0; await estimateFeeMutex.protect(() async { - approximateFee = await libSalviumWallet!.estimateFee( - priority, - amount.raw.toInt(), + approximateFee = await csSalvium.estimateFee( + feeRate.toInt(), + amount.raw, + wallet: wallet!, ); }); @@ -53,72 +32,65 @@ class SalviumWallet extends LibSalviumWallet { } @override - bool walletExists(String path) => lib_salvium.SalviumWallet.isWalletExist(path); + bool walletExists(String path) => csSalvium.walletExists(path); @override - Future loadWallet({ + Future loadWallet({ required String path, required String password, - }) async { - libSalviumWallet = await lib_salvium.SalviumWallet.loadWallet( - path: path, - password: password, - ); - } + }) => csSalvium.loadWallet( + walletId, + path: path, + password: password, + network: cryptoCurrency.network == CryptoCurrencyNetwork.main ? 0 : 1, + ); @override - Future getCreatedWallet({ + Future getCreatedWallet({ required String path, required String password, required int wordCount, required String seedOffset, - }) async { - final lib_salvium.SalviumSeedType type; - switch (wordCount) { - case 25: - type = lib_salvium.SalviumSeedType.twentyFive; - break; - - default: - throw Exception("Invalid mnemonic word count: $wordCount"); - } - - return await lib_salvium.SalviumWallet.create( - path: path, - password: password, - seedType: type, - seedOffset: seedOffset, - ); - } + }) => csSalvium.getCreatedWallet( + path: path, + password: password, + wordCount: wordCount, + seedOffset: seedOffset, + network: cryptoCurrency.network == CryptoCurrencyNetwork.main ? 0 : 1, + ); @override - Future getRestoredWallet({ + Future getRestoredWallet({ required String path, required String password, required String mnemonic, required String seedOffset, int height = 0, - }) async => await lib_salvium.SalviumWallet.restoreWalletFromSeed( + }) async => await csSalvium.getRestoredWallet( path: path, password: password, - seed: mnemonic, - restoreHeight: height, + mnemonic: mnemonic, + height: height, seedOffset: seedOffset, + network: cryptoCurrency.network == CryptoCurrencyNetwork.main ? 0 : 1, + walletId: walletId, ); @override - Future getRestoredFromViewKeyWallet({ + Future getRestoredFromViewKeyWallet({ required String path, required String password, required String address, required String privateViewKey, int height = 0, - }) async => lib_salvium.SalviumWallet.createViewOnlyWallet( + }) async => csSalvium.getRestoredFromViewKeyWallet( + walletId: walletId, path: path, password: password, address: address, - viewKey: privateViewKey, - restoreHeight: height, + privateViewKey: privateViewKey, + height: height, + network: cryptoCurrency.network == CryptoCurrencyNetwork.main ? 0 : 1, ); @override diff --git a/lib/wallets/wallet/impl/solana_wallet.dart b/lib/wallets/wallet/impl/solana_wallet.dart index 5a5ef7c57..c88d99562 100644 --- a/lib/wallets/wallet/impl/solana_wallet.dart +++ b/lib/wallets/wallet/impl/solana_wallet.dart @@ -3,12 +3,13 @@ import 'dart:io'; import 'dart:math'; import 'package:decimal/decimal.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:socks5_proxy/socks_client.dart'; import 'package:solana/dto.dart'; import 'package:solana/solana.dart'; import 'package:tuple/tuple.dart'; +import '../../../app_config.dart'; import '../../../exceptions/wallet/node_tor_mismatch_config_exception.dart'; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart' as isar; @@ -66,18 +67,19 @@ class SolanaWallet extends Bip39Wallet { final latestBlockhash = await _rpcClient?.getLatestBlockhash(); final pubKey = (await _getKeyPair()).publicKey; - final compiledMessage = Message( - instructions: [ - SystemInstruction.transfer( - fundingAccount: pubKey, - recipientAccount: pubKey, - lamports: transferAmount.raw.toInt(), - ), - ], - ).compile( - recentBlockhash: latestBlockhash!.value.blockhash, - feePayer: pubKey, - ); + final compiledMessage = + Message( + instructions: [ + SystemInstruction.transfer( + fundingAccount: pubKey, + recipientAccount: pubKey, + lamports: transferAmount.raw.toInt(), + ), + ], + ).compile( + recentBlockhash: latestBlockhash!.value.blockhash, + feePayer: pubKey, + ); final estimate = await _rpcClient?.getFeeForMessage( base64Encode(compiledMessage.toByteArray().toList()), @@ -456,10 +458,9 @@ class SolanaWallet extends Bip39Wallet { derivationIndex: 0, derivationPath: DerivationPath()..value = _addressDerivationPath, type: AddressType.solana, - subType: - txType == isar.TransactionType.outgoing - ? AddressSubType.unknown - : AddressSubType.receiving, + subType: txType == isar.TransactionType.outgoing + ? AddressSubType.unknown + : AddressSubType.receiving, ); txsList.add(Tuple2(transaction, txAddress)); @@ -526,7 +527,7 @@ class SolanaWallet extends Bip39Wallet { ) { HttpClient? httpClient; - if (prefs.useTor) { + if (AppConfig.hasFeature(AppFeature.tor) && prefs.useTor) { // Make proxied HttpClient. final proxyInfo = torService.getProxyInfo(); diff --git a/lib/wallets/wallet/impl/stellar_wallet.dart b/lib/wallets/wallet/impl/stellar_wallet.dart index 91af9758f..86cc1aa02 100644 --- a/lib/wallets/wallet/impl/stellar_wallet.dart +++ b/lib/wallets/wallet/impl/stellar_wallet.dart @@ -2,11 +2,12 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; import 'package:socks5_proxy/socks.dart'; import 'package:stellar_flutter_sdk/stellar_flutter_sdk.dart' as stellar; +import '../../../app_config.dart'; import '../../../exceptions/wallet/node_tor_mismatch_config_exception.dart'; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -138,7 +139,7 @@ class StellarWallet extends Bip39Wallet { final currentNode = getCurrentNode(); HttpClient? _httpClient; - if (prefs.useTor) { + if (AppConfig.hasFeature(AppFeature.tor) && prefs.useTor) { final ({InternetAddress host, int port}) proxyInfo = TorService.sharedInstance.getProxyInfo(); diff --git a/lib/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart b/lib/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart index d32ae3db8..e45babf9f 100644 --- a/lib/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart +++ b/lib/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:ethereum_addresses/ethereum_addresses.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:web3dart/web3dart.dart' as web3dart; import '../../../../dto/ethereum/eth_token_tx_dto.dart'; diff --git a/lib/wallets/wallet/impl/tezos_wallet.dart b/lib/wallets/wallet/impl/tezos_wallet.dart index 54302a027..5ce5bef62 100644 --- a/lib/wallets/wallet/impl/tezos_wallet.dart +++ b/lib/wallets/wallet/impl/tezos_wallet.dart @@ -1,10 +1,11 @@ import 'dart:async'; import 'dart:io'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:tezart/tezart.dart' as tezart; import 'package:tuple/tuple.dart'; +import '../../../app_config.dart'; import '../../../exceptions/wallet/node_tor_mismatch_config_exception.dart'; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -51,8 +52,9 @@ class TezosWallet extends Bip39Wallet { // TODO: some kind of better check to see if the address has been used - final hasHistory = - (await TezosAPI.getTransactions(ks.address)).isNotEmpty; + final hasHistory = (await TezosAPI.getTransactions( + ks.address, + )).isNotEmpty; if (hasHistory) { return path; @@ -113,13 +115,14 @@ class TezosWallet extends Bip39Wallet { // print("customFee: $customFee"); // } final ({InternetAddress host, int port})? proxyInfo = - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null; + AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null; final tezartClient = tezart.TezartClient( server, - proxy: - proxyInfo != null - ? "socks5://${proxyInfo.host}:${proxyInfo.port};" - : null, + proxy: proxyInfo != null + ? "socks5://${proxyInfo.host}:${proxyInfo.port};" + : null, ); final opList = await tezartClient.transferOperation( @@ -595,11 +598,10 @@ class TezosWallet extends Bip39Wallet { type: txType, subType: TransactionSubType.none, amount: theTx.amountInMicroTez, - amountString: - Amount( - rawValue: BigInt.from(theTx.amountInMicroTez), - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), + amountString: Amount( + rawValue: BigInt.from(theTx.amountInMicroTez), + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), fee: theTx.feeInMicroTez, height: theTx.height, isCancelled: false, diff --git a/lib/wallets/wallet/impl/wownero_wallet.dart b/lib/wallets/wallet/impl/wownero_wallet.dart index a8d5e1c65..691f60126 100644 --- a/lib/wallets/wallet/impl/wownero_wallet.dart +++ b/lib/wallets/wallet/impl/wownero_wallet.dart @@ -1,11 +1,13 @@ import 'dart:async'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:cs_monero/cs_monero.dart' as lib_monero; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../utilities/amount/amount.dart'; import '../../../utilities/enums/fee_rate_type_enum.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart' + show WrappedWallet; import '../../crypto_currency/crypto_currency.dart'; import '../../models/tx_data.dart'; import '../intermediate/lib_monero_wallet.dart'; @@ -16,33 +18,26 @@ class WowneroWallet extends LibMoneroWallet { @override Future estimateFeeFor(Amount amount, BigInt feeRate) async { - if (libMoneroWallet == null || - syncStatus is! lib_monero_compat.SyncedSyncStatus) { + if (wallet == null || syncStatus is! lib_monero_compat.SyncedSyncStatus) { return Amount.zeroWith(fractionDigits: cryptoCurrency.fractionDigits); } - lib_monero.TransactionPriority priority; FeeRateType feeRateType = FeeRateType.slow; switch (feeRate.toInt()) { case 1: - priority = lib_monero.TransactionPriority.low; feeRateType = FeeRateType.average; break; case 2: - priority = lib_monero.TransactionPriority.medium; feeRateType = FeeRateType.average; break; case 3: - priority = lib_monero.TransactionPriority.high; feeRateType = FeeRateType.fast; break; case 4: - priority = lib_monero.TransactionPriority.last; feeRateType = FeeRateType.fast; break; case 0: default: - priority = lib_monero.TransactionPriority.normal; feeRateType = FeeRateType.slow; break; } @@ -71,9 +66,10 @@ class WowneroWallet extends LibMoneroWallet { // unsure why this delay? await Future.delayed(const Duration(milliseconds: 500)); } catch (e) { - approximateFee = libMoneroWallet!.estimateFee( - priority, - amount.raw.toInt(), + approximateFee = await csMonero.estimateFee( + feeRate.toInt(), + amount.raw, + wallet: wallet!, ); } } @@ -91,77 +87,65 @@ class WowneroWallet extends LibMoneroWallet { @override bool walletExists(String path) => - lib_monero.WowneroWallet.isWalletExist(path); + csMonero.walletExists(path, csCoin: CsCoin.wownero); @override - Future loadWallet({ + Future loadWallet({ required String path, required String password, - }) async { - libMoneroWallet = await lib_monero.WowneroWallet.loadWallet( - path: path, - password: password, - ); - } + }) => csMonero.loadWallet( + walletId, + path: path, + password: password, + csCoin: CsCoin.wownero, + ); @override - Future getCreatedWallet({ + Future getCreatedWallet({ required String path, required String password, required int wordCount, required String seedOffset, - }) async { - final lib_monero.WowneroSeedType type; - switch (wordCount) { - case 16: - type = lib_monero.WowneroSeedType.sixteen; - break; - - case 25: - type = lib_monero.WowneroSeedType.twentyFive; - break; - - default: - throw Exception("Invalid mnemonic word count: $wordCount"); - } - - return await lib_monero.WowneroWallet.create( - path: path, - password: password, - seedType: type, - overrideDeprecated14WordSeedException: true, - seedOffset: seedOffset, - ); - } + }) => csMonero.getCreatedWallet( + csCoin: CsCoin.wownero, + path: path, + password: password, + wordCount: wordCount, + seedOffset: seedOffset, + ); @override - Future getRestoredWallet({ + Future getRestoredWallet({ required String path, required String password, required String mnemonic, required String seedOffset, int height = 0, - }) async => await lib_monero.WowneroWallet.restoreWalletFromSeed( + }) => csMonero.getRestoredWallet( path: path, password: password, - seed: mnemonic, - restoreHeight: height, + mnemonic: mnemonic, + height: height, seedOffset: seedOffset, + csCoin: CsCoin.wownero, + walletId: walletId, ); @override - Future getRestoredFromViewKeyWallet({ + Future getRestoredFromViewKeyWallet({ required String path, required String password, required String address, required String privateViewKey, int height = 0, - }) async => lib_monero.WowneroWallet.createViewOnlyWallet( + }) => csMonero.getRestoredFromViewKeyWallet( + walletId: walletId, + csCoin: CsCoin.wownero, path: path, password: password, address: address, - viewKey: privateViewKey, - restoreHeight: height, + privateViewKey: privateViewKey, + height: height, ); @override diff --git a/lib/wallets/wallet/impl/xelis_wallet.dart b/lib/wallets/wallet/impl/xelis_wallet.dart index eea19dbdb..9423b0697 100644 --- a/lib/wallets/wallet/impl/xelis_wallet.dart +++ b/lib/wallets/wallet/impl/xelis_wallet.dart @@ -2,11 +2,9 @@ import 'dart:async'; import 'dart:convert'; import 'dart:math'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; import 'package:stack_wallet_backup/generate_password.dart'; -import 'package:xelis_dart_sdk/xelis_dart_sdk.dart' as xelis_sdk; -import 'package:xelis_flutter/src/api/wallet.dart' as x_wallet; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -20,6 +18,7 @@ import '../../../services/event_bus/global_event_bus.dart'; import '../../../utilities/amount/amount.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/stack_file_system.dart'; +import '../../../wl_gen/interfaces/lib_xelis_interface.dart'; import '../../crypto_currency/crypto_currency.dart'; import '../../models/tx_data.dart'; import '../intermediate/lib_xelis_wallet.dart'; @@ -44,28 +43,29 @@ class XelisWallet extends LibXelisWallet { key: Wallet.mnemonicPassphraseKey(walletId: info.walletId), ); - final mnemonic = await getMnemonic(); - final seedLength = mnemonic.trim().split(" ").length; + final mnemonic = (await getMnemonic()).trim(); + final seedLength = mnemonic.split(" ").length; invalidSeedLengthCheck(seedLength); Logging.instance.i("Xelis: recovering wallet"); - final wallet = await x_wallet.createXelisWallet( + final wallet = await libXelis.createXelisWallet( + walletId, name: name, directory: directory, password: password!, - seed: mnemonic.trim(), - network: cryptoCurrency.network.xelisNetwork, + seed: mnemonic, + network: cryptoCurrency.network, precomputedTablesPath: tablePath, l1Low: tableState.currentSize.isLow, ); await secureStorageInterface.write( key: Wallet.mnemonicKey(walletId: walletId), - value: mnemonic.trim(), + value: mnemonic, ); - libXelisWallet = wallet; + this.wallet = wallet; await _finishInit(); } @@ -84,22 +84,23 @@ class XelisWallet extends LibXelisWallet { value: password, ); - final wallet = await x_wallet.createXelisWallet( + final wallet = await libXelis.createXelisWallet( + walletId, name: name, directory: directory, password: password, - network: cryptoCurrency.network.xelisNetwork, + network: cryptoCurrency.network, precomputedTablesPath: tablePath, l1Low: tableState.currentSize.isLow, ); - final mnemonic = await wallet.getSeed(); + final mnemonic = await libXelis.getSeed(wallet); await secureStorageInterface.write( key: Wallet.mnemonicKey(walletId: walletId), value: mnemonic.trim(), ); - libXelisWallet = wallet; + this.wallet = wallet; await _finishInit(); } @@ -115,11 +116,12 @@ class XelisWallet extends LibXelisWallet { key: Wallet.mnemonicPassphraseKey(walletId: info.walletId), ); - libXelisWallet = await x_wallet.openXelisWallet( + wallet = await libXelis.openXelisWallet( + walletId, name: name, directory: directory, password: password!, - network: cryptoCurrency.network.xelisNetwork, + network: cryptoCurrency.network, precomputedTablesPath: tablePath, l1Low: tableState.currentSize.isLow, ); @@ -138,7 +140,7 @@ class XelisWallet extends LibXelisWallet { walletId: walletId, derivationIndex: 0, derivationPath: null, - value: libXelisWallet!.getAddressStr(), + value: libXelis.getAddress(wallet!), publicKey: [], type: AddressType.xelis, subType: AddressSubType.receiving, @@ -170,7 +172,7 @@ class XelisWallet extends LibXelisWallet { walletId, ); - if (libXelisWallet == null) { + if (wallet == null) { if (isRestore == true) { await _restoreWallet(); } else { @@ -226,7 +228,7 @@ class XelisWallet extends LibXelisWallet { @override Future pingCheck() async { try { - await libXelisWallet!.getDaemonInfo(); + await libXelis.getDaemonInfo(wallet!); await handleOnline(); return true; } catch (_) { @@ -241,12 +243,12 @@ class XelisWallet extends LibXelisWallet { Future updateBalance({int? newBalance}) async { await _balanceUpdateMutex.protect(() async { try { - if (await libXelisWallet!.hasXelisBalance()) { - final BigInt xelBalance = - newBalance != null - ? BigInt.from(newBalance) - : await libXelisWallet! - .getXelisBalanceRaw(); // in the future, use getAssetBalances and handle each + if (await libXelis.hasXelisBalance(wallet!)) { + final BigInt xelBalance = newBalance != null + ? BigInt.from(newBalance) + : await libXelis.getXelisBalanceRaw( + wallet!, + ); // in the future, use getAssetBalances and handle each final balance = Balance( total: Amount( rawValue: xelBalance, @@ -276,9 +278,9 @@ class XelisWallet extends LibXelisWallet { } Future _fetchChainHeight() async { - final infoString = await libXelisWallet!.getDaemonInfo(); - final Map nodeInfo = - (json.decode(infoString) as Map).cast(); + final infoString = await libXelis.getDaemonInfo(wallet!); + final Map nodeInfo = (json.decode(infoString) as Map) + .cast(); pruningHeight = int.tryParse(nodeInfo['pruned_topoheight']?.toString() ?? '0') ?? 0; @@ -306,9 +308,9 @@ class XelisWallet extends LibXelisWallet { @override Future updateNode() async { try { - final bool online = await libXelisWallet!.isOnline(); + final bool online = await libXelis.isOnline(wallet!); if (online == true) { - await libXelisWallet!.offlineMode(); + await libXelis.offlineMode(wallet!); } await super.connect(); } catch (e, s) { @@ -324,7 +326,7 @@ class XelisWallet extends LibXelisWallet { @override Future> updateTransactions({ bool isRescan = false, - List? objTransactions, + List? objTransactions, int? topoheight, }) async { checkInitialized(); @@ -335,7 +337,7 @@ class XelisWallet extends LibXelisWallet { walletId: walletId, derivationIndex: 0, derivationPath: null, - value: libXelisWallet!.getAddressStr(), + value: libXelis.getAddress(wallet!), publicKey: [], type: AddressType.xelis, subType: AddressSubType.receiving, @@ -358,36 +360,20 @@ class XelisWallet extends LibXelisWallet { firstBlock -= 10; } } else { - await libXelisWallet!.rescan(topoheight: BigInt.from(pruningHeight)); + await libXelis.rescan(wallet!, topoheight: BigInt.from(pruningHeight)); } - xelis_sdk.TransactionEntry _checkDecodeJsonStringTxEntry( - String jsonString, - ) { - final json = jsonDecode(jsonString); - if (json is Map) { - return xelis_sdk.TransactionEntry.fromJson(json.cast()); - } - - throw Exception("Not a Map on jsonDecode($jsonString)"); - } - - final txList = - objTransactions ?? - (await libXelisWallet!.allHistory()) - .map(_checkDecodeJsonStringTxEntry) - .toList(); + final txList = objTransactions ?? (await libXelis.allHistory(wallet!)); final List txns = []; for (final transactionEntry in txList) { try { // Check for duplicates - final storedTx = - await mainDB.isar.transactionV2s - .where() - .txidWalletIdEqualTo(transactionEntry.hash, walletId) - .findFirst(); + final storedTx = await mainDB.isar.transactionV2s + .where() + .txidWalletIdEqualTo(transactionEntry.hash, walletId) + .findFirst(); if (storedTx != null && storedTx.height != null && @@ -406,14 +392,15 @@ class XelisWallet extends LibXelisWallet { ); final Map otherData = {}; - final entryType = transactionEntry.txEntryType; + final entryType = transactionEntry.entryType; - if (entryType is xelis_sdk.CoinbaseEntry) { + if (entryType is CoinbaseEntryWrapper) { final coinbase = entryType; txType = TransactionType.incoming; - final int decimals = await libXelisWallet!.getAssetDecimals( - asset: xelis_sdk.xelisAsset, + final int decimals = await libXelis.getAssetDecimals( + wallet!, + asset: libXelis.xelisAsset, ); fee = Amount( @@ -430,11 +417,12 @@ class XelisWallet extends LibXelisWallet { ), ); otherData['overrideFee'] = fee.toJsonString(); - } else if (entryType is xelis_sdk.BurnEntry) { + } else if (entryType is BurnEntryWrapper) { final burn = entryType; txType = TransactionType.outgoing; - final int decimals = await libXelisWallet!.getAssetDecimals( + final int decimals = await libXelis.getAssetDecimals( + wallet!, asset: burn.asset, ); @@ -468,15 +456,15 @@ class XelisWallet extends LibXelisWallet { ); otherData['burnAsset'] = burn.asset; - } else if (entryType is xelis_sdk.IncomingEntry) { + } else if (entryType is IncomingEntryWrapper) { final incoming = entryType; - txType = - incoming.from == thisAddress - ? TransactionType.sentToSelf - : TransactionType.incoming; + txType = incoming.from == thisAddress + ? TransactionType.sentToSelf + : TransactionType.incoming; for (final transfer in incoming.transfers) { - final int decimals = await libXelisWallet!.getAssetDecimals( + final int decimals = await libXelis.getAssetDecimals( + wallet!, asset: transfer.asset, ); @@ -496,12 +484,11 @@ class XelisWallet extends LibXelisWallet { otherData['asset_${transfer.asset}'] = transfer.amount.toString(); if (transfer.extraData != null) { - otherData['extraData_${transfer.asset}'] = - transfer.extraData!.toJson(); + otherData['extraData_${transfer.asset}'] = transfer.extraData!; } otherData['overrideFee'] = fee.toJsonString(); } - } else if (entryType is xelis_sdk.OutgoingEntry) { + } else if (entryType is OutgoingEntryWrapper) { final outgoing = entryType; txType = TransactionType.outgoing; nonce = outgoing.nonce; @@ -551,11 +538,10 @@ class XelisWallet extends LibXelisWallet { ), ); - otherData['asset_${transfer.asset}_amount'] = - transfer.amount.toString(); + otherData['asset_${transfer.asset}_amount'] = transfer.amount + .toString(); if (transfer.extraData != null) { - otherData['extraData_${transfer.asset}'] = - transfer.extraData!.toJson(); + otherData['extraData_${transfer.asset}'] = transfer.extraData!; } } } else { @@ -639,26 +625,32 @@ class XelisWallet extends LibXelisWallet { try { checkInitialized(); - final recipients = - txData.recipients?.isNotEmpty == true - ? txData.recipients! - : throw ArgumentError( - 'Address cannot be empty.', - ); // in the future, support for multiple recipients will work. + final recipients = txData.recipients?.isNotEmpty == true + ? txData.recipients! + : throw ArgumentError( + 'Address cannot be empty.', + ); // in the future, support for multiple recipients will work. + + // but for now, no + // Validate recipients + if (recipients.length != 1) { + throw Exception("$runtimeType confirmSend requires 1 recipient"); + } - final asset = assetId ?? xelis_sdk.xelisAsset; + final asset = assetId ?? libXelis.xelisAsset; // Calculate total send amount - final totalSendAmount = recipients.fold( - Amount( - rawValue: BigInt.zero, - fractionDigits: cryptoCurrency.fractionDigits, - ), - (sum, recipient) => sum + recipient.amount, - ); + final totalSendAmount = recipients.first.amount; + // final totalSendAmount = recipients.fold( + // Amount( + // rawValue: BigInt.zero, + // fractionDigits: cryptoCurrency.fractionDigits, + // ), + // (sum, recipient) => sum + recipient.amount, + // ); // Check balance using raw method - final xelBalance = await libXelisWallet!.getXelisBalanceRaw(); + final xelBalance = await libXelis.getXelisBalanceRaw(wallet!); final balance = Amount( rawValue: xelBalance, fractionDigits: cryptoCurrency.fractionDigits, @@ -673,22 +665,38 @@ class XelisWallet extends LibXelisWallet { assetId: asset, ); - // Check if we have enough for both transfers and fee - if (totalSendAmount + boostedFee > balance) { - final requiredAmt = await libXelisWallet!.formatCoin( - atomicAmount: (totalSendAmount + boostedFee).raw, - assetHash: asset, + final isSendAll = xelBalance == totalSendAmount.raw; + if (isSendAll) { + txData = txData.copyWith( + recipients: [ + TxRecipient( + address: recipients.first.address, + amount: recipients.first.amount - boostedFee, + isChange: recipients.first.isChange, + addressType: recipients.first.addressType, + ), + ], ); + } else { + // Check if we have enough for both transfers and fee + if (totalSendAmount + boostedFee > balance) { + final requiredAmt = await libXelis.formatCoin( + wallet!, + atomicAmount: (totalSendAmount + boostedFee).raw, + assetHash: asset, + ); - final availableAmt = await libXelisWallet!.formatCoin( - atomicAmount: xelBalance, - assetHash: asset, - ); + final availableAmt = await libXelis.formatCoin( + wallet!, + atomicAmount: xelBalance, + assetHash: asset, + ); - throw Exception( - "Insufficient balance to cover transfers and fees. " - "Required: $requiredAmt, Available: $availableAmt", - ); + throw Exception( + "Insufficient balance to cover transfers and fees. " + "Required: $requiredAmt, Available: $availableAmt", + ); + } } return txData.copyWith( @@ -714,37 +722,37 @@ class XelisWallet extends LibXelisWallet { }) async { try { checkInitialized(); - final asset = assetId ?? xelis_sdk.xelisAsset; + final asset = assetId ?? libXelis.xelisAsset; // Default values for a new wallet or when estimation fails final defaultDecimals = cryptoCurrency.fractionDigits; final defaultFee = BigInt.from(0); // Use default address if recipients list is empty to ensure basic fee estimates are readily available - final effectiveRecipients = - recipients.isNotEmpty - ? recipients - : [ - TxRecipient( - address: - 'xel:xz9574c80c4xegnvurazpmxhw5dlg2n0g9qm60uwgt75uqyx3pcsqzzra9m', - amount: amount, - isChange: false, - addressType: AddressType.xelis, - ), - ]; + final effectiveRecipients = recipients.isNotEmpty + ? recipients + : [ + TxRecipient( + address: + 'xel:xz9574c80c4xegnvurazpmxhw5dlg2n0g9qm60uwgt75uqyx3pcsqzzra9m', + amount: amount, + isChange: false, + addressType: AddressType.xelis, + ), + ]; try { final transfers = await Future.wait( effectiveRecipients.map((recipient) async { try { final amt = double.parse( - await libXelisWallet!.formatCoin( + await libXelis.formatCoin( + wallet!, atomicAmount: recipient.amount.raw, assetHash: asset, ), ); - return x_wallet.Transfer( + return WrappedTransfer( floatAmount: amt, strAddress: recipient.address, assetHash: asset, @@ -760,7 +768,7 @@ class XelisWallet extends LibXelisWallet { final rawAmount = recipient.amount.raw; final floatAmount = rawAmount / BigInt.from(10).pow(defaultDecimals); - return x_wallet.Transfer( + return WrappedTransfer( floatAmount: floatAmount.toDouble(), strAddress: recipient.address, assetHash: asset, @@ -770,9 +778,9 @@ class XelisWallet extends LibXelisWallet { }), ); - final decimals = await libXelisWallet!.getAssetDecimals(asset: asset); + final decimals = await libXelis.getAssetDecimals(wallet!, asset: asset); final estimatedFee = double.parse( - await libXelisWallet!.estimateFees(transfers: transfers), + await libXelis.estimateFees(wallet!, transfers: transfers), ); final rawFee = (estimatedFee * pow(10, decimals)).round(); return Amount( @@ -817,19 +825,21 @@ class XelisWallet extends LibXelisWallet { ? jsonDecode(txData.otherData!) : null)?['asset'] as String? ?? - xelis_sdk.xelisAsset; + libXelis.xelisAsset; final amt = double.parse( - await libXelisWallet!.formatCoin( + await libXelis.formatCoin( + wallet!, atomicAmount: sendAmount.raw, assetHash: asset, ), ); // Create a transfer transaction - final txJson = await libXelisWallet!.createTransfersTransaction( + final txJson = await libXelis.createTransfersTransaction( + wallet!, transfers: [ - x_wallet.Transfer( + WrappedTransfer( floatAmount: amt, strAddress: recipient.address, assetHash: asset, @@ -842,7 +852,7 @@ class XelisWallet extends LibXelisWallet { final txHash = txMap['hash'] as String; // Broadcast the transaction - await libXelisWallet!.broadcastTransaction(txHash: txHash); + await libXelis.broadcastTransaction(wallet!, txHash: txHash); return await updateSentCachedTxData( txData: txData.copyWith(txid: txHash), @@ -862,11 +872,11 @@ class XelisWallet extends LibXelisWallet { switch (event) { case NewTopoheight(:final height): await handleNewTopoHeight(height); - case NewAsset(:final asset): - await handleNewAsset(asset); + case NewAsset(): + await handleNewAsset(event); case NewTransaction(:final transaction): await handleNewTransaction(transaction); - case BalanceChanged(:final event): + case BalanceChanged(): await handleBalanceChanged(event); case Rescan(:final startTopoheight): await handleRescan(startTopoheight); @@ -892,7 +902,7 @@ class XelisWallet extends LibXelisWallet { } @override - Future handleNewTransaction(xelis_sdk.TransactionEntry tx) async { + Future handleNewTransaction(TransactionEntryWrapper tx) async { try { final txList = [tx]; final newTxIds = await updateTransactions( @@ -916,10 +926,10 @@ class XelisWallet extends LibXelisWallet { } @override - Future handleBalanceChanged(xelis_sdk.BalanceChangedEvent event) async { + Future handleBalanceChanged(BalanceChanged event) async { try { - final asset = event.assetHash; - if (asset == xelis_sdk.xelisAsset) { + final asset = event.asset; + if (asset == libXelis.xelisAsset) { await updateBalance(newBalance: event.balance); } @@ -983,7 +993,7 @@ class XelisWallet extends LibXelisWallet { } @override - Future handleNewAsset(xelis_sdk.AssetData asset) async { + Future handleNewAsset(NewAsset asset) async { // TODO: Store asset information if needed // TODO: Update UI/state for new asset Logging.instance.d("New xelis asset detected: $asset"); @@ -993,7 +1003,7 @@ class XelisWallet extends LibXelisWallet { Future refresh({int? topoheight}) async { await refreshMutex.protect(() async { try { - final bool online = await libXelisWallet!.isOnline(); + final bool online = await libXelis.isOnline(wallet!); if (online == true) { await updateChainHeight(topoheight: topoheight); await updateBalance(); diff --git a/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart b/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart index 777dda064..e6ad147d6 100644 --- a/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart +++ b/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:bip39/bip39.dart' as bip39; import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/balance.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -48,8 +48,9 @@ abstract class Bip39HDWallet extends Bip39Wallet ...privateKey.data, if (privateKey.compressed) 1, ]; - final checksum = - coinlib.sha256DoubleHash(Uint8List.fromList(data)).sublist(0, 4); + final checksum = coinlib + .sha256DoubleHash(Uint8List.fromList(data)) + .sublist(0, 4); data.addAll(checksum); return Uint8List.fromList(data).toBase58Encoded; @@ -64,13 +65,14 @@ abstract class Bip39HDWallet extends Bip39Wallet ); } - final current = await mainDB.isar.addresses - .where() - .walletIdEqualTo(walletId) - .filter() - .typeEqualTo(derivePathType.getAddressType()) - .sortByDerivationIndexDesc() - .findFirst(); + final current = + await mainDB.isar.addresses + .where() + .walletIdEqualTo(walletId) + .filter() + .typeEqualTo(derivePathType.getAddressType()) + .sortByDerivationIndexDesc() + .findFirst(); final index = current == null ? 0 : current.derivationIndex + 1; const chain = 0; // receiving address final address = await _generateAddress( @@ -84,31 +86,25 @@ abstract class Bip39HDWallet extends Bip39Wallet @override List get standardReceivingAddressFilters => [ - // view only only have a single derivation path currently - if (!isViewOnly) - FilterCondition.equalTo( - property: r"type", - value: info.mainAddressType, - ), - const FilterCondition.equalTo( - property: r"subType", - value: AddressSubType.receiving, - ), - ]; + // view only only have a single derivation path currently + if (!isViewOnly) + FilterCondition.equalTo(property: r"type", value: info.mainAddressType), + const FilterCondition.equalTo( + property: r"subType", + value: AddressSubType.receiving, + ), + ]; @override List get standardChangeAddressFilters => [ - // view only only have a single derivation path currently - if (!isViewOnly) - FilterCondition.equalTo( - property: r"type", - value: info.mainAddressType, - ), - const FilterCondition.equalTo( - property: r"subType", - value: AddressSubType.change, - ), - ]; + // view only only have a single derivation path currently + if (!isViewOnly) + FilterCondition.equalTo(property: r"type", value: info.mainAddressType), + const FilterCondition.equalTo( + property: r"subType", + value: AddressSubType.change, + ), + ]; /// Generates a receiving address. If none /// are in the current wallet db it will generate at index 0, otherwise the @@ -214,9 +210,7 @@ abstract class Bip39HDWallet extends Bip39Wallet } } - throw Exception( - "_viewOnlyPathHelper viewOnly failed to match paths", - ); + throw Exception("_viewOnlyPathHelper viewOnly failed to match paths"); } DerivePathType _fromAddressType(AddressType addressType) { diff --git a/lib/wallets/wallet/intermediate/bip39_wallet.dart b/lib/wallets/wallet/intermediate/bip39_wallet.dart index 0d302d0a9..05a7e40a2 100644 --- a/lib/wallets/wallet/intermediate/bip39_wallet.dart +++ b/lib/wallets/wallet/intermediate/bip39_wallet.dart @@ -1,4 +1,5 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; + import '../../../models/isar/models/blockchain_data/address.dart'; import '../../crypto_currency/intermediate/bip39_currency.dart'; import '../wallet.dart'; @@ -9,26 +10,20 @@ abstract class Bip39Wallet extends Wallet Bip39Wallet(super.currency); List get standardReceivingAddressFilters => [ - FilterCondition.equalTo( - property: r"type", - value: info.mainAddressType, - ), - const FilterCondition.equalTo( - property: r"subType", - value: AddressSubType.receiving, - ), - ]; + FilterCondition.equalTo(property: r"type", value: info.mainAddressType), + const FilterCondition.equalTo( + property: r"subType", + value: AddressSubType.receiving, + ), + ]; List get standardChangeAddressFilters => [ - FilterCondition.equalTo( - property: r"type", - value: info.mainAddressType, - ), - const FilterCondition.equalTo( - property: r"subType", - value: AddressSubType.change, - ), - ]; + FilterCondition.equalTo(property: r"type", value: info.mainAddressType), + const FilterCondition.equalTo( + property: r"subType", + value: AddressSubType.change, + ), + ]; // ========== Private ======================================================== diff --git a/lib/wallets/wallet/intermediate/lib_monero_wallet.dart b/lib/wallets/wallet/intermediate/lib_monero_wallet.dart index d29e97976..e5f91c4ff 100644 --- a/lib/wallets/wallet/intermediate/lib_monero_wallet.dart +++ b/lib/wallets/wallet/intermediate/lib_monero_wallet.dart @@ -4,11 +4,11 @@ import 'dart:io'; import 'dart:math'; import 'package:compat/compat.dart' as lib_monero_compat; -import 'package:cs_monero/cs_monero.dart' as lib_monero; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; import 'package:stack_wallet_backup/generate_password.dart'; +import '../../../app_config.dart'; import '../../../db/hive/db.dart'; import '../../../models/balance.dart'; import '../../../models/input.dart'; @@ -34,6 +34,8 @@ import '../../../utilities/amount/amount.dart'; import '../../../utilities/enums/fee_rate_type_enum.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/stack_file_system.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../../crypto_currency/intermediate/cryptonote_currency.dart'; import '../../isar/models/wallet_info.dart'; import '../../models/tx_data.dart'; @@ -49,6 +51,8 @@ abstract class LibMoneroWallet @override int get isarTransactionVersion => 2; + WrappedWallet? wallet; + LibMoneroWallet(super.currency, this.compatType) { final bus = GlobalEventBus.instance; @@ -99,14 +103,13 @@ abstract class LibMoneroWallet await onUTXOsChanged(utxos); await updateBalance(shouldUpdateUtxos: false); } catch (e, s) { - lib_monero.Logging.log?.i("_startInit", error: e, stackTrace: s); + Logging.instance.e("_startInit", error: e, stackTrace: s); } }); }); } final lib_monero_compat.WalletType compatType; - lib_monero.Wallet? libMoneroWallet; lib_monero_compat.SyncStatus? get syncStatus => _syncStatus; lib_monero_compat.SyncStatus? _syncStatus; @@ -135,16 +138,19 @@ abstract class LibMoneroWallet int currentKnownChainHeight = 0; double highestPercentCached = 0; - Future loadWallet({required String path, required String password}); + Future loadWallet({ + required String path, + required String password, + }); - Future getCreatedWallet({ + Future getCreatedWallet({ required String path, required String password, required int wordCount, required String seedOffset, }); - Future getRestoredWallet({ + Future getRestoredWallet({ required String path, required String password, required String mnemonic, @@ -152,7 +158,7 @@ abstract class LibMoneroWallet int height = 0, }); - Future getRestoredFromViewKeyWallet({ + Future getRestoredFromViewKeyWallet({ required String path, required String password, required String address, @@ -165,16 +171,17 @@ abstract class LibMoneroWallet bool walletExists(String path); String getTxKeyFor({required String txid}) { - if (libMoneroWallet == null) { + if (wallet == null) { throw Exception("Cannot get tx key in uninitialized libMoneroWallet"); } - return libMoneroWallet!.getTxKey(txid); + return csMonero.getTxKey(wallet!, txid); } void _setListener() { - if (libMoneroWallet != null && libMoneroWallet!.getListeners().isEmpty) { - libMoneroWallet?.addListener( - lib_monero.WalletListener( + if (wallet != null && !csMonero.hasListeners(wallet!)) { + csMonero.addListener( + wallet!, + CsWalletListener( onSyncingUpdate: onSyncingUpdate, onNewBlock: onNewBlock, onBalancesChanged: onBalancesChanged, @@ -190,22 +197,21 @@ abstract class LibMoneroWallet Future open() async { bool wasNull = false; - if (libMoneroWallet == null) { + if (wallet == null) { wasNull = true; // libMoneroWalletT?.close(); final path = await pathForWallet(name: walletId, type: compatType); final String password; try { - password = - (await secureStorageInterface.read( - key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), - ))!; + password = (await secureStorageInterface.read( + key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), + ))!; } catch (e, s) { throw Exception("Password not found $e, $s"); } - await loadWallet(path: path, password: password); + wallet = await loadWallet(path: path, password: password); _setListener(); @@ -227,15 +233,15 @@ abstract class LibMoneroWallet if (wasNull) { try { _setSyncStatus(lib_monero_compat.ConnectingSyncStatus()); - libMoneroWallet?.startSyncing(); + csMonero.startSyncing(wallet!); } catch (_) { _setSyncStatus(lib_monero_compat.FailedSyncStatus()); // TODO log } } _setListener(); - libMoneroWallet?.startListeners(); - libMoneroWallet?.startAutoSaving(); + csMonero.startListeners(wallet!); + csMonero.startAutoSaving(wallet!); unawaited(refresh()); } @@ -260,16 +266,17 @@ abstract class LibMoneroWallet appRoot: appRoot, ); } - await libMoneroWallet!.save(); + await csMonero.save(wallet!); } Address addressFor({required int index, int account = 0}) { - final address = libMoneroWallet!.getAddress( + final address = csMonero.getAddress( + wallet!, accountIndex: account, addressIndex: index, ); - if (address.value.contains("111")) { + if (address.contains("111")) { throw Exception("111 address found!"); } @@ -277,7 +284,7 @@ abstract class LibMoneroWallet walletId: walletId, derivationIndex: index, derivationPath: null, - value: address.value, + value: address, publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -287,19 +294,17 @@ abstract class LibMoneroWallet } Future getKeys() async { - final base = libMoneroWallet; - final oldInfo = getLibMoneroWalletInfo(walletId); - if (base == null || (oldInfo != null && oldInfo.name != walletId)) { + if (wallet == null || (oldInfo != null && oldInfo.name != walletId)) { return null; } try { return CWKeyData( walletId: walletId, - publicViewKey: base.getPublicViewKey(), - privateViewKey: base.getPrivateViewKey(), - publicSpendKey: base.getPublicSpendKey(), - privateSpendKey: base.getPrivateSpendKey(), + publicViewKey: csMonero.getPublicViewKey(wallet!), + privateViewKey: csMonero.getPrivateViewKey(wallet!), + publicSpendKey: csMonero.getPublicSpendKey(wallet!), + privateSpendKey: csMonero.getPrivateSpendKey(wallet!), ); } catch (e, s) { Logging.instance.f("getKeys failed: ", error: e, stackTrace: s); @@ -318,16 +323,14 @@ abstract class LibMoneroWallet final path = await pathForWallet(name: walletId, type: compatType); final String password; try { - password = - (await secureStorageInterface.read( - key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), - ))!; + password = (await secureStorageInterface.read( + key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), + ))!; } catch (e, s) { throw Exception("Password not found $e, $s"); } - await loadWallet(path: path, password: password); - final wallet = libMoneroWallet!; - return (wallet.getAddress().value, wallet.getPrivateViewKey()); + wallet = await loadWallet(path: path, password: password); + return (csMonero.getAddress(wallet!), csMonero.getPrivateViewKey(wallet!)); } @override @@ -343,6 +346,7 @@ abstract class LibMoneroWallet key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), value: password, ); + final wallet = await getCreatedWallet( path: path, password: password, @@ -350,10 +354,8 @@ abstract class LibMoneroWallet seedOffset: "", // default for non restored wallets for now ); - final height = wallet.getRefreshFromBlockHeight(); - await info.updateRestoreHeight( - newRestoreHeight: height, + newRestoreHeight: csMonero.getRefreshFromBlockHeight(wallet), isar: mainDB.isar, ); @@ -361,7 +363,7 @@ abstract class LibMoneroWallet // before wallet.init() is called await secureStorageInterface.write( key: Wallet.mnemonicKey(walletId: walletId), - value: wallet.getSeed().trim(), + value: csMonero.getSeed(wallet), ); await secureStorageInterface.write( key: Wallet.mnemonicPassphraseKey(walletId: walletId), @@ -384,8 +386,8 @@ abstract class LibMoneroWallet await mainDB.deleteWalletBlockchainData(walletId); highestPercentCached = 0; - unawaited(libMoneroWallet?.rescanBlockchain()); - libMoneroWallet?.startSyncing(); + unawaited(csMonero.rescanBlockchain(wallet!)); + csMonero.startSyncing(wallet!); // unawaited(save()); }); unawaited(refresh()); @@ -422,6 +424,7 @@ abstract class LibMoneroWallet key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), value: password, ); + final wallet = await getRestoredWallet( path: path, password: password, @@ -430,11 +433,11 @@ abstract class LibMoneroWallet seedOffset: seedOffset, ); - if (libMoneroWallet != null) { + if (this.wallet != null) { await exit(); } - libMoneroWallet = wallet; + this.wallet = wallet; _setListener(); @@ -444,7 +447,7 @@ abstract class LibMoneroWallet walletId: walletId, derivationIndex: 0, derivationPath: null, - value: wallet.getAddress().value, + value: csMonero.getAddress(this.wallet!), publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -463,12 +466,12 @@ abstract class LibMoneroWallet _setListener(); // libMoneroWallet?.setRecoveringFromSeed(isRecovery: true); - unawaited(libMoneroWallet?.rescanBlockchain()); - libMoneroWallet?.startSyncing(); + unawaited(csMonero.rescanBlockchain(wallet!)); + csMonero.startSyncing(wallet!); // await save(); - libMoneroWallet?.startListeners(); - libMoneroWallet?.startAutoSaving(); + csMonero.startListeners(wallet!); + csMonero.startAutoSaving(wallet!); } catch (e, s) { Logging.instance.e( "Exception rethrown from recoverFromMnemonic(): ", @@ -484,11 +487,11 @@ abstract class LibMoneroWallet bool _canPing = false; @override - Future pingCheck() async { + Future pingCheck() { if (_canPing) { - return (await libMoneroWallet?.isConnectedToDaemon()) ?? false; + return csMonero.isConnectedToDaemon(wallet!); } else { - return false; + return Future.value(false); } } @@ -500,50 +503,50 @@ abstract class LibMoneroWallet throw Exception("TOR – clearnet mismatch"); } - final host = - node.host.endsWith(".onion") ? node.host : Uri.parse(node.host).host; - ({InternetAddress host, int port})? proxy; - proxy = - prefs.useTor && !node.forceNoTor - ? TorService.sharedInstance.getProxyInfo() - : null; + final host = node.host.endsWith(".onion") + ? node.host + : Uri.parse(node.host).host; + final ({InternetAddress host, int port})? proxy = + AppConfig.hasFeature(AppFeature.tor) && prefs.useTor && !node.forceNoTor + ? TorService.sharedInstance.getProxyInfo() + : null; _setSyncStatus(lib_monero_compat.ConnectingSyncStatus()); try { if (_requireMutex) { await _torConnectingLock.protect(() async { - await libMoneroWallet?.connect( + await csMonero.connect( + wallet!, daemonAddress: "$host:${node.port}", daemonUsername: node.loginName, daemonPassword: await node.getPassword(secureStorageInterface), trusted: node.trusted ?? false, useSSL: node.useSSL, - socksProxyAddress: - node.forceNoTor - ? null - : proxy == null - ? null - : "${proxy.host.address}:${proxy.port}", + socksProxyAddress: node.forceNoTor + ? null + : proxy == null + ? null + : "${proxy.host.address}:${proxy.port}", ); }); } else { - await libMoneroWallet?.connect( + await csMonero.connect( + wallet!, daemonAddress: "$host:${node.port}", daemonUsername: node.loginName, daemonPassword: await node.getPassword(secureStorageInterface), trusted: node.trusted ?? false, useSSL: node.useSSL, - socksProxyAddress: - node.forceNoTor - ? null - : proxy == null - ? null - : "${proxy.host.address}:${proxy.port}", + socksProxyAddress: node.forceNoTor + ? null + : proxy == null + ? null + : "${proxy.host.address}:${proxy.port}", ); } - libMoneroWallet?.startSyncing(); - libMoneroWallet?.startListeners(); - libMoneroWallet?.startAutoSaving(); + csMonero.startSyncing(wallet!); + csMonero.startListeners(wallet!); + csMonero.startAutoSaving(wallet!); _setSyncStatus(lib_monero_compat.ConnectedSyncStatus()); } catch (e, s) { @@ -560,22 +563,19 @@ abstract class LibMoneroWallet @override Future updateTransactions() async { - final base = libMoneroWallet; - - if (base == null) { + if (wallet == null) { return; } - final localTxids = - await mainDB.isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .filter() - .heightGreaterThan(0) - .txidProperty() - .findAll(); + final localTxids = await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .heightGreaterThan(0) + .txidProperty() + .findAll(); - final allTxids = await base.getAllTxids(refresh: true); + final allTxids = await csMonero.getAllTxids(wallet!, refresh: true); final txidsToFetch = allTxids.toSet().difference(localTxids.toSet()); @@ -583,9 +583,17 @@ abstract class LibMoneroWallet return; } - final transactions = await base.getTxs(txids: txidsToFetch, refresh: false); + final transactions = await csMonero.getTxs( + wallet!, + txids: txidsToFetch, + refresh: false, + ); - final allOutputs = await base.getOutputs(includeSpent: true, refresh: true); + final allOutputs = await csMonero.getOutputs( + wallet!, + includeSpent: true, + refresh: true, + ); // final cachedTransactions = // DB.instance.get(boxName: walletId, key: 'latest_tx_model') @@ -671,16 +679,14 @@ abstract class LibMoneroWallet type: type, subType: TransactionSubType.none, otherData: jsonEncode({ - TxV2OdKeys.overrideFee: - Amount( - rawValue: tx.fee, - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), - TxV2OdKeys.moneroAmount: - Amount( - rawValue: tx.amount, - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), + TxV2OdKeys.overrideFee: Amount( + rawValue: tx.fee, + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), + TxV2OdKeys.moneroAmount: Amount( + rawValue: tx.amount, + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), TxV2OdKeys.moneroAccountIndex: tx.accountIndex, TxV2OdKeys.isMoneroTransaction: true, }), @@ -695,7 +701,7 @@ abstract class LibMoneroWallet Future get availableBalance async { try { return Amount( - rawValue: libMoneroWallet!.getUnlockedBalance(), + rawValue: csMonero.getUnlockedBalance(wallet!)!, fractionDigits: cryptoCurrency.fractionDigits, ); } catch (_) { @@ -705,14 +711,14 @@ abstract class LibMoneroWallet Future get totalBalance async { try { - final full = libMoneroWallet?.getBalance(); + final full = csMonero.getBalance(wallet!); if (full != null) { return Amount( rawValue: full, fractionDigits: cryptoCurrency.fractionDigits, ); } else { - final transactions = await libMoneroWallet!.getAllTxs(refresh: true); + final transactions = await csMonero.getAllTxs(wallet!, refresh: true); BigInt transactionBalance = BigInt.zero; for (final tx in transactions) { if (!tx.isSpend) { @@ -734,11 +740,13 @@ abstract class LibMoneroWallet @override Future exit() async { - Logging.instance.i("exit called on $walletId"); - libMoneroWallet?.stopAutoSaving(); - libMoneroWallet?.stopListeners(); - libMoneroWallet?.stopSyncing(); - await libMoneroWallet?.save(); + Logging.instance.i("exit called on $wallet!"); + if (wallet != null) { + csMonero.stopAutoSaving(wallet!); + csMonero.stopListeners(wallet!); + csMonero.stopSyncing(wallet!); + await csMonero.save(wallet!); + } } Future pathForWalletDir({ @@ -819,8 +827,17 @@ abstract class LibMoneroWallet final _utxosUpdateLock = Mutex(); Future onUTXOsChanged(List utxos) async { + if (wallet == null) { + Logging.instance.w( + "onUTXOsChanged triggered while cs_monero wallet is null. If this " + "occurs while not in a monero/wownero wallet this warning can be " + "ignored.", + ); + return; + } + await _utxosUpdateLock.protect(() async { - final cwUtxos = await libMoneroWallet?.getOutputs(refresh: true) ?? []; + final cwUtxos = await csMonero.getOutputs(wallet!, refresh: true); // bool changed = false; @@ -837,12 +854,12 @@ abstract class LibMoneroWallet if (u.isBlocked) { if (!cw.isFrozen) { - await libMoneroWallet?.freezeOutput(cw.keyImage); + await csMonero.freezeOutput(wallet!, cw.keyImage); // changed = true; } } else { if (cw.isFrozen) { - await libMoneroWallet?.thawOutput(cw.keyImage); + await csMonero.thawOutput(wallet!, cw.keyImage); // changed = true; } } @@ -999,9 +1016,11 @@ abstract class LibMoneroWallet if (mismatch) { _canPing = false; - libMoneroWallet?.stopAutoSaving(); - libMoneroWallet?.stopListeners(); - libMoneroWallet?.stopSyncing(); + if (wallet != null) { + csMonero.stopAutoSaving(wallet!); + csMonero.stopListeners(wallet!); + csMonero.stopSyncing(wallet!); + } _setSyncStatus(lib_monero_compat.FailedSyncStatus()); } @@ -1019,27 +1038,25 @@ abstract class LibMoneroWallet @override Future updateUTXOs() async { final List outputArray = []; - final utxos = - await libMoneroWallet?.getOutputs(refresh: true) ?? - []; + final utxos = wallet == null + ? [] + : await csMonero.getOutputs(wallet!, refresh: true); for (final rawUTXO in utxos) { if (!rawUTXO.spent) { - final current = - await mainDB.isar.utxos - .where() - .walletIdEqualTo(walletId) - .filter() - .voutEqualTo(rawUTXO.vout) - .and() - .txidEqualTo(rawUTXO.hash) - .findFirst(); - final tx = - await mainDB.isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .filter() - .txidEqualTo(rawUTXO.hash) - .findFirst(); + final current = await mainDB.isar.utxos + .where() + .walletIdEqualTo(walletId) + .filter() + .voutEqualTo(rawUTXO.vout) + .and() + .txidEqualTo(rawUTXO.hash) + .findFirst(); + final tx = await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .txidEqualTo(rawUTXO.hash) + .findFirst(); final otherDataMap = { UTXOOtherDataKeys.keyImage: rawUTXO.keyImage, @@ -1112,7 +1129,7 @@ abstract class LibMoneroWallet // Slight possibility of race but should be irrelevant await refreshMutex.acquire(); - libMoneroWallet?.startSyncing(); + csMonero.startSyncing(wallet!); _setSyncStatus(lib_monero_compat.StartingSyncStatus()); await updateTransactions(); @@ -1126,9 +1143,9 @@ abstract class LibMoneroWallet refreshMutex.release(); } - final synced = await libMoneroWallet?.isSynced(); + final synced = wallet != null && await csMonero.isSynced(wallet!); - if (synced == true) { + if (synced) { _setSyncStatus(lib_monero_compat.SyncedSyncStatus()); } } @@ -1138,8 +1155,9 @@ abstract class LibMoneroWallet try { final currentReceiving = await getCurrentReceivingAddress(); - final newReceivingIndex = - currentReceiving == null ? 0 : currentReceiving.derivationIndex + 1; + final newReceivingIndex = currentReceiving == null + ? 0 + : currentReceiving.derivationIndex + 1; final newReceivingAddress = addressFor(index: newReceivingIndex); @@ -1174,17 +1192,14 @@ abstract class LibMoneroWallet try { int highestIndex = -1; - final entries = await libMoneroWallet?.getAllTxs(refresh: true); - if (entries != null) { - for (final element in entries) { - if (!element.isSpend) { - final int curAddressIndex = - element.addressIndexes.isEmpty - ? 0 - : element.addressIndexes.reduce(max); - if (curAddressIndex > highestIndex) { - highestIndex = curAddressIndex; - } + final entries = await csMonero.getAllTxs(wallet!, refresh: true); + for (final element in entries) { + if (!element.isSpend) { + final int curAddressIndex = element.addressIndexes.isEmpty + ? 0 + : element.addressIndexes.reduce(max); + if (curAddressIndex > highestIndex) { + highestIndex = curAddressIndex; } } } @@ -1200,12 +1215,11 @@ abstract class LibMoneroWallet // Use new index to derive a new receiving address final newReceivingAddress = addressFor(index: newReceivingIndex); - final existing = - await mainDB - .getAddresses(walletId) - .filter() - .valueEqualTo(newReceivingAddress.value) - .findFirst(); + final existing = await mainDB + .getAddresses(walletId) + .filter() + .valueEqualTo(newReceivingAddress.value) + .findFirst(); if (existing == null) { // Add that new change address await mainDB.putAddress(newReceivingAddress); @@ -1241,9 +1255,9 @@ abstract class LibMoneroWallet numberOfBlocksFast: 10, numberOfBlocksAverage: 15, numberOfBlocksSlow: 20, - fast: BigInt.from(lib_monero.TransactionPriority.high.value), - medium: BigInt.from(lib_monero.TransactionPriority.medium.value), - slow: BigInt.from(lib_monero.TransactionPriority.normal.value), + fast: BigInt.from(csMonero.getTxPriorityHigh()), + medium: BigInt.from(csMonero.getTxPriorityMedium()), + slow: BigInt.from(csMonero.getTxPriorityNormal()), ); @override @@ -1269,16 +1283,16 @@ abstract class LibMoneroWallet try { final feeRate = txData.feeRateType; if (feeRate is FeeRateType) { - lib_monero.TransactionPriority feePriority; + final int feePriority; switch (feeRate) { case FeeRateType.fast: - feePriority = lib_monero.TransactionPriority.high; + feePriority = csMonero.getTxPriorityHigh(); break; case FeeRateType.average: - feePriority = lib_monero.TransactionPriority.medium; + feePriority = csMonero.getTxPriorityMedium(); break; case FeeRateType.slow: - feePriority = lib_monero.TransactionPriority.normal; + feePriority = csMonero.getTxPriorityNormal(); break; default: throw ArgumentError("Invalid use of custom fee"); @@ -1303,12 +1317,9 @@ abstract class LibMoneroWallet throw Exception("Send all not supported with multiple recipients"); } - final List outputs = []; + final List outputs = []; for (final recipient in txData.recipients!) { - final output = lib_monero.Recipient( - address: recipient.address, - amount: recipient.amount.raw, - ); + final output = CsRecipient(recipient.address, recipient.amount.raw); outputs.add(output); } @@ -1318,44 +1329,27 @@ abstract class LibMoneroWallet } final height = await chainHeight; - final inputs = - txData.utxos - ?.whereType() - .map( - (e) => lib_monero.Output( - address: e.address!, - hash: e.utxo.txid, - keyImage: e.utxo.keyImage!, - value: e.value, - isFrozen: e.utxo.isBlocked, - isUnlocked: - e.utxo.blockHeight != null && - (height - (e.utxo.blockHeight ?? 0)) >= - cryptoCurrency.minConfirms, - height: e.utxo.blockHeight ?? 0, - vout: e.utxo.vout, - spent: e.utxo.used ?? false, - spentHeight: null, // doesn't matter here - coinbase: e.utxo.isCoinbase, - ), - ) - .toList(); + final inputs = txData.utxos?.whereType().toList(); return await prepareSendMutex.protect(() async { - final lib_monero.PendingTransaction pendingTransaction; + final CsPendingTransaction pendingTransaction; if (outputs.length == 1) { - pendingTransaction = await libMoneroWallet!.createTx( + pendingTransaction = await csMonero.createTx( + wallet!, + minConfirms: cryptoCurrency.minConfirms, + currentHeight: height, output: outputs.first, - paymentId: "", sweep: sweep, priority: feePriority, preferredInputs: inputs, accountIndex: 0, // sw only uses account 0 at this time ); } else { - pendingTransaction = await libMoneroWallet!.createTxMultiDest( + pendingTransaction = await csMonero.createTxMultiDest( + wallet!, + minConfirms: cryptoCurrency.minConfirms, + currentHeight: height, outputs: outputs, - paymentId: "", priority: feePriority, preferredInputs: inputs, sweep: sweep, @@ -1398,7 +1392,7 @@ abstract class LibMoneroWallet Future confirmSend({required TxData txData}) async { try { try { - await libMoneroWallet!.commitTx(txData.pendingTransaction!); + await csMonero.commitTx(wallet!, txData.pendingTransaction!); Logging.instance.d( "transaction ${txData.pendingTransaction!.txid} has been sent", @@ -1447,6 +1441,7 @@ abstract class LibMoneroWallet key: lib_monero_compat.libMoneroWalletPasswordKey(walletId), value: password, ); + final wallet = await getRestoredFromViewKeyWallet( path: path, password: password, @@ -1455,11 +1450,10 @@ abstract class LibMoneroWallet height: height, ); - if (libMoneroWallet != null) { + if (this.wallet == null) { await exit(); } - - libMoneroWallet = wallet; + this.wallet = wallet; _setListener(); @@ -1469,7 +1463,7 @@ abstract class LibMoneroWallet walletId: walletId, derivationIndex: 0, derivationPath: null, - value: wallet.getAddress().value, + value: csMonero.getAddress(this.wallet!), publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -1484,12 +1478,12 @@ abstract class LibMoneroWallet await updateNode(); _setListener(); - unawaited(libMoneroWallet?.rescanBlockchain()); - libMoneroWallet?.startSyncing(); + unawaited(csMonero.rescanBlockchain(this.wallet!)); + csMonero.startSyncing(this.wallet!); // await save(); - libMoneroWallet?.startListeners(); - libMoneroWallet?.startAutoSaving(); + csMonero.startListeners(this.wallet!); + csMonero.startAutoSaving(this.wallet!); } catch (e, s) { Logging.instance.e( "Exception rethrown from recoverViewOnly(): ", diff --git a/lib/wallets/wallet/intermediate/lib_salvium_wallet.dart b/lib/wallets/wallet/intermediate/lib_salvium_wallet.dart index f18cba8d0..4081c9012 100644 --- a/lib/wallets/wallet/intermediate/lib_salvium_wallet.dart +++ b/lib/wallets/wallet/intermediate/lib_salvium_wallet.dart @@ -3,11 +3,11 @@ import 'dart:convert'; import 'dart:io'; import 'dart:math'; -import 'package:cs_salvium/cs_salvium.dart' as lib_salvium; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; import 'package:stack_wallet_backup/generate_password.dart'; +import '../../../app_config.dart'; import '../../../models/balance.dart'; import '../../../models/input.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; @@ -32,6 +32,8 @@ import '../../../utilities/amount/amount.dart'; import '../../../utilities/enums/fee_rate_type_enum.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/stack_file_system.dart'; +import '../../../wl_gen/interfaces/cs_monero_interface.dart'; +import '../../../wl_gen/interfaces/cs_salvium_interface.dart'; import '../../crypto_currency/intermediate/cryptonote_currency.dart'; import '../../isar/models/wallet_info.dart'; import '../../models/tx_data.dart'; @@ -47,6 +49,8 @@ abstract class LibSalviumWallet @override int get isarTransactionVersion => 2; + WrappedWallet? wallet; + LibSalviumWallet(super.currency) { final bus = GlobalEventBus.instance; @@ -97,14 +101,12 @@ abstract class LibSalviumWallet await onUTXOsChanged(utxos); await updateBalance(shouldUpdateUtxos: false); } catch (e, s) { - lib_salvium.Logging.log?.i("_startInit", error: e, stackTrace: s); + Logging.instance.e("_startInit", error: e, stackTrace: s); } }); }); } - lib_salvium.Wallet? libSalviumWallet; - SyncStatus? get syncStatus => _syncStatus; SyncStatus? _syncStatus; int _syncedCount = 0; @@ -132,16 +134,19 @@ abstract class LibSalviumWallet int currentKnownChainHeight = 0; double highestPercentCached = 0; - Future loadWallet({required String path, required String password}); + Future loadWallet({ + required String path, + required String password, + }); - Future getCreatedWallet({ + Future getCreatedWallet({ required String path, required String password, required int wordCount, required String seedOffset, }); - Future getRestoredWallet({ + Future getRestoredWallet({ required String path, required String password, required String mnemonic, @@ -149,7 +154,7 @@ abstract class LibSalviumWallet int height = 0, }); - Future getRestoredFromViewKeyWallet({ + Future getRestoredFromViewKeyWallet({ required String path, required String password, required String address, @@ -162,16 +167,17 @@ abstract class LibSalviumWallet bool walletExists(String path); String getTxKeyFor({required String txid}) { - if (libSalviumWallet == null) { + if (wallet == null) { throw Exception("Cannot get tx key in uninitialized libSalviumWallet"); } - return libSalviumWallet!.getTxKey(txid); + return csSalvium.getTxKey(wallet!, txid); } void _setListener() { - if (libSalviumWallet != null && libSalviumWallet!.getListeners().isEmpty) { - libSalviumWallet?.addListener( - lib_salvium.WalletListener( + if (wallet != null && !csSalvium.hasListeners(wallet!)) { + csSalvium.addListener( + wallet!, + CsWalletListener( onSyncingUpdate: onSyncingUpdate, onNewBlock: onNewBlock, onBalancesChanged: onBalancesChanged, @@ -187,22 +193,21 @@ abstract class LibSalviumWallet Future open() async { bool wasNull = false; - if (libSalviumWallet == null) { + if (wallet == null) { wasNull = true; // await libSalviumWallet?.close(); final path = await pathForWallet(name: walletId); final String password; try { - password = - (await secureStorageInterface.read( - key: _libSalviumWalletPasswordKey(walletId.toUpperCase()), - ))!; + password = (await secureStorageInterface.read( + key: _libSalviumWalletPasswordKey(walletId.toUpperCase()), + ))!; } catch (e, s) { throw Exception("Password not found $e, $s"); } - await loadWallet(path: path, password: password); + wallet = await loadWallet(path: path, password: password); _setListener(); @@ -224,15 +229,15 @@ abstract class LibSalviumWallet if (wasNull) { try { _setSyncStatus(ConnectingSyncStatus()); - libSalviumWallet?.startSyncing(); + csSalvium.startSyncing(wallet!); } catch (_) { _setSyncStatus(FailedSyncStatus()); // TODO log } } _setListener(); - libSalviumWallet?.startListeners(); - libSalviumWallet?.startAutoSaving(); + csSalvium.startListeners(wallet!); + csSalvium.startAutoSaving(wallet!); unawaited(refresh()); } @@ -242,16 +247,17 @@ abstract class LibSalviumWallet final appRoot = await StackFileSystem.applicationRootDirectory(); await _backupWalletFiles(name: walletId, appRoot: appRoot); } - await libSalviumWallet!.save(); + await csSalvium.save(wallet!); } Address addressFor({required int index, int account = 0}) { - final address = libSalviumWallet!.getAddress( + final address = csSalvium.getAddress( + wallet!, accountIndex: account, addressIndex: index, ); - if (address.value.contains("111")) { + if (address.contains("111")) { throw Exception("111 address found!"); } @@ -259,7 +265,7 @@ abstract class LibSalviumWallet walletId: walletId, derivationIndex: index, derivationPath: null, - value: address.value, + value: address, publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -269,18 +275,16 @@ abstract class LibSalviumWallet } Future getKeys() async { - final base = libSalviumWallet; - - if (base == null) { + if (wallet == null) { return null; } try { return CWKeyData( walletId: walletId, - publicViewKey: base.getPublicViewKey(), - privateViewKey: base.getPrivateViewKey(), - publicSpendKey: base.getPublicSpendKey(), - privateSpendKey: base.getPrivateSpendKey(), + publicViewKey: csSalvium.getPublicViewKey(wallet!), + privateViewKey: csSalvium.getPrivateViewKey(wallet!), + publicSpendKey: csSalvium.getPublicSpendKey(wallet!), + privateSpendKey: csSalvium.getPrivateSpendKey(wallet!), ); } catch (e, s) { Logging.instance.f("getKeys failed: ", error: e, stackTrace: s); @@ -299,16 +303,17 @@ abstract class LibSalviumWallet final path = await pathForWallet(name: walletId); final String password; try { - password = - (await secureStorageInterface.read( - key: _libSalviumWalletPasswordKey(walletId), - ))!; + password = (await secureStorageInterface.read( + key: _libSalviumWalletPasswordKey(walletId), + ))!; } catch (e, s) { throw Exception("Password not found $e, $s"); } - await loadWallet(path: path, password: password); - final wallet = libSalviumWallet!; - return (wallet.getAddress().value, wallet.getPrivateViewKey()); + wallet = await loadWallet(path: path, password: password); + return ( + csSalvium.getAddress(wallet!), + csSalvium.getPrivateViewKey(wallet!), + ); } @override @@ -322,6 +327,7 @@ abstract class LibSalviumWallet key: _libSalviumWalletPasswordKey(walletId), value: password, ); + final wallet = await getCreatedWallet( path: path, password: password, @@ -329,10 +335,8 @@ abstract class LibSalviumWallet seedOffset: "", // default for non restored wallets for now ); - final height = wallet.getRefreshFromBlockHeight(); - await info.updateRestoreHeight( - newRestoreHeight: height, + newRestoreHeight: csSalvium.getRefreshFromBlockHeight(wallet), isar: mainDB.isar, ); @@ -340,7 +344,7 @@ abstract class LibSalviumWallet // before wallet.init() is called await secureStorageInterface.write( key: Wallet.mnemonicKey(walletId: walletId), - value: wallet.getSeed().trim(), + value: csSalvium.getSeed(wallet), ); await secureStorageInterface.write( key: Wallet.mnemonicPassphraseKey(walletId: walletId), @@ -363,8 +367,8 @@ abstract class LibSalviumWallet await mainDB.deleteWalletBlockchainData(walletId); highestPercentCached = 0; - unawaited(libSalviumWallet?.rescanBlockchain()); - libSalviumWallet?.startSyncing(); + unawaited(csSalvium.rescanBlockchain(wallet!)); + csSalvium.startSyncing(wallet!); // unawaited(save()); }); unawaited(refresh()); @@ -401,6 +405,7 @@ abstract class LibSalviumWallet key: _libSalviumWalletPasswordKey(walletId), value: password, ); + final wallet = await getRestoredWallet( path: path, password: password, @@ -409,11 +414,11 @@ abstract class LibSalviumWallet seedOffset: seedOffset, ); - if (libSalviumWallet != null) { + if (this.wallet != null) { await exit(); } - libSalviumWallet = wallet; + this.wallet = wallet; _setListener(); @@ -423,7 +428,7 @@ abstract class LibSalviumWallet walletId: walletId, derivationIndex: 0, derivationPath: null, - value: wallet.getAddress().value, + value: csSalvium.getAddress(this.wallet!), publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -442,12 +447,12 @@ abstract class LibSalviumWallet _setListener(); // libSalviumWallet?.setRecoveringFromSeed(isRecovery: true); - unawaited(libSalviumWallet?.rescanBlockchain()); - libSalviumWallet?.startSyncing(); + unawaited(csSalvium.rescanBlockchain(wallet!)); + csSalvium.startSyncing(wallet!); // await save(); - libSalviumWallet?.startListeners(); - libSalviumWallet?.startAutoSaving(); + csSalvium.startListeners(wallet!); + csSalvium.startAutoSaving(wallet!); } catch (e, s) { Logging.instance.e( "Exception rethrown from recoverFromMnemonic(): ", @@ -464,7 +469,7 @@ abstract class LibSalviumWallet @override Future pingCheck() async { if (_canPing) { - return (await libSalviumWallet?.isConnectedToDaemon()) ?? false; + return csSalvium.isConnectedToDaemon(wallet!); } else { return false; } @@ -478,50 +483,50 @@ abstract class LibSalviumWallet throw Exception("TOR – clearnet mismatch"); } - final host = - node.host.endsWith(".onion") ? node.host : Uri.parse(node.host).host; - ({InternetAddress host, int port})? proxy; - proxy = - prefs.useTor && !node.forceNoTor - ? TorService.sharedInstance.getProxyInfo() - : null; + final host = node.host.endsWith(".onion") + ? node.host + : Uri.parse(node.host).host; + final ({InternetAddress host, int port})? proxy = + AppConfig.hasFeature(AppFeature.tor) && prefs.useTor && !node.forceNoTor + ? TorService.sharedInstance.getProxyInfo() + : null; _setSyncStatus(ConnectingSyncStatus()); try { if (_requireMutex) { await _torConnectingLock.protect(() async { - await libSalviumWallet?.connect( + await csSalvium.connect( + wallet!, daemonAddress: "$host:${node.port}", daemonUsername: node.loginName, daemonPassword: await node.getPassword(secureStorageInterface), trusted: node.trusted ?? false, useSSL: node.useSSL, - socksProxyAddress: - node.forceNoTor - ? null - : proxy == null - ? null - : "${proxy.host.address}:${proxy.port}", + socksProxyAddress: node.forceNoTor + ? null + : proxy == null + ? null + : "${proxy.host.address}:${proxy.port}", ); }); } else { - await libSalviumWallet?.connect( + await csSalvium.connect( + wallet!, daemonAddress: "$host:${node.port}", daemonUsername: node.loginName, daemonPassword: await node.getPassword(secureStorageInterface), trusted: node.trusted ?? false, useSSL: node.useSSL, - socksProxyAddress: - node.forceNoTor - ? null - : proxy == null - ? null - : "${proxy.host.address}:${proxy.port}", + socksProxyAddress: node.forceNoTor + ? null + : proxy == null + ? null + : "${proxy.host.address}:${proxy.port}", ); } - libSalviumWallet?.startSyncing(); - libSalviumWallet?.startListeners(); - libSalviumWallet?.startAutoSaving(); + csSalvium.startSyncing(wallet!); + csSalvium.startListeners(wallet!); + csSalvium.startAutoSaving(wallet!); // _setSyncStatus(ConnectedSyncStatus()); } catch (e, s) { @@ -538,22 +543,19 @@ abstract class LibSalviumWallet @override Future updateTransactions() async { - final base = libSalviumWallet; - - if (base == null) { + if (wallet == null) { return; } - final localTxids = - await mainDB.isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .filter() - .heightGreaterThan(0) - .txidProperty() - .findAll(); + final localTxids = await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .heightGreaterThan(0) + .txidProperty() + .findAll(); - final allTxids = await base.getAllTxids(refresh: true); + final allTxids = await csSalvium.getAllTxids(wallet!, refresh: true); final txidsToFetch = allTxids.toSet().difference(localTxids.toSet()); @@ -561,9 +563,17 @@ abstract class LibSalviumWallet return; } - final transactions = await base.getTxs(txids: txidsToFetch, refresh: false); + final transactions = await csSalvium.getTxs( + wallet!, + txids: txidsToFetch, + refresh: false, + ); - final allOutputs = await base.getOutputs(includeSpent: true, refresh: true); + final allOutputs = await csSalvium.getOutputs( + wallet!, + includeSpent: true, + refresh: true, + ); // final cachedTransactions = // DB.instance.get(boxName: walletId, key: 'latest_tx_model') @@ -649,18 +659,18 @@ abstract class LibSalviumWallet type: type, subType: TransactionSubType.none, otherData: jsonEncode({ - TxV2OdKeys.overrideFee: - Amount( - rawValue: tx.fee, - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), - TxV2OdKeys.moneroAmount: - Amount( - rawValue: tx.amount, - fractionDigits: cryptoCurrency.fractionDigits, - ).toJsonString(), + TxV2OdKeys.overrideFee: Amount( + rawValue: tx.fee, + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), + TxV2OdKeys.moneroAmount: Amount( + rawValue: tx.amount, + fractionDigits: cryptoCurrency.fractionDigits, + ).toJsonString(), TxV2OdKeys.moneroAccountIndex: tx.accountIndex, TxV2OdKeys.isMoneroTransaction: true, + TxV2OdKeys.salviumTypeInt: tx.salviumData?.type, + TxV2OdKeys.salviumTypeString: tx.salviumData?.typeDisplay, }), ); @@ -673,7 +683,7 @@ abstract class LibSalviumWallet Future get availableBalance async { try { return Amount( - rawValue: libSalviumWallet!.getUnlockedBalance(), + rawValue: csSalvium.getUnlockedBalance(wallet!)!, fractionDigits: cryptoCurrency.fractionDigits, ); } catch (_) { @@ -683,14 +693,14 @@ abstract class LibSalviumWallet Future get totalBalance async { try { - final full = libSalviumWallet?.getBalance(); + final full = csSalvium.getBalance(wallet!); if (full != null) { return Amount( rawValue: full, fractionDigits: cryptoCurrency.fractionDigits, ); } else { - final transactions = await libSalviumWallet!.getAllTxs(refresh: true); + final transactions = await csSalvium.getAllTxs(wallet!, refresh: true); BigInt transactionBalance = BigInt.zero; for (final tx in transactions) { if (!tx.isSpend) { @@ -713,10 +723,12 @@ abstract class LibSalviumWallet @override Future exit() async { Logging.instance.i("exit called on $walletId"); - libSalviumWallet?.stopAutoSaving(); - libSalviumWallet?.stopListeners(); - libSalviumWallet?.stopSyncing(); - await libSalviumWallet?.save(); + if (wallet != null) { + csSalvium.stopAutoSaving(wallet!); + csSalvium.stopListeners(wallet!); + csSalvium.stopSyncing(wallet!); + await csSalvium.save(wallet!); + } } Future pathForWalletDir({required String name}) async { @@ -785,8 +797,16 @@ abstract class LibSalviumWallet final _utxosUpdateLock = Mutex(); Future onUTXOsChanged(List utxos) async { + if (wallet == null) { + Logging.instance.w( + "onUTXOsChanged triggered while cs_salvium wallet is null. If this " + "occurs while not in a salvium wallet this warning can be ignored.", + ); + return; + } + await _utxosUpdateLock.protect(() async { - final cwUtxos = await libSalviumWallet?.getOutputs(refresh: true) ?? []; + final cwUtxos = await csSalvium.getOutputs(wallet!, refresh: true); // bool changed = false; @@ -803,12 +823,12 @@ abstract class LibSalviumWallet if (u.isBlocked) { if (!cw.isFrozen) { - await libSalviumWallet?.freezeOutput(cw.keyImage); + await csSalvium.freezeOutput(wallet!, cw.keyImage); // changed = true; } } else { if (cw.isFrozen) { - await libSalviumWallet?.thawOutput(cw.keyImage); + await csSalvium.thawOutput(wallet!, cw.keyImage); // changed = true; } } @@ -964,9 +984,11 @@ abstract class LibSalviumWallet if (mismatch) { _canPing = false; - libSalviumWallet?.stopAutoSaving(); - libSalviumWallet?.stopListeners(); - libSalviumWallet?.stopSyncing(); + if (wallet != null) { + csSalvium.stopAutoSaving(wallet!); + csSalvium.stopListeners(wallet!); + csSalvium.stopSyncing(wallet!); + } _setSyncStatus(FailedSyncStatus()); } @@ -984,27 +1006,25 @@ abstract class LibSalviumWallet @override Future updateUTXOs() async { final List outputArray = []; - final utxos = - await libSalviumWallet?.getOutputs(refresh: true) ?? - []; + final utxos = wallet == null + ? [] + : await csSalvium.getOutputs(wallet!, refresh: true); for (final rawUTXO in utxos) { if (!rawUTXO.spent) { - final current = - await mainDB.isar.utxos - .where() - .walletIdEqualTo(walletId) - .filter() - .voutEqualTo(rawUTXO.vout) - .and() - .txidEqualTo(rawUTXO.hash) - .findFirst(); - final tx = - await mainDB.isar.transactionV2s - .where() - .walletIdEqualTo(walletId) - .filter() - .txidEqualTo(rawUTXO.hash) - .findFirst(); + final current = await mainDB.isar.utxos + .where() + .walletIdEqualTo(walletId) + .filter() + .voutEqualTo(rawUTXO.vout) + .and() + .txidEqualTo(rawUTXO.hash) + .findFirst(); + final tx = await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .txidEqualTo(rawUTXO.hash) + .findFirst(); final otherDataMap = { UTXOOtherDataKeys.keyImage: rawUTXO.keyImage, @@ -1077,7 +1097,7 @@ abstract class LibSalviumWallet // Slight possibility of race but should be irrelevant await refreshMutex.acquire(); - libSalviumWallet?.startSyncing(); + csSalvium.startSyncing(wallet!); _setSyncStatus(StartingSyncStatus()); await updateTransactions(); @@ -1091,7 +1111,7 @@ abstract class LibSalviumWallet refreshMutex.release(); } - final synced = await libSalviumWallet?.isSynced(); + final synced = wallet != null && await csSalvium.isSynced(wallet!); if (synced == true) { _setSyncStatus(SyncedSyncStatus()); @@ -1103,8 +1123,9 @@ abstract class LibSalviumWallet try { final currentReceiving = await getCurrentReceivingAddress(); - final newReceivingIndex = - currentReceiving == null ? 0 : currentReceiving.derivationIndex + 1; + final newReceivingIndex = currentReceiving == null + ? 0 + : currentReceiving.derivationIndex + 1; final newReceivingAddress = addressFor(index: newReceivingIndex); @@ -1139,17 +1160,15 @@ abstract class LibSalviumWallet try { int highestIndex = -1; - final entries = await libSalviumWallet?.getAllTxs(refresh: true); - if (entries != null) { - for (final element in entries) { - if (!element.isSpend) { - final int curAddressIndex = - element.addressIndexes.isEmpty - ? 0 - : element.addressIndexes.reduce(max); - if (curAddressIndex > highestIndex) { - highestIndex = curAddressIndex; - } + final entries = await csSalvium.getAllTxs(wallet!, refresh: true); + + for (final element in entries) { + if (!element.isSpend) { + final int curAddressIndex = element.addressIndexes.isEmpty + ? 0 + : element.addressIndexes.reduce(max); + if (curAddressIndex > highestIndex) { + highestIndex = curAddressIndex; } } } @@ -1165,12 +1184,11 @@ abstract class LibSalviumWallet // Use new index to derive a new receiving address final newReceivingAddress = addressFor(index: newReceivingIndex); - final existing = - await mainDB - .getAddresses(walletId) - .filter() - .valueEqualTo(newReceivingAddress.value) - .findFirst(); + final existing = await mainDB + .getAddresses(walletId) + .filter() + .valueEqualTo(newReceivingAddress.value) + .findFirst(); if (existing == null) { // Add that new change address await mainDB.putAddress(newReceivingAddress); @@ -1206,9 +1224,9 @@ abstract class LibSalviumWallet numberOfBlocksFast: 10, numberOfBlocksAverage: 15, numberOfBlocksSlow: 20, - fast: BigInt.from(lib_salvium.TransactionPriority.high.value), - medium: BigInt.from(lib_salvium.TransactionPriority.medium.value), - slow: BigInt.from(lib_salvium.TransactionPriority.normal.value), + fast: BigInt.from(csSalvium.getTxPriorityHigh()), + medium: BigInt.from(csSalvium.getTxPriorityMedium()), + slow: BigInt.from(csSalvium.getTxPriorityNormal()), ); @override @@ -1234,16 +1252,16 @@ abstract class LibSalviumWallet try { final feeRate = txData.feeRateType; if (feeRate is FeeRateType) { - lib_salvium.TransactionPriority feePriority; + final int feePriority; switch (feeRate) { case FeeRateType.fast: - feePriority = lib_salvium.TransactionPriority.high; + feePriority = csSalvium.getTxPriorityHigh(); break; case FeeRateType.average: - feePriority = lib_salvium.TransactionPriority.medium; + feePriority = csSalvium.getTxPriorityMedium(); break; case FeeRateType.slow: - feePriority = lib_salvium.TransactionPriority.normal; + feePriority = csSalvium.getTxPriorityNormal(); break; default: throw ArgumentError("Invalid use of custom fee"); @@ -1268,12 +1286,23 @@ abstract class LibSalviumWallet throw Exception("Send all not supported with multiple recipients"); } - final List outputs = []; + if (txData.salviumStakeTx) { + if (sweep) { + throw Exception("Send all not supported for stake transactions"); + } + if (txData.recipients!.length != 1) { + throw Exception("Stake transactions require one output only"); + } + + final mainAddress = csSalvium.getAddress(wallet!); + if (txData.recipients!.first.address != mainAddress) { + throw Exception("Stake transactions should use your own address"); + } + } + + final List outputs = []; for (final recipient in txData.recipients!) { - final output = lib_salvium.Recipient( - address: recipient.address, - amount: recipient.amount.raw, - ); + final output = CsRecipient(recipient.address, recipient.amount.raw); outputs.add(output); } @@ -1283,44 +1312,37 @@ abstract class LibSalviumWallet } final height = await chainHeight; - final inputs = - txData.utxos - ?.whereType() - .map( - (e) => lib_salvium.Output( - address: e.utxo.address!, - hash: e.utxo.txid, - keyImage: e.utxo.keyImage!, - value: e.value, - isFrozen: e.utxo.isBlocked, - isUnlocked: - e.utxo.blockHeight != null && - (height - (e.utxo.blockHeight ?? 0)) >= - cryptoCurrency.minConfirms, - height: e.utxo.blockHeight ?? 0, - vout: e.utxo.vout, - spent: e.utxo.used ?? false, - spentHeight: null, // doesn't matter here - coinbase: e.utxo.isCoinbase, - ), - ) - .toList(); + final inputs = txData.utxos?.whereType().toList(); return await prepareSendMutex.protect(() async { - final lib_salvium.PendingTransaction pendingTransaction; - if (outputs.length == 1) { - pendingTransaction = await libSalviumWallet!.createTx( + final CsPendingTransaction pendingTransaction; + + if (txData.salviumStakeTx) { + pendingTransaction = await csSalvium.createStakeTx( + wallet!, output: outputs.first, - paymentId: "", + priority: feePriority, + accountIndex: 0, // sw only uses account 0 at this time + minConfirms: cryptoCurrency.minConfirms, + currentHeight: height, + ); + } else if (outputs.length == 1) { + pendingTransaction = await csSalvium.createTx( + wallet!, + output: outputs.first, + minConfirms: cryptoCurrency.minConfirms, + currentHeight: height, sweep: sweep, priority: feePriority, preferredInputs: inputs, accountIndex: 0, // sw only uses account 0 at this time ); } else { - pendingTransaction = await libSalviumWallet!.createTxMultiDest( + pendingTransaction = await csSalvium.createTxMultiDest( + wallet!, outputs: outputs, - paymentId: "", + minConfirms: cryptoCurrency.minConfirms, + currentHeight: height, priority: feePriority, preferredInputs: inputs, sweep: sweep, @@ -1363,7 +1385,7 @@ abstract class LibSalviumWallet Future confirmSend({required TxData txData}) async { try { try { - await libSalviumWallet!.commitTx(txData.pendingSalviumTransaction!); + await csSalvium.commitTx(wallet!, txData.pendingSalviumTransaction!); Logging.instance.d( "transaction ${txData.pendingSalviumTransaction!.txid} has been sent", @@ -1412,6 +1434,7 @@ abstract class LibSalviumWallet key: _libSalviumWalletPasswordKey(walletId.toUpperCase()), value: password, ); + final wallet = await getRestoredFromViewKeyWallet( path: path, password: password, @@ -1420,11 +1443,11 @@ abstract class LibSalviumWallet height: height, ); - if (libSalviumWallet != null) { + if (this.wallet != null) { await exit(); } - libSalviumWallet = wallet; + this.wallet = wallet; _setListener(); @@ -1434,7 +1457,7 @@ abstract class LibSalviumWallet walletId: walletId, derivationIndex: 0, derivationPath: null, - value: wallet.getAddress().value, + value: csSalvium.getAddress(this.wallet!), publicKey: [], type: AddressType.cryptonote, subType: AddressSubType.receiving, @@ -1449,12 +1472,12 @@ abstract class LibSalviumWallet await updateNode(); _setListener(); - unawaited(libSalviumWallet?.rescanBlockchain()); - libSalviumWallet?.startSyncing(); + unawaited(csSalvium.rescanBlockchain(this.wallet!)); + csSalvium.startSyncing(this.wallet!); // await save(); - libSalviumWallet?.startListeners(); - libSalviumWallet?.startAutoSaving(); + csSalvium.startListeners(this.wallet!); + csSalvium.startAutoSaving(this.wallet!); } catch (e, s) { Logging.instance.e( "Exception rethrown from recoverViewOnly(): ", diff --git a/lib/wallets/wallet/intermediate/lib_xelis_wallet.dart b/lib/wallets/wallet/intermediate/lib_xelis_wallet.dart index 2415af7bd..6b276c21a 100644 --- a/lib/wallets/wallet/intermediate/lib_xelis_wallet.dart +++ b/lib/wallets/wallet/intermediate/lib_xelis_wallet.dart @@ -1,149 +1,18 @@ import 'dart:async'; -import 'dart:convert'; import 'dart:io'; import 'package:flutter/foundation.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mutex/mutex.dart'; -import 'package:xelis_dart_sdk/xelis_dart_sdk.dart' as xelis_sdk; -import 'package:xelis_flutter/src/api/network.dart' as x_network; -import 'package:xelis_flutter/src/api/wallet.dart' as x_wallet; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/stack_file_system.dart'; -import '../../crypto_currency/crypto_currency.dart'; +import '../../../wl_gen/interfaces/lib_xelis_interface.dart'; import '../../crypto_currency/intermediate/electrum_currency.dart'; import '../wallet_mixin_interfaces/mnemonic_interface.dart'; import 'external_wallet.dart'; -enum XelisTableSize { - low, - full; - - bool get isLow => this == XelisTableSize.low; - - static XelisTableSize get platformDefault { - if (kIsWeb) { - return XelisTableSize.low; - } - return XelisTableSize.full; - } -} - -class XelisTableState { - final bool isGenerating; - final XelisTableSize currentSize; - final XelisTableSize _desiredSize; - - XelisTableSize get desiredSize { - if (kIsWeb) { - return XelisTableSize.low; - } - return _desiredSize; - } - - const XelisTableState({ - this.isGenerating = false, - this.currentSize = XelisTableSize.low, - XelisTableSize desiredSize = XelisTableSize.full, - }) : _desiredSize = desiredSize; - - XelisTableState copyWith({ - bool? isGenerating, - XelisTableSize? currentSize, - XelisTableSize? desiredSize, - }) { - return XelisTableState( - isGenerating: isGenerating ?? this.isGenerating, - currentSize: currentSize ?? this.currentSize, - desiredSize: kIsWeb ? XelisTableSize.low : (desiredSize ?? _desiredSize), - ); - } - - factory XelisTableState.fromJson(Map json) { - return XelisTableState( - isGenerating: json['isGenerating'] as bool, - currentSize: XelisTableSize.values[json['currentSize'] as int], - desiredSize: XelisTableSize.values[json['desiredSize'] as int], - ); - } - - Map toJson() => { - 'isGenerating': isGenerating, - 'currentSize': currentSize.index, - 'desiredSize': _desiredSize.index, - }; -} - -extension XelisNetworkConversion on CryptoCurrencyNetwork { - x_network.Network get xelisNetwork { - switch (this) { - case CryptoCurrencyNetwork.main: - return x_network.Network.mainnet; - case CryptoCurrencyNetwork.test: - return x_network.Network.testnet; - default: - throw ArgumentError('Unsupported network type for Xelis: $this'); - } - } -} - -extension CryptoCurrencyNetworkConversion on x_network.Network { - CryptoCurrencyNetwork get cryptoCurrencyNetwork { - switch (this) { - case x_network.Network.mainnet: - return CryptoCurrencyNetwork.main; - case x_network.Network.testnet: - return CryptoCurrencyNetwork.test; - default: - throw ArgumentError('Unsupported Xelis network type: $this'); - } - } -} - -sealed class Event { - const Event(); -} - -final class NewTopoheight extends Event { - final int height; - const NewTopoheight(this.height); -} - -final class NewAsset extends Event { - final xelis_sdk.AssetData asset; - const NewAsset(this.asset); -} - -final class NewTransaction extends Event { - final xelis_sdk.TransactionEntry transaction; - const NewTransaction(this.transaction); -} - -final class BalanceChanged extends Event { - final xelis_sdk.BalanceChangedEvent event; - const BalanceChanged(this.event); -} - -final class Rescan extends Event { - final int startTopoheight; - const Rescan(this.startTopoheight); -} - -final class Online extends Event { - const Online(); -} - -final class Offline extends Event { - const Offline(); -} - -final class HistorySynced extends Event { - final int topoheight; - const HistorySynced(this.topoheight); -} - abstract class LibXelisWallet extends ExternalWallet with MnemonicInterface { @@ -155,19 +24,12 @@ abstract class LibXelisWallet static final _tableGenerationMutex = Mutex(); static Completer? _tableGenerationCompleter; - x_wallet.XelisWallet? libXelisWallet; int pruningHeight = 0; - x_wallet.XelisWallet? get wallet => libXelisWallet; - set wallet(x_wallet.XelisWallet? newWallet) { - if (newWallet == null && libXelisWallet != null) { - throw StateError('Cannot set wallet to null after initialization'); - } - libXelisWallet = newWallet; - } + OpaqueXelisWallet? wallet; void checkInitialized() { - if (libXelisWallet == null) { + if (wallet == null) { throw StateError('libXelisWallet not initialized'); } } @@ -216,66 +78,15 @@ abstract class LibXelisWallet ); } - Stream convertRawEvents() async* { - checkInitialized(); - final rawEventStream = libXelisWallet!.eventsStream(); - - await for (final rawData in rawEventStream) { - final json = jsonDecode(rawData); - try { - final eventType = xelis_sdk.WalletEvent.fromStr( - json['event'] as String, - ); - switch (eventType) { - case xelis_sdk.WalletEvent.newTopoHeight: - yield NewTopoheight(json['data']['topoheight'] as int); - case xelis_sdk.WalletEvent.newAsset: - yield NewAsset( - xelis_sdk.AssetData.fromJson( - json['data'] as Map, - ), - ); - case xelis_sdk.WalletEvent.newTransaction: - yield NewTransaction( - xelis_sdk.TransactionEntry.fromJson( - json['data'] as Map, - ), - ); - case xelis_sdk.WalletEvent.balanceChanged: - yield BalanceChanged( - xelis_sdk.BalanceChangedEvent.fromJson( - json['data'] as Map, - ), - ); - case xelis_sdk.WalletEvent.rescan: - yield Rescan(json['data']['start_topoheight'] as int); - case xelis_sdk.WalletEvent.online: - yield const Online(); - case xelis_sdk.WalletEvent.offline: - yield const Offline(); - case xelis_sdk.WalletEvent.historySynced: - yield HistorySynced(json['data']['topoheight'] as int); - } - } catch (e, s) { - Logging.instance.e( - "Error processing xelis wallet event: $rawData", - error: e, - stackTrace: s, - ); - continue; - } - } - } - Future handleEvent(Event event) async {} Future handleNewTopoHeight(int height); - Future handleNewTransaction(xelis_sdk.TransactionEntry tx); - Future handleBalanceChanged(xelis_sdk.BalanceChangedEvent event); + Future handleNewTransaction(TransactionEntryWrapper tx); + Future handleBalanceChanged(BalanceChanged event); Future handleRescan(int startTopoheight) async {} Future handleOnline() async {} Future handleOffline() async {} Future handleHistorySynced(int topoheight) async {} - Future handleNewAsset(xelis_sdk.AssetData asset) async {} + Future handleNewAsset(NewAsset asset) async {} @override Future refresh({int? topoheight}); @@ -283,10 +94,12 @@ abstract class LibXelisWallet Future connect() async { final node = getCurrentNode(); try { - _eventSubscription = convertRawEvents().listen(handleEvent); + checkInitialized(); + _eventSubscription = libXelis.eventsStream(wallet!).listen(handleEvent); Logging.instance.i("Connecting to node: ${node.host}:${node.port}"); - await libXelisWallet!.onlineMode( + await libXelis.onlineMode( + wallet!, daemonAddress: "${node.host}:${node.port}", ); await super.refresh(); @@ -356,7 +169,9 @@ abstract class LibXelisWallet await _eventSubscription?.cancel(); _eventSubscription = null; - await libXelisWallet?.offlineMode(); + if (wallet != null) { + await libXelis.offlineMode(wallet!); + } await super.exit(); }); } finally { @@ -413,7 +228,7 @@ extension XelisTableManagement on LibXelisWallet { Logging.instance.i("Xelis: Generating large tables in background"); final tablePath = await getPrecomputedTablesPath(); - await x_wallet.updateTables( + await libXelis.updateTables( precomputedTablesPath: tablePath, l1Low: state.desiredSize.isLow, ); diff --git a/lib/wallets/wallet/supporting/epiccash_wallet_info_extension.dart b/lib/wallets/wallet/supporting/epiccash_wallet_info_extension.dart index c11eb2fbc..b12e472d0 100644 --- a/lib/wallets/wallet/supporting/epiccash_wallet_info_extension.dart +++ b/lib/wallets/wallet/supporting/epiccash_wallet_info_extension.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../utilities/logger.dart'; import '../../isar/models/wallet_info.dart'; @@ -13,12 +13,14 @@ extension EpiccashWalletInfoExtension on WalletInfo { } try { return ExtraEpiccashWalletInfo.fromMap( - Map.from( - jsonDecode(data) as Map, - ), + Map.from(jsonDecode(data) as Map), ); } catch (e, s) { - Logging.instance.e("ExtraEpiccashWalletInfo.fromMap failed: ", error: e, stackTrace: s); + Logging.instance.e( + "ExtraEpiccashWalletInfo.fromMap failed: ", + error: e, + stackTrace: s, + ); return null; } } @@ -28,9 +30,7 @@ extension EpiccashWalletInfoExtension on WalletInfo { required Isar isar, }) async { await updateOtherData( - newEntries: { - WalletInfoKeys.epiccashData: jsonEncode(epicData.toMap()), - }, + newEntries: {WalletInfoKeys.epiccashData: jsonEncode(epicData.toMap())}, isar: isar, ); } @@ -73,13 +73,13 @@ class ExtraEpiccashWalletInfo { } ExtraEpiccashWalletInfo.fromMap(Map json) - : receivingIndex = json['receivingIndex'] as int, - changeIndex = json['changeIndex'] as int, - slatesToAddresses = json['slatesToAddresses'] as Map, - slatesToCommits = json['slatesToCommits'] as Map, - lastScannedBlock = json['lastScannedBlock'] as int, - restoreHeight = json['restoreHeight'] as int, - creationHeight = json['creationHeight'] as int; + : receivingIndex = json['receivingIndex'] as int, + changeIndex = json['changeIndex'] as int, + slatesToAddresses = json['slatesToAddresses'] as Map, + slatesToCommits = json['slatesToCommits'] as Map, + lastScannedBlock = json['lastScannedBlock'] as int, + restoreHeight = json['restoreHeight'] as int, + creationHeight = json['creationHeight'] as int; ExtraEpiccashWalletInfo copyWith({ int? receivingIndex, diff --git a/lib/wallets/wallet/supporting/mimblewimblecoin_wallet_info_extension.dart b/lib/wallets/wallet/supporting/mimblewimblecoin_wallet_info_extension.dart new file mode 100644 index 000000000..ec820d0fb --- /dev/null +++ b/lib/wallets/wallet/supporting/mimblewimblecoin_wallet_info_extension.dart @@ -0,0 +1,111 @@ +import 'dart:convert'; + +import 'package:isar_community/isar.dart'; + +import '../../../utilities/logger.dart'; +import '../../isar/models/wallet_info.dart'; + +extension MimblewimblecoinWalletInfoExtension on WalletInfo { + ExtraMimblewimblecoinWalletInfo? get mimblewimblecoinData { + final String? data = + otherData[WalletInfoKeys.mimblewimblecoinData] as String?; + if (data == null) { + return null; + } + try { + return ExtraMimblewimblecoinWalletInfo.fromMap( + Map.from(jsonDecode(data) as Map), + ); + } catch (e, s) { + Logging.instance.e( + "ExtraMimblewimblecoinWalletInfo.fromMap failed: $e\n$s", + ); + return null; + } + } + + Future updateExtraMimblewimblecoinWalletInfo({ + required ExtraMimblewimblecoinWalletInfo mimblewimblecoinData, + required Isar isar, + }) async { + await updateOtherData( + newEntries: { + WalletInfoKeys.mimblewimblecoinData: jsonEncode( + mimblewimblecoinData.toMap(), + ), + }, + isar: isar, + ); + } +} + +/// Holds data previously stored in hive +class ExtraMimblewimblecoinWalletInfo { + final int receivingIndex; + final int changeIndex; + + // TODO [prio=low] strongly type these maps at some point + final Map slatesToAddresses; + final Map slatesToCommits; + + final int lastScannedBlock; + final int restoreHeight; + final int creationHeight; + + ExtraMimblewimblecoinWalletInfo({ + required this.receivingIndex, + required this.changeIndex, + required this.slatesToAddresses, + required this.slatesToCommits, + required this.lastScannedBlock, + required this.restoreHeight, + required this.creationHeight, + }); + + // Convert the object to JSON + Map toMap() { + return { + 'receivingIndex': receivingIndex, + 'changeIndex': changeIndex, + 'slatesToAddresses': slatesToAddresses, + 'slatesToCommits': slatesToCommits, + 'lastScannedBlock': lastScannedBlock, + 'restoreHeight': restoreHeight, + 'creationHeight': creationHeight, + }; + } + + ExtraMimblewimblecoinWalletInfo.fromMap(Map json) + : receivingIndex = json['receivingIndex'] as int, + changeIndex = json['changeIndex'] as int, + slatesToAddresses = json['slatesToAddresses'] as Map, + slatesToCommits = json['slatesToCommits'] as Map, + lastScannedBlock = json['lastScannedBlock'] as int, + restoreHeight = json['restoreHeight'] as int, + creationHeight = json['creationHeight'] as int; + + ExtraMimblewimblecoinWalletInfo copyWith({ + int? receivingIndex, + int? changeIndex, + Map? slatesToAddresses, + Map? slatesToCommits, + int? lastScannedBlock, + int? restoreHeight, + int? creationHeight, + }) { + return ExtraMimblewimblecoinWalletInfo( + receivingIndex: receivingIndex ?? this.receivingIndex, + changeIndex: changeIndex ?? this.changeIndex, + slatesToAddresses: slatesToAddresses ?? this.slatesToAddresses, + slatesToCommits: slatesToCommits ?? this.slatesToCommits, + lastScannedBlock: lastScannedBlock ?? this.lastScannedBlock, + restoreHeight: restoreHeight ?? this.restoreHeight, + creationHeight: creationHeight ?? this.creationHeight, + ); + } + + @override + String toString() { + return toMap().toString(); + } +} diff --git a/lib/wallets/wallet/wallet.dart b/lib/wallets/wallet/wallet.dart index 554e04313..0fa72d682 100644 --- a/lib/wallets/wallet/wallet.dart +++ b/lib/wallets/wallet/wallet.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:meta/meta.dart'; import 'package:mutex/mutex.dart'; @@ -38,6 +38,7 @@ import 'impl/ethereum_wallet.dart'; import 'impl/fact0rn_wallet.dart'; import 'impl/firo_wallet.dart'; import 'impl/litecoin_wallet.dart'; +import 'impl/mimblewimblecoin_wallet.dart'; import 'impl/monero_wallet.dart'; import 'impl/namecoin_wallet.dart'; import 'impl/nano_wallet.dart'; @@ -225,6 +226,13 @@ abstract class Wallet { await wallet.mainDB.isar.walletInfo.put(walletInfo); }); + if (wallet is SparkInterface) { + await walletInfo.updateOtherData( + newEntries: {WalletInfoKeys.firoSparkUsedTagsCacheResetVersion: 1}, + isar: mainDB.isar, + ); + } + return wallet; } @@ -355,6 +363,9 @@ abstract class Wallet { case const (Epiccash): return EpiccashWallet(net); + case const (Mimblewimblecoin): + return MimblewimblecoinWallet(net); + case const (Ethereum): return EthereumWallet(net); diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart index 0f428ec89..07f4d4f93 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/bcash_interface.dart @@ -1,6 +1,6 @@ import 'package:bitbox/bitbox.dart' as bitbox; import 'package:bitbox/src/utils/network.dart' as bitbox_utils; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/input.dart'; import '../../../models/isar/models/blockchain_data/v2/input_v2.dart'; diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart index 5a24f32ca..7fe44bf81 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart @@ -4,8 +4,9 @@ import 'dart:io'; import 'package:bitbox/bitbox.dart' as bitbox; import 'package:flutter/foundation.dart'; import 'package:fusiondart/fusiondart.dart' as fusion; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; +import '../../../app_config.dart'; import '../../../models/fusion_progress_ui_state.dart'; import '../../../models/isar/models/blockchain_data/address.dart'; import '../../../models/isar/models/blockchain_data/transaction.dart'; @@ -340,8 +341,10 @@ mixin CashFusionInterface Future>> _getTransactionsByAddress( String address, ) async { - final txidList = - await mainDB.getTransactions(walletId).txidProperty().findAll(); + final txidList = await mainDB + .getTransactions(walletId) + .txidProperty() + .findAll(); final futures = txidList.map( (e) => electrumXCachedClient.getTransaction( @@ -357,23 +360,24 @@ mixin CashFusionInterface // can't directly query for equal lists in isar so we need to fetch // all addresses then search in dart try { - final derivationPath = (await mainDB - .getAddresses(walletId) - .filter() - .typeEqualTo(AddressType.p2pkh) - .and() - .derivationPathIsNotNull() - .and() - .group( - (q) => q - .subTypeEqualTo(AddressSubType.receiving) - .or() - .subTypeEqualTo(AddressSubType.change), - ) - .findAll()) - .firstWhere((e) => e.publicKey.toString() == pubKey.toString()) - .derivationPath! - .value; + final derivationPath = + (await mainDB + .getAddresses(walletId) + .filter() + .typeEqualTo(AddressType.p2pkh) + .and() + .derivationPathIsNotNull() + .and() + .group( + (q) => q + .subTypeEqualTo(AddressSubType.receiving) + .or() + .subTypeEqualTo(AddressSubType.change), + ) + .findAll()) + .firstWhere((e) => e.publicKey.toString() == pubKey.toString()) + .derivationPath! + .value; final root = await getRootHDNode(); @@ -456,9 +460,7 @@ mixin CashFusionInterface address: e.value, publicKey: e.publicKey, fusionReserved: true, - derivationPath: fusion.DerivationPath( - e.derivationPath!.value, - ), + derivationPath: fusion.DerivationPath(e.derivationPath!.value), ), ) .toList(); @@ -478,17 +480,11 @@ mixin CashFusionInterface final changeAddresses = await mainDB.isar.addresses .buildQuery
( whereClauses: [ - IndexWhereClause.equalTo( - indexName: r"walletId", - value: [walletId], - ), + IndexWhereClause.equalTo(indexName: r"walletId", value: [walletId]), ], filter: changeAddressFilterOperation, sortBy: [ - const SortProperty( - property: r"derivationIndex", - sort: Sort.desc, - ), + const SortProperty(property: r"derivationIndex", sort: Sort.desc), ], ) .findAll(); @@ -597,11 +593,13 @@ mixin CashFusionInterface /// Fuse the wallet's UTXOs. /// /// This function is called when the user taps the "Fuse" button in the UI. - Future fuse({ - required FusionInfo fusionInfo, - }) async { + Future fuse({required FusionInfo fusionInfo}) async { // Initial attempt for CashFusion integration goes here. + if (!AppConfig.hasFeature(AppFeature.tor)) { + throw Exception("AppConfig has no Tor"); + } + try { _updateStatus(status: fusion.FusionStatus.reset); _updateStatus( @@ -631,11 +629,8 @@ mixin CashFusionInterface getChainHeight: fetchChainHeight, updateStatusCallback: _updateStatus, checkUtxoExists: _checkUtxoExists, - getTransactionJson: (String txid) async => - await electrumXCachedClient.getTransaction( - cryptoCurrency: info.coin, - txHash: txid, - ), + getTransactionJson: (String txid) async => await electrumXCachedClient + .getTransaction(cryptoCurrency: info.coin, txHash: txid), getPrivateKeyForPubKey: _getPrivateKeyForPubKey, broadcastTransaction: (String txHex) => electrumXClient.broadcastTransaction(rawTx: txHex), @@ -643,18 +638,16 @@ mixin CashFusionInterface final List> futures = []; for (final addr in addresses) { futures.add( - mainDB.getAddress(walletId, addr.address).then( - (address) async { - if (address == null) { - // matching address not found in db so cannot mark as unreserved - // just ignore I guess. Should never actually happen in practice. - // Might be useful check in debugging cases? - return; - } else { - await _unReserveAddress(address); - } - }, - ), + mainDB.getAddress(walletId, addr.address).then((address) async { + if (address == null) { + // matching address not found in db so cannot mark as unreserved + // just ignore I guess. Should never actually happen in practice. + // Might be useful check in debugging cases? + return; + } else { + await _unReserveAddress(address); + } + }), ); } await Future.wait(futures); @@ -721,11 +714,10 @@ mixin CashFusionInterface final addr = await mainDB .getAddresses(walletId) .filter() - .anyOf>( - possibleAddresses, - (q, e) => q.valueEqualTo(e), - ) + .anyOf< + String, + QueryBuilder + >(possibleAddresses, (q, e) => q.valueEqualTo(e)) .and() .group( (q) => q diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart index e978a0bd7..26106e677 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart @@ -3,7 +3,7 @@ import 'dart:math'; import 'dart:typed_data'; import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:meta/meta.dart'; import '../../../db/drift/database.dart'; @@ -276,7 +276,7 @@ mixin ElectrumXInterface // hack check if (!(txData.type == TxType.mwebPegIn || - (txData.type == TxType.mweb && overrideFeeAmount != null))) { + (txData.type.isMweb() && overrideFeeAmount != null))) { throw Exception( "Something happened that should never actually happen. " "Please report this error to the developers.", @@ -405,6 +405,7 @@ mixin ElectrumXInterface utxos: utxos, coinControl: coinControl, isSendAllCoinControlUtxos: isSendAllCoinControlUtxos, + overrideFeeAmount: overrideFeeAmount, ); } throw Exception("Insufficient balance to pay transaction fee"); @@ -907,8 +908,23 @@ mixin ElectrumXInterface // dirty shortcut for peercoin's weirdness vSize: this is PeercoinWallet ? clTx.size : clTx.vSize(), tempTx: - txData.type.isMweb() + txData.type == TxType.mwebPegIn ? null + : txData.type.isMweb() + ? TransactionV2( + walletId: walletId, + blockHash: null, + hash: clTx.hashHex, + txid: clTx.txid, + height: null, + timestamp: DateTime.timestamp().millisecondsSinceEpoch ~/ 1000, + inputs: List.unmodifiable(tempInputs), + outputs: List.unmodifiable(tempOutputs), + version: clTx.version, + type: TransactionType.outgoing, + subType: TransactionSubType.mweb, + otherData: null, + ) : TransactionV2( walletId: walletId, blockHash: null, diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart index 4480ef81b..82f45ff34 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart @@ -5,7 +5,7 @@ import 'dart:math' as math; import 'package:coinlib_flutter/coinlib_flutter.dart' as cl; import 'package:drift/drift.dart'; import 'package:fixnum/fixnum.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:mweb_client/mweb_client.dart'; import '../../../db/drift/database.dart'; @@ -358,6 +358,56 @@ mixin MwebInterface ); } + Future checkMwebSpends() async { + final pending = + await mainDB.isar.transactionV2s + .where() + .walletIdEqualTo(walletId) + .filter() + .heightIsNull() + .and() + .blockHashIsNull() + .and() + .subTypeEqualTo(TransactionSubType.mweb) + .and() + .typeEqualTo(TransactionType.outgoing) + .findAll(); + + Logging.instance.f(pending); + + final client = await _client; + for (final tx in pending) { + for (final input in tx.inputs) { + if (input.addresses.length == 1) { + final address = await mainDB.getAddress( + walletId, + input.addresses.first, + ); + if (address?.type == AddressType.mweb) { + final response = await client.spent( + SpentRequest(outputId: [input.outpoint!.txid]), + ); + if (response.outputId.contains(input.outpoint!.txid)) { + // dummy to show tx as confirmed. Need a better way to handle this as its kind of stupid, resulting in terrible UX + final dummyHeight = await chainHeight; + + TransactionV2? transaction = + await mainDB.isar.transactionV2s + .where() + .txidWalletIdEqualTo(tx.txid, walletId) + .findFirst(); + + if (transaction == null || transaction.height == null) { + transaction = (transaction ?? tx).copyWith(height: dummyHeight); + await mainDB.updateOrPutTransactionV2s([transaction]); + } + } + } + } + } + } + } + Future processMwebTransaction(TxData txData) async { final client = await _client; final response = await client.create( @@ -952,13 +1002,14 @@ mixin MwebInterface BigInt feeIncrease = posOutputSum - expectedPegin; if (expectedPegin > BigInt.zero) { - feeIncrease += BigInt.from( - (txData.feeRateAmount! / BigInt.from(1000) * 41).ceil(), - ); + feeIncrease += + BigInt.from((txData.feeRateAmount! / BigInt.from(1000)).ceil()) * + BigInt.from(41); } + // bandaid: add one to account for a rounding error that happens sometimes return Amount( - rawValue: fee + feeIncrease, + rawValue: fee + feeIncrease + BigInt.one, fractionDigits: cryptoCurrency.fractionDigits, ); } diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/nano_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/nano_interface.dart index f9efe7975..b08b6bb42 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/nano_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/nano_interface.dart @@ -1,10 +1,11 @@ import 'dart:async'; import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:nanodart/nanodart.dart'; import 'package:tuple/tuple.dart'; +import '../../../app_config.dart'; import '../../../exceptions/wallet/node_tor_mismatch_config_exception.dart'; import '../../../external_api_keys.dart'; import '../../../models/balance.dart'; @@ -53,8 +54,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(_kWorkServer), // this should be a headers: _buildHeaders(_kWorkServer), body: json.encode({"action": "work_generate", "hash": hash}), - proxyInfo: - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ) .then((_httpClient) { if (_httpClient.code == 200) { @@ -119,7 +121,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: infoBody, - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final infoData = jsonDecode(infoResponse.body); @@ -138,7 +142,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: balanceBody, - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final balanceData = jsonDecode(balanceResponse.body); @@ -168,10 +174,9 @@ mixin NanoInterface on Bip39Wallet { final Map receiveBlock = { "type": "state", "account": publicAddress, - "previous": - openBlock - ? "0000000000000000000000000000000000000000000000000000000000000000" - : frontier, + "previous": openBlock + ? "0000000000000000000000000000000000000000000000000000000000000000" + : frontier, "representative": representative, "balance": balanceAfterTx.toString(), "link": link, @@ -216,7 +221,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: processBody, - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final Map decoded = @@ -237,7 +244,9 @@ mixin NanoInterface on Bip39Wallet { "source": "true", "account": accountAddress, }), - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final receivableData = await jsonDecode(receivableResponse.body); @@ -369,7 +378,9 @@ mixin NanoInterface on Bip39Wallet { url: uri, headers: _buildHeaders(node.host), body: jsonEncode({"action": "version"}), - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); return response.code == 200; @@ -419,14 +430,17 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: infoBody, - proxyInfo: - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); - final String frontier = - jsonDecode(infoResponse.body)["frontier"].toString(); - final String representative = - jsonDecode(infoResponse.body)["representative"].toString(); + final String frontier = jsonDecode( + infoResponse.body, + )["frontier"].toString(); + final String representative = jsonDecode( + infoResponse.body, + )["representative"].toString(); // link = destination address: final String linkAsAccount = txData.recipients!.first.address; final String link = NanoAccounts.extractPublicKey(linkAsAccount); @@ -473,8 +487,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: processBody, - proxyInfo: - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final Map decoded = @@ -533,7 +548,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: jsonEncode(body), - proxyInfo: prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); // this should really have proper type checking and error propagation but I'm out of time @@ -566,10 +583,9 @@ mixin NanoInterface on Bip39Wallet { final data = await _fetchAll(publicAddress, null, null); - final transactions = - data["history"] is List - ? data["history"] as List - : []; + final transactions = data["history"] is List + ? data["history"] as List + : []; if (transactions.isEmpty) { return; } else { @@ -607,18 +623,17 @@ mixin NanoInterface on Bip39Wallet { numberOfMessages: null, ); - final Address address = - transactionType == TransactionType.incoming - ? receivingAddress - : Address( - walletId: walletId, - publicKey: [], - value: tx["account"].toString(), - derivationIndex: 0, - derivationPath: null, - type: info.mainAddressType, - subType: AddressSubType.nonWallet, - ); + final Address address = transactionType == TransactionType.incoming + ? receivingAddress + : Address( + walletId: walletId, + publicKey: [], + value: tx["account"].toString(), + derivationIndex: 0, + derivationPath: null, + type: info.mainAddressType, + subType: AddressSubType.nonWallet, + ); final Tuple2 tuple = Tuple2(transaction, address); transactionList.add(tuple); } @@ -643,15 +658,16 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: body, - proxyInfo: - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final data = jsonDecode(response.body); final balance = Balance( total: Amount( rawValue: (BigInt.parse(data["balance"].toString()) + - BigInt.parse(data["receivable"].toString())), + BigInt.parse(data["receivable"].toString())), fractionDigits: cryptoCurrency.fractionDigits, ), spendable: Amount( @@ -695,8 +711,9 @@ mixin NanoInterface on Bip39Wallet { url: Uri.parse(node.host), headers: _buildHeaders(node.host), body: infoBody, - proxyInfo: - prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null, + proxyInfo: AppConfig.hasFeature(AppFeature.tor) && prefs.useTor + ? TorService.sharedInstance.getProxyInfo() + : null, ); final infoData = jsonDecode(infoResponse.body); diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/ordinals_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/ordinals_interface.dart index 430c46c45..686d1f90a 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/ordinals_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/ordinals_interface.dart @@ -1,4 +1,4 @@ -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../dto/ordinals/inscription_data.dart'; import '../../../models/isar/models/blockchain_data/utxo.dart'; @@ -10,14 +10,16 @@ import 'electrumx_interface.dart'; mixin OrdinalsInterface on ElectrumXInterface { - final LitescribeAPI _litescribeAPI = - LitescribeAPI(baseUrl: 'https://litescribe.io/api'); + final LitescribeAPI _litescribeAPI = LitescribeAPI( + baseUrl: 'https://litescribe.io/api', + ); // check if an inscription is in a given output Future _inscriptionInAddress(String address) async { try { - return (await _litescribeAPI.getInscriptionsByAddress(address)) - .isNotEmpty; + return (await _litescribeAPI.getInscriptionsByAddress( + address, + )).isNotEmpty; } catch (e, s) { Logging.instance.e("Litescribe api failure!", error: e, stackTrace: s); @@ -29,7 +31,8 @@ mixin OrdinalsInterface List? overrideAddressesToCheck, }) async { try { - final uniqueAddresses = overrideAddressesToCheck ?? + final uniqueAddresses = + overrideAddressesToCheck ?? await mainDB .getUTXOs(walletId) .filter() @@ -41,9 +44,10 @@ mixin OrdinalsInterface uniqueAddresses.cast(), ); - final ords = inscriptions - .map((e) => Ordinal.fromInscriptionData(e, walletId)) - .toList(); + final ords = + inscriptions + .map((e) => Ordinal.fromInscriptionData(e, walletId)) + .toList(); await mainDB.isar.writeTxn(() async { await mainDB.isar.ordinals @@ -54,15 +58,18 @@ mixin OrdinalsInterface await mainDB.isar.ordinals.putAll(ords); }); } catch (e, s) { - Logging.instance.w("$runtimeType failed refreshInscriptions(): ", - error: e, stackTrace: s); + Logging.instance.w( + "$runtimeType failed refreshInscriptions(): ", + error: e, + stackTrace: s, + ); } } // =================== Overrides ============================================= @override Future<({bool blocked, String? blockedReason, String? utxoLabel})> - checkBlockUTXO( + checkBlockUTXO( Map jsonUTXO, String? scriptPubKeyHex, Map jsonTX, @@ -116,8 +123,9 @@ mixin OrdinalsInterface final List allInscriptions = []; for (final String address in addresses) { try { - final inscriptions = - await _litescribeAPI.getInscriptionsByAddress(address); + final inscriptions = await _litescribeAPI.getInscriptionsByAddress( + address, + ); allInscriptions.addAll(inscriptions); } catch (e) { throw Exception("Error fetching inscriptions for address $address: $e"); diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart index 3ad0425d5..0d993036d 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/paynym_interface.dart @@ -8,7 +8,7 @@ import 'package:bitcoindart/bitcoindart.dart' as btc_dart; import 'package:bitcoindart/src/utils/constants/op.dart' as op; import 'package:bitcoindart/src/utils/script.dart' as bscript; import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:pointycastle/digests/sha256.dart'; import 'package:tuple/tuple.dart'; diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/rbf_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/rbf_interface.dart index 03a8b6dd6..f21293f95 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/rbf_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/rbf_interface.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/input.dart'; import '../../../models/isar/models/blockchain_data/v2/transaction_v2.dart'; diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart index 671c79770..d9059a5bb 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart @@ -5,11 +5,7 @@ import 'dart:math'; import 'package:bitcoindart/bitcoindart.dart' as btc; import 'package:decimal/decimal.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart' - as spark - show Log; -import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import 'package:logger/logger.dart'; import '../../../db/drift/database.dart' show Drift; @@ -28,6 +24,7 @@ import '../../../utilities/enums/derive_path_type_enum.dart'; import '../../../utilities/extensions/extensions.dart'; import '../../../utilities/logger.dart'; import '../../../utilities/prefs.dart'; +import '../../../wl_gen/interfaces/lib_spark_interface.dart'; import '../../crypto_currency/crypto_currency.dart'; import '../../crypto_currency/interfaces/electrumx_currency_interface.dart'; import '../../isar/models/spark_coin.dart'; @@ -55,25 +52,11 @@ String _hashTag(String tag) { final x = components[0].substring(1); final y = components[1].substring(0, components[1].length - 1); - final hash = LibSpark.hashTag(x, y); + final hash = libSpark.hashTag(x, y); return hash; } -void initSparkLogging(Level level) { - final levels = Level.values.where((e) => e >= level).map((e) => e.name); - spark.Log.levels.addAll( - LoggingLevel.values.where((e) => levels.contains(e.name)), - ); - spark.Log.onLog = (level, value, {error, stackTrace, required time}) { - Logging.instance.log( - level.getLoggerLevel(), - value, - error: error, - stackTrace: stackTrace, - time: time, - ); - }; -} +void initSparkLogging(Level level) => libSpark.initSparkLogging(level); abstract class _SparkIsolate { static Isolate? _isolate; @@ -135,7 +118,7 @@ mixin SparkInterface static bool validateSparkAddress({ required String address, required bool isTestNet, - }) => LibSpark.validateAddress(address: address, isTestNet: isTestNet); + }) => libSpark.validateAddress(address: address, isTestNet: isTestNet); Future hashTag(String tag) async { try { @@ -148,6 +131,21 @@ mixin SparkInterface @override Future init() async { try { + final sparkUsedTagsResetVersion = + info.otherData[WalletInfoKeys.firoSparkUsedTagsCacheResetVersion] + as int? ?? + 0; + if (sparkUsedTagsResetVersion == 0) { + await info.updateOtherData( + newEntries: {WalletInfoKeys.firoSparkUsedTagsCacheResetVersion: 1}, + isar: mainDB.isar, + ); + await FiroCacheCoordinator.clearSharedCache( + cryptoCurrency.network, + clearOnlyUsedTagsCache: true, + ); + } + Address? address = await getCurrentReceivingSparkAddress(); if (address == null) { address = await generateNextSparkAddress(); @@ -159,16 +157,17 @@ mixin SparkInterface final String derivationPath; if (cryptoCurrency.network.isTestNet) { derivationPath = - "$kSparkBaseDerivationPathTestnet$kDefaultSparkIndex"; + "${libSpark.sparkBaseDerivationPathTestnet}$kDefaultSparkIndex"; } else { - derivationPath = "$kSparkBaseDerivationPath$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPath}$kDefaultSparkIndex"; } final keys = root.derivePath(derivationPath); - _sparkChangeAddressCached = await LibSpark.getAddress( + _sparkChangeAddressCached = await libSpark.getAddress( privateKey: keys.privateKey.data, index: kDefaultSparkIndex, - diversifier: kSparkChange, + diversifier: libSpark.sparkChange, isTestNet: cryptoCurrency.network.isTestNet, ); } @@ -187,20 +186,19 @@ mixin SparkInterface @override Future> fetchAddressesForElectrumXScan() async { - final allAddresses = - await mainDB - .getAddresses(walletId) - .filter() - .not() - .group( - (q) => q - .typeEqualTo(AddressType.spark) - .or() - .typeEqualTo(AddressType.nonWallet) - .or() - .subTypeEqualTo(AddressSubType.nonWallet), - ) - .findAll(); + final allAddresses = await mainDB + .getAddresses(walletId) + .filter() + .not() + .group( + (q) => q + .typeEqualTo(AddressType.spark) + .or() + .typeEqualTo(AddressType.nonWallet) + .or() + .subTypeEqualTo(AddressSubType.nonWallet), + ) + .findAll(); return allAddresses; } @@ -221,20 +219,21 @@ mixin SparkInterface // default to starting at 1 if none found int diversifier = (highestStoredDiversifier ?? 0) + 1; // change address check - if (diversifier == kSparkChange) { + if (diversifier == libSpark.sparkChange) { diversifier++; } final root = await getRootHDNode(); final String derivationPath; if (cryptoCurrency.network.isTestNet) { - derivationPath = "$kSparkBaseDerivationPathTestnet$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPathTestnet}$kDefaultSparkIndex"; } else { - derivationPath = "$kSparkBaseDerivationPath$kDefaultSparkIndex"; + derivationPath = "${libSpark.sparkBaseDerivationPath}$kDefaultSparkIndex"; } final keys = root.derivePath(derivationPath); - final String addressString = await LibSpark.getAddress( + final String addressString = await libSpark.getAddress( privateKey: keys.privateKey.data, index: kDefaultSparkIndex, diversifier: diversifier, @@ -261,18 +260,17 @@ mixin SparkInterface ); } else { // fetch spendable spark coins - final coins = - await mainDB.isar.sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .isUsedEqualTo(false) - .and() - .heightIsNotNull() - .and() - .not() - .valueIntStringEqualTo("0") - .findAll(); + final coins = await mainDB.isar.sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .isUsedEqualTo(false) + .and() + .heightIsNotNull() + .and() + .not() + .valueIntStringEqualTo("0") + .findAll(); final available = coins .map((e) => e.value) @@ -286,24 +284,25 @@ mixin SparkInterface } // prepare coin data for ffi - final serializedCoins = - coins - .map( - (e) => ( - serializedCoin: e.serializedCoinB64!, - serializedCoinContext: e.contextB64!, - groupId: e.groupId, - height: e.height!, - ), - ) - .toList(); + final serializedCoins = coins + .map( + (e) => ( + serializedCoin: e.serializedCoinB64!, + serializedCoinContext: e.contextB64!, + groupId: e.groupId, + height: e.height!, + ), + ) + .toList(); final root = await getRootHDNode(); final String derivationPath; if (cryptoCurrency.network.isTestNet) { - derivationPath = "$kSparkBaseDerivationPathTestnet$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPathTestnet}$kDefaultSparkIndex"; } else { - derivationPath = "$kSparkBaseDerivationPath$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPath}$kDefaultSparkIndex"; } final privateKey = root.derivePath(derivationPath).privateKey.data; int estimate = await _asyncSparkFeesWrapper( @@ -378,18 +377,17 @@ mixin SparkInterface final txAmount = transparentSumOut + sparkSumOut; // fetch spendable spark coins - final coins = - await mainDB.isar.sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .isUsedEqualTo(false) - .and() - .heightIsNotNull() - .and() - .not() - .valueIntStringEqualTo("0") - .findAll(); + final coins = await mainDB.isar.sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .isUsedEqualTo(false) + .and() + .heightIsNotNull() + .and() + .not() + .valueIntStringEqualTo("0") + .findAll(); final available = info.cachedBalanceTertiary.spendable; @@ -400,17 +398,16 @@ mixin SparkInterface final bool isSendAll = available == txAmount; // prepare coin data for ffi - final serializedCoins = - coins - .map( - (e) => ( - serializedCoin: e.serializedCoinB64!, - serializedCoinContext: e.contextB64!, - groupId: e.groupId, - height: e.height!, - ), - ) - .toList(); + final serializedCoins = coins + .map( + (e) => ( + serializedCoin: e.serializedCoinB64!, + serializedCoinContext: e.contextB64!, + groupId: e.groupId, + height: e.height!, + ), + ) + .toList(); final currentId = await electrumXClient.getSparkLatestCoinId(); final List> setMaps = []; @@ -436,8 +433,9 @@ mixin SparkInterface "blockHash": info.blockHash, "setHash": info.setHash, "coinGroupID": i, - "coins": - resultSet.map((e) => [e.serialized, e.txHash, e.context]).toList(), + "coins": resultSet + .map((e) => [e.serialized, e.txHash, e.context]) + .toList(), }; setData["coinGroupID"] = i; @@ -448,31 +446,28 @@ mixin SparkInterface )); } - final allAnonymitySets = - setMaps - .map( - (e) => ( - setId: e["coinGroupID"] as int, - setHash: e["setHash"] as String, - set: - (e["coins"] as List) - .map( - (e) => ( - serializedCoin: e[0] as String, - txHash: e[1] as String, - ), - ) - .toList(), - ), - ) - .toList(); + final allAnonymitySets = setMaps + .map( + (e) => ( + setId: e["coinGroupID"] as int, + setHash: e["setHash"] as String, + set: (e["coins"] as List) + .map( + (e) => + (serializedCoin: e[0] as String, txHash: e[1] as String), + ) + .toList(), + ), + ) + .toList(); final root = await getRootHDNode(); final String derivationPath; if (cryptoCurrency.network.isTestNet) { - derivationPath = "$kSparkBaseDerivationPathTestnet$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPathTestnet}$kDefaultSparkIndex"; } else { - derivationPath = "$kSparkBaseDerivationPath$kDefaultSparkIndex"; + derivationPath = "${libSpark.sparkBaseDerivationPath}$kDefaultSparkIndex"; } final privateKey = root.derivePath(derivationPath).privateKey.data; @@ -485,7 +480,7 @@ mixin SparkInterface sparkRecipientsWithFeeSubtracted; final recipientCount = (txData.recipients?.where((e) => e.amount.raw > BigInt.zero).length ?? - 0); + 0); final totalRecipientCount = recipientCount + (txData.sparkRecipients?.length ?? 0); final BigInt estimatedFee; @@ -605,7 +600,7 @@ mixin SparkInterface ({Uint8List script, int size})? noProofNameTxData; if (txData.sparkNameInfo != null) { - noProofNameTxData = LibSpark.createSparkNameScript( + noProofNameTxData = libSpark.createSparkNameScript( sparkNameValidityBlocks: txData.sparkNameInfo!.validBlocks, name: txData.sparkNameInfo!.name, additionalInfo: txData.sparkNameInfo!.additionalInfo, @@ -647,15 +642,13 @@ mixin SparkInterface [], serializedCoins: serializedCoins, allAnonymitySets: allAnonymitySets, - idAndBlockHashes: - idAndBlockHashes - .map( - (e) => (setId: e.groupId, blockHash: base64Decode(e.blockHash)), - ) - .toList(), + idAndBlockHashes: idAndBlockHashes + .map((e) => (setId: e.groupId, blockHash: base64Decode(e.blockHash))) + .toList(), txHash: extractedTx.getHash(), - additionalTxSize: - txData.sparkNameInfo == null ? 0 : noProofNameTxData!.size, + additionalTxSize: txData.sparkNameInfo == null + ? 0 + : noProofNameTxData!.size, )); for (final outputScript in spend.outputScripts) { @@ -680,7 +673,7 @@ mixin SparkInterface int hashFailSafe = 0; while (nameScriptData == null) { try { - nameScriptData = LibSpark.createSparkNameScript( + nameScriptData = libSpark.createSparkNameScript( sparkNameValidityBlocks: txData.sparkNameInfo!.validBlocks, name: txData.sparkNameInfo!.name, additionalInfo: txData.sparkNameInfo!.additionalInfo, @@ -730,11 +723,10 @@ mixin SparkInterface sequence: 0xffffffff, outpoint: null, addresses: [], - valueStringSats: - tempOutputs - .map((e) => e.value) - .fold(fee.raw, (p, e) => p + e) - .toString(), + valueStringSats: tempOutputs + .map((e) => e.value) + .fold(fee.raw, (p, e) => p + e) + .toString(), witness: null, innerRedeemScriptAsm: null, coinbase: null, @@ -777,10 +769,9 @@ mixin SparkInterface timestamp: DateTime.timestamp().millisecondsSinceEpoch ~/ 1000, inputs: List.unmodifiable(tempInputs), outputs: List.unmodifiable(tempOutputs), - type: - tempOutputs.map((e) => e.walletOwns).fold(true, (p, e) => p &= e) - ? TransactionType.sentToSelf - : TransactionType.outgoing, + type: tempOutputs.map((e) => e.walletOwns).fold(true, (p, e) => p &= e) + ? TransactionType.sentToSelf + : TransactionType.outgoing, subType: TransactionSubType.sparkSpend, otherData: jsonEncode({"overrideFee": fee.toJsonString()}), height: null, @@ -947,10 +938,9 @@ mixin SparkInterface + 1; // update balance - final percentIncrement = - refreshProgressRange == null - ? null - : (refreshProgressRange.$2 - refreshProgressRange.$1) / steps; + final percentIncrement = refreshProgressRange == null + ? null + : (refreshProgressRange.$2 - refreshProgressRange.$1) / steps; double currentPercent = refreshProgressRange?.$1 ?? 0; // fetch and update process for each set groupId as required @@ -1010,10 +1000,9 @@ mixin SparkInterface afterBlockHash: lastCheckedHash, network: cryptoCurrency.network, ); - final coinsRaw = - anonymitySetResult - .map((e) => [e.serialized, e.txHash, e.context]) - .toList(); + final coinsRaw = anonymitySetResult + .map((e) => [e.serialized, e.txHash, e.context]) + .toList(); if (coinsRaw.isNotEmpty) { rawCoinsBySetId[i] = coinsRaw; @@ -1029,25 +1018,19 @@ mixin SparkInterface // get address(es) to get the private key hex strings required for // identifying spark coins - final sparkAddresses = - await mainDB.isar.addresses - .where() - .walletIdEqualTo(walletId) - .filter() - .typeEqualTo(AddressType.spark) - .findAll(); + final sparkAddresses = await mainDB.isar.addresses + .where() + .walletIdEqualTo(walletId) + .filter() + .typeEqualTo(AddressType.spark) + .findAll(); final root = await getRootHDNode(); - final Set privateKeyHexSet = - sparkAddresses - .map( - (e) => - root - .derivePath(e.derivationPath!.value) - .privateKey - .data - .toHex, - ) - .toSet(); + final Set privateKeyHexSet = sparkAddresses + .map( + (e) => + root.derivePath(e.derivationPath!.value).privateKey.data.toHex, + ) + .toSet(); // try to identify any coins in the unchecked set data final List newlyIdCoins = []; @@ -1093,17 +1076,16 @@ mixin SparkInterface } // get unused and or unconfirmed coins from db - final coinsToCheck = - await mainDB.isar.sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .heightIsNull() - .or() - .isUsedEqualTo(false) - .findAll(); - - Set? spentCoinTags; + final coinsToCheck = await mainDB.isar.sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .heightIsNull() + .or() + .isUsedEqualTo(false) + .findAll(); + + List? spentCoinTags; // only fetch tags from db if we need them to compare against any items // in coinsToCheck if (coinsToCheck.isNotEmpty) { @@ -1132,10 +1114,9 @@ mixin SparkInterface checked = coin; } } else { - checked = - spentCoinTags!.contains(coin.lTagHash) - ? coin.copyWith(isUsed: true) - : coin; + checked = spentCoinTags!.contains(coin.lTagHash) + ? coin.copyWith(isUsed: true) + : coin; } checkedCoins.add(checked); @@ -1155,13 +1136,12 @@ mixin SparkInterface final currentHeight = await chainHeight; // get all unused coins to update wallet spark balance - final unusedCoins = - await mainDB.isar.sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .isUsedEqualTo(false) - .findAll(); + final unusedCoins = await mainDB.isar.sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .isUsedEqualTo(false) + .findAll(); final sparkNamesUpdateFuture = refreshSparkNames(); @@ -1214,14 +1194,13 @@ mixin SparkInterface } Future> getSparkSpendTransactionIds() async { - final tags = - await mainDB.isar.sparkCoins - .where() - .walletIdEqualToAnyLTagHash(walletId) - .filter() - .isUsedEqualTo(true) - .lTagHashProperty() - .findAll(); + final tags = await mainDB.isar.sparkCoins + .where() + .walletIdEqualToAnyLTagHash(walletId) + .filter() + .isUsedEqualTo(true) + .lTagHashProperty() + .findAll(); final pairs = await FiroCacheCoordinator.getUsedCoinTxidsFor( tags: tags, @@ -1257,8 +1236,9 @@ mixin SparkInterface Logging.instance.i("Refreshing spark names for $walletId ${info.name}"); final db = Drift.get(walletId); - final myNameStrings = - await db.managers.sparkNames.map((e) => e.name).get(); + final myNameStrings = await db.managers.sparkNames + .map((e) => e.name) + .get(); final names = await electrumXClient.getSparkNames(); // start update shared cache of all names @@ -1289,9 +1269,11 @@ mixin SparkInterface final root = await getRootHDNode(); final String derivationPath; if (cryptoCurrency.network.isTestNet) { - derivationPath = "$kSparkBaseDerivationPathTestnet$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPathTestnet}$kDefaultSparkIndex"; } else { - derivationPath = "$kSparkBaseDerivationPath$kDefaultSparkIndex"; + derivationPath = + "${libSpark.sparkBaseDerivationPath}$kDefaultSparkIndex"; } final keys = root.derivePath(derivationPath); @@ -1302,10 +1284,10 @@ mixin SparkInterface while (diversifier < maxDiversifier) { // change address check - if (diversifier == kSparkChange) { + if (diversifier == libSpark.sparkChange) { diversifier++; } - final addressString = await LibSpark.getAddress( + final addressString = await libSpark.getAddress( privateKey: keys.privateKey.data, index: kDefaultSparkIndex, diversifier: diversifier, @@ -1400,10 +1382,9 @@ mixin SparkInterface // setup some vars int nChangePosInOut = -1; final int nChangePosRequest = nChangePosInOut; - List outputs_ = - outputs - .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) - .toList(); // deep copy + List outputs_ = outputs + .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) + .toList(); // deep copy final feesObject = await fees; final currentHeight = await chainHeight; final random = Random.secure(); @@ -1412,10 +1393,9 @@ mixin SparkInterface valueAndUTXOs.shuffle(random); while (valueAndUTXOs.isNotEmpty) { - final lockTime = - random.nextInt(10) == 0 - ? max(0, currentHeight - random.nextInt(100)) - : currentHeight; + final lockTime = random.nextInt(10) == 0 + ? max(0, currentHeight - random.nextInt(100)) + : currentHeight; const txVersion = 1; final List vin = []; final List<(dynamic, int, String?)> vout = []; @@ -1462,10 +1442,9 @@ mixin SparkInterface setCoins.clear(); // deep copy - final remainingOutputs = - outputs_ - .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) - .toList(); + final remainingOutputs = outputs_ + .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) + .toList(); final List singleTxOutputs = []; if (autoMintAll) { @@ -1525,17 +1504,13 @@ mixin SparkInterface } // Generate dummy mint coins to save time - final dummyRecipients = LibSpark.createSparkMintRecipients( - outputs: - singleTxOutputs - .map( - (e) => ( - sparkAddress: e.address, - value: e.value.toInt(), - memo: "", - ), - ) - .toList(), + final dummyRecipients = libSpark.createSparkMintRecipients( + outputs: singleTxOutputs + .map( + (e) => + (sparkAddress: e.address, value: e.value.toInt(), memo: ""), + ) + .toList(), serialContext: Uint8List(0), generate: false, ); @@ -1608,40 +1583,36 @@ mixin SparkInterface switch (sd.derivePathType) { case DerivePathType.bip44: - data = - btc - .P2PKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; + data = btc + .P2PKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip49: - final p2wpkh = - btc - .P2WPKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; - data = - btc - .P2SH( - data: btc.PaymentData(redeem: p2wpkh), - network: _bitcoinDartNetwork, - ) - .data; + final p2wpkh = btc + .P2WPKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; + data = btc + .P2SH( + data: btc.PaymentData(redeem: p2wpkh), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip84: - data = - btc - .P2WPKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; + data = btc + .P2WPKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip86: @@ -1700,20 +1671,19 @@ mixin SparkInterface } // Generate real mint coins - final serialContext = LibSpark.serializeMintContext( + final serialContext = libSpark.serializeMintContext( inputs: setCoins.map((e) => (e.utxo.txid, e.utxo.vout)).toList(), ); - final recipients = LibSpark.createSparkMintRecipients( - outputs: - singleTxOutputs - .map( - (e) => ( - sparkAddress: e.address, - memo: e.memo, - value: e.value.toInt(), - ), - ) - .toList(), + final recipients = libSpark.createSparkMintRecipients( + outputs: singleTxOutputs + .map( + (e) => ( + sparkAddress: e.address, + memo: e.memo, + value: e.value.toInt(), + ), + ) + .toList(), serialContext: serialContext, generate: true, ); @@ -1738,10 +1708,9 @@ mixin SparkInterface } // deep copy - outputs_ = - remainingOutputs - .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) - .toList(); + outputs_ = remainingOutputs + .map((e) => MutableSparkRecipient(e.address, e.value, e.memo)) + .toList(); break; // Done, enough fee included. } @@ -1769,40 +1738,36 @@ mixin SparkInterface switch (input.derivePathType) { case DerivePathType.bip44: - data = - btc - .P2PKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; + data = btc + .P2PKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip49: - final p2wpkh = - btc - .P2WPKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; - data = - btc - .P2SH( - data: btc.PaymentData(redeem: p2wpkh), - network: _bitcoinDartNetwork, - ) - .data; + final p2wpkh = btc + .P2WPKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; + data = btc + .P2SH( + data: btc.PaymentData(redeem: p2wpkh), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip84: - data = - btc - .P2WPKH( - data: btc.PaymentData(pubkey: pubKey), - network: _bitcoinDartNetwork, - ) - .data; + data = btc + .P2WPKH( + data: btc.PaymentData(pubkey: pubKey), + network: _bitcoinDartNetwork, + ) + .data; break; case DerivePathType.bip86: @@ -1847,8 +1812,9 @@ mixin SparkInterface tempOutputs.add( OutputV2.isarCantDoRequiredInDefaultConstructor( - scriptPubKeyHex: - addressOrScript is Uint8List ? addressOrScript.toHex : "000000", + scriptPubKeyHex: addressOrScript is Uint8List + ? addressOrScript.toHex + : "000000", valueStringSats: value.toString(), addresses: [ if (addressOrScript is String) addressOrScript.toString(), @@ -1899,24 +1865,22 @@ mixin SparkInterface assert(outputs.length == 1); final data = TxData( - sparkRecipients: - vout - .where((e) => e.$1 is Uint8List) // ignore change - .map( - (e) => ( - address: - outputs - .first - .address, // for display purposes on confirm tx screen. See todos above - memo: "", - amount: Amount( - rawValue: BigInt.from(e.$2), - fractionDigits: cryptoCurrency.fractionDigits, - ), - isChange: false, // ok? - ), - ) - .toList(), + sparkRecipients: vout + .where((e) => e.$1 is Uint8List) // ignore change + .map( + (e) => ( + address: outputs + .first + .address, // for display purposes on confirm tx screen. See todos above + memo: "", + amount: Amount( + rawValue: BigInt.from(e.$2), + fractionDigits: cryptoCurrency.fractionDigits, + ), + isChange: false, // ok? + ), + ) + .toList(), vSize: builtTx.virtualSize(), txid: builtTx.getId(), raw: builtTx.toHex(), @@ -1935,8 +1899,8 @@ mixin SparkInterface outputs: List.unmodifiable(tempOutputs), type: tempOutputs.map((e) => e.walletOwns).fold(true, (p, e) => p &= e) - ? TransactionType.sentToSelf - : TransactionType.outgoing, + ? TransactionType.sentToSelf + : TransactionType.outgoing, subType: TransactionSubType.sparkMint, otherData: null, height: null, @@ -2003,25 +1967,23 @@ mixin SparkInterface const subtractFeeFromAmount = true; // must be true for mint all final currentHeight = await chainHeight; - final spendableUtxos = - await mainDB.isar.utxos - .where() - .walletIdEqualTo(walletId) - .filter() - .isBlockedEqualTo(false) - .and() - .group((q) => q.usedEqualTo(false).or().usedIsNull()) - .and() - .valueGreaterThan(0) - .findAll(); + final spendableUtxos = await mainDB.isar.utxos + .where() + .walletIdEqualTo(walletId) + .filter() + .isBlockedEqualTo(false) + .and() + .group((q) => q.usedEqualTo(false).or().usedIsNull()) + .and() + .valueGreaterThan(0) + .findAll(); spendableUtxos.removeWhere( - (e) => - !e.isConfirmed( - currentHeight, - cryptoCurrency.minConfirms, - cryptoCurrency.minCoinbaseConfirms, - ), + (e) => !e.isConfirmed( + currentHeight, + cryptoCurrency.minConfirms, + cryptoCurrency.minCoinbaseConfirms, + ), ); if (spendableUtxos.isEmpty) { @@ -2062,12 +2024,9 @@ mixin SparkInterface if (txData.sparkRecipients?.isNotEmpty != true) { throw Exception("Missing spark recipients."); } - final recipients = - txData.sparkRecipients! - .map( - (e) => MutableSparkRecipient(e.address, e.amount.raw, e.memo), - ) - .toList(); + final recipients = txData.sparkRecipients! + .map((e) => MutableSparkRecipient(e.address, e.amount.raw, e.memo)) + .toList(); final total = recipients .map((e) => e.value) @@ -2079,16 +2038,17 @@ mixin SparkInterface throw Exception("Attempted send of zero amount"); } - final utxos = - txData.utxos?.whereType().map((e) => e.utxo).toList(); + final utxos = txData.utxos + ?.whereType() + .map((e) => e.utxo) + .toList(); final bool coinControl = utxos != null; - final utxosTotal = - coinControl - ? utxos - .map((e) => e.value) - .fold(BigInt.zero, (p, e) => p + BigInt.from(e)) - : null; + final utxosTotal = coinControl + ? utxos + .map((e) => e.value) + .fold(BigInt.zero, (p, e) => p + BigInt.from(e)) + : null; if (coinControl && utxosTotal! < total) { throw Exception("Insufficient selected UTXOs!"); @@ -2113,18 +2073,17 @@ mixin SparkInterface final canCPFP = this is CpfpInterface && coinControl; - final spendableUtxos = - availableOutputs - .where( - (e) => - canCPFP || - e.isConfirmed( - currentHeight, - cryptoCurrency.minConfirms, - cryptoCurrency.minCoinbaseConfirms, - ), - ) - .toList(); + final spendableUtxos = availableOutputs + .where( + (e) => + canCPFP || + e.isConfirmed( + currentHeight, + cryptoCurrency.minConfirms, + cryptoCurrency.minCoinbaseConfirms, + ), + ) + .toList(); if (spendableUtxos.isEmpty) { throw Exception("No available UTXOs found to anonymize"); @@ -2182,21 +2141,21 @@ mixin SparkInterface } } - if (years < 1 || years > kMaxNameRegistrationLengthYears) { + if (years < 1 || years > libSpark.maxNameRegistrationLengthYears) { throw Exception("Invalid spark name registration period years: $years"); } - if (name.isEmpty || name.length > kMaxNameLength) { + if (name.isEmpty || name.length > libSpark.maxNameLength) { throw Exception("Invalid spark name length: ${name.length}"); } - if (!RegExp(kNameRegexString).hasMatch(name)) { + if (!RegExp(libSpark.nameRegexString).hasMatch(name)) { throw Exception("Invalid symbols found in spark name: $name"); } if (additionalInfo.toUint8ListFromUtf8.length > - kMaxAdditionalInfoLengthBytes) { + libSpark.maxAdditionalInfoLengthBytes) { throw Exception( - "Additional info exceeds $kMaxAdditionalInfoLengthBytes bytes.", + "Additional info exceeds ${libSpark.maxAdditionalInfoLengthBytes} bytes.", ); } @@ -2218,11 +2177,11 @@ mixin SparkInterface final String destinationAddress; switch (cryptoCurrency.network) { case CryptoCurrencyNetwork.main: - destinationAddress = kStage3DevelopmentFundAddressMainNet; + destinationAddress = libSpark.stage3DevelopmentFundAddressMainNet; break; case CryptoCurrencyNetwork.test: - destinationAddress = kStage3DevelopmentFundAddressTestNet; + destinationAddress = libSpark.stage3DevelopmentFundAddressTestNet; break; default: @@ -2238,7 +2197,9 @@ mixin SparkInterface TxRecipient( address: destinationAddress, amount: Amount.fromDecimal( - Decimal.fromInt(kStandardSparkNamesFee[name.length] * years), + Decimal.fromInt( + libSpark.standardSparkNamesFee[name.length] * years, + ), fractionDigits: cryptoCurrency.fractionDigits, ), isChange: false, @@ -2332,7 +2293,7 @@ _createSparkSend( }) args, ) async { - final spend = LibSpark.createSparkSendTransaction( + final spend = libSpark.createSparkSendTransaction( privateKeyHex: args.privateKeyHex, index: args.index, recipients: args.recipients, @@ -2372,7 +2333,7 @@ Future> _identifyCoins( final txHash = data[1].toHexReversedFromBase64; final contextB64 = data[2]; - final coin = LibSpark.identifyAndRecoverCoin( + final coin = libSpark.identifyAndRecoverCoin( serializedCoinB64, privateKeyHex: privateKeyHex, index: kDefaultSparkIndex, @@ -2445,13 +2406,12 @@ class MutableSparkRecipient { } } -typedef SerializedCoinData = - ({ - int groupId, - int height, - String serializedCoin, - String serializedCoinContext, - }); +typedef SerializedCoinData = ({ + int groupId, + int height, + String serializedCoin, + String serializedCoinContext, +}); Future _asyncSparkFeesWrapper({ required String privateKeyHex, @@ -2488,7 +2448,7 @@ int _estSparkFeeComputeFunc( }) args, ) { - final est = LibSpark.estimateSparkFee( + final est = libSpark.estimateSparkFee( privateKeyHex: args.privateKeyHex, index: args.index, sendAmount: args.sendAmount, diff --git a/lib/widgets/custom_buttons/simple_paste_button.dart b/lib/widgets/custom_buttons/simple_paste_button.dart new file mode 100644 index 000000000..4dfdf3c7b --- /dev/null +++ b/lib/widgets/custom_buttons/simple_paste_button.dart @@ -0,0 +1,60 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2025 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2025-09-16 + * + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../themes/stack_colors.dart'; +import '../../utilities/assets.dart'; +import '../../utilities/clipboard_interface.dart'; +import '../../utilities/text_styles.dart'; +import '../../utilities/util.dart'; +import '../conditional_parent.dart'; + +class SimplePasteButton extends StatelessWidget { + const SimplePasteButton({ + super.key, + required this.onPaste, + this.clipboard = const ClipboardWrapper(), + }); + + final void Function(String?) onPaste; + final ClipboardInterface clipboard; + + @override + Widget build(BuildContext context) { + return ConditionalParent( + condition: Util.isDesktop, + builder: + (child) => + MouseRegion(cursor: SystemMouseCursors.click, child: child), + child: GestureDetector( + onTap: () async { + // TODO handle async better here!!!!!!!!!!!!!!!!!!!!!!!! + final data = await clipboard.getData(Clipboard.kTextPlain); + onPaste(data?.text); + }, + child: Row( + children: [ + SvgPicture.asset( + Assets.svg.clipboard, + width: 10, + height: 10, + color: Theme.of(context).extension()!.infoItemIcons, + ), + const SizedBox(width: 4), + Text("Paste", style: STextStyles.link2(context)), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/desktop/desktop_fee_dialog.dart b/lib/widgets/desktop/desktop_fee_dialog.dart index 82cc82e0b..82f92a5a2 100644 --- a/lib/widgets/desktop/desktop_fee_dialog.dart +++ b/lib/widgets/desktop/desktop_fee_dialog.dart @@ -1,4 +1,3 @@ -import 'package:cs_monero/cs_monero.dart' as lib_monero; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -16,6 +15,7 @@ import '../../utilities/text_styles.dart'; import '../../wallets/crypto_currency/crypto_currency.dart'; import '../../wallets/isar/providers/eth/current_token_wallet_provider.dart'; import '../../wallets/wallet/impl/firo_wallet.dart'; +import '../../wl_gen/interfaces/cs_monero_interface.dart'; import '../animated_text.dart'; import '../conditional_parent.dart'; import 'desktop_dialog.dart'; @@ -63,7 +63,7 @@ class _DesktopFeeDialogState extends ConsumerState { if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.high.value), + BigInt.from(csMonero.getTxPriorityHigh()), ); ref.read(feeSheetSessionCacheProvider).fast[amount] = fee; } else if (coin is Firo) { @@ -113,7 +113,7 @@ class _DesktopFeeDialogState extends ConsumerState { if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.medium.value), + BigInt.from(csMonero.getTxPriorityMedium()), ); ref.read(feeSheetSessionCacheProvider).average[amount] = fee; } else if (coin is Firo) { @@ -163,7 +163,7 @@ class _DesktopFeeDialogState extends ConsumerState { if (coin is Monero || coin is Wownero) { final fee = await wallet.estimateFeeFor( amount, - BigInt.from(lib_monero.TransactionPriority.normal.value), + BigInt.from(csMonero.getTxPriorityNormal()), ); ref.read(feeSheetSessionCacheProvider).slow[amount] = fee; } else if (coin is Firo) { @@ -335,18 +335,17 @@ class _DesktopFeeItemState extends ConsumerState { return ConditionalParent( condition: widget.isButton, - builder: - (child) => MaterialButton( - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - onPressed: () { - ref.read(feeRateTypeDesktopStateProvider.state).state = - widget.feeRateType; - Navigator.of( - context, - ).pop((widget.feeRateType, feeString, timeString)); - }, - child: child, - ), + builder: (child) => MaterialButton( + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onPressed: () { + ref.read(feeRateTypeDesktopStateProvider.state).state = + widget.feeRateType; + Navigator.of( + context, + ).pop((widget.feeRateType, feeString, timeString)); + }, + child: child, + ), child: Builder( builder: (_) { if (widget.feeRateType == FeeRateType.custom) { @@ -355,14 +354,12 @@ class _DesktopFeeItemState extends ConsumerState { children: [ Text( widget.feeRateType.prettyName, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of( context, ).extension()!.textFieldActiveText, - ), + ), textAlign: TextAlign.left, ), ], @@ -377,10 +374,9 @@ class _DesktopFeeItemState extends ConsumerState { return AnimatedText( stringsToLoopThrough: stringsToLoopThrough, style: STextStyles.desktopTextExtraExtraSmall(context).copyWith( - color: - Theme.of( - context, - ).extension()!.textFieldActiveText, + color: Theme.of( + context, + ).extension()!.textFieldActiveText, ), ); } else { @@ -388,12 +384,11 @@ class _DesktopFeeItemState extends ConsumerState { future: widget.feeFor( coin: wallet.info.coin, feeRateType: widget.feeRateType, - feeRate: - widget.feeRateType == FeeRateType.fast - ? widget.feeObject!.fast - : widget.feeRateType == FeeRateType.slow - ? widget.feeObject!.slow - : widget.feeObject!.medium, + feeRate: widget.feeRateType == FeeRateType.fast + ? widget.feeObject!.fast + : widget.feeRateType == FeeRateType.slow + ? widget.feeObject!.slow + : widget.feeObject!.medium, amount: ref.watch(sendAmountProvider.state).state, ), builder: (_, AsyncSnapshot snapshot) { @@ -403,58 +398,51 @@ class _DesktopFeeItemState extends ConsumerState { "${widget.feeRateType.prettyName} " "(~${ref.watch(pAmountFormatter(wallet.info.coin)).format(snapshot.data!, indicatePrecisionLoss: false)})"; - timeString = - wallet.info.coin is Ethereum - ? "" - : estimatedTimeToBeIncludedInNextBlock( - wallet.info.coin.targetBlockTimeSeconds, - widget.feeRateType == FeeRateType.fast - ? widget.feeObject!.numberOfBlocksFast - : widget.feeRateType == FeeRateType.slow - ? widget.feeObject!.numberOfBlocksSlow - : widget.feeObject!.numberOfBlocksAverage, - ); + timeString = wallet.info.coin is Ethereum + ? "" + : estimatedTimeToBeIncludedInNextBlock( + wallet.info.coin.targetBlockTimeSeconds, + widget.feeRateType == FeeRateType.fast + ? widget.feeObject!.numberOfBlocksFast + : widget.feeRateType == FeeRateType.slow + ? widget.feeObject!.numberOfBlocksSlow + : widget.feeObject!.numberOfBlocksAverage, + ); return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( feeString!, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of( context, ).extension()!.textFieldActiveText, - ), + ), textAlign: TextAlign.left, ), if (widget.feeObject != null) Text( timeString!, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of(context) + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of(context) .extension()! .textFieldActiveSearchIconRight, - ), + ), ), ], ); } else { return AnimatedText( stringsToLoopThrough: stringsToLoopThrough, - style: STextStyles.desktopTextExtraExtraSmall( - context, - ).copyWith( - color: - Theme.of( + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of( context, ).extension()!.textFieldActiveText, - ), + ), ); } }, diff --git a/lib/widgets/detail_item.dart b/lib/widgets/detail_item.dart index 13e8975d3..91a662538 100644 --- a/lib/widgets/detail_item.dart +++ b/lib/widgets/detail_item.dart @@ -35,9 +35,9 @@ class DetailItem extends StatelessWidget { TextStyle detailStyle = STextStyles.w500_14(context); String _detail = detail; if (overrideDetailTextColor != null) { - detailStyle = STextStyles.w500_14(context).copyWith( - color: overrideDetailTextColor, - ); + detailStyle = STextStyles.w500_14( + context, + ).copyWith(color: overrideDetailTextColor); } if (detail.isEmpty && showEmptyDetail) { @@ -51,24 +51,14 @@ class DetailItem extends StatelessWidget { horizontal: horizontal, borderColor: borderColor, expandDetail: expandDetail, - title: disableSelectableText - ? Text( - title, - style: STextStyles.itemSubtitle(context), - ) - : SelectableText( - title, - style: STextStyles.itemSubtitle(context), - ), - detail: disableSelectableText - ? Text( - _detail, - style: detailStyle, - ) - : SelectableText( - _detail, - style: detailStyle, - ), + title: + disableSelectableText + ? Text(title, style: STextStyles.itemSubtitle(context)) + : SelectableText(title, style: STextStyles.itemSubtitle(context)), + detail: + disableSelectableText + ? Text(_detail, style: detailStyle) + : SelectableText(_detail, style: detailStyle), ); } } @@ -95,56 +85,65 @@ class DetailItemBase extends StatelessWidget { Widget build(BuildContext context) { return ConditionalParent( condition: !Util.isDesktop || borderColor != null, - builder: (child) => RoundedWhiteContainer( - padding: Util.isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - borderColor: borderColor, - child: child, - ), + builder: + (child) => RoundedWhiteContainer( + padding: + Util.isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + borderColor: borderColor, + child: child, + ), child: ConditionalParent( condition: Util.isDesktop && borderColor == null, - builder: (child) => Padding( - padding: const EdgeInsets.all(16), - child: child, - ), - child: horizontal - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - title, - if (expandDetail) - const SizedBox( - width: 16, + builder: + (child) => Padding(padding: const EdgeInsets.all(16), child: child), + child: + horizontal + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + title, + if (expandDetail) const SizedBox(width: 16), + ConditionalParent( + condition: expandDetail, + builder: (child) => Expanded(child: child), + child: detail, + ), + ], + ) + : Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [title, button ?? Container()], ), - ConditionalParent( - condition: expandDetail, - builder: (child) => Expanded(child: child), - child: detail, - ), - ], - ) - : Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - title, - button ?? Container(), - ], - ), - const SizedBox( - height: 5, - ), - ConditionalParent( - condition: expandDetail, - builder: (child) => Expanded(child: child), - child: detail, - ), - ], - ), + const SizedBox(height: 5), + ConditionalParent( + condition: expandDetail, + builder: (child) => Expanded(child: child), + child: detail, + ), + ], + ), ), ); } } + +class DetailDivider extends StatelessWidget { + const DetailDivider({super.key}); + + @override + Widget build(BuildContext context) { + if (Util.isDesktop) { + return Container( + height: 1, + color: Theme.of(context).extension()!.backgroundAppBar, + ); + } else { + return const SizedBox(height: 12); + } + } +} diff --git a/lib/widgets/icon_widgets/eth_token_icon.dart b/lib/widgets/icon_widgets/eth_token_icon.dart index b837eeeb7..0b0104fbf 100644 --- a/lib/widgets/icon_widgets/eth_token_icon.dart +++ b/lib/widgets/icon_widgets/eth_token_icon.dart @@ -11,7 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../models/isar/exchange_cache/currency.dart'; import '../../services/exchange/change_now/change_now_exchange.dart'; diff --git a/lib/widgets/isar_collection_watcher_list.dart b/lib/widgets/isar_collection_watcher_list.dart index bd4c2596e..10d7d1b24 100644 --- a/lib/widgets/isar_collection_watcher_list.dart +++ b/lib/widgets/isar_collection_watcher_list.dart @@ -11,7 +11,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../themes/stack_colors.dart'; import '../../utilities/text_styles.dart'; @@ -58,10 +58,12 @@ class _IsarCollectionWatcherListState void initState() { super.initState(); - sparkCoinsCollectionWatcher = - widget.queryBuilder().watch(fireImmediately: true); - _streamSubscription = sparkCoinsCollectionWatcher! - .listen((data) => _onSparkCoinsCollectionWatcherEvent(data)); + sparkCoinsCollectionWatcher = widget.queryBuilder().watch( + fireImmediately: true, + ); + _streamSubscription = sparkCoinsCollectionWatcher!.listen( + (data) => _onSparkCoinsCollectionWatcherEvent(data), + ); } @override @@ -94,7 +96,9 @@ class _IsarCollectionWatcherListState child: RoundedWhiteContainer( child: Row( children: [ - ...widget.itemBuilder(null).map( + ...widget + .itemBuilder(null) + .map( (e) => Expanded( flex: e.$3, child: Text( @@ -112,32 +116,37 @@ class _IsarCollectionWatcherListState child: ListView.separated( shrinkWrap: true, itemCount: _items.length, - separatorBuilder: (_, __) => Container( - height: 1, - color: Theme.of(context) - .extension()! - .backgroundAppBar, - ), - itemBuilder: (_, index) => Padding( - padding: const EdgeInsets.all(4), - child: RoundedWhiteContainer( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - ...widget.itemBuilder(_items[index]).map( - (e) => Expanded( - flex: e.$3, - child: SelectableText( - e.$2, - style: STextStyles.itemSubtitle12(context), - textAlign: TextAlign.left, + separatorBuilder: + (_, __) => Container( + height: 1, + color: + Theme.of( + context, + ).extension()!.backgroundAppBar, + ), + itemBuilder: + (_, index) => Padding( + padding: const EdgeInsets.all(4), + child: RoundedWhiteContainer( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ...widget + .itemBuilder(_items[index]) + .map( + (e) => Expanded( + flex: e.$3, + child: SelectableText( + e.$2, + style: STextStyles.itemSubtitle12(context), + textAlign: TextAlign.left, + ), + ), ), - ), - ), - ], + ], + ), + ), ), - ), - ), ), ), ], @@ -147,32 +156,28 @@ class _IsarCollectionWatcherListState itemCount: _items.length + 1, itemBuilder: (ctx, index) { return Padding( - padding: const EdgeInsets.only( - bottom: 16, - left: 16, - right: 16, - ), + padding: const EdgeInsets.only(bottom: 16, left: 16, right: 16), child: RoundedWhiteContainer( - child: index == 0 - ? Row( - children: [ - Text( - "Total ${widget.itemName}: ${_items.length}", - style: STextStyles.itemSubtitle(context), - ), - ], - ) - : Column( - mainAxisSize: MainAxisSize.min, - children: [ - ...widget.itemBuilder(_items[index - 1]).map( - (e) => DetailItem( - title: e.$1, - detail: e.$2, + child: + index == 0 + ? Row( + children: [ + Text( + "Total ${widget.itemName}: ${_items.length}", + style: STextStyles.itemSubtitle(context), + ), + ], + ) + : Column( + mainAxisSize: MainAxisSize.min, + children: [ + ...widget + .itemBuilder(_items[index - 1]) + .map( + (e) => DetailItem(title: e.$1, detail: e.$2), ), - ), - ], - ), + ], + ), ), ); }, diff --git a/lib/widgets/mwc_txs_method_toggle.dart b/lib/widgets/mwc_txs_method_toggle.dart new file mode 100644 index 000000000..4381d6e23 --- /dev/null +++ b/lib/widgets/mwc_txs_method_toggle.dart @@ -0,0 +1,67 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2023 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2023-05-26 + * + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../providers/ui/preview_tx_button_state_provider.dart'; +import '../themes/stack_colors.dart'; +import '../utilities/assets.dart'; +import '../utilities/constants.dart'; +import '../utilities/enums/mwc_transaction_method.dart'; +import '../utilities/util.dart'; +import 'toggle.dart'; + +class MwcTxsMethodToggle extends ConsumerWidget { + const MwcTxsMethodToggle({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + debugPrint("BUILD: $runtimeType"); + final isDesktop = Util.isDesktop; + + return Toggle( + onValueChanged: (value) { + ref.read(pSelectedMwcTransactionMethod.notifier).state = + value + ? MwcTransactionMethod.mwcmqs + : MwcTransactionMethod.slatepack; + }, + isOn: + ref.watch(pSelectedMwcTransactionMethod) == + MwcTransactionMethod.mwcmqs, + onColor: + isDesktop + ? Theme.of( + context, + ).extension()!.rateTypeToggleDesktopColorOn + : Theme.of( + context, + ).extension()!.rateTypeToggleColorOn, + offColor: + isDesktop + ? Theme.of( + context, + ).extension()!.rateTypeToggleDesktopColorOff + : Theme.of( + context, + ).extension()!.rateTypeToggleColorOff, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + onIcon: Assets.svg.gear, + onText: "Slatepack", + offIcon: Assets.svg.radioSyncing, + offText: "Automatic", + ); + } +} diff --git a/lib/widgets/onetime_popups/tor_has_been_add_dialog.dart b/lib/widgets/onetime_popups/tor_has_been_add_dialog.dart index 9709c46b3..05dd4311d 100644 --- a/lib/widgets/onetime_popups/tor_has_been_add_dialog.dart +++ b/lib/widgets/onetime_popups/tor_has_been_add_dialog.dart @@ -153,7 +153,7 @@ class _TorHasBeenAddedDialogState extends State<_TorHasBeenAddedDialog> { height: Util.isDesktop ? 24 : 16, ), Text( - "Note: Tor does NOT yet work for Monero or Epic Cash wallets. " + "Note: Tor does NOT yet work for Monero, Mimblewimblecoin or Epic Cash wallets. " "Opening one of these will leak your IP address.", style: Util.isDesktop ? STextStyles.desktopTextMedium(context) diff --git a/lib/widgets/stack_dialog.dart b/lib/widgets/stack_dialog.dart index ff921d24c..2c56aa7c0 100644 --- a/lib/widgets/stack_dialog.dart +++ b/lib/widgets/stack_dialog.dart @@ -28,39 +28,37 @@ class StackDialogBase extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: EdgeInsets.only( - top: 16, - left: 16, - right: 16, - bottom: 16 + keyboardPaddingAmount, - ), - child: Column( - mainAxisAlignment: - !Util.isDesktop ? MainAxisAlignment.end : MainAxisAlignment.center, - children: [ - Flexible( - child: SingleChildScrollView( - child: Material( - borderRadius: BorderRadius.circular( - 20, - ), - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).extension()!.popupBG, - borderRadius: BorderRadius.circular( - 20, + return SafeArea( + child: Padding( + padding: EdgeInsets.only( + top: 16, + left: 16, + right: 16, + bottom: 16 + keyboardPaddingAmount, + ), + child: Column( + mainAxisAlignment: + !Util.isDesktop + ? MainAxisAlignment.end + : MainAxisAlignment.center, + children: [ + Flexible( + child: SingleChildScrollView( + child: Material( + borderRadius: BorderRadius.circular(20), + child: Container( + decoration: BoxDecoration( + color: + Theme.of(context).extension()!.popupBG, + borderRadius: BorderRadius.circular(20), ), - ), - child: Padding( - padding: padding, - child: child, + child: Padding(padding: padding, child: child), ), ), ), ), - ), - ], + ], + ), ), ); } @@ -102,10 +100,7 @@ class StackDialog extends StatelessWidget { icon != null ? icon! : Container(), ], ), - if (message != null) - const SizedBox( - height: 8, - ), + if (message != null) const SizedBox(height: 8), if (message != null) Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -117,18 +112,14 @@ class StackDialog extends StatelessWidget { ], ), if (leftButton != null || rightButton != null) - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), if (leftButton != null || rightButton != null) Row( children: [ leftButton == null ? const Spacer() : Expanded(child: leftButton!), - const SizedBox( - width: 8, - ), + const SizedBox(width: 8), rightButton == null ? const Spacer() : Expanded(child: rightButton!), @@ -174,27 +165,22 @@ class StackOkDialog extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Flexible( - child: Text( - title, - style: STextStyles.pageTitleH2(context), - ), + child: Text(title, style: STextStyles.pageTitleH2(context)), ), icon != null ? icon! : Container(), ], ), ), - if (message != null) - const SizedBox( - height: 8, - ), + if (message != null) const SizedBox(height: 8), if (message != null) ConstrainedBox( - constraints: - BoxConstraints(maxWidth: maxWidth ?? double.infinity), + constraints: BoxConstraints( + maxWidth: maxWidth ?? double.infinity, + ), child: Row( children: [ Flexible( - child: Text( + child: SelectableText( message!, style: STextStyles.smallMed14(context), ), @@ -202,9 +188,7 @@ class StackOkDialog extends StatelessWidget { ], ), ), - const SizedBox( - height: 20, - ), + const SizedBox(height: 20), ConstrainedBox( constraints: BoxConstraints(maxWidth: maxWidth ?? double.infinity), child: Row( @@ -212,33 +196,33 @@ class StackOkDialog extends StatelessWidget { leftButton == null ? const Spacer() : Expanded(child: leftButton!), - const SizedBox( - width: 8, - ), + const SizedBox(width: 8), Expanded( child: TextButton( - onPressed: !Util.isDesktop - ? () { - Navigator.of(context).pop(); - onOkPressed?.call("OK"); - } - : () { - if (desktopPopRootNavigator) { - Navigator.of(context, rootNavigator: true).pop(); - } else { - int count = 0; - Navigator.of(context) - .popUntil((_) => count++ >= 2); - // onOkPressed?.call("OK"); + onPressed: + !Util.isDesktop + ? () { + Navigator.of(context).pop(); + onOkPressed?.call("OK"); } - }, + : () { + if (desktopPopRootNavigator) { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + } else { + int count = 0; + Navigator.of( + context, + ).popUntil((_) => count++ >= 2); + // onOkPressed?.call("OK"); + } + }, style: Theme.of(context) .extension()! .getPrimaryEnabledButtonStyle(context), - child: Text( - "Ok", - style: STextStyles.button(context), - ), + child: Text("Ok", style: STextStyles.button(context)), ), ), ], diff --git a/lib/widgets/transaction_card.dart b/lib/widgets/transaction_card.dart index f4227005e..211776fe8 100644 --- a/lib/widgets/transaction_card.dart +++ b/lib/widgets/transaction_card.dart @@ -27,6 +27,7 @@ import '../utilities/constants.dart'; import '../utilities/format.dart'; import '../utilities/text_styles.dart'; import '../utilities/util.dart'; +import '../wallets/crypto_currency/coins/mimblewimblecoin.dart'; import '../wallets/crypto_currency/crypto_currency.dart'; import 'desktop/desktop_dialog.dart'; @@ -63,6 +64,10 @@ class _TransactionCardState extends ConsumerState { return "Restored Funds"; } + if (coin is Mimblewimblecoin && _transaction.slateId == null) { + return "Restored Funds"; + } + final confirmedStatus = _transaction.isConfirmed( currentHeight, minConfirms, @@ -193,6 +198,20 @@ class _TransactionCardState extends ConsumerState { ); return; } + + if (coin is Mimblewimblecoin && _transaction.slateId == null) { + unawaited( + showFloatingFlushBar( + context: context, + message: + "Restored Mimblewimblecoin funds from your Seed have no Data.", + type: FlushBarType.warning, + duration: const Duration(seconds: 5), + ), + ); + return; + } + if (Util.isDesktop) { await showDialog( context: context, diff --git a/lib/widgets/tx_key_widget.dart b/lib/widgets/tx_key_widget.dart index ba8e9b33c..f9e1fb4bc 100644 --- a/lib/widgets/tx_key_widget.dart +++ b/lib/widgets/tx_key_widget.dart @@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../pages/pinpad_views/pinpad_dialog.dart'; -import '../pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart'; +import '../pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart' + as tvd; import '../pages_desktop_specific/password/request_desktop_auth_dialog.dart'; import '../providers/global/wallets_provider.dart'; import '../utilities/text_styles.dart'; @@ -14,11 +15,7 @@ import 'detail_item.dart'; class TxKeyWidget extends ConsumerStatefulWidget { /// The [walletId] MUST be the id of a [LibMoneroWallet]! - const TxKeyWidget({ - super.key, - required this.walletId, - required this.txid, - }); + const TxKeyWidget({super.key, required this.walletId, required this.txid}); final String walletId; final String txid; @@ -41,14 +38,18 @@ class _TxKeyWidgetState extends ConsumerState { try { final verified = await showDialog( context: context, - builder: (context) => Util.isDesktop - ? const RequestDesktopAuthDialog(title: "Show private view key") - : const PinpadDialog( - biometricsAuthenticationTitle: "Show private view key", - biometricsLocalizedReason: - "Authenticate to show private view key", - biometricsCancelButtonString: "CANCEL", - ), + builder: + (context) => + Util.isDesktop + ? const RequestDesktopAuthDialog( + title: "Show private view key", + ) + : const PinpadDialog( + biometricsAuthenticationTitle: "Show private view key", + biometricsLocalizedReason: + "Authenticate to show private view key", + biometricsCancelButtonString: "CANCEL", + ), barrierDismissible: !Util.isDesktop, ); @@ -75,23 +76,17 @@ class _TxKeyWidgetState extends ConsumerState { @override Widget build(BuildContext context) { return DetailItemBase( - button: _private == null - ? CustomTextButton( - text: "Show", - onTap: _loadTxKey, - enabled: _private == null, - ) - : Util.isDesktop - ? IconCopyButton( - data: _private!, - ) - : SimpleCopyButton( - data: _private!, - ), - title: Text( - "Private view key", - style: STextStyles.itemSubtitle(context), - ), + button: + _private == null + ? CustomTextButton( + text: "Show", + onTap: _loadTxKey, + enabled: _private == null, + ) + : Util.isDesktop + ? tvd.IconCopyButton(data: _private!) + : SimpleCopyButton(data: _private!), + title: Text("Private view key", style: STextStyles.itemSubtitle(context)), detail: SelectableText( // TODO _private ?? "*" * 52, // 52 is approx length diff --git a/lib/widgets/wallet_info_row/sub_widgets/wallet_info_row_coin_icon.dart b/lib/widgets/wallet_info_row/sub_widgets/wallet_info_row_coin_icon.dart index 14783eb14..e5450c39a 100644 --- a/lib/widgets/wallet_info_row/sub_widgets/wallet_info_row_coin_icon.dart +++ b/lib/widgets/wallet_info_row/sub_widgets/wallet_info_row_coin_icon.dart @@ -13,7 +13,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:isar/isar.dart'; +import 'package:isar_community/isar.dart'; import '../../../models/isar/exchange_cache/currency.dart'; import '../../../services/exchange/change_now/change_now_exchange.dart'; diff --git a/lib/widgets/wallet_navigation_bar/components/icons/finalize_nav_icon.dart b/lib/widgets/wallet_navigation_bar/components/icons/finalize_nav_icon.dart new file mode 100644 index 000000000..04b19d213 --- /dev/null +++ b/lib/widgets/wallet_navigation_bar/components/icons/finalize_nav_icon.dart @@ -0,0 +1,40 @@ +/* + * This file is part of Stack Wallet. + * + * Copyright (c) 2025 Cypher Stack + * All Rights Reserved. + * The code is distributed under GPLv3 license, see LICENSE file for details. + * Generated by Cypher Stack on 2025-09-18 + * + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../../../themes/stack_colors.dart'; +import '../../../../utilities/assets.dart'; + +class FinalizeNavIcon extends StatelessWidget { + const FinalizeNavIcon({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Theme.of( + context, + ).extension()!.bottomNavIconIcon.withOpacity(0.4), + borderRadius: BorderRadius.circular(24), + ), + child: Padding( + padding: const EdgeInsets.all(6.0), + child: SvgPicture.asset( + Assets.svg.circleLock, + width: 12, + height: 12, + color: Theme.of(context).extension()!.bottomNavIconIcon, + ), + ), + ); + } +} diff --git a/lib/wl_gen/interfaces/cs_monero_interface.dart b/lib/wl_gen/interfaces/cs_monero_interface.dart new file mode 100644 index 000000000..a676bd169 --- /dev/null +++ b/lib/wl_gen/interfaces/cs_monero_interface.dart @@ -0,0 +1,395 @@ +import '../../models/input.dart'; +import 'cs_salvium_interface.dart' show WrappedWallet; + +export '../generated/cs_monero_interface_impl.dart'; + +abstract class CsMoneroInterface { + const CsMoneroInterface(); + + void setUseCsMoneroLoggerInternal(bool enable); + + // tx prio forwarding + int getTxPriorityHigh(); + int getTxPriorityMedium(); + int getTxPriorityNormal(); + + bool walletExists(String path, {required CsCoin csCoin}); + + Future estimateFee( + int rate, + BigInt amount, { + required WrappedWallet wallet, + }); + + Future loadWallet( + String walletId, { + required CsCoin csCoin, + required String path, + required String password, + }); + + String getAddress( + WrappedWallet wallet, { + int accountIndex = 0, + int addressIndex = 0, + }); + + Future getCreatedWallet({ + required CsCoin csCoin, + required String path, + required String password, + required int wordCount, + required String seedOffset, + }); + + Future getRestoredWallet({ + required String walletId, + required CsCoin csCoin, + required String path, + required String password, + required String mnemonic, + required String seedOffset, + int height = 0, + }); + + Future getRestoredFromViewKeyWallet({ + required String walletId, + required CsCoin csCoin, + required String path, + required String password, + required String address, + required String privateViewKey, + int height = 0, + }); + + String getTxKey(WrappedWallet wallet, String txid); + + Future save(WrappedWallet wallet); + + String getPublicViewKey(WrappedWallet wallet); + String getPrivateViewKey(WrappedWallet wallet); + String getPublicSpendKey(WrappedWallet wallet); + String getPrivateSpendKey(WrappedWallet wallet); + + Future isSynced(WrappedWallet wallet); + void startSyncing(WrappedWallet wallet); + void stopSyncing(WrappedWallet wallet); + + void startAutoSaving(WrappedWallet wallet); + void stopAutoSaving(WrappedWallet wallet); + + bool hasListeners(WrappedWallet wallet); + void addListener(WrappedWallet wallet, CsWalletListener listener); + void startListeners(WrappedWallet wallet); + void stopListeners(WrappedWallet wallet); + + Future rescanBlockchain(WrappedWallet wallet); + Future isConnectedToDaemon(WrappedWallet wallet); + + int getRefreshFromBlockHeight(WrappedWallet wallet); + void setRefreshFromBlockHeight(WrappedWallet wallet, int height); + + Future connect( + WrappedWallet wallet, { + required String daemonAddress, + required bool trusted, + String? daemonUsername, + String? daemonPassword, + bool useSSL = false, + bool isLightWallet = false, + String? socksProxyAddress, + }); + + Future> getAllTxids( + WrappedWallet wallet, { + bool refresh = false, + }); + + BigInt? getBalance(WrappedWallet wallet, {int accountIndex = 0}); + BigInt? getUnlockedBalance(WrappedWallet wallet, {int accountIndex = 0}); + + Future> getAllTxs( + WrappedWallet wallet, { + bool refresh = false, + }); + + Future> getTxs( + WrappedWallet wallet, { + required Set txids, + bool refresh = false, + }); + + Future createTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }); + + Future createTxMultiDest( + WrappedWallet wallet, { + required List outputs, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }); + + Future commitTx(WrappedWallet wallet, CsPendingTransaction tx); + + Future> getOutputs( + WrappedWallet wallet, { + bool refresh = false, + bool includeSpent = false, + }); + + Future freezeOutput(WrappedWallet wallet, String keyImage); + Future thawOutput(WrappedWallet wallet, String keyImage); + + List getMoneroWordList(String language); + List getWowneroWordList(String language, int seedLength); + + int getHeightByDate(DateTime date, {required CsCoin csCoin}); + + bool validateAddress(String address, int network, {required CsCoin csCoin}); + + String getSeed(WrappedWallet wallet); +} + +enum CsCoin { monero, wownero } + +// forwarding class +final class CsWalletListener { + CsWalletListener({ + this.onSyncingUpdate, + this.onNewBlock, + this.onBalancesChanged, + this.onError, + }); + + /// Called when the wallet sync progress is updated. + /// + /// Parameters: + /// - [syncHeight]: The current syncing height of the wallet. + /// - [nodeHeight]: The height of the blockchain on the connected node. + /// - [message]: An optional message that may provide additional context. + final void Function({ + required int syncHeight, + required int nodeHeight, + String? message, + })? + onSyncingUpdate; + + /// Called when the daemon’s chain height changes, indicating new blocks. + /// + /// Parameters: + /// - [height]: The new height of the blockchain. + final void Function(int height)? onNewBlock; + + /// Called when the wallet balance or unlocked balance updates. + /// + /// Parameters: + /// - [newBalance]: The updated total wallet balance in atomic units. + /// - [newUnlockedBalance]: The updated unlocked balance in atomic units. + final void Function({ + required BigInt newBalance, + required BigInt newUnlockedBalance, + })? + onBalancesChanged; + + /// Called when an error occurs during synchronization/polling. + /// + /// Parameters: + /// - [error]: The error object describing what went wrong. + /// - [stackTrace]: The stack trace at the point where the error occurred. + final void Function(Object? error, StackTrace? stackTrace)? onError; +} + +// stupid +final class CsPendingTransaction { + /// should only ever be lib_monero.PendingTransaction but we can't strongly + /// type that because we cannot conditionally import in dart so now we have + /// this hack yay + final Object value; + + // stupid duplicates + final BigInt amount, fee; + + // stupid duplicate + final String txid; + + const CsPendingTransaction(this.value, this.amount, this.fee, this.txid); +} + +// forwarding class +final class CsTransaction { + CsTransaction({ + required this.displayLabel, + required this.description, + required this.fee, + required this.confirmations, + required this.blockHeight, + required this.accountIndex, + required this.addressIndexes, + required this.paymentId, + required this.amount, + required this.isSpend, + required this.hash, + required this.key, + required this.timeStamp, + required this.minConfirms, + this.salviumData, + }) { + if (fee.isNegative) throw Exception("negative fee"); + if (confirmations.isNegative) throw Exception("negative confirmations"); + if (accountIndex.isNegative) throw Exception("negative accountIndex"); + if (amount.isNegative) throw Exception("negative amount"); + } + + /// A label to display for the transaction, providing a human-readable identifier. + final String displayLabel; + + /// A description of the transaction, providing additional context or details. + final String description; + + /// The transaction fee in atomic units. + final BigInt fee; + + /// The number of confirmations this transaction has received. + final int confirmations; + + /// The block height at which this transaction was included. + final int blockHeight; + + /// A set of indexes corresponding to addresses associated with this transaction. + final Set addressIndexes; + + /// The index of the account associated with this transaction. + final int accountIndex; + + /// An optional payment identifier, used to associate this transaction with a payment. + final String paymentId; + + /// The amount of funds transferred in this transaction, represented in atomic units. + final BigInt amount; + + /// Flag indicating whether this transaction is a spend transaction. + final bool isSpend; + + /// The timestamp of when this transaction was created or recorded. + final DateTime timeStamp; + + /// The unique hash of this transaction (txid). + final String hash; + + /// A key used to prove a transaction was made and relayed and to verify its details. + final String key; + + /// The minimum number of confirmations required for this transaction. + final int minConfirms; + + /// Flag indicating whether the transaction is confirmed. + bool get isConfirmed => !isPending; + + /// Flag indicating whether the transaction is pending (i.e., not yet confirmed). + bool get isPending => confirmations < minConfirms; + + final ({int type, String typeDisplay, String asset})? salviumData; +} + +// forwarding class +final class CsRecipient { + final String address; + final BigInt amount; + + CsRecipient(this.address, this.amount); +} + +// forwarding class +final class CsOutput { + /// Creates an [CsOutput] with the specified Monero transaction details. NOTE: + /// No validation of any properties (besides a negative [value] or [vout], + /// and a non empty [keyImage]) occurs here. + /// + /// [address] is the receiving Monero address. + /// [hash] is the transaction hash of the output. + /// [keyImage] is the unique identifier of the output. + /// [value] represents the amount of Monero in atomic units. + /// [isFrozen] indicates if the output is currently frozen. + /// [isUnlocked] shows if the output is available for spending. + /// [height] is the blockchain height at which the output was created. + /// [spentHeight] is the blockchain height at which the output was spent, + /// or `null` if it is unspent. + /// [vout] represents the output index within the transaction. + /// [spent] indicates if the output has been spent. + /// [coinbase] identifies if the output is from a coinbase transaction. + CsOutput({ + required this.address, + required this.hash, + required this.keyImage, + required this.value, + required this.isFrozen, + required this.isUnlocked, + required this.height, + required this.spentHeight, + required this.vout, + required this.spent, + required this.coinbase, + }) : assert(!value.isNegative && !vout.isNegative && keyImage.isNotEmpty); + + /// The receiving Monero address. + final String address; + + /// The hash of the transaction in which this output was created. + final String hash; + + /// The value of the output, in atomic units. + final BigInt value; + + /// A unique identifier for this output. + /// See https://monero.stackexchange.com/questions/2883/what-is-a-key-image + final String keyImage; + + /// Whether this output is frozen, preventing it from being spent. + final bool isFrozen; + + /// Whether this output is unlocked and available for spending. + final bool isUnlocked; + + /// The blockchain height where this output was created. + final int height; + + /// The blockchain height where this output was spent, or `null` if unspent. + final int? spentHeight; + + /// The output index within the transaction. + final int vout; + + /// Whether this output has already been spent. + final bool spent; + + /// Whether this output originates from a coinbase transaction. + final bool coinbase; + + /// Returns a copy of this [Output] instance, with the [isFrozen] status + /// updated. + CsOutput copyWithFrozen(bool isFrozen) => CsOutput( + address: address, + hash: hash, + keyImage: keyImage, + value: value, + isFrozen: isFrozen, + isUnlocked: isUnlocked, + height: height, + spentHeight: spentHeight, + vout: vout, + spent: spent, + coinbase: coinbase, + ); +} diff --git a/lib/wl_gen/interfaces/cs_salvium_interface.dart b/lib/wl_gen/interfaces/cs_salvium_interface.dart new file mode 100644 index 000000000..53ad91b7b --- /dev/null +++ b/lib/wl_gen/interfaces/cs_salvium_interface.dart @@ -0,0 +1,181 @@ +import '../../models/input.dart'; +import 'cs_monero_interface.dart'; + +export '../generated/cs_salvium_interface_impl.dart'; + +abstract class CsSalviumInterface { + const CsSalviumInterface(); + + void setUseCsSalviumLoggerInternal(bool enable); + + // tx prio forwarding + int getTxPriorityHigh(); + int getTxPriorityMedium(); + int getTxPriorityNormal(); + + bool walletExists(String path); + + Future estimateFee( + int rate, + BigInt amount, { + required WrappedWallet wallet, + }); + + Future loadWallet( + String walletId, { + required String path, + required String password, + int network = 0, + }); + + String getAddress( + WrappedWallet wallet, { + int accountIndex = 0, + int addressIndex = 0, + }); + + Future getCreatedWallet({ + required String path, + required String password, + required int wordCount, + required String seedOffset, + int network = 0, + }); + + Future getRestoredWallet({ + required String walletId, + required String path, + required String password, + required String mnemonic, + required String seedOffset, + int height = 0, + int network = 0, + }); + + Future getRestoredFromViewKeyWallet({ + required String walletId, + required String path, + required String password, + required String address, + required String privateViewKey, + int height = 0, + int network = 0, + }); + + String getTxKey(WrappedWallet wallet, String txid); + + Future save(WrappedWallet wallet); + + String getPublicViewKey(WrappedWallet wallet); + String getPrivateViewKey(WrappedWallet wallet); + String getPublicSpendKey(WrappedWallet wallet); + String getPrivateSpendKey(WrappedWallet wallet); + + Future isSynced(WrappedWallet wallet); + void startSyncing(WrappedWallet wallet); + void stopSyncing(WrappedWallet wallet); + + void startAutoSaving(WrappedWallet wallet); + void stopAutoSaving(WrappedWallet wallet); + + bool hasListeners(WrappedWallet wallet); + void addListener(WrappedWallet wallet, CsWalletListener listener); + void startListeners(WrappedWallet wallet); + void stopListeners(WrappedWallet wallet); + + Future rescanBlockchain(WrappedWallet wallet); + Future isConnectedToDaemon(WrappedWallet wallet); + + int getRefreshFromBlockHeight(WrappedWallet wallet); + void setRefreshFromBlockHeight(WrappedWallet wallet, int height); + + Future connect( + WrappedWallet wallet, { + required String daemonAddress, + required bool trusted, + String? daemonUsername, + String? daemonPassword, + bool useSSL = false, + bool isLightWallet = false, + String? socksProxyAddress, + }); + + Future> getAllTxids( + WrappedWallet wallet, { + bool refresh = false, + }); + + BigInt? getBalance(WrappedWallet wallet, {int accountIndex = 0}); + BigInt? getUnlockedBalance(WrappedWallet wallet, {int accountIndex = 0}); + + Future> getAllTxs( + WrappedWallet wallet, { + bool refresh = false, + }); + + Future> getTxs( + WrappedWallet wallet, { + required Set txids, + bool refresh = false, + }); + + Future createTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }); + + Future createStakeTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }); + + Future createTxMultiDest( + WrappedWallet wallet, { + required List outputs, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }); + + Future commitTx(WrappedWallet wallet, CsPendingTransaction tx); + + Future> getOutputs( + WrappedWallet wallet, { + bool refresh = false, + bool includeSpent = false, + }); + + Future freezeOutput(WrappedWallet wallet, String keyImage); + Future thawOutput(WrappedWallet wallet, String keyImage); + + List getSalviumWordList(String language); + + int getHeightByDate(DateTime date); + + bool validateAddress(String address, int network); + + String getSeed(WrappedWallet wallet); +} + +// lol... +class WrappedWallet { + final Object _wallet; + + const WrappedWallet(this._wallet); + + T get() => _wallet as T; +} diff --git a/lib/wl_gen/interfaces/frost_interface.dart b/lib/wl_gen/interfaces/frost_interface.dart new file mode 100644 index 000000000..affbda0d2 --- /dev/null +++ b/lib/wl_gen/interfaces/frost_interface.dart @@ -0,0 +1,237 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import '../../models/isar/models/blockchain_data/utxo.dart'; +import '../../utilities/amount/amount.dart'; +import '../../utilities/extensions/extensions.dart'; +import '../../wallets/crypto_currency/crypto_currency.dart'; +import '../../wallets/models/tx_recipient.dart'; + +export '../generated/frost_interface_impl.dart'; + +abstract class FrostInterface { + const FrostInterface(); + + //==================== utility =============================================== + List getParticipants({required String multisigConfig}); + + bool validateEncodedMultisigConfig({required String encodedConfig}); + + int getThreshold({required String multisigConfig}); + + ({ + List<({String address, Amount amount})> recipients, + String changeAddress, + int feePerWeight, + List inputs, + }) + extractDataFromSignConfig({ + required String serializedKeys, + required String signConfig, + required CryptoCurrency coin, + }); + + //==================== wallet creation ======================================= + + String createMultisigConfig({ + required String name, + required int threshold, + required List participants, + }); + + ({ + String seed, + String commitments, + // Pointer multisigConfigWithNamePtr, + OpaqueWrapper multisigConfigWithNamePtr, + // Pointer secretShareMachineWrapperPtr, + OpaqueWrapper secretShareMachineWrapperPtr, + }) + startKeyGeneration({required String multisigConfig, required String myName}); + + // ({String share, Pointer secretSharesResPtr}) + ({String share, OpaqueWrapper secretSharesResPtr}) generateSecretShares({ + // required Pointer multisigConfigWithNamePtr, + required OpaqueWrapper multisigConfigWithNamePtr, + required String mySeed, + // required Pointer secretShareMachineWrapperPtr, + required OpaqueWrapper secretShareMachineWrapperPtr, + required List commitments, + }); + + ({Uint8List multisigId, String recoveryString, String serializedKeys}) + completeKeyGeneration({ + // required Pointer multisigConfigWithNamePtr, + required OpaqueWrapper multisigConfigWithNamePtr, + // required Pointer secretSharesResPtr, + required OpaqueWrapper secretSharesResPtr, + required List shares, + }); + + //=================== transaction creation =================================== + + String createSignConfig({ + required String serializedKeys, + required int network, + required List< + ({ + UTXO utxo, + Uint8List scriptPubKey, + FrostAddressDerivationData addressDerivationData, + }) + > + inputs, + required List outputs, + required String changeAddress, + required int feePerWeight, + }); + + // ({Pointer machinePtr, String preprocess}) + ({OpaqueWrapper machinePtr, String preprocess}) attemptSignConfig({ + required int network, + required String config, + required String serializedKeys, + }); + + // ({Pointer machinePtr, String share}) + ({OpaqueWrapper machinePtr, String share}) continueSigning({ + // required Pointer machinePtr, + required OpaqueWrapper machinePtr, + required List preprocesses, + }); + + String completeSigning({ + // required Pointer machinePtr, + required OpaqueWrapper machinePtr, + required List shares, + }); + + // Pointer decodedSignConfig({ + OpaqueWrapper decodedSignConfig({ + required String serializedKeys, + required String encodedConfig, + required int network, + }); + + //========================== resharing ======================================= + + String createResharerConfig({ + required int newThreshold, + required List resharers, + required List newParticipants, + }); + + // ({String resharerStart, Pointer machine}) beginResharer({ + ({String resharerStart, OpaqueWrapper machine}) beginResharer({ + required String serializedKeys, + required String config, + }); + + /// expects [resharerStarts] of length equal to resharers. + // ({String resharedStart, Pointer prior}) beginReshared({ + ({String resharedStart, OpaqueWrapper prior}) beginReshared({ + required String myName, + required String resharerConfig, + required List resharerStarts, + }); + + /// expects [encryptionKeysOfResharedTo] of length equal to new participants + String finishResharer({ + // required StartResharerRes machine, + required OpaqueWrapper machine, + required List encryptionKeysOfResharedTo, + }); + + /// expects [resharerCompletes] of length equal to resharers + ({String multisigConfig, String serializedKeys, String resharedId}) + finishReshared({ + // required StartResharedRes prior, + required OpaqueWrapper prior, + required List resharerCompletes, + }); + + // Pointer decodedResharerConfig({ + OpaqueWrapper decodedResharerConfig({required String resharerConfig}); + + ({int newThreshold, Map resharers, List newParticipants}) + extractResharerConfigData({required String rConfig}); + + Uint8List getMultisigSalt({required String multisigConfig}); + int participantIndexFromKeys({required String serializedKeys}); + int getMultisigThreshold({required String multisigConfig}); + int thresholdFromKeys({required String serializedKeys}); + Uint8List getResharerSalt({required String resharerConfig}); + + OpaqueWrapper getDeserializedKeys({required String keys}); + String getAddressForKeys({ + required OpaqueWrapper keys, + required int network, + required FrostAddressDerivationData addressDerivationData, + required bool secure, + }); + + int get mainnet; + int get testnet; + + String encodeRConfig(String config, Map resharers) { + return base64Encode("$config@${jsonEncode(resharers)}".toUint8ListFromUtf8); + } + + String decodeRConfig(String rConfig) { + return base64Decode(rConfig).toUtf8String.split("@").first; + } +} + +final class FrostInsufficientFundsException implements Exception {} + +final class FrostBadIndexException implements Exception {} + +final class OpaqueWrapper { + final Object _value; + + const OpaqueWrapper(this._value); + + T getValue() { + if (_value is T) return _value as T; + throw Exception( + "OpaqueWrapper.getValue type of ${_value.runtimeType} is not ${T.runtimeType}", + ); + } + + @override + String toString() => "OpaqueWrapper(${_value.runtimeType})"; +} + +typedef FrostAddressDerivationData = ({ + int account, + bool change, + int index, + bool secure, +}); + +class FrostOutput { + final Uint8List hash; + final int vout; + final int value; + final Uint8List scriptPubKey; + + final FrostAddressDerivationData? addressDerivationData; + + FrostOutput({ + required this.hash, + required this.vout, + required this.value, + required this.scriptPubKey, + required this.addressDerivationData, + }); + + @override + String toString() => + 'FrostOutput{' + 'hash: $hash, ' + 'vout: $vout, ' + 'value: $value, ' + 'scriptPubKey: $scriptPubKey, ' + 'addressDerivationData: $addressDerivationData' + '}'; +} diff --git a/lib/wl_gen/interfaces/lib_spark_interface.dart b/lib/wl_gen/interfaces/lib_spark_interface.dart new file mode 100644 index 000000000..5f2427785 --- /dev/null +++ b/lib/wl_gen/interfaces/lib_spark_interface.dart @@ -0,0 +1,252 @@ +import 'dart:typed_data'; + +import 'package:logger/logger.dart'; + +export '../generated/lib_spark_interface_impl.dart'; + +abstract class LibSparkInterface { + const LibSparkInterface(); + + String get sparkBaseDerivationPath; + String get sparkBaseDerivationPathTestnet; + int get sparkChange; + int get maxNameRegistrationLengthYears; + int get maxNameLength; + int get maxAdditionalInfoLengthBytes; + String get nameRegexString; + String get stage3DevelopmentFundAddressMainNet; + String get stage3DevelopmentFundAddressTestNet; + List get standardSparkNamesFee; + + void initSparkLogging(Level level); + + String hashTag(String x, String y); + + bool validateAddress({required String address, required bool isTestNet}); + + Future getAddress({ + required Uint8List privateKey, + required int index, + required int diversifier, + bool isTestNet = false, + }); + + ({Uint8List script, int size}) createSparkNameScript({ + required int sparkNameValidityBlocks, + required String name, + required String additionalInfo, + required String scalarHex, + required String privateKeyHex, + required int spendKeyIndex, + required int diversifier, + required bool isTestNet, + required int hashFailSafe, + required bool ignoreProof, + }); + + List<({Uint8List scriptPubKey, int amount, bool subtractFeeFromAmount})> + createSparkMintRecipients({ + required List<({String sparkAddress, int value, String memo})> outputs, + required Uint8List serialContext, + bool generate = false, + }); + + Uint8List serializeMintContext({required List<(String, int)> inputs}); + + WrappedLibSparkCoin? identifyAndRecoverCoin( + final String serializedCoin, { + required final String privateKeyHex, + required final int index, + required final Uint8List context, + final bool isTestNet = false, + }); + + ({ + Uint8List serializedSpendPayload, + List outputScripts, + int fee, + List< + ({ + String serializedCoin, + String serializedCoinContext, + int groupId, + int height, + }) + > + usedCoins, + }) + createSparkSendTransaction({ + required String privateKeyHex, + int index = 1, + required List<({String address, int amount, bool subtractFeeFromAmount})> + recipients, + required List< + ({ + String sparkAddress, + int amount, + bool subtractFeeFromAmount, + String memo, + }) + > + privateRecipients, + required List< + ({ + String serializedCoin, + String serializedCoinContext, + int groupId, + int height, + }) + > + serializedCoins, + required List< + ({ + int setId, + String setHash, + List<({String serializedCoin, String txHash})> set, + }) + > + allAnonymitySets, + required List<({int setId, Uint8List blockHash})> idAndBlockHashes, + required Uint8List txHash, + required int additionalTxSize, + }); + + int estimateSparkFee({ + required String privateKeyHex, + int index = 1, + required int sendAmount, + required bool subtractFeeFromAmount, + required List< + ({ + String serializedCoin, + String serializedCoinContext, + int groupId, + int height, + }) + > + serializedCoins, + required int privateRecipientsCount, + required int utxoNum, + required int additionalTxSize, + }); +} + +// stupid +enum WrappedLibSparkCoinType { + mint(0), + spend(1); + + const WrappedLibSparkCoinType(this.value); + final int value; +} + +// stupid +final class WrappedLibSparkCoin { + final WrappedLibSparkCoinType type; + + final int? id; + final int? height; + + final bool? isUsed; + + final String? nonceHex; + + final String? address; + + final BigInt? value; + + final String? memo; + + final Uint8List? txHash; + + final Uint8List? serialContext; + + final BigInt? diversifier; + final Uint8List? encryptedDiversifier; + + final Uint8List? serial; + final Uint8List? tag; + + final String? lTagHash; + + final String? serializedCoin; + + WrappedLibSparkCoin({ + required this.type, + this.id, + this.height, + this.isUsed, + this.nonceHex, + this.address, + this.value, + this.memo, + this.txHash, + this.serialContext, + this.diversifier, + this.encryptedDiversifier, + this.serial, + this.tag, + this.lTagHash, + this.serializedCoin, + }); + + WrappedLibSparkCoin copyWith({ + WrappedLibSparkCoinType? type, + int? id, + int? height, + bool? isUsed, + String? nonceHex, + String? address, + BigInt? value, + String? memo, + Uint8List? txHash, + Uint8List? serialContext, + BigInt? diversifier, + Uint8List? encryptedDiversifier, + Uint8List? serial, + Uint8List? tag, + String? lTagHash, + String? serializedCoin, + }) { + return WrappedLibSparkCoin( + type: type ?? this.type, + id: id ?? this.id, + height: height ?? this.height, + isUsed: isUsed ?? this.isUsed, + nonceHex: nonceHex ?? this.nonceHex, + address: address ?? this.address, + value: value ?? this.value, + memo: memo ?? this.memo, + txHash: txHash ?? this.txHash, + serialContext: serialContext ?? this.serialContext, + diversifier: diversifier ?? this.diversifier, + encryptedDiversifier: encryptedDiversifier ?? this.encryptedDiversifier, + serial: serial ?? this.serial, + tag: tag ?? this.tag, + lTagHash: lTagHash ?? this.lTagHash, + serializedCoin: serializedCoin ?? this.serializedCoin, + ); + } + + @override + String toString() { + return 'WrappedLibSparkCoin(' + ', type: $type' + ', id: $id' + ', height: $height' + ', isUsed: $isUsed' + ', k: $nonceHex' + ', address: $address' + ', value: $value' + ', memo: $memo' + ', txHash: $txHash' + ', serialContext: $serialContext' + ', diversifier: $diversifier' + ', encryptedDiversifier: $encryptedDiversifier' + ', serial: $serial' + ', tag: $tag' + ', lTagHash: $lTagHash' + ', serializedCoin: $serializedCoin' + ')'; + } +} diff --git a/lib/wl_gen/interfaces/lib_xelis_interface.dart b/lib/wl_gen/interfaces/lib_xelis_interface.dart new file mode 100644 index 000000000..ecf76a435 --- /dev/null +++ b/lib/wl_gen/interfaces/lib_xelis_interface.dart @@ -0,0 +1,335 @@ +import 'package:flutter/foundation.dart'; + +import '../../providers/progress_report/xelis_table_progress_provider.dart'; +import '../../wallets/crypto_currency/crypto_currency.dart'; + +export '../generated/lib_xelis_interface_impl.dart'; + +abstract class LibXelisInterface { + const LibXelisInterface(); + + String get xelisAsset; + + Future initRustLib(); + + Future setupRustLogger(); + + void startListeningToRustLogs(); + + Stream createProgressReportStream(); + + bool isAddressValid({required String address}); + + bool validateSeedWord(String word); + + Stream eventsStream(OpaqueXelisWallet wallet); + + Future onlineMode( + OpaqueXelisWallet wallet, { + required String daemonAddress, + }); + Future offlineMode(OpaqueXelisWallet wallet); + + Future updateTables({ + required String precomputedTablesPath, + required bool l1Low, + }); + + Future getSeed(OpaqueXelisWallet wallet); + + Future createXelisWallet( + String walletId, { + required String name, + required String directory, + required String password, + required CryptoCurrencyNetwork network, + String? seed, + String? privateKey, + String? precomputedTablesPath, + bool? l1Low, + }); + + Future openXelisWallet( + String walletId, { + required String name, + required String directory, + required String password, + required CryptoCurrencyNetwork network, + String? precomputedTablesPath, + bool? l1Low, + }); + + String getAddress(OpaqueXelisWallet wallet); + + Future getDaemonInfo(OpaqueXelisWallet wallet); + + Future isOnline(OpaqueXelisWallet wallet); + + Future rescan(OpaqueXelisWallet wallet, {required BigInt topoheight}); + + Future> allHistory(OpaqueXelisWallet wallet); + + Future broadcastTransaction( + OpaqueXelisWallet wallet, { + required String txHash, + }); + + Future estimateFees( + OpaqueXelisWallet wallet, { + required List transfers, + }); + + Future createTransfersTransaction( + OpaqueXelisWallet wallet, { + required List transfers, + }); + + Future formatCoin( + OpaqueXelisWallet wallet, { + required BigInt atomicAmount, + String? assetHash, + }); + + Future getAssetDecimals( + OpaqueXelisWallet wallet, { + required String asset, + }); + + Future getXelisBalanceRaw(OpaqueXelisWallet wallet); + + Future hasXelisBalance(OpaqueXelisWallet wallet); + + Future testDaemonConnection(String endPoint, bool useSSL); +} + +// ============================================================================= +// ============== stupid ======================================================= + +final class OpaqueXelisWallet { + final Object _value; + const OpaqueXelisWallet(this._value); + T get() => _value as T; +} + +class WrappedTransfer { + final double floatAmount; + final String strAddress; + final String assetHash; + final String? extraData; + + const WrappedTransfer({ + required this.floatAmount, + required this.strAddress, + required this.assetHash, + this.extraData, + }); + + @override + int get hashCode => + floatAmount.hashCode ^ + strAddress.hashCode ^ + assetHash.hashCode ^ + extraData.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is WrappedTransfer && + runtimeType == other.runtimeType && + floatAmount == other.floatAmount && + strAddress == other.strAddress && + assetHash == other.assetHash && + extraData == other.extraData; +} + +class TransactionEntryWrapper { + final Object _value; + + final EntryWrapper entryType; + + final String hash; + final DateTime? timestamp; + final int topoheight; + + TransactionEntryWrapper( + this._value, { + required this.entryType, + required this.hash, + required this.timestamp, + required this.topoheight, + }); + + T getValue() => _value is T + ? _value as T + : throw Exception( + "Type mismatch: ${_value.runtimeType} is not ${T.runtimeType}", + ); +} + +sealed class EntryWrapper { + const EntryWrapper(); +} + +class CoinbaseEntryWrapper extends EntryWrapper { + final int reward; + const CoinbaseEntryWrapper({required this.reward}); +} + +class BurnEntryWrapper extends EntryWrapper { + final int amount; + final int fee; + final String asset; + + const BurnEntryWrapper({ + required this.amount, + required this.fee, + required this.asset, + }); +} + +class IncomingEntryWrapper extends EntryWrapper { + final String from; + final List<({int amount, String asset, Map? extraData})> + transfers; + + const IncomingEntryWrapper({required this.from, required this.transfers}); +} + +class OutgoingEntryWrapper extends EntryWrapper { + final int nonce; + final int fee; + final List< + ({ + String destination, + int amount, + String asset, + Map? extraData, + }) + > + transfers; + + const OutgoingEntryWrapper({ + required this.nonce, + required this.fee, + required this.transfers, + }); +} + +class UnknownEntryWrapper extends EntryWrapper {} + +// ============================================================================= + +// ============================================================================= +// ============== moved from lib_xelis_wallet.dart ============================= +enum XelisTableSize { + low, + full; + + bool get isLow => this == XelisTableSize.low; + + static XelisTableSize get platformDefault { + if (kIsWeb) { + return XelisTableSize.low; + } + return XelisTableSize.full; + } +} + +class XelisTableState { + final bool isGenerating; + final XelisTableSize currentSize; + final XelisTableSize _desiredSize; + + XelisTableSize get desiredSize { + if (kIsWeb) { + return XelisTableSize.low; + } + return _desiredSize; + } + + const XelisTableState({ + this.isGenerating = false, + this.currentSize = XelisTableSize.low, + XelisTableSize desiredSize = XelisTableSize.full, + }) : _desiredSize = desiredSize; + + XelisTableState copyWith({ + bool? isGenerating, + XelisTableSize? currentSize, + XelisTableSize? desiredSize, + }) { + return XelisTableState( + isGenerating: isGenerating ?? this.isGenerating, + currentSize: currentSize ?? this.currentSize, + desiredSize: kIsWeb ? XelisTableSize.low : (desiredSize ?? _desiredSize), + ); + } + + factory XelisTableState.fromJson(Map json) { + return XelisTableState( + isGenerating: json['isGenerating'] as bool, + currentSize: XelisTableSize.values[json['currentSize'] as int], + desiredSize: XelisTableSize.values[json['desiredSize'] as int], + ); + } + + Map toJson() => { + 'isGenerating': isGenerating, + 'currentSize': currentSize.index, + 'desiredSize': _desiredSize.index, + }; +} + +sealed class Event { + const Event(); +} + +final class NewTopoheight extends Event { + final int height; + + const NewTopoheight(this.height); +} + +final class NewAsset extends Event { + // final xelis_sdk.AssetData asset; + final String name; + final int decimals; + final int? maxSupply; + + NewAsset(this.name, this.decimals, this.maxSupply); +} + +final class NewTransaction extends Event { + // final xelis_sdk.TransactionEntry transaction; + final TransactionEntryWrapper transaction; + const NewTransaction(this.transaction); +} + +final class BalanceChanged extends Event { + // final xelis_sdk.BalanceChangedEvent event; + final String asset; + final int balance; + + const BalanceChanged(this.asset, this.balance); +} + +final class Rescan extends Event { + final int startTopoheight; + + const Rescan(this.startTopoheight); +} + +final class Online extends Event { + const Online(); +} + +final class Offline extends Event { + const Offline(); +} + +final class HistorySynced extends Event { + final int topoheight; + const HistorySynced(this.topoheight); +} + +// ============================================================================= diff --git a/lib/wl_gen/interfaces/libepiccash_interface.dart b/lib/wl_gen/interfaces/libepiccash_interface.dart new file mode 100644 index 000000000..af5e65375 --- /dev/null +++ b/lib/wl_gen/interfaces/libepiccash_interface.dart @@ -0,0 +1,160 @@ +export '../generated/libepiccash_interface_impl.dart'; + +abstract class LibEpicCashInterface { + const LibEpicCashInterface(); + + bool txTypeIsReceived(Enum value); + bool txTypeIsReceiveCancelled(Enum value); + bool txTypeIsSentCancelled(Enum value); + + Future initializeNewWallet({ + required String config, + required String mnemonic, + required String password, + required String name, + }); + + Future openWallet({required String config, required String password}); + + Future recoverWallet({ + required String config, + required String password, + required String mnemonic, + required String name, + }); + + Future<({String commitId, String slateId})> txHttpSend({ + required String wallet, + required int selectionStrategyIsAll, + required int minimumConfirmations, + required String message, + required int amount, + required String address, + }); + + Future<({String commitId, String slateId})> createTransaction({ + required String wallet, + required int amount, + required String address, + required int secretKeyIndex, + required String epicboxConfig, + required int minimumConfirmations, + required String note, + }); + + Future cancelTransaction({ + required String wallet, + required String transactionId, + }); + + Future> getTransactions({ + required String wallet, + required int refreshFromNode, + }); + + void startEpicboxListener({ + required String wallet, + required String epicboxConfig, + }); + + void stopEpicboxListener(); + + bool validateSendAddress({required String address}); + + Future<({int fee, bool strategyUseAll, int total})> getTransactionFees({ + required String wallet, + required int amount, + required int minimumConfirmations, + required int available, + }); + + Future< + ({ + double awaitingFinalization, + double pending, + double spendable, + double total, + }) + > + getWalletBalances({ + required String wallet, + required int refreshFromNode, + required int minimumConfirmations, + }); + + Future getAddressInfo({ + required String wallet, + required int index, + required String epicboxConfig, + }); + + Future scanOutputs({ + required String wallet, + required int startHeight, + required int numberOfBlocks, + }); + + Future getChainHeight({required String config}); + + Future deleteWallet({required String wallet, required String config}); + + String getPluginVersion(); +} + +class EpicTransaction { + final String parentKeyId; + final int id; + final String? txSlateId; + final Enum txType; + final String creationTs; + final String confirmationTs; + final bool confirmed; + final int numInputs; + final int numOutputs; + final String amountCredited; + final String amountDebited; + final String? fee; + final String? ttlCutoffHeight; + final List? messages; + final String? storedTx; + final String? kernelExcess; + final int? kernelLookupMinHeight; + final String? paymentProof; + + EpicTransaction({ + required this.parentKeyId, + required this.id, + this.txSlateId, + required this.txType, + required this.creationTs, + required this.confirmationTs, + required this.confirmed, + required this.numInputs, + required this.numOutputs, + required this.amountCredited, + required this.amountDebited, + this.fee, + this.ttlCutoffHeight, + this.messages, + this.storedTx, + this.kernelExcess, + this.kernelLookupMinHeight, + this.paymentProof, + }); +} + +class EpicMessage { + final String id; + final String publicKey; + final String? message; + final String? messageSig; + + EpicMessage({ + required this.id, + required this.publicKey, + this.message, + this.messageSig, + }); +} + +class BadHttpAddressException implements Exception {} diff --git a/lib/wl_gen/interfaces/libmwc_interface.dart b/lib/wl_gen/interfaces/libmwc_interface.dart new file mode 100644 index 000000000..acd5b2d79 --- /dev/null +++ b/lib/wl_gen/interfaces/libmwc_interface.dart @@ -0,0 +1,200 @@ +export '../generated/libmwc_interface_impl.dart'; + +abstract class LibMwcInterface { + const LibMwcInterface(); + + bool txTypeIsReceived(Enum value); + bool txTypeIsReceiveCancelled(Enum value); + bool txTypeIsSentCancelled(Enum value); + + Future initializeNewWallet({ + required String config, + required String mnemonic, + required String password, + required String name, + }); + + Future openWallet({required String config, required String password}); + + Future recoverWallet({ + required String config, + required String password, + required String mnemonic, + required String name, + }); + + Future<({String commitId, String slateId})> txHttpSend({ + required String wallet, + required int selectionStrategyIsAll, + required int minimumConfirmations, + required String message, + required int amount, + required String address, + }); + + Future<({String commitId, String slateId})> createTransaction({ + required String wallet, + required int amount, + required String address, + required int secretKeyIndex, + required String mwcmqsConfig, + required int minimumConfirmations, + required String note, + }); + + Future cancelTransaction({ + required String wallet, + required String transactionId, + }); + + Future txInit({ + required String wallet, + required int amount, + int minimumConfirmations = 1, + bool selectionStrategyIsAll = false, + String message = '', + }); + + Future> getTransactions({ + required String wallet, + required int refreshFromNode, + }); + + Future<({String? recipientAddress, String slatepack, bool wasEncrypted})> + encodeSlatepack({ + required String slateJson, + String? recipientAddress, + bool encrypt = false, + String? wallet, + }); + Future< + ({ + String? recipientAddress, + String? senderAddress, + String slateJson, + bool wasEncrypted, + }) + > + decodeSlatepackWithWallet({ + required String wallet, + required String slatepack, + }); + + Future< + ({ + String? recipientAddress, + String? senderAddress, + String slateJson, + bool wasEncrypted, + }) + > + decodeSlatepack({required String slatepack}); + + Future<({String commitId, String slateId, String slateJson})> + txReceiveDetailed({required String wallet, required String slateJson}); + + Future<({String commitId, String slateId})> txFinalize({ + required String wallet, + required String slateJson, + }); + + void startMwcMqsListener({ + required String wallet, + required String mwcmqsConfig, + }); + + void stopMwcMqsListener(); + + bool validateSendAddress({required String address}); + + Future<({int fee, bool strategyUseAll, int total})> getTransactionFees({ + required String wallet, + required int amount, + required int minimumConfirmations, + required int available, + }); + + Future< + ({ + double awaitingFinalization, + double pending, + double spendable, + double total, + }) + > + getWalletBalances({ + required String wallet, + required int refreshFromNode, + required int minimumConfirmations, + }); + + Future getAddressInfo({required String wallet, required int index}); + + Future scanOutputs({ + required String wallet, + required int startHeight, + required int numberOfBlocks, + }); + + Future getChainHeight({required String config}); + + Future deleteWallet({required String wallet, required String config}); + + String getPluginVersion(); +} + +class MwcTransaction { + final String parentKeyId; + final int id; + final String? txSlateId; + final Enum txType; + final String creationTs; + final String confirmationTs; + final bool confirmed; + final int numInputs; + final int numOutputs; + final String amountCredited; + final String amountDebited; + final String? fee; + final String? ttlCutoffHeight; + final List? messages; + final String? storedTx; + final String? kernelExcess; + final int? kernelLookupMinHeight; + final String? paymentProof; + + MwcTransaction({ + required this.parentKeyId, + required this.id, + this.txSlateId, + required this.txType, + required this.creationTs, + required this.confirmationTs, + required this.confirmed, + required this.numInputs, + required this.numOutputs, + required this.amountCredited, + required this.amountDebited, + this.fee, + this.ttlCutoffHeight, + this.messages, + this.storedTx, + this.kernelExcess, + this.kernelLookupMinHeight, + this.paymentProof, + }); +} + +class MwcMessage { + final String id; + final String publicKey; + final String? message; + final String? messageSig; + + MwcMessage({ + required this.id, + required this.publicKey, + this.message, + this.messageSig, + }); +} diff --git a/lib/wl_gen/interfaces/mwebd_server_interface.dart b/lib/wl_gen/interfaces/mwebd_server_interface.dart new file mode 100644 index 000000000..8b597d077 --- /dev/null +++ b/lib/wl_gen/interfaces/mwebd_server_interface.dart @@ -0,0 +1,72 @@ +import '../../wallets/crypto_currency/crypto_currency.dart'; + +export '../generated/mwebd_server_interface_impl.dart'; + +abstract class MwebdServerInterface { + const MwebdServerInterface(); + + Future<({OpaqueMwebdServer server, int port})> createAndStartServer( + CryptoCurrencyNetwork net, { + required String chain, + required String dataDir, + required String peer, + String proxy = "", + required int serverPort, + }); + + Future<({String chain, String dataDir, String peer})> stopServer( + OpaqueMwebdServer server, + ); + + Future getServerStatus(OpaqueMwebdServer? server); +} + +// local copy +class Status { + final int blockHeaderHeight; + final int mwebHeaderHeight; + final int mwebUtxosHeight; + final int blockTime; + + Status({ + required this.blockHeaderHeight, + required this.mwebHeaderHeight, + required this.mwebUtxosHeight, + required this.blockTime, + }); + + @override + String toString() { + return 'Status(' + 'blockHeaderHeight: $blockHeaderHeight, ' + 'mwebHeaderHeight: $mwebHeaderHeight, ' + 'mwebUtxosHeight: $mwebUtxosHeight, ' + 'blockTime: $blockTime' + ')'; + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Status && + blockHeaderHeight == other.blockHeaderHeight && + mwebHeaderHeight == other.mwebHeaderHeight && + mwebUtxosHeight == other.mwebUtxosHeight && + blockTime == other.blockTime; + + @override + int get hashCode => Object.hash( + blockHeaderHeight, + mwebHeaderHeight, + mwebUtxosHeight, + blockTime, + ); +} + +final class OpaqueMwebdServer { + final Object _value; + + const OpaqueMwebdServer(this._value); + + T get() => _value as T; +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 02b019f4d..000000000 --- a/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,55 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) cs_monero_flutter_libs_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "CsMoneroFlutterLibsLinuxPlugin"); - cs_monero_flutter_libs_linux_plugin_register_with_registrar(cs_monero_flutter_libs_linux_registrar); - g_autoptr(FlPluginRegistrar) cs_salvium_flutter_libs_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "CsSalviumFlutterLibsLinuxPlugin"); - cs_salvium_flutter_libs_linux_plugin_register_with_registrar(cs_salvium_flutter_libs_linux_registrar); - g_autoptr(FlPluginRegistrar) desktop_drop_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin"); - desktop_drop_plugin_register_with_registrar(desktop_drop_registrar); - g_autoptr(FlPluginRegistrar) devicelocale_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "DevicelocalePlugin"); - devicelocale_plugin_register_with_registrar(devicelocale_registrar); - g_autoptr(FlPluginRegistrar) flutter_libepiccash_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLibepiccashPlugin"); - flutter_libepiccash_plugin_register_with_registrar(flutter_libepiccash_registrar); - g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); - flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); - g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin"); - isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar); - g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin"); - sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar); - g_autoptr(FlPluginRegistrar) stack_wallet_backup_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "StackWalletBackupPlugin"); - stack_wallet_backup_plugin_register_with_registrar(stack_wallet_backup_registrar); - g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); - url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); - g_autoptr(FlPluginRegistrar) window_size_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin"); - window_size_plugin_register_with_registrar(window_size_registrar); -} diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 239136a98..000000000 --- a/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - cs_monero_flutter_libs_linux - cs_salvium_flutter_libs_linux - desktop_drop - devicelocale - flutter_libepiccash - flutter_secure_storage_linux - isar_flutter_libs - sqlite3_flutter_libs - stack_wallet_backup - url_launcher_linux - window_size -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST - camera_linux - coinlib_flutter - flutter_libsparkmobile - flutter_mwebd - frostdart - tor_ffi_plugin - xelis_flutter -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/macos/.gitignore b/macos/.gitignore index 746adbb6b..08148cce5 100644 --- a/macos/.gitignore +++ b/macos/.gitignore @@ -5,3 +5,5 @@ # Xcode-related **/dgph **/xcuserdata/ + +Podfile.lock diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index b30b6bead..000000000 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import camera_macos -import connectivity_plus -import cs_monero_flutter_libs_macos -import cs_salvium_flutter_libs_macos -import desktop_drop -import device_info_plus -import devicelocale -import file_picker -import flutter_libepiccash -import flutter_local_notifications -import flutter_secure_storage_macos -import isar_flutter_libs -import local_auth_darwin -import mobile_scanner -import package_info_plus -import path_provider_foundation -import share_plus -import sqlite3_flutter_libs -import stack_wallet_backup -import url_launcher_macos -import wakelock_plus -import window_size - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - CameraMacosPlugin.register(with: registry.registrar(forPlugin: "CameraMacosPlugin")) - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) - CsMoneroFlutterLibsMacosPlugin.register(with: registry.registrar(forPlugin: "CsMoneroFlutterLibsMacosPlugin")) - CsSalviumFlutterLibsMacosPlugin.register(with: registry.registrar(forPlugin: "CsSalviumFlutterLibsMacosPlugin")) - DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) - DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) - DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin")) - FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) - FlutterLibepiccashPlugin.register(with: registry.registrar(forPlugin: "FlutterLibepiccashPlugin")) - FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) - FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) - IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) - FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin")) - MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin")) - FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) - Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin")) - StackWalletBackupPlugin.register(with: registry.registrar(forPlugin: "StackWalletBackupPlugin")) - UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) - WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) - WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin")) -} diff --git a/macos/Podfile b/macos/Podfile index c795730db..3936acf0c 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -39,5 +39,9 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_macos_build_settings(target) + target.build_configurations.each do |config| + config.build_settings['ARCHS'] = 'arm64' + config.build_settings['VALID_ARCHS'] = 'arm64' + end end end diff --git a/macos/Podfile.lock b/macos/Podfile.lock deleted file mode 100644 index 64b655098..000000000 --- a/macos/Podfile.lock +++ /dev/null @@ -1,199 +0,0 @@ -PODS: - - camera_macos (0.0.1): - - FlutterMacOS - - coinlib_flutter (0.5.0): - - Flutter - - FlutterMacOS - - connectivity_plus (0.0.1): - - FlutterMacOS - - ReachabilitySwift - - cs_monero_flutter_libs_macos (0.0.1): - - FlutterMacOS - - cs_salvium_flutter_libs_macos (0.0.1): - - FlutterMacOS - - desktop_drop (0.0.1): - - FlutterMacOS - - device_info_plus (0.0.1): - - FlutterMacOS - - devicelocale (0.0.1): - - FlutterMacOS - - file_picker (0.0.1): - - FlutterMacOS - - flutter_libepiccash (0.0.1): - - FlutterMacOS - - flutter_libsparkmobile (0.0.1): - - FlutterMacOS - - flutter_local_notifications (0.0.1): - - FlutterMacOS - - flutter_secure_storage_macos (6.1.1): - - FlutterMacOS - - FlutterMacOS (1.0.0) - - frostdart (0.0.1): - - FlutterMacOS - - isar_flutter_libs (1.0.0): - - FlutterMacOS - - local_auth_darwin (0.0.1): - - Flutter - - FlutterMacOS - - package_info_plus (0.0.1): - - FlutterMacOS - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - ReachabilitySwift (5.2.3) - - share_plus (0.0.1): - - FlutterMacOS - - "sqlite3 (3.46.0+1)": - - "sqlite3/common (= 3.46.0+1)" - - "sqlite3/common (3.46.0+1)" - - "sqlite3/dbstatvtab (3.46.0+1)": - - sqlite3/common - - "sqlite3/fts5 (3.46.0+1)": - - sqlite3/common - - "sqlite3/perf-threadsafe (3.46.0+1)": - - sqlite3/common - - "sqlite3/rtree (3.46.0+1)": - - sqlite3/common - - sqlite3_flutter_libs (0.0.1): - - FlutterMacOS - - "sqlite3 (~> 3.46.0+1)" - - sqlite3/dbstatvtab - - sqlite3/fts5 - - sqlite3/perf-threadsafe - - sqlite3/rtree - - stack_wallet_backup (0.0.1): - - FlutterMacOS - - tor_ffi_plugin (0.0.1) - - url_launcher_macos (0.0.1): - - FlutterMacOS - - wakelock_plus (0.0.1): - - FlutterMacOS - - window_size (0.0.2): - - FlutterMacOS - - xelis_flutter (0.0.1): - - FlutterMacOS - -DEPENDENCIES: - - camera_macos (from `Flutter/ephemeral/.symlinks/plugins/camera_macos/macos`) - - coinlib_flutter (from `Flutter/ephemeral/.symlinks/plugins/coinlib_flutter/darwin`) - - connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`) - - cs_monero_flutter_libs_macos (from `Flutter/ephemeral/.symlinks/plugins/cs_monero_flutter_libs_macos/macos`) - - cs_salvium_flutter_libs_macos (from `Flutter/ephemeral/.symlinks/plugins/cs_salvium_flutter_libs_macos/macos`) - - desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`) - - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - - devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`) - - file_picker (from `Flutter/ephemeral/.symlinks/plugins/file_picker/macos`) - - flutter_libepiccash (from `Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos`) - - flutter_libsparkmobile (from `Flutter/ephemeral/.symlinks/plugins/flutter_libsparkmobile/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`) - - frostdart (from `Flutter/ephemeral/.symlinks/plugins/frostdart/macos`) - - isar_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos`) - - local_auth_darwin (from `Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin`) - - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - - sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/macos`) - - stack_wallet_backup (from `Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos`) - - tor_ffi_plugin (from `Flutter/ephemeral/.symlinks/plugins/tor_ffi_plugin/macos`) - - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) - - window_size (from `Flutter/ephemeral/.symlinks/plugins/window_size/macos`) - - xelis_flutter (from `Flutter/ephemeral/.symlinks/plugins/xelis_flutter/macos`) - -SPEC REPOS: - trunk: - - ReachabilitySwift - - sqlite3 - -EXTERNAL SOURCES: - camera_macos: - :path: Flutter/ephemeral/.symlinks/plugins/camera_macos/macos - coinlib_flutter: - :path: Flutter/ephemeral/.symlinks/plugins/coinlib_flutter/darwin - connectivity_plus: - :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos - cs_monero_flutter_libs_macos: - :path: Flutter/ephemeral/.symlinks/plugins/cs_monero_flutter_libs_macos/macos - cs_salvium_flutter_libs_macos: - :path: Flutter/ephemeral/.symlinks/plugins/cs_salvium_flutter_libs_macos/macos - desktop_drop: - :path: Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos - device_info_plus: - :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos - devicelocale: - :path: Flutter/ephemeral/.symlinks/plugins/devicelocale/macos - file_picker: - :path: Flutter/ephemeral/.symlinks/plugins/file_picker/macos - flutter_libepiccash: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos - flutter_libsparkmobile: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_libsparkmobile/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 - frostdart: - :path: Flutter/ephemeral/.symlinks/plugins/frostdart/macos - isar_flutter_libs: - :path: Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos - local_auth_darwin: - :path: Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin - package_info_plus: - :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos - path_provider_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - share_plus: - :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos - sqlite3_flutter_libs: - :path: Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/macos - stack_wallet_backup: - :path: Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos - tor_ffi_plugin: - :path: Flutter/ephemeral/.symlinks/plugins/tor_ffi_plugin/macos - url_launcher_macos: - :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos - wakelock_plus: - :path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos - window_size: - :path: Flutter/ephemeral/.symlinks/plugins/window_size/macos - xelis_flutter: - :path: Flutter/ephemeral/.symlinks/plugins/xelis_flutter/macos - -SPEC CHECKSUMS: - camera_macos: c2603f5eed16f05076cf17e12030d2ce55a77839 - coinlib_flutter: 9275e8255ef67d3da33beb6e117d09ced4f46eb5 - connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747 - cs_monero_flutter_libs_macos: b901f94d39d1338f706312b026aba928d23582d4 - cs_salvium_flutter_libs_macos: 3c7b30fb8c82ee0fb0195280ddcc10c65ab5e082 - desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898 - device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720 - devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 - file_picker: e716a70a9fe5fd9e09ebc922d7541464289443af - flutter_libepiccash: be1560a04150c5cc85bcf08d236ec2b3d1f5d8da - flutter_libsparkmobile: df2d36af1691379c81249e7be7b68be3c81d388b - flutter_local_notifications: 4b427ffabf278fc6ea9484c97505e231166927a5 - flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - frostdart: e6bf3119527ccfbcec1b8767da6ede5bb4c4f716 - isar_flutter_libs: 43385c99864c168fadba7c9adeddc5d38838ca6a - local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3 - package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979 - share_plus: 76dd39142738f7a68dd57b05093b5e8193f220f7 - sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630 - sqlite3_flutter_libs: 5ca46c1a04eddfbeeb5b16566164aa7ad1616e7b - stack_wallet_backup: 6ebc60b1bdcf11cf1f1cbad9aa78332e1e15778c - tor_ffi_plugin: 2566c1ed174688cca560fa0c64b7a799c66f07cb - url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 - wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269 - window_size: 339dafa0b27a95a62a843042038fa6c3c48de195 - xelis_flutter: 34e05f3621e46381fb1b10d7c11f63764d3f7a80 - -PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 - -COCOAPODS: 1.16.2 diff --git a/pubspec.lock b/pubspec.lock index ab6a39710..fd2dde370 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,39 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" + sha256: dd3d2ad434b9510001d089e8de7556d50c834481b9abc2891a0184a8493a19dc url: "https://pub.dev" source: hosted - version: "76.0.0" - _macros: - dependency: transitive - description: dart - source: sdk - version: "0.3.3" + version: "89.0.0" analyzer: dependency: "direct dev" description: name: analyzer - sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" - url: "https://pub.dev" - source: hosted - version: "6.11.0" - analyzer_plugin: - dependency: transitive - description: - name: analyzer_plugin - sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" + sha256: c22b6e7726d1f9e5db58c7251606076a71ca0dbcf76116675edfadbec0c9e875 url: "https://pub.dev" source: hosted - version: "0.11.3" + version: "8.2.0" another_flushbar: dependency: "direct main" description: name: another_flushbar - sha256: "19bf9520230ec40b300aaf9dd2a8fefcb277b25ecd1c4838f530566965befc2a" + sha256: "2b99671c010a7d5770acf5cb24c9f508b919c3a7948b6af9646e773e7da7b757" url: "https://pub.dev" source: hosted - version: "1.12.30" + version: "1.12.32" ansicolor: dependency: transitive description: @@ -167,10 +154,10 @@ packages: dependency: transitive description: name: borsh_annotation - sha256: "4a226cf8b7a165ecf8020c0c8d366b2728167fd102ef9b9e89d94d86f89ac57b" + sha256: dc73a7fdc6fe4505535657daf8ab3cebe382311fae63a0faaf9315ea1bc30bff url: "https://pub.dev" source: hosted - version: "0.3.1+5" + version: "0.3.2" bs58check: dependency: "direct main" description: @@ -183,18 +170,18 @@ packages: dependency: transitive description: name: build - sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 + sha256: "7d95cbbb1526ab5ae977df9b4cc660963b9b27f6d1075c0b34653868911385e4" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "3.0.0" build_cli_annotations: dependency: transitive description: name: build_cli_annotations - sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 + sha256: e563c2e01de8974566a1998410d3f6f03521788160a02503b0b1f1a46c7b3d95 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build_config: dependency: transitive description: @@ -215,26 +202,26 @@ packages: dependency: transitive description: name: build_resolvers - sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 + sha256: "38c9c339333a09b090a638849a4c56e70a404c6bdd3b511493addfbc113b60c2" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "3.0.0" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" + sha256: b971d4a1c789eba7be3e6fe6ce5e5b50fd3719e3cb485b3fad6d04358304351d url: "https://pub.dev" source: hosted - version: "2.4.15" + version: "2.6.0" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" + sha256: c04e612ca801cd0928ccdb891c263a2b1391cb27940a5ea5afcf9ba894de5d62 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "9.2.0" built_collection: dependency: transitive description: @@ -247,18 +234,18 @@ packages: dependency: transitive description: name: built_value - sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + sha256: a30f0a0e38671e89a492c44d005b5545b830a961575bbd8336d42869ff71066d url: "https://pub.dev" source: hosted - version: "8.9.5" + version: "8.12.0" calendar_date_picker2: dependency: "direct main" description: name: calendar_date_picker2 - sha256: "986955aea43081c8cf70fe01735ccdfe9a7041218b2be53ed92d5d4e639e8a1a" + sha256: "7b5f20f2a02768df70b3d1fb181c217ab9f8992f39fd6c3fc2ff95b0885820a2" url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.9" camera_linux: dependency: "direct main" description: @@ -280,10 +267,10 @@ packages: dependency: "direct main" description: name: camera_platform_interface - sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + sha256: ea1ef6ba79cdbed93df2d3eeef11542a90dec24dbcd9cde574926b86d7a09a10 url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.11.0" camera_windows: dependency: "direct main" description: @@ -297,10 +284,10 @@ packages: dependency: "direct main" description: name: cbor - sha256: "69b1fe99f4632acc597034d73a5eb440f82667b58e2489223bb798e31b6c90db" + sha256: f5239dd6b6ad24df67d1449e87d7180727d6f43b87b3c9402e6398c7a2d9609b url: "https://pub.dev" source: hosted - version: "6.3.3" + version: "6.3.7" characters: dependency: transitive description: @@ -313,10 +300,10 @@ packages: dependency: transitive description: name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -325,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" + source: hosted + version: "0.2.0" cli_util: dependency: transitive description: @@ -345,16 +340,16 @@ packages: dependency: transitive description: name: code_builder - sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" url: "https://pub.dev" source: hosted - version: "4.10.1" + version: "4.11.0" coinlib: dependency: "direct overridden" description: path: coinlib - ref: da1b3659e296660ac2b36f81d155d2362a2b3195 - resolved-ref: da1b3659e296660ac2b36f81d155d2362a2b3195 + ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 + resolved-ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 url: "https://www.github.com/julian-CStack/coinlib" source: git version: "4.1.0" @@ -362,8 +357,8 @@ packages: dependency: "direct main" description: path: coinlib_flutter - ref: da1b3659e296660ac2b36f81d155d2362a2b3195 - resolved-ref: da1b3659e296660ac2b36f81d155d2362a2b3195 + ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 + resolved-ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 url: "https://www.github.com/julian-CStack/coinlib" source: git version: "4.0.0" @@ -379,11 +374,11 @@ packages: dependency: "direct main" description: path: compat - ref: b2b12cfeaf15d057ea18b14c196e04f3002de2da - resolved-ref: b2b12cfeaf15d057ea18b14c196e04f3002de2da + ref: "44b8c0f8e1cc7ddbfa33c0b3f11279e64646138" + resolved-ref: "44b8c0f8e1cc7ddbfa33c0b3f11279e646461386" url: "https://github.com/cypherstack/cs_monero" source: git - version: "1.0.0" + version: "2.0.0" connectivity_plus: dependency: "direct main" description: @@ -412,10 +407,10 @@ packages: dependency: transitive description: name: coverage - sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.15.0" cross_file: dependency: transitive description: @@ -444,162 +439,162 @@ packages: dependency: "direct main" description: name: cs_monero - sha256: f48495ed6744a47598b36eaf28adc1e9e55f0d4ea3c18fe42eda0d3d8f714206 + sha256: "7cfbcd25135a0710ad096678160d7668abed8979838165f06975adbe6bbec215" url: "https://pub.dev" source: hosted - version: "1.0.0-pre.3" + version: "1.1.1" cs_monero_flutter_libs: dependency: "direct main" description: name: cs_monero_flutter_libs - sha256: ccfd2c80e3f283f447602ecc548c9922b526002928a0fa1d34f1d6d74f73952e + sha256: "47d716adc7b668653e359df785702d1213245f2fab6efa930a70b87e4cba23ae" url: "https://pub.dev" source: hosted - version: "1.0.0-pre.0" + version: "1.1.1" cs_monero_flutter_libs_android: dependency: transitive description: name: cs_monero_flutter_libs_android - sha256: "8a03a93b84a091a6c09be2a3504002885af5e3e8e316b2776544271e9509d352" + sha256: "4b9d1117e63352d27bd0cb7115fc20d6212bd02a7e6ec3cd8ab2b37fddfb21eb" url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_android_arm64_v8a: dependency: transitive description: name: cs_monero_flutter_libs_android_arm64_v8a - sha256: a412c30e8f72aefc2671f2ed76b50fdb70fc9eaa697f8c7050e0ede941f5863e + sha256: cbb8704dcc1d02581a820b99188c97acaa140eaefedee9ce7d17910e24e5530f url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_android_armeabi_v7a: dependency: transitive description: name: cs_monero_flutter_libs_android_armeabi_v7a - sha256: "2177af9a62ca9c2997f88af09d54c784dc1ee49a3540abe73c0271d25eb8dadb" + sha256: dc276544b169553a8a63855beaa6c2cf8180af68fb335ab1b629f2fa9370e123 url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_android_x86_64: dependency: transitive description: name: cs_monero_flutter_libs_android_x86_64 - sha256: ac5e03624c86438bbe47c986dab5bfe1fb3060a0b4bdb5dd8eea09795a5fc2c8 + sha256: fb02563c07d3fb4804925ec66446e26389ca2d92659493b72a6cf106765fa321 url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_ios: dependency: transitive description: name: cs_monero_flutter_libs_ios - sha256: ec2e5b9b3ae3100f390deeff6114ffe3259a0701fafdc0f1028996e0da78b17b + sha256: "6fbe1590b0633f42c906dfada1db8e3ce4f8899eae8728a4bb9b696dc7fb5155" url: "https://pub.dev" source: hosted - version: "1.0.0-pre.0" + version: "1.1.1" cs_monero_flutter_libs_linux: dependency: transitive description: name: cs_monero_flutter_libs_linux - sha256: "65651535e028211d4c535dac53fdfec940935f1037f0a01bfdf4f6cf8b904362" + sha256: "394a58f4efefd3857f1f3da03f21e33f1c2ca5141936db7a843e77286ffaa89e" url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_macos: dependency: transitive description: name: cs_monero_flutter_libs_macos - sha256: "609586b4e4524452698b4877ff886ad9aafd721373cddebba45d9d8a63a8cfc9" + sha256: e00616ab86a0ea18b3360dbae8d862b83fa450b1a83355647e34e8c64696a6c7 url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_monero_flutter_libs_platform_interface: dependency: transitive description: name: cs_monero_flutter_libs_platform_interface - sha256: "9df4ced42f5746c85c008f504f70b39efd05aa409bb82eaf4b2058d8454e0bb7" + sha256: "7c832ed033257b82e2c30f1fc764f68fa4e4a780d4836a4f94384aaf9cd44ee7" url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.0.0" cs_monero_flutter_libs_windows: dependency: transitive description: name: cs_monero_flutter_libs_windows - sha256: "4294f62e40ba2f155c52fccfdbb12029ed5c856ea8a546aebb3ebc94bc856e43" + sha256: de265ed544a4edb9e778e88b56ccee098a1ad38cd4c4536a985f05d3dde95a23 url: "https://pub.dev" source: hosted - version: "1.0.0-pre" + version: "1.1.0" cs_salvium: dependency: "direct main" description: name: cs_salvium - sha256: "838a2f21b0ad567f68a5294360c4c96727b722037ae7bfdc26651c99d6c26bd3" + sha256: e040a407bb485b177130a86dd6cd817b8cea933bbfae149a73c57a681deaa4a5 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "2.0.0" cs_salvium_flutter_libs: dependency: "direct main" description: name: cs_salvium_flutter_libs - sha256: d1e49ed67632f77d863ad3eafc78db8867f155cf9decf156345ec75c92e0d026 + sha256: "2aea1bbb6e6b69ac0a8e4dace2efc50507a10651ad9bec862f6a5ccd06a76578" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" cs_salvium_flutter_libs_android: dependency: transitive description: name: cs_salvium_flutter_libs_android - sha256: "63603fc4c94d609e13c8e8064c742ac628ef006d3af9990e2c585489bde9b96d" + sha256: ad9537942f7c1416fbb3432cb154d641262bd18c56471c4f62dd1d2e7e23f125 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cs_salvium_flutter_libs_android_arm64_v8a: dependency: transitive description: name: cs_salvium_flutter_libs_android_arm64_v8a - sha256: "5ced9fe6d71dd22f90865600b8dff1ed07ce480db6c9de1a8d56e63318000e97" + sha256: "4c307cd3276c7aa2a461ebcfc726adf9b4d9427dbdbad120dbe50f54d3690b4e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cs_salvium_flutter_libs_android_armeabi_v7a: dependency: transitive description: name: cs_salvium_flutter_libs_android_armeabi_v7a - sha256: "2fb718dff22918e72b138c191dbd887d8d241f03a34add11e8d699c48b657b47" + sha256: "9491e0cdd4452c9c907e137acd2d08f76d33efc7a9d4b86fbfab69224bc9f473" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cs_salvium_flutter_libs_android_x86_64: dependency: transitive description: name: cs_salvium_flutter_libs_android_x86_64 - sha256: "85134ab635a4dddec5735fdd8f3971a1c33e3aaa1c8aa88e54f0b3d5e0d0caab" + sha256: "0b87ccd86bd9b0eeb659dade948d076cddf908d535fe803b769030da8ff406dc" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cs_salvium_flutter_libs_ios: dependency: transitive description: name: cs_salvium_flutter_libs_ios - sha256: "54d18fbac60c8a602e4d0f967ea7d02fab71bff3e032f9576e159229ce372534" + sha256: "4dc2447255f1c8997b6d26e72577e30ceab7f4622620549dc9de9eb8dccac35c" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "2.0.0" cs_salvium_flutter_libs_linux: dependency: transitive description: name: cs_salvium_flutter_libs_linux - sha256: "0cb2f545ea4aa45c819a0656540d022a9c73a43681e50f1d2a5e72eaf1bc500e" + sha256: "8adc16e9d0fb8dc439475ddb2eaa4fcde8433fa2cb6e14ce814b1a40965eda5c" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "2.0.0" cs_salvium_flutter_libs_macos: dependency: transitive description: name: cs_salvium_flutter_libs_macos - sha256: "9df0818299a5ddadd41eb4c94de2cd8e519d1e9f4aa6166657397200397f402f" + sha256: "428e4eead3d507112cb6f0b70f69bc43430b3db60f0b4d731e0d6a6fab0b69bb" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cs_salvium_flutter_libs_platform_interface: dependency: transitive description: @@ -612,10 +607,10 @@ packages: dependency: transitive description: name: cs_salvium_flutter_libs_windows - sha256: "824966223a32bfe4d99c634d3b8d81917806d06ad878007552597e2070c25a02" + sha256: "934a1eeb95619df9e23eff13a6a6a356322297abfa6ab871283cdf665cc32c7f" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "2.0.0" csslib: dependency: transitive description: @@ -660,10 +655,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820" + sha256: c87dfe3d56f183ffe9106a18aebc6db431fc7c98c31a54b952a77f3d54a85697 url: "https://pub.dev" source: hosted - version: "2.3.8" + version: "3.1.2" dartx: dependency: transitive description: @@ -692,10 +687,10 @@ packages: dependency: "direct dev" description: name: dependency_validator - sha256: f727a5627aa405965fab4aef4f468e50a9b632ba0737fd2f98c932fec6d712b9 + sha256: "3a243f5b9def5f902887a66fbea7e72e612eee956af6c8c34d382fe6d5484145" url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "5.0.2" desktop_drop: dependency: "direct main" description: @@ -716,10 +711,10 @@ packages: dependency: transitive description: name: device_info_plus_platform_interface - sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" + sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f url: "https://pub.dev" source: hosted - version: "7.0.2" + version: "7.0.3" devicelocale: dependency: "direct main" description: @@ -741,10 +736,10 @@ packages: dependency: transitive description: name: dio - sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 url: "https://pub.dev" source: hosted - version: "5.8.0+1" + version: "5.9.0" dio_web_adapter: dependency: transitive description: @@ -757,26 +752,26 @@ packages: dependency: "direct main" description: name: drift - sha256: c2d073d35ad441730812f4ea05b5dd031fb81c5f9786a4f5fb77ecd6307b6f74 + sha256: "540cf382a3bfa99b76e51514db5b0ebcd81ce3679b7c1c9cb9478ff3735e47a1" url: "https://pub.dev" source: hosted - version: "2.22.1" + version: "2.28.2" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: f4ab5d6976b1e31551ceb82ff597a505bda7818ff4f7be08a1da9d55eb6e730c + sha256: "4db0eeedc7e8bed117a9f22d867ab7a3a294300fed5c269aac90d0b3545967ca" url: "https://pub.dev" source: hosted - version: "2.22.1" + version: "2.28.3" drift_flutter: dependency: "direct main" description: name: drift_flutter - sha256: "9fd9b479c6187d6b3bbdfd2703df98010470a6c65c2a8c8c5a1034c620bd0a0e" + sha256: b7534bf320aac5213259aac120670ba67b63a1fd010505babc436ff86083818f url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "0.2.7" dropdown_button2: dependency: "direct main" description: @@ -813,11 +808,11 @@ packages: dependency: "direct main" description: path: "." - ref: f0b1300140d45c13e7722f8f8d20308efeba8449 - resolved-ref: f0b1300140d45c13e7722f8f8d20308efeba8449 + ref: "794ab2d7b88b34d64a89518f9b9f41dcc235aca1" + resolved-ref: "794ab2d7b88b34d64a89518f9b9f41dcc235aca1" url: "https://github.com/cypherstack/electrum_adapter.git" source: git - version: "3.0.0" + version: "3.0.2" emojis: dependency: "direct main" description: @@ -854,10 +849,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" ffi: dependency: "direct main" description: @@ -940,12 +935,19 @@ packages: relative: true source: path version: "0.0.1" + flutter_libmwc: + dependency: "direct main" + description: + path: "crypto_plugins/flutter_libmwc" + relative: true + source: path + version: "0.0.1" flutter_libsparkmobile: dependency: "direct main" description: path: "." - ref: f5fd2238fca4ffe82f7e14646a613a04d2c243d6 - resolved-ref: f5fd2238fca4ffe82f7e14646a613a04d2c243d6 + ref: "84a139a25ab1691762002fafcae351e3d444a5c7" + resolved-ref: "84a139a25ab1691762002fafcae351e3d444a5c7" url: "https://github.com/cypherstack/flutter_libsparkmobile.git" source: git version: "0.1.0" @@ -985,10 +987,10 @@ packages: dependency: "direct main" description: name: flutter_mwebd - sha256: "73b35b6eaccb6e1be7eb37e04bcc94f091244fa31b8aedc17e4119c580a7a747" + sha256: c5d1f628a037a12cd558c3c37fec46438c4d8d07e108a7f7cc8969806de13993 url: "https://pub.dev" source: hosted - version: "0.0.1-pre.7" + version: "0.0.1-pre.8" flutter_native_splash: dependency: "direct main" description: @@ -1001,10 +1003,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" + sha256: b0694b7fb1689b0e6cc193b3f1fcac6423c4f93c74fb20b806c6b6f196db0c31 url: "https://pub.dev" source: hosted - version: "2.0.24" + version: "2.0.30" flutter_riverpod: dependency: "direct main" description: @@ -1033,18 +1035,18 @@ packages: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" + sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.3" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" flutter_secure_storage_platform_interface: dependency: transitive description: @@ -1073,10 +1075,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b + sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678 url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.2.1" flutter_test: dependency: "direct dev" description: flutter @@ -1119,8 +1121,8 @@ packages: dependency: "direct main" description: path: "." - ref: afaad488f5215a9c2c211e5e2f8460237eef60f1 - resolved-ref: afaad488f5215a9c2c211e5e2f8460237eef60f1 + ref: "540d0bc7dc27a97d45d63f412f26818a7f3b8b51" + resolved-ref: "540d0bc7dc27a97d45d63f412f26818a7f3b8b51" url: "https://github.com/cypherstack/fusiondart.git" source: git version: "1.0.0" @@ -1168,10 +1170,10 @@ packages: dependency: transitive description: name: grpc - sha256: "30e1edae6846b163a64f6d8716e3443980fe1f7d2d1f086f011d24ea186f2582" + sha256: "2dde469ddd8bbd7a33a0765da417abe1ad2142813efce3a86c512041294e2b26" url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "4.1.0" hex: dependency: "direct main" description: @@ -1181,29 +1183,37 @@ packages: source: hosted version: "0.2.0" hive: - dependency: "direct main" + dependency: transitive description: name: hive sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" url: "https://pub.dev" source: hosted version: "2.2.3" - hive_flutter: + hive_ce: dependency: "direct main" description: - name: hive_flutter - sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc + name: hive_ce + sha256: "89746b555109029a30780e0a601978460b8065643592667f6e43a238faccb8a4" url: "https://pub.dev" source: hosted - version: "1.1.0" - hive_generator: + version: "2.13.2" + hive_ce_flutter: + dependency: "direct main" + description: + name: hive_ce_flutter + sha256: f5bd57fda84402bca7557fedb8c629c96c8ea10fab4a542968d7b60864ca02cc + url: "https://pub.dev" + source: hosted + version: "2.3.2" + hive_ce_generator: dependency: "direct dev" description: - name: hive_generator - sha256: "06cb8f58ace74de61f63500564931f9505368f45f98958bd7a6c35ba24159db4" + name: hive_ce_generator + sha256: a169feeff2da9cc2c417ce5ae9bcebf7c8a95d7a700492b276909016ad70a786 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "1.9.3" hive_test: dependency: "direct dev" description: @@ -1216,10 +1226,10 @@ packages: dependency: transitive description: name: html - sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" url: "https://pub.dev" source: hosted - version: "0.15.5" + version: "0.15.6" http: dependency: "direct main" description: @@ -1297,30 +1307,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" - isar: + isar_community: dependency: "direct main" description: - name: isar - sha256: e17a9555bc7f22ff26568b8c64d019b4ffa2dc6bd4cb1c8d9b269aefd32e53ad - url: "https://pub.isar-community.dev" + name: isar_community + sha256: eae4a7e659bec0f92fc953afb8738512062df6a2ff99fe838cb53f9ed4fa6e97 + url: "https://pub.dev" source: hosted - version: "3.1.8" - isar_flutter_libs: + version: "3.3.0-dev.2" + isar_community_flutter_libs: dependency: "direct main" description: - name: isar_flutter_libs - sha256: "78710781e658ce4bff59b3f38c5b2735e899e627f4e926e1221934e77b95231a" - url: "https://pub.isar-community.dev" + name: isar_community_flutter_libs + sha256: e8e6668d2c20ed61af9422bddc0bc3d1f6db91e3a5dae4406379a1426c06fbff + url: "https://pub.dev" source: hosted - version: "3.1.8" - isar_generator: + version: "3.3.0-dev.2" + isar_community_generator: dependency: "direct dev" description: - name: isar_generator - sha256: "484e73d3b7e81dbd816852fe0b9497333118a9aeb646fd2d349a62cc8980ffe1" - url: "https://pub.isar-community.dev" + name: isar_community_generator + sha256: "9da90eafaecf2ec482f50854373e37f3d9e33387830dbc0265bcdb74d9036e74" + url: "https://pub.dev" source: hosted - version: "3.1.8" + version: "3.3.0-dev.2" + isolate_channel: + dependency: transitive + description: + name: isolate_channel + sha256: f3d36f783b301e6b312c3450eeb2656b0e7d1db81331af2a151d9083a3f6b18d + url: "https://pub.dev" + source: hosted + version: "0.2.2+1" js: dependency: transitive description: @@ -1349,10 +1367,10 @@ packages: dependency: transitive description: name: json_serializable - sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c + sha256: "33a040668b31b320aafa4822b7b1e177e163fc3c1e835c6750319d4ab23aa6fe" url: "https://pub.dev" source: hosted - version: "6.9.0" + version: "6.11.1" jsontool: dependency: transitive description: @@ -1373,26 +1391,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -1413,18 +1431,18 @@ packages: dependency: transitive description: name: local_auth_android - sha256: "0abe4e72f55c785b28900de52a2522c86baba0988838b5dc22241b072ecccd74" + sha256: "48924f4a8b3cc45994ad5993e2e232d3b00788a305c1bf1c7db32cef281ce9a3" url: "https://pub.dev" source: hosted - version: "1.0.48" + version: "1.0.52" local_auth_darwin: dependency: transitive description: name: local_auth_darwin - sha256: "6d2950da311d26d492a89aeb247c72b4653ddc93601ea36a84924a396806d49c" + sha256: "0e9706a8543a4a2eee60346294d6a633dd7c3ee60fae6b752570457c4ff32055" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.6.0" local_auth_platform_interface: dependency: transitive description: @@ -1466,14 +1484,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.7.0" - macros: - dependency: transitive - description: - name: macros - sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" - url: "https://pub.dev" - source: hosted - version: "0.1.3-main.0" matcher: dependency: transitive description: @@ -1518,10 +1528,10 @@ packages: dependency: "direct main" description: name: mobile_scanner - sha256: "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95" + sha256: "5e7e09d904dc01de071b79b3f3789b302b0ed3c9c963109cd3f83ad90de62ecf" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.1.2" mockingjay: dependency: "direct dev" description: @@ -1534,10 +1544,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + sha256: "4feb43bc4eb6c03e832f5fcd637d1abb44b98f9cfa245c58e27382f58859f8f6" url: "https://pub.dev" source: hosted - version: "5.4.4" + version: "5.5.1" mocktail: dependency: transitive description: @@ -1607,10 +1617,10 @@ packages: dependency: "direct main" description: name: on_chain - sha256: "54d8117ff007b1f4a71ce8076c2a0bbfb592e5ce61ae397c68a67d70c9246a5d" + sha256: "6b6792f7da9ea23003cd6f0fc8c2930c049f50bb61499333c0492893b7608072" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.0" package_config: dependency: transitive description: @@ -1623,18 +1633,18 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" + sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" url: "https://pub.dev" source: hosted - version: "8.3.0" + version: "8.3.1" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" + sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" path: dependency: "direct main" description: @@ -1663,18 +1673,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" + sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db" url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.2.18" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" path_provider_linux: dependency: transitive description: @@ -1703,10 +1713,10 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "2d070d8684b68efb580a5997eb62f675e8a885ef0be6e754fb9ef489c177470f" + sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1 url: "https://pub.dev" source: hosted - version: "12.0.0+1" + version: "12.0.1" permission_handler_android: dependency: transitive description: @@ -1791,10 +1801,10 @@ packages: dependency: transitive description: name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" url: "https://pub.dev" source: hosted - version: "1.5.1" + version: "1.5.2" pretty_dio_logger: dependency: transitive description: @@ -1815,10 +1825,10 @@ packages: dependency: transitive description: name: protobuf - sha256: "579fe5557eae58e3adca2e999e38f02441d8aa908703854a9e0a0f47fa857731" + sha256: de9c9eb2c33f8e933a42932fe1dc504800ca45ebc3d673e6ed7f39754ee4053e url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.0" pub_semver: dependency: transitive description: @@ -1963,11 +1973,10 @@ packages: socks_socket: dependency: transitive description: - path: "." - ref: master - resolved-ref: e6232c53c1595469931ababa878759a067c02e94 - url: "https://github.com/cypherstack/socks_socket.git" - source: git + name: socks_socket + sha256: "53bc7eae40a3aa16ea810b0e9de3bb23ba7beb0b40d09357b89190f2f44374cc" + url: "https://pub.dev" + source: hosted version: "1.1.1" solana: dependency: "direct main" @@ -1982,18 +1991,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + sha256: "7b19d6ba131c6eb98bfcbf8d56c1a7002eba438af2e7ae6f8398b2b0f4f381e3" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "3.1.0" source_helper: dependency: transitive description: name: source_helper - sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" + sha256: a447acb083d3a5ef17f983dd36201aeea33fedadb3228fa831f2f0c92f0f3aca url: "https://pub.dev" source: hosted - version: "1.3.5" + version: "1.3.7" source_map_stack_trace: dependency: transitive description: @@ -2022,26 +2031,26 @@ packages: dependency: "direct main" description: name: sqlite3 - sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb + sha256: f393d92c71bdcc118d6203d07c991b9be0f84b1a6f89dd4f7eed348131329924 url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.9.0" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" + sha256: ccd29dd6cf6fb9351fa07cd6f92895809adbf0779c1d986acf5e3d53b3250e33 url: "https://pub.dev" source: hosted - version: "0.5.24" + version: "0.5.25" sqlparser: dependency: transitive description: name: sqlparser - sha256: "4cad4b2c5f63dc9ea1a8dcffb58cf762322bea5dd8836870164a65e913bdae41" + sha256: "57090342af1ce32bb499aa641f4ecdd2d6231b9403cea537ac059e803cc20d67" url: "https://pub.dev" source: hosted - version: "0.40.0" + version: "0.41.2" stack_trace: dependency: transitive description: @@ -2127,26 +2136,26 @@ packages: dependency: transitive description: name: test - sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e" + sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb" url: "https://pub.dev" source: hosted - version: "1.25.15" + version: "1.26.2" test_api: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" test_core: dependency: transitive description: name: test_core - sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" + sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a" url: "https://pub.dev" source: hosted - version: "0.6.8" + version: "0.6.11" tezart: dependency: "direct main" description: @@ -2160,10 +2169,10 @@ packages: dependency: transitive description: name: time - sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" timezone: dependency: transitive description: @@ -2200,8 +2209,8 @@ packages: dependency: "direct main" description: path: "." - ref: "752f054b65c500adb9cad578bf183a978e012502" - resolved-ref: "752f054b65c500adb9cad578bf183a978e012502" + ref: "21077186e6bf773ec8a7cd57ef149b2cee5daa7b" + resolved-ref: "21077186e6bf773ec8a7cd57ef149b2cee5daa7b" url: "https://github.com/cypherstack/tor.git" source: git version: "0.0.1" @@ -2241,26 +2250,26 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.3.2" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" + sha256: "81777b08c498a292d93ff2feead633174c386291e35612f8da438d6e92c4447e" url: "https://pub.dev" source: hosted - version: "6.3.14" + version: "6.3.20" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb" + sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7 url: "https://pub.dev" source: hosted - version: "6.3.3" + version: "6.3.4" url_launcher_linux: dependency: transitive description: @@ -2273,10 +2282,10 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f url: "https://pub.dev" source: hosted - version: "3.2.2" + version: "3.2.3" url_launcher_platform_interface: dependency: transitive description: @@ -2289,10 +2298,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" + sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" url_launcher_windows: dependency: transitive description: @@ -2313,10 +2322,10 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de" + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 url: "https://pub.dev" source: hosted - version: "1.1.18" + version: "1.1.19" vector_graphics_codec: dependency: transitive description: @@ -2329,18 +2338,18 @@ packages: dependency: transitive description: name: vector_graphics_compiler - sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" + sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc url: "https://pub.dev" source: hosted - version: "1.1.16" + version: "1.1.19" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" very_good_analysis: dependency: transitive description: @@ -2369,18 +2378,18 @@ packages: dependency: "direct main" description: name: wakelock_plus - sha256: b90fbcc8d7bdf3b883ea9706d9d76b9978cb1dfa4351fcc8014d6ec31a493354 + sha256: "61713aa82b7f85c21c9f4cd0a148abd75f38a74ec645fcb1e446f882c82fd09b" url: "https://pub.dev" source: hosted - version: "1.2.11" + version: "1.3.3" wakelock_plus_platform_interface: dependency: transitive description: name: wakelock_plus_platform_interface - sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a" + sha256: "036deb14cd62f558ca3b73006d52ce049fabcdcb2eddfe0bf0fe4e8a943b5cf2" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.3.0" wakelock_windows: dependency: "direct overridden" description: @@ -2410,10 +2419,10 @@ packages: dependency: transitive description: name: watcher - sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + sha256: "5bf046f41320ac97a469d506261797f35254fa61c641741ef32dacda98b7d39c" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.3" web: dependency: "direct overridden" description: @@ -2466,10 +2475,10 @@ packages: dependency: "direct overridden" description: name: win32 - sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e + sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03" url: "https://pub.dev" source: hosted - version: "5.10.1" + version: "5.14.0" win32_registry: dependency: transitive description: @@ -2507,9 +2516,9 @@ packages: dependency: "direct main" description: path: "." - ref: "v0.1.1" - resolved-ref: ee7a5756f5f403e6a371990c2817f38eb21a97b2 - url: "https://github.com/xelis-project/xelis-flutter-ffi.git" + ref: "5dd5c50713160fa15fb06ff44886ae035eed62fd" + resolved-ref: "5dd5c50713160fa15fb06ff44886ae035eed62fd" + url: "https://github.com/cypherstack/xelis-flutter-ffi.git" source: git version: "0.1.1" xml: @@ -2524,10 +2533,10 @@ packages: dependency: transitive description: name: xxh3 - sha256: cbeb0e1d10f4c6bf67b650f395eac0cc689425b5efc2ba0cc3d3e069a0beaeec + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" yaml: dependency: transitive description: @@ -2536,6 +2545,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.3" + yaml_writer: + dependency: transitive + description: + name: yaml_writer + sha256: "69651cd7238411179ac32079937d4aa9a2970150d6b2ae2c6fe6de09402a5dc5" + url: "https://pub.dev" + source: hosted + version: "2.1.0" zxcvbn: dependency: "direct main" description: @@ -2548,10 +2565,10 @@ packages: dependency: "direct main" description: name: zxing2 - sha256: "6cf995abd3c86f01ba882968dedffa7bc130185e382f2300239d2e857fc7912c" + sha256: "2677c49a3b9ca9457cb1d294fd4bd5041cac6aab8cdb07b216ba4e98945c684f" url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "0.2.4" sdks: - dart: ">=3.7.2 <4.0.0" - flutter: ">=3.29.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.29.0 <4.0.0" diff --git a/scripts/android/build_all.sh b/scripts/android/build_all.sh index d791b933b..dc904e95d 100755 --- a/scripts/android/build_all.sh +++ b/scripts/android/build_all.sh @@ -11,6 +11,7 @@ PLUGINS_DIR=../../crypto_plugins source ../rust_version.sh set_rust_version_for_libepiccash (cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/android && ./build_all.sh ) +(cd "${PLUGINS_DIR}"/flutter_libmwc/scripts/android && ./build_all.sh ) # set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else diff --git a/scripts/android/build_all_campfire.sh b/scripts/android/build_all_campfire.sh index d791b933b..fd10e418f 100755 --- a/scripts/android/build_all_campfire.sh +++ b/scripts/android/build_all_campfire.sh @@ -9,12 +9,7 @@ PLUGINS_DIR=../../crypto_plugins # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/android && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else -(cd "${PLUGINS_DIR}"/frostdart/scripts/android && ./build_all.sh ) - wait echo "Done building" diff --git a/scripts/android/build_all_duo.sh b/scripts/android/build_all_duo.sh index 39579d238..dcfc24427 100755 --- a/scripts/android/build_all_duo.sh +++ b/scripts/android/build_all_duo.sh @@ -9,11 +9,7 @@ mkdir -p build PLUGINS_DIR=../../crypto_plugins -# libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/android && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else (cd "${PLUGINS_DIR}"/frostdart/scripts/android && ./build_all.sh ) diff --git a/scripts/app_config/configure_campfire.sh b/scripts/app_config/configure_campfire.sh index 258058aae..04054b9ec 100755 --- a/scripts/app_config/configure_campfire.sh +++ b/scripts/app_config/configure_campfire.sh @@ -29,6 +29,20 @@ else sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}" fi +dart "${APP_PROJECT_ROOT_DIR}/tool/process_pubspec_deps.dart" \ + "${PUBSPEC_FILE}" \ + TOR \ + FIRO + +dart "${APP_PROJECT_ROOT_DIR}/tool/gen_interfaces.dart" \ + "${APP_PROJECT_ROOT_DIR}/tool/wl_templates" \ + "${APP_PROJECT_ROOT_DIR}/lib/wl_gen/generated" \ + TOR \ + FIRO + +export INCLUDE_EPIC_SO="OFF" +export INCLUDE_MWC_SO="OFF" + pushd "${APP_PROJECT_ROOT_DIR}" BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H") popd @@ -50,6 +64,7 @@ const _shortDescriptionText = "Your privacy. Your wallet. Your Firo."; const _commitHash = "$BUILT_COMMIT_HASH"; const Set _features = { + AppFeature.tor, AppFeature.swap }; diff --git a/scripts/app_config/configure_stack_duo.sh b/scripts/app_config/configure_stack_duo.sh index 4c871fff3..148775aa3 100755 --- a/scripts/app_config/configure_stack_duo.sh +++ b/scripts/app_config/configure_stack_duo.sh @@ -23,6 +23,22 @@ else sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}" fi +dart "${APP_PROJECT_ROOT_DIR}/tool/process_pubspec_deps.dart" \ + "${PUBSPEC_FILE}" \ + XMR \ + TOR \ + FROST + +dart "${APP_PROJECT_ROOT_DIR}/tool/gen_interfaces.dart" \ + "${APP_PROJECT_ROOT_DIR}/tool/wl_templates" \ + "${APP_PROJECT_ROOT_DIR}/lib/wl_gen/generated" \ + XMR \ + TOR \ + FROST + +export INCLUDE_EPIC_SO="OFF" +export INCLUDE_MWC_SO="OFF" + pushd "${APP_PROJECT_ROOT_DIR}" BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H") popd @@ -46,6 +62,7 @@ const _commitHash = "$BUILT_COMMIT_HASH"; const Set _features = { AppFeature.themeSelection, AppFeature.buy, + AppFeature.tor, AppFeature.swap }; diff --git a/scripts/app_config/configure_stack_wallet.sh b/scripts/app_config/configure_stack_wallet.sh index 5aa170a98..cbcead484 100755 --- a/scripts/app_config/configure_stack_wallet.sh +++ b/scripts/app_config/configure_stack_wallet.sh @@ -23,6 +23,34 @@ else sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}" fi +dart "${APP_PROJECT_ROOT_DIR}/tool/process_pubspec_deps.dart" \ + "${PUBSPEC_FILE}" \ + MWC \ + MWEBD \ + XMR \ + SAL \ + TOR \ + EPIC \ + FIRO \ + XEL \ + FROST + +dart "${APP_PROJECT_ROOT_DIR}/tool/gen_interfaces.dart" \ + "${APP_PROJECT_ROOT_DIR}/tool/wl_templates" \ + "${APP_PROJECT_ROOT_DIR}/lib/wl_gen/generated" \ + MWC \ + MWEBD \ + XMR \ + SAL \ + TOR \ + EPIC \ + FIRO \ + XEL \ + FROST + +export INCLUDE_EPIC_SO="ON" +export INCLUDE_MWC_SO="ON" + pushd "${APP_PROJECT_ROOT_DIR}" BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H") popd @@ -46,6 +74,7 @@ const _commitHash = "$BUILT_COMMIT_HASH"; const Set _features = { AppFeature.themeSelection, AppFeature.buy, + AppFeature.tor, AppFeature.swap }; @@ -62,6 +91,7 @@ final List _supportedCoins = List.unmodifiable([ Dogecoin(CryptoCurrencyNetwork.main), Ecash(CryptoCurrencyNetwork.main), Epiccash(CryptoCurrencyNetwork.main), + if (!Platform.isMacOS) Mimblewimblecoin(CryptoCurrencyNetwork.main), Ethereum(CryptoCurrencyNetwork.main), Fact0rn(CryptoCurrencyNetwork.main), Firo(CryptoCurrencyNetwork.main), @@ -85,6 +115,7 @@ final List _supportedCoins = List.unmodifiable([ Firo(CryptoCurrencyNetwork.test), Litecoin(CryptoCurrencyNetwork.test), Peercoin(CryptoCurrencyNetwork.test), + Salvium(CryptoCurrencyNetwork.test), Stellar(CryptoCurrencyNetwork.test), Xelis(CryptoCurrencyNetwork.test), ]); diff --git a/scripts/app_config/platforms/linux/platform_config.sh b/scripts/app_config/platforms/linux/platform_config.sh index 018f80def..61dfdfb8b 100755 --- a/scripts/app_config/platforms/linux/platform_config.sh +++ b/scripts/app_config/platforms/linux/platform_config.sh @@ -12,6 +12,8 @@ for (( i=0; i<=1; i++ )); do fi done -# Configure Linux for Duo. +# Configure Linux sed -i "s/${APP_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${LINUX_TF_0}" sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${LINUX_TF_1}" +sed -i "s/INCLUDE_EPIC_SO_FLAG/${INCLUDE_EPIC_SO}/g" "${APP_PROJECT_ROOT_DIR}/${LINUX_TF_0}" +sed -i "s/INCLUDE_MWC_SO_FLAG/${INCLUDE_MWC_SO}/g" "${APP_PROJECT_ROOT_DIR}/${LINUX_TF_0}" \ No newline at end of file diff --git a/scripts/app_config/platforms/windows/platform_config.sh b/scripts/app_config/platforms/windows/platform_config.sh index 4a0158c80..cbce1d810 100755 --- a/scripts/app_config/platforms/windows/platform_config.sh +++ b/scripts/app_config/platforms/windows/platform_config.sh @@ -12,7 +12,9 @@ for (( i=0; i<=2; i++ )); do fi done -# Configure Windows for Duo. +# Configure Windows sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${WIN_TF_0}" sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${WIN_TF_1}" sed -i "s/${APP_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${WIN_TF_2}" +sed -i "s/INCLUDE_EPIC_SO_FLAG/${INCLUDE_EPIC_SO}/g" "${APP_PROJECT_ROOT_DIR}/${WIN_TF_2}" +sed -i "s/INCLUDE_MWC_SO_FLAG/${INCLUDE_MWC_SO}/g" "${APP_PROJECT_ROOT_DIR}/${WIN_TF_2}" diff --git a/scripts/app_config/templates/configure_template_files.sh b/scripts/app_config/templates/configure_template_files.sh index 35cb26219..b4731683d 100755 --- a/scripts/app_config/templates/configure_template_files.sh +++ b/scripts/app_config/templates/configure_template_files.sh @@ -4,7 +4,7 @@ set -x -e export TEMPLATES_DIR="${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates" -export T_PUBSPEC="${TEMPLATES_DIR}/pubspec.template" +export T_PUBSPEC="${TEMPLATES_DIR}/pubspec.template.yaml" export ACTUAL_PUBSPEC="${APP_PROJECT_ROOT_DIR}/pubspec.yaml" export ANDROID_TF_0="android/app/build.gradle" diff --git a/scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj b/scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj index 300249f37..febbbb8af 100644 --- a/scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj +++ b/scripts/app_config/templates/ios/Runner.xcodeproj/project.pbxproj @@ -10,8 +10,6 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7E1603B5288D73EA002F7A6F /* libepic_cash_wallet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E8A4F06288D5A9300F18717 /* libepic_cash_wallet.a */; }; - 7E729AE82893C1B1009BBD65 /* flutter_libepiccash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E1603B3288D734C002F7A6F /* flutter_libepiccash.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -28,15 +26,6 @@ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7E1603B3288D734C002F7A6F /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F02288D57DE00F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F06288D5A9300F18717 /* libepic_cash_wallet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libepic_cash_wallet.a; path = ../crypto_plugins/flutter_libepiccash/ios/libs/libepic_cash_wallet.a; sourceTree = ""; }; - 7E8A4F09288D5E8F00F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F0D288D5F3900F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F10288D602C00F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F15288D645200F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F19288D721300F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7E8A4F1D288D72D100F18717 /* flutter_libepiccash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = flutter_libepiccash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -55,8 +44,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7E1603B5288D73EA002F7A6F /* libepic_cash_wallet.a in Frameworks */, - 7E729AE82893C1B1009BBD65 /* flutter_libepiccash.framework in Frameworks */, B49D91439948369648AB0603 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -77,15 +64,6 @@ 911C8C3F49E7889A970A9600 /* Frameworks */ = { isa = PBXGroup; children = ( - 7E1603B3288D734C002F7A6F /* flutter_libepiccash.framework */, - 7E8A4F1D288D72D100F18717 /* flutter_libepiccash.framework */, - 7E8A4F19288D721300F18717 /* flutter_libepiccash.framework */, - 7E8A4F15288D645200F18717 /* flutter_libepiccash.framework */, - 7E8A4F10288D602C00F18717 /* flutter_libepiccash.framework */, - 7E8A4F0D288D5F3900F18717 /* flutter_libepiccash.framework */, - 7E8A4F09288D5E8F00F18717 /* flutter_libepiccash.framework */, - 7E8A4F06288D5A9300F18717 /* libepic_cash_wallet.a */, - 7E8A4F02288D57DE00F18717 /* flutter_libepiccash.framework */, 51604430FD0FD1FA5C4767A0 /* Pods_Runner.framework */, ); name = Frameworks; @@ -493,7 +471,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/connectivity/connectivity.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/cryptography_flutter/cryptography_flutter.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale/devicelocale.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash/flutter_libepiccash.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libmonero/flutter_libmonero.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications/flutter_local_notifications.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_native_splash/flutter_native_splash.framework/Headers\"", @@ -508,7 +485,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup/stack_wallet_backup.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_ios/url_launcher_ios.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock/wakelock.framework/Headers\"", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/include", ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -519,7 +495,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; ONLY_ACTIVE_ARCH = NO; @@ -530,7 +505,6 @@ STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - SYSTEM_HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/linclude/\""; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = NO; VERSIONING_SYSTEM = "apple-generic"; @@ -673,7 +647,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/connectivity/connectivity.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/cryptography_flutter/cryptography_flutter.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale/devicelocale.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash/flutter_libepiccash.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libmonero/flutter_libmonero.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications/flutter_local_notifications.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_native_splash/flutter_native_splash.framework/Headers\"", @@ -688,7 +661,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup/stack_wallet_backup.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_ios/url_launcher_ios.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock/wakelock.framework/Headers\"", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/include", ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -699,7 +671,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; ONLY_ACTIVE_ARCH = NO; @@ -711,7 +682,6 @@ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - SYSTEM_HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/linclude/\""; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = NO; VERSIONING_SYSTEM = "apple-generic"; @@ -745,7 +715,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/connectivity/connectivity.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/cryptography_flutter/cryptography_flutter.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale/devicelocale.framework/Headers\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash/flutter_libepiccash.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libmonero/flutter_libmonero.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications/flutter_local_notifications.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_native_splash/flutter_native_splash.framework/Headers\"", @@ -760,7 +729,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup/stack_wallet_backup.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_ios/url_launcher_ios.framework/Headers\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock/wakelock.framework/Headers\"", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/include", ); INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -771,7 +739,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", - "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; ONLY_ACTIVE_ARCH = NO; @@ -782,7 +749,6 @@ STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - SYSTEM_HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/linclude/\""; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = NO; VERSIONING_SYSTEM = "apple-generic"; diff --git a/scripts/app_config/templates/linux/CMakeLists.txt b/scripts/app_config/templates/linux/CMakeLists.txt index 94d6e7f5e..4b0e69d62 100644 --- a/scripts/app_config/templates/linux/CMakeLists.txt +++ b/scripts/app_config/templates/linux/CMakeLists.txt @@ -9,6 +9,9 @@ set(BINARY_NAME "place_holder") # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.place.holder") +set(INCLUDE_EPIC_SO INCLUDE_EPIC_SO_FLAG) +set(INCLUDE_MWC_SO INCLUDE_EPIC_SO_FLAG) + # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. cmake_policy(SET CMP0063 NEW) @@ -134,8 +137,15 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/linux/build/rust/target/x86_64-unknown-linux-gnu/release/libepic_cash_wallet.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) +if(INCLUDE_EPIC_SO) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/linux/build/rust/target/x86_64-unknown-linux-gnu/release/libepic_cash_wallet.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +if(INCLUDE_MWC_SO) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libmwc/scripts/linux/build/rust/target/x86_64-unknown-linux-gnu/release/libmwc_wallet.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/linux/build/jsoncpp/build/src/lib_json/libjsoncpp.so.1.7.4" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) diff --git a/scripts/app_config/templates/macos/Runner.xcodeproj/project.pbxproj b/scripts/app_config/templates/macos/Runner.xcodeproj/project.pbxproj index c0fe37d8a..d6cb54f86 100644 --- a/scripts/app_config/templates/macos/Runner.xcodeproj/project.pbxproj +++ b/scripts/app_config/templates/macos/Runner.xcodeproj/project.pbxproj @@ -29,9 +29,6 @@ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; B98151842A674143009D013C /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B98151832A674143009D013C /* libsqlite3.0.tbd */; }; BFD0376C00E1FFD46376BB9D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9206484E84CB0AD93E3E68CA /* Pods_RunnerTests.framework */; }; - F1FA2C4E2BA4B49F00BDA1BB /* frostdart.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F1FA2C4D2BA4B49F00BDA1BB /* frostdart.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; - F1FA2C502BA4B4CA00BDA1BB /* frostdart.dylib in Resources */ = {isa = PBXBuildFile; fileRef = F1FA2C4F2BA4B4CA00BDA1BB /* frostdart.dylib */; }; - F1FA2C512BA4B51E00BDA1BB /* frostdart.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = F1FA2C4D2BA4B49F00BDA1BB /* frostdart.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; F653CA022D33E8B60E11A9F3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6036BF01BF05EA773C76D22 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -52,20 +49,6 @@ }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - F1FA2C512BA4B51E00BDA1BB /* frostdart.dylib in Bundle Framework */, - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 0FA914E59929120BA65E8403 /* 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 = ""; }; 174539D042E7AC2AB25A83EB /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; @@ -94,8 +77,6 @@ B98151832A674143009D013C /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; BF5E76865ACB46314AC27D8F /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; E6036BF01BF05EA773C76D22 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F1FA2C4D2BA4B49F00BDA1BB /* frostdart.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = frostdart.dylib; path = ../crypto_plugins/frostdart/macos/frostdart.dylib; sourceTree = ""; }; - F1FA2C4F2BA4B4CA00BDA1BB /* frostdart.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = frostdart.dylib; path = ../crypto_plugins/frostdart/macos/frostdart.dylib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -112,7 +93,6 @@ buildActionMask = 2147483647; files = ( B98151842A674143009D013C /* libsqlite3.0.tbd in Frameworks */, - F1FA2C4E2BA4B49F00BDA1BB /* frostdart.dylib in Frameworks */, F653CA022D33E8B60E11A9F3 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -142,7 +122,6 @@ 33CC10E42044A3C60003C045 = { isa = PBXGroup; children = ( - F1FA2C4F2BA4B4CA00BDA1BB /* frostdart.dylib */, 33FAB671232836740065AC1E /* Runner */, 33CEB47122A05771004F2AC0 /* Flutter */, 331C80D6294CF71000263BE5 /* RunnerTests */, @@ -199,7 +178,6 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - F1FA2C4D2BA4B49F00BDA1BB /* frostdart.dylib */, B98151832A674143009D013C /* libsqlite3.0.tbd */, E6036BF01BF05EA773C76D22 /* Pods_Runner.framework */, 9206484E84CB0AD93E3E68CA /* Pods_RunnerTests.framework */, @@ -328,7 +306,6 @@ files = ( 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - F1FA2C502BA4B4CA00BDA1BB /* frostdart.dylib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -585,6 +562,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + EXCLUDED_ARCHS = x86_64; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift\"", @@ -592,16 +570,13 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/desktop_drop\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/device_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_secure_storage_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/isar_flutter_libs\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/package_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/share_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock_macos\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/window_size\"", ); INFOPLIST_FILE = Runner/Info.plist; @@ -612,10 +587,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos/libs\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos\"", /usr/lib/swift, - "$(PATH)/crypto_plugins/frostdart/macos\n", ); PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; @@ -741,6 +713,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + EXCLUDED_ARCHS = x86_64; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift\"", @@ -748,16 +721,13 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/desktop_drop\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/device_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_secure_storage_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/isar_flutter_libs\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/package_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/share_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock_macos\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/window_size\"", ); INFOPLIST_FILE = Runner/Info.plist; @@ -768,10 +738,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos/libs\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos\"", /usr/lib/swift, - "$(PATH)/crypto_plugins/frostdart/macos\n", ); PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -788,6 +755,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + EXCLUDED_ARCHS = x86_64; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift\"", @@ -795,16 +763,13 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/desktop_drop\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/device_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/devicelocale\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_libepiccash\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_local_notifications\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/flutter_secure_storage_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/isar_flutter_libs\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/package_info_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/share_plus\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/stack_wallet_backup\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_macos\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/wakelock_macos\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/window_size\"", ); INFOPLIST_FILE = Runner/Info.plist; @@ -815,10 +780,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos/libs\"", - "\"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos\"", /usr/lib/swift, - "$(PATH)/crypto_plugins/frostdart/macos\n", ); PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; diff --git a/scripts/app_config/templates/pubspec.template b/scripts/app_config/templates/pubspec.template.yaml similarity index 81% rename from scripts/app_config/templates/pubspec.template rename to scripts/app_config/templates/pubspec.template.yaml index ef0f72984..564948796 100644 --- a/scripts/app_config/templates/pubspec.template +++ b/scripts/app_config/templates/pubspec.template.yaml @@ -14,7 +14,7 @@ description: PLACEHOLDER version: PLACEHOLDER_V+PLACEHOLDER_B environment: - sdk: ">=3.7.0 <4.0.0" + sdk: ">=3.9.0 <4.0.0" flutter: ^3.29.0 dependencies: @@ -24,28 +24,64 @@ dependencies: mutex: ^3.0.0 web_socket_channel: ^2.4.0 - frostdart: - path: ./crypto_plugins/frostdart +# %%ENABLE_FROST%% +# frostdart: +# path: ./crypto_plugins/frostdart +# %%END_ENABLE_FROST%% + +# %%ENABLE_XEL%% +# xelis_flutter: +# git: +# url: https://github.com/cypherstack/xelis-flutter-ffi.git +# ref: 5dd5c50713160fa15fb06ff44886ae035eed62fd +# %%END_ENABLE_XEL%% + +# %%ENABLE_FIRO%% +# flutter_libsparkmobile: +# git: +# url: https://github.com/cypherstack/flutter_libsparkmobile.git +# ref: 84a139a25ab1691762002fafcae351e3d444a5c7 +# %%END_ENABLE_FIRO%% + +# %%ENABLE_EPIC%% +# flutter_libepiccash: +# path: ./crypto_plugins/flutter_libepiccash +# %%END_ENABLE_EPIC%% + +# %%ENABLE_MWC%% +# flutter_libmwc: +# path: ./crypto_plugins/flutter_libmwc +# %%END_ENABLE_MWC%% + +# %%ENABLE_TOR%% +# tor_ffi_plugin: +# git: +# url: https://github.com/cypherstack/tor.git +# ref: 21077186e6bf773ec8a7cd57ef149b2cee5daa7b +# %%END_ENABLE_TOR%% + +# %%ENABLE_XMR%% +# cs_monero: 1.1.1 +# cs_monero_flutter_libs: 1.1.1 +# %%END_ENABLE_XMR%% + +# %%ENABLE_SAL%% +# cs_salvium: ^2.0.0 +# cs_salvium_flutter_libs: ^2.0.0 +# %%END_ENABLE_SAL%% + +# %%ENABLE_MWEBD%% +# flutter_mwebd: ^0.0.1-pre.8 +# %%END_ENABLE_MWEBD%% - xelis_flutter: - git: - url: https://github.com/xelis-project/xelis-flutter-ffi.git - ref: v0.1.1 - - flutter_libsparkmobile: - git: - url: https://github.com/cypherstack/flutter_libsparkmobile.git - ref: f5fd2238fca4ffe82f7e14646a613a04d2c243d6 + monero_rpc: ^2.0.0 # cs_monero compat (unpublished) compat: git: url: https://github.com/cypherstack/cs_monero path: compat - ref: b2b12cfeaf15d057ea18b14c196e04f3002de2da - - flutter_libepiccash: - path: ./crypto_plugins/flutter_libepiccash + ref: 44b8c0f8e1cc7ddbfa33c0b3f11279e64646138 bitcoindart: git: @@ -62,15 +98,10 @@ dependencies: url: https://github.com/cypherstack/bip47.git ref: a6e7941b98a43a613708b1a12564bc17e712cfc7 - tor_ffi_plugin: - git: - url: https://github.com/cypherstack/tor.git - ref: 752f054b65c500adb9cad578bf183a978e012502 - fusiondart: git: url: https://github.com/cypherstack/fusiondart.git - ref: afaad488f5215a9c2c211e5e2f8460237eef60f1 + ref: 540d0bc7dc27a97d45d63f412f26818a7f3b8b51 # Utility plugins http: ^0.13.0 @@ -107,8 +138,8 @@ dependencies: # Storage plugins flutter_secure_storage: ^8.0.0 - hive: ^2.0.5 - hive_flutter: ^1.1.0 + hive_ce: ^2.13.2 + hive_ce_flutter: ^2.3.2 path_provider: ^2.1.5 # UI/Component plugins @@ -145,12 +176,8 @@ dependencies: url: https://github.com/cypherstack/flutter_file_picker.git ref: b2849e63e1d418ad8d943c886cd3f4ed20d0ff23 connectivity_plus: ^4.0.1 - isar: - version: 3.1.8 - hosted: https://pub.isar-community.dev/ - isar_flutter_libs: # contains Isar Core - version: 3.1.8 - hosted: https://pub.isar-community.dev/ + isar_community: 3.3.0-dev.2 + isar_community_flutter_libs: 3.3.0-dev.2 dropdown_button2: ^2.1.3 string_validator: ^0.3.0 equatable: ^2.0.5 @@ -177,11 +204,11 @@ dependencies: git: url: https://www.github.com/julian-CStack/coinlib path: coinlib_flutter - ref: da1b3659e296660ac2b36f81d155d2362a2b3195 + ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 electrum_adapter: git: url: https://github.com/cypherstack/electrum_adapter.git - ref: f0b1300140d45c13e7722f8f8d20308efeba8449 + ref: 794ab2d7b88b34d64a89518f9b9f41dcc235aca1 stream_channel: ^2.1.0 solana: git: # TODO [prio=low]: Revert to official package once Tor support is merged upstream. @@ -189,9 +216,8 @@ dependencies: ref: dea799c20bc917f72b18c916ca96bc99fb1bd1c5 path: packages/solana calendar_date_picker2: ^1.0.2 - sqlite3: 2.4.5 - sqlite3_flutter_libs: 0.5.24 -# camera_linux: ^0.0.8 + sqlite3: 2.9.0 + sqlite3_flutter_libs: 0.5.25 camera_linux: git: url: https://github.com/cypherstack/camera-linux @@ -206,11 +232,7 @@ dependencies: blockchain_utils: ^3.3.0 on_chain: ^4.0.1 cbor: ^6.3.3 - cs_monero: 1.0.0-pre.3 - cs_monero_flutter_libs: 1.0.0-pre.0 - monero_rpc: ^2.0.0 digest_auth: ^1.0.1 -# logger: ^2.5.0 logger: git: url: https://github.com/cypherstack/logger @@ -219,12 +241,9 @@ dependencies: git: url: https://github.com/Cyrix126/namecoin_dart ref: 819b21164ef93cc0889049d4a8a1be2d0cc36a1b - drift: ^2.22.1 - drift_flutter: ^0.2.3 + drift: ^2.28.2 + drift_flutter: ^0.2.7 path: ^1.9.1 - cs_salvium: ^1.2.1 - cs_salvium_flutter_libs: ^1.0.4 - flutter_mwebd: ^0.0.1-pre.7 mweb_client: ^0.2.0 fixnum: ^1.1.1 @@ -233,21 +252,18 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter - build_runner: ^2.1.7 + build_runner: ^2.5.4 flutter_launcher_icons: ^0.13.1 - hive_generator: ^2.0.0 - dependency_validator: ^3.1.2 + hive_ce_generator: ^1.9.3 + dependency_validator: ^5.0.2 hive_test: ^1.0.1 - mockito: ^5.4.1 + mockito: ^5.4.6 mockingjay: ^0.2.0 -# lint: ^1.10.0 - analyzer: ^6.7.0 + analyzer: ^8.2.2 import_sorter: ^4.6.0 flutter_lints: ^3.0.1 - isar_generator: - version: 3.1.8 - hosted: https://pub.isar-community.dev/ - drift_dev: ^2.22.1 + isar_community_generator: 3.3.0-dev.2 + drift_dev: ^2.28.3 flutter_native_splash: image: assets/icon/splash.png @@ -271,13 +287,13 @@ dependency_overrides: git: url: https://www.github.com/julian-CStack/coinlib path: coinlib - ref: da1b3659e296660ac2b36f81d155d2362a2b3195 + ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 coinlib_flutter: git: url: https://www.github.com/julian-CStack/coinlib path: coinlib_flutter - ref: da1b3659e296660ac2b36f81d155d2362a2b3195 + ref: d212a8f974bf30be82ce486bf60d7135d80eb6a2 bip47: git: @@ -298,7 +314,7 @@ dependency_overrides: ref: 0cd6d54e2860bea68fc50c801cb9db2a760192fb crypto: 3.0.2 - analyzer: ^6.7.0 + analyzer: ^8.2.0 pinenacl: ^0.6.0 http: ^0.13.0 diff --git a/scripts/app_config/templates/windows/CMakeLists.txt b/scripts/app_config/templates/windows/CMakeLists.txt index 650a25d76..edc7b5a5b 100644 --- a/scripts/app_config/templates/windows/CMakeLists.txt +++ b/scripts/app_config/templates/windows/CMakeLists.txt @@ -6,6 +6,9 @@ project(place_holder LANGUAGES CXX) # the on-disk name of your application. set(BINARY_NAME "place_holder") +set(INCLUDE_EPIC_SO INCLUDE_EPIC_SO_FLAG) +set(INCLUDE_MWC_SO INCLUDE_EPIC_SO_FLAG) + # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. cmake_policy(SET CMP0063 NEW) @@ -80,8 +83,15 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) +if(INCLUDE_EPIC_SO) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +if(INCLUDE_MWC_SO) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libmwc/scripts/windows/build/libmwc_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" diff --git a/scripts/ios/build_all.sh b/scripts/ios/build_all.sh index b6f93e35f..83177db5c 100755 --- a/scripts/ios/build_all.sh +++ b/scripts/ios/build_all.sh @@ -14,6 +14,7 @@ rustup target add x86_64-apple-ios source ../rust_version.sh set_rust_version_for_libepiccash (cd ../../crypto_plugins/flutter_libepiccash/scripts/ios && ./build_all.sh ) +(cd ../../crypto_plugins/flutter_libmwc/scripts/ios/ && ./build_all.sh ) # set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else diff --git a/scripts/ios/build_all_campfire.sh b/scripts/ios/build_all_campfire.sh index b6f93e35f..994b68244 100755 --- a/scripts/ios/build_all_campfire.sh +++ b/scripts/ios/build_all_campfire.sh @@ -12,13 +12,8 @@ rustup target add x86_64-apple-ios # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/ios && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else -(cd ../../crypto_plugins/frostdart/scripts/ios && ./build_all.sh ) - wait echo "Done building" diff --git a/scripts/ios/build_all_duo.sh b/scripts/ios/build_all_duo.sh index ea00ed599..c09b3528f 100755 --- a/scripts/ios/build_all_duo.sh +++ b/scripts/ios/build_all_duo.sh @@ -14,9 +14,6 @@ rustup target add x86_64-apple-ios # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/ios && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else (cd ../../crypto_plugins/frostdart/scripts/ios && ./build_all.sh ) diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index a2e6c3d85..50490b197 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -13,6 +13,7 @@ mkdir -p build source ../rust_version.sh set_rust_version_for_libepiccash (cd ../../crypto_plugins/flutter_libepiccash/scripts/linux && ./build_all.sh ) +(cd ../../crypto_plugins/flutter_libmwc/scripts/linux && ./build_all.sh ) # set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else diff --git a/scripts/linux/build_all_campfire.sh b/scripts/linux/build_all_campfire.sh index a2e6c3d85..d1e1de71a 100755 --- a/scripts/linux/build_all_campfire.sh +++ b/scripts/linux/build_all_campfire.sh @@ -11,13 +11,8 @@ mkdir -p build # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/linux && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else -(cd ../../crypto_plugins/frostdart/scripts/linux && ./build_all.sh ) - ./build_secp256k1.sh wait diff --git a/scripts/linux/build_all_duo.sh b/scripts/linux/build_all_duo.sh index b9c18f6b2..3e2ee5b5b 100755 --- a/scripts/linux/build_all_duo.sh +++ b/scripts/linux/build_all_duo.sh @@ -14,9 +14,6 @@ mkdir -p build # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/linux && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else (cd ../../crypto_plugins/frostdart/scripts/linux && ./build_all.sh ) diff --git a/scripts/linux/build_secp256k1.sh b/scripts/linux/build_secp256k1.sh index 17bcd32c9..e139cc937 100755 --- a/scripts/linux/build_secp256k1.sh +++ b/scripts/linux/build_secp256k1.sh @@ -10,5 +10,5 @@ mkdir -p build && cd build cmake .. cmake --build . mkdir -p ../../../../../build -cp lib/libsecp256k1.so.2.2.2 "../../../../../build/libsecp256k1.so" +cp lib/libsecp256k1.so.2.*.* "../../../../../build/libsecp256k1.so" cd ../../../ \ No newline at end of file diff --git a/scripts/macos/build_all.sh b/scripts/macos/build_all.sh index 5cfed585f..de9b79efa 100755 --- a/scripts/macos/build_all.sh +++ b/scripts/macos/build_all.sh @@ -7,6 +7,7 @@ set -x -e source ../rust_version.sh set_rust_version_for_libepiccash (cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) +(cd ../../crypto_plugins/flutter_libmwc/scripts/macos && ./build_all.sh ) # set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else diff --git a/scripts/macos/build_all_campfire.sh b/scripts/macos/build_all_campfire.sh index e13ad106d..e1b4216bc 100755 --- a/scripts/macos/build_all_campfire.sh +++ b/scripts/macos/build_all_campfire.sh @@ -5,12 +5,7 @@ set -x -e # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else -(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh ) - wait echo "Done building" diff --git a/scripts/macos/build_all_duo.sh b/scripts/macos/build_all_duo.sh index a520cafc2..a618eeebb 100755 --- a/scripts/macos/build_all_duo.sh +++ b/scripts/macos/build_all_duo.sh @@ -7,9 +7,6 @@ set -x -e # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else (cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh ) diff --git a/scripts/rust_version.sh b/scripts/rust_version.sh index b894b7a5d..65bf911f4 100755 --- a/scripts/rust_version.sh +++ b/scripts/rust_version.sh @@ -18,4 +18,3 @@ set_rust_version_for_libepiccash() { exit 1 fi } - diff --git a/scripts/windows/build_all.sh b/scripts/windows/build_all.sh index 338394410..6d7395bbf 100755 --- a/scripts/windows/build_all.sh +++ b/scripts/windows/build_all.sh @@ -8,6 +8,7 @@ mkdir -p build source ../rust_version.sh set_rust_version_for_libepiccash (cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) +(cd ../../crypto_plugins/flutter_libmwc/scripts/windows && ./build_all.sh ) # set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else diff --git a/scripts/windows/build_all_campfire.sh b/scripts/windows/build_all_campfire.sh index 338394410..e74572b45 100755 --- a/scripts/windows/build_all_campfire.sh +++ b/scripts/windows/build_all_campfire.sh @@ -6,13 +6,8 @@ mkdir -p build # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else -(cd ../../crypto_plugins/frostdart/scripts/windows && ./build_all.sh ) - ./build_secp256k1_wsl.sh wait diff --git a/scripts/windows/build_all_duo.sh b/scripts/windows/build_all_duo.sh index e70eb145d..42ff340c3 100755 --- a/scripts/windows/build_all_duo.sh +++ b/scripts/windows/build_all_duo.sh @@ -8,9 +8,6 @@ mkdir -p build # libepiccash requires old rust source ../rust_version.sh -set_rust_version_for_libepiccash -(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) -# set rust (back) to a more recent stable release after building epiccash set_rust_to_everything_else (cd ../../crypto_plugins/frostdart/scripts/windows && ./build_all.sh ) diff --git a/scripts/windows/deps.sh b/scripts/windows/deps.sh index f68011a69..678670070 100644 --- a/scripts/windows/deps.sh +++ b/scripts/windows/deps.sh @@ -1,6 +1,7 @@ #!/bin/bash cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./deps.sh +(cd ../../crypto_plugins/flutter_libmwc/scripts/windows && ./deps.sh) sudo apt install libgtk2.0-dev wait diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index 22ab2a712..1da0fa70b 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/cached_electrumx_test.dart. // Do not manually edit this file. @@ -30,61 +30,38 @@ import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_i // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFusionInfo_4 extends _i1.SmartFake implements _i5.FusionInfo { - _FakeFusionInfo_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -96,85 +73,83 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i7.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i7.TorPlainNetworkOption.tor, - ) as _i7.TorPlainNetworkOption); + _i7.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i7.TorPlainNetworkOption.tor, + ) + as _i7.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i8.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i9.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future request({ @@ -185,19 +160,16 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> batchRequest({ @@ -207,59 +179,46 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i9.Future>.value([]), - ) as _i9.Future>); - - @override - _i9.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i9.Future>.value([]), + ) + as _i9.Future>); + + @override + _i9.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override _i9.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future broadcastTransaction({ @@ -267,26 +226,21 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i9.Future.value(_i8.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i9.Future); + }), + returnValue: _i9.Future.value( + _i8.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i9.Future); @override _i9.Future> getBalance({ @@ -294,17 +248,15 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future>> getHistory({ @@ -312,30 +264,27 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i9.Future>>.value( - >[]), - ) as _i9.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override - _i9.Future>>> getBatchHistory( - {required List? args}) => + _i9.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i9.Future>>>.value( - >>[]), - ) as _i9.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i9.Future>>>.value( + >>[], + ), + ) + as _i9.Future>>>); @override _i9.Future>> getUTXOs({ @@ -343,30 +292,27 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i9.Future>>.value( - >[]), - ) as _i9.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override - _i9.Future>>> getBatchUTXOs( - {required List? args}) => + _i9.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i9.Future>>>.value( - >>[]), - ) as _i9.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i9.Future>>>.value( + >>[], + ), + ) + as _i9.Future>>>); @override _i9.Future> getTransaction({ @@ -375,55 +321,45 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override - _i9.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + _i9.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> getLelantusUsedCoinSerials({ @@ -431,70 +367,61 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i9.Future.value(0), - ) as _i9.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i9.Future.value(0), + ) + as _i9.Future); @override _i9.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i9.Future.value(0), - ) as _i9.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i9.Future.value(0), + ) + as _i9.Future); @override _i9.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i9.Future>.value({}), + ) + as _i9.Future>); @override _i9.Future> getMempoolSparkData({ @@ -502,17 +429,15 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i9.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i9.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i9.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i9.Future>); @override _i9.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -520,77 +445,61 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i9.Future>>.value(>[]), - ) as _i9.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override - _i9.Future> getSparkNames( - {String? requestID}) => + _i9.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i9.Future>.value( - <({String address, String name})>[]), - ) as _i9.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i9.Future>.value( + <({String address, String name})>[], + ), + ) + as _i9.Future>); @override _i9.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i9.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i8.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i8.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i9.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i9.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i8.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i8.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i9.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i9.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -598,27 +507,21 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i9.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i9.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i9.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i9.Future<_i3.SparkAnonymitySetMeta>); @override _i9.Future> getSparkAnonymitySetBySector({ @@ -629,19 +532,16 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i9.Future>.value([]), - ) as _i9.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i9.Future>.value([]), + ) + as _i9.Future>); @override _i9.Future isMasterNodeCollateral({ @@ -650,29 +550,24 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override _i9.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future<_i4.Decimal> estimateFee({ @@ -680,43 +575,34 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i9.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i9.Future<_i4.Decimal>); + }), + returnValue: _i9.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i9.Future<_i4.Decimal>); @override - _i9.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i9.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i9.Future<_i4.Decimal>); + _i9.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i9.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i9.Future<_i4.Decimal>); } /// A class which mocks [Prefs]. @@ -728,425 +614,421 @@ class MockPrefs extends _i1.Mock implements _i10.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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i11.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i11.SyncingType.currentWalletOnly, + ) + as _i11.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i11.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i11.SyncingType.currentWalletOnly, - ) as _i11.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i11.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i12.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i12.BackupFrequencyType.everyTenMinutes, + ) + as _i12.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); + + @override + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + _i13.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i13.Level.all, + ) + as _i13.Level); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), - returnValueForMissingStub: null, - ); + set syncType(_i11.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - _i12.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i12.BackupFrequencyType.everyTenMinutes, - ) as _i12.BackupFrequencyType); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i12.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i12.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -1158,15 +1040,6 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -1177,262 +1050,179 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i13.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i13.Level.all, - ) as _i13.Level); + set logLevel(_i13.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i13.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i9.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + _i9.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override - _i9.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i14.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i14.AmountUnit.normal, - ) as _i14.AmountUnit); + _i14.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i14.AmountUnit.normal, + ) + as _i14.AmountUnit); @override void updateAmountUnit({ required _i2.CryptoCurrency? coin, required _i14.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i2.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i2.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i5.FusionInfo getFusionServerInfo(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_4( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i5.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_4( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i5.FusionInfo); @override void setFusionServerInfo( _i2.CryptoCurrency? coin, _i5.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/flutter_secure_storage_interface_test.mocks.dart b/test/flutter_secure_storage_interface_test.mocks.dart index e99c6b1a7..5d16aaa3e 100644 --- a/test/flutter_secure_storage_interface_test.mocks.dart +++ b/test/flutter_secure_storage_interface_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/flutter_secure_storage_interface_test.dart. // Do not manually edit this file. @@ -16,71 +16,43 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeIOSOptions_0 extends _i1.SmartFake implements _i2.IOSOptions { - _FakeIOSOptions_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIOSOptions_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeAndroidOptions_1 extends _i1.SmartFake implements _i2.AndroidOptions { - _FakeAndroidOptions_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAndroidOptions_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLinuxOptions_2 extends _i1.SmartFake implements _i2.LinuxOptions { - _FakeLinuxOptions_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLinuxOptions_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWindowsOptions_3 extends _i1.SmartFake implements _i2.WindowsOptions { - _FakeWindowsOptions_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWindowsOptions_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWebOptions_4 extends _i1.SmartFake implements _i2.WebOptions { - _FakeWebOptions_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWebOptions_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMacOsOptions_5 extends _i1.SmartFake implements _i2.MacOsOptions { - _FakeMacOsOptions_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMacOsOptions_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [FlutterSecureStorage]. @@ -93,58 +65,67 @@ class MockFlutterSecureStorage extends _i1.Mock } @override - _i2.IOSOptions get iOptions => (super.noSuchMethod( - Invocation.getter(#iOptions), - returnValue: _FakeIOSOptions_0( - this, - Invocation.getter(#iOptions), - ), - ) 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( - this, - Invocation.getter(#aOptions), - ), - ) 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( - this, - Invocation.getter(#lOptions), - ), - ) 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( - this, - Invocation.getter(#wOptions), - ), - ) 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( - this, - Invocation.getter(#webOptions), - ), - ) 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( - this, - Invocation.getter(#mOptions), - ), - ) 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 write({ @@ -158,23 +139,20 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #write, - [], - { - #key: key, - #value: value, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#write, [], { + #key: key, + #value: value, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); @override _i3.Future read({ @@ -187,21 +165,18 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #read, - [], - { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#read, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future.value(), + ) + as _i3.Future); @override _i3.Future containsKey({ @@ -214,21 +189,18 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [], - { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); + Invocation.method(#containsKey, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future.value(false), + ) + as _i3.Future); @override _i3.Future delete({ @@ -241,22 +213,19 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [], - { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#delete, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); @override _i3.Future> readAll({ @@ -268,20 +237,19 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #readAll, - [], - { - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future>.value({}), - ) as _i3.Future>); + Invocation.method(#readAll, [], { + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override _i3.Future deleteAll({ @@ -293,19 +261,16 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WindowsOptions? wOptions, }) => (super.noSuchMethod( - Invocation.method( - #deleteAll, - [], - { - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#deleteAll, [], { + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); } diff --git a/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart b/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart index cae7ca876..1def12c49 100644 --- a/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart +++ b/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stackwallet/models/lelantus_coin.dart'; diff --git a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart index 140c686d5..c6e9fd5c7 100644 --- a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart @@ -1,15 +1,17 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 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; +import 'dart:convert' as _i6; +import 'dart:typed_data' as _i5; -import 'package:hive/hive.dart' as _i3; -import 'package:hive/src/object/hive_object.dart' as _i1; +import 'package:hive_ce/src/binary/binary_reader.dart' as _i4; +import 'package:hive_ce/src/binary/binary_writer.dart' as _i8; +import 'package:hive_ce/src/object/hive_list.dart' as _i3; +import 'package:hive_ce/src/object/hive_object.dart' as _i1; import 'package:mockito/mockito.dart' as _i2; -import 'package:mockito/src/dummies.dart' as _i6; +import 'package:mockito/src/dummies.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -19,366 +21,259 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeHiveList_0 extends _i2.SmartFake implements _i3.HiveList { - _FakeHiveList_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHiveList_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BinaryReader]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { +class MockBinaryReader extends _i2.Mock implements _i4.BinaryReader { MockBinaryReader() { _i2.throwOnMissingStub(this); } @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, - ); + 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); + _i5.Uint8List viewBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#viewBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( - Invocation.method( - #peekBytes, - [bytes], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List peekBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#peekBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.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, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - ), - ) as String); + Invocation.method(#readString, [byteCount, decoder]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#readString, [byteCount, decoder]), + ), + ) + as String); @override - _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readByteList, - [length], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List readByteList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readByteList, [length]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - List readIntList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readIntList, - [length], - ), - returnValue: [], - ) as List); + List readIntList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readIntList, [length]), + returnValue: [], + ) + as List); @override - List readDoubleList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readDoubleList, - [length], - ), - returnValue: [], - ) as List); + List readDoubleList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readDoubleList, [length]), + returnValue: [], + ) + as List); @override - List readBoolList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readBoolList, - [length], - ), - returnValue: [], - ) as List); + List readBoolList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readBoolList, [length]), + returnValue: [], + ) + as List); @override List readStringList([ int? length, - _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readStringList, - [ - length, - decoder, - ], - ), - returnValue: [], - ) as List); + Invocation.method(#readStringList, [length, decoder]), + returnValue: [], + ) + as List); @override - List readList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readList, - [length], - ), - returnValue: [], - ) as List); + List readList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readList, [length]), + returnValue: [], + ) + as List); @override - Map readMap([int? length]) => (super.noSuchMethod( - Invocation.method( - #readMap, - [length], - ), - returnValue: {}, - ) as Map); + Map readMap([int? length]) => + (super.noSuchMethod( + Invocation.method(#readMap, [length]), + returnValue: {}, + ) + as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readHiveList, - [length], - ), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( - this, - Invocation.method( - #readHiveList, - [length], - ), - ), - ) as _i3.HiveList<_i1.HiveObjectMixin>); + Invocation.method(#readHiveList, [length]), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method(#readHiveList, [length]), + ), + ) + as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { +class MockBinaryWriter extends _i2.Mock implements _i8.BinaryWriter { MockBinaryWriter() { _i2.throwOnMissingStub(this); } @override void writeByte(int? byte) => super.noSuchMethod( - Invocation.method( - #writeByte, - [byte], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeByte, [byte]), + returnValueForMissingStub: null, + ); @override void writeWord(int? value) => super.noSuchMethod( - Invocation.method( - #writeWord, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeWord, [value]), + returnValueForMissingStub: null, + ); @override void writeInt32(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt32, [value]), + returnValueForMissingStub: null, + ); @override void writeUint32(int? value) => super.noSuchMethod( - Invocation.method( - #writeUint32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeUint32, [value]), + returnValueForMissingStub: null, + ); @override void writeInt(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt, [value]), + returnValueForMissingStub: null, + ); @override void writeDouble(double? value) => super.noSuchMethod( - Invocation.method( - #writeDouble, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeDouble, [value]), + returnValueForMissingStub: null, + ); @override void writeBool(bool? value) => super.noSuchMethod( - Invocation.method( - #writeBool, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeBool, [value]), + returnValueForMissingStub: null, + ); @override void writeString( String? value, { bool? writeByteCount = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeString, - [value], - { - #writeByteCount: writeByteCount, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeByteList( - List? bytes, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeString, + [value], + {#writeByteCount: writeByteCount, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeByteList(List? bytes, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeByteList, - [bytes], - {#writeLength: writeLength}, - ), + Invocation.method(#writeByteList, [bytes], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeIntList( - List? list, { - bool? writeLength = true, - }) => + void writeIntList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeIntList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeDoubleList( - List? list, { - bool? writeLength = true, - }) => + void writeDoubleList(List? list, {bool? writeLength = true}) => super.noSuchMethod( Invocation.method( #writeDoubleList, @@ -389,16 +284,9 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { ); @override - void writeBoolList( - List? list, { - bool? writeLength = true, - }) => + void writeBoolList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeBoolList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeBoolList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -406,45 +294,27 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeStringList( List? list, { bool? writeLength = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeStringList, - [list], - { - #writeLength: writeLength, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeList( - List? list, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeStringList, + [list], + {#writeLength: writeLength, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeMap( - Map? map, { - bool? writeLength = true, - }) => + void writeMap(Map? map, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeMap, - [map], - {#writeLength: writeLength}, - ), + Invocation.method(#writeMap, [map], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -452,27 +322,14 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeHiveList( _i3.HiveList<_i1.HiveObjectMixin>? list, { bool? writeLength = true, - }) => - super.noSuchMethod( - Invocation.method( - #writeHiveList, - [list], - {#writeLength: writeLength}, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#writeHiveList, [list], {#writeLength: writeLength}), + returnValueForMissingStub: null, + ); @override - void write( - T? value, { - bool? writeTypeId = true, - }) => - super.noSuchMethod( - Invocation.method( - #write, - [value], - {#writeTypeId: writeTypeId}, - ), - returnValueForMissingStub: null, - ); + void write(T? value, {bool? withTypeId = true}) => super.noSuchMethod( + Invocation.method(#write, [value], {#withTypeId: withTypeId}), + returnValueForMissingStub: null, + ); } diff --git a/test/models/type_adapter_tests/transactions_model_adapter_test.dart b/test/models/type_adapter_tests/transactions_model_adapter_test.dart index 265cdc159..e057b610c 100644 --- a/test/models/type_adapter_tests/transactions_model_adapter_test.dart +++ b/test/models/type_adapter_tests/transactions_model_adapter_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stackwallet/models/lelantus_coin.dart'; @@ -104,10 +104,7 @@ void main() { when(reader.readByte()).thenAnswer((_) => readByteResponses.removeAt(0)); - final List readResponses = [ - 3426523234, - [], - ]; + final List readResponses = [3426523234, []]; when(reader.read()).thenAnswer((_) => readResponses.removeAt(0)); @@ -214,10 +211,7 @@ void main() { 3794, 3794, 4, - [ - Input(txid: "abc", vout: 1), - Input(txid: "abc", vout: 1), - ], + [Input(txid: "abc", vout: 1), Input(txid: "abc", vout: 1)], [ Output(scriptpubkeyAddress: "adr", value: 1), Output(scriptpubkeyAddress: "adr", value: 1), diff --git a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart index ad9f995db..ec2772a7a 100644 --- a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart @@ -1,15 +1,17 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/models/type_adapter_tests/transactions_model_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; +import 'dart:convert' as _i6; +import 'dart:typed_data' as _i5; -import 'package:hive/hive.dart' as _i3; -import 'package:hive/src/object/hive_object.dart' as _i1; +import 'package:hive_ce/src/binary/binary_reader.dart' as _i4; +import 'package:hive_ce/src/binary/binary_writer.dart' as _i8; +import 'package:hive_ce/src/object/hive_list.dart' as _i3; +import 'package:hive_ce/src/object/hive_object.dart' as _i1; import 'package:mockito/mockito.dart' as _i2; -import 'package:mockito/src/dummies.dart' as _i6; +import 'package:mockito/src/dummies.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -19,366 +21,259 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeHiveList_0 extends _i2.SmartFake implements _i3.HiveList { - _FakeHiveList_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHiveList_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BinaryReader]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { +class MockBinaryReader extends _i2.Mock implements _i4.BinaryReader { MockBinaryReader() { _i2.throwOnMissingStub(this); } @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, - ); + 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); + _i5.Uint8List viewBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#viewBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( - Invocation.method( - #peekBytes, - [bytes], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List peekBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#peekBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.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, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - ), - ) as String); + Invocation.method(#readString, [byteCount, decoder]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#readString, [byteCount, decoder]), + ), + ) + as String); @override - _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readByteList, - [length], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List readByteList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readByteList, [length]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - List readIntList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readIntList, - [length], - ), - returnValue: [], - ) as List); + List readIntList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readIntList, [length]), + returnValue: [], + ) + as List); @override - List readDoubleList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readDoubleList, - [length], - ), - returnValue: [], - ) as List); + List readDoubleList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readDoubleList, [length]), + returnValue: [], + ) + as List); @override - List readBoolList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readBoolList, - [length], - ), - returnValue: [], - ) as List); + List readBoolList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readBoolList, [length]), + returnValue: [], + ) + as List); @override List readStringList([ int? length, - _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readStringList, - [ - length, - decoder, - ], - ), - returnValue: [], - ) as List); + Invocation.method(#readStringList, [length, decoder]), + returnValue: [], + ) + as List); @override - List readList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readList, - [length], - ), - returnValue: [], - ) as List); + List readList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readList, [length]), + returnValue: [], + ) + as List); @override - Map readMap([int? length]) => (super.noSuchMethod( - Invocation.method( - #readMap, - [length], - ), - returnValue: {}, - ) as Map); + Map readMap([int? length]) => + (super.noSuchMethod( + Invocation.method(#readMap, [length]), + returnValue: {}, + ) + as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readHiveList, - [length], - ), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( - this, - Invocation.method( - #readHiveList, - [length], - ), - ), - ) as _i3.HiveList<_i1.HiveObjectMixin>); + Invocation.method(#readHiveList, [length]), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method(#readHiveList, [length]), + ), + ) + as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { +class MockBinaryWriter extends _i2.Mock implements _i8.BinaryWriter { MockBinaryWriter() { _i2.throwOnMissingStub(this); } @override void writeByte(int? byte) => super.noSuchMethod( - Invocation.method( - #writeByte, - [byte], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeByte, [byte]), + returnValueForMissingStub: null, + ); @override void writeWord(int? value) => super.noSuchMethod( - Invocation.method( - #writeWord, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeWord, [value]), + returnValueForMissingStub: null, + ); @override void writeInt32(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt32, [value]), + returnValueForMissingStub: null, + ); @override void writeUint32(int? value) => super.noSuchMethod( - Invocation.method( - #writeUint32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeUint32, [value]), + returnValueForMissingStub: null, + ); @override void writeInt(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt, [value]), + returnValueForMissingStub: null, + ); @override void writeDouble(double? value) => super.noSuchMethod( - Invocation.method( - #writeDouble, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeDouble, [value]), + returnValueForMissingStub: null, + ); @override void writeBool(bool? value) => super.noSuchMethod( - Invocation.method( - #writeBool, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeBool, [value]), + returnValueForMissingStub: null, + ); @override void writeString( String? value, { bool? writeByteCount = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeString, - [value], - { - #writeByteCount: writeByteCount, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeByteList( - List? bytes, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeString, + [value], + {#writeByteCount: writeByteCount, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeByteList(List? bytes, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeByteList, - [bytes], - {#writeLength: writeLength}, - ), + Invocation.method(#writeByteList, [bytes], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeIntList( - List? list, { - bool? writeLength = true, - }) => + void writeIntList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeIntList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeDoubleList( - List? list, { - bool? writeLength = true, - }) => + void writeDoubleList(List? list, {bool? writeLength = true}) => super.noSuchMethod( Invocation.method( #writeDoubleList, @@ -389,16 +284,9 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { ); @override - void writeBoolList( - List? list, { - bool? writeLength = true, - }) => + void writeBoolList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeBoolList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeBoolList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -406,45 +294,27 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeStringList( List? list, { bool? writeLength = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeStringList, - [list], - { - #writeLength: writeLength, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeList( - List? list, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeStringList, + [list], + {#writeLength: writeLength, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeMap( - Map? map, { - bool? writeLength = true, - }) => + void writeMap(Map? map, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeMap, - [map], - {#writeLength: writeLength}, - ), + Invocation.method(#writeMap, [map], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -452,27 +322,14 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeHiveList( _i3.HiveList<_i1.HiveObjectMixin>? list, { bool? writeLength = true, - }) => - super.noSuchMethod( - Invocation.method( - #writeHiveList, - [list], - {#writeLength: writeLength}, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#writeHiveList, [list], {#writeLength: writeLength}), + returnValueForMissingStub: null, + ); @override - void write( - T? value, { - bool? writeTypeId = true, - }) => - super.noSuchMethod( - Invocation.method( - #write, - [value], - {#writeTypeId: writeTypeId}, - ), - returnValueForMissingStub: null, - ); + void write(T? value, {bool? withTypeId = true}) => super.noSuchMethod( + Invocation.method(#write, [value], {#withTypeId: withTypeId}), + returnValueForMissingStub: null, + ); } diff --git a/test/models/type_adapter_tests/utxo_model_adapter_test.dart b/test/models/type_adapter_tests/utxo_model_adapter_test.dart index 5849c61bd..a7789e1cf 100644 --- a/test/models/type_adapter_tests/utxo_model_adapter_test.dart +++ b/test/models/type_adapter_tests/utxo_model_adapter_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stackwallet/models/paymint/transactions_model.dart'; diff --git a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart index 983ffb136..294ae2d9f 100644 --- a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart @@ -1,15 +1,17 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/models/type_adapter_tests/utxo_model_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; +import 'dart:convert' as _i6; +import 'dart:typed_data' as _i5; -import 'package:hive/hive.dart' as _i3; -import 'package:hive/src/object/hive_object.dart' as _i1; +import 'package:hive_ce/src/binary/binary_reader.dart' as _i4; +import 'package:hive_ce/src/binary/binary_writer.dart' as _i8; +import 'package:hive_ce/src/object/hive_list.dart' as _i3; +import 'package:hive_ce/src/object/hive_object.dart' as _i1; import 'package:mockito/mockito.dart' as _i2; -import 'package:mockito/src/dummies.dart' as _i6; +import 'package:mockito/src/dummies.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -19,366 +21,259 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeHiveList_0 extends _i2.SmartFake implements _i3.HiveList { - _FakeHiveList_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHiveList_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BinaryReader]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { +class MockBinaryReader extends _i2.Mock implements _i4.BinaryReader { MockBinaryReader() { _i2.throwOnMissingStub(this); } @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, - ); + 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); + _i5.Uint8List viewBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#viewBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( - Invocation.method( - #peekBytes, - [bytes], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List peekBytes(int? bytes) => + (super.noSuchMethod( + Invocation.method(#peekBytes, [bytes]), + returnValue: _i5.Uint8List(0), + ) + as _i5.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, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #readString, - [ - byteCount, - decoder, - ], - ), - ), - ) as String); + Invocation.method(#readString, [byteCount, decoder]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#readString, [byteCount, decoder]), + ), + ) + as String); @override - _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readByteList, - [length], - ), - returnValue: _i4.Uint8List(0), - ) as _i4.Uint8List); + _i5.Uint8List readByteList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readByteList, [length]), + returnValue: _i5.Uint8List(0), + ) + as _i5.Uint8List); @override - List readIntList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readIntList, - [length], - ), - returnValue: [], - ) as List); + List readIntList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readIntList, [length]), + returnValue: [], + ) + as List); @override - List readDoubleList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readDoubleList, - [length], - ), - returnValue: [], - ) as List); + List readDoubleList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readDoubleList, [length]), + returnValue: [], + ) + as List); @override - List readBoolList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readBoolList, - [length], - ), - returnValue: [], - ) as List); + List readBoolList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readBoolList, [length]), + returnValue: [], + ) + as List); @override List readStringList([ int? length, - _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + _i6.Converter, String>? decoder = const _i6.Utf8Decoder(), ]) => (super.noSuchMethod( - Invocation.method( - #readStringList, - [ - length, - decoder, - ], - ), - returnValue: [], - ) as List); + Invocation.method(#readStringList, [length, decoder]), + returnValue: [], + ) + as List); @override - List readList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readList, - [length], - ), - returnValue: [], - ) as List); + List readList([int? length]) => + (super.noSuchMethod( + Invocation.method(#readList, [length]), + returnValue: [], + ) + as List); @override - Map readMap([int? length]) => (super.noSuchMethod( - Invocation.method( - #readMap, - [length], - ), - returnValue: {}, - ) as Map); + Map readMap([int? length]) => + (super.noSuchMethod( + Invocation.method(#readMap, [length]), + returnValue: {}, + ) + as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => (super.noSuchMethod( - Invocation.method( - #readHiveList, - [length], - ), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( - this, - Invocation.method( - #readHiveList, - [length], - ), - ), - ) as _i3.HiveList<_i1.HiveObjectMixin>); + Invocation.method(#readHiveList, [length]), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method(#readHiveList, [length]), + ), + ) + as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. /// /// See the documentation for Mockito's code generation for more information. -class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { +class MockBinaryWriter extends _i2.Mock implements _i8.BinaryWriter { MockBinaryWriter() { _i2.throwOnMissingStub(this); } @override void writeByte(int? byte) => super.noSuchMethod( - Invocation.method( - #writeByte, - [byte], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeByte, [byte]), + returnValueForMissingStub: null, + ); @override void writeWord(int? value) => super.noSuchMethod( - Invocation.method( - #writeWord, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeWord, [value]), + returnValueForMissingStub: null, + ); @override void writeInt32(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt32, [value]), + returnValueForMissingStub: null, + ); @override void writeUint32(int? value) => super.noSuchMethod( - Invocation.method( - #writeUint32, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeUint32, [value]), + returnValueForMissingStub: null, + ); @override void writeInt(int? value) => super.noSuchMethod( - Invocation.method( - #writeInt, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeInt, [value]), + returnValueForMissingStub: null, + ); @override void writeDouble(double? value) => super.noSuchMethod( - Invocation.method( - #writeDouble, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeDouble, [value]), + returnValueForMissingStub: null, + ); @override void writeBool(bool? value) => super.noSuchMethod( - Invocation.method( - #writeBool, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#writeBool, [value]), + returnValueForMissingStub: null, + ); @override void writeString( String? value, { bool? writeByteCount = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeString, - [value], - { - #writeByteCount: writeByteCount, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeByteList( - List? bytes, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeString, + [value], + {#writeByteCount: writeByteCount, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeByteList(List? bytes, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeByteList, - [bytes], - {#writeLength: writeLength}, - ), + Invocation.method(#writeByteList, [bytes], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeIntList( - List? list, { - bool? writeLength = true, - }) => + void writeIntList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeIntList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeDoubleList( - List? list, { - bool? writeLength = true, - }) => + void writeDoubleList(List? list, {bool? writeLength = true}) => super.noSuchMethod( Invocation.method( #writeDoubleList, @@ -389,16 +284,9 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { ); @override - void writeBoolList( - List? list, { - bool? writeLength = true, - }) => + void writeBoolList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeBoolList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeBoolList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -406,45 +294,27 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeStringList( List? list, { bool? writeLength = true, - _i5.Converter>? encoder = const _i5.Utf8Encoder(), - }) => - super.noSuchMethod( - Invocation.method( - #writeStringList, - [list], - { - #writeLength: writeLength, - #encoder: encoder, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeList( - List? list, { - bool? writeLength = true, - }) => + _i6.Converter>? encoder = const _i6.Utf8Encoder(), + }) => super.noSuchMethod( + Invocation.method( + #writeStringList, + [list], + {#writeLength: writeLength, #encoder: encoder}, + ), + returnValueForMissingStub: null, + ); + + @override + void writeList(List? list, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeList, - [list], - {#writeLength: writeLength}, - ), + Invocation.method(#writeList, [list], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @override - void writeMap( - Map? map, { - bool? writeLength = true, - }) => + void writeMap(Map? map, {bool? writeLength = true}) => super.noSuchMethod( - Invocation.method( - #writeMap, - [map], - {#writeLength: writeLength}, - ), + Invocation.method(#writeMap, [map], {#writeLength: writeLength}), returnValueForMissingStub: null, ); @@ -452,27 +322,14 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { void writeHiveList( _i3.HiveList<_i1.HiveObjectMixin>? list, { bool? writeLength = true, - }) => - super.noSuchMethod( - Invocation.method( - #writeHiveList, - [list], - {#writeLength: writeLength}, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#writeHiveList, [list], {#writeLength: writeLength}), + returnValueForMissingStub: null, + ); @override - void write( - T? value, { - bool? writeTypeId = true, - }) => - super.noSuchMethod( - Invocation.method( - #write, - [value], - {#writeTypeId: writeTypeId}, - ), - returnValueForMissingStub: null, - ); + void write(T? value, {bool? withTypeId = true}) => super.noSuchMethod( + Invocation.method(#write, [value], {#withTypeId: withTypeId}), + returnValueForMissingStub: null, + ); } diff --git a/test/notifications/notification_card_test.mocks.dart b/test/notifications/notification_card_test.mocks.dart index edff5e5f4..de2851e57 100644 --- a/test/notifications/notification_card_test.mocks.dart +++ b/test/notifications/notification_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/notifications/notification_card_test.dart. // Do not manually edit this file. @@ -7,9 +7,9 @@ import 'dart:async' as _i6; import 'dart:typed_data' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/isar/main_db.dart' as _i3; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; import 'package:stackwallet/models/isar/stack_theme.dart' as _i5; -import 'package:stackwallet/networking/http.dart' as _i2; +import 'package:stackwallet/networking/http.dart' as _i3; import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: type=lint @@ -20,29 +20,21 @@ import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member -class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP { - _FakeHTTP_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ThemeService]. @@ -54,118 +46,100 @@ class MockThemeService extends _i1.Mock implements _i4.ThemeService { } @override - _i2.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_0( - this, - Invocation.getter(#client), - ), - ) as _i2.HTTP); + _i2.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0(this, Invocation.getter(#db)), + ) + as _i2.MainDB); @override - set client(_i2.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i5.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i5.StackTheme>[], + ) + as List<_i5.StackTheme>); @override - List<_i5.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i5.StackTheme>[], - ) as List<_i5.StackTheme>); + set client(_i3.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override - void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i6.Future install({required _i7.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i6.Future>.value( - <_i4.StackThemeMetaData>[]), - ) as _i6.Future>); + _i6.Future> fetchThemes() => + (super.noSuchMethod( + Invocation.method(#fetchThemes, []), + returnValue: _i6.Future>.value( + <_i4.StackThemeMetaData>[], + ), + ) + as _i6.Future>); @override - _i6.Future<_i7.Uint8List> fetchTheme( - {required _i4.StackThemeMetaData? themeMetaData}) => + _i6.Future<_i7.Uint8List> fetchTheme({ + required _i4.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i6.Future<_i7.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) + as _i6.Future<_i7.Uint8List>); @override _i5.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i5.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i5.StackTheme?); } diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index 7ea2055fc..91fa2a84e 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/pages/send_view/send_view_test.dart. // Do not manually edit this file. @@ -39,71 +39,43 @@ import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_i // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_3 extends _i1.SmartFake implements _i6.SecureStorageInterface { - _FakeSecureStorageInterface_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_4 extends _i1.SmartFake implements _i7.HTTP { - _FakeHTTP_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFusionInfo_5 extends _i1.SmartFake implements _i8.FusionInfo { - _FakeFusionInfo_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -115,71 +87,60 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i10.Future deleteWallet( @@ -187,16 +148,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { _i6.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future load( @@ -205,17 +161,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future loadAfterStackRestore( @@ -224,17 +174,15 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } /// A class which mocks [NodeService]. @@ -246,41 +194,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { } @override - _i6.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_3( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i6.SecureStorageInterface); + _i6.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_3( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i6.SecureStorageInterface); @override - List<_i13.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i13.NodeModel>[], - ) as List<_i13.NodeModel>); + List<_i13.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i13.NodeModel>[], + ) + as List<_i13.NodeModel>); @override - List<_i13.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i13.NodeModel>[], - ) as List<_i13.NodeModel>); + List<_i13.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i13.NodeModel>[], + ) + as List<_i13.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setPrimaryNodeFor({ @@ -289,56 +241,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i13.NodeModel? getPrimaryNodeFor({required _i4.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i13.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i13.NodeModel?); @override List<_i13.NodeModel> getNodesFor(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i13.NodeModel>[], - ) as List<_i13.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i13.NodeModel>[], + ) + as List<_i13.NodeModel>); @override _i13.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i13.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i13.NodeModel?); @override - List<_i13.NodeModel> failoverNodesFor( - {required _i4.CryptoCurrency? currency}) => + List<_i13.NodeModel> failoverNodesFor({ + required _i4.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i13.NodeModel>[], - ) as List<_i13.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i13.NodeModel>[], + ) + as List<_i13.NodeModel>); @override _i10.Future save( @@ -347,34 +288,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i10.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setEnabledState( @@ -383,63 +310,48 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -451,66 +363,53 @@ class MockLocaleService extends _i1.Mock implements _i15.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ThemeService]. @@ -522,121 +421,102 @@ class MockThemeService extends _i1.Mock implements _i17.ThemeService { } @override - _i7.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_4( - this, - Invocation.getter(#client), - ), - ) as _i7.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i7.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i7.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_4(this, Invocation.getter(#client)), + ) + as _i7.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i18.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i18.StackTheme>[], + ) + as List<_i18.StackTheme>); @override - List<_i18.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i18.StackTheme>[], - ) as List<_i18.StackTheme>); + set client(_i7.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i10.Future install({required _i19.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i10.Future>.value( - <_i17.StackThemeMetaData>[]), - ) as _i10.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i10.Future>.value( + <_i17.StackThemeMetaData>[], + ), + ) + as _i10.Future>); @override - _i10.Future<_i19.Uint8List> fetchTheme( - {required _i17.StackThemeMetaData? themeMetaData}) => + _i10.Future<_i19.Uint8List> fetchTheme({ + required _i17.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i10.Future<_i19.Uint8List>.value(_i19.Uint8List(0)), - ) as _i10.Future<_i19.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i10.Future<_i19.Uint8List>.value(_i19.Uint8List(0)), + ) + as _i10.Future<_i19.Uint8List>); @override _i18.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i18.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i18.StackTheme?); } /// A class which mocks [Prefs]. @@ -648,425 +528,421 @@ class MockPrefs extends _i1.Mock implements _i12.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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i20.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i20.SyncingType.currentWalletOnly, + ) + as _i20.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i20.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i20.SyncingType.currentWalletOnly, - ) as _i20.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i20.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i21.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i21.BackupFrequencyType.everyTenMinutes, + ) + as _i21.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i16.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + _i22.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i22.Level.all, + ) + as _i22.Level); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), - returnValueForMissingStub: null, - ); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - _i21.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i21.BackupFrequencyType.everyTenMinutes, - ) as _i21.BackupFrequencyType); + set syncType(_i20.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i21.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); + + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i21.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -1078,15 +954,6 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i16.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -1097,262 +964,179 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i22.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i22.Level.all, - ) as _i22.Level); + set logLevel(_i22.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i22.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i23.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i23.AmountUnit.normal, - ) as _i23.AmountUnit); + _i23.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i23.AmountUnit.normal, + ) + as _i23.AmountUnit); @override void updateAmountUnit({ required _i4.CryptoCurrency? coin, required _i23.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i4.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i8.FusionInfo getFusionServerInfo(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_5( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i8.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_5( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i8.FusionInfo); @override void setFusionServerInfo( _i4.CryptoCurrency? coin, _i8.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/price_test.dart b/test/price_test.dart index 2a5b9c038..e7a8b401a 100644 --- a/test/price_test.dart +++ b/test/price_test.dart @@ -1,8 +1,10 @@ +// TODO MWC + import 'dart:convert'; import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:hive_test/hive_test.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; @@ -19,85 +21,94 @@ void main() { await Hive.openBox(DB.boxNamePriceCache); await Hive.openBox(DB.boxNamePrefs); await DB.instance.put( - boxName: DB.boxNamePrefs, key: "externalCalls", value: true); + boxName: DB.boxNamePrefs, + key: "externalCalls", + value: true, + ); }); test("getPricesAnd24hChange fetch", () async { final client = MockHTTP(); - when(client.get( + when( + client.get( proxyInfo: null, url: Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids" - "=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,bitcoin-cash" - ",namecoin,wownero,ethereum,particl,nano,banano,stellar,tezos,xelis" - "&order=market_cap_desc&per_page=50" - "&page=1&sparkline=false"), - headers: { - 'Content-Type': 'application/json' - })).thenAnswer((_) async => Response( + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids" + "=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,bitcoin-cash" + ",namecoin,wownero,ethereum,particl,nano,banano,stellar,tezos,xelis" + "&order=market_cap_desc&per_page=50" + "&page=1&sparkline=false", + ), + headers: {'Content-Type': 'application/json'}, + ), + ).thenAnswer( + (_) async => Response( utf8.encode( - '[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://asse' - 'ts.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","curr' - 'ent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_dil' - 'uted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"low' - '_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0.0,' - '"market_cap_change_24h":950.0,"market_cap_change_percentage_24h":0.0' - '0497,"circulating_supply":19128800.0,"total_supply":21000000.0,"max' - '_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32896' - ',"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_change_' - 'percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi":nul' - 'l,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","symb' - 'ol":"doge","name":"Dogecoin","image":"https://assets.coingecko.com/' - 'coins/images/5/large/dogecoin.png?1547792256","current_price":3.15e' - '-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_valuati' - 'on":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.13e-0' - '6,"price_change_24h":-8.6889947714e-08,"price_change_percentage_24h' - '":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_cap_c' - 'hange_percentage_24h":-2.64879,"circulating_supply":132670764299.89' - '4,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_change' - '_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","atl":' - '1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"2020-12-' - '17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:15.11' - '3Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"https:/' - '/assets.coingecko.com/coins/images/69/large/monero_logo.png?1547033' - '729","current_price":0.00717236,"market_cap":130002,"market_cap_ran' - 'k":29,"fully_diluted_valuation":null,"total_volume":4901,"high_24h":' - '0.00731999,"low_24h":0.00707511,"price_change_24h":-5.6133543212467' - 'e-05,"price_change_percentage_24h":-0.77656,"market_cap_change_24h"' - ':-1007.8447677436197,"market_cap_change_percentage_24h":-0.76929,"c' - 'irculating_supply":18147820.3764146,"total_supply":null,"max_supply' - '":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"ath_date' - '":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_percentag' - 'e":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":null,"las' - 't_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo' - '","name":"Firo","image":"https://assets.coingecko.com/coins/images/' - '479/large/firocoingecko.png?1636537544","current_price":0.0001096,"' - 'market_cap":1252,"market_cap_rank":604,"fully_diluted_valuation":234' - '9,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,' - '"price_change_24h":-9.87561775002e-07,"price_change_percentage_24h' - '":-0.89304,"market_cap_change_24h":-10.046635178462793,"market_cap_' - 'change_percentage_24h":-0.79578,"circulating_supply":11411043.83546' - '97,"total_supply":21400000.0,"max_supply":21400000.0,"ath":0.016162' - '72,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.' - '408Z","atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"' - '2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16' - ':38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",' - '"image":"https://assets.coingecko.com/coins/images/9520/large/Epic_C' - 'oin_NO_drop_shadow.png?1620122642","current_price":2.803e-05,"marke' - 't_cap":415.109,"market_cap_rank":953,"fully_diluted_valuation":null' - ',"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":2.581e-05' - ',"price_change_24h":1.9e-06,"price_change_percentage_24h":7.27524,"' - 'market_cap_change_24h":28.26753,"market_cap_change_percentage_24h":' - '7.30726,"circulating_supply":14808052.0,"total_supply":21000000.0,"' - 'max_supply":null,"ath":0.00013848,"ath_change_percentage":-79.75864' - ',"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-07,"atl_chang' - 'e_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01.177Z","roi' - '":null,"last_updated":"2022-08-22T16:38:32.826Z"},{"id":"xelis","sy' - 'mbol":"xel","name":"Xelis","image":"https://assets.coingecko.com/co' - 'ins/images/37615/large/green_background_black_logo.png","current_pr' - 'ice":0.00001234,"price_change_percentage_24h":5.67}]'), - 200)); + '[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://asse' + 'ts.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","curr' + 'ent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_dil' + 'uted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"low' + '_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0.0,' + '"market_cap_change_24h":950.0,"market_cap_change_percentage_24h":0.0' + '0497,"circulating_supply":19128800.0,"total_supply":21000000.0,"max' + '_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32896' + ',"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_change_' + 'percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi":nul' + 'l,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","symb' + 'ol":"doge","name":"Dogecoin","image":"https://assets.coingecko.com/' + 'coins/images/5/large/dogecoin.png?1547792256","current_price":3.15e' + '-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_valuati' + 'on":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.13e-0' + '6,"price_change_24h":-8.6889947714e-08,"price_change_percentage_24h' + '":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_cap_c' + 'hange_percentage_24h":-2.64879,"circulating_supply":132670764299.89' + '4,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_change' + '_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","atl":' + '1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"2020-12-' + '17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:15.11' + '3Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"https:/' + '/assets.coingecko.com/coins/images/69/large/monero_logo.png?1547033' + '729","current_price":0.00717236,"market_cap":130002,"market_cap_ran' + 'k":29,"fully_diluted_valuation":null,"total_volume":4901,"high_24h":' + '0.00731999,"low_24h":0.00707511,"price_change_24h":-5.6133543212467' + 'e-05,"price_change_percentage_24h":-0.77656,"market_cap_change_24h"' + ':-1007.8447677436197,"market_cap_change_percentage_24h":-0.76929,"c' + 'irculating_supply":18147820.3764146,"total_supply":null,"max_supply' + '":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"ath_date' + '":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_percentag' + 'e":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":null,"las' + 't_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo' + '","name":"Firo","image":"https://assets.coingecko.com/coins/images/' + '479/large/firocoingecko.png?1636537544","current_price":0.0001096,"' + 'market_cap":1252,"market_cap_rank":604,"fully_diluted_valuation":234' + '9,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,' + '"price_change_24h":-9.87561775002e-07,"price_change_percentage_24h' + '":-0.89304,"market_cap_change_24h":-10.046635178462793,"market_cap_' + 'change_percentage_24h":-0.79578,"circulating_supply":11411043.83546' + '97,"total_supply":21400000.0,"max_supply":21400000.0,"ath":0.016162' + '72,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.' + '408Z","atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"' + '2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16' + ':38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",' + '"image":"https://assets.coingecko.com/coins/images/9520/large/Epic_C' + 'oin_NO_drop_shadow.png?1620122642","current_price":2.803e-05,"marke' + 't_cap":415.109,"market_cap_rank":953,"fully_diluted_valuation":null' + ',"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":2.581e-05' + ',"price_change_24h":1.9e-06,"price_change_percentage_24h":7.27524,"' + 'market_cap_change_24h":28.26753,"market_cap_change_percentage_24h":' + '7.30726,"circulating_supply":14808052.0,"total_supply":21000000.0,"' + 'max_supply":null,"ath":0.00013848,"ath_change_percentage":-79.75864' + ',"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-07,"atl_chang' + 'e_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01.177Z","roi' + '":null,"last_updated":"2022-08-22T16:38:32.826Z"},{"id":"xelis","sy' + 'mbol":"xel","name":"Xelis","image":"https://assets.coingecko.com/co' + 'ins/images/37615/large/green_background_black_logo.png","current_pr' + 'ice":0.00001234,"price_change_percentage_24h":5.67}]', + ), + 200, + ), + ); final priceAPI = PriceAPI(client); priceAPI.resetLastCalledToForceNextCallToUpdateCache(); @@ -132,7 +143,8 @@ void main() { 'Coin.xelis: [0.00001234, 5.67]' '}', ); - verify(client.get( + verify( + client.get( proxyInfo: null, url: Uri.parse( "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc" @@ -141,7 +153,9 @@ void main() { ",tezos,xelis" "&order=market_cap_desc&per_page=50&page=1&sparkline=false", ), - headers: {'Content-Type': 'application/json'})).called(1); + headers: {'Content-Type': 'application/json'}, + ), + ).called(1); verifyNoMoreInteractions(client); }); @@ -149,79 +163,85 @@ void main() { test("cached price fetch", () async { final client = MockHTTP(); - when(client.get( + when( + client.get( proxyInfo: null, url: Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&" - "ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," - "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" - ",tezos,xelis" - "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), - headers: { - 'Content-Type': 'application/json' - })).thenAnswer((_) async => Response( + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&" + "ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" + ",tezos,xelis" + "&order=market_cap_desc&per_page=50&page=1&sparkline=false", + ), + headers: {'Content-Type': 'application/json'}, + ), + ).thenAnswer( + (_) async => Response( utf8.encode( - '[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://a' - 'ssets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","c' - 'urrent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_' - 'diluted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"' - 'low_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0' - '.0,"market_cap_change_24h":950.0,"market_cap_change_percentage_24h"' - ':0.00497,"circulating_supply":19128800.0,"total_supply":21000000.0,"' - 'max_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32' - '896,"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_cha' - 'nge_percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi"' - ':null,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","' - 'symbol":"doge","name":"Dogecoin","image":"https://assets.coingecko.' - 'com/coins/images/5/large/dogecoin.png?1547792256","current_price":3' - '.15e-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_val' - 'uation":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.1' - '3e-06,"price_change_24h":-8.6889947714e-08,"price_change_percentage' - '_24h":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_' - 'cap_change_percentage_24h":-2.64879,"circulating_supply":1326707642' - '99.894,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_c' - 'hange_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","' - 'atl":1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"202' - '0-12-17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:' - '15.113Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"ht' - 'tps://assets.coingecko.com/coins/images/69/large/monero_logo.png?15' - '47033729","current_price":0.00717236,"market_cap":130002,"market_cap' - '_rank":29,"fully_diluted_valuation":null,"total_volume":4901,"high' - '_24h":0.00731999,"low_24h":0.00707511,"price_change_24h":-5.613354' - '3212467e-05,"price_change_percentage_24h":-0.77656,"market_cap_chan' - 'ge_24h":-1007.8447677436197,"market_cap_change_percentage_24h":-0.7' - '6929,"circulating_supply":18147820.3764146,"total_supply":null,"ma' - 'x_supply":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"' - 'ath_date":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_' - 'percentage":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":n' - 'ull,"last_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbo' - 'l":"firo","name":"Firo","image":"https://assets.coingecko.com/coins' - '/images/479/large/firocoingecko.png?1636537544","current_price":0.0' - '001096,"market_cap":1252,"market_cap_rank":604,"fully_diluted_valu' - 'ation":2349,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0' - '.00010834,"price_change_24h":-9.87561775002e-07,"price_change_perce' - 'ntage_24h":-0.89304,"market_cap_change_24h":-10.046635178462793,"ma' - 'rket_cap_change_percentage_24h":-0.79578,"circulating_supply":11411' - '043.8354697,"total_supply":21400000.0,"max_supply":21400000.0,"ath"' - ':0.01616272,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04' - 'T16:04:48.408Z","atl":4.268e-05,"atl_change_percentage":157.22799,' - '"atl_date":"2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2' - '022-08-22T16:38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"' - 'Epic Cash","image":"https://assets.coingecko.com/coins/images/9520/' - 'large/Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.80' - '3e-05,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_val' - 'uation":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h' - '":2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24' - 'h":7.27524,"market_cap_change_24h":28.26753,"market_cap_change_perc' - 'entage_24h":7.30726,"circulating_supply":14808052.0,"total_supply":' - '21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_percentag' - 'e":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-0' - '7,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01' - '.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"},{"id":' - '"xelis","symbol":"xel","name":"Xelis","image":"https://assets.coing' - 'ecko.com/coins/images/37615/large/green_background_black_logo.png",' - '"current_price":0.00001234,"price_change_percentage_24h":5.67}]'), - 200)); + '[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://a' + 'ssets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","c' + 'urrent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_' + 'diluted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"' + 'low_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0' + '.0,"market_cap_change_24h":950.0,"market_cap_change_percentage_24h"' + ':0.00497,"circulating_supply":19128800.0,"total_supply":21000000.0,"' + 'max_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32' + '896,"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_cha' + 'nge_percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi"' + ':null,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","' + 'symbol":"doge","name":"Dogecoin","image":"https://assets.coingecko.' + 'com/coins/images/5/large/dogecoin.png?1547792256","current_price":3' + '.15e-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_val' + 'uation":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.1' + '3e-06,"price_change_24h":-8.6889947714e-08,"price_change_percentage' + '_24h":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_' + 'cap_change_percentage_24h":-2.64879,"circulating_supply":1326707642' + '99.894,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_c' + 'hange_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","' + 'atl":1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"202' + '0-12-17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:' + '15.113Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"ht' + 'tps://assets.coingecko.com/coins/images/69/large/monero_logo.png?15' + '47033729","current_price":0.00717236,"market_cap":130002,"market_cap' + '_rank":29,"fully_diluted_valuation":null,"total_volume":4901,"high' + '_24h":0.00731999,"low_24h":0.00707511,"price_change_24h":-5.613354' + '3212467e-05,"price_change_percentage_24h":-0.77656,"market_cap_chan' + 'ge_24h":-1007.8447677436197,"market_cap_change_percentage_24h":-0.7' + '6929,"circulating_supply":18147820.3764146,"total_supply":null,"ma' + 'x_supply":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"' + 'ath_date":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_' + 'percentage":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":n' + 'ull,"last_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbo' + 'l":"firo","name":"Firo","image":"https://assets.coingecko.com/coins' + '/images/479/large/firocoingecko.png?1636537544","current_price":0.0' + '001096,"market_cap":1252,"market_cap_rank":604,"fully_diluted_valu' + 'ation":2349,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0' + '.00010834,"price_change_24h":-9.87561775002e-07,"price_change_perce' + 'ntage_24h":-0.89304,"market_cap_change_24h":-10.046635178462793,"ma' + 'rket_cap_change_percentage_24h":-0.79578,"circulating_supply":11411' + '043.8354697,"total_supply":21400000.0,"max_supply":21400000.0,"ath"' + ':0.01616272,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04' + 'T16:04:48.408Z","atl":4.268e-05,"atl_change_percentage":157.22799,' + '"atl_date":"2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2' + '022-08-22T16:38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"' + 'Epic Cash","image":"https://assets.coingecko.com/coins/images/9520/' + 'large/Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.80' + '3e-05,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_val' + 'uation":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h' + '":2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24' + 'h":7.27524,"market_cap_change_24h":28.26753,"market_cap_change_perc' + 'entage_24h":7.30726,"circulating_supply":14808052.0,"total_supply":' + '21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_percentag' + 'e":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-0' + '7,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01' + '.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"},{"id":' + '"xelis","symbol":"xel","name":"Xelis","image":"https://assets.coing' + 'ecko.com/coins/images/37615/large/green_background_black_logo.png",' + '"current_price":0.00001234,"price_change_percentage_24h":5.67}]', + ), + 200, + ), + ); final priceAPI = PriceAPI(client); priceAPI.resetLastCalledToForceNextCallToUpdateCache(); @@ -230,8 +250,9 @@ void main() { await priceAPI.getPricesAnd24hChange(baseCurrency: "btc"); // now this time it should grab from cache instead of http.get - final cachedPrice = - await priceAPI.getPricesAnd24hChange(baseCurrency: "btc"); + final cachedPrice = await priceAPI.getPricesAnd24hChange( + baseCurrency: "btc", + ); expect( cachedPrice.toString(), @@ -260,15 +281,19 @@ void main() { ); // verify only called once during filling of cache - verify(client.get( + verify( + client.get( proxyInfo: null, url: Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids" - "=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," - "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" - ",tezos,xelis" - "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), - headers: {'Content-Type': 'application/json'})).called(1); + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids" + "=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" + ",tezos,xelis" + "&order=market_cap_desc&per_page=50&page=1&sparkline=false", + ), + headers: {'Content-Type': 'application/json'}, + ), + ).called(1); verifyNoMoreInteractions(client); }); @@ -276,79 +301,85 @@ void main() { test("response parse failure", () async { final client = MockHTTP(); - when(client.get( + when( + client.get( proxyInfo: null, url: Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc" - "&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," - "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" - ",tezos,xelis" - "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), - headers: { - 'Content-Type': 'application/json' - })).thenAnswer((_) async => Response( + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc" + "&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" + ",tezos,xelis" + "&order=market_cap_desc&per_page=50&page=1&sparkline=false", + ), + headers: {'Content-Type': 'application/json'}, + ), + ).thenAnswer( + (_) async => Response( utf8.encode( - '[{"id":"bitcoin","symbol":"btc","name":com/coins/images/1/large/' - 'bitcoin.png?1547033579","current_price":1.0,"market_cap":19128800' - ',"market_cap_rank":1,"fully_diluted_valuation":21000000,"total_volum' - 'e":1272132,"high_24h":1.0,"low_24h":1.0,"price_change_24h":0.0,"pri' - 'ce_change_percentage_24h":0.0,"market_cap_change_24h":950.0,"market_' - 'cap_change_percentage_24h":0.00497,"circulating_supply":19128800.0,"t' - 'otal_supply":21000000.0,"max_supply":21000000.0,"ath":1.003301,"ath' - '_change_percentage":-0.32896,"ath_date":"2019-10-15T16:00:56.136Z",' - '"atl":0.99895134,"atl_change_percentage":0.10498,"atl_date":' - '"2019-10-21T00:00:00.000Z","roi":null,' - '"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin"' - ',"symbol":"doge","name":"Dogecoin","image":' - '"https://assets.coingecko.com/coins/images/5/large/dogecoin.png?1547792256",' - '"current_price":3.15e-06,"market_cap":417916,"market_cap_rank":10' - ',"fully_diluted_valuation":null,"total_volume":27498,"high_24h":3' - '.26e-06,"low_24h":3.13e-06,"price_change_24h":-8.6889947714e-08,"' - 'price_change_percentage_24h":-2.68533,"market_cap_change_24h":-11' - '370.894861206936,"market_cap_change_percentage_24h":-2.64879,"cir' - 'culating_supply":132670764299.894,"total_supply":null,"max_supply' - '":null,"ath":1.264e-05,"ath_change_percentage":-75.05046,"ath_date' - '":"2021-05-07T23:04:53.026Z","atl":1.50936e-07,"atl_change_percen' - 'tage":1989.69346,"atl_date":"2020-12-17T09:18:05.654Z","roi":null,' - '"last_updated":"2022-08-22T16:38:15.113Z"},{"id":"monero","symbol"' - ':"xmr","name":"Monero","image":"https://assets.coingecko.com/coins' - '/images/69/large/monero_logo.png?1547033729","current_price":0.007' - '17236,"market_cap":130002,"market_cap_rank":29,"fully_diluted_valu' - 'ation":null,"total_volume":4901,"high_24h":0.00731999,"low_24h":0.' - '00707511,"price_change_24h":-5.6133543212467e-05,"price_change_per' - 'centage_24h":-0.77656,"market_cap_change_24h":-1007.8447677436197' - ',"market_cap_change_percentage_24h":-0.76929,"circulating_supply":' - '18147820.3764146,"total_supply":null,"max_supply":null,"ath":0.034' - '75393,"ath_change_percentage":-79.32037,"ath_date":"2018-01-09T00:' - '00:00.000Z","atl":0.00101492,"atl_change_percentage":608.13327,"at' - 'l_date":"2014-12-18T00:00:00.000Z","roi":null,"last_updated":"2022' - '-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo","name":"Firo"' - ',"image":"https://assets.coingecko.com/coins/images/479/large/firo' - 'coingecko.png?1636537544","current_price":0.0001096,"market_cap":1' - '252,"market_cap_rank":604,"fully_diluted_valuation":2349,"total_vo' - 'lume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,"price_chang' - 'e_24h":-9.87561775002e-07,"price_change_percentage_24h":-0.89304,' - '"market_cap_change_24h":-10.046635178462793,"market_cap_change_per' - 'centage_24h":-0.79578,"circulating_supply":11411043.8354697,"tota' - 'l_supply":21400000.0,"max_supply":21400000.0,"ath":0.01616272,"ath' - '_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.408Z"' - ',"atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"202' - '2-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16:3' - '8:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",' - '"image":"https://assets.coingecko.com/coins/images/9520/large/' - 'Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.803e-0' - '5,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_valuat' - 'ion":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":' - '2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24h"' - ':7.27524,"market_cap_change_24h":28.26753,"market_cap_change_per' - 'centage_24h":7.30726,"circulating_supply":14808052.0,"total_suppl' - 'y":21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_perce' - 'ntage":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74' - '028e-07,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T' - '16:55:01.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"' - '},{"id":"xelis","symbol":xel,"name":com/coins/images/37615/large/g' - 'reen_background_black_logo.png,"image":"https://assets.coingecko'), - 200)); + '[{"id":"bitcoin","symbol":"btc","name":com/coins/images/1/large/' + 'bitcoin.png?1547033579","current_price":1.0,"market_cap":19128800' + ',"market_cap_rank":1,"fully_diluted_valuation":21000000,"total_volum' + 'e":1272132,"high_24h":1.0,"low_24h":1.0,"price_change_24h":0.0,"pri' + 'ce_change_percentage_24h":0.0,"market_cap_change_24h":950.0,"market_' + 'cap_change_percentage_24h":0.00497,"circulating_supply":19128800.0,"t' + 'otal_supply":21000000.0,"max_supply":21000000.0,"ath":1.003301,"ath' + '_change_percentage":-0.32896,"ath_date":"2019-10-15T16:00:56.136Z",' + '"atl":0.99895134,"atl_change_percentage":0.10498,"atl_date":' + '"2019-10-21T00:00:00.000Z","roi":null,' + '"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin"' + ',"symbol":"doge","name":"Dogecoin","image":' + '"https://assets.coingecko.com/coins/images/5/large/dogecoin.png?1547792256",' + '"current_price":3.15e-06,"market_cap":417916,"market_cap_rank":10' + ',"fully_diluted_valuation":null,"total_volume":27498,"high_24h":3' + '.26e-06,"low_24h":3.13e-06,"price_change_24h":-8.6889947714e-08,"' + 'price_change_percentage_24h":-2.68533,"market_cap_change_24h":-11' + '370.894861206936,"market_cap_change_percentage_24h":-2.64879,"cir' + 'culating_supply":132670764299.894,"total_supply":null,"max_supply' + '":null,"ath":1.264e-05,"ath_change_percentage":-75.05046,"ath_date' + '":"2021-05-07T23:04:53.026Z","atl":1.50936e-07,"atl_change_percen' + 'tage":1989.69346,"atl_date":"2020-12-17T09:18:05.654Z","roi":null,' + '"last_updated":"2022-08-22T16:38:15.113Z"},{"id":"monero","symbol"' + ':"xmr","name":"Monero","image":"https://assets.coingecko.com/coins' + '/images/69/large/monero_logo.png?1547033729","current_price":0.007' + '17236,"market_cap":130002,"market_cap_rank":29,"fully_diluted_valu' + 'ation":null,"total_volume":4901,"high_24h":0.00731999,"low_24h":0.' + '00707511,"price_change_24h":-5.6133543212467e-05,"price_change_per' + 'centage_24h":-0.77656,"market_cap_change_24h":-1007.8447677436197' + ',"market_cap_change_percentage_24h":-0.76929,"circulating_supply":' + '18147820.3764146,"total_supply":null,"max_supply":null,"ath":0.034' + '75393,"ath_change_percentage":-79.32037,"ath_date":"2018-01-09T00:' + '00:00.000Z","atl":0.00101492,"atl_change_percentage":608.13327,"at' + 'l_date":"2014-12-18T00:00:00.000Z","roi":null,"last_updated":"2022' + '-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo","name":"Firo"' + ',"image":"https://assets.coingecko.com/coins/images/479/large/firo' + 'coingecko.png?1636537544","current_price":0.0001096,"market_cap":1' + '252,"market_cap_rank":604,"fully_diluted_valuation":2349,"total_vo' + 'lume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,"price_chang' + 'e_24h":-9.87561775002e-07,"price_change_percentage_24h":-0.89304,' + '"market_cap_change_24h":-10.046635178462793,"market_cap_change_per' + 'centage_24h":-0.79578,"circulating_supply":11411043.8354697,"tota' + 'l_supply":21400000.0,"max_supply":21400000.0,"ath":0.01616272,"ath' + '_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.408Z"' + ',"atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"202' + '2-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16:3' + '8:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",' + '"image":"https://assets.coingecko.com/coins/images/9520/large/' + 'Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.803e-0' + '5,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_valuat' + 'ion":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":' + '2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24h"' + ':7.27524,"market_cap_change_24h":28.26753,"market_cap_change_per' + 'centage_24h":7.30726,"circulating_supply":14808052.0,"total_suppl' + 'y":21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_perce' + 'ntage":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74' + '028e-07,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T' + '16:55:01.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"' + '},{"id":"xelis","symbol":xel,"name":com/coins/images/37615/large/g' + 'reen_background_black_logo.png,"image":"https://assets.coingecko', + ), + 200, + ), + ); final priceAPI = PriceAPI(client); priceAPI.resetLastCalledToForceNextCallToUpdateCache(); @@ -387,18 +418,23 @@ void main() { test("no internet available", () async { final client = MockHTTP(); - when(client.get( + when( + client.get( proxyInfo: null, url: Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc" - "&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," - "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" - ",tezos,xelis" - "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), - headers: { - 'Content-Type': 'application/json' - })).thenThrow(const SocketException( - "Failed host lookup: 'api.com' (OS Error: Temporary failure in name resolution, errno = -3)")); + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc" + "&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar" + ",tezos,xelis" + "&order=market_cap_desc&per_page=50&page=1&sparkline=false", + ), + headers: {'Content-Type': 'application/json'}, + ), + ).thenThrow( + const SocketException( + "Failed host lookup: 'api.com' (OS Error: Temporary failure in name resolution, errno = -3)", + ), + ); final priceAPI = PriceAPI(client); priceAPI.resetLastCalledToForceNextCallToUpdateCache(); diff --git a/test/price_test.mocks.dart b/test/price_test.mocks.dart index 3689ebb89..36619fe9c 100644 --- a/test/price_test.mocks.dart +++ b/test/price_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/price_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/networking/http.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [HTTP]. @@ -48,28 +45,23 @@ class MockHTTP extends _i1.Mock implements _i2.HTTP { required ({_i4.InternetAddress host, int port})? proxyInfo, }) => (super.noSuchMethod( - Invocation.method( - #get, - [], - { - #url: url, - #headers: headers, - #proxyInfo: proxyInfo, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [], - { + Invocation.method(#get, [], { #url: url, #headers: headers, #proxyInfo: proxyInfo, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + }), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [], { + #url: url, + #headers: headers, + #proxyInfo: proxyInfo, + }), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post({ @@ -80,30 +72,25 @@ class MockHTTP extends _i1.Mock implements _i2.HTTP { required ({_i4.InternetAddress host, int port})? proxyInfo, }) => (super.noSuchMethod( - Invocation.method( - #post, - [], - { - #url: url, - #headers: headers, - #body: body, - #encoding: encoding, - #proxyInfo: proxyInfo, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [], - { + Invocation.method(#post, [], { #url: url, #headers: headers, #body: body, #encoding: encoding, #proxyInfo: proxyInfo, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + }), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#post, [], { + #url: url, + #headers: headers, + #body: body, + #encoding: encoding, + #proxyInfo: proxyInfo, + }), + ), + ), + ) + as _i3.Future<_i2.Response>); } diff --git a/test/sample_data/theme_json.dart b/test/sample_data/theme_json.dart index 6f7601b42..660e680e6 100644 --- a/test/sample_data/theme_json.dart +++ b/test/sample_data/theme_json.dart @@ -10,6 +10,7 @@ const Map lightThemeJsonMap = { "firo": "0xFFFF897A", "dogecoin": "0xFFFFE079", "epicCash": "0xFFC5C7CB", + "mimblewimblecoin": "0xFFC5C7CB", "ethereum": "0xFFA7ADE9", "monero": "0xFFFF9E6B", "namecoin": "0xFF91B1E1", @@ -186,6 +187,7 @@ const Map lightThemeJsonMap = { "bitcoincash": "dummy.svg", "dogecoin": "dummy.svg", "epicCash": "dummy.svg", + "mimblewimblecoin": "dummy.svg", "ethereum": "dummy.svg", "firo": "dummy.svg", "monero": "dummy.svg", @@ -197,6 +199,7 @@ const Map lightThemeJsonMap = { "bitcoincash_image": "dummy.svg", "dogecoin_image": "dummy.svg", "epicCash_image": "dummy.svg.svg", + "mimblewimblecoin_image": "dummy.svg", "ethereum_image": "dummy.svg", "firo_image": "dummy.svg", "monero_image": "dummy.svg", @@ -208,6 +211,7 @@ const Map lightThemeJsonMap = { "bitcoincash_image_secondary": "dummy.svg", "dogecoin_image_secondary": "dummy.svg", "epicCash_image_secondary": "dummy.svg.svg", + "mimblewimblecoin_image_secondary": "dummy.svg", "ethereum_image_secondary": "dummy.svg", "firo_image_secondary": "dummy.svg", "monero_image_secondary": "dummy.svg", diff --git a/test/sample_data/theme_json_v2.dart b/test/sample_data/theme_json_v2.dart index 3f9fbfb7f..1327789c0 100644 --- a/test/sample_data/theme_json_v2.dart +++ b/test/sample_data/theme_json_v2.dart @@ -13,6 +13,7 @@ const Map lightThemeJsonMap = { "dogecoin": "0xFFFFE079", "eCash": "0xFFC5C7CB", "epicCash": "0xFFC5C7CB", + "mimblewimblecoin": "0xFFC5C7CB", "ethereum": "0xFFA7ADE9", "monero": "0xFFFF9E6B", "namecoin": "0xFF91B1E1", @@ -194,6 +195,7 @@ const Map lightThemeJsonMap = { "dogecoin": "dummy.svg", "eCash": "dummy.svg", "epicCash": "dummy.svg", + "mimblewimblecoin": "dummy.svg", "ethereum": "dummy.svg", "firo": "dummy.svg", "monero": "dummy.svg", @@ -208,6 +210,7 @@ const Map lightThemeJsonMap = { "dogecoin": "dummy.svg", "eCash": "dummy.svg", "epicCash": "dummy.svg", + "mimblewimblecoin": "dummy.svg", "ethereum": "dummy.svg", "firo": "dummy.svg", "monero": "dummy.svg", @@ -222,6 +225,7 @@ const Map lightThemeJsonMap = { "dogecoin": "dummy.svg", "eCash": "dummy.svg", "epicCash": "dummy.svg", + "mimblewimblecoin": "dummy.svg", "ethereum": "dummy.svg", "firo": "dummy.svg", "monero": "dummy.svg", diff --git a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart index dbbc39497..b2bc32886 100644 --- a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/address_book_view/address_book_view_screen_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/services/address_book_service.dart' as _i3; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -43,121 +40,93 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + bool matches(String? term, _i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + _i4.Future addContact(_i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart index 192ce703a..95bb1f441 100644 --- a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.dart. // Do not manually edit this file. @@ -20,29 +20,21 @@ import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { - _FakeScanResult_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeScanResult_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeContactEntry_1 extends _i1.SmartFake implements _i3.ContactEntry { - _FakeContactEntry_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BarcodeScannerWrapper]. @@ -57,20 +49,15 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i4.Future<_i2.ScanResult> scan({required _i5.BuildContext? context}) => (super.noSuchMethod( - Invocation.method( - #scan, - [], - {#context: context}, - ), - returnValue: _i4.Future<_i2.ScanResult>.value(_FakeScanResult_0( - this, - Invocation.method( - #scan, - [], - {#context: context}, - ), - )), - ) as _i4.Future<_i2.ScanResult>); + Invocation.method(#scan, [], {#context: context}), + returnValue: _i4.Future<_i2.ScanResult>.value( + _FakeScanResult_0( + this, + Invocation.method(#scan, [], {#context: context}), + ), + ), + ) + as _i4.Future<_i2.ScanResult>); } /// A class which mocks [AddressBookService]. @@ -83,121 +70,93 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i3.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i3.ContactEntry>[], - ) as List<_i3.ContactEntry>); + List<_i3.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i3.ContactEntry>[], + ) + as List<_i3.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i3.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_1( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i3.ContactEntry); + _i3.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_1( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i3.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i3.ContactEntry>[]), - ) as _i4.Future>); + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i3.ContactEntry>[], + ), + ) + as _i4.Future>); @override - bool matches( - String? term, - _i3.ContactEntry? contact, - ) => + bool matches(String? term, _i3.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); @override - _i4.Future addContact(_i3.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + _i4.Future addContact(_i3.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i3.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart index b2f02c854..1e299205b 100644 --- a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.dart. // Do not manually edit this file. @@ -20,19 +20,16 @@ import 'package:stackwallet/services/locale_service.dart' as _i6; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -45,123 +42,95 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); - - @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); + + @override + bool matches(String? term, _i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); + + @override + _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); - - @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -173,64 +142,51 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart index 2c93e063c..bab7cfe2c 100644 --- a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/services/address_book_service.dart' as _i3; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -43,121 +40,93 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + bool matches(String? term, _i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + _i4.Future addContact(_i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/exchange/exchange_view_test.mocks.dart b/test/screen_tests/exchange/exchange_view_test.mocks.dart index 643d6cc6b..f27f33274 100644 --- a/test/screen_tests/exchange/exchange_view_test.mocks.dart +++ b/test/screen_tests/exchange/exchange_view_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/exchange/exchange_view_test.dart. // Do not manually edit this file. @@ -44,40 +44,27 @@ import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_i // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeFusionInfo_0 extends _i1.SmartFake implements _i2.FusionInfo { - _FakeFusionInfo_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { - _FakeHTTP_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExchangeResponse_2 extends _i1.SmartFake implements _i4.ExchangeResponse { - _FakeExchangeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExchangeResponse_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Prefs]. @@ -89,425 +76,421 @@ 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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i6.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i6.SyncingType.currentWalletOnly, + ) + as _i6.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i6.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i6.SyncingType.currentWalletOnly, - ) as _i6.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i6.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i8.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i8.BackupFrequencyType.everyTenMinutes, + ) + as _i8.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + _i9.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i9.Level.all, + ) + as _i9.Level); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), - returnValueForMissingStub: null, - ); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - _i8.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i8.BackupFrequencyType.everyTenMinutes, - ) as _i8.BackupFrequencyType); + set syncType(_i6.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i8.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); + + @override + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i8.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -519,15 +502,6 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -538,264 +512,181 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i9.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i9.Level.all, - ) as _i9.Level); + set logLevel(_i9.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i9.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i11.AmountUnit amountUnit(_i12.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i11.AmountUnit.normal, - ) as _i11.AmountUnit); + _i11.AmountUnit amountUnit(_i12.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i11.AmountUnit.normal, + ) + as _i11.AmountUnit); @override void updateAmountUnit({ required _i12.CryptoCurrency? coin, required _i11.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i12.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i12.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i12.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i2.FusionInfo getFusionServerInfo(_i12.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_0( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i2.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_0( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i2.FusionInfo); @override void setFusionServerInfo( _i12.CryptoCurrency? coin, _i2.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [TradesService]. @@ -807,22 +698,21 @@ class MockTradesService extends _i1.Mock implements _i14.TradesService { } @override - List<_i15.Trade> get trades => (super.noSuchMethod( - Invocation.getter(#trades), - returnValue: <_i15.Trade>[], - ) as List<_i15.Trade>); + List<_i15.Trade> get trades => + (super.noSuchMethod( + Invocation.getter(#trades), + returnValue: <_i15.Trade>[], + ) + as List<_i15.Trade>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i15.Trade? get(String? tradeId) => (super.noSuchMethod(Invocation.method( - #get, - [tradeId], - )) as _i15.Trade?); + _i15.Trade? get(String? tradeId) => + (super.noSuchMethod(Invocation.method(#get, [tradeId])) as _i15.Trade?); @override _i10.Future add({ @@ -830,17 +720,14 @@ class MockTradesService extends _i1.Mock implements _i14.TradesService { required bool? shouldNotifyListeners, }) => (super.noSuchMethod( - Invocation.method( - #add, - [], - { - #trade: trade, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#add, [], { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future edit({ @@ -848,17 +735,14 @@ class MockTradesService extends _i1.Mock implements _i14.TradesService { required bool? shouldNotifyListeners, }) => (super.noSuchMethod( - Invocation.method( - #edit, - [], - { - #trade: trade, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#edit, [], { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future delete({ @@ -866,17 +750,14 @@ class MockTradesService extends _i1.Mock implements _i14.TradesService { required bool? shouldNotifyListeners, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [], - { - #trade: trade, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#delete, [], { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future deleteByUuid({ @@ -884,53 +765,38 @@ class MockTradesService extends _i1.Mock implements _i14.TradesService { required bool? shouldNotifyListeners, }) => (super.noSuchMethod( - Invocation.method( - #deleteByUuid, - [], - { - #uuid: uuid, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteByUuid, [], { + #uuid: uuid, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [TradeNotesService]. @@ -942,98 +808,70 @@ class MockTradeNotesService extends _i1.Mock implements _i16.TradeNotesService { } @override - Map get all => (super.noSuchMethod( - Invocation.getter(#all), - returnValue: {}, - ) as Map); + Map get all => + (super.noSuchMethod( + Invocation.getter(#all), + returnValue: {}, + ) + as Map); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - String getNote({required String? tradeId}) => (super.noSuchMethod( - Invocation.method( - #getNote, - [], - {#tradeId: tradeId}, - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #getNote, - [], - {#tradeId: tradeId}, - ), - ), - ) as String); + String getNote({required String? tradeId}) => + (super.noSuchMethod( + Invocation.method(#getNote, [], {#tradeId: tradeId}), + returnValue: _i7.dummyValue( + this, + Invocation.method(#getNote, [], {#tradeId: tradeId}), + ), + ) + as String); @override - _i10.Future set({ - required String? tradeId, - required String? note, - }) => + _i10.Future set({required String? tradeId, required String? note}) => (super.noSuchMethod( - Invocation.method( - #set, - [], - { - #tradeId: tradeId, - #note: note, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#set, [], {#tradeId: tradeId, #note: note}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future delete({required String? tradeId}) => (super.noSuchMethod( - Invocation.method( - #delete, - [], - {#tradeId: tradeId}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future delete({required String? tradeId}) => + (super.noSuchMethod( + Invocation.method(#delete, [], {#tradeId: tradeId}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ChangeNowAPI]. @@ -1045,52 +883,45 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { } @override - _i3.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_1( - this, - Invocation.getter(#client), - ), - ) as _i3.HTTP); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override _i10.Future<_i4.ExchangeResponse>> - getAvailableCurrencies({ + getAvailableCurrencies({ bool? active, bool? buy, bool? sell, _i17.CNFlow? flow = _i17.CNFlow.standard, String? apiKey, }) => - (super.noSuchMethod( - Invocation.method( - #getAvailableCurrencies, - [], - { - #active: active, - #buy: buy, - #sell: sell, - #flow: flow, - #apiKey: apiKey, - }, - ), + (super.noSuchMethod( + Invocation.method(#getAvailableCurrencies, [], { + #active: active, + #buy: buy, + #sell: sell, + #flow: flow, + #apiKey: apiKey, + }), returnValue: _i10.Future<_i4.ExchangeResponse>>.value( - _FakeExchangeResponse_2>( - this, - Invocation.method( - #getAvailableCurrencies, - [], - { - #active: active, - #buy: buy, - #sell: sell, - #flow: flow, - #apiKey: apiKey, - }, - ), - )), - ) as _i10.Future<_i4.ExchangeResponse>>); + _FakeExchangeResponse_2>( + this, + Invocation.method(#getAvailableCurrencies, [], { + #active: active, + #buy: buy, + #sell: sell, + #flow: flow, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future<_i4.ExchangeResponse>>); @override _i10.Future<_i4.ExchangeResponse<_i19.Decimal>> getMinimalExchangeAmount({ @@ -1102,35 +933,29 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { String? apiKey, }) => (super.noSuchMethod( - Invocation.method( - #getMinimalExchangeAmount, - [], - { - #fromCurrency: fromCurrency, - #toCurrency: toCurrency, - #fromNetwork: fromNetwork, - #toNetwork: toNetwork, - #flow: flow, - #apiKey: apiKey, - }, - ), - returnValue: _i10.Future<_i4.ExchangeResponse<_i19.Decimal>>.value( - _FakeExchangeResponse_2<_i19.Decimal>( - this, - Invocation.method( - #getMinimalExchangeAmount, - [], - { + Invocation.method(#getMinimalExchangeAmount, [], { #fromCurrency: fromCurrency, #toCurrency: toCurrency, #fromNetwork: fromNetwork, #toNetwork: toNetwork, #flow: flow, #apiKey: apiKey, - }, - ), - )), - ) as _i10.Future<_i4.ExchangeResponse<_i19.Decimal>>); + }), + returnValue: _i10.Future<_i4.ExchangeResponse<_i19.Decimal>>.value( + _FakeExchangeResponse_2<_i19.Decimal>( + this, + Invocation.method(#getMinimalExchangeAmount, [], { + #fromCurrency: fromCurrency, + #toCurrency: toCurrency, + #fromNetwork: fromNetwork, + #toNetwork: toNetwork, + #flow: flow, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future<_i4.ExchangeResponse<_i19.Decimal>>); @override _i10.Future<_i4.ExchangeResponse<_i20.Range>> getRange({ @@ -1142,35 +967,29 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { String? apiKey, }) => (super.noSuchMethod( - Invocation.method( - #getRange, - [], - { - #fromCurrency: fromCurrency, - #toCurrency: toCurrency, - #fromNetwork: fromNetwork, - #toNetwork: toNetwork, - #flow: flow, - #apiKey: apiKey, - }, - ), - returnValue: _i10.Future<_i4.ExchangeResponse<_i20.Range>>.value( - _FakeExchangeResponse_2<_i20.Range>( - this, - Invocation.method( - #getRange, - [], - { + Invocation.method(#getRange, [], { #fromCurrency: fromCurrency, #toCurrency: toCurrency, #fromNetwork: fromNetwork, #toNetwork: toNetwork, #flow: flow, #apiKey: apiKey, - }, - ), - )), - ) as _i10.Future<_i4.ExchangeResponse<_i20.Range>>); + }), + returnValue: _i10.Future<_i4.ExchangeResponse<_i20.Range>>.value( + _FakeExchangeResponse_2<_i20.Range>( + this, + Invocation.method(#getRange, [], { + #fromCurrency: fromCurrency, + #toCurrency: toCurrency, + #fromNetwork: fromNetwork, + #toNetwork: toNetwork, + #flow: flow, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future<_i4.ExchangeResponse<_i20.Range>>); @override _i10.Future<_i4.ExchangeResponse<_i21.Estimate>> getEstimatedExchangeAmount({ @@ -1187,30 +1006,7 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { String? apiKey, }) => (super.noSuchMethod( - Invocation.method( - #getEstimatedExchangeAmount, - [], - { - #fromCurrency: fromCurrency, - #toCurrency: toCurrency, - #fromAmount: fromAmount, - #toAmount: toAmount, - #fromNetwork: fromNetwork, - #toNetwork: toNetwork, - #flow: flow, - #type: type, - #useRateId: useRateId, - #isTopUp: isTopUp, - #apiKey: apiKey, - }, - ), - returnValue: _i10.Future<_i4.ExchangeResponse<_i21.Estimate>>.value( - _FakeExchangeResponse_2<_i21.Estimate>( - this, - Invocation.method( - #getEstimatedExchangeAmount, - [], - { + Invocation.method(#getEstimatedExchangeAmount, [], { #fromCurrency: fromCurrency, #toCurrency: toCurrency, #fromAmount: fromAmount, @@ -1222,14 +1018,31 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { #useRateId: useRateId, #isTopUp: isTopUp, #apiKey: apiKey, - }, - ), - )), - ) as _i10.Future<_i4.ExchangeResponse<_i21.Estimate>>); + }), + returnValue: _i10.Future<_i4.ExchangeResponse<_i21.Estimate>>.value( + _FakeExchangeResponse_2<_i21.Estimate>( + this, + Invocation.method(#getEstimatedExchangeAmount, [], { + #fromCurrency: fromCurrency, + #toCurrency: toCurrency, + #fromAmount: fromAmount, + #toAmount: toAmount, + #fromNetwork: fromNetwork, + #toNetwork: toNetwork, + #flow: flow, + #type: type, + #useRateId: useRateId, + #isTopUp: isTopUp, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future<_i4.ExchangeResponse<_i21.Estimate>>); @override _i10.Future<_i4.ExchangeResponse<_i22.CNExchangeTransaction>> - createExchangeTransaction({ + createExchangeTransaction({ required String? fromCurrency, required String? fromNetwork, required String? toCurrency, @@ -1248,89 +1061,78 @@ class MockChangeNowAPI extends _i1.Mock implements _i17.ChangeNowAPI { required String? rateId, String? apiKey, }) => - (super.noSuchMethod( - Invocation.method( - #createExchangeTransaction, - [], - { - #fromCurrency: fromCurrency, - #fromNetwork: fromNetwork, - #toCurrency: toCurrency, - #toNetwork: toNetwork, - #fromAmount: fromAmount, - #toAmount: toAmount, - #flow: flow, - #type: type, - #address: address, - #extraId: extraId, - #refundAddress: refundAddress, - #refundExtraId: refundExtraId, - #userId: userId, - #payload: payload, - #contactEmail: contactEmail, - #rateId: rateId, - #apiKey: apiKey, - }, - ), - returnValue: _i10 - .Future<_i4.ExchangeResponse<_i22.CNExchangeTransaction>>.value( - _FakeExchangeResponse_2<_i22.CNExchangeTransaction>( - this, - Invocation.method( - #createExchangeTransaction, - [], - { - #fromCurrency: fromCurrency, - #fromNetwork: fromNetwork, - #toCurrency: toCurrency, - #toNetwork: toNetwork, - #fromAmount: fromAmount, - #toAmount: toAmount, - #flow: flow, - #type: type, - #address: address, - #extraId: extraId, - #refundAddress: refundAddress, - #refundExtraId: refundExtraId, - #userId: userId, - #payload: payload, - #contactEmail: contactEmail, - #rateId: rateId, - #apiKey: apiKey, - }, - ), - )), - ) as _i10.Future<_i4.ExchangeResponse<_i22.CNExchangeTransaction>>); + (super.noSuchMethod( + Invocation.method(#createExchangeTransaction, [], { + #fromCurrency: fromCurrency, + #fromNetwork: fromNetwork, + #toCurrency: toCurrency, + #toNetwork: toNetwork, + #fromAmount: fromAmount, + #toAmount: toAmount, + #flow: flow, + #type: type, + #address: address, + #extraId: extraId, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #userId: userId, + #payload: payload, + #contactEmail: contactEmail, + #rateId: rateId, + #apiKey: apiKey, + }), + returnValue: + _i10.Future< + _i4.ExchangeResponse<_i22.CNExchangeTransaction> + >.value( + _FakeExchangeResponse_2<_i22.CNExchangeTransaction>( + this, + Invocation.method(#createExchangeTransaction, [], { + #fromCurrency: fromCurrency, + #fromNetwork: fromNetwork, + #toCurrency: toCurrency, + #toNetwork: toNetwork, + #fromAmount: fromAmount, + #toAmount: toAmount, + #flow: flow, + #type: type, + #address: address, + #extraId: extraId, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #userId: userId, + #payload: payload, + #contactEmail: contactEmail, + #rateId: rateId, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future<_i4.ExchangeResponse<_i22.CNExchangeTransaction>>); @override _i10.Future<_i4.ExchangeResponse<_i23.CNExchangeTransactionStatus>> - getTransactionStatus({ - required String? id, - String? apiKey, - }) => - (super.noSuchMethod( - Invocation.method( - #getTransactionStatus, - [], - { - #id: id, - #apiKey: apiKey, - }, - ), - returnValue: _i10.Future< - _i4 - .ExchangeResponse<_i23.CNExchangeTransactionStatus>>.value( - _FakeExchangeResponse_2<_i23.CNExchangeTransactionStatus>( - this, - Invocation.method( - #getTransactionStatus, - [], - { - #id: id, - #apiKey: apiKey, - }, - ), - )), - ) as _i10 - .Future<_i4.ExchangeResponse<_i23.CNExchangeTransactionStatus>>); + getTransactionStatus({required String? id, String? apiKey}) => + (super.noSuchMethod( + Invocation.method(#getTransactionStatus, [], { + #id: id, + #apiKey: apiKey, + }), + returnValue: + _i10.Future< + _i4.ExchangeResponse<_i23.CNExchangeTransactionStatus> + >.value( + _FakeExchangeResponse_2<_i23.CNExchangeTransactionStatus>( + this, + Invocation.method(#getTransactionStatus, [], { + #id: id, + #apiKey: apiKey, + }), + ), + ), + ) + as _i10.Future< + _i4.ExchangeResponse<_i23.CNExchangeTransactionStatus> + >); } diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index 804721d4c..c54cd4963 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/lockscreen_view_screen_test.dart. // Do not manually edit this file. @@ -23,20 +23,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [WalletsService]. @@ -50,52 +47,41 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService { @override _i4.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i4.Future>.value( - {}), - ) as _i4.Future>); + Invocation.getter(#walletNames), + returnValue: _i4.Future>.value( + {}, + ), + ) + as _i4.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -107,41 +93,45 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + List<_i7.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override - List<_i7.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + List<_i7.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setPrimaryNodeFor({ @@ -150,56 +140,45 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i7.NodeModel? getPrimaryNodeFor({required _i8.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i7.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i7.NodeModel?); @override List<_i7.NodeModel> getNodesFor(_i8.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override _i7.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i7.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i7.NodeModel?); @override - List<_i7.NodeModel> failoverNodesFor( - {required _i8.CryptoCurrency? currency}) => + List<_i7.NodeModel> failoverNodesFor({ + required _i8.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override _i4.Future save( @@ -208,34 +187,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override - _i4.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i4.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setEnabledState( @@ -244,61 +209,46 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); - - @override - _i4.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + + @override + _i4.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart index 3d96a2dcf..4c101202c 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testA_test.dart. // Do not manually edit this file. @@ -19,10 +19,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -35,52 +37,41 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -92,64 +83,51 @@ class MockLocaleService extends _i1.Mock implements _i5.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i3.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + _i3.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart index 7cccdb73e..7d3849b3a 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testB_test.dart. // Do not manually edit this file. @@ -19,10 +19,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -35,52 +37,41 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -92,64 +83,51 @@ class MockLocaleService extends _i1.Mock implements _i5.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i3.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + _i3.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart index 9362ee778..fe4f57a31 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testC_test.dart. // Do not manually edit this file. @@ -19,10 +19,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -35,52 +37,41 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -92,64 +83,51 @@ class MockLocaleService extends _i1.Mock implements _i5.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i3.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + _i3.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart index 951e5306d..6ff65a3fa 100644 --- a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/onboarding/backup_key_warning_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart index 9218bd83e..de530dad1 100644 --- a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/onboarding/create_pin_view_screen_test.dart. // Do not manually edit this file. @@ -23,20 +23,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [WalletsService]. @@ -50,52 +47,41 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService { @override _i4.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i4.Future>.value( - {}), - ) as _i4.Future>); + Invocation.getter(#walletNames), + returnValue: _i4.Future>.value( + {}, + ), + ) + as _i4.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -107,41 +93,45 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + List<_i7.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override - List<_i7.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + List<_i7.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setPrimaryNodeFor({ @@ -150,56 +140,45 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i7.NodeModel? getPrimaryNodeFor({required _i8.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i7.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i7.NodeModel?); @override List<_i7.NodeModel> getNodesFor(_i8.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override _i7.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i7.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i7.NodeModel?); @override - List<_i7.NodeModel> failoverNodesFor( - {required _i8.CryptoCurrency? currency}) => + List<_i7.NodeModel> failoverNodesFor({ + required _i8.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i7.NodeModel>[], + ) + as List<_i7.NodeModel>); @override _i4.Future save( @@ -208,34 +187,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override - _i4.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i4.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setEnabledState( @@ -244,61 +209,46 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); - - @override - _i4.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + + @override + _i4.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart index 5983f2f41..98e0c0856 100644 --- a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/onboarding/name_your_wallet_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart index 68ac1be3e..1b9698d16 100644 --- a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/onboarding/restore_wallet_view_screen_test.dart. // Do not manually edit this file. @@ -25,30 +25,22 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { - _FakeScanResult_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeScanResult_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_1 extends _i1.SmartFake implements _i3.SecureStorageInterface { - _FakeSecureStorageInterface_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BarcodeScannerWrapper]. @@ -63,20 +55,15 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i4.Future<_i2.ScanResult> scan({required _i5.BuildContext? context}) => (super.noSuchMethod( - Invocation.method( - #scan, - [], - {#context: context}, - ), - returnValue: _i4.Future<_i2.ScanResult>.value(_FakeScanResult_0( - this, - Invocation.method( - #scan, - [], - {#context: context}, - ), - )), - ) as _i4.Future<_i2.ScanResult>); + Invocation.method(#scan, [], {#context: context}), + returnValue: _i4.Future<_i2.ScanResult>.value( + _FakeScanResult_0( + this, + Invocation.method(#scan, [], {#context: context}), + ), + ), + ) + as _i4.Future<_i2.ScanResult>); } /// A class which mocks [WalletsService]. @@ -90,52 +77,41 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override _i4.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i4.Future>.value( - {}), - ) as _i4.Future>); + Invocation.getter(#walletNames), + returnValue: _i4.Future>.value( + {}, + ), + ) + as _i4.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -147,41 +123,45 @@ class MockNodeService extends _i1.Mock implements _i8.NodeService { } @override - _i3.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_1( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i3.SecureStorageInterface); + _i3.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_1( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i3.SecureStorageInterface); @override - List<_i9.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i9.NodeModel>[], - ) as List<_i9.NodeModel>); + List<_i9.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i9.NodeModel>[], + ) + as List<_i9.NodeModel>); @override - List<_i9.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i9.NodeModel>[], - ) as List<_i9.NodeModel>); + List<_i9.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i9.NodeModel>[], + ) + as List<_i9.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setPrimaryNodeFor({ @@ -190,56 +170,45 @@ class MockNodeService extends _i1.Mock implements _i8.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i9.NodeModel? getPrimaryNodeFor({required _i10.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i9.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i9.NodeModel?); @override List<_i9.NodeModel> getNodesFor(_i10.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i9.NodeModel>[], - ) as List<_i9.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i9.NodeModel>[], + ) + as List<_i9.NodeModel>); @override _i9.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i9.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i9.NodeModel?); @override - List<_i9.NodeModel> failoverNodesFor( - {required _i10.CryptoCurrency? currency}) => + List<_i9.NodeModel> failoverNodesFor({ + required _i10.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i9.NodeModel>[], - ) as List<_i9.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i9.NodeModel>[], + ) + as List<_i9.NodeModel>); @override _i4.Future save( @@ -248,34 +217,20 @@ class MockNodeService extends _i1.Mock implements _i8.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override - _i4.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i4.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future setEnabledState( @@ -284,61 +239,46 @@ class MockNodeService extends _i1.Mock implements _i8.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override - _i4.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart index b4eb99213..7448120ce 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.dart. // Do not manually edit this file. @@ -22,20 +22,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [NodeService]. @@ -47,41 +44,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - List<_i4.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i5.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setPrimaryNodeFor({ @@ -90,56 +91,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i4.NodeModel? getPrimaryNodeFor({required _i6.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i4.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i4.NodeModel?); @override List<_i4.NodeModel> getNodesFor(_i6.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i4.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i4.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i4.NodeModel?); @override - List<_i4.NodeModel> failoverNodesFor( - {required _i6.CryptoCurrency? currency}) => + List<_i4.NodeModel> failoverNodesFor({ + required _i6.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i5.Future save( @@ -148,34 +138,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setEnabledState( @@ -184,61 +160,46 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart index 787f1f801..da7af3472 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.dart. // Do not manually edit this file. @@ -22,20 +22,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [NodeService]. @@ -47,41 +44,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - List<_i4.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i5.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setPrimaryNodeFor({ @@ -90,56 +91,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i4.NodeModel? getPrimaryNodeFor({required _i6.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i4.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i4.NodeModel?); @override List<_i4.NodeModel> getNodesFor(_i6.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i4.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i4.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i4.NodeModel?); @override - List<_i4.NodeModel> failoverNodesFor( - {required _i6.CryptoCurrency? currency}) => + List<_i4.NodeModel> failoverNodesFor({ + required _i6.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i5.Future save( @@ -148,34 +138,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setEnabledState( @@ -184,61 +160,46 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart index 6a2a923e0..241eb0d58 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.dart. // Do not manually edit this file. @@ -22,20 +22,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [NodeService]. @@ -47,41 +44,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - List<_i4.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i5.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setPrimaryNodeFor({ @@ -90,56 +91,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i4.NodeModel? getPrimaryNodeFor({required _i6.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i4.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i4.NodeModel?); @override List<_i4.NodeModel> getNodesFor(_i6.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i4.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i4.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i4.NodeModel?); @override - List<_i4.NodeModel> failoverNodesFor( - {required _i6.CryptoCurrency? currency}) => + List<_i4.NodeModel> failoverNodesFor({ + required _i6.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i5.Future save( @@ -148,34 +138,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setEnabledState( @@ -184,61 +160,46 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart index 93c8ef6ec..47dab3ddd 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart index 2803819b6..9a5f6d79d 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart index 63ddd796c..07a1ea8f3 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart index d3a16fd4f..6105ab2b8 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.dart. // Do not manually edit this file. @@ -27,20 +27,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeElectrumXClient_0 extends _i1.SmartFake implements _i2.ElectrumXClient { - _FakeElectrumXClient_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [CachedElectrumXClient]. @@ -53,43 +50,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i2.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_0( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i2.ElectrumXClient); + _i2.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_0( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i2.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i4.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i4.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i4.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i4.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i5.Future> getTransaction({ @@ -98,31 +89,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i5.Future>.value({}), - ) as _i5.Future>); - - @override - _i5.Future clearSharedTransactionCache( - {required _i6.CryptoCurrency? cryptoCurrency}) => + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i5.Future>.value( + {}, + ), + ) + as _i5.Future>); + + @override + _i5.Future clearSharedTransactionCache({ + required _i6.CryptoCurrency? cryptoCurrency, + }) => (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); } /// A class which mocks [LocalAuthentication]. @@ -135,10 +124,12 @@ class MockLocalAuthentication extends _i1.Mock } @override - _i5.Future get canCheckBiometrics => (super.noSuchMethod( - Invocation.getter(#canCheckBiometrics), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future get canCheckBiometrics => + (super.noSuchMethod( + Invocation.getter(#canCheckBiometrics), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future authenticate({ @@ -151,46 +142,40 @@ class MockLocalAuthentication extends _i1.Mock _i8.AuthenticationOptions? options = const _i8.AuthenticationOptions(), }) => (super.noSuchMethod( - Invocation.method( - #authenticate, - [], - { - #localizedReason: localizedReason, - #authMessages: authMessages, - #options: options, - }, - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + Invocation.method(#authenticate, [], { + #localizedReason: localizedReason, + #authMessages: authMessages, + #options: options, + }), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future stopAuthentication() => (super.noSuchMethod( - Invocation.method( - #stopAuthentication, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future stopAuthentication() => + (super.noSuchMethod( + Invocation.method(#stopAuthentication, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future isDeviceSupported() => (super.noSuchMethod( - Invocation.method( - #isDeviceSupported, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future isDeviceSupported() => + (super.noSuchMethod( + Invocation.method(#isDeviceSupported, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future> getAvailableBiometrics() => (super.noSuchMethod( - Invocation.method( - #getAvailableBiometrics, - [], - ), - returnValue: - _i5.Future>.value(<_i8.BiometricType>[]), - ) as _i5.Future>); + Invocation.method(#getAvailableBiometrics, []), + returnValue: _i5.Future>.value( + <_i8.BiometricType>[], + ), + ) + as _i5.Future>); } /// A class which mocks [Biometrics]. @@ -208,17 +193,14 @@ class MockBiometrics extends _i1.Mock implements _i11.Biometrics { required String? title, }) => (super.noSuchMethod( - Invocation.method( - #authenticate, - [], - { - #cancelButtonText: cancelButtonText, - #localizedReason: localizedReason, - #title: title, - }, - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + Invocation.method(#authenticate, [], { + #cancelButtonText: cancelButtonText, + #localizedReason: localizedReason, + #title: title, + }), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); } /// A class which mocks [WalletsService]. @@ -232,50 +214,39 @@ class MockWalletsService extends _i1.Mock implements _i12.WalletsService { @override _i5.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i5.Future>.value( - {}), - ) as _i5.Future>); + Invocation.getter(#walletNames), + returnValue: _i5.Future>.value( + {}, + ), + ) + as _i5.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart index 2f8346004..aa5e4c41a 100644 --- a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/settings_view/settings_view_screen_test.dart. // Do not manually edit this file. @@ -17,10 +17,12 @@ import 'package:stackwallet/services/wallets_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [WalletsService]. /// @@ -33,50 +35,39 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => (super.noSuchMethod( - Invocation.getter(#walletNames), - returnValue: _i3.Future>.value( - {}), - ) as _i3.Future>); + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}, + ), + ) + as _i3.Future>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart index 531417e9d..e35771508 100644 --- a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.dart. // Do not manually edit this file. @@ -20,19 +20,16 @@ import 'package:stackwallet/services/locale_service.dart' as _i6; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -45,123 +42,95 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); - - @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); + + @override + bool matches(String? term, _i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); + + @override + _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); - - @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -173,64 +142,51 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart index ff1557434..ff3ff128b 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.dart. // Do not manually edit this file. @@ -18,10 +18,12 @@ import 'package:stackwallet/services/locale_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [LocaleService]. /// @@ -32,64 +34,51 @@ class MockLocaleService extends _i1.Mock implements _i2.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i3.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i3.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart index a236a0b41..e61edd6c9 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/services/address_book_service.dart' as _i3; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -43,121 +40,93 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + bool matches(String? term, _i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + _i4.Future addContact(_i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart index cd4db9558..cbce36665 100644 --- a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/wallet_view/send_view_screen_test.dart. // Do not manually edit this file. @@ -17,19 +17,16 @@ import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { - _FakeScanResult_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeScanResult_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [BarcodeScannerWrapper]. @@ -44,18 +41,13 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i3.Future<_i2.ScanResult> scan({required _i4.BuildContext? context}) => (super.noSuchMethod( - Invocation.method( - #scan, - [], - {#context: context}, - ), - returnValue: _i3.Future<_i2.ScanResult>.value(_FakeScanResult_0( - this, - Invocation.method( - #scan, - [], - {#context: context}, - ), - )), - ) as _i3.Future<_i2.ScanResult>); + Invocation.method(#scan, [], {#context: context}), + returnValue: _i3.Future<_i2.ScanResult>.value( + _FakeScanResult_0( + this, + Invocation.method(#scan, [], {#context: context}), + ), + ), + ) + as _i3.Future<_i2.ScanResult>); } diff --git a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart index cf011b7c6..3b567cdfe 100644 --- a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/screen_tests/wallet_view/wallet_view_screen_test.dart. // Do not manually edit this file. @@ -18,10 +18,12 @@ import 'package:stackwallet/services/locale_service.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member /// A class which mocks [LocaleService]. /// @@ -32,64 +34,51 @@ class MockLocaleService extends _i1.Mock implements _i2.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i3.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i3.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/services/change_now/change_now_test.mocks.dart b/test/services/change_now/change_now_test.mocks.dart index 8134b6449..4b92e7841 100644 --- a/test/services/change_now/change_now_test.mocks.dart +++ b/test/services/change_now/change_now_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/change_now/change_now_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/networking/http.dart' as _i2; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [HTTP]. @@ -48,28 +45,23 @@ class MockHTTP extends _i1.Mock implements _i2.HTTP { required ({_i4.InternetAddress host, int port})? proxyInfo, }) => (super.noSuchMethod( - Invocation.method( - #get, - [], - { - #url: url, - #headers: headers, - #proxyInfo: proxyInfo, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [], - { + Invocation.method(#get, [], { #url: url, #headers: headers, #proxyInfo: proxyInfo, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + }), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [], { + #url: url, + #headers: headers, + #proxyInfo: proxyInfo, + }), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post({ @@ -80,30 +72,25 @@ class MockHTTP extends _i1.Mock implements _i2.HTTP { required ({_i4.InternetAddress host, int port})? proxyInfo, }) => (super.noSuchMethod( - Invocation.method( - #post, - [], - { - #url: url, - #headers: headers, - #body: body, - #encoding: encoding, - #proxyInfo: proxyInfo, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [], - { + Invocation.method(#post, [], { #url: url, #headers: headers, #body: body, #encoding: encoding, #proxyInfo: proxyInfo, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + }), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#post, [], { + #url: url, + #headers: headers, + #body: body, + #encoding: encoding, + #proxyInfo: proxyInfo, + }), + ), + ), + ) + as _i3.Future<_i2.Response>); } diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart index 35fbc67a1..7d1f9507c 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/coins/bitcoin/bitcoin_wallet_test.dart. // Do not manually edit this file. @@ -25,62 +25,39 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeElectrumXClient_4 extends _i1.SmartFake implements _i5.ElectrumXClient { - _FakeElectrumXClient_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -92,85 +69,83 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -181,19 +156,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -203,59 +175,46 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); - - @override - _i8.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); + + @override + _i8.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ @@ -263,26 +222,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(_i7.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i8.Future); + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ @@ -290,17 +244,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ @@ -308,30 +260,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchHistory( - {required List? args}) => + _i8.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ @@ -339,30 +288,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchUTXOs( - {required List? args}) => + _i8.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ @@ -371,55 +317,45 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ @@ -427,70 +363,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ @@ -498,17 +425,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i8.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -516,77 +441,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future> getSparkNames( - {String? requestID}) => + _i8.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value( - <({String address, String name})>[]), - ) as _i8.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i8.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i8.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -594,27 +503,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i8.Future<_i3.SparkAnonymitySetMeta>); @override _i8.Future> getSparkAnonymitySetBySector({ @@ -625,19 +528,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future isMasterNodeCollateral({ @@ -646,29 +546,24 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ @@ -676,43 +571,34 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i8.Future<_i4.Decimal>); + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -725,43 +611,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); - - @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); - - @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); + + @override + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); + + @override + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i8.Future> getTransaction({ @@ -770,31 +650,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future clearSharedTransactionCache( - {required _i2.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future clearSharedTransactionCache({ + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -807,71 +685,69 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#walletId), - ), - ) as String); - - @override - List get pendings => (super.noSuchMethod( - Invocation.getter(#pendings), - returnValue: [], - ) as List); - - @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); - - @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedPending, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedPending, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedConfirmed, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedConfirmed, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method( - #deleteTransaction, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); + + @override + List get pendings => + (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) + as List); + + @override + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); + + @override + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart index 7c455f73d..a4e641ec3 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart. // Do not manually edit this file. @@ -25,62 +25,39 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeElectrumXClient_4 extends _i1.SmartFake implements _i5.ElectrumXClient { - _FakeElectrumXClient_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -92,85 +69,83 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -181,19 +156,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -203,59 +175,46 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); - - @override - _i8.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); + + @override + _i8.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ @@ -263,26 +222,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(_i7.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i8.Future); + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ @@ -290,17 +244,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ @@ -308,30 +260,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchHistory( - {required List? args}) => + _i8.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ @@ -339,30 +288,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchUTXOs( - {required List? args}) => + _i8.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ @@ -371,55 +317,45 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ @@ -427,70 +363,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ @@ -498,17 +425,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i8.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -516,77 +441,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future> getSparkNames( - {String? requestID}) => + _i8.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value( - <({String address, String name})>[]), - ) as _i8.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i8.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i8.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -594,27 +503,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i8.Future<_i3.SparkAnonymitySetMeta>); @override _i8.Future> getSparkAnonymitySetBySector({ @@ -625,19 +528,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future isMasterNodeCollateral({ @@ -646,29 +546,24 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ @@ -676,43 +571,34 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i8.Future<_i4.Decimal>); + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -725,43 +611,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); - - @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); - - @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); + + @override + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); + + @override + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i8.Future> getTransaction({ @@ -770,31 +650,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future clearSharedTransactionCache( - {required _i2.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future clearSharedTransactionCache({ + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -807,71 +685,69 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#walletId), - ), - ) as String); - - @override - List get pendings => (super.noSuchMethod( - Invocation.getter(#pendings), - returnValue: [], - ) as List); - - @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); - - @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedPending, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedPending, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedConfirmed, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedConfirmed, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method( - #deleteTransaction, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); + + @override + List get pendings => + (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) + as List); + + @override + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); + + @override + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart index 86090d418..cf2da0eb7 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/coins/dogecoin/dogecoin_wallet_test.dart. // Do not manually edit this file. @@ -25,62 +25,39 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeElectrumXClient_4 extends _i1.SmartFake implements _i5.ElectrumXClient { - _FakeElectrumXClient_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -92,85 +69,83 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -181,19 +156,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -203,59 +175,46 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); - - @override - _i8.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); + + @override + _i8.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ @@ -263,26 +222,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(_i7.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i8.Future); + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ @@ -290,17 +244,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ @@ -308,30 +260,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchHistory( - {required List? args}) => + _i8.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ @@ -339,30 +288,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchUTXOs( - {required List? args}) => + _i8.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ @@ -371,55 +317,45 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ @@ -427,70 +363,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ @@ -498,17 +425,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i8.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -516,77 +441,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future> getSparkNames( - {String? requestID}) => + _i8.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value( - <({String address, String name})>[]), - ) as _i8.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i8.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i8.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -594,27 +503,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i8.Future<_i3.SparkAnonymitySetMeta>); @override _i8.Future> getSparkAnonymitySetBySector({ @@ -625,19 +528,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future isMasterNodeCollateral({ @@ -646,29 +546,24 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ @@ -676,43 +571,34 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i8.Future<_i4.Decimal>); + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -725,43 +611,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); - - @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); - - @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); + + @override + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); + + @override + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i8.Future> getTransaction({ @@ -770,31 +650,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future clearSharedTransactionCache( - {required _i2.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future clearSharedTransactionCache({ + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -807,71 +685,69 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#walletId), - ), - ) as String); - - @override - List get pendings => (super.noSuchMethod( - Invocation.getter(#pendings), - returnValue: [], - ) as List); - - @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); - - @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedPending, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedPending, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedConfirmed, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedConfirmed, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method( - #deleteTransaction, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); + + @override + List get pendings => + (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) + as List); + + @override + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); + + @override + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/services/coins/firo/firo_wallet_test.dart b/test/services/coins/firo/firo_wallet_test.dart index ec2f5bd14..3edbd52f1 100644 --- a/test/services/coins/firo/firo_wallet_test.dart +++ b/test/services/coins/firo/firo_wallet_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:hive_test/hive_test.dart'; import 'package:mockito/annotations.dart'; diff --git a/test/services/coins/monero/monero_wallet_test.dart b/test/services/coins/monero/monero_wallet_test.dart index d33c1b460..400c35a46 100644 --- a/test/services/coins/monero/monero_wallet_test.dart +++ b/test/services/coins/monero/monero_wallet_test.dart @@ -17,7 +17,7 @@ import 'dart:core'; // import 'package:flutter_libmonero/core/wallet_creation_service.dart'; // import 'package:flutter_libmonero/monero/monero.dart'; // import 'package:flutter_test/flutter_test.dart'; -// import 'package:hive/hive.dart'; +// import 'package:hive_ce/hive.dart'; // import 'package:hive_test/hive_test.dart'; // import 'package:path_provider/path_provider.dart'; // import 'package:stackwallet/services/wallets.dart'; diff --git a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart index a397b611a..103ca6b1d 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/coins/namecoin/namecoin_wallet_test.dart. // Do not manually edit this file. @@ -25,62 +25,39 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeElectrumXClient_4 extends _i1.SmartFake implements _i5.ElectrumXClient { - _FakeElectrumXClient_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -92,85 +69,83 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -181,19 +156,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -203,59 +175,46 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); - - @override - _i8.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); + + @override + _i8.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ @@ -263,26 +222,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(_i7.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i8.Future); + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ @@ -290,17 +244,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ @@ -308,30 +260,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchHistory( - {required List? args}) => + _i8.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ @@ -339,30 +288,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchUTXOs( - {required List? args}) => + _i8.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ @@ -371,55 +317,45 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ @@ -427,70 +363,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ @@ -498,17 +425,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i8.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -516,77 +441,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future> getSparkNames( - {String? requestID}) => + _i8.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value( - <({String address, String name})>[]), - ) as _i8.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i8.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i8.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -594,27 +503,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i8.Future<_i3.SparkAnonymitySetMeta>); @override _i8.Future> getSparkAnonymitySetBySector({ @@ -625,19 +528,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future isMasterNodeCollateral({ @@ -646,29 +546,24 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ @@ -676,43 +571,34 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i8.Future<_i4.Decimal>); + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -725,43 +611,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); - - @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); - - @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); + + @override + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); + + @override + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i8.Future> getTransaction({ @@ -770,31 +650,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future clearSharedTransactionCache( - {required _i2.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future clearSharedTransactionCache({ + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -807,71 +685,69 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#walletId), - ), - ) as String); - - @override - List get pendings => (super.noSuchMethod( - Invocation.getter(#pendings), - returnValue: [], - ) as List); - - @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); - - @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedPending, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedPending, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedConfirmed, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedConfirmed, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method( - #deleteTransaction, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); + + @override + List get pendings => + (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) + as List); + + @override + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); + + @override + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/services/coins/particl/particl_wallet_test.mocks.dart b/test/services/coins/particl/particl_wallet_test.mocks.dart index 861fa4327..8c10019e4 100644 --- a/test/services/coins/particl/particl_wallet_test.mocks.dart +++ b/test/services/coins/particl/particl_wallet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/services/coins/particl/particl_wallet_test.dart. // Do not manually edit this file. @@ -25,62 +25,39 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeCryptoCurrency_0 extends _i1.SmartFake implements _i2.CryptoCurrency { - _FakeCryptoCurrency_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeCryptoCurrency_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_1 extends _i1.SmartFake implements Duration { - _FakeDuration_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake implements _i3.SparkAnonymitySetMeta { - _FakeSparkAnonymitySetMeta_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSparkAnonymitySetMeta_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { - _FakeDecimal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDecimal_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeElectrumXClient_4 extends _i1.SmartFake implements _i5.ElectrumXClient { - _FakeElectrumXClient_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeElectrumXClient_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ElectrumXClient]. @@ -92,85 +69,83 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override - set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter( - #currentFailoverIndex, - _currentFailoverIndex, - ), - returnValueForMissingStub: null, - ); + int get port => + (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); @override - Duration get connectionTimeoutForSpecialCaseJsonRPCClients => - (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + bool get useSSL => + (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) + as bool); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#host), - ), - ) as String); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override - int get port => (super.noSuchMethod( - Invocation.getter(#port), - returnValue: 0, - ) as int); + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override - bool get useSSL => (super.noSuchMethod( - Invocation.getter(#useSSL), - returnValue: false, - ) as bool); + set currentFailoverIndex(int? value) => super.noSuchMethod( + Invocation.setter(#currentFailoverIndex, value), + returnValueForMissingStub: null, + ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method( - #closeAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method( - #checkElectrumAdapter, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -181,19 +156,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( - Invocation.method( - #request, - [], - { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -203,59 +175,46 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { int? retries = 2, }) => (super.noSuchMethod( - Invocation.method( - #batchRequest, - [], - { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); - - @override - _i8.Future ping({ - String? requestID, - int? retryCount = 1, - }) => + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); + + @override + _i8.Future ping({String? requestID, int? retryCount = 1}) => (super.noSuchMethod( - Invocation.method( - #ping, - [], - { - #requestID: requestID, - #retryCount: retryCount, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getBlockHeadTip, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getServerFeatures, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ @@ -263,26 +222,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #broadcastTransaction, - [], - { - #rawTx: rawTx, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(_i7.dummyValue( - this, - Invocation.method( - #broadcastTransaction, - [], - { + Invocation.method(#broadcastTransaction, [], { #rawTx: rawTx, #requestID: requestID, - }, - ), - )), - ) as _i8.Future); + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ @@ -290,17 +244,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ @@ -308,30 +260,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getHistory, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchHistory( - {required List? args}) => + _i8.Future>>> getBatchHistory({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchHistory, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ @@ -339,30 +288,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [], - { - #scripthash: scripthash, - #requestID: requestID, - }, - ), - returnValue: _i8.Future>>.value( - >[]), - ) as _i8.Future>>); + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future>>> getBatchUTXOs( - {required List? args}) => + _i8.Future>>> getBatchUTXOs({ + required List? args, + }) => (super.noSuchMethod( - Invocation.method( - #getBatchUTXOs, - [], - {#args: args}, - ), - returnValue: _i8.Future>>>.value( - >>[]), - ) as _i8.Future>>>); + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ @@ -371,55 +317,45 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getLelantusAnonymitySet({ - String? groupId = r'1', - String? blockhash = r'', + String? groupId = '1', + String? blockhash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusAnonymitySet, - [], - { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future getLelantusMintData({ - dynamic mints, - String? requestID, - }) => + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusMintData, - [], - { - #mints: mints, - #requestID: requestID, - }, - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ @@ -427,70 +363,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getLelantusUsedCoinSerials, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getLelantusLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ - String? coinGroupId = r'1', - String? startBlockHash = r'', + String? coinGroupId = '1', + String? startBlockHash = '', String? requestID, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySet, - [], - { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getSparkLatestCoinId, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getMempoolTxids, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ @@ -498,17 +425,15 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? txids, }) => (super.noSuchMethod( - Invocation.method( - #getMempoolSparkData, - [], - { - #requestID: requestID, - #txids: txids, - }, - ), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[]), - ) as _i8.Future>); + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ @@ -516,77 +441,61 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? startNumber, }) => (super.noSuchMethod( - Invocation.method( - #getSparkUnhashedUsedCoinsTagsWithTxHashes, - [], - { - #requestID: requestID, - #startNumber: startNumber, - }, - ), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override - _i8.Future> getSparkNames( - {String? requestID}) => + _i8.Future> getSparkNames({ + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getSparkNames, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future>.value( - <({String address, String name})>[]), - ) as _i8.Future>); + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - returnValue: _i8.Future< - ({ - String additionalInfo, - String address, - int validUntil - })>.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - address: _i7.dummyValue( - this, - Invocation.method( - #getSparkNameData, - [], - { - #sparkName: sparkName, - #requestID: requestID, - }, - ), - ), - validUntil: 0 - )), - ) as _i8.Future< - ({String additionalInfo, String address, int validUntil})>); + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ @@ -594,27 +503,21 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? coinGroupId, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - }, - ), - returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( - _FakeSparkAnonymitySetMeta_2( - this, - Invocation.method( - #getSparkAnonymitySetMeta, - [], - { + Invocation.method(#getSparkAnonymitySetMeta, [], { #requestID: requestID, #coinGroupId: coinGroupId, - }, - ), - )), - ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + }), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method(#getSparkAnonymitySetMeta, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + }), + ), + ), + ) + as _i8.Future<_i3.SparkAnonymitySetMeta>); @override _i8.Future> getSparkAnonymitySetBySector({ @@ -625,19 +528,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? endIndex, }) => (super.noSuchMethod( - Invocation.method( - #getSparkAnonymitySetBySector, - [], - { - #requestID: requestID, - #coinGroupId: coinGroupId, - #latestBlock: latestBlock, - #startIndex: startIndex, - #endIndex: endIndex, - }, - ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + Invocation.method(#getSparkAnonymitySetBySector, [], { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future isMasterNodeCollateral({ @@ -646,29 +546,24 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? index, }) => (super.noSuchMethod( - Invocation.method( - #isMasterNodeCollateral, - [], - { - #requestID: requestID, - #txid: txid, - #index: index, - }, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #getFeeRate, - [], - {#requestID: requestID}, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ @@ -676,43 +571,34 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required int? blocks, }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #requestID: requestID, - #blocks: blocks, - }, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #estimateFee, - [], - { + Invocation.method(#estimateFee, [], { #requestID: requestID, #blocks: blocks, - }, - ), - )), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( - this, - Invocation.method( - #relayFee, - [], - {#requestID: requestID}, - ), - )), - ) as _i8.Future<_i4.Decimal>); + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -725,43 +611,37 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); - - @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToHex, - [source], - ), - ), - ) as String); - - @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method( - #base64ToReverseHex, - [source], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #base64ToReverseHex, - [source], - ), - ), - ) as String); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); + + @override + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); + + @override + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); @override _i8.Future> getTransaction({ @@ -770,31 +650,29 @@ class MockCachedElectrumXClient extends _i1.Mock bool? verbose = true, }) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [], - { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }, - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); - - @override - _i8.Future clearSharedTransactionCache( - {required _i2.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod( - Invocation.method( - #clearSharedTransactionCache, - [], - {#cryptoCurrency: cryptoCurrency}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); + + @override + _i8.Future clearSharedTransactionCache({ + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -807,71 +685,69 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#walletId), - ), - ) as String); - - @override - List get pendings => (super.noSuchMethod( - Invocation.getter(#pendings), - returnValue: [], - ) as List); - - @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); - - @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedPending, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedPending, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #wasNotifiedConfirmed, - [txid], - ), - returnValue: false, - ) as bool); - - @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method( - #addNotifiedConfirmed, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); - - @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method( - #deleteTransaction, - [txid], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); + + @override + List get pendings => + (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) + as List); + + @override + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); + + @override + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); + + @override + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/services/coins/wownero/wownero_wallet_test.dart b/test/services/coins/wownero/wownero_wallet_test.dart index a14fbf3ad..ca9b978ba 100644 --- a/test/services/coins/wownero/wownero_wallet_test.dart +++ b/test/services/coins/wownero/wownero_wallet_test.dart @@ -17,7 +17,7 @@ import 'dart:core'; // import 'package:flutter_libmonero/core/wallet_creation_service.dart'; // import 'package:flutter_libmonero/wownero/wownero.dart'; // import 'package:flutter_test/flutter_test.dart'; -// import 'package:hive/hive.dart'; +// import 'package:hive_ce/hive.dart'; // import 'package:hive_test/hive_test.dart'; // import 'package:path_provider/path_provider.dart'; // import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; diff --git a/test/services/node_service_test.dart b/test/services/node_service_test.dart index cb0acd6de..efae56727 100644 --- a/test/services/node_service_test.dart +++ b/test/services/node_service_test.dart @@ -1,5 +1,7 @@ +// TODO MWC + import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; +import 'package:hive_ce/hive.dart'; import 'package:hive_test/hive_test.dart'; import 'package:stackwallet/app_config.dart'; import 'package:stackwallet/db/hive/db.dart'; @@ -218,8 +220,9 @@ void main() { final fakeStore = FakeSecureStorage(); final service = NodeService(secureStorageInterface: fakeStore); final nodes = service.nodes; - final defaults = - AppConfig.coins.map((e) => e.defaultNode(isPrimary: true)).toList(); + final defaults = AppConfig.coins + .map((e) => e.defaultNode(isPrimary: true)) + .toList(); nodes.sort((a, b) => a.id.compareTo(b.id)); defaults.sort((a, b) => a.id.compareTo(b.id)); diff --git a/test/widget_tests/address_book_card_test.mocks.dart b/test/widget_tests/address_book_card_test.mocks.dart index 220d5cd66..69a4da3a6 100644 --- a/test/widget_tests/address_book_card_test.mocks.dart +++ b/test/widget_tests/address_book_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/address_book_card_test.dart. // Do not manually edit this file. @@ -18,19 +18,16 @@ import 'package:stackwallet/services/address_book_service.dart' as _i3; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeContactEntry_0 extends _i1.SmartFake implements _i2.ContactEntry { - _FakeContactEntry_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeContactEntry_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AddressBookService]. @@ -43,121 +40,93 @@ class MockAddressBookService extends _i1.Mock } @override - List<_i2.ContactEntry> get contacts => (super.noSuchMethod( - Invocation.getter(#contacts), - returnValue: <_i2.ContactEntry>[], - ) as List<_i2.ContactEntry>); + List<_i2.ContactEntry> get contacts => + (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.ContactEntry>[], + ) + as List<_i2.ContactEntry>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i2.ContactEntry getContactById(String? id) => (super.noSuchMethod( - Invocation.method( - #getContactById, - [id], - ), - returnValue: _FakeContactEntry_0( - this, - Invocation.method( - #getContactById, - [id], - ), - ), - ) as _i2.ContactEntry); + _i2.ContactEntry getContactById(String? id) => + (super.noSuchMethod( + Invocation.method(#getContactById, [id]), + returnValue: _FakeContactEntry_0( + this, + Invocation.method(#getContactById, [id]), + ), + ) + as _i2.ContactEntry); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method( - #search, - [text], - ), - returnValue: - _i4.Future>.value(<_i2.ContactEntry>[]), - ) as _i4.Future>); + Invocation.method(#search, [text]), + returnValue: _i4.Future>.value( + <_i2.ContactEntry>[], + ), + ) + as _i4.Future>); @override - bool matches( - String? term, - _i2.ContactEntry? contact, - ) => + bool matches(String? term, _i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #matches, - [ - term, - contact, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#matches, [term, contact]), + returnValue: false, + ) + as bool); @override - _i4.Future addContact(_i2.ContactEntry? contact) => (super.noSuchMethod( - Invocation.method( - #addContact, - [contact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + _i4.Future addContact(_i2.ContactEntry? contact) => + (super.noSuchMethod( + Invocation.method(#addContact, [contact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future editContact(_i2.ContactEntry? editedContact) => (super.noSuchMethod( - Invocation.method( - #editContact, - [editedContact], - ), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + Invocation.method(#editContact, [editedContact]), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override - _i4.Future removeContact(String? id) => (super.noSuchMethod( - Invocation.method( - #removeContact, - [id], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i4.Future removeContact(String? id) => + (super.noSuchMethod( + Invocation.method(#removeContact, [id]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart b/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart index a7d302709..4ca9aa9fc 100644 --- a/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart +++ b/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/custom_buttons/favorite_toggle_test.dart. // Do not manually edit this file. @@ -7,9 +7,9 @@ import 'dart:async' as _i6; import 'dart:typed_data' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/isar/main_db.dart' as _i3; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; import 'package:stackwallet/models/isar/stack_theme.dart' as _i5; -import 'package:stackwallet/networking/http.dart' as _i2; +import 'package:stackwallet/networking/http.dart' as _i3; import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: type=lint @@ -20,29 +20,21 @@ import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member -class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP { - _FakeHTTP_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ThemeService]. @@ -54,118 +46,100 @@ class MockThemeService extends _i1.Mock implements _i4.ThemeService { } @override - _i2.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_0( - this, - Invocation.getter(#client), - ), - ) as _i2.HTTP); + _i2.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0(this, Invocation.getter(#db)), + ) + as _i2.MainDB); @override - set client(_i2.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i5.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i5.StackTheme>[], + ) + as List<_i5.StackTheme>); @override - List<_i5.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i5.StackTheme>[], - ) as List<_i5.StackTheme>); + set client(_i3.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override - void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i6.Future install({required _i7.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i6.Future>.value( - <_i4.StackThemeMetaData>[]), - ) as _i6.Future>); + _i6.Future> fetchThemes() => + (super.noSuchMethod( + Invocation.method(#fetchThemes, []), + returnValue: _i6.Future>.value( + <_i4.StackThemeMetaData>[], + ), + ) + as _i6.Future>); @override - _i6.Future<_i7.Uint8List> fetchTheme( - {required _i4.StackThemeMetaData? themeMetaData}) => + _i6.Future<_i7.Uint8List> fetchTheme({ + required _i4.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i6.Future<_i7.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) + as _i6.Future<_i7.Uint8List>); @override _i5.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i5.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i5.StackTheme?); } diff --git a/test/widget_tests/custom_loading_overlay_test.mocks.dart b/test/widget_tests/custom_loading_overlay_test.mocks.dart index 996bcf94c..f2c9a9f81 100644 --- a/test/widget_tests/custom_loading_overlay_test.mocks.dart +++ b/test/widget_tests/custom_loading_overlay_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/custom_loading_overlay_test.dart. // Do not manually edit this file. @@ -7,9 +7,9 @@ import 'dart:async' as _i6; import 'dart:typed_data' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/isar/main_db.dart' as _i3; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; import 'package:stackwallet/models/isar/stack_theme.dart' as _i5; -import 'package:stackwallet/networking/http.dart' as _i2; +import 'package:stackwallet/networking/http.dart' as _i3; import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: type=lint @@ -20,29 +20,21 @@ import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member -class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP { - _FakeHTTP_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ThemeService]. @@ -54,118 +46,100 @@ class MockThemeService extends _i1.Mock implements _i4.ThemeService { } @override - _i2.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_0( - this, - Invocation.getter(#client), - ), - ) as _i2.HTTP); + _i2.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0(this, Invocation.getter(#db)), + ) + as _i2.MainDB); @override - set client(_i2.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i5.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i5.StackTheme>[], + ) + as List<_i5.StackTheme>); @override - List<_i5.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i5.StackTheme>[], - ) as List<_i5.StackTheme>); + set client(_i3.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override - void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i6.Future install({required _i7.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i6.Future>.value( - <_i4.StackThemeMetaData>[]), - ) as _i6.Future>); + _i6.Future> fetchThemes() => + (super.noSuchMethod( + Invocation.method(#fetchThemes, []), + returnValue: _i6.Future>.value( + <_i4.StackThemeMetaData>[], + ), + ) + as _i6.Future>); @override - _i6.Future<_i7.Uint8List> fetchTheme( - {required _i4.StackThemeMetaData? themeMetaData}) => + _i6.Future<_i7.Uint8List> fetchTheme({ + required _i4.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i6.Future<_i7.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) + as _i6.Future<_i7.Uint8List>); @override _i5.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i5.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i5.StackTheme?); } diff --git a/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart b/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart index 802731670..96909d1a0 100644 --- a/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart +++ b/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/desktop/desktop_scaffold_test.dart. // Do not manually edit this file. @@ -7,9 +7,9 @@ import 'dart:async' as _i6; import 'dart:typed_data' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/isar/main_db.dart' as _i3; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; import 'package:stackwallet/models/isar/stack_theme.dart' as _i5; -import 'package:stackwallet/networking/http.dart' as _i2; +import 'package:stackwallet/networking/http.dart' as _i3; import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: type=lint @@ -20,29 +20,21 @@ import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member -class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP { - _FakeHTTP_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ThemeService]. @@ -54,118 +46,100 @@ class MockThemeService extends _i1.Mock implements _i4.ThemeService { } @override - _i2.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_0( - this, - Invocation.getter(#client), - ), - ) as _i2.HTTP); + _i2.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0(this, Invocation.getter(#db)), + ) + as _i2.MainDB); @override - set client(_i2.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i5.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i5.StackTheme>[], + ) + as List<_i5.StackTheme>); @override - List<_i5.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i5.StackTheme>[], - ) as List<_i5.StackTheme>); + set client(_i3.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override - void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i6.Future install({required _i7.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i6.Future>.value( - <_i4.StackThemeMetaData>[]), - ) as _i6.Future>); + _i6.Future> fetchThemes() => + (super.noSuchMethod( + Invocation.method(#fetchThemes, []), + returnValue: _i6.Future>.value( + <_i4.StackThemeMetaData>[], + ), + ) + as _i6.Future>); @override - _i6.Future<_i7.Uint8List> fetchTheme( - {required _i4.StackThemeMetaData? themeMetaData}) => + _i6.Future<_i7.Uint8List> fetchTheme({ + required _i4.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i6.Future<_i7.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) + as _i6.Future<_i7.Uint8List>); @override _i5.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i5.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i5.StackTheme?); } diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index 410094cdf..4cbe4bf17 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/managed_favorite_test.dart. // Do not manually edit this file. @@ -39,71 +39,43 @@ import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_i // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP { - _FakeHTTP_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFusionInfo_4 extends _i1.SmartFake implements _i7.FusionInfo { - _FakeFusionInfo_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_5 extends _i1.SmartFake implements _i8.SecureStorageInterface { - _FakeSecureStorageInterface_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -115,71 +87,60 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i10.Future deleteWallet( @@ -187,16 +148,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { _i8.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future load( @@ -205,17 +161,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future loadAfterStackRestore( @@ -224,17 +174,15 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } /// A class which mocks [ThemeService]. @@ -246,121 +194,102 @@ class MockThemeService extends _i1.Mock implements _i13.ThemeService { } @override - _i6.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_3( - this, - Invocation.getter(#client), - ), - ) as _i6.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i6.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i6.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_3(this, Invocation.getter(#client)), + ) + as _i6.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i14.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i14.StackTheme>[], + ) + as List<_i14.StackTheme>); @override - List<_i14.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i14.StackTheme>[], - ) as List<_i14.StackTheme>); + set client(_i6.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i10.Future install({required _i15.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i10.Future>.value( - <_i13.StackThemeMetaData>[]), - ) as _i10.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i10.Future>.value( + <_i13.StackThemeMetaData>[], + ), + ) + as _i10.Future>); @override - _i10.Future<_i15.Uint8List> fetchTheme( - {required _i13.StackThemeMetaData? themeMetaData}) => + _i10.Future<_i15.Uint8List> fetchTheme({ + required _i13.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i10.Future<_i15.Uint8List>.value(_i15.Uint8List(0)), - ) as _i10.Future<_i15.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i10.Future<_i15.Uint8List>.value(_i15.Uint8List(0)), + ) + as _i10.Future<_i15.Uint8List>); @override _i14.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i14.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i14.StackTheme?); } /// A class which mocks [Prefs]. @@ -372,425 +301,421 @@ class MockPrefs extends _i1.Mock implements _i12.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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i16.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i16.SyncingType.currentWalletOnly, + ) + as _i16.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i16.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i16.SyncingType.currentWalletOnly, - ) as _i16.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i16.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i18.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i18.BackupFrequencyType.everyTenMinutes, + ) + as _i18.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + _i19.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i19.Level.all, + ) + as _i19.Level); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), - returnValueForMissingStub: null, - ); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - _i18.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i18.BackupFrequencyType.everyTenMinutes, - ) as _i18.BackupFrequencyType); + set syncType(_i16.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i18.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); + + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i18.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -802,15 +727,6 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -821,264 +737,181 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i19.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i19.Level.all, - ) as _i19.Level); + set logLevel(_i19.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i19.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i20.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i20.AmountUnit.normal, - ) as _i20.AmountUnit); + _i20.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i20.AmountUnit.normal, + ) + as _i20.AmountUnit); @override void updateAmountUnit({ required _i4.CryptoCurrency? coin, required _i20.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i4.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i7.FusionInfo getFusionServerInfo(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_4( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i7.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_4( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i7.FusionInfo); @override void setFusionServerInfo( _i4.CryptoCurrency? coin, _i7.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [LocaleService]. @@ -1090,66 +923,53 @@ class MockLocaleService extends _i1.Mock implements _i22.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i17.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i17.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -1161,41 +981,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { } @override - _i8.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_5( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i8.SecureStorageInterface); + _i8.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_5( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i8.SecureStorageInterface); @override - List<_i23.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i23.NodeModel>[], - ) as List<_i23.NodeModel>); + List<_i23.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i23.NodeModel>[], + ) + as List<_i23.NodeModel>); @override - List<_i23.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i23.NodeModel>[], - ) as List<_i23.NodeModel>); + List<_i23.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i23.NodeModel>[], + ) + as List<_i23.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setPrimaryNodeFor({ @@ -1204,56 +1028,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i23.NodeModel? getPrimaryNodeFor({required _i4.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i23.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i23.NodeModel?); @override List<_i23.NodeModel> getNodesFor(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i23.NodeModel>[], - ) as List<_i23.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i23.NodeModel>[], + ) + as List<_i23.NodeModel>); @override _i23.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i23.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i23.NodeModel?); @override - List<_i23.NodeModel> failoverNodesFor( - {required _i4.CryptoCurrency? currency}) => + List<_i23.NodeModel> failoverNodesFor({ + required _i4.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i23.NodeModel>[], - ) as List<_i23.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i23.NodeModel>[], + ) + as List<_i23.NodeModel>); @override _i10.Future save( @@ -1262,34 +1075,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i10.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setEnabledState( @@ -1298,61 +1097,46 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/widget_tests/node_card_test.mocks.dart b/test/widget_tests/node_card_test.mocks.dart index 19c8c5166..a279b9bd3 100644 --- a/test/widget_tests/node_card_test.mocks.dart +++ b/test/widget_tests/node_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/node_card_test.dart. // Do not manually edit this file. @@ -22,20 +22,17 @@ import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeSecureStorageInterface_0 extends _i1.SmartFake implements _i2.SecureStorageInterface { - _FakeSecureStorageInterface_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [NodeService]. @@ -47,41 +44,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { } @override - _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_0( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i2.SecureStorageInterface); + _i2.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i2.SecureStorageInterface); @override - List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - List<_i4.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + List<_i4.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i5.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setPrimaryNodeFor({ @@ -90,56 +91,45 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i4.NodeModel? getPrimaryNodeFor({required _i6.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i4.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i4.NodeModel?); @override List<_i4.NodeModel> getNodesFor(_i6.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i4.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i4.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i4.NodeModel?); @override - List<_i4.NodeModel> failoverNodesFor( - {required _i6.CryptoCurrency? currency}) => + List<_i4.NodeModel> failoverNodesFor({ + required _i6.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i4.NodeModel>[], - ) as List<_i4.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i4.NodeModel>[], + ) + as List<_i4.NodeModel>); @override _i5.Future save( @@ -148,34 +138,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future setEnabledState( @@ -184,61 +160,46 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/widget_tests/node_options_sheet_test.mocks.dart b/test/widget_tests/node_options_sheet_test.mocks.dart index 9b7d99828..23b04ffd9 100644 --- a/test/widget_tests/node_options_sheet_test.mocks.dart +++ b/test/widget_tests/node_options_sheet_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/node_options_sheet_test.dart. // Do not manually edit this file. @@ -39,72 +39,44 @@ import 'package:tor_ffi_plugin/tor_ffi_plugin.dart' as _i22; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFusionInfo_3 extends _i1.SmartFake implements _i6.FusionInfo { - _FakeFusionInfo_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_4 extends _i1.SmartFake implements _i7.SecureStorageInterface { - _FakeSecureStorageInterface_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeInternetAddress_5 extends _i1.SmartFake implements _i8.InternetAddress { - _FakeInternetAddress_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeInternetAddress_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -116,71 +88,60 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i10.Future deleteWallet( @@ -188,16 +149,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { _i7.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future load( @@ -206,17 +162,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future loadAfterStackRestore( @@ -225,17 +175,15 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } /// A class which mocks [Prefs]. @@ -247,425 +195,421 @@ class MockPrefs extends _i1.Mock implements _i12.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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i13.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i13.SyncingType.currentWalletOnly, + ) + as _i13.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i13.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i13.SyncingType.currentWalletOnly, - ) as _i13.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i14.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i13.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i14.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i14.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i14.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i15.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i15.BackupFrequencyType.everyTenMinutes, + ) + as _i15.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i14.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i14.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i14.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + _i16.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i16.Level.all, + ) + as _i16.Level); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), - returnValueForMissingStub: null, - ); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - _i15.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i15.BackupFrequencyType.everyTenMinutes, - ) as _i15.BackupFrequencyType); + set syncType(_i13.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i15.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); + + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i15.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i14.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i14.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -677,15 +621,6 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i14.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -696,264 +631,181 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i16.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i16.Level.all, - ) as _i16.Level); + set logLevel(_i16.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i16.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i17.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i17.AmountUnit.normal, - ) as _i17.AmountUnit); + _i17.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i17.AmountUnit.normal, + ) + as _i17.AmountUnit); @override void updateAmountUnit({ required _i4.CryptoCurrency? coin, required _i17.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i4.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i6.FusionInfo getFusionServerInfo(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_3( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i6.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_3( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i6.FusionInfo); @override void setFusionServerInfo( _i4.CryptoCurrency? coin, _i6.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -965,41 +817,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { } @override - _i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_4( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i7.SecureStorageInterface); + _i7.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_4( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i7.SecureStorageInterface); @override - List<_i19.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + List<_i19.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i19.NodeModel>[], + ) + as List<_i19.NodeModel>); @override - List<_i19.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + List<_i19.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i19.NodeModel>[], + ) + as List<_i19.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setPrimaryNodeFor({ @@ -1008,56 +864,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i19.NodeModel? getPrimaryNodeFor({required _i4.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i19.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i19.NodeModel?); @override List<_i19.NodeModel> getNodesFor(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i19.NodeModel>[], + ) + as List<_i19.NodeModel>); @override _i19.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i19.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i19.NodeModel?); @override - List<_i19.NodeModel> failoverNodesFor( - {required _i4.CryptoCurrency? currency}) => + List<_i19.NodeModel> failoverNodesFor({ + required _i4.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i19.NodeModel>[], + ) + as List<_i19.NodeModel>); @override _i10.Future save( @@ -1066,34 +911,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i10.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setEnabledState( @@ -1102,63 +933,48 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [TorService]. @@ -1170,63 +986,52 @@ class MockTorService extends _i1.Mock implements _i20.TorService { } @override - _i21.TorConnectionStatus get status => (super.noSuchMethod( - Invocation.getter(#status), - returnValue: _i21.TorConnectionStatus.disconnected, - ) as _i21.TorConnectionStatus); + _i21.TorConnectionStatus get status => + (super.noSuchMethod( + Invocation.getter(#status), + returnValue: _i21.TorConnectionStatus.disconnected, + ) + as _i21.TorConnectionStatus); @override - ({_i8.InternetAddress host, int port}) getProxyInfo() => (super.noSuchMethod( - Invocation.method( - #getProxyInfo, - [], - ), - returnValue: ( - host: _FakeInternetAddress_5( - this, - Invocation.method( - #getProxyInfo, - [], + ({_i8.InternetAddress host, int port}) getProxyInfo() => + (super.noSuchMethod( + Invocation.method(#getProxyInfo, []), + returnValue: ( + host: _FakeInternetAddress_5( + this, + Invocation.method(#getProxyInfo, []), + ), + port: 0, ), - ), - port: 0 - ), - ) as ({_i8.InternetAddress host, int port})); + ) + as ({_i8.InternetAddress host, int port})); @override - void init({ - required String? torDataDirPath, - _i22.Tor? mockableOverride, - }) => + void init({required String? torDataDirPath, _i22.Tor? mockableOverride}) => super.noSuchMethod( - Invocation.method( - #init, - [], - { - #torDataDirPath: torDataDirPath, - #mockableOverride: mockableOverride, - }, - ), + Invocation.method(#init, [], { + #torDataDirPath: torDataDirPath, + #mockableOverride: mockableOverride, + }), returnValueForMissingStub: null, ); @override - _i10.Future start() => (super.noSuchMethod( - Invocation.method( - #start, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future start() => + (super.noSuchMethod( + Invocation.method(#start, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future disable() => (super.noSuchMethod( - Invocation.method( - #disable, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future disable() => + (super.noSuchMethod( + Invocation.method(#disable, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } diff --git a/test/widget_tests/table_view/table_view_row_test.mocks.dart b/test/widget_tests/table_view/table_view_row_test.mocks.dart index 4d7adcad3..68ede0329 100644 --- a/test/widget_tests/table_view/table_view_row_test.mocks.dart +++ b/test/widget_tests/table_view/table_view_row_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/table_view/table_view_row_test.dart. // Do not manually edit this file. @@ -29,50 +29,32 @@ import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP { - _FakeHTTP_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -84,71 +66,60 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i8.Future deleteWallet( @@ -156,16 +127,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { _i10.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future load( @@ -174,17 +140,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future loadAfterStackRestore( @@ -193,17 +153,15 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [ThemeService]. @@ -215,119 +173,100 @@ class MockThemeService extends _i1.Mock implements _i12.ThemeService { } @override - _i6.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_3( - this, - Invocation.getter(#client), - ), - ) as _i6.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i6.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i6.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_3(this, Invocation.getter(#client)), + ) + as _i6.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i13.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i13.StackTheme>[], + ) + as List<_i13.StackTheme>); @override - List<_i13.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i13.StackTheme>[], - ) as List<_i13.StackTheme>); + set client(_i6.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i8.Future install({required _i14.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i8.Future>.value( - <_i12.StackThemeMetaData>[]), - ) as _i8.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i8.Future>.value( + <_i12.StackThemeMetaData>[], + ), + ) + as _i8.Future>); @override - _i8.Future<_i14.Uint8List> fetchTheme( - {required _i12.StackThemeMetaData? themeMetaData}) => + _i8.Future<_i14.Uint8List> fetchTheme({ + required _i12.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i8.Future<_i14.Uint8List>.value(_i14.Uint8List(0)), - ) as _i8.Future<_i14.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i8.Future<_i14.Uint8List>.value(_i14.Uint8List(0)), + ) + as _i8.Future<_i14.Uint8List>); @override _i13.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i13.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i13.StackTheme?); } diff --git a/test/widget_tests/trade_card_test.mocks.dart b/test/widget_tests/trade_card_test.mocks.dart index a8080d990..a00409c0c 100644 --- a/test/widget_tests/trade_card_test.mocks.dart +++ b/test/widget_tests/trade_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/trade_card_test.dart. // Do not manually edit this file. @@ -8,9 +8,9 @@ import 'dart:typed_data' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/src/dummies.dart' as _i8; -import 'package:stackwallet/db/isar/main_db.dart' as _i3; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; import 'package:stackwallet/models/isar/stack_theme.dart' as _i5; -import 'package:stackwallet/networking/http.dart' as _i2; +import 'package:stackwallet/networking/http.dart' as _i3; import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: type=lint @@ -21,29 +21,21 @@ import 'package:stackwallet/themes/theme_service.dart' as _i4; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member -class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP { - _FakeHTTP_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeHTTP_1 extends _i1.SmartFake implements _i3.HTTP { + _FakeHTTP_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ThemeService]. @@ -55,120 +47,102 @@ class MockThemeService extends _i1.Mock implements _i4.ThemeService { } @override - _i2.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_0( - this, - Invocation.getter(#client), - ), - ) as _i2.HTTP); + _i2.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0(this, Invocation.getter(#db)), + ) + as _i2.MainDB); @override - set client(_i2.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i3.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_1(this, Invocation.getter(#client)), + ) + as _i3.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i5.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i5.StackTheme>[], + ) + as List<_i5.StackTheme>); @override - List<_i5.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i5.StackTheme>[], - ) as List<_i5.StackTheme>); + set client(_i3.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override - void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i6.Future install({required _i7.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i6.Future>.value( - <_i4.StackThemeMetaData>[]), - ) as _i6.Future>); + _i6.Future> fetchThemes() => + (super.noSuchMethod( + Invocation.method(#fetchThemes, []), + returnValue: _i6.Future>.value( + <_i4.StackThemeMetaData>[], + ), + ) + as _i6.Future>); @override - _i6.Future<_i7.Uint8List> fetchTheme( - {required _i4.StackThemeMetaData? themeMetaData}) => + _i6.Future<_i7.Uint8List> fetchTheme({ + required _i4.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i6.Future<_i7.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) + as _i6.Future<_i7.Uint8List>); @override _i5.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i5.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i5.StackTheme?); } /// A class which mocks [IThemeAssets]. @@ -180,164 +154,194 @@ class MockIThemeAssets extends _i1.Mock implements _i5.IThemeAssets { } @override - String get bellNew => (super.noSuchMethod( - Invocation.getter(#bellNew), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#bellNew), - ), - ) as String); + String get bellNew => + (super.noSuchMethod( + Invocation.getter(#bellNew), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#bellNew), + ), + ) + as String); @override - String get buy => (super.noSuchMethod( - Invocation.getter(#buy), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#buy), - ), - ) as String); + String get buy => + (super.noSuchMethod( + Invocation.getter(#buy), + returnValue: _i8.dummyValue(this, Invocation.getter(#buy)), + ) + as String); @override - String get exchange => (super.noSuchMethod( - Invocation.getter(#exchange), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#exchange), - ), - ) as String); + String get exchange => + (super.noSuchMethod( + Invocation.getter(#exchange), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#exchange), + ), + ) + as String); @override - String get personaIncognito => (super.noSuchMethod( - Invocation.getter(#personaIncognito), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#personaIncognito), - ), - ) as String); + String get personaIncognito => + (super.noSuchMethod( + Invocation.getter(#personaIncognito), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#personaIncognito), + ), + ) + as String); @override - String get personaEasy => (super.noSuchMethod( - Invocation.getter(#personaEasy), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#personaEasy), - ), - ) as String); + String get personaEasy => + (super.noSuchMethod( + Invocation.getter(#personaEasy), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#personaEasy), + ), + ) + as String); @override - String get stack => (super.noSuchMethod( - Invocation.getter(#stack), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#stack), - ), - ) as String); + String get stack => + (super.noSuchMethod( + Invocation.getter(#stack), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#stack), + ), + ) + as String); @override - String get stackIcon => (super.noSuchMethod( - Invocation.getter(#stackIcon), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#stackIcon), - ), - ) as String); + String get stackIcon => + (super.noSuchMethod( + Invocation.getter(#stackIcon), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#stackIcon), + ), + ) + as String); @override - String get receive => (super.noSuchMethod( - Invocation.getter(#receive), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#receive), - ), - ) as String); + String get receive => + (super.noSuchMethod( + Invocation.getter(#receive), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#receive), + ), + ) + as String); @override - String get receivePending => (super.noSuchMethod( - Invocation.getter(#receivePending), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#receivePending), - ), - ) as String); + String get receivePending => + (super.noSuchMethod( + Invocation.getter(#receivePending), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#receivePending), + ), + ) + as String); @override - String get receiveCancelled => (super.noSuchMethod( - Invocation.getter(#receiveCancelled), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#receiveCancelled), - ), - ) as String); + String get receiveCancelled => + (super.noSuchMethod( + Invocation.getter(#receiveCancelled), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#receiveCancelled), + ), + ) + as String); @override - String get send => (super.noSuchMethod( - Invocation.getter(#send), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#send), - ), - ) as String); + String get send => + (super.noSuchMethod( + Invocation.getter(#send), + returnValue: _i8.dummyValue(this, Invocation.getter(#send)), + ) + as String); @override - String get sendPending => (super.noSuchMethod( - Invocation.getter(#sendPending), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#sendPending), - ), - ) as String); + String get sendPending => + (super.noSuchMethod( + Invocation.getter(#sendPending), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#sendPending), + ), + ) + as String); @override - String get sendCancelled => (super.noSuchMethod( - Invocation.getter(#sendCancelled), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#sendCancelled), - ), - ) as String); + String get sendCancelled => + (super.noSuchMethod( + Invocation.getter(#sendCancelled), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#sendCancelled), + ), + ) + as String); @override - String get themeSelector => (super.noSuchMethod( - Invocation.getter(#themeSelector), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#themeSelector), - ), - ) as String); + String get themeSelector => + (super.noSuchMethod( + Invocation.getter(#themeSelector), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#themeSelector), + ), + ) + as String); @override - String get themePreview => (super.noSuchMethod( - Invocation.getter(#themePreview), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#themePreview), - ), - ) as String); + String get themePreview => + (super.noSuchMethod( + Invocation.getter(#themePreview), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#themePreview), + ), + ) + as String); @override - String get txExchange => (super.noSuchMethod( - Invocation.getter(#txExchange), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#txExchange), - ), - ) as String); + String get txExchange => + (super.noSuchMethod( + Invocation.getter(#txExchange), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#txExchange), + ), + ) + as String); @override - String get txExchangePending => (super.noSuchMethod( - Invocation.getter(#txExchangePending), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#txExchangePending), - ), - ) as String); + String get txExchangePending => + (super.noSuchMethod( + Invocation.getter(#txExchangePending), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#txExchangePending), + ), + ) + as String); @override - String get txExchangeFailed => (super.noSuchMethod( - Invocation.getter(#txExchangeFailed), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#txExchangeFailed), - ), - ) as String); + String get txExchangeFailed => + (super.noSuchMethod( + Invocation.getter(#txExchangeFailed), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#txExchangeFailed), + ), + ) + as String); } diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index cd8edb2ab..4ac1c8177 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/transaction_card_test.dart. // Do not manually edit this file. @@ -8,7 +8,7 @@ import 'dart:typed_data' as _i25; import 'dart:ui' as _i16; import 'package:decimal/decimal.dart' as _i22; -import 'package:isar/isar.dart' as _i8; +import 'package:isar_community/isar.dart' as _i8; import 'package:logger/logger.dart' as _i19; import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/src/dummies.dart' as _i15; @@ -47,91 +47,53 @@ import 'package:tuple/tuple.dart' as _i29; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFusionInfo_3 extends _i1.SmartFake implements _i6.FusionInfo { - _FakeFusionInfo_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFusionInfo_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDuration_4 extends _i1.SmartFake implements Duration { - _FakeDuration_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDuration_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_5 extends _i1.SmartFake implements _i7.HTTP { - _FakeHTTP_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeIsar_6 extends _i1.SmartFake implements _i8.Isar { - _FakeIsar_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIsar_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeQueryBuilder_7 extends _i1.SmartFake implements _i8.QueryBuilder { - _FakeQueryBuilder_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeQueryBuilder_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -143,71 +105,60 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i10.Future deleteWallet( @@ -215,16 +166,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { _i12.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future load( @@ -233,17 +179,11 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future loadAfterStackRestore( @@ -252,17 +192,15 @@ class MockWallets extends _i1.Mock implements _i9.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } /// A class which mocks [LocaleService]. @@ -274,66 +212,53 @@ class MockLocaleService extends _i1.Mock implements _i14.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [Prefs]. @@ -345,425 +270,421 @@ class MockPrefs extends _i1.Mock implements _i13.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, - ); + int get lastUnlocked => + (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) + as int); @override - int get lastUnlocked => (super.noSuchMethod( - Invocation.getter(#lastUnlocked), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( - Invocation.setter( - #lastUnlocked, - lastUnlocked, - ), - returnValueForMissingStub: null, - ); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + _i17.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i17.SyncingType.currentWalletOnly, + ) + as _i17.SyncingType); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + bool get wifiOnly => + (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) + as bool); @override - set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => - super.noSuchMethod( - Invocation.setter( - #walletIdsSyncOnStartup, - walletIdsSyncOnStartup, - ), - returnValueForMissingStub: null, - ); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - _i17.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i17.SyncingType.currentWalletOnly, - ) as _i17.SyncingType); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - set syncType(_i17.SyncingType? syncType) => super.noSuchMethod( - Invocation.setter( - #syncType, - syncType, - ), - returnValueForMissingStub: null, - ); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override - bool get wifiOnly => (super.noSuchMethod( - Invocation.getter(#wifiOnly), - returnValue: false, - ) as bool); + bool get randomizePIN => + (super.noSuchMethod(Invocation.getter(#randomizePIN), returnValue: false) + as bool); @override - set wifiOnly(bool? wifiOnly) => super.noSuchMethod( - Invocation.setter( - #wifiOnly, - wifiOnly, - ), - returnValueForMissingStub: null, - ); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get hasPin => + (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) + as bool); @override - set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter( - #showFavoriteWallets, - showFavoriteWallets, - ), - returnValueForMissingStub: null, - ); + bool get hasDuressPin => + (super.noSuchMethod(Invocation.getter(#hasDuressPin), returnValue: false) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#language), - ), - ) as String); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override - set language(String? newLanguage) => super.noSuchMethod( - Invocation.setter( - #language, - newLanguage, - ), - returnValueForMissingStub: null, - ); + int get familiarity => + (super.noSuchMethod(Invocation.getter(#familiarity), returnValue: 0) + as int); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#currency), - ), - ) as String); + bool get torKillSwitch => + (super.noSuchMethod(Invocation.getter(#torKillSwitch), returnValue: false) + as bool); @override - set currency(String? newCurrency) => super.noSuchMethod( - Invocation.setter( - #currency, - newCurrency, - ), - returnValueForMissingStub: null, - ); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get randomizePIN => (super.noSuchMethod( - Invocation.getter(#randomizePIN), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - set randomizePIN(bool? randomizePIN) => super.noSuchMethod( - Invocation.setter( - #randomizePIN, - randomizePIN, - ), - returnValueForMissingStub: null, - ); + _i18.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i18.BackupFrequencyType.everyTenMinutes, + ) + as _i18.BackupFrequencyType); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - set useBiometrics(bool? useBiometrics) => super.noSuchMethod( - Invocation.setter( - #useBiometrics, - useBiometrics, - ), - returnValueForMissingStub: null, - ); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override - bool get hasPin => (super.noSuchMethod( - Invocation.getter(#hasPin), - returnValue: false, - ) as bool); + bool get externalCalls => + (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) + as bool); @override - set hasPin(bool? hasPin) => super.noSuchMethod( - Invocation.setter( - #hasPin, - hasPin, - ), - returnValueForMissingStub: null, - ); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get hasDuressPin => (super.noSuchMethod( - Invocation.getter(#hasDuressPin), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( - Invocation.setter( - #hasDuressPin, - hasDuressPin, - ), - returnValueForMissingStub: null, - ); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( - Invocation.setter( - #biometricsDuress, - biometricsDuress, - ), - returnValueForMissingStub: null, - ); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override - int get familiarity => (super.noSuchMethod( - Invocation.getter(#familiarity), - returnValue: 0, - ) as int); + bool get useTor => + (super.noSuchMethod(Invocation.getter(#useTor), returnValue: false) + as bool); @override - set familiarity(int? familiarity) => super.noSuchMethod( - Invocation.setter( - #familiarity, - familiarity, - ), - returnValueForMissingStub: null, - ); + bool get autoPin => + (super.noSuchMethod(Invocation.getter(#autoPin), returnValue: false) + as bool); @override - bool get torKillSwitch => (super.noSuchMethod( - Invocation.getter(#torKillSwitch), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( - Invocation.setter( - #torKillSwitch, - torKillswitch, - ), - returnValueForMissingStub: null, - ); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + _i19.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i19.Level.all, + ) + as _i19.Level); @override - set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( - Invocation.setter( - #showTestNetCoins, - showTestNetCoins, - ), - returnValueForMissingStub: null, - ); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), + returnValueForMissingStub: null, + ); @override - set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter( - #isAutoBackupEnabled, - isAutoBackupEnabled, - ), - returnValueForMissingStub: null, - ); + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter(#lastUnlocked, lastUnlocked), + returnValueForMissingStub: null, + ); @override - set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter( - #autoBackupLocation, - autoBackupLocation, - ), + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), returnValueForMissingStub: null, ); @override - _i18.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i18.BackupFrequencyType.everyTenMinutes, - ) as _i18.BackupFrequencyType); + set syncType(_i17.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter(#syncType, syncType), + returnValueForMissingStub: null, + ); @override - set backupFrequencyType(_i18.BackupFrequencyType? backupFrequencyType) => - super.noSuchMethod( - Invocation.setter( - #backupFrequencyType, - backupFrequencyType, - ), - returnValueForMissingStub: null, - ); + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter(#wifiOnly, wifiOnly), + returnValueForMissingStub: null, + ); @override - set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( - Invocation.setter( - #lastAutoBackup, - lastAutoBackup, - ), - returnValueForMissingStub: null, - ); + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter(#showFavoriteWallets, showFavoriteWallets), + returnValueForMissingStub: null, + ); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter(#language, newLanguage), + returnValueForMissingStub: null, + ); @override - set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => - super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, - hideBlockExplorerWarning, - ), - returnValueForMissingStub: null, - ); + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter(#currency, newCurrency), + returnValueForMissingStub: null, + ); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + set randomizePIN(bool? randomizePIN) => super.noSuchMethod( + Invocation.setter(#randomizePIN, randomizePIN), + returnValueForMissingStub: null, + ); @override - set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter( - #gotoWalletOnStartup, - gotoWalletOnStartup, - ), - returnValueForMissingStub: null, - ); + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter(#useBiometrics, useBiometrics), + returnValueForMissingStub: null, + ); @override - set startupWalletId(String? startupWalletId) => super.noSuchMethod( - Invocation.setter( - #startupWalletId, - startupWalletId, - ), - returnValueForMissingStub: null, - ); + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter(#hasPin, hasPin), + returnValueForMissingStub: null, + ); @override - bool get externalCalls => (super.noSuchMethod( - Invocation.getter(#externalCalls), - returnValue: false, - ) as bool); + set hasDuressPin(bool? hasDuressPin) => super.noSuchMethod( + Invocation.setter(#hasDuressPin, hasDuressPin), + returnValueForMissingStub: null, + ); @override - set externalCalls(bool? externalCalls) => super.noSuchMethod( - Invocation.setter( - #externalCalls, - externalCalls, - ), - returnValueForMissingStub: null, - ); + set biometricsDuress(bool? biometricsDuress) => super.noSuchMethod( + Invocation.setter(#biometricsDuress, biometricsDuress), + returnValueForMissingStub: null, + ); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + set familiarity(int? familiarity) => super.noSuchMethod( + Invocation.setter(#familiarity, familiarity), + returnValueForMissingStub: null, + ); @override - set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( - Invocation.setter( - #enableCoinControl, - enableCoinControl, - ), + set torKillSwitch(bool? torKillswitch) => super.noSuchMethod( + Invocation.setter(#torKillSwitch, torKillswitch), + returnValueForMissingStub: null, + ); + + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter(#showTestNetCoins, showTestNetCoins), + returnValueForMissingStub: null, + ); + + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), + returnValueForMissingStub: null, + ); + + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter(#autoBackupLocation, autoBackupLocation), + returnValueForMissingStub: null, + ); + + @override + set backupFrequencyType(_i18.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter(#backupFrequencyType, backupFrequencyType), returnValueForMissingStub: null, ); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter(#lastAutoBackup, lastAutoBackup), + returnValueForMissingStub: null, + ); @override - set enableSystemBrightness(bool? enableSystemBrightness) => + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #enableSystemBrightness, - enableSystemBrightness, - ), + Invocation.setter(#hideBlockExplorerWarning, hideBlockExplorerWarning), returnValueForMissingStub: null, ); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#themeId), - ), - ) as String); + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), + returnValueForMissingStub: null, + ); @override - set themeId(String? themeId) => super.noSuchMethod( - Invocation.setter( - #themeId, - themeId, - ), + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter(#startupWalletId, startupWalletId), + returnValueForMissingStub: null, + ); + + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter(#externalCalls, externalCalls), + returnValueForMissingStub: null, + ); + + @override + set enableCoinControl(bool? enableCoinControl) => super.noSuchMethod( + Invocation.setter(#enableCoinControl, enableCoinControl), + returnValueForMissingStub: null, + ); + + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter(#enableSystemBrightness, enableSystemBrightness), returnValueForMissingStub: null, ); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + set themeId(String? themeId) => super.noSuchMethod( + Invocation.setter(#themeId, themeId), + returnValueForMissingStub: null, + ); @override set systemBrightnessLightThemeId(String? systemBrightnessLightThemeId) => @@ -775,15 +696,6 @@ class MockPrefs extends _i1.Mock implements _i13.Prefs { returnValueForMissingStub: null, ); - @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); - @override set systemBrightnessDarkThemeId(String? systemBrightnessDarkThemeId) => super.noSuchMethod( @@ -794,264 +706,181 @@ class MockPrefs extends _i1.Mock implements _i13.Prefs { returnValueForMissingStub: null, ); - @override - bool get useTor => (super.noSuchMethod( - Invocation.getter(#useTor), - returnValue: false, - ) as bool); - @override set useTor(bool? useTor) => super.noSuchMethod( - Invocation.setter( - #useTor, - useTor, - ), - returnValueForMissingStub: null, - ); - - @override - bool get autoPin => (super.noSuchMethod( - Invocation.getter(#autoPin), - returnValue: false, - ) as bool); + Invocation.setter(#useTor, useTor), + returnValueForMissingStub: null, + ); @override set autoPin(bool? autoPin) => super.noSuchMethod( - Invocation.setter( - #autoPin, - autoPin, - ), - returnValueForMissingStub: null, - ); - - @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + Invocation.setter(#autoPin, autoPin), + returnValueForMissingStub: null, + ); @override set enableExchange(bool? showExchange) => super.noSuchMethod( - Invocation.setter( - #enableExchange, - showExchange, - ), - returnValueForMissingStub: null, - ); - - @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + Invocation.setter(#enableExchange, showExchange), + returnValueForMissingStub: null, + ); @override set advancedFiroFeatures(bool? advancedFiroFeatures) => super.noSuchMethod( - Invocation.setter( - #advancedFiroFeatures, - advancedFiroFeatures, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#advancedFiroFeatures, advancedFiroFeatures), + returnValueForMissingStub: null, + ); @override set logsPath(String? logsPath) => super.noSuchMethod( - Invocation.setter( - #logsPath, - logsPath, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#logsPath, logsPath), + returnValueForMissingStub: null, + ); @override - _i19.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i19.Level.all, - ) as _i19.Level); + set logLevel(_i19.Level? logLevel) => super.noSuchMethod( + Invocation.setter(#logLevel, logLevel), + returnValueForMissingStub: null, + ); @override - set logLevel(_i19.Level? logLevel) => super.noSuchMethod( - Invocation.setter( - #logLevel, - logLevel, - ), + set autoLockInfo(({bool enabled, int minutes})? autoLockInfo) => + super.noSuchMethod( + Invocation.setter(#autoLockInfo, autoLockInfo), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i10.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method( - #incrementCurrentNotificationIndex, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method( - #isExternalCallsSet, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method( - #saveUserID, - [userId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method( - #saveSignupEpoch, - [signupEpoch], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i20.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #amountUnit, - [coin], - ), - returnValue: _i20.AmountUnit.normal, - ) as _i20.AmountUnit); + _i20.AmountUnit amountUnit(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i20.AmountUnit.normal, + ) + as _i20.AmountUnit); - @override - void updateAmountUnit({ - required _i4.CryptoCurrency? coin, - required _i20.AmountUnit? amountUnit, - }) => - super.noSuchMethod( - Invocation.method( - #updateAmountUnit, - [], - { - #coin: coin, - #amountUnit: amountUnit, - }, - ), - returnValueForMissingStub: null, - ); + @override + void updateAmountUnit({ + required _i4.CryptoCurrency? coin, + required _i20.AmountUnit? amountUnit, + }) => super.noSuchMethod( + Invocation.method(#updateAmountUnit, [], { + #coin: coin, + #amountUnit: amountUnit, + }), + returnValueForMissingStub: null, + ); @override - int maxDecimals(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #maxDecimals, - [coin], - ), - returnValue: 0, - ) as int); + int maxDecimals(_i4.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ required _i4.CryptoCurrency? coin, required int? maxDecimals, - }) => - super.noSuchMethod( - Invocation.method( - #updateMaxDecimals, - [], - { - #coin: coin, - #maxDecimals: maxDecimals, - }, - ), - returnValueForMissingStub: null, - ); + }) => super.noSuchMethod( + Invocation.method(#updateMaxDecimals, [], { + #coin: coin, + #maxDecimals: maxDecimals, + }), + returnValueForMissingStub: null, + ); @override _i6.FusionInfo getFusionServerInfo(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getFusionServerInfo, - [coin], - ), - returnValue: _FakeFusionInfo_3( - this, - Invocation.method( - #getFusionServerInfo, - [coin], - ), - ), - ) as _i6.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_3( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i6.FusionInfo); @override void setFusionServerInfo( _i4.CryptoCurrency? coin, _i6.FusionInfo? fusionServerInfo, - ) => - super.noSuchMethod( - Invocation.method( - #setFusionServerInfo, - [ - coin, - fusionServerInfo, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#setFusionServerInfo, [coin, fusionServerInfo]), + returnValueForMissingStub: null, + ); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [PriceService]. @@ -1063,124 +892,104 @@ class MockPriceService extends _i1.Mock implements _i21.PriceService { } @override - String get baseTicker => (super.noSuchMethod( - Invocation.getter(#baseTicker), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#baseTicker), - ), - ) as String); + String get baseTicker => + (super.noSuchMethod( + Invocation.getter(#baseTicker), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#baseTicker), + ), + ) + as String); @override - set baseTicker(String? _baseTicker) => super.noSuchMethod( - Invocation.setter( - #baseTicker, - _baseTicker, - ), - returnValueForMissingStub: null, - ); + _i10.Future> get tokenContractAddressesToCheck => + (super.noSuchMethod( + Invocation.getter(#tokenContractAddressesToCheck), + returnValue: _i10.Future>.value({}), + ) + as _i10.Future>); @override - Duration get updateInterval => (super.noSuchMethod( - Invocation.getter(#updateInterval), - returnValue: _FakeDuration_4( - this, - Invocation.getter(#updateInterval), - ), - ) as Duration); + Duration get updateInterval => + (super.noSuchMethod( + Invocation.getter(#updateInterval), + returnValue: _FakeDuration_4( + this, + Invocation.getter(#updateInterval), + ), + ) + as Duration); @override - _i10.Future> get tokenContractAddressesToCheck => - (super.noSuchMethod( - Invocation.getter(#tokenContractAddressesToCheck), - returnValue: _i10.Future>.value({}), - ) as _i10.Future>); + set baseTicker(String? value) => super.noSuchMethod( + Invocation.setter(#baseTicker, value), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override ({double change24h, _i22.Decimal value})? getPrice( - _i4.CryptoCurrency? coin) => - (super.noSuchMethod(Invocation.method( - #getPrice, - [coin], - )) as ({double change24h, _i22.Decimal value})?); + _i4.CryptoCurrency? coin, + ) => + (super.noSuchMethod(Invocation.method(#getPrice, [coin])) + as ({double change24h, _i22.Decimal value})?); @override ({double change24h, _i22.Decimal value})? getTokenPrice( - String? contractAddress) => - (super.noSuchMethod(Invocation.method( - #getTokenPrice, - [contractAddress], - )) as ({double change24h, _i22.Decimal value})?); + String? contractAddress, + ) => + (super.noSuchMethod(Invocation.method(#getTokenPrice, [contractAddress])) + as ({double change24h, _i22.Decimal value})?); @override - _i10.Future updatePrice() => (super.noSuchMethod( - Invocation.method( - #updatePrice, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updatePrice() => + (super.noSuchMethod( + Invocation.method(#updatePrice, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override void cancel() => super.noSuchMethod( - Invocation.method( - #cancel, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#cancel, []), + returnValueForMissingStub: null, + ); @override void start(bool? rightAway) => super.noSuchMethod( - Invocation.method( - #start, - [rightAway], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#start, [rightAway]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ThemeService]. @@ -1192,121 +1001,102 @@ class MockThemeService extends _i1.Mock implements _i23.ThemeService { } @override - _i7.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_5( - this, - Invocation.getter(#client), - ), - ) as _i7.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i7.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i7.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_5(this, Invocation.getter(#client)), + ) + as _i7.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i24.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i24.StackTheme>[], + ) + as List<_i24.StackTheme>); @override - List<_i24.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i24.StackTheme>[], - ) as List<_i24.StackTheme>); + set client(_i7.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i10.Future install({required _i25.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i10.Future>.value( - <_i23.StackThemeMetaData>[]), - ) as _i10.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i10.Future>.value( + <_i23.StackThemeMetaData>[], + ), + ) + as _i10.Future>); @override - _i10.Future<_i25.Uint8List> fetchTheme( - {required _i23.StackThemeMetaData? themeMetaData}) => + _i10.Future<_i25.Uint8List> fetchTheme({ + required _i23.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i10.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), - ) as _i10.Future<_i25.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i10.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), + ) + as _i10.Future<_i25.Uint8List>); @override _i24.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i24.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i24.StackTheme?); } /// A class which mocks [MainDB]. @@ -1318,179 +1108,150 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { } @override - _i8.Isar get isar => (super.noSuchMethod( - Invocation.getter(#isar), - returnValue: _FakeIsar_6( - this, - Invocation.getter(#isar), - ), - ) as _i8.Isar); + _i8.Isar get isar => + (super.noSuchMethod( + Invocation.getter(#isar), + returnValue: _FakeIsar_6(this, Invocation.getter(#isar)), + ) + as _i8.Isar); @override - _i10.Future initMainDB({_i8.Isar? mock}) => (super.noSuchMethod( - Invocation.method( - #initMainDB, - [], - {#mock: mock}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future initMainDB({_i8.Isar? mock}) => + (super.noSuchMethod( + Invocation.method(#initMainDB, [], {#mock: mock}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future putWalletInfo(_i11.WalletInfo? walletInfo) => (super.noSuchMethod( - Invocation.method( - #putWalletInfo, - [walletInfo], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#putWalletInfo, [walletInfo]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future updateWalletInfo(_i11.WalletInfo? walletInfo) => (super.noSuchMethod( - Invocation.method( - #updateWalletInfo, - [walletInfo], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#updateWalletInfo, [walletInfo]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - List<_i26.ContactEntry> getContactEntries() => (super.noSuchMethod( - Invocation.method( - #getContactEntries, - [], - ), - returnValue: <_i26.ContactEntry>[], - ) as List<_i26.ContactEntry>); + List<_i26.ContactEntry> getContactEntries() => + (super.noSuchMethod( + Invocation.method(#getContactEntries, []), + returnValue: <_i26.ContactEntry>[], + ) + as List<_i26.ContactEntry>); @override _i10.Future deleteContactEntry({required String? id}) => (super.noSuchMethod( - Invocation.method( - #deleteContactEntry, - [], - {#id: id}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#deleteContactEntry, [], {#id: id}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future isContactEntryExists({required String? id}) => (super.noSuchMethod( - Invocation.method( - #isContactEntryExists, - [], - {#id: id}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#isContactEntryExists, [], {#id: id}), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i26.ContactEntry? getContactEntry({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getContactEntry, - [], - {#id: id}, - )) as _i26.ContactEntry?); + (super.noSuchMethod(Invocation.method(#getContactEntry, [], {#id: id})) + as _i26.ContactEntry?); @override - _i10.Future putContactEntry( - {required _i26.ContactEntry? contactEntry}) => + _i10.Future putContactEntry({ + required _i26.ContactEntry? contactEntry, + }) => (super.noSuchMethod( - Invocation.method( - #putContactEntry, - [], - {#contactEntry: contactEntry}, - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#putContactEntry, [], { + #contactEntry: contactEntry, + }), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i27.TransactionBlockExplorer? getTransactionBlockExplorer( - {required _i4.CryptoCurrency? cryptoCurrency}) => - (super.noSuchMethod(Invocation.method( - #getTransactionBlockExplorer, - [], - {#cryptoCurrency: cryptoCurrency}, - )) as _i27.TransactionBlockExplorer?); + _i27.TransactionBlockExplorer? getTransactionBlockExplorer({ + required _i4.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getTransactionBlockExplorer, [], { + #cryptoCurrency: cryptoCurrency, + }), + ) + as _i27.TransactionBlockExplorer?); @override _i10.Future putTransactionBlockExplorer( - _i27.TransactionBlockExplorer? explorer) => + _i27.TransactionBlockExplorer? explorer, + ) => (super.noSuchMethod( - Invocation.method( - #putTransactionBlockExplorer, - [explorer], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#putTransactionBlockExplorer, [explorer]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i8.QueryBuilder<_i28.Address, _i28.Address, _i8.QAfterWhereClause> - getAddresses(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getAddresses, - [walletId], - ), - returnValue: _FakeQueryBuilder_7<_i28.Address, _i28.Address, - _i8.QAfterWhereClause>( - this, - Invocation.method( - #getAddresses, - [walletId], - ), - ), - ) as _i8 - .QueryBuilder<_i28.Address, _i28.Address, _i8.QAfterWhereClause>); - - @override - _i10.Future putAddress(_i28.Address? address) => (super.noSuchMethod( - Invocation.method( - #putAddress, - [address], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + getAddresses(String? walletId) => + (super.noSuchMethod( + Invocation.method(#getAddresses, [walletId]), + returnValue: + _FakeQueryBuilder_7< + _i28.Address, + _i28.Address, + _i8.QAfterWhereClause + >(this, Invocation.method(#getAddresses, [walletId])), + ) + as _i8.QueryBuilder< + _i28.Address, + _i28.Address, + _i8.QAfterWhereClause + >); + + @override + _i10.Future putAddress(_i28.Address? address) => + (super.noSuchMethod( + Invocation.method(#putAddress, [address]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i10.Future> putAddresses(List<_i28.Address>? addresses) => (super.noSuchMethod( - Invocation.method( - #putAddresses, - [addresses], - ), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + Invocation.method(#putAddresses, [addresses]), + returnValue: _i10.Future>.value([]), + ) + as _i10.Future>); @override _i10.Future> updateOrPutAddresses(List<_i28.Address>? addresses) => (super.noSuchMethod( - Invocation.method( - #updateOrPutAddresses, - [addresses], - ), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + Invocation.method(#updateOrPutAddresses, [addresses]), + returnValue: _i10.Future>.value([]), + ) + as _i10.Future>); @override - _i10.Future<_i28.Address?> getAddress( - String? walletId, - String? address, - ) => + _i10.Future<_i28.Address?> getAddress(String? walletId, String? address) => (super.noSuchMethod( - Invocation.method( - #getAddress, - [ - walletId, - address, - ], - ), - returnValue: _i10.Future<_i28.Address?>.value(), - ) as _i10.Future<_i28.Address?>); + Invocation.method(#getAddress, [walletId, address]), + returnValue: _i10.Future<_i28.Address?>.value(), + ) + as _i10.Future<_i28.Address?>); @override _i10.Future updateAddress( @@ -1498,54 +1259,46 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { _i28.Address? newAddress, ) => (super.noSuchMethod( - Invocation.method( - #updateAddress, - [ - oldAddress, - newAddress, - ], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#updateAddress, [oldAddress, newAddress]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i8.QueryBuilder<_i28.Transaction, _i28.Transaction, _i8.QAfterWhereClause> - getTransactions(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getTransactions, - [walletId], - ), - returnValue: _FakeQueryBuilder_7<_i28.Transaction, _i28.Transaction, - _i8.QAfterWhereClause>( - this, - Invocation.method( - #getTransactions, - [walletId], - ), - ), - ) as _i8.QueryBuilder<_i28.Transaction, _i28.Transaction, - _i8.QAfterWhereClause>); + getTransactions(String? walletId) => + (super.noSuchMethod( + Invocation.method(#getTransactions, [walletId]), + returnValue: + _FakeQueryBuilder_7< + _i28.Transaction, + _i28.Transaction, + _i8.QAfterWhereClause + >(this, Invocation.method(#getTransactions, [walletId])), + ) + as _i8.QueryBuilder< + _i28.Transaction, + _i28.Transaction, + _i8.QAfterWhereClause + >); @override _i10.Future putTransaction(_i28.Transaction? transaction) => (super.noSuchMethod( - Invocation.method( - #putTransaction, - [transaction], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#putTransaction, [transaction]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i10.Future> putTransactions( - List<_i28.Transaction>? transactions) => + List<_i28.Transaction>? transactions, + ) => (super.noSuchMethod( - Invocation.method( - #putTransactions, - [transactions], - ), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + Invocation.method(#putTransactions, [transactions]), + returnValue: _i10.Future>.value([]), + ) + as _i10.Future>); @override _i10.Future<_i28.Transaction?> getTransaction( @@ -1553,15 +1306,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { String? txid, ) => (super.noSuchMethod( - Invocation.method( - #getTransaction, - [ - walletId, - txid, - ], - ), - returnValue: _i10.Future<_i28.Transaction?>.value(), - ) as _i10.Future<_i28.Transaction?>); + Invocation.method(#getTransaction, [walletId, txid]), + returnValue: _i10.Future<_i28.Transaction?>.value(), + ) + as _i10.Future<_i28.Transaction?>); @override _i10.Stream<_i28.Transaction?> watchTransaction({ @@ -1569,98 +1317,71 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { bool? fireImmediately = false, }) => (super.noSuchMethod( - Invocation.method( - #watchTransaction, - [], - { - #id: id, - #fireImmediately: fireImmediately, - }, - ), - returnValue: _i10.Stream<_i28.Transaction?>.empty(), - ) as _i10.Stream<_i28.Transaction?>); + Invocation.method(#watchTransaction, [], { + #id: id, + #fireImmediately: fireImmediately, + }), + returnValue: _i10.Stream<_i28.Transaction?>.empty(), + ) + as _i10.Stream<_i28.Transaction?>); @override _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterWhereClause> getUTXOs( - String? walletId) => - (super.noSuchMethod( - Invocation.method( - #getUTXOs, - [walletId], - ), - returnValue: - _FakeQueryBuilder_7<_i28.UTXO, _i28.UTXO, _i8.QAfterWhereClause>( - this, - Invocation.method( - #getUTXOs, - [walletId], - ), - ), - ) as _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterWhereClause>); - - @override - _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterFilterCondition> - getUTXOsByAddress( String? walletId, - String? address, ) => - (super.noSuchMethod( - Invocation.method( - #getUTXOsByAddress, - [ - walletId, - address, - ], - ), - returnValue: _FakeQueryBuilder_7<_i28.UTXO, _i28.UTXO, - _i8.QAfterFilterCondition>( - this, - Invocation.method( - #getUTXOsByAddress, - [ - walletId, - address, - ], - ), - ), - ) as _i8 - .QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterFilterCondition>); + (super.noSuchMethod( + Invocation.method(#getUTXOs, [walletId]), + returnValue: + _FakeQueryBuilder_7< + _i28.UTXO, + _i28.UTXO, + _i8.QAfterWhereClause + >(this, Invocation.method(#getUTXOs, [walletId])), + ) + as _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterWhereClause>); @override - _i10.Future putUTXO(_i28.UTXO? utxo) => (super.noSuchMethod( - Invocation.method( - #putUTXO, - [utxo], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterFilterCondition> + getUTXOsByAddress(String? walletId, String? address) => + (super.noSuchMethod( + Invocation.method(#getUTXOsByAddress, [walletId, address]), + returnValue: + _FakeQueryBuilder_7< + _i28.UTXO, + _i28.UTXO, + _i8.QAfterFilterCondition + >( + this, + Invocation.method(#getUTXOsByAddress, [walletId, address]), + ), + ) + as _i8.QueryBuilder<_i28.UTXO, _i28.UTXO, _i8.QAfterFilterCondition>); + + @override + _i10.Future putUTXO(_i28.UTXO? utxo) => + (super.noSuchMethod( + Invocation.method(#putUTXO, [utxo]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future putUTXOs(List<_i28.UTXO>? utxos) => (super.noSuchMethod( - Invocation.method( - #putUTXOs, - [utxos], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future putUTXOs(List<_i28.UTXO>? utxos) => + (super.noSuchMethod( + Invocation.method(#putUTXOs, [utxos]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future updateUTXOs( - String? walletId, - List<_i28.UTXO>? utxos, - ) => + _i10.Future updateUTXOs(String? walletId, List<_i28.UTXO>? utxos) => (super.noSuchMethod( - Invocation.method( - #updateUTXOs, - [ - walletId, - utxos, - ], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + Invocation.method(#updateUTXOs, [walletId, utxos]), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Stream<_i28.UTXO?> watchUTXO({ @@ -1668,59 +1389,55 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { bool? fireImmediately = false, }) => (super.noSuchMethod( - Invocation.method( - #watchUTXO, - [], - { - #id: id, - #fireImmediately: fireImmediately, - }, - ), - returnValue: _i10.Stream<_i28.UTXO?>.empty(), - ) as _i10.Stream<_i28.UTXO?>); - - @override - _i8.QueryBuilder<_i28.TransactionNote, _i28.TransactionNote, - _i8.QAfterWhereClause> getTransactionNotes( - String? walletId) => + Invocation.method(#watchUTXO, [], { + #id: id, + #fireImmediately: fireImmediately, + }), + returnValue: _i10.Stream<_i28.UTXO?>.empty(), + ) + as _i10.Stream<_i28.UTXO?>); + + @override + _i8.QueryBuilder< + _i28.TransactionNote, + _i28.TransactionNote, + _i8.QAfterWhereClause + > + getTransactionNotes(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getTransactionNotes, - [walletId], - ), - returnValue: _FakeQueryBuilder_7<_i28.TransactionNote, - _i28.TransactionNote, _i8.QAfterWhereClause>( - this, - Invocation.method( - #getTransactionNotes, - [walletId], - ), - ), - ) as _i8.QueryBuilder<_i28.TransactionNote, _i28.TransactionNote, - _i8.QAfterWhereClause>); + Invocation.method(#getTransactionNotes, [walletId]), + returnValue: + _FakeQueryBuilder_7< + _i28.TransactionNote, + _i28.TransactionNote, + _i8.QAfterWhereClause + >(this, Invocation.method(#getTransactionNotes, [walletId])), + ) + as _i8.QueryBuilder< + _i28.TransactionNote, + _i28.TransactionNote, + _i8.QAfterWhereClause + >); @override _i10.Future putTransactionNote(_i28.TransactionNote? transactionNote) => (super.noSuchMethod( - Invocation.method( - #putTransactionNote, - [transactionNote], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#putTransactionNote, [transactionNote]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future putTransactionNotes( - List<_i28.TransactionNote>? transactionNotes) => + List<_i28.TransactionNote>? transactionNotes, + ) => (super.noSuchMethod( - Invocation.method( - #putTransactionNotes, - [transactionNotes], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#putTransactionNotes, [transactionNotes]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future<_i28.TransactionNote?> getTransactionNote( @@ -1728,15 +1445,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { String? txid, ) => (super.noSuchMethod( - Invocation.method( - #getTransactionNote, - [ - walletId, - txid, - ], - ), - returnValue: _i10.Future<_i28.TransactionNote?>.value(), - ) as _i10.Future<_i28.TransactionNote?>); + Invocation.method(#getTransactionNote, [walletId, txid]), + returnValue: _i10.Future<_i28.TransactionNote?>.value(), + ) + as _i10.Future<_i28.TransactionNote?>); @override _i10.Stream<_i28.TransactionNote?> watchTransactionNote({ @@ -1744,65 +1456,56 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { bool? fireImmediately = false, }) => (super.noSuchMethod( - Invocation.method( - #watchTransactionNote, - [], - { - #id: id, - #fireImmediately: fireImmediately, - }, - ), - returnValue: _i10.Stream<_i28.TransactionNote?>.empty(), - ) as _i10.Stream<_i28.TransactionNote?>); + Invocation.method(#watchTransactionNote, [], { + #id: id, + #fireImmediately: fireImmediately, + }), + returnValue: _i10.Stream<_i28.TransactionNote?>.empty(), + ) + as _i10.Stream<_i28.TransactionNote?>); @override _i8.QueryBuilder<_i28.AddressLabel, _i28.AddressLabel, _i8.QAfterWhereClause> - getAddressLabels(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getAddressLabels, - [walletId], - ), - returnValue: _FakeQueryBuilder_7<_i28.AddressLabel, - _i28.AddressLabel, _i8.QAfterWhereClause>( - this, - Invocation.method( - #getAddressLabels, - [walletId], - ), - ), - ) as _i8.QueryBuilder<_i28.AddressLabel, _i28.AddressLabel, - _i8.QAfterWhereClause>); + getAddressLabels(String? walletId) => + (super.noSuchMethod( + Invocation.method(#getAddressLabels, [walletId]), + returnValue: + _FakeQueryBuilder_7< + _i28.AddressLabel, + _i28.AddressLabel, + _i8.QAfterWhereClause + >(this, Invocation.method(#getAddressLabels, [walletId])), + ) + as _i8.QueryBuilder< + _i28.AddressLabel, + _i28.AddressLabel, + _i8.QAfterWhereClause + >); @override _i10.Future putAddressLabel(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( - Invocation.method( - #putAddressLabel, - [addressLabel], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#putAddressLabel, [addressLabel]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override int putAddressLabelSync(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( - Invocation.method( - #putAddressLabelSync, - [addressLabel], - ), - returnValue: 0, - ) as int); + Invocation.method(#putAddressLabelSync, [addressLabel]), + returnValue: 0, + ) + as int); @override _i10.Future putAddressLabels(List<_i28.AddressLabel>? addressLabels) => (super.noSuchMethod( - Invocation.method( - #putAddressLabels, - [addressLabels], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#putAddressLabels, [addressLabels]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future<_i28.AddressLabel?> getAddressLabel( @@ -1810,28 +1513,20 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { String? addressString, ) => (super.noSuchMethod( - Invocation.method( - #getAddressLabel, - [ - walletId, - addressString, - ], - ), - returnValue: _i10.Future<_i28.AddressLabel?>.value(), - ) as _i10.Future<_i28.AddressLabel?>); + Invocation.method(#getAddressLabel, [walletId, addressString]), + returnValue: _i10.Future<_i28.AddressLabel?>.value(), + ) + as _i10.Future<_i28.AddressLabel?>); @override _i28.AddressLabel? getAddressLabelSync( String? walletId, String? addressString, ) => - (super.noSuchMethod(Invocation.method( - #getAddressLabelSync, - [ - walletId, - addressString, - ], - )) as _i28.AddressLabel?); + (super.noSuchMethod( + Invocation.method(#getAddressLabelSync, [walletId, addressString]), + ) + as _i28.AddressLabel?); @override _i10.Stream<_i28.AddressLabel?> watchAddressLabel({ @@ -1839,59 +1534,48 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { bool? fireImmediately = false, }) => (super.noSuchMethod( - Invocation.method( - #watchAddressLabel, - [], - { - #id: id, - #fireImmediately: fireImmediately, - }, - ), - returnValue: _i10.Stream<_i28.AddressLabel?>.empty(), - ) as _i10.Stream<_i28.AddressLabel?>); + Invocation.method(#watchAddressLabel, [], { + #id: id, + #fireImmediately: fireImmediately, + }), + returnValue: _i10.Stream<_i28.AddressLabel?>.empty(), + ) + as _i10.Stream<_i28.AddressLabel?>); @override _i10.Future updateAddressLabel(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( - Invocation.method( - #updateAddressLabel, - [addressLabel], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#updateAddressLabel, [addressLabel]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i10.Future deleteWalletBlockchainData(String? walletId) => (super.noSuchMethod( - Invocation.method( - #deleteWalletBlockchainData, - [walletId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteWalletBlockchainData, [walletId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future deleteAddressLabels(String? walletId) => (super.noSuchMethod( - Invocation.method( - #deleteAddressLabels, - [walletId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteAddressLabels, [walletId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future deleteTransactionNotes(String? walletId) => (super.noSuchMethod( - Invocation.method( - #deleteTransactionNotes, - [walletId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#deleteTransactionNotes, [walletId]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future addNewTransactionData( @@ -1899,83 +1583,70 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { String? walletId, ) => (super.noSuchMethod( - Invocation.method( - #addNewTransactionData, - [ - transactionsData, - walletId, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#addNewTransactionData, [ + transactionsData, + walletId, + ]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future> updateOrPutTransactionV2s( - List<_i30.TransactionV2>? transactions) => + List<_i30.TransactionV2>? transactions, + ) => (super.noSuchMethod( - Invocation.method( - #updateOrPutTransactionV2s, - [transactions], - ), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + Invocation.method(#updateOrPutTransactionV2s, [transactions]), + returnValue: _i10.Future>.value([]), + ) + as _i10.Future>); @override _i8.QueryBuilder<_i28.EthContract, _i28.EthContract, _i8.QWhere> - getEthContracts() => (super.noSuchMethod( - Invocation.method( - #getEthContracts, - [], - ), - returnValue: _FakeQueryBuilder_7<_i28.EthContract, _i28.EthContract, - _i8.QWhere>( - this, - Invocation.method( - #getEthContracts, - [], - ), - ), - ) as _i8 - .QueryBuilder<_i28.EthContract, _i28.EthContract, _i8.QWhere>); + getEthContracts() => + (super.noSuchMethod( + Invocation.method(#getEthContracts, []), + returnValue: + _FakeQueryBuilder_7< + _i28.EthContract, + _i28.EthContract, + _i8.QWhere + >(this, Invocation.method(#getEthContracts, [])), + ) + as _i8.QueryBuilder<_i28.EthContract, _i28.EthContract, _i8.QWhere>); @override _i10.Future<_i28.EthContract?> getEthContract(String? contractAddress) => (super.noSuchMethod( - Invocation.method( - #getEthContract, - [contractAddress], - ), - returnValue: _i10.Future<_i28.EthContract?>.value(), - ) as _i10.Future<_i28.EthContract?>); + Invocation.method(#getEthContract, [contractAddress]), + returnValue: _i10.Future<_i28.EthContract?>.value(), + ) + as _i10.Future<_i28.EthContract?>); @override _i28.EthContract? getEthContractSync(String? contractAddress) => - (super.noSuchMethod(Invocation.method( - #getEthContractSync, - [contractAddress], - )) as _i28.EthContract?); + (super.noSuchMethod( + Invocation.method(#getEthContractSync, [contractAddress]), + ) + as _i28.EthContract?); @override _i10.Future putEthContract(_i28.EthContract? contract) => (super.noSuchMethod( - Invocation.method( - #putEthContract, - [contract], - ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + Invocation.method(#putEthContract, [contract]), + returnValue: _i10.Future.value(0), + ) + as _i10.Future); @override _i10.Future putEthContracts(List<_i28.EthContract>? contracts) => (super.noSuchMethod( - Invocation.method( - #putEthContracts, - [contracts], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#putEthContracts, [contracts]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); } /// A class which mocks [IThemeAssets]. @@ -1987,164 +1658,197 @@ class MockIThemeAssets extends _i1.Mock implements _i24.IThemeAssets { } @override - String get bellNew => (super.noSuchMethod( - Invocation.getter(#bellNew), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#bellNew), - ), - ) as String); + String get bellNew => + (super.noSuchMethod( + Invocation.getter(#bellNew), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#bellNew), + ), + ) + as String); @override - String get buy => (super.noSuchMethod( - Invocation.getter(#buy), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#buy), - ), - ) as String); + String get buy => + (super.noSuchMethod( + Invocation.getter(#buy), + returnValue: _i15.dummyValue(this, Invocation.getter(#buy)), + ) + as String); @override - String get exchange => (super.noSuchMethod( - Invocation.getter(#exchange), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#exchange), - ), - ) as String); + String get exchange => + (super.noSuchMethod( + Invocation.getter(#exchange), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#exchange), + ), + ) + as String); @override - String get personaIncognito => (super.noSuchMethod( - Invocation.getter(#personaIncognito), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#personaIncognito), - ), - ) as String); + String get personaIncognito => + (super.noSuchMethod( + Invocation.getter(#personaIncognito), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#personaIncognito), + ), + ) + as String); @override - String get personaEasy => (super.noSuchMethod( - Invocation.getter(#personaEasy), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#personaEasy), - ), - ) as String); + String get personaEasy => + (super.noSuchMethod( + Invocation.getter(#personaEasy), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#personaEasy), + ), + ) + as String); @override - String get stack => (super.noSuchMethod( - Invocation.getter(#stack), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#stack), - ), - ) as String); + String get stack => + (super.noSuchMethod( + Invocation.getter(#stack), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#stack), + ), + ) + as String); @override - String get stackIcon => (super.noSuchMethod( - Invocation.getter(#stackIcon), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#stackIcon), - ), - ) as String); + String get stackIcon => + (super.noSuchMethod( + Invocation.getter(#stackIcon), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#stackIcon), + ), + ) + as String); @override - String get receive => (super.noSuchMethod( - Invocation.getter(#receive), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#receive), - ), - ) as String); + String get receive => + (super.noSuchMethod( + Invocation.getter(#receive), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#receive), + ), + ) + as String); @override - String get receivePending => (super.noSuchMethod( - Invocation.getter(#receivePending), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#receivePending), - ), - ) as String); + String get receivePending => + (super.noSuchMethod( + Invocation.getter(#receivePending), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#receivePending), + ), + ) + as String); @override - String get receiveCancelled => (super.noSuchMethod( - Invocation.getter(#receiveCancelled), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#receiveCancelled), - ), - ) as String); + String get receiveCancelled => + (super.noSuchMethod( + Invocation.getter(#receiveCancelled), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#receiveCancelled), + ), + ) + as String); @override - String get send => (super.noSuchMethod( - Invocation.getter(#send), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#send), - ), - ) as String); + String get send => + (super.noSuchMethod( + Invocation.getter(#send), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#send), + ), + ) + as String); @override - String get sendPending => (super.noSuchMethod( - Invocation.getter(#sendPending), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#sendPending), - ), - ) as String); + String get sendPending => + (super.noSuchMethod( + Invocation.getter(#sendPending), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#sendPending), + ), + ) + as String); @override - String get sendCancelled => (super.noSuchMethod( - Invocation.getter(#sendCancelled), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#sendCancelled), - ), - ) as String); + String get sendCancelled => + (super.noSuchMethod( + Invocation.getter(#sendCancelled), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#sendCancelled), + ), + ) + as String); @override - String get themeSelector => (super.noSuchMethod( - Invocation.getter(#themeSelector), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#themeSelector), - ), - ) as String); + String get themeSelector => + (super.noSuchMethod( + Invocation.getter(#themeSelector), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#themeSelector), + ), + ) + as String); @override - String get themePreview => (super.noSuchMethod( - Invocation.getter(#themePreview), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#themePreview), - ), - ) as String); + String get themePreview => + (super.noSuchMethod( + Invocation.getter(#themePreview), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#themePreview), + ), + ) + as String); @override - String get txExchange => (super.noSuchMethod( - Invocation.getter(#txExchange), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#txExchange), - ), - ) as String); + String get txExchange => + (super.noSuchMethod( + Invocation.getter(#txExchange), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#txExchange), + ), + ) + as String); @override - String get txExchangePending => (super.noSuchMethod( - Invocation.getter(#txExchangePending), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#txExchangePending), - ), - ) as String); + String get txExchangePending => + (super.noSuchMethod( + Invocation.getter(#txExchangePending), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#txExchangePending), + ), + ) + as String); @override - String get txExchangeFailed => (super.noSuchMethod( - Invocation.getter(#txExchangeFailed), - returnValue: _i15.dummyValue( - this, - Invocation.getter(#txExchangeFailed), - ), - ) as String); + String get txExchangeFailed => + (super.noSuchMethod( + Invocation.getter(#txExchangeFailed), + returnValue: _i15.dummyValue( + this, + Invocation.getter(#txExchangeFailed), + ), + ) + as String); } diff --git a/test/widget_tests/wallet_card_test.mocks.dart b/test/widget_tests/wallet_card_test.mocks.dart index 1ba8ca158..9feb9a1b9 100644 --- a/test/widget_tests/wallet_card_test.mocks.dart +++ b/test/widget_tests/wallet_card_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/wallet_card_test.dart. // Do not manually edit this file. @@ -32,50 +32,32 @@ import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP { - _FakeHTTP_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -87,71 +69,60 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i8.Future deleteWallet( @@ -159,16 +130,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { _i10.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future load( @@ -177,17 +143,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future loadAfterStackRestore( @@ -196,17 +156,15 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [LocaleService]. @@ -218,66 +176,53 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { } @override - String get locale => (super.noSuchMethod( - Invocation.getter(#locale), - returnValue: _i13.dummyValue( - this, - Invocation.getter(#locale), - ), - ) as String); + String get locale => + (super.noSuchMethod( + Invocation.getter(#locale), + returnValue: _i13.dummyValue( + this, + Invocation.getter(#locale), + ), + ) + as String); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i8.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( - Invocation.method( - #loadLocale, - [], - {#notify: notify}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future loadLocale({bool? notify = true}) => + (super.noSuchMethod( + Invocation.method(#loadLocale, [], {#notify: notify}), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ThemeService]. @@ -289,119 +234,100 @@ class MockThemeService extends _i1.Mock implements _i15.ThemeService { } @override - _i6.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_3( - this, - Invocation.getter(#client), - ), - ) as _i6.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i6.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i6.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_3(this, Invocation.getter(#client)), + ) + as _i6.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i16.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i16.StackTheme>[], + ) + as List<_i16.StackTheme>); @override - List<_i16.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i16.StackTheme>[], - ) as List<_i16.StackTheme>); + set client(_i6.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i8.Future install({required _i17.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i8.Future>.value( - <_i15.StackThemeMetaData>[]), - ) as _i8.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i8.Future>.value( + <_i15.StackThemeMetaData>[], + ), + ) + as _i8.Future>); @override - _i8.Future<_i17.Uint8List> fetchTheme( - {required _i15.StackThemeMetaData? themeMetaData}) => + _i8.Future<_i17.Uint8List> fetchTheme({ + required _i15.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i8.Future<_i17.Uint8List>.value(_i17.Uint8List(0)), - ) as _i8.Future<_i17.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i8.Future<_i17.Uint8List>.value(_i17.Uint8List(0)), + ) + as _i8.Future<_i17.Uint8List>); @override _i16.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i16.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i16.StackTheme?); } diff --git a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart index d406a0c35..94f1c2740 100644 --- a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart. // Do not manually edit this file. @@ -27,51 +27,33 @@ import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_3 extends _i1.SmartFake implements _i6.SecureStorageInterface { - _FakeSecureStorageInterface_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -83,71 +65,60 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i8.Future deleteWallet( @@ -155,16 +126,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { _i6.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future load( @@ -173,17 +139,11 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future loadAfterStackRestore( @@ -192,17 +152,15 @@ class MockWallets extends _i1.Mock implements _i7.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [NodeService]. @@ -214,41 +172,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { } @override - _i6.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_3( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i6.SecureStorageInterface); + _i6.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_3( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i6.SecureStorageInterface); @override - List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + List<_i11.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i11.NodeModel>[], + ) + as List<_i11.NodeModel>); @override - List<_i11.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + List<_i11.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i11.NodeModel>[], + ) + as List<_i11.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i8.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future setPrimaryNodeFor({ @@ -257,56 +219,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i11.NodeModel? getPrimaryNodeFor({required _i4.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i11.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i11.NodeModel?); @override List<_i11.NodeModel> getNodesFor(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i11.NodeModel>[], + ) + as List<_i11.NodeModel>); @override _i11.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i11.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i11.NodeModel?); @override - List<_i11.NodeModel> failoverNodesFor( - {required _i4.CryptoCurrency? currency}) => + List<_i11.NodeModel> failoverNodesFor({ + required _i4.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i11.NodeModel>[], + ) + as List<_i11.NodeModel>); @override _i8.Future save( @@ -315,34 +266,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future setEnabledState( @@ -351,61 +288,46 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart index 6018c1f93..4aad121c6 100644 --- a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in stackwallet/test/widget_tests/wallet_info_row/wallet_info_row_test.dart. // Do not manually edit this file. @@ -31,61 +31,38 @@ import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService { - _FakeNodeService_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNodeService_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB { - _FakeMainDB_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMainDB_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWallet_2 extends _i1.SmartFake implements _i5.Wallet { - _FakeWallet_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWallet_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP { - _FakeHTTP_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeHTTP_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSecureStorageInterface_4 extends _i1.SmartFake implements _i7.SecureStorageInterface { - _FakeSecureStorageInterface_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSecureStorageInterface_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Wallets]. @@ -97,71 +74,60 @@ class MockWallets extends _i1.Mock implements _i8.Wallets { } @override - _i2.NodeService get nodeService => (super.noSuchMethod( - Invocation.getter(#nodeService), - returnValue: _FakeNodeService_0( - this, - Invocation.getter(#nodeService), - ), - ) as _i2.NodeService); + _i2.NodeService get nodeService => + (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_0( + this, + Invocation.getter(#nodeService), + ), + ) + as _i2.NodeService); @override - set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod( - Invocation.setter( - #nodeService, - _nodeService, - ), - returnValueForMissingStub: null, - ); + _i3.MainDB get mainDB => + (super.noSuchMethod( + Invocation.getter(#mainDB), + returnValue: _FakeMainDB_1(this, Invocation.getter(#mainDB)), + ) + as _i3.MainDB); @override - _i3.MainDB get mainDB => (super.noSuchMethod( - Invocation.getter(#mainDB), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#mainDB), - ), - ) as _i3.MainDB); + List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => + (super.noSuchMethod( + Invocation.getter(#wallets), + returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], + ) + as List<_i5.Wallet<_i4.CryptoCurrency>>); @override - set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod( - Invocation.setter( - #mainDB, - _mainDB, - ), - returnValueForMissingStub: null, - ); + set nodeService(_i2.NodeService? value) => super.noSuchMethod( + Invocation.setter(#nodeService, value), + returnValueForMissingStub: null, + ); @override - List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod( - Invocation.getter(#wallets), - returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[], - ) as List<_i5.Wallet<_i4.CryptoCurrency>>); + set mainDB(_i3.MainDB? value) => super.noSuchMethod( + Invocation.setter(#mainDB, value), + returnValueForMissingStub: null, + ); @override _i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) => (super.noSuchMethod( - Invocation.method( - #getWallet, - [walletId], - ), - returnValue: _FakeWallet_2<_i4.CryptoCurrency>( - this, - Invocation.method( - #getWallet, - [walletId], - ), - ), - ) as _i5.Wallet<_i4.CryptoCurrency>); + Invocation.method(#getWallet, [walletId]), + returnValue: _FakeWallet_2<_i4.CryptoCurrency>( + this, + Invocation.method(#getWallet, [walletId]), + ), + ) + as _i5.Wallet<_i4.CryptoCurrency>); @override void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod( - Invocation.method( - #addWallet, - [wallet], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addWallet, [wallet]), + returnValueForMissingStub: null, + ); @override _i9.Future deleteWallet( @@ -169,16 +135,11 @@ class MockWallets extends _i1.Mock implements _i8.Wallets { _i7.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( - Invocation.method( - #deleteWallet, - [ - info, - secureStorage, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#deleteWallet, [info, secureStorage]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future load( @@ -187,17 +148,11 @@ class MockWallets extends _i1.Mock implements _i8.Wallets { bool? isDuress, ) => (super.noSuchMethod( - Invocation.method( - #load, - [ - prefs, - mainDB, - isDuress, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#load, [prefs, mainDB, isDuress]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future loadAfterStackRestore( @@ -206,17 +161,15 @@ class MockWallets extends _i1.Mock implements _i8.Wallets { bool? isDesktop, ) => (super.noSuchMethod( - Invocation.method( - #loadAfterStackRestore, - [ - prefs, - wallets, - isDesktop, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#loadAfterStackRestore, [ + prefs, + wallets, + isDesktop, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); } /// A class which mocks [ThemeService]. @@ -228,121 +181,102 @@ class MockThemeService extends _i1.Mock implements _i12.ThemeService { } @override - _i6.HTTP get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeHTTP_3( - this, - Invocation.getter(#client), - ), - ) as _i6.HTTP); + _i3.MainDB get db => + (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_1(this, Invocation.getter(#db)), + ) + as _i3.MainDB); @override - set client(_i6.HTTP? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), - returnValueForMissingStub: null, - ); + _i6.HTTP get client => + (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeHTTP_3(this, Invocation.getter(#client)), + ) + as _i6.HTTP); @override - _i3.MainDB get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeMainDB_1( - this, - Invocation.getter(#db), - ), - ) as _i3.MainDB); + List<_i13.StackTheme> get installedThemes => + (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i13.StackTheme>[], + ) + as List<_i13.StackTheme>); @override - List<_i13.StackTheme> get installedThemes => (super.noSuchMethod( - Invocation.getter(#installedThemes), - returnValue: <_i13.StackTheme>[], - ) as List<_i13.StackTheme>); + set client(_i6.HTTP? value) => super.noSuchMethod( + Invocation.setter(#client, value), + returnValueForMissingStub: null, + ); @override void init(_i3.MainDB? db) => super.noSuchMethod( - Invocation.method( - #init, - [db], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#init, [db]), + returnValueForMissingStub: null, + ); @override _i9.Future install({required _i14.Uint8List? themeArchiveData}) => (super.noSuchMethod( - Invocation.method( - #install, - [], - {#themeArchiveData: themeArchiveData}, - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future remove({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #remove, - [], - {#themeId: themeId}, - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( - Invocation.method( - #checkDefaultThemesOnStartup, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#install, [], { + #themeArchiveData: themeArchiveData, + }), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future remove({required String? themeId}) => + (super.noSuchMethod( + Invocation.method(#remove, [], {#themeId: themeId}), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future checkDefaultThemesOnStartup() => + (super.noSuchMethod( + Invocation.method(#checkDefaultThemesOnStartup, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( - Invocation.method( - #verifyInstalled, - [], - {#themeId: themeId}, - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + Invocation.method(#verifyInstalled, [], {#themeId: themeId}), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override _i9.Future> fetchThemes() => (super.noSuchMethod( - Invocation.method( - #fetchThemes, - [], - ), - returnValue: _i9.Future>.value( - <_i12.StackThemeMetaData>[]), - ) as _i9.Future>); + Invocation.method(#fetchThemes, []), + returnValue: _i9.Future>.value( + <_i12.StackThemeMetaData>[], + ), + ) + as _i9.Future>); @override - _i9.Future<_i14.Uint8List> fetchTheme( - {required _i12.StackThemeMetaData? themeMetaData}) => + _i9.Future<_i14.Uint8List> fetchTheme({ + required _i12.StackThemeMetaData? themeMetaData, + }) => (super.noSuchMethod( - Invocation.method( - #fetchTheme, - [], - {#themeMetaData: themeMetaData}, - ), - returnValue: _i9.Future<_i14.Uint8List>.value(_i14.Uint8List(0)), - ) as _i9.Future<_i14.Uint8List>); + Invocation.method(#fetchTheme, [], {#themeMetaData: themeMetaData}), + returnValue: _i9.Future<_i14.Uint8List>.value(_i14.Uint8List(0)), + ) + as _i9.Future<_i14.Uint8List>); @override _i13.StackTheme? getTheme({required String? themeId}) => - (super.noSuchMethod(Invocation.method( - #getTheme, - [], - {#themeId: themeId}, - )) as _i13.StackTheme?); + (super.noSuchMethod(Invocation.method(#getTheme, [], {#themeId: themeId})) + as _i13.StackTheme?); } /// A class which mocks [NodeService]. @@ -354,41 +288,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { } @override - _i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( - Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_4( - this, - Invocation.getter(#secureStorageInterface), - ), - ) as _i7.SecureStorageInterface); + _i7.SecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeSecureStorageInterface_4( + this, + Invocation.getter(#secureStorageInterface), + ), + ) + as _i7.SecureStorageInterface); @override - List<_i15.NodeModel> get primaryNodes => (super.noSuchMethod( - Invocation.getter(#primaryNodes), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + List<_i15.NodeModel> get primaryNodes => + (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i15.NodeModel>[], + ) + as List<_i15.NodeModel>); @override - List<_i15.NodeModel> get nodes => (super.noSuchMethod( - Invocation.getter(#nodes), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + List<_i15.NodeModel> get nodes => + (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i15.NodeModel>[], + ) + as List<_i15.NodeModel>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i9.Future updateDefaults() => (super.noSuchMethod( - Invocation.method( - #updateDefaults, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future updateDefaults() => + (super.noSuchMethod( + Invocation.method(#updateDefaults, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future setPrimaryNodeFor({ @@ -397,56 +335,45 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( - Invocation.method( - #setPrimaryNodeFor, - [], - { - #coin: coin, - #node: node, - #shouldNotifyListeners: shouldNotifyListeners, - }, - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#setPrimaryNodeFor, [], { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i15.NodeModel? getPrimaryNodeFor({required _i4.CryptoCurrency? currency}) => - (super.noSuchMethod(Invocation.method( - #getPrimaryNodeFor, - [], - {#currency: currency}, - )) as _i15.NodeModel?); + (super.noSuchMethod( + Invocation.method(#getPrimaryNodeFor, [], {#currency: currency}), + ) + as _i15.NodeModel?); @override List<_i15.NodeModel> getNodesFor(_i4.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method( - #getNodesFor, - [coin], - ), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + Invocation.method(#getNodesFor, [coin]), + returnValue: <_i15.NodeModel>[], + ) + as List<_i15.NodeModel>); @override _i15.NodeModel? getNodeById({required String? id}) => - (super.noSuchMethod(Invocation.method( - #getNodeById, - [], - {#id: id}, - )) as _i15.NodeModel?); + (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) + as _i15.NodeModel?); @override - List<_i15.NodeModel> failoverNodesFor( - {required _i4.CryptoCurrency? currency}) => + List<_i15.NodeModel> failoverNodesFor({ + required _i4.CryptoCurrency? currency, + }) => (super.noSuchMethod( - Invocation.method( - #failoverNodesFor, - [], - {#currency: currency}, - ), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + Invocation.method(#failoverNodesFor, [], {#currency: currency}), + returnValue: <_i15.NodeModel>[], + ) + as List<_i15.NodeModel>); @override _i9.Future save( @@ -455,34 +382,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #save, - [ - node, - password, - shouldNotifyListeners, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future delete( - String? id, - bool? shouldNotifyListeners, - ) => + Invocation.method(#save, [node, password, shouldNotifyListeners]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future delete(String? id, bool? shouldNotifyListeners) => (super.noSuchMethod( - Invocation.method( - #delete, - [ - id, - shouldNotifyListeners, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#delete, [id, shouldNotifyListeners]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future setEnabledState( @@ -491,61 +404,46 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { bool? shouldNotifyListeners, ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, - [ - id, - enabled, - shouldNotifyListeners, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future updateCommunityNodes() => (super.noSuchMethod( - Invocation.method( - #updateCommunityNodes, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#setEnabledState, [ + id, + enabled, + shouldNotifyListeners, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future updateCommunityNodes() => + (super.noSuchMethod( + Invocation.method(#updateCommunityNodes, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/tool/gen_interfaces.dart b/tool/gen_interfaces.dart new file mode 100644 index 000000000..fc4849455 --- /dev/null +++ b/tool/gen_interfaces.dart @@ -0,0 +1,83 @@ +import 'dart:io'; + +void main(List args) { + if (args.length < 2) { + print( + 'Usage: dart process_pubspec_deps.dart [marker2 ...]', + ); + exit(1); + } + + final generatedDir = Directory(args[1]); + if (!generatedDir.existsSync()) generatedDir.createSync(); + + final templatesDir = args[0]; + + final List onFilePrefixes = args.length > 2 ? args.sublist(2) : []; + + final templates = Directory(templatesDir).listSync().whereType(); + + print(templates.map((e) => e.uri.pathSegments.last)); + + for (final template in templates) { + final templateName = template.uri.pathSegments.last; + + final prefix = templateName.split("_").first; + + final outfileUri = generatedDir.uri.resolve( + templateName + .replaceFirst("${prefix}_", "") + .replaceFirst(".template.", "."), + ); + + _genFile( + outfileUri.toFilePath(), + template, + onFilePrefixes.contains(prefix), + ); + } +} + +void _genFile(String outputFilePath, File template, bool on) { + final lines = template.readAsLinesSync(); + + // add empty line and gen warning + + final List updatedLines = [ + "// GENERATED CODE - DO NOT MODIFY BY HAND", + "", + ]; + + final keepMarker = on ? "ON" : "OFF"; + final dropMarker = on ? "OFF" : "ON"; + + bool? keepLine; + + for (final line in lines) { + if (line.trim() == "//$keepMarker") { + keepLine = true; + continue; + } + + if (line.trim() == "//$dropMarker") { + keepLine = false; + continue; + } + + if (line.trim().startsWith("//END_")) { + keepLine = null; + continue; + } + + if (keepLine != false) { + updatedLines.add(line); + } + } + + // add empty line + if (updatedLines.last.isNotEmpty) updatedLines.add(""); + + File(outputFilePath).writeAsStringSync(updatedLines.join('\n')); + + print("Done gen of $template => $outputFilePath"); +} diff --git a/tool/process_pubspec_deps.dart b/tool/process_pubspec_deps.dart new file mode 100644 index 000000000..80110b748 --- /dev/null +++ b/tool/process_pubspec_deps.dart @@ -0,0 +1,60 @@ +import 'dart:io'; + +void main(List args) { + if (args.isEmpty) { + print( + 'Usage: dart process_pubspec_deps.dart [marker2 ...]', + ); + exit(1); + } + + if (args.length == 1) { + print('No markers specified. Nothing to do.'); + exit(0); + } + + _process(args[0], args.sublist(1)); +} + +void _process(final String filePath, final List enableCoinMarkers) { + final lines = File(filePath).readAsLinesSync(); + + String? activeMarker; + final List updatedLines = []; + + for (final line in lines) { + bool markerSet = false; + + // Check if line starts any marker block + for (final marker in enableCoinMarkers) { + if (line.trim() == "# %%ENABLE_$marker%%") { + activeMarker = marker; + markerSet = true; + updatedLines.add(line); + break; + } + } + + if (markerSet) continue; + + // Check if line ends the active marker block + if (activeMarker != null && + line.trim() == "# %%END_ENABLE_$activeMarker%%") { + activeMarker = null; + updatedLines.add(line); + continue; + } + + // If inside an active marker block, uncomment line + if (activeMarker != null) { + updatedLines.add(line.replaceFirst("#", "")); + } else { + updatedLines.add(line); + } + } + + File(filePath).writeAsStringSync(updatedLines.join('\n')); + print( + 'Updated pubspec.yaml with enabled blocks: ${enableCoinMarkers.join(", ")}', + ); +} diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart new file mode 100644 index 000000000..579c32287 --- /dev/null +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -0,0 +1,274 @@ +//ON +import 'package:flutter_libepiccash/git_versions.dart' as epic_versions; +import 'package:flutter_libepiccash/lib.dart'; +import 'package:flutter_libepiccash/models/transaction.dart'; + +//END_ON +import '../interfaces/libepiccash_interface.dart'; + +LibEpicCashInterface get libEpic => _getLib(); + +//OFF +LibEpicCashInterface _getLib() => throw Exception("EPIC not enabled!"); + +//END_OFF +//ON +LibEpicCashInterface _getLib() => const _LibEpicCashInterfaceImpl(); + +final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { + const _LibEpicCashInterfaceImpl(); + + @override + Future cancelTransaction({ + required String wallet, + required String transactionId, + }) { + return LibEpiccash.cancelTransaction( + wallet: wallet, + transactionId: transactionId, + ); + } + + @override + Future<({String commitId, String slateId})> createTransaction({ + required String wallet, + required int amount, + required String address, + required int secretKeyIndex, + required String epicboxConfig, + required int minimumConfirmations, + required String note, + }) { + return LibEpiccash.createTransaction( + wallet: wallet, + amount: amount, + address: address, + secretKeyIndex: secretKeyIndex, + epicboxConfig: epicboxConfig, + minimumConfirmations: minimumConfirmations, + note: note, + ); + } + + @override + Future deleteWallet({ + required String wallet, + required String config, + }) { + return LibEpiccash.deleteWallet(wallet: wallet, config: config); + } + + @override + Future getAddressInfo({ + required String wallet, + required int index, + required String epicboxConfig, + }) { + return LibEpiccash.getAddressInfo( + wallet: wallet, + index: index, + epicboxConfig: epicboxConfig, + ); + } + + @override + Future getChainHeight({required String config}) { + return LibEpiccash.getChainHeight(config: config); + } + + @override + Future<({int fee, bool strategyUseAll, int total})> getTransactionFees({ + required String wallet, + required int amount, + required int minimumConfirmations, + required int available, + }) { + return LibEpiccash.getTransactionFees( + wallet: wallet, + amount: amount, + minimumConfirmations: minimumConfirmations, + available: available, + ); + } + + @override + Future> getTransactions({ + required String wallet, + required int refreshFromNode, + }) async { + final transactions = await LibEpiccash.getTransactions( + wallet: wallet, + refreshFromNode: refreshFromNode, + ); + + return transactions + .map( + (e) => EpicTransaction( + parentKeyId: e.parentKeyId, + id: e.id, + txType: e.txType, + creationTs: e.creationTs, + confirmationTs: e.confirmationTs, + confirmed: e.confirmed, + numInputs: e.numInputs, + numOutputs: e.numOutputs, + amountCredited: e.amountCredited, + amountDebited: e.amountDebited, + txSlateId: e.txSlateId, + fee: e.fee, + ttlCutoffHeight: e.ttlCutoffHeight, + messages: e.messages?.messages + .map( + (f) => EpicMessage( + id: f.id, + publicKey: f.publicKey, + message: f.message, + messageSig: f.messageSig, + ), + ) + .toList(), + storedTx: e.storedTx, + kernelExcess: e.kernelExcess, + kernelLookupMinHeight: e.kernelLookupMinHeight, + paymentProof: e.paymentProof, + ), + ) + .toList(); + } + + @override + Future< + ({ + double awaitingFinalization, + double pending, + double spendable, + double total, + }) + > + getWalletBalances({ + required String wallet, + required int refreshFromNode, + required int minimumConfirmations, + }) { + return LibEpiccash.getWalletBalances( + wallet: wallet, + refreshFromNode: refreshFromNode, + minimumConfirmations: minimumConfirmations, + ); + } + + @override + Future initializeNewWallet({ + required String config, + required String mnemonic, + required String password, + required String name, + }) { + return LibEpiccash.initializeNewWallet( + config: config, + mnemonic: mnemonic, + password: password, + name: name, + ); + } + + @override + Future openWallet({ + required String config, + required String password, + }) { + return LibEpiccash.openWallet(config: config, password: password); + } + + @override + Future recoverWallet({ + required String config, + required String password, + required String mnemonic, + required String name, + }) { + return LibEpiccash.recoverWallet( + config: config, + password: password, + mnemonic: mnemonic, + name: name, + ); + } + + @override + Future scanOutputs({ + required String wallet, + required int startHeight, + required int numberOfBlocks, + }) { + return LibEpiccash.scanOutputs( + wallet: wallet, + startHeight: startHeight, + numberOfBlocks: numberOfBlocks, + ); + } + + @override + void startEpicboxListener({ + required String wallet, + required String epicboxConfig, + }) { + return LibEpiccash.startEpicboxListener( + wallet: wallet, + epicboxConfig: epicboxConfig, + ); + } + + @override + void stopEpicboxListener() { + return LibEpiccash.stopEpicboxListener(); + } + + @override + Future<({String commitId, String slateId})> txHttpSend({ + required String wallet, + required int selectionStrategyIsAll, + required int minimumConfirmations, + required String message, + required int amount, + required String address, + }) { + try { + return LibEpiccash.txHttpSend( + wallet: wallet, + selectionStrategyIsAll: selectionStrategyIsAll, + minimumConfirmations: minimumConfirmations, + message: message, + amount: amount, + address: address, + ); + } on BadEpicHttpAddressException catch (_) { + throw BadHttpAddressException(); + } + } + + @override + bool txTypeIsReceiveCancelled(Enum value) { + return value == TransactionType.TxReceivedCancelled; + } + + @override + bool txTypeIsReceived(Enum value) { + return value == TransactionType.TxReceived; + } + + @override + bool txTypeIsSentCancelled(Enum value) { + return value == TransactionType.TxSentCancelled; + } + + @override + bool validateSendAddress({required String address}) { + return LibEpiccash.validateSendAddress(address: address); + } + + @override + String getPluginVersion() => epic_versions.getPluginVersion(); +} + +//END_ON diff --git a/tool/wl_templates/FIRO_lib_spark_interface_impl.template.dart b/tool/wl_templates/FIRO_lib_spark_interface_impl.template.dart new file mode 100644 index 000000000..0842a48e7 --- /dev/null +++ b/tool/wl_templates/FIRO_lib_spark_interface_impl.template.dart @@ -0,0 +1,292 @@ +//ON +import 'dart:typed_data'; + +import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart'; +import 'package:logger/logger.dart'; + +import '../../utilities/logger.dart'; +//END_ON +import '../interfaces/lib_spark_interface.dart'; + +LibSparkInterface get libSpark => _getInterface(); + +//OFF +LibSparkInterface _getInterface() => throw Exception("FIRO not enabled!"); + +List hashTags({required List base64Tags}) => + throw Exception("FIRO not enabled!"); + +//END_OFF +//ON +LibSparkInterface _getInterface() => const _LibSparkInterfaceImpl(); + +List hashTags({required List base64Tags}) => + LibSpark.hashTags(base64Tags: base64Tags); + +class _LibSparkInterfaceImpl extends LibSparkInterface { + const _LibSparkInterfaceImpl(); + + @override + String get sparkBaseDerivationPath => kSparkBaseDerivationPath; + + @override + String get sparkBaseDerivationPathTestnet => kSparkBaseDerivationPathTestnet; + + @override + int get sparkChange => kSparkChange; + + @override + int get maxAdditionalInfoLengthBytes => kMaxAdditionalInfoLengthBytes; + + @override + int get maxNameLength => kMaxNameLength; + + @override + int get maxNameRegistrationLengthYears => kMaxNameRegistrationLengthYears; + + @override + String get nameRegexString => kNameRegexString; + + @override + String get stage3DevelopmentFundAddressMainNet => + kStage3DevelopmentFundAddressMainNet; + + @override + String get stage3DevelopmentFundAddressTestNet => + kStage3DevelopmentFundAddressTestNet; + + @override + List get standardSparkNamesFee => + List.unmodifiable(kStandardSparkNamesFee); + + @override + void initSparkLogging(Level level) { + final levels = Level.values.where((e) => e >= level).map((e) => e.name); + Log.levels.addAll( + LoggingLevel.values.where((e) => levels.contains(e.name)), + ); + Log.onLog = (level, value, {error, stackTrace, required time}) { + Logging.instance.log( + level.getLoggerLevel(), + value, + error: error, + stackTrace: stackTrace, + time: time, + ); + }; + } + + @override + String hashTag(String x, String y) => LibSpark.hashTag(x, y); + + @override + bool validateAddress({required String address, required bool isTestNet}) => + LibSpark.validateAddress(address: address, isTestNet: isTestNet); + + @override + Future getAddress({ + required Uint8List privateKey, + required int index, + required int diversifier, + bool isTestNet = false, + }) => LibSpark.getAddress( + privateKey: privateKey, + index: index, + diversifier: diversifier, + isTestNet: isTestNet, + ); + + @override + ({Uint8List script, int size}) createSparkNameScript({ + required int sparkNameValidityBlocks, + required String name, + required String additionalInfo, + required String scalarHex, + required String privateKeyHex, + required int spendKeyIndex, + required int diversifier, + required bool isTestNet, + required int hashFailSafe, + required bool ignoreProof, + }) => LibSpark.createSparkNameScript( + sparkNameValidityBlocks: sparkNameValidityBlocks, + name: name, + additionalInfo: additionalInfo, + scalarHex: scalarHex, + privateKeyHex: privateKeyHex, + spendKeyIndex: spendKeyIndex, + diversifier: diversifier, + isTestNet: isTestNet, + hashFailSafe: hashFailSafe, + ignoreProof: ignoreProof, + ); + + @override + List<({int amount, Uint8List scriptPubKey, bool subtractFeeFromAmount})> + createSparkMintRecipients({ + required List<({String memo, String sparkAddress, int value})> outputs, + required Uint8List serialContext, + bool generate = false, + }) => LibSpark.createSparkMintRecipients( + outputs: outputs, + serialContext: serialContext, + generate: generate, + ); + + @override + Uint8List serializeMintContext({required List<(String, int)> inputs}) => + LibSpark.serializeMintContext(inputs: inputs); + + @override + WrappedLibSparkCoin? identifyAndRecoverCoin( + String serializedCoin, { + required String privateKeyHex, + required int index, + required Uint8List context, + bool isTestNet = false, + }) { + final coin = LibSpark.identifyAndRecoverCoin( + serializedCoin, + privateKeyHex: privateKeyHex, + index: index, + context: context, + isTestNet: isTestNet, + ); + + if (coin == null) return null; + + return WrappedLibSparkCoin( + type: WrappedLibSparkCoinType.values.firstWhere( + (e) => e.value == coin.type.value, + ), + + id: coin.id, + height: coin.height, + isUsed: coin.isUsed, + nonceHex: coin.nonceHex, + address: coin.address, + value: coin.value, + serial: coin.serial, + memo: coin.memo, + txHash: coin.txHash, + serialContext: coin.serialContext, + diversifier: coin.diversifier, + encryptedDiversifier: coin.encryptedDiversifier, + tag: coin.tag, + lTagHash: coin.lTagHash, + serializedCoin: coin.serializedCoin, + ); + } + + @override + ({ + int fee, + List outputScripts, + Uint8List serializedSpendPayload, + List< + ({ + int groupId, + int height, + String serializedCoin, + String serializedCoinContext, + }) + > + usedCoins, + }) + createSparkSendTransaction({ + required String privateKeyHex, + int index = 1, + required List<({String address, int amount, bool subtractFeeFromAmount})> + recipients, + required List< + ({ + int amount, + String memo, + String sparkAddress, + bool subtractFeeFromAmount, + }) + > + privateRecipients, + required List< + ({ + int groupId, + int height, + String serializedCoin, + String serializedCoinContext, + }) + > + serializedCoins, + required List< + ({ + List<({String serializedCoin, String txHash})> set, + String setHash, + int setId, + }) + > + allAnonymitySets, + required List<({Uint8List blockHash, int setId})> idAndBlockHashes, + required Uint8List txHash, + required int additionalTxSize, + }) => LibSpark.createSparkSendTransaction( + index: index, + privateKeyHex: privateKeyHex, + recipients: recipients, + privateRecipients: privateRecipients, + serializedCoins: serializedCoins, + allAnonymitySets: allAnonymitySets, + idAndBlockHashes: idAndBlockHashes, + txHash: txHash, + additionalTxSize: additionalTxSize, + ); + + @override + int estimateSparkFee({ + required String privateKeyHex, + int index = 1, + required int sendAmount, + required bool subtractFeeFromAmount, + required List< + ({ + int groupId, + int height, + String serializedCoin, + String serializedCoinContext, + }) + > + serializedCoins, + required int privateRecipientsCount, + required int utxoNum, + required int additionalTxSize, + }) => LibSpark.estimateSparkFee( + privateKeyHex: privateKeyHex, + sendAmount: sendAmount, + subtractFeeFromAmount: subtractFeeFromAmount, + serializedCoins: serializedCoins, + privateRecipientsCount: privateRecipientsCount, + utxoNum: utxoNum, + additionalTxSize: additionalTxSize, + index: index, + ); +} + +// convenience conversion for spark +extension _LoggingLevelExt on LoggingLevel { + Level getLoggerLevel() { + switch (this) { + case LoggingLevel.info: + return Level.info; + case LoggingLevel.warning: + return Level.warning; + case LoggingLevel.error: + return Level.error; + case LoggingLevel.fatal: + return Level.fatal; + case LoggingLevel.debug: + return Level.debug; + case LoggingLevel.trace: + return Level.trace; + } + } +} + +//END_ON diff --git a/lib/services/frost.dart b/tool/wl_templates/FROST_frost_interface_impl.template.dart similarity index 64% rename from lib/services/frost.dart rename to tool/wl_templates/FROST_frost_interface_impl.template.dart index 33066de92..e26d96692 100644 --- a/lib/services/frost.dart +++ b/tool/wl_templates/FROST_frost_interface_impl.template.dart @@ -1,3 +1,4 @@ +//ON import 'dart:convert'; import 'dart:ffi'; import 'dart:typed_data'; @@ -7,238 +8,107 @@ import 'package:frostdart/frostdart_bindings_generated.dart'; import 'package:frostdart/output.dart'; import 'package:frostdart/util.dart'; -import '../models/isar/models/blockchain_data/utxo.dart'; -import '../utilities/amount/amount.dart'; -import '../utilities/extensions/extensions.dart'; -import '../utilities/logger.dart'; -import '../wallets/crypto_currency/crypto_currency.dart'; -import '../wallets/models/tx_recipient.dart'; +import '../../models/isar/models/blockchain_data/utxo.dart'; +import '../../utilities/amount/amount.dart'; +import '../../utilities/extensions/extensions.dart'; +import '../../utilities/logger.dart'; +import '../../wallets/crypto_currency/crypto_currency.dart'; +import '../../wallets/models/tx_recipient.dart'; +//END_ON +import '../interfaces/frost_interface.dart'; -abstract class Frost { - //==================== utility =============================================== - static List getParticipants({required String multisigConfig}) { - try { - final numberOfParticipants = multisigParticipants( - multisigConfig: multisigConfig, - ); - - final List participants = []; - for (int i = 0; i < numberOfParticipants; i++) { - participants.add( - multisigParticipant(multisigConfig: multisigConfig, index: i), - ); - } - - return participants; - } catch (e, s) { - Logging.instance.f("getParticipants failed: ", error: e, stackTrace: s); - rethrow; - } - } +FrostInterface get frostInterface => _getInterface(); - static bool validateEncodedMultisigConfig({required String encodedConfig}) { - try { - decodeMultisigConfig(multisigConfig: encodedConfig); - return true; - } catch (e, s) { - Logging.instance.f( - "validateEncodedMultisigConfig failed: ", - error: e, - stackTrace: s, - ); - return false; - } - } +//OFF +FrostInterface _getInterface() => throw Exception("FROST not enabled!"); - static int getThreshold({required String multisigConfig}) { - try { - final threshold = multisigThreshold(multisigConfig: multisigConfig); +//END_OFF +//ON +FrostInterface _getInterface() => const _FrostInterfaceImpl(); - return threshold; - } catch (e, s) { - Logging.instance.f("getThreshold failed: ", error: e, stackTrace: s); - rethrow; - } - } +final class _FrostInterfaceImpl extends FrostInterface { + const _FrostInterfaceImpl(); - static ({ - List<({String address, Amount amount})> recipients, - String changeAddress, - int feePerWeight, - List inputs, - }) - extractDataFromSignConfig({ + @override + ({OpaqueWrapper machinePtr, String preprocess}) attemptSignConfig({ + required int network, + required String config, required String serializedKeys, - required String signConfig, - required CryptoCurrency coin, }) { try { - final network = - coin.network.isTestNet ? Network.Testnet : Network.Mainnet; - final signConfigPointer = decodedSignConfig( - encodedConfig: signConfig, - network: network, - serializedKeys: serializedKeys, - ); + final keys = deserializeKeys(keys: serializedKeys); - // get various data from config - final feePerWeight = signFeePerWeight( - signConfigPointer: signConfigPointer, - ); - final changeAddress = signChange(signConfigPointer: signConfigPointer); - final recipientsCount = signPayments( - signConfigPointer: signConfigPointer, + final attemptSignRes = attemptSign( + thresholdKeysWrapperPointer: keys, + network: network, + signConfig: config, ); - // get tx recipient info - final List<({String address, Amount amount})> recipients = []; - for (int i = 0; i < recipientsCount; i++) { - final String address = signPaymentAddress( - signConfigPointer: signConfigPointer, - index: i, - ); - final int amount = signPaymentAmount( - signConfigPointer: signConfigPointer, - index: i, - ); - recipients.add(( - address: address, - amount: Amount( - rawValue: BigInt.from(amount), - fractionDigits: coin.fractionDigits, - ), - )); - } - - // get utxos - final count = signInputs(signConfigPointer: signConfigPointer); - final List outputs = []; - for (int i = 0; i < count; i++) { - final output = signInput( - thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), - signConfig: signConfig, - index: i, - network: network, - ); - - outputs.add(output); - } - return ( - recipients: recipients, - changeAddress: changeAddress, - feePerWeight: feePerWeight, - inputs: outputs, + preprocess: attemptSignRes.ref.preprocess.toDartString(), + machinePtr: OpaqueWrapper(attemptSignRes.ref.machine), ); } catch (e, s) { - Logging.instance.f( - "extractDataFromSignConfig failed: ", - error: e, - stackTrace: s, - ); + Logging.instance.f("attemptSignConfig failed: ", error: e, stackTrace: s); rethrow; } } - //==================== wallet creation ======================================= - - static String createMultisigConfig({ - required String name, - required int threshold, - required List participants, + @override + ({OpaqueWrapper prior, String resharedStart}) beginReshared({ + required String myName, + required String resharerConfig, + required List resharerStarts, }) { try { - final config = newMultisigConfig( - name: name, - threshold: threshold, - participants: participants, - ); - - return config; - } catch (e, s) { - Logging.instance.f( - "createMultisigConfig failed: ", - error: e, - stackTrace: s, - ); - rethrow; - } - } - - static ({ - String seed, - String commitments, - Pointer multisigConfigWithNamePtr, - Pointer secretShareMachineWrapperPtr, - }) - startKeyGeneration({required String multisigConfig, required String myName}) { - try { - final startKeyGenResPtr = startKeyGen( - multisigConfig: multisigConfig, + final result = startReshared( + newMultisigName: 'unused_property', myName: myName, - language: Language.english, + resharerConfig: resharerConfig, + resharerStarts: resharerStarts, ); - - final seed = startKeyGenResPtr.ref.seed.toDartString(); - final commitments = startKeyGenResPtr.ref.commitments.toDartString(); - final configWithNamePtr = startKeyGenResPtr.ref.config; - final machinePtr = startKeyGenResPtr.ref.machine; - return ( - seed: seed, - commitments: commitments, - multisigConfigWithNamePtr: configWithNamePtr, - secretShareMachineWrapperPtr: machinePtr, + resharedStart: result.encoded, + prior: OpaqueWrapper(result.machine), ); } catch (e, s) { - Logging.instance.f( - "startKeyGeneration failed: ", - error: e, - stackTrace: s, - ); + Logging.instance.f("beginReshared failed: ", error: e, stackTrace: s); rethrow; } } - static ({String share, Pointer secretSharesResPtr}) - generateSecretShares({ - required Pointer multisigConfigWithNamePtr, - required String mySeed, - required Pointer secretShareMachineWrapperPtr, - required List commitments, + @override + ({OpaqueWrapper machine, String resharerStart}) beginResharer({ + required String serializedKeys, + required String config, }) { try { - final secretSharesResPtr = getSecretShares( - multisigConfigWithName: multisigConfigWithNamePtr, - seed: mySeed, - language: Language.english, - machine: secretShareMachineWrapperPtr, - commitments: commitments, + final result = startResharer( + serializedKeys: serializedKeys, + config: config, ); - final share = secretSharesResPtr.ref.shares.toDartString(); - - return (share: share, secretSharesResPtr: secretSharesResPtr); - } catch (e, s) { - Logging.instance.f( - "generateSecretShares failed: ", - error: e, - stackTrace: s, + return ( + resharerStart: result.encoded, + machine: OpaqueWrapper(result.machine), ); + } catch (e, s) { + Logging.instance.f("beginResharer failed: ", error: e, stackTrace: s); rethrow; } } - static ({Uint8List multisigId, String recoveryString, String serializedKeys}) + @override + ({Uint8List multisigId, String recoveryString, String serializedKeys}) completeKeyGeneration({ - required Pointer multisigConfigWithNamePtr, - required Pointer secretSharesResPtr, + required OpaqueWrapper multisigConfigWithNamePtr, + required OpaqueWrapper secretSharesResPtr, required List shares, }) { try { final keyGenResPtr = completeKeyGen( - multisigConfigWithName: multisigConfigWithNamePtr, - machineAndCommitments: secretSharesResPtr, + multisigConfigWithName: multisigConfigWithNamePtr.getValue(), + machineAndCommitments: secretSharesResPtr.getValue(), shares: shares, ); @@ -268,97 +138,38 @@ abstract class Frost { } } - //=================== transaction creation =================================== - - static String createSignConfig({ - required String serializedKeys, - required int network, - required List< - ({ - UTXO utxo, - Uint8List scriptPubKey, - AddressDerivationData addressDerivationData, - }) - > - inputs, - required List outputs, - required String changeAddress, - required int feePerWeight, - }) { - try { - final signConfig = newSignConfig( - thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), - network: network, - outputs: - inputs - .map( - (e) => Output( - hash: e.utxo.txid.toUint8ListFromHex, - vout: e.utxo.vout, - value: e.utxo.value, - scriptPubKey: e.scriptPubKey, - addressDerivationData: e.addressDerivationData, - ), - ) - .toList(), - paymentAddresses: outputs.map((e) => e.address).toList(), - paymentAmounts: outputs.map((e) => e.amount.raw.toInt()).toList(), - change: changeAddress, - feePerWeight: feePerWeight, - ); - - return signConfig; - } catch (e, s) { - Logging.instance.f("createSignConfig failed: ", error: e, stackTrace: s); - rethrow; - } - } - - static ({ - Pointer machinePtr, - String preprocess, - }) - attemptSignConfig({ - required int network, - required String config, - required String serializedKeys, + @override + String completeSigning({ + required OpaqueWrapper machinePtr, + required List shares, }) { try { - final keys = deserializeKeys(keys: serializedKeys); - - final attemptSignRes = attemptSign( - thresholdKeysWrapperPointer: keys, - network: network, - signConfig: config, + final rawTransaction = completeSign( + machine: machinePtr.getValue(), + shares: shares, ); - return ( - preprocess: attemptSignRes.ref.preprocess.toDartString(), - machinePtr: attemptSignRes.ref.machine, - ); + return rawTransaction; } catch (e, s) { - Logging.instance.f("attemptSignConfig failed: ", error: e, stackTrace: s); + Logging.instance.f("completeSigning failed: ", error: e, stackTrace: s); rethrow; } } - static ({ - Pointer machinePtr, - String share, - }) - continueSigning({ - required Pointer machinePtr, + @override + ({OpaqueWrapper machinePtr, String share}) continueSigning({ + required OpaqueWrapper machinePtr, required List preprocesses, }) { try { final continueSignRes = continueSign( - machine: machinePtr, + machine: machinePtr.getValue(), preprocesses: preprocesses, ); return ( share: continueSignRes.ref.preprocess.toDartString(), - machinePtr: continueSignRes.ref.machine, + machinePtr: OpaqueWrapper(continueSignRes.ref.machine), ); } catch (e, s) { Logging.instance.f("continueSigning failed: ", error: e, stackTrace: s); @@ -366,41 +177,32 @@ abstract class Frost { } } - static String completeSigning({ - required Pointer machinePtr, - required List shares, + @override + String createMultisigConfig({ + required String name, + required int threshold, + required List participants, }) { try { - final rawTransaction = completeSign(machine: machinePtr, shares: shares); + final config = newMultisigConfig( + name: name, + threshold: threshold, + participants: participants, + ); - return rawTransaction; + return config; } catch (e, s) { - Logging.instance.f("completeSigning failed: ", error: e, stackTrace: s); - rethrow; - } - } - - static Pointer decodedSignConfig({ - required String serializedKeys, - required String encodedConfig, - required int network, - }) { - try { - final configPtr = decodeSignConfig( - thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), - encodedSignConfig: encodedConfig, - network: network, + Logging.instance.f( + "createMultisigConfig failed: ", + error: e, + stackTrace: s, ); - return configPtr; - } catch (e, s) { - Logging.instance.f("decodedSignConfig failed: ", error: e, stackTrace: s); rethrow; } } - //========================== resharing ======================================= - - static String createResharerConfig({ + @override + String createResharerConfig({ required int newThreshold, required List resharers, required List newParticipants, @@ -423,87 +225,176 @@ abstract class Frost { } } - static ({String resharerStart, Pointer machine}) - beginResharer({required String serializedKeys, required String config}) { - try { - final result = startResharer( - serializedKeys: serializedKeys, - config: config, + @override + String createSignConfig({ + required String serializedKeys, + required int network, + required List< + ({ + Uint8List scriptPubKey, + UTXO utxo, + FrostAddressDerivationData addressDerivationData, + }) + > + inputs, + required List outputs, + required String changeAddress, + required int feePerWeight, + }) { + try { + final signConfig = newSignConfig( + thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), + network: network, + outputs: inputs + .map( + (e) => Output( + hash: e.utxo.txid.toUint8ListFromHex, + vout: e.utxo.vout, + value: e.utxo.value, + scriptPubKey: e.scriptPubKey, + addressDerivationData: e.addressDerivationData, + ), + ) + .toList(), + paymentAddresses: outputs.map((e) => e.address).toList(), + paymentAmounts: outputs.map((e) => e.amount.raw.toInt()).toList(), + change: changeAddress, + feePerWeight: feePerWeight, ); - return (resharerStart: result.encoded, machine: result.machine); + return signConfig; } catch (e, s) { - Logging.instance.f("beginResharer failed: ", error: e, stackTrace: s); + Logging.instance.f("createSignConfig failed: ", error: e, stackTrace: s); + + if (e is FrostdartException && e.errorCode == NOT_ENOUGH_FUNDS_ERROR) { + throw FrostInsufficientFundsException(); + } + rethrow; } } - /// expects [resharerStarts] of length equal to resharers. - static ({String resharedStart, Pointer prior}) - beginReshared({ - required String myName, - required String resharerConfig, - required List resharerStarts, - }) { + @override + OpaqueWrapper decodedResharerConfig({required String resharerConfig}) { try { - final result = startReshared( - newMultisigName: 'unused_property', - myName: myName, - resharerConfig: resharerConfig, - resharerStarts: resharerStarts, - ); - return (resharedStart: result.encoded, prior: result.machine); + final config = decodeResharerConfig(resharerConfig: resharerConfig); + + return OpaqueWrapper(config); } catch (e, s) { - Logging.instance.f("beginReshared failed: ", error: e, stackTrace: s); + Logging.instance.f( + "decodedResharerConfig failed: ", + error: e, + stackTrace: s, + ); rethrow; } } - /// expects [encryptionKeysOfResharedTo] of length equal to new participants - static String finishResharer({ - required StartResharerRes machine, - required List encryptionKeysOfResharedTo, + @override + OpaqueWrapper decodedSignConfig({ + required String serializedKeys, + required String encodedConfig, + required int network, }) { try { - final result = completeResharer( - machine: machine, - encryptionKeysOfResharedTo: encryptionKeysOfResharedTo, + final configPtr = decodeSignConfig( + thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), + encodedSignConfig: encodedConfig, + network: network, ); - return result; + return OpaqueWrapper(configPtr); } catch (e, s) { - Logging.instance.f("finishResharer failed: ", error: e, stackTrace: s); + Logging.instance.f("decodedSignConfig failed: ", error: e, stackTrace: s); rethrow; } } - /// expects [resharerCompletes] of length equal to resharers - static ({String multisigConfig, String serializedKeys, String resharedId}) - finishReshared({ - required StartResharedRes prior, - required List resharerCompletes, + @override + ({ + String changeAddress, + int feePerWeight, + List inputs, + List<({String address, Amount amount})> recipients, + }) + extractDataFromSignConfig({ + required String serializedKeys, + required String signConfig, + required CryptoCurrency coin, }) { try { - final result = completeReshared( - prior: prior, - resharerCompletes: resharerCompletes, + final network = coin.network.isTestNet + ? Network.Testnet + : Network.Mainnet; + final signConfigPointer = decodedSignConfig( + encodedConfig: signConfig, + network: network, + serializedKeys: serializedKeys, ); - return result; - } catch (e, s) { - Logging.instance.f("finishReshared failed: ", error: e, stackTrace: s); - rethrow; - } - } - static Pointer decodedResharerConfig({ - required String resharerConfig, - }) { - try { - final config = decodeResharerConfig(resharerConfig: resharerConfig); + // get various data from config + final feePerWeight = signFeePerWeight( + signConfigPointer: signConfigPointer.getValue(), + ); + final changeAddress = signChange( + signConfigPointer: signConfigPointer.getValue(), + ); + final recipientsCount = signPayments( + signConfigPointer: signConfigPointer.getValue(), + ); - return config; + // get tx recipient info + final List<({String address, Amount amount})> recipients = []; + for (int i = 0; i < recipientsCount; i++) { + final String address = signPaymentAddress( + signConfigPointer: signConfigPointer.getValue(), + index: i, + ); + final int amount = signPaymentAmount( + signConfigPointer: signConfigPointer.getValue(), + index: i, + ); + recipients.add(( + address: address, + amount: Amount( + rawValue: BigInt.from(amount), + fractionDigits: coin.fractionDigits, + ), + )); + } + + // get utxos + final count = signInputs(signConfigPointer: signConfigPointer.getValue()); + final List outputs = []; + for (int i = 0; i < count; i++) { + final output = signInput( + thresholdKeysWrapperPointer: deserializeKeys(keys: serializedKeys), + signConfig: signConfig, + index: i, + network: network, + ); + + outputs.add(output); + } + + return ( + recipients: recipients, + changeAddress: changeAddress, + feePerWeight: feePerWeight, + inputs: outputs + .map( + (e) => FrostOutput( + hash: e.hash, + vout: e.vout, + value: e.value, + scriptPubKey: e.scriptPubKey, + addressDerivationData: e.addressDerivationData, + ), + ) + .toList(), + ); } catch (e, s) { Logging.instance.f( - "decodedResharerConfig failed: ", + "extractDataFromSignConfig failed: ", error: e, stackTrace: s, ); @@ -511,11 +402,8 @@ abstract class Frost { } } - static ({ - int newThreshold, - Map resharers, - List newParticipants, - }) + @override + ({List newParticipants, int newThreshold, Map resharers}) extractResharerConfigData({required String rConfig}) { final decoded = _decodeRConfigWithResharers(rConfig); final resharerConfig = decoded.config; @@ -524,13 +412,13 @@ abstract class Frost { final newThreshold = resharerNewThreshold( resharerConfigPointer: decodedResharerConfig( resharerConfig: resharerConfig, - ), + ).getValue(), ); final resharersCount = resharerResharers( resharerConfigPointer: decodedResharerConfig( resharerConfig: resharerConfig, - ), + ).getValue(), ); final List resharers = []; for (int i = 0; i < resharersCount; i++) { @@ -538,7 +426,7 @@ abstract class Frost { resharerResharer( resharerConfigPointer: decodedResharerConfig( resharerConfig: resharerConfig, - ), + ).getValue(), index: i, ), ); @@ -547,7 +435,7 @@ abstract class Frost { final newParticipantsCount = resharerNewParticipants( resharerConfigPointer: decodedResharerConfig( resharerConfig: resharerConfig, - ), + ).getValue(), ); final List newParticipants = []; for (int i = 0; i < newParticipantsCount; i++) { @@ -555,7 +443,7 @@ abstract class Frost { resharerNewParticipant( resharerConfigPointer: decodedResharerConfig( resharerConfig: resharerConfig, - ), + ).getValue(), index: i, ), ); @@ -585,16 +473,210 @@ abstract class Frost { } } - static String encodeRConfig(String config, Map resharers) { - return base64Encode("$config@${jsonEncode(resharers)}".toUint8ListFromUtf8); + @override + ({String multisigConfig, String resharedId, String serializedKeys}) + finishReshared({ + required OpaqueWrapper prior, + required List resharerCompletes, + }) { + try { + final result = completeReshared( + prior: prior.getValue(), + resharerCompletes: resharerCompletes, + ); + return result; + } catch (e, s) { + Logging.instance.f("finishReshared failed: ", error: e, stackTrace: s); + rethrow; + } + } + + @override + String finishResharer({ + required OpaqueWrapper machine, + required List encryptionKeysOfResharedTo, + }) { + try { + final result = completeResharer( + machine: machine.getValue(), + encryptionKeysOfResharedTo: encryptionKeysOfResharedTo, + ); + return result; + } catch (e, s) { + Logging.instance.f("finishResharer failed: ", error: e, stackTrace: s); + rethrow; + } + } + + @override + ({OpaqueWrapper secretSharesResPtr, String share}) generateSecretShares({ + required OpaqueWrapper multisigConfigWithNamePtr, + required String mySeed, + required OpaqueWrapper secretShareMachineWrapperPtr, + required List commitments, + }) { + try { + final secretSharesResPtr = getSecretShares( + multisigConfigWithName: multisigConfigWithNamePtr.getValue(), + seed: mySeed, + language: Language.english, + machine: secretShareMachineWrapperPtr.getValue(), + commitments: commitments, + ); + + final share = secretSharesResPtr.ref.shares.toDartString(); + + return ( + share: share, + secretSharesResPtr: OpaqueWrapper(secretSharesResPtr), + ); + } catch (e, s) { + Logging.instance.f( + "generateSecretShares failed: ", + error: e, + stackTrace: s, + ); + rethrow; + } + } + + @override + List getParticipants({required String multisigConfig}) { + try { + final numberOfParticipants = multisigParticipants( + multisigConfig: multisigConfig, + ); + + final List participants = []; + for (int i = 0; i < numberOfParticipants; i++) { + participants.add( + multisigParticipant(multisigConfig: multisigConfig, index: i), + ); + } + + return participants; + } catch (e, s) { + Logging.instance.f("getParticipants failed: ", error: e, stackTrace: s); + rethrow; + } + } + + @override + int getThreshold({required String multisigConfig}) { + try { + final threshold = multisigThreshold(multisigConfig: multisigConfig); + + return threshold; + } catch (e, s) { + Logging.instance.f("getThreshold failed: ", error: e, stackTrace: s); + rethrow; + } + } + + @override + ({ + String commitments, + OpaqueWrapper multisigConfigWithNamePtr, + OpaqueWrapper secretShareMachineWrapperPtr, + String seed, + }) + startKeyGeneration({required String multisigConfig, required String myName}) { + try { + final startKeyGenResPtr = startKeyGen( + multisigConfig: multisigConfig, + myName: myName, + language: Language.english, + ); + + final seed = startKeyGenResPtr.ref.seed.toDartString(); + final commitments = startKeyGenResPtr.ref.commitments.toDartString(); + final configWithNamePtr = startKeyGenResPtr.ref.config; + final machinePtr = startKeyGenResPtr.ref.machine; + + return ( + seed: seed, + commitments: commitments, + multisigConfigWithNamePtr: OpaqueWrapper(configWithNamePtr), + secretShareMachineWrapperPtr: OpaqueWrapper(machinePtr), + ); + } catch (e, s) { + Logging.instance.f( + "startKeyGeneration failed: ", + error: e, + stackTrace: s, + ); + rethrow; + } + } + + @override + bool validateEncodedMultisigConfig({required String encodedConfig}) { + try { + decodeMultisigConfig(multisigConfig: encodedConfig); + return true; + } catch (e, s) { + Logging.instance.f( + "validateEncodedMultisigConfig failed: ", + error: e, + stackTrace: s, + ); + return false; + } } - static String decodeRConfig(String rConfig) { - return base64Decode(rConfig).toUtf8String.split("@").first; + @override + Uint8List getMultisigSalt({required String multisigConfig}) => + multisigSalt(multisigConfig: multisigConfig); + + @override + int participantIndexFromKeys({required String serializedKeys}) => + getParticipantIndexFromKeys(serializedKeys: serializedKeys); + + @override + int getMultisigThreshold({required String multisigConfig}) => + multisigThreshold(multisigConfig: multisigConfig); + + @override + int thresholdFromKeys({required String serializedKeys}) => + getThresholdFromKeys(serializedKeys: serializedKeys); + + @override + Uint8List getResharerSalt({required String resharerConfig}) => + resharerSalt(resharerConfig: resharerConfig); + + @override + OpaqueWrapper getDeserializedKeys({required String keys}) => + OpaqueWrapper(deserializeKeys(keys: keys)); + + @override + String getAddressForKeys({ + required OpaqueWrapper keys, + required int network, + required FrostAddressDerivationData addressDerivationData, + required bool secure, + }) { + try { + return addressForKeys( + network: network, + keys: keys.getValue(), + addressDerivationData: addressDerivationData, + secure: secure, + ); + } on FrostdartException catch (e) { + if (e.errorCode == 72) throw FrostBadIndexException(); + rethrow; + } } - static ({Map resharers, String config}) - _decodeRConfigWithResharers(String rConfig) { + @override + int get mainnet => Network.Mainnet; + + @override + int get testnet => Network.Testnet; + + ({Map resharers, String config}) _decodeRConfigWithResharers( + String rConfig, + ) { final parts = base64Decode(rConfig).toUtf8String.split("@"); final config = parts[0]; @@ -603,3 +685,5 @@ abstract class Frost { return (resharers: resharers, config: config); } } + +//END_ON diff --git a/tool/wl_templates/MWC_libmwc_interface_impl.template.dart b/tool/wl_templates/MWC_libmwc_interface_impl.template.dart new file mode 100644 index 000000000..0262cc5e3 --- /dev/null +++ b/tool/wl_templates/MWC_libmwc_interface_impl.template.dart @@ -0,0 +1,351 @@ +//ON +import 'package:flutter_libmwc/git_versions.dart' as mimblewimblecoin_versions; +import 'package:flutter_libmwc/lib.dart' as mimblewimblecoin; +import 'package:flutter_libmwc/models/transaction.dart' + as mimblewimblecoin_models; + +//END_ON +import '../interfaces/libmwc_interface.dart'; + +LibMwcInterface get libMwc => _getLibMwc(); + +//OFF +LibMwcInterface _getLibMwc() => throw Exception("MWC not enabled!"); + +//END_OFF +//ON +LibMwcInterface _getLibMwc() => const _LibMwcInterfaceImpl(); + +final class _LibMwcInterfaceImpl extends LibMwcInterface { + const _LibMwcInterfaceImpl(); + + @override + Future cancelTransaction({ + required String wallet, + required String transactionId, + }) { + return mimblewimblecoin.Libmwc.cancelTransaction( + wallet: wallet, + transactionId: transactionId, + ); + } + + @override + Future<({String commitId, String slateId})> createTransaction({ + required String wallet, + required int amount, + required String address, + required int secretKeyIndex, + required String mwcmqsConfig, + required int minimumConfirmations, + required String note, + }) { + return mimblewimblecoin.Libmwc.createTransaction( + wallet: wallet, + amount: amount, + address: address, + secretKeyIndex: secretKeyIndex, + mwcmqsConfig: mwcmqsConfig, + minimumConfirmations: minimumConfirmations, + note: note, + ); + } + + @override + Future< + ({ + String? recipientAddress, + String? senderAddress, + String slateJson, + bool wasEncrypted, + }) + > + decodeSlatepack({required String slatepack}) { + return mimblewimblecoin.Libmwc.decodeSlatepack(slatepack: slatepack); + } + + @override + Future< + ({ + String? recipientAddress, + String? senderAddress, + String slateJson, + bool wasEncrypted, + }) + > + decodeSlatepackWithWallet({ + required String wallet, + required String slatepack, + }) { + return mimblewimblecoin.Libmwc.decodeSlatepackWithWallet( + wallet: wallet, + slatepack: slatepack, + ); + } + + @override + Future deleteWallet({ + required String wallet, + required String config, + }) { + return mimblewimblecoin.Libmwc.deleteWallet(wallet: wallet, config: config); + } + + @override + Future<({String? recipientAddress, String slatepack, bool wasEncrypted})> + encodeSlatepack({ + required String slateJson, + String? recipientAddress, + bool encrypt = false, + String? wallet, + }) { + return mimblewimblecoin.Libmwc.encodeSlatepack( + slateJson: slateJson, + recipientAddress: recipientAddress, + encrypt: encrypt, + wallet: wallet, + ); + } + + @override + Future getAddressInfo({required String wallet, required int index}) { + return mimblewimblecoin.Libmwc.getAddressInfo(wallet: wallet, index: index); + } + + @override + Future getChainHeight({required String config}) { + return mimblewimblecoin.Libmwc.getChainHeight(config: config); + } + + @override + Future<({int fee, bool strategyUseAll, int total})> getTransactionFees({ + required String wallet, + required int amount, + required int minimumConfirmations, + required int available, + }) { + return mimblewimblecoin.Libmwc.getTransactionFees( + wallet: wallet, + amount: amount, + minimumConfirmations: minimumConfirmations, + available: available, + ); + } + + @override + Future> getTransactions({ + required String wallet, + required int refreshFromNode, + }) async { + final transactions = await mimblewimblecoin.Libmwc.getTransactions( + wallet: wallet, + refreshFromNode: refreshFromNode, + ); + + return transactions + .map( + (e) => MwcTransaction( + parentKeyId: e.parentKeyId, + id: e.id, + txType: e.txType, + creationTs: e.creationTs, + confirmationTs: e.confirmationTs, + confirmed: e.confirmed, + numInputs: e.numInputs, + numOutputs: e.numOutputs, + amountCredited: e.amountCredited, + amountDebited: e.amountDebited, + txSlateId: e.txSlateId, + fee: e.fee, + ttlCutoffHeight: e.ttlCutoffHeight, + messages: e.messages?.messages + .map( + (f) => MwcMessage( + id: f.id, + publicKey: f.publicKey, + message: f.message, + messageSig: f.messageSig, + ), + ) + .toList(), + storedTx: e.storedTx, + kernelExcess: e.kernelExcess, + kernelLookupMinHeight: e.kernelLookupMinHeight, + paymentProof: e.paymentProof, + ), + ) + .toList(); + } + + @override + Future< + ({ + double awaitingFinalization, + double pending, + double spendable, + double total, + }) + > + getWalletBalances({ + required String wallet, + required int refreshFromNode, + required int minimumConfirmations, + }) { + return mimblewimblecoin.Libmwc.getWalletBalances( + wallet: wallet, + refreshFromNode: refreshFromNode, + minimumConfirmations: minimumConfirmations, + ); + } + + @override + Future initializeNewWallet({ + required String config, + required String mnemonic, + required String password, + required String name, + }) { + return mimblewimblecoin.Libmwc.initializeNewWallet( + config: config, + mnemonic: mnemonic, + password: password, + name: name, + ); + } + + @override + Future openWallet({ + required String config, + required String password, + }) { + return mimblewimblecoin.Libmwc.openWallet( + config: config, + password: password, + ); + } + + @override + Future recoverWallet({ + required String config, + required String password, + required String mnemonic, + required String name, + }) { + return mimblewimblecoin.Libmwc.recoverWallet( + config: config, + password: password, + mnemonic: mnemonic, + name: name, + ); + } + + @override + Future scanOutputs({ + required String wallet, + required int startHeight, + required int numberOfBlocks, + }) { + return mimblewimblecoin.Libmwc.scanOutputs( + wallet: wallet, + startHeight: startHeight, + numberOfBlocks: numberOfBlocks, + ); + } + + @override + void startMwcMqsListener({ + required String wallet, + required String mwcmqsConfig, + }) { + return mimblewimblecoin.Libmwc.startMwcMqsListener( + wallet: wallet, + mwcmqsConfig: mwcmqsConfig, + ); + } + + @override + void stopMwcMqsListener() { + return mimblewimblecoin.Libmwc.stopMwcMqsListener(); + } + + @override + Future<({String commitId, String slateId})> txFinalize({ + required String wallet, + required String slateJson, + }) { + return mimblewimblecoin.Libmwc.txFinalize( + wallet: wallet, + slateJson: slateJson, + ); + } + + @override + Future<({String commitId, String slateId})> txHttpSend({ + required String wallet, + required int selectionStrategyIsAll, + required int minimumConfirmations, + required String message, + required int amount, + required String address, + }) { + return mimblewimblecoin.Libmwc.txHttpSend( + wallet: wallet, + selectionStrategyIsAll: selectionStrategyIsAll, + minimumConfirmations: minimumConfirmations, + message: message, + amount: amount, + address: address, + ); + } + + @override + Future txInit({ + required String wallet, + required int amount, + int minimumConfirmations = 1, + bool selectionStrategyIsAll = false, + String message = '', + }) { + return mimblewimblecoin.Libmwc.txInit( + wallet: wallet, + amount: amount, + message: message, + minimumConfirmations: minimumConfirmations, + selectionStrategyIsAll: selectionStrategyIsAll, + ); + } + + @override + Future<({String commitId, String slateId, String slateJson})> + txReceiveDetailed({required String wallet, required String slateJson}) { + return mimblewimblecoin.Libmwc.txReceiveDetailed( + wallet: wallet, + slateJson: slateJson, + ); + } + + @override + bool txTypeIsReceiveCancelled(Enum value) { + return value == mimblewimblecoin_models.TransactionType.TxReceivedCancelled; + } + + @override + bool txTypeIsReceived(Enum value) { + return value == mimblewimblecoin_models.TransactionType.TxReceived; + } + + @override + bool txTypeIsSentCancelled(Enum value) { + return value == mimblewimblecoin_models.TransactionType.TxSentCancelled; + } + + @override + bool validateSendAddress({required String address}) { + return mimblewimblecoin.Libmwc.validateSendAddress(address: address); + } + + @override + String getPluginVersion() => mimblewimblecoin_versions.getPluginVersion(); +} + +//END_ON diff --git a/tool/wl_templates/MWEBD_mwebd_server_interface_impl.template.dart b/tool/wl_templates/MWEBD_mwebd_server_interface_impl.template.dart new file mode 100644 index 000000000..55ba2c630 --- /dev/null +++ b/tool/wl_templates/MWEBD_mwebd_server_interface_impl.template.dart @@ -0,0 +1,73 @@ +//ON +import 'package:flutter_mwebd/flutter_mwebd.dart' hide Status; + +//END_ON +import '../../wallets/crypto_currency/crypto_currency.dart'; +import '../interfaces/mwebd_server_interface.dart'; + +MwebdServerInterface get mwebdServerInterface => _getInterface(); + +//OFF +MwebdServerInterface _getInterface() => throw Exception("MWEBD not enabled!"); + +//END_OFF +//ON +MwebdServerInterface _getInterface() => const _MwebdServerInterfaceImpl(); + +extension _OpaqueMwebdServerExt on OpaqueMwebdServer { + MwebdServer get value => get(); +} + +class _MwebdServerInterfaceImpl extends MwebdServerInterface { + const _MwebdServerInterfaceImpl(); + + @override + Future<({OpaqueMwebdServer server, int port})> createAndStartServer( + CryptoCurrencyNetwork net, { + required String chain, + required String dataDir, + required String peer, + String proxy = "", + required int serverPort, + }) async { + final newServer = MwebdServer( + chain: chain, + dataDir: dataDir, + peer: peer, + proxy: proxy, + serverPort: serverPort, + ); + await newServer.createServer(); + await newServer.startServer(); + return (server: OpaqueMwebdServer(newServer), port: newServer.serverPort); + } + + @override + Future<({String chain, String dataDir, String peer})> stopServer( + OpaqueMwebdServer server, + ) async { + final actual = server.value; + final data = ( + chain: actual.chain, + dataDir: actual.dataDir, + peer: actual.peer, + ); + await actual.stopServer(); + return data; + } + + @override + Future getServerStatus(OpaqueMwebdServer? server) async { + final status = await server?.value.getStatus(); + if (status == null) return null; + + return Status( + blockHeaderHeight: status.blockHeaderHeight, + mwebHeaderHeight: status.mwebHeaderHeight, + mwebUtxosHeight: status.mwebUtxosHeight, + blockTime: status.blockTime, + ); + } +} + +//END_ON diff --git a/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart b/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart new file mode 100644 index 000000000..fb1304584 --- /dev/null +++ b/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart @@ -0,0 +1,560 @@ +//ON +import 'package:cs_salvium/cs_salvium.dart' as lib_salvium; +import 'package:cs_salvium/src/deprecated/get_height_by_date.dart' + as cs_salvium_deprecated; +import 'package:cs_salvium/src/ffi_bindings/salvium_wallet_bindings.dart' + as sal_wallet_ffi; + +//END_ON +import '../../models/input.dart'; +import '../interfaces/cs_monero_interface.dart'; +import '../interfaces/cs_salvium_interface.dart'; + +CsSalviumInterface get csSalvium => _getInterface(); + +//OFF +CsSalviumInterface _getInterface() => throw Exception("Sal not enabled!"); + +//END_OFF +//ON +CsSalviumInterface _getInterface() => const _CsSalviumInterfaceImpl(); + +extension _WrappedWalletExt on WrappedWallet { + lib_salvium.SalviumWallet get actual => get(); +} + +class _CsSalviumInterfaceImpl extends CsSalviumInterface { + const _CsSalviumInterfaceImpl(); + + @override + void setUseCsSalviumLoggerInternal(bool enable) => + lib_salvium.Logging.useLogger = enable; + + @override + bool walletExists(String path) => + lib_salvium.SalviumWallet.isWalletExist(path); + + @override + Future estimateFee( + int rate, + BigInt amount, { + required WrappedWallet wallet, + }) { + lib_salvium.TransactionPriority priority; + switch (rate) { + case 1: + priority = lib_salvium.TransactionPriority.low; + break; + case 2: + priority = lib_salvium.TransactionPriority.medium; + break; + case 3: + priority = lib_salvium.TransactionPriority.high; + break; + case 4: + priority = lib_salvium.TransactionPriority.last; + break; + case 0: + default: + priority = lib_salvium.TransactionPriority.normal; + break; + } + + return wallet.actual.estimateFee(priority, amount.toInt()); + } + + @override + Future loadWallet( + String walletId, { + required String path, + required String password, + int network = 0, + }) async { + final wallet = await lib_salvium.SalviumWallet.loadWallet( + path: path, + password: password, + networkType: network, + ); + return WrappedWallet(wallet); + } + + @override + int getTxPriorityHigh() => lib_salvium.TransactionPriority.high.value; + + @override + int getTxPriorityMedium() => lib_salvium.TransactionPriority.medium.value; + + @override + int getTxPriorityNormal() => lib_salvium.TransactionPriority.normal.value; + + @override + String getAddress( + WrappedWallet wallet, { + int accountIndex = 0, + int addressIndex = 0, + }) => wallet.actual + .getAddress(accountIndex: accountIndex, addressIndex: addressIndex) + .value; + + @override + Future getCreatedWallet({ + required String path, + required String password, + required int wordCount, + required String seedOffset, + int network = 0, + }) async { + final type = switch (wordCount) { + 16 => lib_salvium.SalviumSeedType.sixteen, + 25 => lib_salvium.SalviumSeedType.twentyFive, + _ => throw Exception("Invalid mnemonic word count: $wordCount"), + }; + + final wallet = await lib_salvium.SalviumWallet.create( + path: path, + password: password, + seedType: type, + seedOffset: seedOffset, + networkType: network, + ); + + return WrappedWallet(wallet); + } + + @override + Future getRestoredWallet({ + required String walletId, + required String path, + required String password, + required String mnemonic, + required String seedOffset, + int network = 0, + int height = 0, + }) async { + final wallet = await lib_salvium.SalviumWallet.restoreWalletFromSeed( + path: path, + password: password, + seed: mnemonic, + restoreHeight: height, + seedOffset: seedOffset, + networkType: network, + ); + + return WrappedWallet(wallet); + } + + @override + Future getRestoredFromViewKeyWallet({ + required String walletId, + required String path, + required String password, + required String address, + required String privateViewKey, + int height = 0, + int network = 0, + }) async { + final wallet = await lib_salvium.SalviumWallet.createViewOnlyWallet( + path: path, + password: password, + address: address, + viewKey: privateViewKey, + restoreHeight: height, + networkType: network, + ); + + return WrappedWallet(wallet); + } + + @override + String getTxKey(WrappedWallet wallet, String txid) => + wallet.actual.getTxKey(txid); + + @override + Future save(WrappedWallet wallet) => wallet.actual.save(); + + @override + String getPublicViewKey(WrappedWallet wallet) => + wallet.actual.getPublicViewKey(); + + @override + String getPrivateViewKey(WrappedWallet wallet) => + wallet.actual.getPrivateViewKey(); + + @override + String getPublicSpendKey(WrappedWallet wallet) => + wallet.actual.getPublicSpendKey(); + + @override + String getPrivateSpendKey(WrappedWallet wallet) => + wallet.actual.getPrivateSpendKey(); + + @override + Future isSynced(WrappedWallet wallet) => wallet.actual.isSynced(); + + @override + void startSyncing(WrappedWallet wallet) => wallet.actual.startSyncing(); + + @override + void stopSyncing(WrappedWallet wallet) => wallet.actual.stopSyncing(); + + @override + void startAutoSaving(WrappedWallet wallet) => wallet.actual.startAutoSaving(); + + @override + void stopAutoSaving(WrappedWallet wallet) => wallet.actual.stopAutoSaving(); + + @override + bool hasListeners(WrappedWallet wallet) => + wallet.actual.getListeners().isNotEmpty; + + @override + void addListener(WrappedWallet wallet, CsWalletListener listener) => + wallet.actual.addListener( + lib_salvium.WalletListener( + onSyncingUpdate: listener.onSyncingUpdate, + onNewBlock: listener.onNewBlock, + onBalancesChanged: listener.onBalancesChanged, + onError: listener.onError, + ), + ); + + @override + void startListeners(WrappedWallet wallet) => wallet.actual.startListeners(); + + @override + void stopListeners(WrappedWallet wallet) => wallet.actual.stopListeners(); + + @override + int getRefreshFromBlockHeight(WrappedWallet wallet) => + wallet.actual.getRefreshFromBlockHeight(); + + @override + void setRefreshFromBlockHeight(WrappedWallet wallet, int height) => + wallet.actual.setRefreshFromBlockHeight(height); + + @override + Future rescanBlockchain(WrappedWallet wallet) => + wallet.actual.rescanBlockchain(); + + @override + Future isConnectedToDaemon(WrappedWallet wallet) => + wallet.actual.isConnectedToDaemon(); + + @override + Future connect( + WrappedWallet wallet, { + required String daemonAddress, + required bool trusted, + String? daemonUsername, + String? daemonPassword, + bool useSSL = false, + bool isLightWallet = false, + String? socksProxyAddress, + }) async { + await wallet.actual.connect( + daemonAddress: daemonAddress, + trusted: trusted, + daemonUsername: daemonUsername, + daemonPassword: daemonPassword, + useSSL: useSSL, + socksProxyAddress: socksProxyAddress, + isLightWallet: isLightWallet, + ); + } + + @override + Future> getAllTxids( + WrappedWallet wallet, { + bool refresh = false, + }) => wallet.actual.getAllTxids(refresh: refresh); + + @override + BigInt? getBalance(WrappedWallet wallet, {int accountIndex = 0}) => + wallet.actual.getBalance(accountIndex: accountIndex); + + @override + BigInt? getUnlockedBalance(WrappedWallet wallet, {int accountIndex = 0}) => + wallet.actual.getUnlockedBalance(accountIndex: accountIndex); + + @override + Future> getAllTxs( + WrappedWallet wallet, { + bool refresh = false, + }) async { + final transactions = await wallet.actual.getAllTxs(refresh: refresh); + return transactions + .map( + (e) => CsTransaction( + displayLabel: e.displayLabel, + description: e.description, + fee: e.fee, + confirmations: e.confirmations, + blockHeight: e.blockHeight, + accountIndex: e.accountIndex, + addressIndexes: e.addressIndexes, + paymentId: e.paymentId, + amount: e.amount, + isSpend: e.isSpend, + hash: e.hash, + key: e.key, + timeStamp: e.timeStamp, + minConfirms: e.minConfirms.value, + salviumData: ( + asset: e.asset, + type: e.type.value, + typeDisplay: e.type.displayName, + ), + ), + ) + .toList(); + } + + @override + Future> getTxs( + WrappedWallet wallet, { + required Set txids, + bool refresh = false, + }) async { + final transactions = await wallet.actual.getTxs( + txids: txids, + refresh: refresh, + ); + + return transactions + .map( + (e) => CsTransaction( + displayLabel: e.displayLabel, + description: e.description, + fee: e.fee, + confirmations: e.confirmations, + blockHeight: e.blockHeight, + accountIndex: e.accountIndex, + addressIndexes: e.addressIndexes, + paymentId: e.paymentId, + amount: e.amount, + isSpend: e.isSpend, + hash: e.hash, + key: e.key, + timeStamp: e.timeStamp, + minConfirms: e.minConfirms.value, + salviumData: ( + asset: e.asset, + type: e.type.value, + typeDisplay: e.type.displayName, + ), + ), + ) + .toList(); + } + + @override + Future createTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }) async { + final pending = await wallet.actual.createTx( + output: lib_salvium.Recipient( + address: output.address, + amount: output.amount, + ), + paymentId: "", + sweep: sweep, + priority: lib_salvium.TransactionPriority.values.firstWhere( + (e) => e.value == priority, + ), + preferredInputs: preferredInputs + ?.map( + (e) => lib_salvium.Output( + address: e.address!, + hash: e.utxo.txid, + keyImage: e.utxo.keyImage!, + value: e.value, + isFrozen: e.utxo.isBlocked, + isUnlocked: + e.utxo.blockHeight != null && + (currentHeight - (e.utxo.blockHeight ?? 0)) >= minConfirms, + height: e.utxo.blockHeight ?? 0, + vout: e.utxo.vout, + spent: e.utxo.used ?? false, + spentHeight: null, // doesn't matter here + coinbase: e.utxo.isCoinbase, + ), + ) + .toList(), + accountIndex: accountIndex, + ); + + return CsPendingTransaction( + pending, + pending.amount, + pending.fee, + pending.txid, + ); + } + + @override + Future createStakeTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }) async { + final pending = await wallet.actual.createStakeTx( + output: lib_salvium.Recipient( + address: output.address, + amount: output.amount, + ), + paymentId: "", + priority: lib_salvium.TransactionPriority.values.firstWhere( + (e) => e.value == priority, + ), + preferredInputs: preferredInputs + ?.map( + (e) => lib_salvium.Output( + address: e.address!, + hash: e.utxo.txid, + keyImage: e.utxo.keyImage!, + value: e.value, + isFrozen: e.utxo.isBlocked, + isUnlocked: + e.utxo.blockHeight != null && + (currentHeight - (e.utxo.blockHeight ?? 0)) >= minConfirms, + height: e.utxo.blockHeight ?? 0, + vout: e.utxo.vout, + spent: e.utxo.used ?? false, + spentHeight: null, // doesn't matter here + coinbase: e.utxo.isCoinbase, + ), + ) + .toList(), + accountIndex: accountIndex, + ); + + return CsPendingTransaction( + pending, + pending.amount, + pending.fee, + pending.txid, + ); + } + + @override + Future createTxMultiDest( + WrappedWallet wallet, { + required List outputs, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }) async { + final pending = await wallet.actual.createTxMultiDest( + outputs: outputs + .map( + (e) => lib_salvium.Recipient(address: e.address, amount: e.amount), + ) + .toList(), + paymentId: "", + sweep: sweep, + priority: lib_salvium.TransactionPriority.values.firstWhere( + (e) => e.value == priority, + ), + preferredInputs: preferredInputs + ?.map( + (e) => lib_salvium.Output( + address: e.address!, + hash: e.utxo.txid, + keyImage: e.utxo.keyImage!, + value: e.value, + isFrozen: e.utxo.isBlocked, + isUnlocked: + e.utxo.blockHeight != null && + (currentHeight - (e.utxo.blockHeight ?? 0)) >= minConfirms, + height: e.utxo.blockHeight ?? 0, + vout: e.utxo.vout, + spent: e.utxo.used ?? false, + spentHeight: null, // doesn't matter here + coinbase: e.utxo.isCoinbase, + ), + ) + .toList(), + accountIndex: accountIndex, + ); + + return CsPendingTransaction( + pending, + pending.amount, + pending.fee, + pending.txid, + ); + } + + @override + Future commitTx(WrappedWallet wallet, CsPendingTransaction tx) => + wallet.actual.commitTx(tx.value as lib_salvium.PendingTransaction); + + @override + Future> getOutputs( + WrappedWallet wallet, { + bool refresh = false, + bool includeSpent = false, + }) async { + final outputs = await wallet.actual.getOutputs( + includeSpent: includeSpent, + refresh: refresh, + ); + + return outputs + .map( + (e) => CsOutput( + address: e.address, + hash: e.hash, + keyImage: e.keyImage, + value: e.value, + isFrozen: e.isFrozen, + isUnlocked: e.isUnlocked, + height: e.height, + spentHeight: e.spentHeight, + vout: e.vout, + spent: e.spent, + coinbase: e.coinbase, + ), + ) + .toList(); + } + + @override + Future freezeOutput(WrappedWallet wallet, String keyImage) => + wallet.actual.freezeOutput(keyImage); + + @override + Future thawOutput(WrappedWallet wallet, String keyImage) => + wallet.actual.thawOutput(keyImage); + + @override + List getSalviumWordList(String language) => + lib_salvium.getSalviumWordList(language); + + @override + int getHeightByDate(DateTime date) => + cs_salvium_deprecated.getSalviumHeightByDate(date: date); + + @override + bool validateAddress(String address, int network) => + sal_wallet_ffi.validateAddress(address, network); + + @override + String getSeed(WrappedWallet wallet) => wallet.actual.getSeed(); +} + +//END_ON diff --git a/tool/wl_templates/TOR_tor_service_impl.template.dart b/tool/wl_templates/TOR_tor_service_impl.template.dart new file mode 100644 index 000000000..3e26cafa2 --- /dev/null +++ b/tool/wl_templates/TOR_tor_service_impl.template.dart @@ -0,0 +1,185 @@ +//ON +import 'dart:io'; + +import 'package:tor_ffi_plugin/tor_ffi_plugin.dart'; + +import '../../services/event_bus/events/global/tor_connection_status_changed_event.dart'; +import '../../services/event_bus/global_event_bus.dart'; +//END_ON +import '../../services/fusion_tor_service.dart'; +import '../../services/tor_service.dart'; +//ON +import '../../utilities/logger.dart'; +//END_ON + +TorService get torService => _getInterface(); +FusionTorService get fusionTorService => _getFusionInterface(); + +//OFF +TorService _getInterface() => throw Exception("TOR not enabled!"); +FusionTorService _getFusionInterface() => throw Exception("TOR not enabled!"); + +//END_OFF +//ON +TorService _getInterface() => _TorServiceImpl(); +FusionTorService _getFusionInterface() => _FusionTorServiceImpl(); + +class _TorServiceImpl extends TorService { + Tor? _tor; + String? _torDataDirPath; + TorConnectionStatus _status = TorConnectionStatus.disconnected; + + @override + TorConnectionStatus get status => _status; + + /// Getter for the proxyInfo. + /// + /// Throws if Tor is not connected. + @override + ({InternetAddress host, int port}) getProxyInfo() { + if (status == TorConnectionStatus.connected) { + return (host: InternetAddress.loopbackIPv4, port: _tor!.port); + } else { + throw Exception("Tor proxy info fetched while not connected!"); + } + } + + /// Initialize the tor ffi lib instance if it hasn't already been set. Nothing + /// changes if _tor is already been set. + @override + void init({required String torDataDirPath, Tor? mockableOverride}) { + _tor ??= mockableOverride ?? Tor.instance; + _torDataDirPath ??= torDataDirPath; + } + + /// Start the Tor service. + /// + /// This will start the Tor service and establish a Tor circuit. + /// + /// Throws an exception if the Tor library was not inited or if the Tor + /// service fails to start. + /// + /// Returns a Future that completes when the Tor service has started. + @override + Future start() async { + if (_tor == null || _torDataDirPath == null) { + throw Exception("TorService.init has not been called!"); + } + + // Start the Tor service. + try { + _updateStatusAndFireEvent( + status: TorConnectionStatus.connecting, + message: "TorService.start call in progress", + ); + + await _tor!.start(torDataDirPath: _torDataDirPath!); + + // no exception or error so we can (probably?) assume tor + // has started successfully + // Fire a TorConnectionStatusChangedEvent on the event bus. + _updateStatusAndFireEvent( + status: TorConnectionStatus.connected, + message: "TorService.start call success", + ); + + // Complete the future. + return; + } catch (e, s) { + Logging.instance.w("TorService.start failed: ", error: e, stackTrace: s); + // _enabled should already be false + + // Fire a TorConnectionStatusChangedEvent on the event bus. + _updateStatusAndFireEvent( + status: TorConnectionStatus.disconnected, + message: "TorService.start call failed", + ); + rethrow; + } + } + + /// Disable Tor. + @override + Future disable() async { + if (_tor == null) { + throw Exception("TorService.init has not been called!"); + } + + // No need to update status and fire event if status won't change. + if (_status == TorConnectionStatus.disconnected) { + return; + } + + _tor!.disable(); + await _tor?.stop(); + + _updateStatusAndFireEvent( + status: TorConnectionStatus.disconnected, + message: "TorService.disable call success", + ); + } + + void _updateStatusAndFireEvent({ + required TorConnectionStatus status, + required String message, + }) { + _status = status; + GlobalEventBus.instance.fire( + TorConnectionStatusChangedEvent(_status, message), + ); + } +} + +class _FusionTorServiceImpl extends FusionTorService { + Tor? _tor; + String? _torDataDirPath; + + /// Getter for the proxyInfo. + /// + /// Throws if Tor is not connected. + @override + ({InternetAddress host, int port}) getProxyInfo() { + try { + return (host: InternetAddress.loopbackIPv4, port: _tor!.port); + } catch (_) { + throw Exception("Tor proxy info fetched while not connected!"); + } + } + + /// Initialize the tor ffi lib instance if it hasn't already been set. Nothing + /// changes if _tor is already been set. + @override + void init({required String torDataDirPath, Tor? mockableOverride}) { + _tor ??= mockableOverride ?? Tor.instance; + _torDataDirPath ??= torDataDirPath; + } + + /// Start the Tor service. + /// + /// This will start the Tor service and establish a Tor circuit. + /// + /// Throws an exception if the Tor library was not inited or if the Tor + /// service fails to start. + /// + /// Returns a Future that completes when the Tor service has started. + @override + Future start() async { + if (_tor == null || _torDataDirPath == null) { + throw Exception("FusionTorService.init has not been called!"); + } + + // Start the Tor service. + try { + await _tor!.start(torDataDirPath: _torDataDirPath!); + } catch (e, s) { + Logging.instance.w( + "FusionTorService.start failed: ", + error: e, + stackTrace: s, + ); + rethrow; + } + } +} + +//END_ON diff --git a/tool/wl_templates/XEL_lib_xelis_interface_impl.template.dart b/tool/wl_templates/XEL_lib_xelis_interface_impl.template.dart new file mode 100644 index 000000000..75941a390 --- /dev/null +++ b/tool/wl_templates/XEL_lib_xelis_interface_impl.template.dart @@ -0,0 +1,432 @@ +//ON +import 'dart:convert'; + +import 'package:logger/logger.dart'; +import 'package:xelis_dart_sdk/xelis_dart_sdk.dart' as xelis_sdk; +import 'package:xelis_flutter/src/api/api.dart' as xelis_api; +import 'package:xelis_flutter/src/api/logger.dart' as xelis_logging; +import 'package:xelis_flutter/src/api/network.dart' as x_network; +import 'package:xelis_flutter/src/api/seed_search_engine.dart' as x_seed; +import 'package:xelis_flutter/src/api/utils.dart' as x_utils; +import 'package:xelis_flutter/src/api/wallet.dart' as x_wallet; +import 'package:xelis_flutter/src/frb_generated.dart' as xelis_rust; + +import '../../providers/progress_report/xelis_table_progress_provider.dart'; +import '../../utilities/logger.dart'; +import '../../wallets/crypto_currency/crypto_currency.dart'; +//END_ON +import '../interfaces/lib_xelis_interface.dart'; + +LibXelisInterface get libXelis => _getInterface(); + +//OFF +LibXelisInterface _getInterface() => throw Exception("XEL not enabled!"); + +//END_OFF +//ON +LibXelisInterface _getInterface() => const _LibXelisInterfaceImpl(); + +extension _OpaqueXelisWalletExt on OpaqueXelisWallet { + x_wallet.XelisWallet get actual => get(); +} + +final class _LibXelisInterfaceImpl extends LibXelisInterface { + const _LibXelisInterfaceImpl(); + + @override + String get xelisAsset => xelis_sdk.xelisAsset; + + @override + Future initRustLib() => xelis_rust.RustLib.init(); + + @override + Future setupRustLogger() => xelis_api.setUpRustLogger(); + + @override + void startListeningToRustLogs() => xelis_api.createLogStream().listen( + (logEntry) { + final Level level; + switch (logEntry.level) { + case xelis_logging.Level.error: + level = Level.error; + case xelis_logging.Level.warn: + level = Level.warning; + case xelis_logging.Level.info: + level = Level.info; + case xelis_logging.Level.debug: + level = Level.debug; + case xelis_logging.Level.trace: + level = Level.trace; + } + + Logging.instance.log( + level, + "[Xelis Rust Log] ${logEntry.tag}: ${logEntry.msg}", + ); + }, + onError: (dynamic e) { + Logging.instance.e("Error receiving Xelis Rust logs: $e"); + }, + ); + + @override + Stream createProgressReportStream() { + double lastPrintedProgress = 0.0; + return xelis_api.createProgressReportStream().map((report) { + return report.when( + tableGeneration: (progress, step, _) { + final currentStep = XelisTableGenerationStep.fromString(step); + if ((progress - lastPrintedProgress).abs() >= 0.05 || + currentStep != XelisTableGenerationStep.fromString(step) || + progress >= 0.99) { + Logging.instance.d( + "Xelis Table Generation: $step - ${progress * 100.0}%", + ); + lastPrintedProgress = progress; + } + + return XelisTableProgressState( + tableProgress: progress, + currentStep: currentStep, + ); + }, + misc: (_) => const XelisTableProgressState(), + ); + }); + } + + @override + bool isAddressValid({required String address}) => + x_utils.isAddressValid(strAddress: address); + + @override + bool validateSeedWord(String word) { + return x_seed.SearchEngine.init( + languageIndex: BigInt.from(0), + ).search(query: word).isNotEmpty; + } + + @override + Stream eventsStream(OpaqueXelisWallet wallet) async* { + final rawEventStream = wallet.actual.eventsStream(); + + await for (final rawData in rawEventStream) { + final json = jsonDecode(rawData); + try { + final eventType = xelis_sdk.WalletEvent.fromStr( + json['event'] as String, + ); + switch (eventType) { + case xelis_sdk.WalletEvent.newTopoHeight: + yield NewTopoheight(json['data']['topoheight'] as int); + case xelis_sdk.WalletEvent.newAsset: + final data = xelis_sdk.AssetData.fromJson( + json['data'] as Map, + ); + + yield NewAsset(data.name, data.decimals, data.maxSupply); + case xelis_sdk.WalletEvent.newTransaction: + final tx = xelis_sdk.TransactionEntry.fromJson( + json['data'] as Map, + ); + yield NewTransaction( + TransactionEntryWrapper( + tx, + entryType: _entryTypeConversion(tx.txEntryType), + hash: tx.hash, + timestamp: tx.timestamp, + topoheight: tx.topoheight, + ), + ); + case xelis_sdk.WalletEvent.balanceChanged: + final data = xelis_sdk.BalanceChangedEvent.fromJson( + json['data'] as Map, + ); + yield BalanceChanged(data.assetHash, data.balance); + case xelis_sdk.WalletEvent.rescan: + yield Rescan(json['data']['start_topoheight'] as int); + case xelis_sdk.WalletEvent.online: + yield const Online(); + case xelis_sdk.WalletEvent.offline: + yield const Offline(); + case xelis_sdk.WalletEvent.historySynced: + yield HistorySynced(json['data']['topoheight'] as int); + } + } catch (e, s) { + Logging.instance.e( + "Error processing xelis wallet event: $rawData", + error: e, + stackTrace: s, + ); + continue; + } + } + } + + @override + Future onlineMode( + OpaqueXelisWallet wallet, { + required String daemonAddress, + }) => wallet.actual.onlineMode(daemonAddress: daemonAddress); + + @override + Future offlineMode(OpaqueXelisWallet wallet) => + wallet.actual.offlineMode(); + + @override + Future updateTables({ + required String precomputedTablesPath, + required bool l1Low, + }) => x_wallet.updateTables( + precomputedTablesPath: precomputedTablesPath, + l1Low: l1Low, + ); + + @override + Future getSeed(OpaqueXelisWallet wallet) => wallet.actual.getSeed(); + + @override + Future createXelisWallet( + String walletId, { + required String name, + required String directory, + required String password, + required CryptoCurrencyNetwork network, + String? seed, + String? privateKey, + String? precomputedTablesPath, + bool? l1Low, + }) async { + final wallet = await x_wallet.createXelisWallet( + name: name, + directory: directory, + password: password, + privateKey: privateKey, + seed: seed, + network: network.xelisNetwork, + precomputedTablesPath: precomputedTablesPath, + l1Low: l1Low, + ); + + return OpaqueXelisWallet(wallet); + } + + @override + Future openXelisWallet( + String walletId, { + required String name, + required String directory, + required String password, + required CryptoCurrencyNetwork network, + String? precomputedTablesPath, + bool? l1Low, + }) async { + final wallet = await x_wallet.openXelisWallet( + name: name, + directory: directory, + password: password, + network: network.xelisNetwork, + precomputedTablesPath: precomputedTablesPath, + l1Low: l1Low, + ); + + return OpaqueXelisWallet(wallet); + } + + @override + String getAddress(OpaqueXelisWallet wallet) => wallet.actual.getAddressStr(); + + @override + Future getDaemonInfo(OpaqueXelisWallet wallet) => + wallet.actual.getDaemonInfo(); + + @override + Future isOnline(OpaqueXelisWallet wallet) => wallet.actual.isOnline(); + + @override + Future rescan(OpaqueXelisWallet wallet, {required BigInt topoheight}) => + wallet.actual.rescan(topoheight: topoheight); + + @override + Future> allHistory( + OpaqueXelisWallet wallet, + ) async => (await wallet.actual.allHistory()).map((e) { + final tx = _checkDecodeJsonStringTxEntry(e); + return TransactionEntryWrapper( + tx, + entryType: _entryTypeConversion(tx.txEntryType), + hash: tx.hash, + timestamp: tx.timestamp, + topoheight: tx.topoheight, + ); + }).toList(); + + @override + Future broadcastTransaction( + OpaqueXelisWallet wallet, { + required String txHash, + }) => wallet.actual.broadcastTransaction(txHash: txHash); + + @override + Future createTransfersTransaction( + OpaqueXelisWallet wallet, { + required List transfers, + }) => wallet.actual.createTransfersTransaction( + transfers: transfers + .map( + (e) => x_wallet.Transfer( + floatAmount: e.floatAmount, + strAddress: e.strAddress, + assetHash: e.assetHash, + extraData: e.extraData, + ), + ) + .toList(), + ); + + @override + Future estimateFees( + OpaqueXelisWallet wallet, { + required List transfers, + }) => wallet.actual.estimateFees( + transfers: transfers + .map( + (e) => x_wallet.Transfer( + floatAmount: e.floatAmount, + strAddress: e.strAddress, + assetHash: e.assetHash, + extraData: e.extraData, + ), + ) + .toList(), + ); + + @override + Future formatCoin( + OpaqueXelisWallet wallet, { + required BigInt atomicAmount, + String? assetHash, + }) => wallet.actual.formatCoin( + atomicAmount: atomicAmount, + assetHash: assetHash, + ); + + @override + Future getAssetDecimals( + OpaqueXelisWallet wallet, { + required String asset, + }) => wallet.actual.getAssetDecimals(asset: asset); + + @override + Future getXelisBalanceRaw(OpaqueXelisWallet wallet) => + wallet.actual.getXelisBalanceRaw(); + + @override + Future hasXelisBalance(OpaqueXelisWallet wallet) => + wallet.actual.hasXelisBalance(); + + @override + Future testDaemonConnection(String endPoint, bool useSSL) async { + try { + final daemon = xelis_sdk.DaemonClient( + endPoint: endPoint, + secureWebSocket: useSSL, + timeout: 5000, + ); + daemon.connect(); + final xelis_sdk.GetInfoResult networkInfo = await daemon.getInfo(); + daemon.disconnect(); + + Logging.instance.i( + "Xelis testNodeConnection result: \"${networkInfo.toString()}\"", + ); + return true; + } catch (e, s) { + Logging.instance.w( + "xelis daemon connection test failed, returning false.", + error: e, + stackTrace: s, + ); + return false; + } + } +} + +extension _XelisNetworkConversion on CryptoCurrencyNetwork { + x_network.Network get xelisNetwork { + switch (this) { + case CryptoCurrencyNetwork.main: + return x_network.Network.mainnet; + case CryptoCurrencyNetwork.test: + return x_network.Network.testnet; + default: + throw ArgumentError('Unsupported network type for Xelis: $this'); + } + } +} + +extension _CryptoCurrencyNetworkConversion on x_network.Network { + CryptoCurrencyNetwork get cryptoCurrencyNetwork { + switch (this) { + case x_network.Network.mainnet: + return CryptoCurrencyNetwork.main; + case x_network.Network.testnet: + return CryptoCurrencyNetwork.test; + default: + throw ArgumentError('Unsupported Xelis network type: $this'); + } + } +} + +EntryWrapper _entryTypeConversion(xelis_sdk.TransactionEntryType entryType) { + if (entryType is xelis_sdk.CoinbaseEntry) { + return CoinbaseEntryWrapper(reward: entryType.reward); + } else if (entryType is xelis_sdk.BurnEntry) { + return BurnEntryWrapper( + amount: entryType.amount, + fee: entryType.fee, + asset: entryType.asset, + ); + } else if (entryType is xelis_sdk.IncomingEntry) { + return IncomingEntryWrapper( + from: entryType.from, + transfers: entryType.transfers + .map( + (e) => ( + amount: e.amount, + asset: e.asset, + extraData: e.extraData?.toJson(), + ), + ) + .toList(), + ); + } else if (entryType is xelis_sdk.OutgoingEntry) { + return OutgoingEntryWrapper( + nonce: entryType.nonce, + fee: entryType.fee, + transfers: entryType.transfers + .map( + (e) => ( + destination: e.destination, + amount: e.amount, + asset: e.asset, + extraData: e.extraData?.toJson(), + ), + ) + .toList(), + ); + } else { + return UnknownEntryWrapper(); + } +} + +xelis_sdk.TransactionEntry _checkDecodeJsonStringTxEntry(String jsonString) { + final json = jsonDecode(jsonString); + if (json is Map) { + return xelis_sdk.TransactionEntry.fromJson(json.cast()); + } + + throw Exception("Not a Map on jsonDecode($jsonString)"); +} + +//END_ON diff --git a/tool/wl_templates/XMR_cs_monero_interface_impl.template.dart b/tool/wl_templates/XMR_cs_monero_interface_impl.template.dart new file mode 100644 index 000000000..af0016e6a --- /dev/null +++ b/tool/wl_templates/XMR_cs_monero_interface_impl.template.dart @@ -0,0 +1,569 @@ +//ON +import 'package:cs_monero/cs_monero.dart' as lib_monero; +import 'package:cs_monero/src/deprecated/get_height_by_date.dart' + as cs_monero_deprecated; +import 'package:cs_monero/src/ffi_bindings/monero_wallet_bindings.dart' + as xmr_wallet_ffi; +import 'package:cs_monero/src/ffi_bindings/wownero_wallet_bindings.dart' + as wow_wallet_ffi; + +//END_ON +import '../../models/input.dart'; +import '../interfaces/cs_monero_interface.dart'; +import '../interfaces/cs_salvium_interface.dart' show WrappedWallet; + +CsMoneroInterface get csMonero => _getInterface(); + +//OFF +CsMoneroInterface _getInterface() => throw Exception("XMR/WOW not enabled!"); + +//END_OFF +//ON +CsMoneroInterface _getInterface() => const _CsMoneroInterfaceImpl(); + +class _CsMoneroInterfaceImpl extends CsMoneroInterface { + const _CsMoneroInterfaceImpl(); + + @override + void setUseCsMoneroLoggerInternal(bool enable) => + lib_monero.Logging.useLogger = enable; + + @override + bool walletExists(String path, {required CsCoin csCoin}) => switch (csCoin) { + CsCoin.monero => lib_monero.MoneroWallet.isWalletExist(path), + CsCoin.wownero => lib_monero.WowneroWallet.isWalletExist(path), + }; + + @override + Future estimateFee( + int rate, + BigInt amount, { + required WrappedWallet wallet, + }) { + lib_monero.TransactionPriority priority; + switch (rate) { + case 1: + priority = lib_monero.TransactionPriority.low; + break; + case 2: + priority = lib_monero.TransactionPriority.medium; + break; + case 3: + priority = lib_monero.TransactionPriority.high; + break; + case 4: + priority = lib_monero.TransactionPriority.last; + break; + case 0: + default: + priority = lib_monero.TransactionPriority.normal; + break; + } + + return wallet.get().estimateFee( + priority, + amount.toInt(), + ); + } + + @override + Future loadWallet( + String walletId, { + required CsCoin csCoin, + required String path, + required String password, + }) async { + return WrappedWallet(switch (csCoin) { + CsCoin.monero => await lib_monero.MoneroWallet.loadWallet( + path: path, + password: password, + ), + + CsCoin.wownero => await lib_monero.WowneroWallet.loadWallet( + path: path, + password: password, + ), + }); + } + + @override + int getTxPriorityHigh() => lib_monero.TransactionPriority.high.value; + + @override + int getTxPriorityMedium() => lib_monero.TransactionPriority.medium.value; + + @override + int getTxPriorityNormal() => lib_monero.TransactionPriority.normal.value; + + @override + String getAddress( + WrappedWallet wallet, { + int accountIndex = 0, + int addressIndex = 0, + }) => wallet + .get() + .getAddress(accountIndex: accountIndex, addressIndex: addressIndex) + .value; + + @override + Future getCreatedWallet({ + required CsCoin csCoin, + required String path, + required String password, + required int wordCount, + required String seedOffset, + }) async { + final lib_monero.Wallet wallet; + + switch (csCoin) { + case CsCoin.monero: + final type = switch (wordCount) { + 16 => lib_monero.MoneroSeedType.sixteen, + 25 => lib_monero.MoneroSeedType.twentyFive, + _ => throw Exception("Invalid mnemonic word count: $wordCount"), + }; + + wallet = await lib_monero.MoneroWallet.create( + path: path, + password: password, + seedType: type, + seedOffset: seedOffset, + ); + break; + + case CsCoin.wownero: + final type = switch (wordCount) { + 16 => lib_monero.WowneroSeedType.sixteen, + 25 => lib_monero.WowneroSeedType.twentyFive, + _ => throw Exception("Invalid mnemonic word count: $wordCount"), + }; + + wallet = await lib_monero.WowneroWallet.create( + path: path, + password: password, + seedType: type, + seedOffset: seedOffset, + ); + break; + } + + return WrappedWallet(wallet); + } + + @override + Future getRestoredWallet({ + required String walletId, + required CsCoin csCoin, + required String path, + required String password, + required String mnemonic, + required String seedOffset, + int height = 0, + }) async { + return WrappedWallet(switch (csCoin) { + CsCoin.monero => await lib_monero.MoneroWallet.restoreWalletFromSeed( + path: path, + password: password, + seed: mnemonic, + restoreHeight: height, + seedOffset: seedOffset, + ), + + CsCoin.wownero => await lib_monero.WowneroWallet.restoreWalletFromSeed( + path: path, + password: password, + seed: mnemonic, + restoreHeight: height, + seedOffset: seedOffset, + ), + }); + } + + @override + Future getRestoredFromViewKeyWallet({ + required String walletId, + required CsCoin csCoin, + required String path, + required String password, + required String address, + required String privateViewKey, + int height = 0, + }) async { + return WrappedWallet(switch (csCoin) { + CsCoin.monero => await lib_monero.MoneroWallet.createViewOnlyWallet( + path: path, + password: password, + address: address, + viewKey: privateViewKey, + restoreHeight: height, + ), + + CsCoin.wownero => await lib_monero.WowneroWallet.createViewOnlyWallet( + path: path, + password: password, + address: address, + viewKey: privateViewKey, + restoreHeight: height, + ), + }); + } + + @override + String getTxKey(WrappedWallet wallet, String txid) => + wallet.get().getTxKey(txid); + + @override + Future save(WrappedWallet wallet) => + wallet.get().save(); + + @override + String getPublicViewKey(WrappedWallet wallet) => + wallet.get().getPublicViewKey(); + + @override + String getPrivateViewKey(WrappedWallet wallet) => + wallet.get().getPrivateViewKey(); + + @override + String getPublicSpendKey(WrappedWallet wallet) => + wallet.get().getPublicSpendKey(); + + @override + String getPrivateSpendKey(WrappedWallet wallet) => + wallet.get().getPrivateSpendKey(); + + @override + Future isSynced(WrappedWallet wallet) => + wallet.get().isSynced(); + + @override + void startSyncing(WrappedWallet wallet) => + wallet.get().startSyncing(); + + @override + void stopSyncing(WrappedWallet wallet) => + wallet.get().stopSyncing(); + + @override + void startAutoSaving(WrappedWallet wallet) => + wallet.get().startAutoSaving(); + + @override + void stopAutoSaving(WrappedWallet wallet) => + wallet.get().stopAutoSaving(); + + @override + bool hasListeners(WrappedWallet wallet) => + wallet.get().getListeners().isNotEmpty; + + @override + void addListener(WrappedWallet wallet, CsWalletListener listener) => + wallet.get().addListener( + lib_monero.WalletListener( + onSyncingUpdate: listener.onSyncingUpdate, + onNewBlock: listener.onNewBlock, + onBalancesChanged: listener.onBalancesChanged, + onError: listener.onError, + ), + ); + + @override + void startListeners(WrappedWallet wallet) => + wallet.get().startListeners(); + + @override + void stopListeners(WrappedWallet wallet) => + wallet.get().stopListeners(); + + @override + int getRefreshFromBlockHeight(WrappedWallet wallet) => + wallet.get().getRefreshFromBlockHeight(); + + @override + void setRefreshFromBlockHeight(WrappedWallet wallet, int height) => + wallet.get().setRefreshFromBlockHeight(height); + + @override + Future rescanBlockchain(WrappedWallet wallet) => + wallet.get().rescanBlockchain(); + + @override + Future isConnectedToDaemon(WrappedWallet wallet) => + wallet.get().isConnectedToDaemon(); + + @override + Future connect( + WrappedWallet wallet, { + required String daemonAddress, + required bool trusted, + String? daemonUsername, + String? daemonPassword, + bool useSSL = false, + bool isLightWallet = false, + String? socksProxyAddress, + }) async { + await wallet.get().connect( + daemonAddress: daemonAddress, + trusted: trusted, + daemonUsername: daemonUsername, + daemonPassword: daemonPassword, + useSSL: useSSL, + socksProxyAddress: socksProxyAddress, + isLightWallet: isLightWallet, + ); + } + + @override + Future> getAllTxids( + WrappedWallet wallet, { + bool refresh = false, + }) => wallet.get().getAllTxids(refresh: refresh); + + @override + BigInt? getBalance(WrappedWallet wallet, {int accountIndex = 0}) => + wallet.get().getBalance(accountIndex: accountIndex); + + @override + BigInt? getUnlockedBalance(WrappedWallet wallet, {int accountIndex = 0}) => + wallet.get().getUnlockedBalance( + accountIndex: accountIndex, + ); + + @override + Future> getAllTxs( + WrappedWallet wallet, { + bool refresh = false, + }) async { + final transactions = await wallet.get().getAllTxs( + refresh: refresh, + ); + return transactions + .map( + (e) => CsTransaction( + displayLabel: e.displayLabel, + description: e.description, + fee: e.fee, + confirmations: e.confirmations, + blockHeight: e.blockHeight, + accountIndex: e.accountIndex, + addressIndexes: e.addressIndexes, + paymentId: e.paymentId, + amount: e.amount, + isSpend: e.isSpend, + hash: e.hash, + key: e.key, + timeStamp: e.timeStamp, + minConfirms: e.minConfirms.value, + ), + ) + .toList(); + } + + @override + Future> getTxs( + WrappedWallet wallet, { + required Set txids, + bool refresh = false, + }) async { + final transactions = await wallet.get().getTxs( + txids: txids, + refresh: refresh, + ); + return transactions + .map( + (e) => CsTransaction( + displayLabel: e.displayLabel, + description: e.description, + fee: e.fee, + confirmations: e.confirmations, + blockHeight: e.blockHeight, + accountIndex: e.accountIndex, + addressIndexes: e.addressIndexes, + paymentId: e.paymentId, + amount: e.amount, + isSpend: e.isSpend, + hash: e.hash, + key: e.key, + timeStamp: e.timeStamp, + minConfirms: e.minConfirms.value, + ), + ) + .toList(); + } + + @override + Future createTx( + WrappedWallet wallet, { + required CsRecipient output, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }) async { + final pending = await wallet.get().createTx( + output: lib_monero.Recipient( + address: output.address, + amount: output.amount, + ), + paymentId: "", + sweep: sweep, + priority: lib_monero.TransactionPriority.values.firstWhere( + (e) => e.value == priority, + ), + preferredInputs: preferredInputs + ?.map( + (e) => lib_monero.Output( + address: e.address!, + hash: e.utxo.txid, + keyImage: e.utxo.keyImage!, + value: e.value, + isFrozen: e.utxo.isBlocked, + isUnlocked: + e.utxo.blockHeight != null && + (currentHeight - (e.utxo.blockHeight ?? 0)) >= minConfirms, + height: e.utxo.blockHeight ?? 0, + vout: e.utxo.vout, + spent: e.utxo.used ?? false, + spentHeight: null, // doesn't matter here + coinbase: e.utxo.isCoinbase, + ), + ) + .toList(), + accountIndex: accountIndex, + ); + + return CsPendingTransaction( + pending, + pending.amount, + pending.fee, + pending.txid, + ); + } + + @override + Future createTxMultiDest( + WrappedWallet wallet, { + required List outputs, + required int priority, + required bool sweep, + List? preferredInputs, + required int accountIndex, + required int minConfirms, + required int currentHeight, + }) async { + final pending = await wallet.get().createTxMultiDest( + outputs: outputs + .map( + (e) => lib_monero.Recipient(address: e.address, amount: e.amount), + ) + .toList(), + paymentId: "", + sweep: sweep, + priority: lib_monero.TransactionPriority.values.firstWhere( + (e) => e.value == priority, + ), + preferredInputs: preferredInputs + ?.map( + (e) => lib_monero.Output( + address: e.address!, + hash: e.utxo.txid, + keyImage: e.utxo.keyImage!, + value: e.value, + isFrozen: e.utxo.isBlocked, + isUnlocked: + e.utxo.blockHeight != null && + (currentHeight - (e.utxo.blockHeight ?? 0)) >= minConfirms, + height: e.utxo.blockHeight ?? 0, + vout: e.utxo.vout, + spent: e.utxo.used ?? false, + spentHeight: null, // doesn't matter here + coinbase: e.utxo.isCoinbase, + ), + ) + .toList(), + accountIndex: accountIndex, + ); + + return CsPendingTransaction( + pending, + pending.amount, + pending.fee, + pending.txid, + ); + } + + @override + Future commitTx(WrappedWallet wallet, CsPendingTransaction tx) => wallet + .get() + .commitTx(tx.value as lib_monero.PendingTransaction); + + @override + Future> getOutputs( + WrappedWallet wallet, { + bool refresh = false, + bool includeSpent = false, + }) async { + final outputs = await wallet.get().getOutputs( + includeSpent: includeSpent, + refresh: refresh, + ); + + return outputs + .map( + (e) => CsOutput( + address: e.address, + hash: e.hash, + keyImage: e.keyImage, + value: e.value, + isFrozen: e.isFrozen, + isUnlocked: e.isUnlocked, + height: e.height, + spentHeight: e.spentHeight, + vout: e.vout, + spent: e.spent, + coinbase: e.coinbase, + ), + ) + .toList(); + } + + @override + Future freezeOutput(WrappedWallet wallet, String keyImage) => + wallet.get().freezeOutput(keyImage); + + @override + Future thawOutput(WrappedWallet wallet, String keyImage) => + wallet.get().thawOutput(keyImage); + + @override + List getMoneroWordList(String language) => + lib_monero.getMoneroWordList(language); + + @override + List getWowneroWordList(String language, int seedLength) => + lib_monero.getWowneroWordList(language, seedWordsLength: seedLength); + + @override + int getHeightByDate(DateTime date, {required CsCoin csCoin}) => + switch (csCoin) { + CsCoin.monero => cs_monero_deprecated.getMoneroHeightByDate(date: date), + CsCoin.wownero => cs_monero_deprecated.getWowneroHeightByDate( + date: date, + ), + }; + + @override + bool validateAddress(String address, int network, {required CsCoin csCoin}) => + switch (csCoin) { + CsCoin.monero => xmr_wallet_ffi.validateAddress(address, network), + CsCoin.wownero => wow_wallet_ffi.validateAddress(address, network), + }; + + @override + String getSeed(WrappedWallet wallet) => + wallet.get().getSeed(); +} + +//END_ON diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 63c954ce1..000000000 --- a/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,56 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - CameraWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("CameraWindows")); - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); - CsMoneroFlutterLibsWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("CsMoneroFlutterLibsWindowsPluginCApi")); - CsSalviumFlutterLibsWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("CsSalviumFlutterLibsWindowsPluginCApi")); - DesktopDropPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("DesktopDropPlugin")); - FlutterLibepiccashPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterLibepiccashPluginCApi")); - FlutterSecureStorageWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); - IsarFlutterLibsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin")); - LocalAuthPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("LocalAuthPlugin")); - PermissionHandlerWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); - SharePlusWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); - Sqlite3FlutterLibsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin")); - StackWalletBackupPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("StackWalletBackupPluginCApi")); - UrlLauncherWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("UrlLauncherWindows")); - WindowSizePluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("WindowSizePlugin")); -} diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake deleted file mode 100644 index ac0ec291d..000000000 --- a/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - camera_windows - connectivity_plus - cs_monero_flutter_libs_windows - cs_salvium_flutter_libs_windows - desktop_drop - flutter_libepiccash - flutter_secure_storage_windows - isar_flutter_libs - local_auth_windows - permission_handler_windows - share_plus - sqlite3_flutter_libs - stack_wallet_backup - url_launcher_windows - window_size -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST - coinlib_flutter - flutter_libsparkmobile - flutter_mwebd - frostdart - tor_ffi_plugin - xelis_flutter -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin)