diff --git a/docs/building.md b/docs/building.md index 596fec99f..6e71727ef 100644 --- a/docs/building.md +++ b/docs/building.md @@ -147,7 +147,7 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up ### Install Flutter on Windows host -Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. +Install Flutter 3.10.3 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. ### Dependencies Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ You may need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/), which can be installed [by Visual Studio](https://stackoverflow.com/a/73923899) (`Tools > Get Tools and Features... > Modify > Individual Components > Windows 10 SDK`). diff --git a/lib/models/isar/stack_theme.dart b/lib/models/isar/stack_theme.dart index d68494d3b..b005c40ea 100644 --- a/lib/models/isar/stack_theme.dart +++ b/lib/models/isar/stack_theme.dart @@ -1493,8 +1493,12 @@ class StackTheme { late final ThemeAssetsV2? assetsV2; + // cheat build runner into adding this at end of property id list in isar + @Name("zAssetsV3") + late final ThemeAssetsV3? assetsV3; + @ignore - IThemeAssets get assets => assetsV2 ?? assetsV1!; + IThemeAssets get assets => assetsV3 ?? assetsV2 ?? assetsV1!; // =========================================================================== @@ -1517,13 +1521,20 @@ class StackTheme { themeId: json["id"] as String, ) : null - ..assetsV2 = version >= 2 + ..assetsV2 = version == 2 ? ThemeAssetsV2.fromJson( json: Map.from(json["assets"] as Map), applicationThemesDirectoryPath: applicationThemesDirectoryPath, themeId: json["id"] as String, ) : null + ..assetsV3 = version >= 3 + ? ThemeAssetsV3.fromJson( + json: Map.from(json["assets"] as Map), + applicationThemesDirectoryPath: applicationThemesDirectoryPath, + themeId: json["id"] as String, + ) + : null ..themeId = json["id"] as String ..name = json["name"] as String ..brightnessString = json["brightness"] as String @@ -1939,10 +1950,6 @@ class ThemeAssets implements IThemeAssets { @override late final String? background; - @override - @ignore - String? get walletSummaryCardBackground => null; - ThemeAssets(); factory ThemeAssets.fromJson({ @@ -2104,8 +2111,6 @@ class ThemeAssetsV2 implements IThemeAssets { late final String? loadingGif; @override late final String? background; - @override - late final String? walletSummaryCardBackground; late final String coinPlaceholder; @@ -2200,10 +2205,6 @@ class ThemeAssetsV2 implements IThemeAssets { : null ..background = json["background"] is String ? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}" - : null - ..walletSummaryCardBackground = json["walletSummaryCardBackground"] - is String - ? "$applicationThemesDirectoryPath/$themeId/assets/${json["walletSummaryCardBackground"] as String}" : null; } @@ -2254,11 +2255,235 @@ class ThemeAssetsV2 implements IThemeAssets { 'txExchangeFailed: $txExchangeFailed, ' 'loadingGif: $loadingGif, ' 'background: $background, ' - 'walletSummaryCardBackground: $walletSummaryCardBackground, ' 'coinPlaceholder: $coinPlaceholder, ' 'coinIcons: $coinIcons, ' 'coinImages: $coinImages, ' - 'coinSecondaryImages: $coinSecondaryImages' + 'coinSecondaryImages: $coinSecondaryImages, ' + ')'; + } +} + +@Embedded(inheritance: false) +class ThemeAssetsV3 implements IThemeAssets { + @override + late final String bellNew; + @override + late final String buy; + @override + late final String exchange; + @override + late final String personaIncognito; + @override + late final String personaEasy; + @override + late final String stack; + @override + late final String stackIcon; + @override + late final String receive; + @override + late final String receivePending; + @override + late final String receiveCancelled; + @override + late final String send; + @override + late final String sendPending; + @override + late final String sendCancelled; + @override + late final String themeSelector; + @override + late final String themePreview; + @override + late final String txExchange; + @override + late final String txExchangePending; + @override + late final String txExchangeFailed; + @override + late final String? loadingGif; + @override + late final String? background; + + late final String coinPlaceholder; + + // Added some future proof params in case we want to add anything else + // This should provide some buffer in stead of creating assetsV4 etc + @Name("otherStringParam1") + late final String? dummy1; + @Name("otherStringParam2") + late final String? dummy2; + @Name("otherStringParam3") + late final String? dummy3; + + @ignore + Map get coinIcons => _coinIcons ??= parseCoinAssetsString( + coinIconsString, + placeHolder: coinPlaceholder, + ); + @ignore + Map? _coinIcons; + late final String coinIconsString; + + @ignore + Map get coinImages => _coinImages ??= parseCoinAssetsString( + coinImagesString, + placeHolder: coinPlaceholder, + ); + @ignore + Map? _coinImages; + late final String coinImagesString; + + @ignore + Map get coinSecondaryImages => + _coinSecondaryImages ??= parseCoinAssetsString( + coinSecondaryImagesString, + placeHolder: coinPlaceholder, + ); + @ignore + Map? _coinSecondaryImages; + late final String coinSecondaryImagesString; + + @ignore + Map? get coinCardImages => + _coinCardImages ??= coinCardImagesString == null + ? null + : parseCoinAssetsString( + coinCardImagesString!, + placeHolder: coinPlaceholder, + ); + @ignore + Map? _coinCardImages; + late final String? coinCardImagesString; + + ThemeAssetsV3(); + + factory ThemeAssetsV3.fromJson({ + required Map json, + required String applicationThemesDirectoryPath, + required String themeId, + }) { + return ThemeAssetsV3() + ..bellNew = + "$applicationThemesDirectoryPath/$themeId/assets/${json["bell_new"] as String}" + ..buy = + "$applicationThemesDirectoryPath/$themeId/assets/${json["buy"] as String}" + ..exchange = + "$applicationThemesDirectoryPath/$themeId/assets/${json["exchange"] as String}" + ..personaIncognito = + "$applicationThemesDirectoryPath/$themeId/assets/${json["persona_incognito"] as String}" + ..personaEasy = + "$applicationThemesDirectoryPath/$themeId/assets/${json["persona_easy"] as String}" + ..stack = + "$applicationThemesDirectoryPath/$themeId/assets/${json["stack"] as String}" + ..stackIcon = + "$applicationThemesDirectoryPath/$themeId/assets/${json["stack_icon"] as String}" + ..receive = + "$applicationThemesDirectoryPath/$themeId/assets/${json["receive"] as String}" + ..receivePending = + "$applicationThemesDirectoryPath/$themeId/assets/${json["receive_pending"] as String}" + ..receiveCancelled = + "$applicationThemesDirectoryPath/$themeId/assets/${json["receive_cancelled"] as String}" + ..send = + "$applicationThemesDirectoryPath/$themeId/assets/${json["send"] as String}" + ..sendPending = + "$applicationThemesDirectoryPath/$themeId/assets/${json["send_pending"] as String}" + ..sendCancelled = + "$applicationThemesDirectoryPath/$themeId/assets/${json["send_cancelled"] as String}" + ..themeSelector = + "$applicationThemesDirectoryPath/$themeId/assets/${json["theme_selector"] as String}" + ..themePreview = + "$applicationThemesDirectoryPath/$themeId/assets/${json["theme_preview"] as String}" + ..txExchange = + "$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange"] as String}" + ..txExchangePending = + "$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_pending"] as String}" + ..txExchangeFailed = + "$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_failed"] as String}" + ..coinPlaceholder = + "$applicationThemesDirectoryPath/$themeId/assets/${json["coin_placeholder"] as String}" + ..coinIconsString = createCoinAssetsString( + "$applicationThemesDirectoryPath/$themeId/assets", + Map.from(json["coins"]["icons"] as Map), + ) + ..coinImagesString = createCoinAssetsString( + "$applicationThemesDirectoryPath/$themeId/assets", + Map.from(json["coins"]["images"] as Map), + ) + ..coinSecondaryImagesString = createCoinAssetsString( + "$applicationThemesDirectoryPath/$themeId/assets", + Map.from(json["coins"]["secondaries"] as Map), + ) + ..coinCardImagesString = json["coins"]["cards"] is Map + ? createCoinAssetsString( + "$applicationThemesDirectoryPath/$themeId/assets", + Map.from(json["coins"]["cards"] as Map), + ) + : null + ..loadingGif = json["loading_gif"] is String + ? "$applicationThemesDirectoryPath/$themeId/assets/${json["loading_gif"] as String}" + : null + ..background = json["background"] is String + ? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}" + : null + ..dummy1 = null + ..dummy2 = null + ..dummy3 = null; + } + + static String createCoinAssetsString(String path, Map json) { + final Map map = {}; + for (final entry in json.entries) { + map[entry.key] = "$path/${entry.value as String}"; + } + return jsonEncode(map); + } + + static Map parseCoinAssetsString( + String jsonString, { + required String placeHolder, + }) { + final json = jsonDecode(jsonString) as Map; + final map = Map.from(json); + + final Map result = {}; + + for (final coin in Coin.values) { + result[coin] = map[coin.name] as String? ?? placeHolder; + } + + return result; + } + + @override + String toString() { + return 'ThemeAssetsV3(' + 'bellNew: $bellNew, ' + 'buy: $buy, ' + 'exchange: $exchange, ' + 'personaIncognito: $personaIncognito, ' + 'personaEasy: $personaEasy, ' + 'stack: $stack, ' + 'stackIcon: $stackIcon, ' + 'receive: $receive, ' + 'receivePending: $receivePending, ' + 'receiveCancelled: $receiveCancelled, ' + 'send: $send, ' + 'sendPending: $sendPending, ' + 'sendCancelled: $sendCancelled, ' + 'themeSelector: $themeSelector, ' + 'themePreview: $themePreview, ' + 'txExchange: $txExchange, ' + 'txExchangePending: $txExchangePending, ' + 'txExchangeFailed: $txExchangeFailed, ' + 'loadingGif: $loadingGif, ' + 'background: $background, ' + 'coinPlaceholder: $coinPlaceholder, ' + 'coinIcons: $coinIcons, ' + 'coinImages: $coinImages, ' + 'coinSecondaryImages: $coinSecondaryImages, ' + 'coinCardImages: $coinCardImages' ')'; } } @@ -2285,5 +2510,4 @@ abstract class IThemeAssets { String? get loadingGif; String? get background; - String? get walletSummaryCardBackground; } diff --git a/lib/models/isar/stack_theme.g.dart b/lib/models/isar/stack_theme.g.dart index 13c01d906..e1bb0a549 100644 --- a/lib/models/isar/stack_theme.g.dart +++ b/lib/models/isar/stack_theme.g.dart @@ -823,6 +823,12 @@ const StackThemeSchema = CollectionSchema( id: 160, name: r'warningForegroundInt', type: IsarType.long, + ), + r'zAssetsV3': PropertySchema( + id: 161, + name: r'zAssetsV3', + type: IsarType.object, + target: r'ThemeAssetsV3', ) }, estimateSize: _stackThemeEstimateSize, @@ -848,7 +854,8 @@ const StackThemeSchema = CollectionSchema( links: {}, embeddedSchemas: { r'ThemeAssets': ThemeAssetsSchema, - r'ThemeAssetsV2': ThemeAssetsV2Schema + r'ThemeAssetsV2': ThemeAssetsV2Schema, + r'ThemeAssetsV3': ThemeAssetsV3Schema }, getId: _stackThemeGetId, getLinks: _stackThemeGetLinks, @@ -895,6 +902,14 @@ int _stackThemeEstimateSize( bytesCount += 3 + object.name.length * 3; bytesCount += 3 + object.standardBoxShadowString.length * 3; bytesCount += 3 + object.themeId.length * 3; + { + final value = object.assetsV3; + if (value != null) { + bytesCount += 3 + + ThemeAssetsV3Schema.estimateSize( + value, allOffsets[ThemeAssetsV3]!, allOffsets); + } + } return bytesCount; } @@ -1075,6 +1090,12 @@ void _stackThemeSerialize( writer.writeLong(offsets[158], object.version); writer.writeLong(offsets[159], object.warningBackgroundInt); writer.writeLong(offsets[160], object.warningForegroundInt); + writer.writeObject( + offsets[161], + allOffsets, + ThemeAssetsV3Schema.serialize, + object.assetsV3, + ); } StackTheme _stackThemeDeserialize( @@ -1255,6 +1276,11 @@ StackTheme _stackThemeDeserialize( object.version = reader.readLongOrNull(offsets[158]); object.warningBackgroundInt = reader.readLong(offsets[159]); object.warningForegroundInt = reader.readLong(offsets[160]); + object.assetsV3 = reader.readObjectOrNull( + offsets[161], + ThemeAssetsV3Schema.deserialize, + allOffsets, + ); return object; } @@ -1595,6 +1621,12 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 160: return (reader.readLong(offset)) as P; + case 161: + return (reader.readObjectOrNull( + offset, + ThemeAssetsV3Schema.deserialize, + allOffsets, + )) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -11382,6 +11414,23 @@ extension StackThemeQueryFilter )); }); } + + QueryBuilder assetsV3IsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'zAssetsV3', + )); + }); + } + + QueryBuilder + assetsV3IsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'zAssetsV3', + )); + }); + } } extension StackThemeQueryObject @@ -11399,6 +11448,13 @@ extension StackThemeQueryObject return query.object(q, r'assetsV2'); }); } + + QueryBuilder assetsV3( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'zAssetsV3'); + }); + } } extension StackThemeQueryLinks @@ -17942,6 +17998,13 @@ extension StackThemeQueryProperty return query.addPropertyName(r'warningForegroundInt'); }); } + + QueryBuilder + assetsV3Property() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'zAssetsV3'); + }); + } } // ************************************************************************** @@ -25895,11 +25958,6 @@ const ThemeAssetsV2Schema = Schema( id: 23, name: r'txExchangePending', type: IsarType.string, - ), - r'walletSummaryCardBackground': PropertySchema( - id: 24, - name: r'walletSummaryCardBackground', - type: IsarType.string, ) }, estimateSize: _themeAssetsV2EstimateSize, @@ -25948,12 +26006,6 @@ int _themeAssetsV2EstimateSize( bytesCount += 3 + object.txExchange.length * 3; bytesCount += 3 + object.txExchangeFailed.length * 3; bytesCount += 3 + object.txExchangePending.length * 3; - { - final value = object.walletSummaryCardBackground; - if (value != null) { - bytesCount += 3 + value.length * 3; - } - } return bytesCount; } @@ -25987,7 +26039,6 @@ void _themeAssetsV2Serialize( writer.writeString(offsets[21], object.txExchange); writer.writeString(offsets[22], object.txExchangeFailed); writer.writeString(offsets[23], object.txExchangePending); - writer.writeString(offsets[24], object.walletSummaryCardBackground); } ThemeAssetsV2 _themeAssetsV2Deserialize( @@ -26021,7 +26072,6 @@ ThemeAssetsV2 _themeAssetsV2Deserialize( object.txExchange = reader.readString(offsets[21]); object.txExchangeFailed = reader.readString(offsets[22]); object.txExchangePending = reader.readString(offsets[23]); - object.walletSummaryCardBackground = reader.readStringOrNull(offsets[24]); return object; } @@ -26080,8 +26130,6 @@ P _themeAssetsV2DeserializeProp

( return (reader.readString(offset)) as P; case 23: return (reader.readString(offset)) as P; - case 24: - return (reader.readStringOrNull(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -29387,41 +29435,410 @@ extension ThemeAssetsV2QueryFilter )); }); } +} - QueryBuilder - walletSummaryCardBackgroundIsNull() { +extension ThemeAssetsV2QueryObject + on QueryBuilder {} + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters + +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', + type: IsarType.string, + ), + r'coinCardImagesString': PropertySchema( + id: 3, + name: r'coinCardImagesString', + type: IsarType.string, + ), + r'coinIconsString': PropertySchema( + id: 4, + name: r'coinIconsString', + type: IsarType.string, + ), + r'coinImagesString': PropertySchema( + id: 5, + name: r'coinImagesString', + type: IsarType.string, + ), + r'coinPlaceholder': PropertySchema( + id: 6, + name: r'coinPlaceholder', + type: IsarType.string, + ), + r'coinSecondaryImagesString': PropertySchema( + id: 7, + name: r'coinSecondaryImagesString', + type: IsarType.string, + ), + r'exchange': PropertySchema( + id: 8, + name: r'exchange', + type: IsarType.string, + ), + r'loadingGif': PropertySchema( + id: 9, + name: r'loadingGif', + type: IsarType.string, + ), + r'otherStringParam1': PropertySchema( + id: 10, + name: r'otherStringParam1', + type: IsarType.string, + ), + r'otherStringParam2': PropertySchema( + id: 11, + name: r'otherStringParam2', + type: IsarType.string, + ), + r'otherStringParam3': PropertySchema( + id: 12, + name: r'otherStringParam3', + type: IsarType.string, + ), + r'personaEasy': PropertySchema( + id: 13, + name: r'personaEasy', + type: IsarType.string, + ), + r'personaIncognito': PropertySchema( + id: 14, + name: r'personaIncognito', + type: IsarType.string, + ), + r'receive': PropertySchema( + id: 15, + name: r'receive', + type: IsarType.string, + ), + r'receiveCancelled': PropertySchema( + id: 16, + name: r'receiveCancelled', + type: IsarType.string, + ), + r'receivePending': PropertySchema( + id: 17, + name: r'receivePending', + type: IsarType.string, + ), + r'send': PropertySchema( + id: 18, + name: r'send', + type: IsarType.string, + ), + r'sendCancelled': PropertySchema( + id: 19, + name: r'sendCancelled', + type: IsarType.string, + ), + r'sendPending': PropertySchema( + id: 20, + name: r'sendPending', + type: IsarType.string, + ), + r'stack': PropertySchema( + id: 21, + name: r'stack', + type: IsarType.string, + ), + r'stackIcon': PropertySchema( + id: 22, + name: r'stackIcon', + type: IsarType.string, + ), + r'themePreview': PropertySchema( + id: 23, + name: r'themePreview', + type: IsarType.string, + ), + r'themeSelector': PropertySchema( + id: 24, + name: r'themeSelector', + type: IsarType.string, + ), + r'txExchange': PropertySchema( + id: 25, + name: r'txExchange', + type: IsarType.string, + ), + r'txExchangeFailed': PropertySchema( + id: 26, + name: r'txExchangeFailed', + type: IsarType.string, + ), + r'txExchangePending': PropertySchema( + id: 27, + name: r'txExchangePending', + type: IsarType.string, + ) + }, + estimateSize: _themeAssetsV3EstimateSize, + serialize: _themeAssetsV3Serialize, + deserialize: _themeAssetsV3Deserialize, + deserializeProp: _themeAssetsV3DeserializeProp, +); + +int _themeAssetsV3EstimateSize( + ThemeAssetsV3 object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + { + final value = object.background; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + bytesCount += 3 + object.bellNew.length * 3; + bytesCount += 3 + object.buy.length * 3; + { + final value = object.coinCardImagesString; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + bytesCount += 3 + object.coinIconsString.length * 3; + bytesCount += 3 + object.coinImagesString.length * 3; + bytesCount += 3 + object.coinPlaceholder.length * 3; + bytesCount += 3 + object.coinSecondaryImagesString.length * 3; + bytesCount += 3 + object.exchange.length * 3; + { + final value = object.loadingGif; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.dummy1; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.dummy2; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.dummy3; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + bytesCount += 3 + object.personaEasy.length * 3; + bytesCount += 3 + object.personaIncognito.length * 3; + bytesCount += 3 + object.receive.length * 3; + bytesCount += 3 + object.receiveCancelled.length * 3; + bytesCount += 3 + object.receivePending.length * 3; + bytesCount += 3 + object.send.length * 3; + bytesCount += 3 + object.sendCancelled.length * 3; + bytesCount += 3 + object.sendPending.length * 3; + bytesCount += 3 + object.stack.length * 3; + bytesCount += 3 + object.stackIcon.length * 3; + bytesCount += 3 + object.themePreview.length * 3; + bytesCount += 3 + object.themeSelector.length * 3; + bytesCount += 3 + object.txExchange.length * 3; + bytesCount += 3 + object.txExchangeFailed.length * 3; + bytesCount += 3 + object.txExchangePending.length * 3; + return bytesCount; +} + +void _themeAssetsV3Serialize( + ThemeAssetsV3 object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeString(offsets[0], object.background); + writer.writeString(offsets[1], object.bellNew); + writer.writeString(offsets[2], object.buy); + writer.writeString(offsets[3], object.coinCardImagesString); + writer.writeString(offsets[4], object.coinIconsString); + writer.writeString(offsets[5], object.coinImagesString); + writer.writeString(offsets[6], object.coinPlaceholder); + writer.writeString(offsets[7], object.coinSecondaryImagesString); + writer.writeString(offsets[8], object.exchange); + writer.writeString(offsets[9], object.loadingGif); + writer.writeString(offsets[10], object.dummy1); + writer.writeString(offsets[11], object.dummy2); + writer.writeString(offsets[12], object.dummy3); + writer.writeString(offsets[13], object.personaEasy); + writer.writeString(offsets[14], object.personaIncognito); + writer.writeString(offsets[15], object.receive); + writer.writeString(offsets[16], object.receiveCancelled); + writer.writeString(offsets[17], object.receivePending); + writer.writeString(offsets[18], object.send); + writer.writeString(offsets[19], object.sendCancelled); + writer.writeString(offsets[20], object.sendPending); + writer.writeString(offsets[21], object.stack); + writer.writeString(offsets[22], object.stackIcon); + writer.writeString(offsets[23], object.themePreview); + writer.writeString(offsets[24], object.themeSelector); + writer.writeString(offsets[25], object.txExchange); + writer.writeString(offsets[26], object.txExchangeFailed); + writer.writeString(offsets[27], object.txExchangePending); +} + +ThemeAssetsV3 _themeAssetsV3Deserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = ThemeAssetsV3(); + object.background = reader.readStringOrNull(offsets[0]); + object.bellNew = reader.readString(offsets[1]); + object.buy = reader.readString(offsets[2]); + object.coinCardImagesString = reader.readStringOrNull(offsets[3]); + object.coinIconsString = reader.readString(offsets[4]); + object.coinImagesString = reader.readString(offsets[5]); + object.coinPlaceholder = reader.readString(offsets[6]); + object.coinSecondaryImagesString = reader.readString(offsets[7]); + object.exchange = reader.readString(offsets[8]); + object.loadingGif = reader.readStringOrNull(offsets[9]); + object.dummy1 = reader.readStringOrNull(offsets[10]); + object.dummy2 = reader.readStringOrNull(offsets[11]); + object.dummy3 = reader.readStringOrNull(offsets[12]); + object.personaEasy = reader.readString(offsets[13]); + object.personaIncognito = reader.readString(offsets[14]); + object.receive = reader.readString(offsets[15]); + object.receiveCancelled = reader.readString(offsets[16]); + object.receivePending = reader.readString(offsets[17]); + object.send = reader.readString(offsets[18]); + object.sendCancelled = reader.readString(offsets[19]); + object.sendPending = reader.readString(offsets[20]); + object.stack = reader.readString(offsets[21]); + object.stackIcon = reader.readString(offsets[22]); + object.themePreview = reader.readString(offsets[23]); + object.themeSelector = reader.readString(offsets[24]); + object.txExchange = reader.readString(offsets[25]); + object.txExchangeFailed = reader.readString(offsets[26]); + object.txExchangePending = reader.readString(offsets[27]); + return object; +} + +P _themeAssetsV3DeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readStringOrNull(offset)) as P; + case 1: + return (reader.readString(offset)) as P; + case 2: + return (reader.readString(offset)) as P; + case 3: + return (reader.readStringOrNull(offset)) as P; + case 4: + return (reader.readString(offset)) as P; + case 5: + return (reader.readString(offset)) as P; + case 6: + return (reader.readString(offset)) as P; + case 7: + return (reader.readString(offset)) as P; + case 8: + return (reader.readString(offset)) as P; + case 9: + return (reader.readStringOrNull(offset)) as P; + case 10: + return (reader.readStringOrNull(offset)) as P; + case 11: + return (reader.readStringOrNull(offset)) as P; + case 12: + return (reader.readStringOrNull(offset)) as P; + case 13: + return (reader.readString(offset)) as P; + case 14: + return (reader.readString(offset)) as P; + case 15: + return (reader.readString(offset)) as P; + case 16: + return (reader.readString(offset)) as P; + case 17: + return (reader.readString(offset)) as P; + case 18: + return (reader.readString(offset)) as P; + case 19: + return (reader.readString(offset)) as P; + case 20: + return (reader.readString(offset)) as P; + case 21: + return (reader.readString(offset)) as P; + case 22: + return (reader.readString(offset)) as P; + case 23: + return (reader.readString(offset)) as P; + case 24: + return (reader.readString(offset)) as P; + case 25: + return (reader.readString(offset)) as P; + case 26: + return (reader.readString(offset)) as P; + case 27: + return (reader.readString(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +extension ThemeAssetsV3QueryFilter + on QueryBuilder { + QueryBuilder + backgroundIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( - property: r'walletSummaryCardBackground', + property: r'background', )); }); } - QueryBuilder - walletSummaryCardBackgroundIsNotNull() { + QueryBuilder + backgroundIsNotNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNotNull( - property: r'walletSummaryCardBackground', + property: r'background', )); }); } - QueryBuilder - walletSummaryCardBackgroundEqualTo( + QueryBuilder + backgroundEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundGreaterThan( + QueryBuilder + backgroundGreaterThan( String? value, { bool include = false, bool caseSensitive = true, @@ -29429,15 +29846,15 @@ extension ThemeAssetsV2QueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( include: include, - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundLessThan( + QueryBuilder + backgroundLessThan( String? value, { bool include = false, bool caseSensitive = true, @@ -29445,15 +29862,15 @@ extension ThemeAssetsV2QueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.lessThan( include: include, - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundBetween( + QueryBuilder + backgroundBetween( String? lower, String? upper, { bool includeLower = true, @@ -29462,7 +29879,7 @@ extension ThemeAssetsV2QueryFilter }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.between( - property: r'walletSummaryCardBackground', + property: r'background', lower: lower, includeLower: includeLower, upper: upper, @@ -29472,78 +29889,3837 @@ extension ThemeAssetsV2QueryFilter }); } - QueryBuilder - walletSummaryCardBackgroundStartsWith( + QueryBuilder + backgroundStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.startsWith( - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundEndsWith( + QueryBuilder + backgroundEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.endsWith( - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundContains(String value, - {bool caseSensitive = true}) { + QueryBuilder + backgroundContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.contains( - property: r'walletSummaryCardBackground', + property: r'background', value: value, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundMatches(String pattern, - {bool caseSensitive = true}) { + QueryBuilder + backgroundMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.matches( - property: r'walletSummaryCardBackground', + property: r'background', wildcard: pattern, caseSensitive: caseSensitive, )); }); } - QueryBuilder - walletSummaryCardBackgroundIsEmpty() { + QueryBuilder + backgroundIsEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( - property: r'walletSummaryCardBackground', + property: r'background', value: '', )); }); } - QueryBuilder - walletSummaryCardBackgroundIsNotEmpty() { + QueryBuilder + backgroundIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( - property: r'walletSummaryCardBackground', + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + bellNewBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'bellNew', + value: '', + )); + }); + } + + QueryBuilder + bellNewIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'bellNew', + value: '', + )); + }); + } + + QueryBuilder buyEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder buyLessThan( + 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, + )); + }); + } + + QueryBuilder buyBetween( + 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'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, + )); + }); + } + + QueryBuilder buyEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder buyContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'buy', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder buyMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + 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: '', + )); + }); + } + + QueryBuilder + buyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'buy', + value: '', + )); + }); + } + + QueryBuilder + coinCardImagesStringIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'coinCardImagesString', + )); + }); + } + + QueryBuilder + coinCardImagesStringIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'coinCardImagesString', + )); + }); + } + + QueryBuilder + coinCardImagesStringEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + coinCardImagesStringBetween( + 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'coinCardImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinCardImagesStringStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinCardImagesStringEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinCardImagesStringContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'coinCardImagesString', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinCardImagesStringMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'coinCardImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinCardImagesStringIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinCardImagesString', + value: '', + )); + }); + } + + QueryBuilder + coinCardImagesStringIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'coinCardImagesString', + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + coinIconsStringBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinIconsString', + value: '', + )); + }); + } + + QueryBuilder + coinIconsStringIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + coinImagesStringBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinImagesString', + value: '', + )); + }); + } + + QueryBuilder + coinImagesStringIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + coinPlaceholderBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinPlaceholder', + value: '', + )); + }); + } + + QueryBuilder + coinPlaceholderIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + coinSecondaryImagesStringBetween( + 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'coinSecondaryImagesString', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinSecondaryImagesStringStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'coinSecondaryImagesString', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + coinSecondaryImagesStringIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'coinSecondaryImagesString', + value: '', + )); + }); + } + + QueryBuilder + coinSecondaryImagesStringIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + exchangeBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'exchange', + value: '', + )); + }); + } + + QueryBuilder + exchangeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'exchange', + value: '', + )); + }); + } + + QueryBuilder + loadingGifIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'loadingGif', + )); + }); + } + + QueryBuilder + loadingGifIsNotNull() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + loadingGifBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'loadingGif', + value: '', + )); + }); + } + + QueryBuilder + loadingGifIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'loadingGif', + value: '', + )); + }); + } + + QueryBuilder + dummy1IsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'otherStringParam1', + )); + }); + } + + QueryBuilder + dummy1IsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'otherStringParam1', + )); + }); + } + + QueryBuilder + dummy1EqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1GreaterThan( + 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, + )); + }); + } + + QueryBuilder + dummy1LessThan( + 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, + )); + }); + } + + QueryBuilder + dummy1Between( + 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'otherStringParam1', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1StartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1EndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1Contains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'otherStringParam1', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1Matches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'otherStringParam1', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy1IsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam1', + value: '', + )); + }); + } + + QueryBuilder + dummy1IsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'otherStringParam1', + value: '', + )); + }); + } + + QueryBuilder + dummy2IsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'otherStringParam2', + )); + }); + } + + QueryBuilder + dummy2IsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'otherStringParam2', + )); + }); + } + + QueryBuilder + dummy2EqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + dummy2Between( + 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'otherStringParam2', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy2StartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy2EndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy2Contains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'otherStringParam2', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy2Matches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'otherStringParam2', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy2IsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam2', + value: '', + )); + }); + } + + QueryBuilder + dummy2IsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'otherStringParam2', + value: '', + )); + }); + } + + QueryBuilder + dummy3IsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'otherStringParam3', + )); + }); + } + + QueryBuilder + dummy3IsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'otherStringParam3', + )); + }); + } + + QueryBuilder + dummy3EqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + dummy3Between( + 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'otherStringParam3', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy3StartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy3EndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy3Contains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'otherStringParam3', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy3Matches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'otherStringParam3', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + dummy3IsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'otherStringParam3', + value: '', + )); + }); + } + + QueryBuilder + dummy3IsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'otherStringParam3', + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + personaEasyBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'personaEasy', + value: '', + )); + }); + } + + QueryBuilder + personaEasyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + personaIncognitoBetween( + 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'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 + 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.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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'receive', + value: '', + )); + }); + } + + QueryBuilder + receiveIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + receiveCancelledBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'receiveCancelled', + value: '', + )); + }); + } + + QueryBuilder + receiveCancelledIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + receivePendingBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'receivePending', + value: '', + )); + }); + } + + QueryBuilder + receivePendingIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'receivePending', + value: '', + )); + }); + } + + QueryBuilder sendEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'send', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder sendBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder sendMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + 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: '', + )); + }); + } + + QueryBuilder + sendIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + sendCancelledBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sendCancelled', + value: '', + )); + }); + } + + QueryBuilder + sendCancelledIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + sendPendingBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sendPending', + value: '', + )); + }); + } + + QueryBuilder + sendPendingIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + stackBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'stack', + value: '', + )); + }); + } + + QueryBuilder + stackIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + stackIconBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'stackIcon', + value: '', + )); + }); + } + + QueryBuilder + stackIconIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + themePreviewBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'themePreview', + value: '', + )); + }); + } + + QueryBuilder + themePreviewIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + themeSelectorBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'themeSelector', + value: '', + )); + }); + } + + QueryBuilder + themeSelectorIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + txExchangeBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'txExchange', + value: '', + )); + }); + } + + QueryBuilder + txExchangeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + txExchangeFailedBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'txExchangeFailed', + value: '', + )); + }); + } + + QueryBuilder + txExchangeFailedIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + txExchangePendingBetween( + 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'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, + )); + }); + } + + QueryBuilder + 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, + )); + }); + } + + QueryBuilder + 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() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'txExchangePending', + value: '', + )); + }); + } + + QueryBuilder + txExchangePendingIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'txExchangePending', value: '', )); }); } } -extension ThemeAssetsV2QueryObject - on QueryBuilder {} +extension ThemeAssetsV3QueryObject + on QueryBuilder {} diff --git a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart index 61254720b..e373e817b 100644 --- a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart +++ b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart @@ -73,12 +73,6 @@ class _NewWalletRecoveryPhraseWarningViewState Widget build(BuildContext context) { debugPrint("BUILD: $runtimeType"); - final _numberOfPhraseWords = coin == Coin.monero - ? Constants.seedPhraseWordCountMonero - : coin == Coin.wownero - ? 14 - : Constants.seedPhraseWordCountBip39; - return MasterScaffold( isDesktop: isDesktop, appBar: isDesktop @@ -177,7 +171,15 @@ class _NewWalletRecoveryPhraseWarningViewState width: isDesktop ? 480 : null, child: isDesktop ? Text( - "On the next screen you will see $_numberOfPhraseWords words that make up your recovery phrase.\n\nPlease write it down. Keep it safe and never share it with anyone. Your recovery phrase is the only way you can access your funds if you forget your PIN, lose your phone, etc.\n\nStack Wallet does not keep nor is able to restore your recover phrase. Only you have access to your wallet.", + "On the next screen you will see " + "${Constants.defaultSeedPhraseLengthFor(coin: coin)} " + "words that make up your recovery phrase.\n\nPlease " + "write it down. Keep it safe and never share it with " + "anyone. Your recovery phrase is the only way you can" + " access your funds if you forget your PIN, lose your" + " phone, etc.\n\nStack Wallet does not keep nor is " + "able to restore your recover phrase. Only you have " + "access to your wallet.", style: isDesktop ? STextStyles.desktopTextMediumRegular(context) : STextStyles.subtitle(context).copyWith( @@ -214,7 +216,9 @@ class _NewWalletRecoveryPhraseWarningViewState ), ), TextSpan( - text: "$_numberOfPhraseWords words", + text: + "${Constants.defaultSeedPhraseLengthFor(coin: coin)}" + " words", style: STextStyles.desktopH3(context).copyWith( color: Theme.of(context) .extension()! diff --git a/lib/pages/exchange_view/confirm_change_now_send.dart b/lib/pages/exchange_view/confirm_change_now_send.dart index 428d60b98..acb68288c 100644 --- a/lib/pages/exchange_view/confirm_change_now_send.dart +++ b/lib/pages/exchange_view/confirm_change_now_send.dart @@ -26,6 +26,7 @@ import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/amount/amount_formatter.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/widgets/background.dart'; @@ -156,7 +157,12 @@ class _ConfirmChangeNowSendViewState Navigator.of(context).popUntil(ModalRoute.withName(routeOnSuccessName)); } - } catch (e) { + } catch (e, s) { + Logging.instance.log( + "Broadcast transaction failed: $e\n$s", + level: LogLevel.Error, + ); + // pop sending dialog Navigator.of(context).pop(); @@ -205,9 +211,9 @@ class _ConfirmChangeNowSendViewState child: Column( mainAxisSize: MainAxisSize.min, children: [ - Row( + const Row( mainAxisAlignment: MainAxisAlignment.end, - children: const [ + children: [ DesktopDialogCloseButton(), ], ), diff --git a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart index 96921c20d..25967801a 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart @@ -290,6 +290,7 @@ class _Step4ViewState extends ConsumerState { walletId: tuple.item1, routeOnSuccessName: HomeView.routeName, trade: model.trade!, + shouldSendPublicFiroFunds: firoPublicSend, ), settings: const RouteSettings( name: ConfirmChangeNowSendView.routeName, diff --git a/lib/pages/receive_view/receive_view.dart b/lib/pages/receive_view/receive_view.dart index 13a20d2a1..063f2b2cd 100644 --- a/lib/pages/receive_view/receive_view.dart +++ b/lib/pages/receive_view/receive_view.dart @@ -303,11 +303,17 @@ class _ReceiveViewState extends ConsumerState { ), ), ), - if (coin != Coin.epicCash && coin != Coin.ethereum) + if (coin != Coin.epicCash && + coin != Coin.ethereum && + coin != Coin.banano && + coin != Coin.nano) const SizedBox( height: 12, ), - if (coin != Coin.epicCash && coin != Coin.ethereum) + if (coin != Coin.epicCash && + coin != Coin.ethereum && + coin != Coin.banano && + coin != Coin.nano) TextButton( onPressed: generateNewAddress, style: Theme.of(context) diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index e8fd8d245..62ab5cbb6 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -436,36 +436,38 @@ class _ConfirmTransactionViewState ], ), ), - const SizedBox( - height: 12, - ), - RoundedWhiteContainer( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Transaction fee", - style: STextStyles.smallMed12(context), - ), - Text( - ref.watch(pAmountFormatter(coin)).format( - (transactionInfo["fee"] is Amount - ? transactionInfo["fee"] as Amount - : (transactionInfo["fee"] as int) - .toAmountAsRaw( - fractionDigits: ref.watch( - managerProvider.select( - (value) => value.coin.decimals, - ), - ), - )), - ), - style: STextStyles.itemSubtitle12(context), - textAlign: TextAlign.right, - ), - ], + if (coin != Coin.banano && coin != Coin.nano) + const SizedBox( + height: 12, + ), + if (coin != Coin.banano && coin != Coin.nano) + RoundedWhiteContainer( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Transaction fee", + style: STextStyles.smallMed12(context), + ), + Text( + ref.watch(pAmountFormatter(coin)).format( + (transactionInfo["fee"] is Amount + ? transactionInfo["fee"] as Amount + : (transactionInfo["fee"] as int) + .toAmountAsRaw( + fractionDigits: ref.watch( + managerProvider.select( + (value) => value.coin.decimals, + ), + ), + )), + ), + style: STextStyles.itemSubtitle12(context), + textAlign: TextAlign.right, + ), + ], + ), ), - ), const SizedBox( height: 12, ), diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index 9309600d6..5ce6ccbb0 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'dart:io'; +import 'dart:math'; import 'package:bip47/bip47.dart'; import 'package:cw_core/monero_transaction_priority.dart'; @@ -26,7 +27,6 @@ import 'package:stackwallet/pages/coin_control/coin_control_view.dart'; import 'package:stackwallet/pages/send_view/confirm_transaction_view.dart'; import 'package:stackwallet/pages/send_view/sub_widgets/building_transaction_dialog.dart'; import 'package:stackwallet/pages/send_view/sub_widgets/firo_balance_selection_sheet.dart'; -import 'package:stackwallet/pages/send_view/sub_widgets/openalias_sheet.dart'; import 'package:stackwallet/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/ui/fee_rate_type_state_provider.dart'; @@ -138,7 +138,8 @@ class _SendViewState extends ConsumerState { cryptoAmount = cryptoAmount.split(" ").first; } - final shift = ref.read(pAmountUnit(coin)).shift; + // ensure we don't shift past minimum atomic value + final shift = min(ref.read(pAmountUnit(coin)).shift, coin.decimals); _amountToSend = cryptoAmount.contains(",") ? Decimal.parse(cryptoAmount.replaceFirst(",", ".")) 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 98a381316..5daa1e81a 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -12,11 +12,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -115,12 +115,9 @@ class AboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = - "Unable to fetch version"; //FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = - "Unable to fetch version"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = - "Unable to fetch version"; // MONERO_VERSIONS.getPluginVersion(); + String firoCommit = FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), @@ -174,14 +171,14 @@ class AboutView extends ConsumerWidget { String appName = ""; String build = ""; - // if (snapshot.connectionState == - // ConnectionState.done && - // snapshot.hasData) { - // version = snapshot.data!.version; - // build = snapshot.data!.buildNumber; - // signature = snapshot.data!.buildSignature; - // appName = snapshot.data!.appName; - // } + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + version = snapshot.data!.version; + build = snapshot.data!.buildNumber; + signature = snapshot.data!.buildSignature; + appName = snapshot.data!.appName; + } return Column( crossAxisAlignment: CrossAxisAlignment.stretch, diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index 488b018d7..622a4cafe 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -17,11 +17,11 @@ import 'package:event_bus/event_bus.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/models/isar/models/log.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; @@ -302,11 +302,11 @@ class _DebugViewState extends ConsumerState { packageInfo.buildSignature; final appName = packageInfo.appName; String firoCommit = - "Unable to fetch version"; //FIRO_VERSIONS.getPluginVersion(); + FIRO_VERSIONS.getPluginVersion(); String epicCashCommit = - "Unable to fetch version"; //EPIC_VERSIONS.getPluginVersion(); + EPIC_VERSIONS.getPluginVersion(); String moneroCommit = - "Unable to fetch version"; // MONERO_VERSIONS.getPluginVersion(); + MONERO_VERSIONS.getPluginVersion(); DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final deviceInfo = diff --git a/lib/pages/wallet_view/sub_widgets/wallet_summary.dart b/lib/pages/wallet_view/sub_widgets/wallet_summary.dart index 129368344..a82145817 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_summary.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_summary.dart @@ -9,20 +9,14 @@ */ import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_summary_info.dart'; -import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; -import 'package:stackwallet/utilities/assets.dart'; -import 'package:stackwallet/utilities/constants.dart'; +import 'package:stackwallet/widgets/coin_card.dart'; class WalletSummary extends StatelessWidget { const WalletSummary({ Key? key, required this.walletId, - required this.managerProvider, required this.initialSyncStatus, this.aspectRatio = 2.0, this.minHeight = 100.0, @@ -32,7 +26,6 @@ class WalletSummary extends StatelessWidget { }) : super(key: key); final String walletId; - final ChangeNotifierProvider managerProvider; final WalletSyncStatus initialSyncStatus; final double aspectRatio; @@ -52,83 +45,25 @@ class WalletSummary extends StatelessWidget { maxHeight: maxHeight, maxWidth: minWidth, ), - child: Stack( - children: [ - Consumer( - builder: (_, ref, __) { - return Container( - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .colorForCoin(ref.watch( - managerProvider.select((value) => value.coin))), - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - ), - ); - }, - ), - Positioned.fill( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Spacer( - flex: 5, - ), - Expanded( - flex: 6, - child: SvgPicture.asset( - Assets.svg.ellipse1, - // fit: BoxFit.fitWidth, - // clipBehavior: Clip.none, - ), - ), - const SizedBox( - width: 25, - ), - ], + child: LayoutBuilder( + builder: (_, constraints) => Stack( + children: [ + CoinCard( + walletId: walletId, + width: constraints.maxWidth, + height: constraints.maxHeight, ), - ), - // Positioned.fill( - // child: - // Column( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - Align( - alignment: Alignment.bottomCenter, - child: Row( - children: [ - const Spacer( - flex: 1, + Positioned.fill( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: WalletSummaryInfo( + walletId: walletId, + initialSyncStatus: initialSyncStatus, ), - Expanded( - flex: 3, - child: SvgPicture.asset( - Assets.svg.ellipse2, - // fit: BoxFit.f, - // clipBehavior: Clip.none, - ), - ), - const SizedBox( - width: 13, - ), - ], - ), - ), - // ], - // ), - // ), - Positioned.fill( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: WalletSummaryInfo( - walletId: walletId, - initialSyncStatus: initialSyncStatus, ), ), - ), - ], + ], + ), ), ), ); 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 93e1eb368..cba8f5e5f 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -148,8 +148,7 @@ class _TransactionDetailsViewState if (_transaction.numberOfMessages == 1) { return "Receiving (waiting for sender)"; } else if ((_transaction.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) + 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"; } @@ -963,94 +962,99 @@ class _TransactionDetailsViewState ], ), ), - isDesktop - ? const _Divider() - : const SizedBox( - height: 12, - ), - RoundedWhiteContainer( - padding: isDesktop - ? const EdgeInsets.all(16) - : const EdgeInsets.all(12), - child: Builder(builder: (context) { - String feeString = showFeePending - ? _transaction.isConfirmed( - currentHeight, - coin.requiredConfirmations, - ) - ? ref - .watch(pAmountFormatter(coin)) - .format( - fee, - withUnitName: isTokenTx, - ) - : "Pending" - : ref.watch(pAmountFormatter(coin)).format( - fee, - withUnitName: isTokenTx, - ); + if (coin != Coin.banano && coin != Coin.nano) + isDesktop + ? const _Divider() + : const SizedBox( + height: 12, + ), + if (coin != Coin.banano && coin != Coin.nano) + RoundedWhiteContainer( + padding: isDesktop + ? const EdgeInsets.all(16) + : const EdgeInsets.all(12), + child: Builder(builder: (context) { + String feeString = showFeePending + ? _transaction.isConfirmed( + currentHeight, + coin.requiredConfirmations, + ) + ? ref + .watch(pAmountFormatter(coin)) + .format( + fee, + withUnitName: isTokenTx, + ) + : "Pending" + : ref + .watch(pAmountFormatter(coin)) + .format( + fee, + withUnitName: isTokenTx, + ); - return Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - "Transaction fee", - style: isDesktop - ? STextStyles - .desktopTextExtraExtraSmall( - context) - : STextStyles.itemSubtitle( - context), - ), - if (isDesktop) - const SizedBox( - height: 2, - ), - if (isDesktop) - SelectableText( - feeString, + return Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + "Transaction fee", 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()! - .textDark, - ) - : STextStyles.itemSubtitle12( - 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), + ), + ], ), - if (isDesktop) - IconCopyButton(data: feeString) - ], - ); - }), - ), + if (!isDesktop) + SelectableText( + feeString, + style: isDesktop + ? STextStyles + .desktopTextExtraExtraSmall( + context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ) + : STextStyles.itemSubtitle12( + context), + ), + if (isDesktop) + IconCopyButton(data: feeString) + ], + ); + }), + ), isDesktop ? const _Divider() : const SizedBox( diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index e1be0b487..df036a73b 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -680,7 +680,6 @@ class _WalletViewState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: 16), child: WalletSummary( walletId: walletId, - managerProvider: managerProvider, initialSyncStatus: ref.watch(managerProvider .select((value) => value.isRefreshing)) ? WalletSyncStatus.syncing diff --git a/lib/pages/wallets_view/sub_widgets/favorite_card.dart b/lib/pages/wallets_view/sub_widgets/favorite_card.dart index c43fd2b3a..b3f5e97e5 100644 --- a/lib/pages/wallets_view/sub_widgets/favorite_card.dart +++ b/lib/pages/wallets_view/sub_widgets/favorite_card.dart @@ -21,11 +21,11 @@ import 'package:stackwallet/themes/coin_icon_provider.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/amount/amount_formatter.dart'; -import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/util.dart'; +import 'package:stackwallet/widgets/coin_card.dart'; import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:tuple/tuple.dart'; @@ -145,66 +145,10 @@ class _FavoriteCardState extends ConsumerState { width: widget.width, height: widget.height, child: CardOverlayStack( - background: Stack( - children: [ - Container( - width: widget.width, - height: widget.height, - decoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .colorForCoin(coin), - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - ), - ), - Column( - children: [ - const Spacer(), - SizedBox( - height: widget.width * 0.3, - child: Row( - children: [ - const Spacer( - flex: 9, - ), - SvgPicture.asset( - Assets.svg.ellipse2, - height: widget.width * 0.3, - ), - // ), - const Spacer( - flex: 2, - ), - ], - ), - ), - ], - ), - Row( - children: [ - const Spacer( - flex: 5, - ), - SizedBox( - width: widget.width * 0.45, - child: Column( - children: [ - SvgPicture.asset( - Assets.svg.ellipse1, - width: widget.width * 0.45, - ), - const Spacer(), - ], - ), - ), - const Spacer( - flex: 1, - ), - ], - ), - ], + background: CoinCard( + walletId: widget.walletId, + width: widget.width, + height: widget.height, ), child: Padding( padding: const EdgeInsets.all(12.0), 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 d1cdbbadb..7b972eab3 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 @@ -215,11 +215,17 @@ class _DesktopReceiveState extends ConsumerState { ), ), ), - if (coin != Coin.epicCash && coin != Coin.ethereum) + if (coin != Coin.epicCash && + coin != Coin.ethereum && + coin != Coin.banano && + coin != Coin.nano) const SizedBox( height: 20, ), - if (coin != Coin.epicCash && coin != Coin.ethereum) + if (coin != Coin.epicCash && + coin != Coin.ethereum && + coin != Coin.banano && + coin != Coin.nano) SecondaryButton( buttonHeight: ButtonHeight.l, onPressed: generateNewAddress, 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 25872c6cf..44c292555 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 @@ -9,6 +9,7 @@ */ import 'dart:async'; +import 'dart:math'; import 'package:bip47/bip47.dart'; import 'package:decimal/decimal.dart'; @@ -452,7 +453,8 @@ class _DesktopSendState extends ConsumerState { cryptoAmount = cryptoAmount.split(" ").first; } - final shift = ref.read(pAmountUnit(coin)).shift; + // ensure we don't shift past minimum atomic value + final shift = min(ref.read(pAmountUnit(coin)).shift, coin.decimals); _amountToSend = cryptoAmount.contains(",") ? Decimal.parse(cryptoAmount.replaceFirst(",", ".")) 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 f65e0170f..a54c0f443 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 @@ -12,11 +12,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -108,12 +108,9 @@ class DesktopAboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = - "Unable to fetch version"; // FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = - "Unable to fetch version"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = - "Unable to fetch version"; //MONERO_VERSIONS.getPluginVersion(); + String firoCommit = FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), @@ -250,13 +247,13 @@ class DesktopAboutView extends ConsumerWidget { String signature = ""; String build = ""; - // if (snapshot.connectionState == - // ConnectionState.done && - // snapshot.hasData) { - // version = snapshot.data!.version; - // build = snapshot.data!.buildNumber; - // signature = snapshot.data!.buildSignature; - // } + if (snapshot.connectionState == + ConnectionState.done && + snapshot.hasData) { + version = snapshot.data!.version; + build = snapshot.data!.buildNumber; + signature = snapshot.data!.buildSignature; + } return Column( mainAxisAlignment: @@ -404,7 +401,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorGreen); break; case CommitStatus - .isOldCommit: + .isOldCommit: indicationStyle = STextStyles .itemSubtitle( context) @@ -416,7 +413,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorYellow); break; case CommitStatus - .notACommit: + .notACommit: indicationStyle = STextStyles .itemSubtitle( context) @@ -510,7 +507,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorGreen); break; case CommitStatus - .isOldCommit: + .isOldCommit: indicationStyle = STextStyles .itemSubtitle( context) @@ -522,7 +519,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorYellow); break; case CommitStatus - .notACommit: + .notACommit: indicationStyle = STextStyles .itemSubtitle( context) @@ -614,7 +611,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorGreen); break; case CommitStatus - .isOldCommit: + .isOldCommit: indicationStyle = STextStyles .itemSubtitle( context) @@ -626,7 +623,7 @@ class DesktopAboutView extends ConsumerWidget { .accentColorYellow); break; case CommitStatus - .notACommit: + .notACommit: indicationStyle = STextStyles .itemSubtitle( context) diff --git a/lib/services/coins/banano/banano_wallet.dart b/lib/services/coins/banano/banano_wallet.dart index abba2a86f..8511f5599 100644 --- a/lib/services/coins/banano/banano_wallet.dart +++ b/lib/services/coins/banano/banano_wallet.dart @@ -11,6 +11,7 @@ import 'package:stackwallet/models/node_model.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart'; +import 'package:stackwallet/services/event_bus/events/global/updated_in_background_event.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/services/mixins/coin_control_interface.dart'; @@ -293,17 +294,31 @@ class BananoWallet extends CoinServiceAPI Future estimateFeeFor(Amount amount, int feeRate) { // fees are always 0 :) return Future.value( - Amount(rawValue: BigInt.from(0), fractionDigits: coin.decimals)); + Amount( + rawValue: BigInt.from(0), + fractionDigits: coin.decimals, + ), + ); } @override Future exit() async { _hasCalledExit = true; + timer?.cancel(); + timer = null; + stopNetworkAlivePinging(); } @override - // TODO: implement fees - Future get fees => throw UnimplementedError(); + // Banano has no fees + Future get fees async => FeeObject( + numberOfBlocksFast: 1, + numberOfBlocksAverage: 1, + numberOfBlocksSlow: 1, + fast: 0, + medium: 0, + slow: 0, + ); Future updateBalance() async { final body = jsonEncode({ @@ -550,7 +565,14 @@ class BananoWallet extends CoinServiceAPI await db.addNewTransactionData(transactionList, walletId); - return; + if (transactionList.isNotEmpty) { + GlobalEventBus.instance.fire( + UpdatedInBackgroundEvent( + "Transactions updated/added for: $walletId $walletName ", + walletId, + ), + ); + } } } @@ -649,20 +671,14 @@ class BananoWallet extends CoinServiceAPI Map? args, }) async { try { - int satAmount = amount.raw.toInt(); - int realfee = 0; - - if (balance.spendable == amount) { - satAmount = balance.spendable.raw.toInt() - realfee; + if (amount.decimals != coin.decimals) { + throw ArgumentError("Banano prepareSend attempted with invalid Amount"); } Map txData = { - "fee": realfee, + "fee": 0, "addresss": address, - "recipientAmt": Amount( - rawValue: BigInt.from(satAmount), - fractionDigits: coin.decimals, - ), + "recipientAmt": amount, }; Logging.instance.log("prepare send: $txData", level: LogLevel.Info); @@ -720,17 +736,29 @@ class BananoWallet extends CoinServiceAPI @override Future refresh() async { + if (refreshMutex) { + Logging.instance.log( + "$walletId $walletName refreshMutex denied", + level: LogLevel.Info, + ); + return; + } else { + refreshMutex = true; + } + await _prefs.init(); - GlobalEventBus.instance.fire( - WalletSyncStatusChangedEvent( - WalletSyncStatus.syncing, - walletId, - coin, - ), - ); - try { + GlobalEventBus.instance.fire( + WalletSyncStatusChangedEvent( + WalletSyncStatus.syncing, + walletId, + coin, + ), + ); + + await _prefs.init(); + await updateChainHeight(); await updateTransactions(); await updateBalance(); @@ -742,9 +770,25 @@ class BananoWallet extends CoinServiceAPI coin, ), ); + + if (shouldAutoSync) { + timer ??= Timer.periodic(const Duration(seconds: 30), (timer) async { + Logging.instance.log( + "Periodic refresh check for $walletId $walletName in object instance: $hashCode", + level: LogLevel.Info); + + await refresh(); + GlobalEventBus.instance.fire( + UpdatedInBackgroundEvent( + "New data found in $walletId $walletName in background!", + walletId, + ), + ); + }); + } } catch (e, s) { Logging.instance.log( - "Failed to refresh banano wallet \'$walletName\': $e\n$s", + "Failed to refresh banano wallet $walletId: '$walletName': $e\n$s", level: LogLevel.Warning, ); GlobalEventBus.instance.fire( @@ -755,6 +799,8 @@ class BananoWallet extends CoinServiceAPI ), ); } + + refreshMutex = false; } @override @@ -843,9 +889,9 @@ class BananoWallet extends CoinServiceAPI } @override - Future updateSentCachedTxData(Map txData) { - // TODO: implement updateSentCachedTxData - throw UnimplementedError(); + Future updateSentCachedTxData(Map txData) async { + // not currently used for nano + return; } @override diff --git a/lib/services/coins/nano/nano_wallet.dart b/lib/services/coins/nano/nano_wallet.dart index c0a5eb853..1e783bf5f 100644 --- a/lib/services/coins/nano/nano_wallet.dart +++ b/lib/services/coins/nano/nano_wallet.dart @@ -21,6 +21,7 @@ import 'package:stackwallet/models/node_model.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart'; +import 'package:stackwallet/services/event_bus/events/global/updated_in_background_event.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/services/mixins/coin_control_interface.dart'; @@ -309,11 +310,21 @@ class NanoWallet extends CoinServiceAPI @override Future exit() async { _hasCalledExit = true; + timer?.cancel(); + timer = null; + stopNetworkAlivePinging(); } @override // Nano has no fees - Future get fees => throw UnimplementedError(); + Future get fees async => FeeObject( + numberOfBlocksFast: 1, + numberOfBlocksAverage: 1, + numberOfBlocksSlow: 1, + fast: 0, + medium: 0, + slow: 0, + ); Future updateBalance() async { final body = jsonEncode({ @@ -560,7 +571,14 @@ class NanoWallet extends CoinServiceAPI await db.addNewTransactionData(transactionList, walletId); - return; + if (transactionList.isNotEmpty) { + GlobalEventBus.instance.fire( + UpdatedInBackgroundEvent( + "Transactions updated/added for: $walletId $walletName ", + walletId, + ), + ); + } } } @@ -732,17 +750,27 @@ class NanoWallet extends CoinServiceAPI @override Future refresh() async { - await _prefs.init(); - - GlobalEventBus.instance.fire( - WalletSyncStatusChangedEvent( - WalletSyncStatus.syncing, - walletId, - coin, - ), - ); + if (refreshMutex) { + Logging.instance.log( + "$walletId $walletName refreshMutex denied", + level: LogLevel.Info, + ); + return; + } else { + refreshMutex = true; + } try { + await _prefs.init(); + + GlobalEventBus.instance.fire( + WalletSyncStatusChangedEvent( + WalletSyncStatus.syncing, + walletId, + coin, + ), + ); + await updateChainHeight(); await updateTransactions(); await updateBalance(); @@ -754,7 +782,27 @@ class NanoWallet extends CoinServiceAPI coin, ), ); - } catch (e) { + + if (shouldAutoSync) { + timer ??= Timer.periodic(const Duration(seconds: 30), (timer) async { + Logging.instance.log( + "Periodic refresh check for $walletId $walletName in object instance: $hashCode", + level: LogLevel.Info); + + await refresh(); + GlobalEventBus.instance.fire( + UpdatedInBackgroundEvent( + "New data found in $walletId $walletName in background!", + walletId, + ), + ); + }); + } + } catch (e, s) { + Logging.instance.log( + "Failed to refresh nano wallet $walletId: '$walletName': $e\n$s", + level: LogLevel.Warning, + ); GlobalEventBus.instance.fire( WalletSyncStatusChangedEvent( WalletSyncStatus.unableToSync, @@ -763,6 +811,8 @@ class NanoWallet extends CoinServiceAPI ), ); } + + refreshMutex = false; } @override diff --git a/lib/services/price.dart b/lib/services/price.dart index 5fe520e31..22f0e79aa 100644 --- a/lib/services/price.dart +++ b/lib/services/price.dart @@ -100,7 +100,7 @@ class PriceAPI { Uri.parse("https://api.coingecko.com/api/v3/coins/markets?vs_currency" "=${baseCurrency.toLowerCase()}" "&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin," - "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false"); final coinGeckoResponse = await client.get( @@ -115,8 +115,9 @@ class PriceAPI { final coin = coinFromPrettyName(coinName); 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] = Tuple2(price, change24h); } diff --git a/lib/themes/coin_card_provider.dart b/lib/themes/coin_card_provider.dart new file mode 100644 index 000000000..fc84faebd --- /dev/null +++ b/lib/themes/coin_card_provider.dart @@ -0,0 +1,24 @@ +/* + * 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_riverpod/flutter_riverpod.dart'; +import 'package:stackwallet/models/isar/stack_theme.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; + +final coinCardProvider = Provider.family((ref, coin) { + final assets = ref.watch(themeAssetsProvider); + + if (assets is ThemeAssetsV3) { + return assets.coinCardImages?[coin.mainNetVersion]; + } else { + return null; + } +}); diff --git a/lib/themes/coin_icon_provider.dart b/lib/themes/coin_icon_provider.dart index dd67329ff..57695caa0 100644 --- a/lib/themes/coin_icon_provider.dart +++ b/lib/themes/coin_icon_provider.dart @@ -50,7 +50,9 @@ final coinIconProvider = Provider.family((ref, coin) { default: return assets.bitcoin; } + } else if (assets is ThemeAssetsV2) { + return (assets).coinIcons[coin.mainNetVersion]!; } else { - return (assets as ThemeAssetsV2).coinIcons[coin.mainNetVersion]!; + return (assets as ThemeAssetsV3).coinIcons[coin.mainNetVersion]!; } }); diff --git a/lib/themes/coin_image_provider.dart b/lib/themes/coin_image_provider.dart index 41d1d64c9..6ca839fb9 100644 --- a/lib/themes/coin_image_provider.dart +++ b/lib/themes/coin_image_provider.dart @@ -52,10 +52,12 @@ final coinImageProvider = Provider.family((ref, coin) { case Coin.ethereum: return assets.ethereumImage; default: - return assets.bitcoinImage; + return assets.stackIcon; } + } else if (assets is ThemeAssetsV2) { + return (assets).coinImages[coin.mainNetVersion]!; } else { - return (assets as ThemeAssetsV2).coinImages[coin.mainNetVersion]!; + return (assets as ThemeAssetsV3).coinImages[coin.mainNetVersion]!; } }); @@ -99,9 +101,11 @@ final coinImageSecondaryProvider = Provider.family((ref, coin) { return assets.ethereumImageSecondary; default: - return assets.ethereumImageSecondary; + return assets.stackIcon; } + } else if (assets is ThemeAssetsV2) { + return (assets).coinSecondaryImages[coin.mainNetVersion]!; } else { - return (assets as ThemeAssetsV2).coinSecondaryImages[coin.mainNetVersion]!; + return (assets as ThemeAssetsV3).coinSecondaryImages[coin.mainNetVersion]!; } }); diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index 923bc2075..2dd7be287 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -40,9 +40,9 @@ abstract class Constants { static final BigInt _satsPerCoinMonero = BigInt.from(1000000000000); static final BigInt _satsPerCoinWownero = BigInt.from(100000000000); static final BigInt _satsPerCoinNano = - BigInt.parse("1000000000000000000000000000000");// 1*10^30 + BigInt.parse("1000000000000000000000000000000"); // 1*10^30 static final BigInt _satsPerCoinBanano = - BigInt.parse("100000000000000000000000000000");// 1*10^29 + BigInt.parse("100000000000000000000000000000"); // 1*10^29 static final BigInt _satsPerCoin = BigInt.from(100000000); static const int _decimalPlaces = 8; static const int _decimalPlacesNano = 30; @@ -217,8 +217,36 @@ abstract class Constants { } } - static const int seedPhraseWordCountBip39 = 12; - static const int seedPhraseWordCountMonero = 25; + static int defaultSeedPhraseLengthFor({required Coin coin}) { + switch (coin) { + case Coin.bitcoin: + case Coin.bitcoinTestNet: + case Coin.bitcoincash: + case Coin.bitcoincashTestnet: + case Coin.eCash: + case Coin.dogecoin: + case Coin.dogecoinTestNet: + case Coin.litecoin: + case Coin.litecoinTestNet: + case Coin.firo: + case Coin.firoTestNet: + case Coin.epicCash: + case Coin.namecoin: + case Coin.particl: + case Coin.ethereum: + return 12; + + case Coin.wownero: + return 14; + + case Coin.nano: + case Coin.banano: + return 24; + + case Coin.monero: + return 25; + } + } static const Map monthMapShort = { 1: 'Jan', diff --git a/lib/widgets/address_book_card.dart b/lib/widgets/address_book_card.dart index 7d78075a3..fed6deb03 100644 --- a/lib/widgets/address_book_card.dart +++ b/lib/widgets/address_book_card.dart @@ -137,29 +137,31 @@ class _AddressBookCardState extends ConsumerState { const SizedBox( width: 16, ), - if (isDesktop && !desktopSendFrom) const Spacer(), - if (isDesktop) - Text( - coinsString, - style: STextStyles.label(context), - ), - if (!isDesktop) - Column( - crossAxisAlignment: CrossAxisAlignment.start, + Expanded( + child: Column( + crossAxisAlignment: isDesktop && !desktopSendFrom + ? CrossAxisAlignment.end + : CrossAxisAlignment.start, children: [ - Text( - contact.name, - style: STextStyles.itemSubtitle12(context), - ), - const SizedBox( - height: 4, - ), + if (!isDesktop) + Text( + contact.name, + style: STextStyles.itemSubtitle12(context), + ), + if (!isDesktop) + const SizedBox( + height: 4, + ), Text( coinsString, style: STextStyles.label(context), + textAlign: isDesktop && !desktopSendFrom + ? TextAlign.right + : TextAlign.left, ), ], ), + ), if (isDesktop && desktopSendFrom) const Spacer(), if (isDesktop && desktopSendFrom) SvgPicture.asset( diff --git a/lib/widgets/coin_card.dart b/lib/widgets/coin_card.dart new file mode 100644 index 000000000..3d122c42a --- /dev/null +++ b/lib/widgets/coin_card.dart @@ -0,0 +1,123 @@ +/* + * 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:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/themes/coin_card_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; +import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/constants.dart'; + +class CoinCard extends ConsumerWidget { + const CoinCard({ + super.key, + required this.walletId, + required this.width, + required this.height, + }); + + final String walletId; + final double width; + final double height; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final coin = ref.watch( + walletsChangeNotifierProvider + .select((value) => value.getManager(walletId).coin), + ); + + final bool hasCardImageBg = ref.watch(coinCardProvider(coin)) != null; + + return Stack( + children: [ + if (hasCardImageBg) + Container( + width: width, + height: height, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: FileImage( + File( + ref.watch(coinCardProvider(coin))!, + ), + ), + ), + ), + ), + if (!hasCardImageBg) + Container( + width: width, + height: height, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .colorForCoin(coin), + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + if (!hasCardImageBg) + Column( + children: [ + const Spacer(), + SizedBox( + height: width * 0.3, + child: Row( + children: [ + const Spacer( + flex: 9, + ), + SvgPicture.asset( + Assets.svg.ellipse2, + height: width * 0.3, + ), + // ), + const Spacer( + flex: 2, + ), + ], + ), + ), + ], + ), + if (!hasCardImageBg) + Row( + children: [ + const Spacer( + flex: 5, + ), + SizedBox( + width: width * 0.45, + child: Column( + children: [ + SvgPicture.asset( + Assets.svg.ellipse1, + width: width * 0.45, + ), + const Spacer(), + ], + ), + ), + const Spacer( + flex: 1, + ), + ], + ), + ], + ); + } +} diff --git a/test/price_test.dart b/test/price_test.dart index dfca4e212..f611c5450 100644 --- a/test/price_test.dart +++ b/test/price_test.dart @@ -28,7 +28,7 @@ void main() { 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,ban&order=market_cap_desc&per_page=50" + ",namecoin,wownero,ethereum,particl,nano,banano&order=market_cap_desc&per_page=50" "&page=1&sparkline=false"), headers: { 'Content-Type': 'application/json' @@ -100,8 +100,9 @@ void main() { expect( price.toString(), '{' - 'Coin.banano: [0, 0.0], ' 'Coin.bitcoin: [1, 0.0], ' + 'Coin.monero: [0.00717236, -0.77656], ' + 'Coin.banano: [0, 0.0], ' 'Coin.bitcoincash: [0, 0.0], ' 'Coin.dogecoin: [0.00000315, -2.68533], ' 'Coin.eCash: [0, 0.0], ' @@ -109,7 +110,6 @@ void main() { 'Coin.ethereum: [0, 0.0], ' 'Coin.firo: [0.0001096, -0.89304], ' 'Coin.litecoin: [0, 0.0], ' - 'Coin.monero: [0.00717236, -0.77656], ' 'Coin.namecoin: [0, 0.0], ' 'Coin.nano: [0, 0.0], ' 'Coin.particl: [0, 0.0], ' @@ -125,7 +125,7 @@ void main() { 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,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false", ), headers: {'Content-Type': 'application/json'})).called(1); @@ -140,7 +140,7 @@ void main() { 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,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), headers: { 'Content-Type': 'application/json' @@ -217,8 +217,9 @@ void main() { expect( cachedPrice.toString(), '{' - 'Coin.banano: [0, 0.0], ' 'Coin.bitcoin: [1, 0.0], ' + 'Coin.monero: [0.00717236, -0.77656], ' + 'Coin.banano: [0, 0.0], ' 'Coin.bitcoincash: [0, 0.0], ' 'Coin.dogecoin: [0.00000315, -2.68533], ' 'Coin.eCash: [0, 0.0], ' @@ -226,7 +227,6 @@ void main() { 'Coin.ethereum: [0, 0.0], ' 'Coin.firo: [0.0001096, -0.89304], ' 'Coin.litecoin: [0, 0.0], ' - 'Coin.monero: [0.00717236, -0.77656], ' 'Coin.namecoin: [0, 0.0], ' 'Coin.nano: [0, 0.0], ' 'Coin.particl: [0, 0.0], ' @@ -244,7 +244,7 @@ void main() { 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,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), headers: {'Content-Type': 'application/json'})).called(1); @@ -258,7 +258,7 @@ void main() { 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,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), headers: { 'Content-Type': 'application/json' @@ -331,8 +331,9 @@ void main() { expect( price.toString(), '{' - 'Coin.banano: [0, 0.0], ' 'Coin.bitcoin: [0, 0.0], ' + 'Coin.monero: [0, 0.0], ' + 'Coin.banano: [0, 0.0], ' 'Coin.bitcoincash: [0, 0.0], ' 'Coin.dogecoin: [0, 0.0], ' 'Coin.eCash: [0, 0.0], ' @@ -340,7 +341,6 @@ void main() { 'Coin.ethereum: [0, 0.0], ' 'Coin.firo: [0, 0.0], ' 'Coin.litecoin: [0, 0.0], ' - 'Coin.monero: [0, 0.0], ' 'Coin.namecoin: [0, 0.0], ' 'Coin.nano: [0, 0.0], ' 'Coin.particl: [0, 0.0], ' @@ -361,7 +361,7 @@ void main() { 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,ban" + "bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano" "&order=market_cap_desc&per_page=50&page=1&sparkline=false"), headers: { 'Content-Type': 'application/json' @@ -376,8 +376,9 @@ void main() { expect( price.toString(), '{' - 'Coin.banano: [0, 0.0], ' 'Coin.bitcoin: [0, 0.0], ' + 'Coin.monero: [0, 0.0], ' + 'Coin.banano: [0, 0.0], ' 'Coin.bitcoincash: [0, 0.0], ' 'Coin.dogecoin: [0, 0.0], ' 'Coin.eCash: [0, 0.0], ' @@ -385,7 +386,6 @@ void main() { 'Coin.ethereum: [0, 0.0], ' 'Coin.firo: [0, 0.0], ' 'Coin.litecoin: [0, 0.0], ' - 'Coin.monero: [0, 0.0], ' 'Coin.namecoin: [0, 0.0], ' 'Coin.nano: [0, 0.0], ' 'Coin.particl: [0, 0.0], '