diff --git a/easel/lib/easel_provider.dart b/easel/lib/easel_provider.dart index 7ec34b77f1..784450ed2b 100644 --- a/easel/lib/easel_provider.dart +++ b/easel/lib/easel_provider.dart @@ -712,6 +712,7 @@ class EaselProvider extends ChangeNotifier { StringParam(key: kNFTURL, value: nft.url), StringParam(key: kThumbnailUrl, value: nft.thumbnailUrl), StringParam(key: kCreator, value: nft.creator.trim()), + StringParam(key: kFileExtension, value: nft.fileExtension.trim()), StringParam(key: kCID, value: nft.cid), StringParam(key: kFileSize, value: nft.fileSize), StringParam(key: kRealWorld, value: "false"), @@ -972,6 +973,7 @@ class EaselProvider extends ChangeNotifier { tradePercentage: royaltyController.text, height: fileHeight.toString(), duration: fileDuration.toString(), + fileExtension: _fileExtension, description: descriptionController.text, fileSize: _fileSize, recipeID: recipeId, @@ -1009,6 +1011,7 @@ class EaselProvider extends ChangeNotifier { recipeID: recipeId, step: step.name, fileName: _file!.path.split("/").last, + fileExtension: fileExtension, cid: fileUploadResponse.value?.cid ?? "", thumbnailUrl: (isThumbnailPresent()) ? "$ipfsDomain/${uploadThumbnailResponse.value?.cid}" : "", name: artistNameController.text, diff --git a/easel/lib/models/nft.dart b/easel/lib/models/nft.dart index b58d35dfa4..702c989561 100644 --- a/easel/lib/models/nft.dart +++ b/easel/lib/models/nft.dart @@ -74,6 +74,8 @@ class NFT extends Equatable { final bool isEnabled; + final String fileExtension; + const NFT({ this.id, this.url = "", @@ -108,6 +110,7 @@ class NFT extends Equatable { this.isDialogShown = false, this.dateTime = 0, this.ownerAddress = "", + this.fileExtension = "", }); factory NFT.fromRecipe(Recipe recipe) { @@ -122,6 +125,7 @@ class NFT extends Equatable { description: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription, orElse: () => StringParam()).value ?? "", appType: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringParam()).value ?? "", creator: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringParam()).value ?? "", + fileExtension: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kFileExtension, orElse: () => StringParam()).value ?? "", cid: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringParam()).value ?? "", width: recipe.entries.itemOutputs.firstOrNull?.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongParam()).weightRanges.firstOrNull?.upper.toString() ?? "0", height: recipe.entries.itemOutputs.firstOrNull?.longs.firstWhere((longKeyValue) => longKeyValue.key == kHeight, orElse: () => LongParam()).weightRanges.firstOrNull?.upper.toString() ?? "0", diff --git a/easel/lib/services/third_party_services/database.g.dart b/easel/lib/services/third_party_services/database.g.dart index 9cb57b3585..903e5f8948 100644 --- a/easel/lib/services/third_party_services/database.g.dart +++ b/easel/lib/services/third_party_services/database.g.dart @@ -1,7 +1,5 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: library_private_types_in_public_api - part of 'database.dart'; // ************************************************************************** @@ -12,12 +10,14 @@ part of 'database.dart'; class $FloorAppDatabase { /// Creates a database builder for a persistent database. /// Once a database is built, you should keep a reference to it and re-use it. - static _$AppDatabaseBuilder databaseBuilder(String name) => _$AppDatabaseBuilder(name); + static _$AppDatabaseBuilder databaseBuilder(String name) => + _$AppDatabaseBuilder(name); /// Creates a database builder for an in memory database. /// Information stored in an in memory database disappears when the process is killed. /// Once a database is built, you should keep a reference to it and re-use it. - static _$AppDatabaseBuilder inMemoryDatabaseBuilder() => _$AppDatabaseBuilder(null); + static _$AppDatabaseBuilder inMemoryDatabaseBuilder() => + _$AppDatabaseBuilder(null); } class _$AppDatabaseBuilder { @@ -43,7 +43,9 @@ class _$AppDatabaseBuilder { /// Creates the database and initializes it. Future build() async { - final path = name != null ? await sqfliteDatabaseFactory.getDatabasePath(name!) : ':memory:'; + final path = name != null + ? await sqfliteDatabaseFactory.getDatabasePath(name!) + : ':memory:'; final database = _$AppDatabase(); database.database = await database.open( path, @@ -76,13 +78,14 @@ class _$AppDatabase extends AppDatabase { await callback?.onOpen?.call(database); }, onUpgrade: (database, startVersion, endVersion) async { - await MigrationAdapter.runMigrations(database, startVersion, endVersion, migrations); + await MigrationAdapter.runMigrations( + database, startVersion, endVersion, migrations); await callback?.onUpgrade?.call(database, startVersion, endVersion); }, onCreate: (database, version) async { await database.execute( - 'CREATE TABLE IF NOT EXISTS `NFT` (`id` INTEGER, `url` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `denom` TEXT NOT NULL, `price` TEXT NOT NULL, `creator` TEXT NOT NULL, `owner` TEXT NOT NULL, `amountMinted` INTEGER NOT NULL, `quantity` TEXT NOT NULL, `tradePercentage` TEXT NOT NULL, `cookbookID` TEXT NOT NULL, `recipeID` TEXT NOT NULL, `itemID` TEXT NOT NULL, `width` TEXT NOT NULL, `height` TEXT NOT NULL, `appType` TEXT NOT NULL, `tradeID` TEXT NOT NULL, `ownerAddress` TEXT NOT NULL, `step` TEXT NOT NULL, `ibcCoins` TEXT NOT NULL, `isFreeDrop` TEXT NOT NULL, `type` TEXT NOT NULL, `assetType` TEXT NOT NULL, `duration` TEXT NOT NULL, `hashtags` TEXT NOT NULL, `fileName` TEXT NOT NULL, `fileSize` TEXT NOT NULL, `cid` TEXT NOT NULL, `dateTime` INTEGER NOT NULL, `isDialogShown` INTEGER NOT NULL, `isEnabled` INTEGER NOT NULL, PRIMARY KEY (`id`))'); + 'CREATE TABLE IF NOT EXISTS `NFT` (`id` INTEGER, `url` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `denom` TEXT NOT NULL, `price` TEXT NOT NULL, `creator` TEXT NOT NULL, `owner` TEXT NOT NULL, `amountMinted` INTEGER NOT NULL, `quantity` TEXT NOT NULL, `tradePercentage` TEXT NOT NULL, `cookbookID` TEXT NOT NULL, `recipeID` TEXT NOT NULL, `itemID` TEXT NOT NULL, `width` TEXT NOT NULL, `height` TEXT NOT NULL, `appType` TEXT NOT NULL, `tradeID` TEXT NOT NULL, `ownerAddress` TEXT NOT NULL, `step` TEXT NOT NULL, `ibcCoins` TEXT NOT NULL, `isFreeDrop` TEXT NOT NULL, `type` TEXT NOT NULL, `assetType` TEXT NOT NULL, `duration` TEXT NOT NULL, `hashtags` TEXT NOT NULL, `fileName` TEXT NOT NULL, `fileSize` TEXT NOT NULL, `cid` TEXT NOT NULL, `dateTime` INTEGER NOT NULL, `isDialogShown` INTEGER NOT NULL, `isEnabled` INTEGER NOT NULL, `fileExtension` TEXT NOT NULL, PRIMARY KEY (`id`))'); await callback?.onCreate?.call(database, version); }, @@ -137,7 +140,8 @@ class _$NftDao extends NftDao { 'cid': item.cid, 'dateTime': item.dateTime, 'isDialogShown': item.isDialogShown ? 1 : 0, - 'isEnabled': item.isEnabled ? 1 : 0 + 'isEnabled': item.isEnabled ? 1 : 0, + 'fileExtension': item.fileExtension }); final sqflite.DatabaseExecutor database; @@ -184,7 +188,8 @@ class _$NftDao extends NftDao { isEnabled: (row['isEnabled'] as int) != 0, isDialogShown: (row['isDialogShown'] as int) != 0, dateTime: row['dateTime'] as int, - ownerAddress: row['ownerAddress'] as String)); + ownerAddress: row['ownerAddress'] as String, + fileExtension: row['fileExtension'] as String)); } @override @@ -223,13 +228,15 @@ class _$NftDao extends NftDao { isEnabled: (row['isEnabled'] as int) != 0, isDialogShown: (row['isDialogShown'] as int) != 0, dateTime: row['dateTime'] as int, - ownerAddress: row['ownerAddress'] as String), + ownerAddress: row['ownerAddress'] as String, + fileExtension: row['fileExtension'] as String), arguments: [id]); } @override Future delete(int id) async { - await _queryAdapter.queryNoReturn('DELETE FROM nft WHERE id = ?1', arguments: [id]); + await _queryAdapter + .queryNoReturn('DELETE FROM nft WHERE id = ?1', arguments: [id]); } @override @@ -242,13 +249,24 @@ class _$NftDao extends NftDao { String hashtags, int dateTime, ) async { - await _queryAdapter.queryNoReturn('UPDATE nft SET name = ?2, description= ?3, creator = ?4, step = ?5,hashtags = ?6, dateTime = ?7 WHERE id = ?1', - arguments: [id, nftName, nftDescription, creatorName, step, hashtags, dateTime]); + await _queryAdapter.queryNoReturn( + 'UPDATE nft SET name = ?2, description= ?3, creator = ?4, step = ?5,hashtags = ?6, dateTime = ?7 WHERE id = ?1', + arguments: [ + id, + nftName, + nftDescription, + creatorName, + step, + hashtags, + dateTime + ]); } @override Future updateNFTDialogShown(int id) async { - await _queryAdapter.queryNoReturn('UPDATE nft SET isDialogShown = true WHERE id = ?1', arguments: [id]); + await _queryAdapter.queryNoReturn( + 'UPDATE nft SET isDialogShown = true WHERE id = ?1', + arguments: [id]); } @override @@ -262,12 +280,23 @@ class _$NftDao extends NftDao { String isFreeDrop, int dateTime, ) async { - await _queryAdapter.queryNoReturn('UPDATE nft SET tradePercentage = ?2, price= ?3, quantity = ?4, denom =?6, step = ?5, isFreeDrop = ?7, dateTime = ?8 WHERE id = ?1', - arguments: [id, tradePercentage, price, quantity, step, denom, isFreeDrop, dateTime]); + await _queryAdapter.queryNoReturn( + 'UPDATE nft SET tradePercentage = ?2, price= ?3, quantity = ?4, denom =?6, step = ?5, isFreeDrop = ?7, dateTime = ?8 WHERE id = ?1', + arguments: [ + id, + tradePercentage, + price, + quantity, + step, + denom, + isFreeDrop, + dateTime + ]); } @override Future insertNft(NFT nft) { - return _nFTInsertionAdapter.insertAndReturnId(nft, OnConflictStrategy.abort); + return _nFTInsertionAdapter.insertAndReturnId( + nft, OnConflictStrategy.abort); } } diff --git a/easel/lib/utils/constants.dart b/easel/lib/utils/constants.dart index 696172f805..e93309b1b7 100644 --- a/easel/lib/utils/constants.dart +++ b/easel/lib/utils/constants.dart @@ -160,6 +160,7 @@ const kHashtags = "Hashtags"; const kNFTFormat = "NFT_Format"; const kNFTURL = "NFT_URL"; const kCreator = "Creator"; +const kFileExtension = "file_extension"; const kCID = "cid"; const kThumbnailUrl = "Thumbnail_URL"; const kEasel = "Easel"; diff --git a/wallet/lib/model/nft.dart b/wallet/lib/model/nft.dart index 95ebd56771..589a6b761d 100644 --- a/wallet/lib/model/nft.dart +++ b/wallet/lib/model/nft.dart @@ -41,6 +41,7 @@ class NFT extends Equatable { AssetType assetType = AssetType.Image; String duration = ""; String fileSize = ""; + String fileExtension = ""; String hashtags = ""; String cid = ""; String createdAt = ""; @@ -71,6 +72,7 @@ class NFT extends Equatable { this.assetType = AssetType.Image, this.duration = "", this.fileSize = "", + this.fileExtension = "", this.hashtags = "", this.createdAt = "", this.realWorld = false, @@ -103,6 +105,7 @@ class NFT extends Equatable { description: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription).value, fileSize: getFileSize(item), creator: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringKeyValue(key: kCreator, value: "")).value, + fileExtension: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringKeyValue(key: kFileExtension, value: "")).value, cid: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringKeyValue(key: kCID, value: "")).value, appType: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringKeyValue(key: kAppType, value: "")).value, width: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongKeyValue(key: kWidth, value: Int64())).value.toString(), @@ -137,6 +140,7 @@ class NFT extends Equatable { description: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription).value, fileSize: getFileSize(item), creator: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringKeyValue(key: kCreator, value: "")).value, + fileExtension: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kFileExtension, orElse: () => StringKeyValue(key: kCreator, value: "")).value, cid: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringKeyValue(key: kCID, value: "")).value, appType: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringKeyValue(key: kAppType, value: "")).value, width: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongKeyValue(key: kWidth, value: Int64())).value.toString(), @@ -171,6 +175,7 @@ class NFT extends Equatable { cid: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringParam()).value ?? "", appType: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringParam()).value ?? "", creator: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringParam()).value ?? "", + fileExtension: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kFileExtension, orElse: () => StringParam()).value ?? "", width: recipe.entries.itemOutputs.firstOrNull?.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongParam()).weightRanges.firstOrNull?.upper.toString() ?? "0", height: recipe.entries.itemOutputs.firstOrNull?.longs.firstWhere((longKeyValue) => longKeyValue.key == kHeight, orElse: () => LongParam()).weightRanges.firstOrNull?.upper.toString() ?? "0", amountMinted: int.parse(recipe.entries.itemOutputs.firstOrNull?.amountMinted.toString() ?? "0"), @@ -189,8 +194,6 @@ class NFT extends Equatable { ); } - - static Future fromTradeByID(Int64 tradeID) async { final walletsStore = GetIt.I.get(); final trade = await walletsStore.getTradeByID(tradeID); @@ -234,6 +237,7 @@ class NFT extends Equatable { assetType, duration, fileSize, + fileExtension, hashtags, createdAt, realWorld, diff --git a/wallet/lib/pages/detailed_asset_view/widgets/tab_fields.dart b/wallet/lib/pages/detailed_asset_view/widgets/tab_fields.dart index 09f1e787f9..1feca895ca 100644 --- a/wallet/lib/pages/detailed_asset_view/widgets/tab_fields.dart +++ b/wallet/lib/pages/detailed_asset_view/widgets/tab_fields.dart @@ -63,21 +63,20 @@ class _TabFieldState extends State { case NftType.TYPE_RECIPE: return { LocaleKeys.recipe_id.tr(): widget.nft.recipeID, - LocaleKeys.resolution.tr(): "${widget.nft.width}x${widget.nft.height}", + LocaleKeys.resolution.tr(): "${widget.nft.width}x${widget.nft.height} ${widget.nft.fileExtension.toUpperCase()}", LocaleKeys.ipfs_cid.tr(): widget.nft.cid }; case NftType.TYPE_ITEM: - return { - LocaleKeys.recipe_id.tr(): widget.nft.recipeID - }; + return {LocaleKeys.recipe_id.tr(): widget.nft.recipeID}; case NftType.TYPE_TRADE: break; } return { LocaleKeys.recipe_id.tr(): widget.nft.recipeID, - LocaleKeys.resolution.tr(): "${widget.nft.width}x${widget.nft.height}", - LocaleKeys.ipfs_cid.tr(): widget.nft.cid}; + LocaleKeys.resolution.tr(): "${widget.nft.width}x${widget.nft.height} ${widget.nft.fileExtension}", + LocaleKeys.ipfs_cid.tr(): widget.nft.cid + }; } @override @@ -90,10 +89,10 @@ class _TabFieldState extends State { final listDetails = nftDetail.entries .map( - (element) => _tabDetails( - field: element.key, - value: element.value, - customWidget: (element.key == LocaleKeys.recipe_id.tr() || element.key == LocaleKeys.ipfs_cid.tr()) && element.value.isNotEmpty ? _tabDetailsWithIcon(value: element.value) : null), + (element) => _tabDetails( + field: element.key, + value: element.value, + customWidget: (element.key == LocaleKeys.recipe_id.tr() || element.key == LocaleKeys.ipfs_cid.tr()) && element.value.isNotEmpty ? _tabDetailsWithIcon(value: element.value) : null), ) .toList(); diff --git a/wallet/lib/utils/constants.dart b/wallet/lib/utils/constants.dart index 9396665471..4e5317615d 100644 --- a/wallet/lib/utils/constants.dart +++ b/wallet/lib/utils/constants.dart @@ -466,3 +466,5 @@ const String kShareNftButtonExpandedKey = "share_nft_expanded"; const String kGetFirebaseAppCheckTokenMethodChannelKey = "getFirebaseAppCheckTokenMethodChannel"; const String kGetFirebaseAppCheckDebugTokenKey = "getFirebaseAppCheckDebugToken"; + +const kFileExtension = "file_extension"; diff --git a/wallet/test/mocks/mock_constants.dart b/wallet/test/mocks/mock_constants.dart index e4679d3b44..f72e35cb39 100644 --- a/wallet/test/mocks/mock_constants.dart +++ b/wallet/test/mocks/mock_constants.dart @@ -260,6 +260,8 @@ NFT MOCK_NFT_FREE_IMAGE = NFT( fileSize: "90.12KB", itemID: "DtnxAS8L4pf", owner: "abd", + type: NftType.TYPE_RECIPE, + fileExtension: 'jpg', ibcCoins: IBCCoins.upylon, ); @@ -279,6 +281,8 @@ NFT MOCK_NFT_FREE_VIDEO = NFT( owner: "abd", ibcCoins: IBCCoins.upylon, assetType: AssetType.Video, + fileExtension: 'mp4', + type: NftType.TYPE_RECIPE, ); NFT MOCK_NFT_FREE_AUDIO = NFT( @@ -297,6 +301,46 @@ NFT MOCK_NFT_FREE_AUDIO = NFT( owner: "abd", ibcCoins: IBCCoins.upylon, assetType: AssetType.Audio, + fileExtension: 'mp3', + type: NftType.TYPE_RECIPE, +); +NFT MOCK_NFT_FREE_3D = NFT( + name: "This is my Image NFT", + height: "2400", + description: "Please Buy my Image NFT", + width: "1080", + url: "https://proxy.pylons.tech/ipfs/bafkreihzxrk7rpxmih3wr6o5kccxpfyjneg7rbgkpmdflvwyd63geaiaby", + recipeID: "Easel_Recipe_auto_recipe_2022_08_31_154526_206", + duration: "0:0", + cookbookID: "Easel_CookBook_auto_cookbook_2022_08_31_152836_312", + appType: "easel", + creator: "Ahmad", + fileSize: "90.12KB", + itemID: "DtnxAS8L4pf", + owner: "abd", + ibcCoins: IBCCoins.upylon, + assetType: AssetType.ThreeD, + fileExtension: 'glb', + type: NftType.TYPE_RECIPE, +); +NFT MOCK_NFT_FREE_PDF = NFT( + name: "This is my Image NFT", + height: "2400", + description: "Please Buy my Image NFT", + width: "1080", + url: "https://proxy.pylons.tech/ipfs/bafkreihzxrk7rpxmih3wr6o5kccxpfyjneg7rbgkpmdflvwyd63geaiaby", + recipeID: "Easel_Recipe_auto_recipe_2022_08_31_154526_206", + duration: "0:0", + cookbookID: "Easel_CookBook_auto_cookbook_2022_08_31_152836_312", + appType: "easel", + creator: "Ahmad", + fileSize: "90.12KB", + itemID: "DtnxAS8L4pf", + owner: "abd", + ibcCoins: IBCCoins.upylon, + assetType: AssetType.ThreeD, + fileExtension: 'pdf', + type: NftType.TYPE_RECIPE, ); NftOwnershipHistory MOCK_NFT_OWNERSHIP_HISTORY = NftOwnershipHistory( diff --git a/wallet/test/mocks/owner_view_view_model.mocks.dart b/wallet/test/mocks/owner_view_view_model.mocks.dart index 8d60ad5c7a..ae17ae9524 100644 --- a/wallet/test/mocks/owner_view_view_model.mocks.dart +++ b/wallet/test/mocks/owner_view_view_model.mocks.dart @@ -1,21 +1,23 @@ // Mocks generated by Mockito 5.3.2 from annotations -// in pylons_wallet/test/widget_testing/pages/owner_view_screen_test.dart. +// in pylons_wallet/test/widget_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; -import 'dart:ui' as _i16; +import 'dart:ui' as _i17; -import 'package:flutter/foundation.dart' as _i9; +import 'package:flutter/foundation.dart' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:pylons_wallet/model/nft.dart' as _i2; -import 'package:pylons_wallet/model/nft_ownership_history.dart' as _i12; +import 'package:pylons_wallet/model/nft_ownership_history.dart' as _i14; import 'package:pylons_wallet/pages/detailed_asset_view/owner_view_view_model.dart' - as _i10; + as _i11; +import 'package:pylons_wallet/pages/detailed_asset_view/widgets/tab_fields.dart' + as _i12; import 'package:pylons_wallet/pages/owner_purchase_view_common/button_state.dart' - as _i15; + as _i16; import 'package:pylons_wallet/pages/owner_purchase_view_common/progress_bar_state.dart' - as _i14; + as _i15; import 'package:pylons_wallet/services/repository/repository.dart' as _i3; import 'package:pylons_wallet/services/third_party_services/audio_player_helper.dart' as _i5; @@ -25,8 +27,8 @@ import 'package:pylons_wallet/services/third_party_services/video_player_helper. as _i6; import 'package:pylons_wallet/stores/wallet_store.dart' as _i4; import 'package:transaction_signing_gateway/transaction_signing_gateway.dart' - as _i13; -import 'package:video_player/video_player.dart' as _i11; + as _i9; +import 'package:video_player/video_player.dart' as _i13; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -112,9 +114,20 @@ class _FakeStreamSubscription_6 extends _i1.SmartFake ); } -class _FakeValueNotifier_7 extends _i1.SmartFake - implements _i9.ValueNotifier { - _FakeValueNotifier_7( +class _FakeAccountPublicInfo_7 extends _i1.SmartFake + implements _i9.AccountPublicInfo { + _FakeAccountPublicInfo_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeValueNotifier_8 extends _i1.SmartFake + implements _i10.ValueNotifier { + _FakeValueNotifier_8( Object parent, Invocation parentInvocation, ) : super( @@ -127,7 +140,7 @@ class _FakeValueNotifier_7 extends _i1.SmartFake /// /// See the documentation for Mockito's code generation for more information. class MockOwnerViewViewModel extends _i1.Mock - implements _i10.OwnerViewViewModel { + implements _i11.OwnerViewViewModel { @override _i2.NFT get nft => (super.noSuchMethod( Invocation.getter(#nft), @@ -209,6 +222,56 @@ class MockOwnerViewViewModel extends _i1.Mock ), ) as _i7.ShareHelper); @override + set selectedField(_i12.TabFields? _selectedField) => super.noSuchMethod( + Invocation.setter( + #selectedField, + _selectedField, + ), + returnValueForMissingStub: null, + ); + @override + bool get isOwnershipExpanded => (super.noSuchMethod( + Invocation.getter(#isOwnershipExpanded), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + set isOwnershipExpanded(bool? _isOwnershipExpanded) => super.noSuchMethod( + Invocation.setter( + #isOwnershipExpanded, + _isOwnershipExpanded, + ), + returnValueForMissingStub: null, + ); + @override + bool get isHistoryExpanded => (super.noSuchMethod( + Invocation.getter(#isHistoryExpanded), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + set isHistoryExpanded(bool? _isHistoryExpanded) => super.noSuchMethod( + Invocation.setter( + #isHistoryExpanded, + _isHistoryExpanded, + ), + returnValueForMissingStub: null, + ); + @override + bool get isDetailsExpanded => (super.noSuchMethod( + Invocation.getter(#isDetailsExpanded), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + set isDetailsExpanded(bool? _isDetailsExpanded) => super.noSuchMethod( + Invocation.setter( + #isDetailsExpanded, + _isDetailsExpanded, + ), + returnValueForMissingStub: null, + ); + @override String get owner => (super.noSuchMethod( Invocation.getter(#owner), returnValue: '', @@ -224,7 +287,7 @@ class MockOwnerViewViewModel extends _i1.Mock ); @override set videoPlayerController( - _i11.VideoPlayerController? _videoPlayerController) => + _i13.VideoPlayerController? _videoPlayerController) => super.noSuchMethod( Invocation.setter( #videoPlayerController, @@ -353,15 +416,15 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - List<_i12.NftOwnershipHistory> get nftOwnershipHistoryList => + List<_i14.NftOwnershipHistory> get nftOwnershipHistoryList => (super.noSuchMethod( Invocation.getter(#nftOwnershipHistoryList), - returnValue: <_i12.NftOwnershipHistory>[], - returnValueForMissingStub: <_i12.NftOwnershipHistory>[], - ) as List<_i12.NftOwnershipHistory>); + returnValue: <_i14.NftOwnershipHistory>[], + returnValueForMissingStub: <_i14.NftOwnershipHistory>[], + ) as List<_i14.NftOwnershipHistory>); @override set nftOwnershipHistoryList( - List<_i12.NftOwnershipHistory>? _nftOwnershipHistoryList) => + List<_i14.NftOwnershipHistory>? _nftOwnershipHistoryList) => super.noSuchMethod( Invocation.setter( #nftOwnershipHistoryList, @@ -370,7 +433,19 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - set accountPublicInfo(_i13.AccountPublicInfo? _accountPublicInfo) => + _i9.AccountPublicInfo get accountPublicInfo => (super.noSuchMethod( + Invocation.getter(#accountPublicInfo), + returnValue: _FakeAccountPublicInfo_7( + this, + Invocation.getter(#accountPublicInfo), + ), + returnValueForMissingStub: _FakeAccountPublicInfo_7( + this, + Invocation.getter(#accountPublicInfo), + ), + ) as _i9.AccountPublicInfo); + @override + set accountPublicInfo(_i9.AccountPublicInfo? _accountPublicInfo) => super.noSuchMethod( Invocation.setter( #accountPublicInfo, @@ -393,21 +468,21 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - _i9.ValueNotifier<_i14.ProgressBarState> get audioProgressNotifier => + _i10.ValueNotifier<_i15.ProgressBarState> get audioProgressNotifier => (super.noSuchMethod( Invocation.getter(#audioProgressNotifier), - returnValue: _FakeValueNotifier_7<_i14.ProgressBarState>( + returnValue: _FakeValueNotifier_8<_i15.ProgressBarState>( this, Invocation.getter(#audioProgressNotifier), ), - returnValueForMissingStub: _FakeValueNotifier_7<_i14.ProgressBarState>( + returnValueForMissingStub: _FakeValueNotifier_8<_i15.ProgressBarState>( this, Invocation.getter(#audioProgressNotifier), ), - ) as _i9.ValueNotifier<_i14.ProgressBarState>); + ) as _i10.ValueNotifier<_i15.ProgressBarState>); @override set audioProgressNotifier( - _i9.ValueNotifier<_i14.ProgressBarState>? _audioProgressNotifier) => + _i10.ValueNotifier<_i15.ProgressBarState>? _audioProgressNotifier) => super.noSuchMethod( Invocation.setter( #audioProgressNotifier, @@ -416,19 +491,20 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - _i9.ValueNotifier<_i15.ButtonState> get buttonNotifier => (super.noSuchMethod( + _i10.ValueNotifier<_i16.ButtonState> get buttonNotifier => + (super.noSuchMethod( Invocation.getter(#buttonNotifier), - returnValue: _FakeValueNotifier_7<_i15.ButtonState>( + returnValue: _FakeValueNotifier_8<_i16.ButtonState>( this, Invocation.getter(#buttonNotifier), ), - returnValueForMissingStub: _FakeValueNotifier_7<_i15.ButtonState>( + returnValueForMissingStub: _FakeValueNotifier_8<_i16.ButtonState>( this, Invocation.getter(#buttonNotifier), ), - ) as _i9.ValueNotifier<_i15.ButtonState>); + ) as _i10.ValueNotifier<_i16.ButtonState>); @override - set buttonNotifier(_i9.ValueNotifier<_i15.ButtonState>? _buttonNotifier) => + set buttonNotifier(_i10.ValueNotifier<_i16.ButtonState>? _buttonNotifier) => super.noSuchMethod( Invocation.setter( #buttonNotifier, @@ -564,6 +640,39 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override + void getWhichTabIsExpanded() => super.noSuchMethod( + Invocation.method( + #getWhichTabIsExpanded, + [], + ), + returnValueForMissingStub: null, + ); + @override + void closeExpansion() => super.noSuchMethod( + Invocation.method( + #closeExpansion, + [], + ), + returnValueForMissingStub: null, + ); + @override + void onChangeTab(_i12.TabFields? tab) => super.noSuchMethod( + Invocation.method( + #onChangeTab, + [tab], + ), + returnValueForMissingStub: null, + ); + @override + bool isExpansionOpen() => (super.noSuchMethod( + Invocation.method( + #isExpansionOpen, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override _i8.Future nftDataInit({ required String? recipeId, required String? cookBookId, @@ -740,7 +849,7 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - _i8.Future shareNFTLink({required _i16.Size? size}) => + _i8.Future shareNFTLink({required _i17.Size? size}) => (super.noSuchMethod( Invocation.method( #shareNFTLink, @@ -759,7 +868,7 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -767,7 +876,7 @@ class MockOwnerViewViewModel extends _i1.Mock returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/wallet/test/unit_testing/pages/purchase_item/purchase_item_view_model_test.mocks.dart b/wallet/test/unit_testing/pages/purchase_item/purchase_item_view_model_test.mocks.dart index 5124288f13..aea05f1538 100644 --- a/wallet/test/unit_testing/pages/purchase_item/purchase_item_view_model_test.mocks.dart +++ b/wallet/test/unit_testing/pages/purchase_item/purchase_item_view_model_test.mocks.dart @@ -2,53 +2,43 @@ // in pylons_wallet/test/unit_testing/pages/purchase_item/purchase_item_view_model_test.dart. // Do not manually edit this file. -// ignore_for_file: no_leading_underscores_for_library_prefixes +// ignore_for_file: no_leading_underscores_for_library_prefixes, must_be_immutable import 'dart:async' as _i8; import 'package:dartz/dartz.dart' as _i2; import 'package:fixnum/fixnum.dart' as _i11; import 'package:in_app_purchase/in_app_purchase.dart' as _i28; -import 'package:internet_connection_checker/internet_connection_checker.dart' - as _i27; +import 'package:internet_connection_checker/internet_connection_checker.dart' as _i27; import 'package:local_auth/local_auth.dart' as _i23; import 'package:mobx/mobx.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; import 'package:pylons_wallet/ipc/models/sdk_ipc_response.dart' as _i3; import 'package:pylons_wallet/model/balance.dart' as _i15; -import 'package:pylons_wallet/model/execution_list_by_recipe_response.dart' - as _i16; +import 'package:pylons_wallet/model/execution_list_by_recipe_response.dart' as _i16; import 'package:pylons_wallet/model/export.dart' as _i17; import 'package:pylons_wallet/model/nft.dart' as _i30; import 'package:pylons_wallet/model/nft_ownership_history.dart' as _i24; import 'package:pylons_wallet/model/notification_message.dart' as _i29; import 'package:pylons_wallet/model/pick_image_model.dart' as _i22; -import 'package:pylons_wallet/model/stripe_get_login_based_address.dart' - as _i20; +import 'package:pylons_wallet/model/stripe_get_login_based_address.dart' as _i20; import 'package:pylons_wallet/model/stripe_loginlink_request.dart' as _i19; import 'package:pylons_wallet/model/stripe_loginlink_response.dart' as _i18; import 'package:pylons_wallet/model/transaction.dart' as _i25; import 'package:pylons_wallet/model/transaction_failure_model.dart' as _i33; import 'package:pylons_wallet/model/wallet_creation_model.dart' as _i32; -import 'package:pylons_wallet/modules/cosmos.tx.v1beta1/module/client/cosmos/base/abci/v1beta1/abci.pb.dart' - as _i4; -import 'package:pylons_wallet/modules/cosmos.tx.v1beta1/module/export.dart' - as _i14; -import 'package:pylons_wallet/modules/Pylonstech.pylons.pylons/module/export.dart' - as _i10; -import 'package:pylons_wallet/pages/home/currency_screen/model/ibc_coins.dart' - as _i34; -import 'package:pylons_wallet/pages/home/currency_screen/model/ibc_trace_model.dart' - as _i21; -import 'package:pylons_wallet/services/data_stores/remote_data_store.dart' - as _i12; +import 'package:pylons_wallet/modules/cosmos.tx.v1beta1/module/client/cosmos/base/abci/v1beta1/abci.pb.dart' as _i4; +import 'package:pylons_wallet/modules/cosmos.tx.v1beta1/module/export.dart' as _i14; +import 'package:pylons_wallet/modules/Pylonstech.pylons.pylons/module/export.dart' as _i10; +import 'package:pylons_wallet/pages/home/currency_screen/model/ibc_coins.dart' as _i34; +import 'package:pylons_wallet/pages/home/currency_screen/model/ibc_trace_model.dart' as _i21; +import 'package:pylons_wallet/services/data_stores/remote_data_store.dart' as _i12; import 'package:pylons_wallet/services/repository/repository.dart' as _i13; import 'package:pylons_wallet/stores/models/transaction_response.dart' as _i31; import 'package:pylons_wallet/stores/wallet_store.dart' as _i7; import 'package:pylons_wallet/utils/backup/common/backup_model.dart' as _i26; import 'package:pylons_wallet/utils/enums.dart' as _i35; import 'package:pylons_wallet/utils/failure/failure.dart' as _i9; -import 'package:transaction_signing_gateway/transaction_signing_gateway.dart' - as _i6; +import 'package:transaction_signing_gateway/transaction_signing_gateway.dart' as _i6; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -71,8 +61,7 @@ class _FakeEither_0 extends _i1.SmartFake implements _i2.Either { ); } -class _FakeSdkIpcResponse_1 extends _i1.SmartFake - implements _i3.SdkIpcResponse { +class _FakeSdkIpcResponse_1 extends _i1.SmartFake implements _i3.SdkIpcResponse { _FakeSdkIpcResponse_1( Object parent, Invocation parentInvocation, @@ -102,8 +91,7 @@ class _FakeObservable_3 extends _i1.SmartFake implements _i5.Observable { ); } -class _FakeAccountPublicInfo_4 extends _i1.SmartFake - implements _i6.AccountPublicInfo { +class _FakeAccountPublicInfo_4 extends _i1.SmartFake implements _i6.AccountPublicInfo { _FakeAccountPublicInfo_4( Object parent, Invocation parentInvocation, @@ -134,9 +122,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { userName, ], ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>.value( - _FakeEither_0<_i9.Failure, _i6.AccountPublicInfo>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>.value(_FakeEither_0<_i9.Failure, _i6.AccountPublicInfo>( this, Invocation.method( #importAlanWallet, @@ -147,16 +133,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>); + @override - _i8.Future<_i3.SdkIpcResponse> createCookbook( - Map? json) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> createCookbook(Map? json) => (super.noSuchMethod( Invocation.method( #createCookbook, [json], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #createCookbook, @@ -164,16 +148,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> createRecipe( - Map? json) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> createRecipe(Map? json) => (super.noSuchMethod( Invocation.method( #createRecipe, [json], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #createRecipe, @@ -181,16 +163,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse<_i10.Execution>> executeRecipe( - Map? json) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse<_i10.Execution>> executeRecipe(Map? json) => (super.noSuchMethod( Invocation.method( #executeRecipe, [json], ), - returnValue: _i8.Future<_i3.SdkIpcResponse<_i10.Execution>>.value( - _FakeSdkIpcResponse_1<_i10.Execution>( + returnValue: _i8.Future<_i3.SdkIpcResponse<_i10.Execution>>.value(_FakeSdkIpcResponse_1<_i10.Execution>( this, Invocation.method( #executeRecipe, @@ -198,16 +178,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse<_i10.Execution>>); + @override - _i8.Future<_i3.SdkIpcResponse> createTrade( - Map? json) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> createTrade(Map? json) => (super.noSuchMethod( Invocation.method( #createTrade, [json], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #createTrade, @@ -215,16 +193,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> fulfillTrade( - Map? json) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> fulfillTrade(Map? json) => (super.noSuchMethod( Invocation.method( #fulfillTrade, [json], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #fulfillTrade, @@ -232,6 +208,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future<_i4.TxResponse> getTxs(String? txHash) => (super.noSuchMethod( Invocation.method( @@ -246,24 +223,25 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i4.TxResponse>); + @override - _i8.Future<_i10.Cookbook?> getCookbookById(String? cookbookID) => - (super.noSuchMethod( + _i8.Future<_i10.Cookbook?> getCookbookById(String? cookbookID) => (super.noSuchMethod( Invocation.method( #getCookbookById, [cookbookID], ), returnValue: _i8.Future<_i10.Cookbook?>.value(), ) as _i8.Future<_i10.Cookbook?>); + @override - _i8.Future> getCookbooksByCreator(String? creator) => - (super.noSuchMethod( + _i8.Future> getCookbooksByCreator(String? creator) => (super.noSuchMethod( Invocation.method( #getCookbooksByCreator, [creator], ), returnValue: _i8.Future>.value(<_i10.Cookbook>[]), ) as _i8.Future>); + @override _i8.Future<_i10.Trade?> getTradeByID(_i11.Int64? ID) => (super.noSuchMethod( Invocation.method( @@ -272,15 +250,16 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future<_i10.Trade?>.value(), ) as _i8.Future<_i10.Trade?>); + @override - _i8.Future> getTrades(String? creator) => - (super.noSuchMethod( + _i8.Future> getTrades(String? creator) => (super.noSuchMethod( Invocation.method( #getTrades, [creator], ), returnValue: _i8.Future>.value(<_i10.Trade>[]), ) as _i8.Future>); + @override _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>> getRecipe( String? cookbookID, @@ -294,8 +273,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { recipeID, ], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>.value( - _FakeEither_0<_i9.Failure, _i10.Recipe>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>.value(_FakeEither_0<_i9.Failure, _i10.Recipe>( this, Invocation.method( #getRecipe, @@ -306,6 +284,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>); + @override _i8.Future<_i10.Item?> getItem( String? cookbookID, @@ -321,33 +300,34 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future<_i10.Item?>.value(), ) as _i8.Future<_i10.Item?>); + @override - _i8.Future> getItemsByOwner(String? owner) => - (super.noSuchMethod( + _i8.Future> getItemsByOwner(String? owner) => (super.noSuchMethod( Invocation.method( #getItemsByOwner, [owner], ), returnValue: _i8.Future>.value(<_i10.Item>[]), ) as _i8.Future>); + @override - _i8.Future getAccountNameByAddress(String? address) => - (super.noSuchMethod( + _i8.Future getAccountNameByAddress(String? address) => (super.noSuchMethod( Invocation.method( #getAccountNameByAddress, [address], ), returnValue: _i8.Future.value(''), ) as _i8.Future); + @override - _i8.Future getAccountAddressByName(String? username) => - (super.noSuchMethod( + _i8.Future getAccountAddressByName(String? username) => (super.noSuchMethod( Invocation.method( #getAccountAddressByName, [username], ), returnValue: _i8.Future.value(''), ) as _i8.Future); + @override _i8.Future> getRecipeExecutions( String? cookbookID, @@ -363,17 +343,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future>.value(<_i10.Execution>[]), ) as _i8.Future>); + @override - _i8.Future<_i2.Either<_i9.Failure, int>> getFaucetCoin( - {String? denom = r''}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, int>> getFaucetCoin({String? denom = r''}) => (super.noSuchMethod( Invocation.method( #getFaucetCoin, [], {#denom: denom}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value( - _FakeEither_0<_i9.Failure, int>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value(_FakeEither_0<_i9.Failure, int>( this, Invocation.method( #getFaucetCoin, @@ -382,6 +360,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, int>>); + @override _i8.Future isAccountExists(String? username) => (super.noSuchMethod( Invocation.method( @@ -390,16 +369,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future.value(false), ) as _i8.Future); + @override - _i8.Future<_i3.SdkIpcResponse> updateRecipe( - Map? jsonMap) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> updateRecipe(Map? jsonMap) => (super.noSuchMethod( Invocation.method( #updateRecipe, [jsonMap], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #updateRecipe, @@ -407,19 +384,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future< - _i2.Either<_i9.Failure, _i6.AccountPublicInfo>> importPylonsAccount( - {required String? mnemonic}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>> importPylonsAccount({required String? mnemonic}) => (super.noSuchMethod( Invocation.method( #importPylonsAccount, [], {#mnemonic: mnemonic}, ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>.value( - _FakeEither_0<_i9.Failure, _i6.AccountPublicInfo>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>.value(_FakeEither_0<_i9.Failure, _i6.AccountPublicInfo>( this, Invocation.method( #importPylonsAccount, @@ -428,16 +401,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i6.AccountPublicInfo>>); + @override - _i8.Future<_i3.SdkIpcResponse> updateCookbook( - Map? jsonMap) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> updateCookbook(Map? jsonMap) => (super.noSuchMethod( Invocation.method( #updateCookbook, [jsonMap], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #updateCookbook, @@ -445,14 +416,14 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future<_i3.SdkIpcResponse> getProfile() => (super.noSuchMethod( Invocation.method( #getProfile, [], ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getProfile, @@ -460,6 +431,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future signPureMessage(String? message) => (super.noSuchMethod( Invocation.method( @@ -468,26 +440,24 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future.value(''), ) as _i8.Future); + @override - _i8.Future> getRecipesByCookbookID(String? cookbookID) => - (super.noSuchMethod( + _i8.Future> getRecipesByCookbookID(String? cookbookID) => (super.noSuchMethod( Invocation.method( #getRecipesByCookbookID, [cookbookID], ), returnValue: _i8.Future>.value(<_i10.Recipe>[]), ) as _i8.Future>); + @override - _i8.Future<_i3.SdkIpcResponse> getAllRecipesByCookbookId( - {required String? cookbookId}) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> getAllRecipesByCookbookId({required String? cookbookId}) => (super.noSuchMethod( Invocation.method( #getAllRecipesByCookbookId, [], {#cookbookId: cookbookId}, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getAllRecipesByCookbookId, @@ -496,17 +466,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> getCookbookByIdForSDK( - {required String? cookbookId}) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> getCookbookByIdForSDK({required String? cookbookId}) => (super.noSuchMethod( Invocation.method( #getCookbookByIdForSDK, [], {#cookbookId: cookbookId}, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getCookbookByIdForSDK, @@ -515,6 +483,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i5.Observable getStateUpdatedFlag() => (super.noSuchMethod( Invocation.method( @@ -529,6 +498,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), ), ) as _i5.Observable); + @override void setStateUpdatedFlag({required bool? flag}) => super.noSuchMethod( Invocation.method( @@ -538,6 +508,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValueForMissingStub: null, ); + @override _i8.Future<_i3.SdkIpcResponse> getExecutionByRecipeId({ required String? cookbookId, @@ -552,8 +523,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { #recipeId: recipeId, }, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getExecutionByRecipeId, @@ -565,6 +535,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future<_i3.SdkIpcResponse> getRecipeByIdForSDK({ required String? cookbookId, @@ -579,8 +550,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { #recipeId: recipeId, }, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getRecipeByIdForSDK, @@ -592,6 +562,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future<_i3.SdkIpcResponse> getItemByIdForSDK({ required String? cookBookId, @@ -606,8 +577,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { #itemId: itemId, }, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getItemByIdForSDK, @@ -619,17 +589,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> getItemListByOwner( - {required String? owner}) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> getItemListByOwner({required String? owner}) => (super.noSuchMethod( Invocation.method( #getItemListByOwner, [], {#owner: owner}, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getItemListByOwner, @@ -638,17 +606,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> getExecutionBasedOnId( - {required String? id}) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> getExecutionBasedOnId({required String? id}) => (super.noSuchMethod( Invocation.method( #getExecutionBasedOnId, [], {#id: id}, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getExecutionBasedOnId, @@ -657,17 +623,15 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override - _i8.Future<_i3.SdkIpcResponse> getTradesForSDK( - {required String? creator}) => - (super.noSuchMethod( + _i8.Future<_i3.SdkIpcResponse> getTradesForSDK({required String? creator}) => (super.noSuchMethod( Invocation.method( #getTradesForSDK, [], {#creator: creator}, ), - returnValue: _i8.Future<_i3.SdkIpcResponse>.value( - _FakeSdkIpcResponse_1( + returnValue: _i8.Future<_i3.SdkIpcResponse>.value(_FakeSdkIpcResponse_1( this, Invocation.method( #getTradesForSDK, @@ -676,6 +640,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), )), ) as _i8.Future<_i3.SdkIpcResponse>); + @override _i8.Future deleteAccounts() => (super.noSuchMethod( Invocation.method( @@ -684,10 +649,9 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), returnValue: _i8.Future.value(false), ) as _i8.Future); + @override - _i2.Either<_i9.Failure, bool> saveInitialLink( - {required String? initialLink}) => - (super.noSuchMethod( + _i2.Either<_i9.Failure, bool> saveInitialLink({required String? initialLink}) => (super.noSuchMethod( Invocation.method( #saveInitialLink, [], @@ -702,6 +666,7 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override _i2.Either<_i9.Failure, String> getInitialLink() => (super.noSuchMethod( Invocation.method( @@ -716,48 +681,41 @@ class MockWalletsStore extends _i1.Mock implements _i7.WalletsStore { ), ), ) as _i2.Either<_i9.Failure, String>); + + @override + _i8.Future<_i2.Either<_i9.Failure, String>> sendGoogleInAppPurchaseCoinsRequest(_i12.GoogleInAppPurchaseModel? googleInAppPurchaseModel) => (super.noSuchMethod( + Invocation.method( + #sendGoogleInAppPurchaseCoinsRequest, + [googleInAppPurchaseModel], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( + this, + Invocation.method( + #sendGoogleInAppPurchaseCoinsRequest, + [googleInAppPurchaseModel], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> - sendGoogleInAppPurchaseCoinsRequest( - _i12.GoogleInAppPurchaseModel? googleInAppPurchaseModel) => - (super.noSuchMethod( - Invocation.method( - #sendGoogleInAppPurchaseCoinsRequest, - [googleInAppPurchaseModel], - ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( - this, - Invocation.method( - #sendGoogleInAppPurchaseCoinsRequest, - [googleInAppPurchaseModel], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); - @override - _i8.Future<_i2.Either<_i9.Failure, String>> - sendAppleInAppPurchaseCoinsRequest( - _i12.AppleInAppPurchaseModel? appleInAppPurchaseModel) => - (super.noSuchMethod( - Invocation.method( - #sendAppleInAppPurchaseCoinsRequest, - [appleInAppPurchaseModel], - ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( - this, - Invocation.method( - #sendAppleInAppPurchaseCoinsRequest, - [appleInAppPurchaseModel], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + _i8.Future<_i2.Either<_i9.Failure, String>> sendAppleInAppPurchaseCoinsRequest(_i12.AppleInAppPurchaseModel? appleInAppPurchaseModel) => (super.noSuchMethod( + Invocation.method( + #sendAppleInAppPurchaseCoinsRequest, + [appleInAppPurchaseModel], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( + this, + Invocation.method( + #sendAppleInAppPurchaseCoinsRequest, + [appleInAppPurchaseModel], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); } /// A class which mocks [AccountPublicInfo]. /// /// See the documentation for Mockito's code generation for more information. -// ignore: must_be_immutable class MockAccountPublicInfo extends _i1.Mock implements _i6.AccountPublicInfo { MockAccountPublicInfo() { _i1.throwOnMissingStub(this); @@ -768,26 +726,31 @@ class MockAccountPublicInfo extends _i1.Mock implements _i6.AccountPublicInfo { Invocation.getter(#name), returnValue: '', ) as String); + @override String get publicAddress => (super.noSuchMethod( Invocation.getter(#publicAddress), returnValue: '', ) as String); + @override String get accountId => (super.noSuchMethod( Invocation.getter(#accountId), returnValue: '', ) as String); + @override String get chainId => (super.noSuchMethod( Invocation.getter(#chainId), returnValue: '', ) as String); + @override List get props => (super.noSuchMethod( Invocation.getter(#props), returnValue: [], ) as List); + @override _i6.AccountPublicInfo copyWith({ String? name, @@ -847,8 +810,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #recipeId: recipeId, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>.value( - _FakeEither_0<_i9.Failure, _i10.Recipe>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>.value(_FakeEither_0<_i9.Failure, _i10.Recipe>( this, Invocation.method( #getRecipe, @@ -860,17 +822,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Recipe>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> getUsername( - {required String? address}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> getUsername({required String? address}) => (super.noSuchMethod( Invocation.method( #getUsername, [], {#address: address}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #getUsername, @@ -879,20 +839,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future< - _i2.Either<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>> getTx( - {required String? hash}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>> getTx({required String? hash}) => (super.noSuchMethod( Invocation.method( #getTx, [], {#hash: hash}, ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>>.value( - _FakeEither_0<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>>.value(_FakeEither_0<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>( this, Invocation.method( #getTx, @@ -900,39 +855,33 @@ class MockRepository extends _i1.Mock implements _i13.Repository { {#hash: hash}, ), )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>> - getRecipesBasedOnCookBookId({required String? cookBookId}) => - (super.noSuchMethod( - Invocation.method( - #getRecipesBasedOnCookBookId, - [], - {#cookBookId: cookBookId}, - ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>>.value( - _FakeEither_0<_i9.Failure, List<_i10.Recipe>>( - this, - Invocation.method( - #getRecipesBasedOnCookBookId, - [], - {#cookBookId: cookBookId}, - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i10.Cookbook>> getCookbookBasedOnId( - {required String? cookBookId}) => - (super.noSuchMethod( + ) as _i8.Future<_i2.Either<_i9.Failure, _i2.Tuple2<_i14.Tx, _i4.TxResponse?>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>> getRecipesBasedOnCookBookId({required String? cookBookId}) => (super.noSuchMethod( + Invocation.method( + #getRecipesBasedOnCookBookId, + [], + {#cookBookId: cookBookId}, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>>.value(_FakeEither_0<_i9.Failure, List<_i10.Recipe>>( + this, + Invocation.method( + #getRecipesBasedOnCookBookId, + [], + {#cookBookId: cookBookId}, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Recipe>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i10.Cookbook>> getCookbookBasedOnId({required String? cookBookId}) => (super.noSuchMethod( Invocation.method( #getCookbookBasedOnId, [], {#cookBookId: cookBookId}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Cookbook>>.value( - _FakeEither_0<_i9.Failure, _i10.Cookbook>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Cookbook>>.value(_FakeEither_0<_i9.Failure, _i10.Cookbook>( this, Invocation.method( #getCookbookBasedOnId, @@ -941,16 +890,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Cookbook>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> getAddressBasedOnUsername( - String? username) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> getAddressBasedOnUsername(String? username) => (super.noSuchMethod( Invocation.method( #getAddressBasedOnUsername, [username], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #getAddressBasedOnUsername, @@ -958,17 +905,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i15.Balance>>> getBalance( - String? address) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, List<_i15.Balance>>> getBalance(String? address) => (super.noSuchMethod( Invocation.method( #getBalance, [address], ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, List<_i15.Balance>>>.value( - _FakeEither_0<_i9.Failure, List<_i15.Balance>>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i15.Balance>>>.value(_FakeEither_0<_i9.Failure, List<_i15.Balance>>( this, Invocation.method( #getBalance, @@ -976,37 +920,34 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, List<_i15.Balance>>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i16.ExecutionListByRecipeResponse>> - getExecutionsByRecipeId({ + _i8.Future<_i2.Either<_i9.Failure, _i16.ExecutionListByRecipeResponse>> getExecutionsByRecipeId({ required String? cookBookId, required String? recipeId, }) => - (super.noSuchMethod( - Invocation.method( - #getExecutionsByRecipeId, - [], - { - #cookBookId: cookBookId, - #recipeId: recipeId, - }, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i16.ExecutionListByRecipeResponse>>.value( - _FakeEither_0<_i9.Failure, _i16.ExecutionListByRecipeResponse>( - this, - Invocation.method( - #getExecutionsByRecipeId, - [], - { - #cookBookId: cookBookId, - #recipeId: recipeId, - }, - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i16.ExecutionListByRecipeResponse>>); + (super.noSuchMethod( + Invocation.method( + #getExecutionsByRecipeId, + [], + { + #cookBookId: cookBookId, + #recipeId: recipeId, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i16.ExecutionListByRecipeResponse>>.value(_FakeEither_0<_i9.Failure, _i16.ExecutionListByRecipeResponse>( + this, + Invocation.method( + #getExecutionsByRecipeId, + [], + { + #cookBookId: cookBookId, + #recipeId: recipeId, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i16.ExecutionListByRecipeResponse>>); + @override _i8.Future<_i2.Either<_i9.Failure, int>> getFaucetCoin({ required String? address, @@ -1021,8 +962,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #denom: denom, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value( - _FakeEither_0<_i9.Failure, int>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value(_FakeEither_0<_i9.Failure, int>( this, Invocation.method( #getFaucetCoin, @@ -1034,6 +974,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, int>>); + @override _i8.Future<_i2.Either<_i9.Failure, _i10.Item>> getItem({ required String? cookBookId, @@ -1048,8 +989,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #itemId: itemId, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Item>>.value( - _FakeEither_0<_i9.Failure, _i10.Item>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Item>>.value(_FakeEither_0<_i9.Failure, _i10.Item>( this, Invocation.method( #getItem, @@ -1061,17 +1001,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Item>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Item>>> getListItemByOwner( - {required String? owner}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, List<_i10.Item>>> getListItemByOwner({required String? owner}) => (super.noSuchMethod( Invocation.method( #getListItemByOwner, [], {#owner: owner}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i10.Item>>>.value( - _FakeEither_0<_i9.Failure, List<_i10.Item>>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i10.Item>>>.value(_FakeEither_0<_i9.Failure, List<_i10.Item>>( this, Invocation.method( #getListItemByOwner, @@ -1080,17 +1018,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Item>>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i10.Execution>> getExecutionBasedOnId( - {required String? id}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i10.Execution>> getExecutionBasedOnId({required String? id}) => (super.noSuchMethod( Invocation.method( #getExecutionBasedOnId, [], {#id: id}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Execution>>.value( - _FakeEither_0<_i9.Failure, _i10.Execution>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Execution>>.value(_FakeEither_0<_i9.Failure, _i10.Execution>( this, Invocation.method( #getExecutionBasedOnId, @@ -1099,18 +1035,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Execution>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Trade>>> getTradesBasedOnCreator( - {required String? creator}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, List<_i10.Trade>>> getTradesBasedOnCreator({required String? creator}) => (super.noSuchMethod( Invocation.method( #getTradesBasedOnCreator, [], {#creator: creator}, ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Trade>>>.value( - _FakeEither_0<_i9.Failure, List<_i10.Trade>>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i10.Trade>>>.value(_FakeEither_0<_i9.Failure, List<_i10.Trade>>( this, Invocation.method( #getTradesBasedOnCreator, @@ -1119,215 +1052,161 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Trade>>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i6.PrivateAccountCredentials>> - getPrivateCredentials({ + _i8.Future<_i2.Either<_i9.Failure, _i6.PrivateAccountCredentials>> getPrivateCredentials({ required String? mnemonic, required String? username, }) => - (super.noSuchMethod( - Invocation.method( - #getPrivateCredentials, - [], - { - #mnemonic: mnemonic, - #username: username, - }, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i6.PrivateAccountCredentials>>.value( - _FakeEither_0<_i9.Failure, _i6.PrivateAccountCredentials>( - this, - Invocation.method( - #getPrivateCredentials, - [], - { - #mnemonic: mnemonic, - #username: username, - }, - ), - )), - ) as _i8 - .Future<_i2.Either<_i9.Failure, _i6.PrivateAccountCredentials>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>> - CreatePaymentIntent(_i17.StripeCreatePaymentIntentRequest? req) => - (super.noSuchMethod( - Invocation.method( - #CreatePaymentIntent, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeCreatePaymentIntentResponse>>.value( - _FakeEither_0<_i9.Failure, - _i17.StripeCreatePaymentIntentResponse>( - this, - Invocation.method( - #CreatePaymentIntent, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePaymentReceiptResponse>> - GeneratePaymentReceipt(_i17.StripeGeneratePaymentReceiptRequest? req) => - (super.noSuchMethod( - Invocation.method( - #GeneratePaymentReceipt, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGeneratePaymentReceiptResponse>>.value( - _FakeEither_0<_i9.Failure, - _i17.StripeGeneratePaymentReceiptResponse>( - this, - Invocation.method( - #GeneratePaymentReceipt, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGeneratePaymentReceiptResponse>>); - @override - _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeGenerateRegistrationTokenResponse>> - GenerateRegistrationToken(String? address) => (super.noSuchMethod( - Invocation.method( - #GenerateRegistrationToken, - [address], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGenerateRegistrationTokenResponse>>.value( - _FakeEither_0<_i9.Failure, - _i17.StripeGenerateRegistrationTokenResponse>( - this, - Invocation.method( - #GenerateRegistrationToken, - [address], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGenerateRegistrationTokenResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeRegisterAccountResponse>> - RegisterAccount(_i17.StripeRegisterAccountRequest? req) => - (super.noSuchMethod( - Invocation.method( - #RegisterAccount, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeRegisterAccountResponse>>.value( - _FakeEither_0<_i9.Failure, _i17.StripeRegisterAccountResponse>( - this, - Invocation.method( - #RegisterAccount, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeRegisterAccountResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>> - GenerateUpdateToken(String? address) => (super.noSuchMethod( - Invocation.method( - #GenerateUpdateToken, - [address], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGenerateUpdateTokenResponse>>.value( - _FakeEither_0<_i9.Failure, - _i17.StripeGenerateUpdateTokenResponse>( - this, - Invocation.method( - #GenerateUpdateToken, - [address], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>> - UpdateAccount(_i17.StripeUpdateAccountRequest? req) => - (super.noSuchMethod( - Invocation.method( - #UpdateAccount, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeUpdateAccountResponse>>.value( - _FakeEither_0<_i9.Failure, _i17.StripeUpdateAccountResponse>( - this, - Invocation.method( - #UpdateAccount, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>> - getAccountLinkBasedOnUpdateToken(_i17.StripeUpdateAccountRequest? req) => - (super.noSuchMethod( - Invocation.method( - #getAccountLinkBasedOnUpdateToken, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeUpdateAccountResponse>>.value( - _FakeEither_0<_i9.Failure, _i17.StripeUpdateAccountResponse>( - this, - Invocation.method( - #getAccountLinkBasedOnUpdateToken, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>> - GeneratePayoutToken(_i17.StripeGeneratePayoutTokenRequest? req) => - (super.noSuchMethod( - Invocation.method( - #GeneratePayoutToken, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i17.StripeGeneratePayoutTokenResponse>>.value( - _FakeEither_0<_i9.Failure, - _i17.StripeGeneratePayoutTokenResponse>( - this, - Invocation.method( - #GeneratePayoutToken, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>>); - @override - _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeAccountLinkResponse>> GetAccountLink( - _i17.StripeAccountLinkRequest? req) => (super.noSuchMethod( + Invocation.method( + #getPrivateCredentials, + [], + { + #mnemonic: mnemonic, + #username: username, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i6.PrivateAccountCredentials>>.value(_FakeEither_0<_i9.Failure, _i6.PrivateAccountCredentials>( + this, + Invocation.method( + #getPrivateCredentials, + [], + { + #mnemonic: mnemonic, + #username: username, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i6.PrivateAccountCredentials>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>> CreatePaymentIntent(_i17.StripeCreatePaymentIntentRequest? req) => (super.noSuchMethod( + Invocation.method( + #CreatePaymentIntent, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>( + this, + Invocation.method( + #CreatePaymentIntent, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeCreatePaymentIntentResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePaymentReceiptResponse>> GeneratePaymentReceipt(_i17.StripeGeneratePaymentReceiptRequest? req) => (super.noSuchMethod( + Invocation.method( + #GeneratePaymentReceipt, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePaymentReceiptResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeGeneratePaymentReceiptResponse>( + this, + Invocation.method( + #GeneratePaymentReceipt, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePaymentReceiptResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateRegistrationTokenResponse>> GenerateRegistrationToken(String? address) => (super.noSuchMethod( + Invocation.method( + #GenerateRegistrationToken, + [address], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateRegistrationTokenResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeGenerateRegistrationTokenResponse>( + this, + Invocation.method( + #GenerateRegistrationToken, + [address], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateRegistrationTokenResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeRegisterAccountResponse>> RegisterAccount(_i17.StripeRegisterAccountRequest? req) => (super.noSuchMethod( + Invocation.method( + #RegisterAccount, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeRegisterAccountResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeRegisterAccountResponse>( + this, + Invocation.method( + #RegisterAccount, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeRegisterAccountResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>> GenerateUpdateToken(String? address) => (super.noSuchMethod( + Invocation.method( + #GenerateUpdateToken, + [address], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>( + this, + Invocation.method( + #GenerateUpdateToken, + [address], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGenerateUpdateTokenResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>> UpdateAccount(_i17.StripeUpdateAccountRequest? req) => (super.noSuchMethod( + Invocation.method( + #UpdateAccount, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeUpdateAccountResponse>( + this, + Invocation.method( + #UpdateAccount, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>> getAccountLinkBasedOnUpdateToken(_i17.StripeUpdateAccountRequest? req) => (super.noSuchMethod( + Invocation.method( + #getAccountLinkBasedOnUpdateToken, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeUpdateAccountResponse>( + this, + Invocation.method( + #getAccountLinkBasedOnUpdateToken, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeUpdateAccountResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>> GeneratePayoutToken(_i17.StripeGeneratePayoutTokenRequest? req) => (super.noSuchMethod( + Invocation.method( + #GeneratePayoutToken, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>( + this, + Invocation.method( + #GeneratePayoutToken, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeGeneratePayoutTokenResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i17.StripeAccountLinkResponse>> GetAccountLink(_i17.StripeAccountLinkRequest? req) => (super.noSuchMethod( Invocation.method( #GetAccountLink, [req], ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, _i17.StripeAccountLinkResponse>>.value( - _FakeEither_0<_i9.Failure, _i17.StripeAccountLinkResponse>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i17.StripeAccountLinkResponse>>.value(_FakeEither_0<_i9.Failure, _i17.StripeAccountLinkResponse>( this, Invocation.method( #GetAccountLink, @@ -1335,18 +1214,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i17.StripeAccountLinkResponse>>); + @override - _i8.Future< - _i2.Either<_i9.Failure, _i18.StripeLoginLinkResponse>> stripeGetLoginLink( - _i19.StripeLoginLinkRequest? req) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i18.StripeLoginLinkResponse>> stripeGetLoginLink(_i19.StripeLoginLinkRequest? req) => (super.noSuchMethod( Invocation.method( #stripeGetLoginLink, [req], ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, _i18.StripeLoginLinkResponse>>.value( - _FakeEither_0<_i9.Failure, _i18.StripeLoginLinkResponse>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i18.StripeLoginLinkResponse>>.value(_FakeEither_0<_i9.Failure, _i18.StripeLoginLinkResponse>( this, Invocation.method( #stripeGetLoginLink, @@ -1354,41 +1229,30 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i18.StripeLoginLinkResponse>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i20.StripeGetLoginBasedOnAddressResponse>> - getLoginLinkBasedOnAddress( - _i20.StripeGetLoginBasedOnAddressRequest? req) => - (super.noSuchMethod( - Invocation.method( - #getLoginLinkBasedOnAddress, - [req], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - _i20.StripeGetLoginBasedOnAddressResponse>>.value( - _FakeEither_0<_i9.Failure, - _i20.StripeGetLoginBasedOnAddressResponse>( - this, - Invocation.method( - #getLoginLinkBasedOnAddress, - [req], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, - _i20.StripeGetLoginBasedOnAddressResponse>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i21.IBCTraceModel>> getIBCHashTrace( - {required String? ibcHash}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i20.StripeGetLoginBasedOnAddressResponse>> getLoginLinkBasedOnAddress(_i20.StripeGetLoginBasedOnAddressRequest? req) => (super.noSuchMethod( + Invocation.method( + #getLoginLinkBasedOnAddress, + [req], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i20.StripeGetLoginBasedOnAddressResponse>>.value(_FakeEither_0<_i9.Failure, _i20.StripeGetLoginBasedOnAddressResponse>( + this, + Invocation.method( + #getLoginLinkBasedOnAddress, + [req], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i20.StripeGetLoginBasedOnAddressResponse>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i21.IBCTraceModel>> getIBCHashTrace({required String? ibcHash}) => (super.noSuchMethod( Invocation.method( #getIBCHashTrace, [], {#ibcHash: ibcHash}, ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i21.IBCTraceModel>>.value( - _FakeEither_0<_i9.Failure, _i21.IBCTraceModel>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i21.IBCTraceModel>>.value(_FakeEither_0<_i9.Failure, _i21.IBCTraceModel>( this, Invocation.method( #getIBCHashTrace, @@ -1397,17 +1261,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i21.IBCTraceModel>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> doesStripeAccountExistsFromServer( - {required String? address}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> doesStripeAccountExistsFromServer({required String? address}) => (super.noSuchMethod( Invocation.method( #doesStripeAccountExistsFromServer, [], {#address: address}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #doesStripeAccountExistsFromServer, @@ -1416,9 +1278,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i2.Either<_i9.Failure, bool> getStripeAccountExistsFromLocal() => - (super.noSuchMethod( + _i2.Either<_i9.Failure, bool> getStripeAccountExistsFromLocal() => (super.noSuchMethod( Invocation.method( #getStripeAccountExistsFromLocal, [], @@ -1431,9 +1293,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future saveStripeAccountExistsLocal({required bool? isExist}) => - (super.noSuchMethod( + _i8.Future saveStripeAccountExistsLocal({required bool? isExist}) => (super.noSuchMethod( Invocation.method( #saveStripeAccountExistsLocal, [], @@ -1441,16 +1303,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), returnValue: _i8.Future.value(), ) as _i8.Future); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> pickImageFromGallery( - _i22.PickImageModel? pickImageModel) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> pickImageFromGallery(_i22.PickImageModel? pickImageModel) => (super.noSuchMethod( Invocation.method( #pickImageFromGallery, [pickImageModel], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #pickImageFromGallery, @@ -1458,6 +1318,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> saveImage({ required String? key, @@ -1472,8 +1333,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #imagePath: imagePath, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveImage, @@ -1485,9 +1345,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i2.Either<_i9.Failure, String> getImagePath(String? uri) => - (super.noSuchMethod( + _i2.Either<_i9.Failure, String> getImagePath(String? uri) => (super.noSuchMethod( Invocation.method( #getImagePath, [uri], @@ -1500,17 +1360,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, String>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveIsBannerDark( - {required bool? isBannerDark}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveIsBannerDark({required bool? isBannerDark}) => (super.noSuchMethod( Invocation.method( #saveIsBannerDark, [], {#isBannerDark: isBannerDark}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveIsBannerDark, @@ -1519,6 +1377,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i2.Either<_i9.Failure, bool> getIsBannerDark() => (super.noSuchMethod( Invocation.method( @@ -1533,17 +1392,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveEmail( - {required String? value}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveEmail({required String? value}) => (super.noSuchMethod( Invocation.method( #saveEmail, [], {#value: value}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveEmail, @@ -1552,6 +1409,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i2.Either<_i9.Failure, String> getSavedEmail() => (super.noSuchMethod( Invocation.method( @@ -1566,9 +1424,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, String>); + @override - _i2.Either<_i9.Failure, bool> saveInitialLink(String? initialLink) => - (super.noSuchMethod( + _i2.Either<_i9.Failure, bool> saveInitialLink(String? initialLink) => (super.noSuchMethod( Invocation.method( #saveInitialLink, [initialLink], @@ -1581,6 +1439,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override _i2.Either<_i9.Failure, String> getInitialLink() => (super.noSuchMethod( Invocation.method( @@ -1595,17 +1454,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, String>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveDescription( - {required String? description}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveDescription({required String? description}) => (super.noSuchMethod( Invocation.method( #saveDescription, [], {#description: description}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveDescription, @@ -1614,6 +1471,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i2.Either<_i9.Failure, String> getDescription() => (super.noSuchMethod( Invocation.method( @@ -1628,17 +1486,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, String>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveNotificationsPreference( - {required bool? notificationStatus}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveNotificationsPreference({required bool? notificationStatus}) => (super.noSuchMethod( Invocation.method( #saveNotificationsPreference, [], {#notificationStatus: notificationStatus}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveNotificationsPreference, @@ -1647,9 +1503,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i2.Either<_i9.Failure, bool> getNotificationsPreference() => - (super.noSuchMethod( + _i2.Either<_i9.Failure, bool> getNotificationsPreference() => (super.noSuchMethod( Invocation.method( #getNotificationsPreference, [], @@ -1662,17 +1518,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveNetworkEnvironmentPreference( - {required String? networkEnvironment}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveNetworkEnvironmentPreference({required String? networkEnvironment}) => (super.noSuchMethod( Invocation.method( #saveNetworkEnvironmentPreference, [], {#networkEnvironment: networkEnvironment}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveNetworkEnvironmentPreference, @@ -1681,9 +1535,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i2.Either<_i9.Failure, String> getNetworkEnvironmentPreference() => - (super.noSuchMethod( + _i2.Either<_i9.Failure, String> getNetworkEnvironmentPreference() => (super.noSuchMethod( Invocation.method( #getNetworkEnvironmentPreference, [], @@ -1696,16 +1550,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, String>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> saveImageInLocalDirectory( - String? imagePath) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> saveImageInLocalDirectory(String? imagePath) => (super.noSuchMethod( Invocation.method( #saveImageInLocalDirectory, [imagePath], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #saveImageInLocalDirectory, @@ -1713,15 +1565,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveMnemonic(String? mnemonics) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveMnemonic(String? mnemonics) => (super.noSuchMethod( Invocation.method( #saveMnemonic, [mnemonics], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveMnemonic, @@ -1729,48 +1580,44 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> getMnemonic() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> getMnemonic() => (super.noSuchMethod( Invocation.method( #getMnemonic, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #getMnemonic, [], ), )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>> isBiometricAvailable() => (super.noSuchMethod( + Invocation.method( + #isBiometricAvailable, + [], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>>.value(_FakeEither_0<_i9.Failure, _i23.BiometricType>( + this, + Invocation.method( + #isBiometricAvailable, + [], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>> - isBiometricAvailable() => (super.noSuchMethod( - Invocation.method( - #isBiometricAvailable, - [], - ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>>.value( - _FakeEither_0<_i9.Failure, _i23.BiometricType>( - this, - Invocation.method( - #isBiometricAvailable, - [], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, _i23.BiometricType>>); - @override - _i8.Future<_i2.Either<_i9.Failure, bool>> authenticate() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> authenticate() => (super.noSuchMethod( Invocation.method( #authenticate, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #authenticate, @@ -1778,15 +1625,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, void>> setApplicationDirectory() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, void>> setApplicationDirectory() => (super.noSuchMethod( Invocation.method( #setApplicationDirectory, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value( - _FakeEither_0<_i9.Failure, void>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value(_FakeEither_0<_i9.Failure, void>( this, Invocation.method( #setApplicationDirectory, @@ -1794,17 +1640,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, void>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveDefaultSecurityBiometric( - {required bool? biometricEnabled}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveDefaultSecurityBiometric({required bool? biometricEnabled}) => (super.noSuchMethod( Invocation.method( #saveDefaultSecurityBiometric, [], {#biometricEnabled: biometricEnabled}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveDefaultSecurityBiometric, @@ -1813,6 +1657,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i2.Either<_i9.Failure, bool> getSecurityBiometric() => (super.noSuchMethod( Invocation.method( @@ -1827,17 +1672,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveBiometricLogin( - {required bool? biometricEnabled}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveBiometricLogin({required bool? biometricEnabled}) => (super.noSuchMethod( Invocation.method( #saveBiometricLogin, [], {#biometricEnabled: biometricEnabled}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveBiometricLogin, @@ -1846,6 +1689,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i2.Either<_i9.Failure, bool> getBiometricLogin() => (super.noSuchMethod( Invocation.method( @@ -1860,17 +1704,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveBiometricTransaction( - {required bool? biometricEnabled}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> saveBiometricTransaction({required bool? biometricEnabled}) => (super.noSuchMethod( Invocation.method( #saveBiometricTransaction, [], {#biometricEnabled: biometricEnabled}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveBiometricTransaction, @@ -1879,9 +1721,9 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i2.Either<_i9.Failure, bool> getBiometricTransaction() => - (super.noSuchMethod( + _i2.Either<_i9.Failure, bool> getBiometricTransaction() => (super.noSuchMethod( Invocation.method( #getBiometricTransaction, [], @@ -1894,100 +1736,86 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), ), ) as _i2.Either<_i9.Failure, bool>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>> - getNftOwnershipHistory({ + _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>> getNftOwnershipHistory({ required String? itemId, required String? cookBookId, }) => - (super.noSuchMethod( - Invocation.method( - #getNftOwnershipHistory, - [], - { - #itemId: itemId, - #cookBookId: cookBookId, - }, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - List<_i24.NftOwnershipHistory>>>.value( - _FakeEither_0<_i9.Failure, List<_i24.NftOwnershipHistory>>( - this, - Invocation.method( - #getNftOwnershipHistory, - [], - { - #itemId: itemId, - #cookBookId: cookBookId, - }, - ), - )), - ) as _i8 - .Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>> - getNftOwnershipHistoryByCookbookIdAndRecipeId({ + (super.noSuchMethod( + Invocation.method( + #getNftOwnershipHistory, + [], + { + #itemId: itemId, + #cookBookId: cookBookId, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>.value(_FakeEither_0<_i9.Failure, List<_i24.NftOwnershipHistory>>( + this, + Invocation.method( + #getNftOwnershipHistory, + [], + { + #itemId: itemId, + #cookBookId: cookBookId, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>> getNftOwnershipHistoryByCookbookIdAndRecipeId({ required String? cookBookId, required String? recipeId, }) => - (super.noSuchMethod( - Invocation.method( - #getNftOwnershipHistoryByCookbookIdAndRecipeId, - [], - { - #cookBookId: cookBookId, - #recipeId: recipeId, - }, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - List<_i24.NftOwnershipHistory>>>.value( - _FakeEither_0<_i9.Failure, List<_i24.NftOwnershipHistory>>( - this, - Invocation.method( - #getNftOwnershipHistoryByCookbookIdAndRecipeId, - [], - { - #cookBookId: cookBookId, - #recipeId: recipeId, - }, - ), - )), - ) as _i8 - .Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, List<_i25.TransactionHistory>>> - getTransactionHistory({required String? address}) => (super.noSuchMethod( - Invocation.method( - #getTransactionHistory, - [], - {#address: address}, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - List<_i25.TransactionHistory>>>.value( - _FakeEither_0<_i9.Failure, List<_i25.TransactionHistory>>( - this, - Invocation.method( - #getTransactionHistory, - [], - {#address: address}, - ), - )), - ) as _i8 - .Future<_i2.Either<_i9.Failure, List<_i25.TransactionHistory>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, String>> updateRecipe( - {required _i10.MsgUpdateRecipe? msgUpdateRecipe}) => (super.noSuchMethod( + Invocation.method( + #getNftOwnershipHistoryByCookbookIdAndRecipeId, + [], + { + #cookBookId: cookBookId, + #recipeId: recipeId, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>.value(_FakeEither_0<_i9.Failure, List<_i24.NftOwnershipHistory>>( + this, + Invocation.method( + #getNftOwnershipHistoryByCookbookIdAndRecipeId, + [], + { + #cookBookId: cookBookId, + #recipeId: recipeId, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i24.NftOwnershipHistory>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, List<_i25.TransactionHistory>>> getTransactionHistory({required String? address}) => (super.noSuchMethod( + Invocation.method( + #getTransactionHistory, + [], + {#address: address}, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i25.TransactionHistory>>>.value(_FakeEither_0<_i9.Failure, List<_i25.TransactionHistory>>( + this, + Invocation.method( + #getTransactionHistory, + [], + {#address: address}, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i25.TransactionHistory>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, String>> updateRecipe({required _i10.MsgUpdateRecipe? msgUpdateRecipe}) => (super.noSuchMethod( Invocation.method( #updateRecipe, [], {#msgUpdateRecipe: msgUpdateRecipe}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #updateRecipe, @@ -1996,6 +1824,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> uploadMnemonicGoogleDrive({ required String? mnemonic, @@ -2010,8 +1839,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #username: username, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #uploadMnemonicGoogleDrive, @@ -2023,23 +1851,22 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>> - getGoogleDriveMnemonic() => (super.noSuchMethod( - Invocation.method( - #getGoogleDriveMnemonic, - [], - ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>.value( - _FakeEither_0<_i9.Failure, _i26.BackupData>( - this, - Invocation.method( - #getGoogleDriveMnemonic, - [], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>); + _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>> getGoogleDriveMnemonic() => (super.noSuchMethod( + Invocation.method( + #getGoogleDriveMnemonic, + [], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>.value(_FakeEither_0<_i9.Failure, _i26.BackupData>( + this, + Invocation.method( + #getGoogleDriveMnemonic, + [], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> uploadMnemonicICloud({ required String? mnemonic, @@ -2054,8 +1881,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #username: username, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #uploadMnemonicICloud, @@ -2067,15 +1893,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>> getICloudMnemonic() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>> getICloudMnemonic() => (super.noSuchMethod( Invocation.method( #getICloudMnemonic, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>.value( - _FakeEither_0<_i9.Failure, _i26.BackupData>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>.value(_FakeEither_0<_i9.Failure, _i26.BackupData>( this, Invocation.method( #getICloudMnemonic, @@ -2083,35 +1908,31 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i26.BackupData>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>> - getCookbooksByCreator({required String? creator}) => (super.noSuchMethod( - Invocation.method( - #getCookbooksByCreator, - [], - {#creator: creator}, - ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>>.value( - _FakeEither_0<_i9.Failure, List<_i10.Cookbook>>( - this, - Invocation.method( - #getCookbooksByCreator, - [], - {#creator: creator}, - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i10.Trade>> getTradeByID( - _i11.Int64? id) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>> getCookbooksByCreator({required String? creator}) => (super.noSuchMethod( + Invocation.method( + #getCookbooksByCreator, + [], + {#creator: creator}, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>>.value(_FakeEither_0<_i9.Failure, List<_i10.Cookbook>>( + this, + Invocation.method( + #getCookbooksByCreator, + [], + {#creator: creator}, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i10.Cookbook>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i10.Trade>> getTradeByID(_i11.Int64? id) => (super.noSuchMethod( Invocation.method( #getTradeByID, [id], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Trade>>.value( - _FakeEither_0<_i9.Failure, _i10.Trade>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i10.Trade>>.value(_FakeEither_0<_i9.Failure, _i10.Trade>( this, Invocation.method( #getTradeByID, @@ -2119,6 +1940,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i10.Trade>>); + @override _i8.Future isInternetConnected() => (super.noSuchMethod( Invocation.method( @@ -2127,15 +1949,16 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), returnValue: _i8.Future.value(false), ) as _i8.Future); + @override - _i8.Stream<_i27.InternetConnectionStatus> getInternetStatus() => - (super.noSuchMethod( + _i8.Stream<_i27.InternetConnectionStatus> getInternetStatus() => (super.noSuchMethod( Invocation.method( #getInternetStatus, [], ), returnValue: _i8.Stream<_i27.InternetConnectionStatus>.empty(), ) as _i8.Stream<_i27.InternetConnectionStatus>); + @override _i8.Future<_i2.Either<_i9.Failure, int>> getLikesCount({ required String? recipeId, @@ -2150,8 +1973,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #cookBookID: cookBookID, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value( - _FakeEither_0<_i9.Failure, int>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value(_FakeEither_0<_i9.Failure, int>( this, Invocation.method( #getLikesCount, @@ -2163,6 +1985,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, int>>); + @override _i8.Future<_i2.Either<_i9.Failure, int>> getViewsCount({ required String? recipeId, @@ -2177,8 +2000,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #cookBookID: cookBookID, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value( - _FakeEither_0<_i9.Failure, int>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value(_FakeEither_0<_i9.Failure, int>( this, Invocation.method( #getViewsCount, @@ -2190,6 +2012,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, int>>); + @override _i8.Future<_i2.Either<_i9.Failure, void>> countAView({ required String? recipeId, @@ -2206,8 +2029,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #walletAddress: walletAddress, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value( - _FakeEither_0<_i9.Failure, void>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value(_FakeEither_0<_i9.Failure, void>( this, Invocation.method( #countAView, @@ -2220,6 +2042,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, void>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> ifLikedByMe({ required String? recipeId, @@ -2236,8 +2059,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #walletAddress: walletAddress, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #ifLikedByMe, @@ -2250,6 +2072,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i8.Future<_i2.Either<_i9.Failure, void>> updateLikeStatus({ required String? recipeId, @@ -2266,8 +2089,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #walletAddress: walletAddress, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value( - _FakeEither_0<_i9.Failure, void>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value(_FakeEither_0<_i9.Failure, void>( this, Invocation.method( #updateLikeStatus, @@ -2280,6 +2102,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, void>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> saveUserFeedback({ required String? walletAddress, @@ -2296,8 +2119,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #feedback: feedback, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveUserFeedback, @@ -2310,54 +2132,45 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> - sendAppleInAppPurchaseCoinsRequest( - _i12.AppleInAppPurchaseModel? appleInAppPurchaseModel) => - (super.noSuchMethod( - Invocation.method( - #sendAppleInAppPurchaseCoinsRequest, - [appleInAppPurchaseModel], - ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( - this, - Invocation.method( - #sendAppleInAppPurchaseCoinsRequest, - [appleInAppPurchaseModel], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); - @override - _i8.Future<_i2.Either<_i9.Failure, String>> - sendGoogleInAppPurchaseCoinsRequest( - _i12.GoogleInAppPurchaseModel? msgGoogleInAPPPurchase) => - (super.noSuchMethod( - Invocation.method( - #sendGoogleInAppPurchaseCoinsRequest, - [msgGoogleInAPPPurchase], - ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( - this, - Invocation.method( - #sendGoogleInAppPurchaseCoinsRequest, - [msgGoogleInAPPPurchase], - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); - @override - _i8.Future<_i2.Either<_i9.Failure, _i28.ProductDetails>> getProductsForSale( - {required String? itemId}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> sendAppleInAppPurchaseCoinsRequest(_i12.AppleInAppPurchaseModel? appleInAppPurchaseModel) => (super.noSuchMethod( + Invocation.method( + #sendAppleInAppPurchaseCoinsRequest, + [appleInAppPurchaseModel], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( + this, + Invocation.method( + #sendAppleInAppPurchaseCoinsRequest, + [appleInAppPurchaseModel], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, String>> sendGoogleInAppPurchaseCoinsRequest(_i12.GoogleInAppPurchaseModel? msgGoogleInAPPPurchase) => (super.noSuchMethod( + Invocation.method( + #sendGoogleInAppPurchaseCoinsRequest, + [msgGoogleInAPPPurchase], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( + this, + Invocation.method( + #sendGoogleInAppPurchaseCoinsRequest, + [msgGoogleInAPPPurchase], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, _i28.ProductDetails>> getProductsForSale({required String? itemId}) => (super.noSuchMethod( Invocation.method( #getProductsForSale, [], {#itemId: itemId}, ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i28.ProductDetails>>.value( - _FakeEither_0<_i9.Failure, _i28.ProductDetails>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i28.ProductDetails>>.value(_FakeEither_0<_i9.Failure, _i28.ProductDetails>( this, Invocation.method( #getProductsForSale, @@ -2366,16 +2179,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i28.ProductDetails>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> buyProduct( - _i28.ProductDetails? productDetails) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> buyProduct(_i28.ProductDetails? productDetails) => (super.noSuchMethod( Invocation.method( #buyProduct, [productDetails], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #buyProduct, @@ -2383,15 +2194,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> isInAppPurchaseAvailable() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> isInAppPurchaseAvailable() => (super.noSuchMethod( Invocation.method( #isInAppPurchaseAvailable, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #isInAppPurchaseAvailable, @@ -2399,6 +2209,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> updateFcmToken({ required String? address, @@ -2413,8 +2224,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #fcmToken: fcmToken, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #updateFcmToken, @@ -2426,17 +2236,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> markNotificationAsRead( - {required List? idsList}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> markNotificationAsRead({required List? idsList}) => (super.noSuchMethod( Invocation.method( #markNotificationAsRead, [], {#idsList: idsList}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #markNotificationAsRead, @@ -2445,15 +2253,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> getAppCheckToken() => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> getAppCheckToken() => (super.noSuchMethod( Invocation.method( #getAppCheckToken, [], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #getAppCheckToken, @@ -2461,51 +2268,45 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i29.NotificationMessage>>> - getAllNotificationsMessages({ + _i8.Future<_i2.Either<_i9.Failure, List<_i29.NotificationMessage>>> getAllNotificationsMessages({ required String? walletAddress, required int? limit, required int? offset, }) => - (super.noSuchMethod( - Invocation.method( - #getAllNotificationsMessages, - [], - { - #walletAddress: walletAddress, - #limit: limit, - #offset: offset, - }, - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - List<_i29.NotificationMessage>>>.value( - _FakeEither_0<_i9.Failure, List<_i29.NotificationMessage>>( - this, - Invocation.method( - #getAllNotificationsMessages, - [], - { - #walletAddress: walletAddress, - #limit: limit, - #offset: offset, - }, - ), - )), - ) as _i8 - .Future<_i2.Either<_i9.Failure, List<_i29.NotificationMessage>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, bool>> saveInviteeAddressFromDynamicLink( - {required String? dynamicLink}) => (super.noSuchMethod( + Invocation.method( + #getAllNotificationsMessages, + [], + { + #walletAddress: walletAddress, + #limit: limit, + #offset: offset, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i29.NotificationMessage>>>.value(_FakeEither_0<_i9.Failure, List<_i29.NotificationMessage>>( + this, + Invocation.method( + #getAllNotificationsMessages, + [], + { + #walletAddress: walletAddress, + #limit: limit, + #offset: offset, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i29.NotificationMessage>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, bool>> saveInviteeAddressFromDynamicLink({required String? dynamicLink}) => (super.noSuchMethod( Invocation.method( #saveInviteeAddressFromDynamicLink, [], {#dynamicLink: dynamicLink}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #saveInviteeAddressFromDynamicLink, @@ -2514,17 +2315,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> createDynamicLinkForUserInvite( - {required String? address}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, String>> createDynamicLinkForUserInvite({required String? address}) => (super.noSuchMethod( Invocation.method( #createDynamicLinkForUserInvite, [], {#address: address}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( this, Invocation.method( #createDynamicLinkForUserInvite, @@ -2533,34 +2332,34 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override - _i8.Future<_i2.Either<_i9.Failure, String>> - createDynamicLinkForRecipeNftShare({ + _i8.Future<_i2.Either<_i9.Failure, String>> createDynamicLinkForRecipeNftShare({ required String? address, required _i30.NFT? nft, }) => - (super.noSuchMethod( - Invocation.method( - #createDynamicLinkForRecipeNftShare, - [], - { - #address: address, - #nft: nft, - }, - ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value( - _FakeEither_0<_i9.Failure, String>( - this, - Invocation.method( - #createDynamicLinkForRecipeNftShare, - [], - { - #address: address, - #nft: nft, - }, - ), - )), - ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + (super.noSuchMethod( + Invocation.method( + #createDynamicLinkForRecipeNftShare, + [], + { + #address: address, + #nft: nft, + }, + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, String>>.value(_FakeEither_0<_i9.Failure, String>( + this, + Invocation.method( + #createDynamicLinkForRecipeNftShare, + [], + { + #address: address, + #nft: nft, + }, + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, String>>); + @override _i8.Future<_i2.Either<_i9.Failure, _i31.TransactionResponse>> createAccount({ required _i6.AccountPublicInfo? publicInfo, @@ -2575,9 +2374,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #walletCreationModel: walletCreationModel, }, ), - returnValue: - _i8.Future<_i2.Either<_i9.Failure, _i31.TransactionResponse>>.value( - _FakeEither_0<_i9.Failure, _i31.TransactionResponse>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, _i31.TransactionResponse>>.value(_FakeEither_0<_i9.Failure, _i31.TransactionResponse>( this, Invocation.method( #createAccount, @@ -2589,16 +2386,14 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, _i31.TransactionResponse>>); + @override - _i8.Future<_i2.Either<_i9.Failure, int>> saveLocalTransaction( - _i33.LocalTransactionModel? txManager) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, int>> saveLocalTransaction(_i33.LocalTransactionModel? txManager) => (super.noSuchMethod( Invocation.method( #saveLocalTransaction, [txManager], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value( - _FakeEither_0<_i9.Failure, int>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, int>>.value(_FakeEither_0<_i9.Failure, int>( this, Invocation.method( #saveLocalTransaction, @@ -2606,35 +2401,29 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, int>>); + @override - _i8.Future<_i2.Either<_i9.Failure, List<_i33.LocalTransactionModel>>> - getAllTransactionFailures() => (super.noSuchMethod( - Invocation.method( - #getAllTransactionFailures, - [], - ), - returnValue: _i8.Future< - _i2.Either<_i9.Failure, - List<_i33.LocalTransactionModel>>>.value( - _FakeEither_0<_i9.Failure, List<_i33.LocalTransactionModel>>( - this, - Invocation.method( - #getAllTransactionFailures, - [], - ), - )), - ) as _i8.Future< - _i2.Either<_i9.Failure, List<_i33.LocalTransactionModel>>>); - @override - _i8.Future<_i2.Either<_i9.Failure, bool>> deleteTransactionFailureRecord( - int? id) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, List<_i33.LocalTransactionModel>>> getAllTransactionFailures() => (super.noSuchMethod( + Invocation.method( + #getAllTransactionFailures, + [], + ), + returnValue: _i8.Future<_i2.Either<_i9.Failure, List<_i33.LocalTransactionModel>>>.value(_FakeEither_0<_i9.Failure, List<_i33.LocalTransactionModel>>( + this, + Invocation.method( + #getAllTransactionFailures, + [], + ), + )), + ) as _i8.Future<_i2.Either<_i9.Failure, List<_i33.LocalTransactionModel>>>); + + @override + _i8.Future<_i2.Either<_i9.Failure, bool>> deleteTransactionFailureRecord(int? id) => (super.noSuchMethod( Invocation.method( #deleteTransactionFailureRecord, [id], ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #deleteTransactionFailureRecord, @@ -2642,17 +2431,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, bool>> setUserIdentifierInAnalytics( - {required String? address}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, bool>> setUserIdentifierInAnalytics({required String? address}) => (super.noSuchMethod( Invocation.method( #setUserIdentifierInAnalytics, [], {#address: address}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #setUserIdentifierInAnalytics, @@ -2661,6 +2448,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> logPurchaseItem({ required String? recipeId, @@ -2679,8 +2467,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #purchasePrice: purchasePrice, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #logPurchaseItem, @@ -2694,6 +2481,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override _i8.Future<_i2.Either<_i9.Failure, bool>> logAddToCart({ required String? recipeId, @@ -2714,8 +2502,7 @@ class MockRepository extends _i1.Mock implements _i13.Repository { #currency: currency, }, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value( - _FakeEither_0<_i9.Failure, bool>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, bool>>.value(_FakeEither_0<_i9.Failure, bool>( this, Invocation.method( #logAddToCart, @@ -2730,17 +2517,15 @@ class MockRepository extends _i1.Mock implements _i13.Repository { ), )), ) as _i8.Future<_i2.Either<_i9.Failure, bool>>); + @override - _i8.Future<_i2.Either<_i9.Failure, void>> logUserJourney( - {required String? screenName}) => - (super.noSuchMethod( + _i8.Future<_i2.Either<_i9.Failure, void>> logUserJourney({required String? screenName}) => (super.noSuchMethod( Invocation.method( #logUserJourney, [], {#screenName: screenName}, ), - returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value( - _FakeEither_0<_i9.Failure, void>( + returnValue: _i8.Future<_i2.Either<_i9.Failure, void>>.value(_FakeEither_0<_i9.Failure, void>( this, Invocation.method( #logUserJourney, @@ -2754,7 +2539,6 @@ class MockRepository extends _i1.Mock implements _i13.Repository { /// A class which mocks [NFT]. /// /// See the documentation for Mockito's code generation for more information. -// ignore: must_be_immutable class MockNFT extends _i1.Mock implements _i30.NFT { MockNFT() { _i1.throwOnMissingStub(this); @@ -2765,6 +2549,7 @@ class MockNFT extends _i1.Mock implements _i30.NFT { Invocation.getter(#url), returnValue: '', ) as String); + @override set url(String? _url) => super.noSuchMethod( Invocation.setter( @@ -2773,11 +2558,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get thumbnailUrl => (super.noSuchMethod( Invocation.getter(#thumbnailUrl), returnValue: '', ) as String); + @override set thumbnailUrl(String? _thumbnailUrl) => super.noSuchMethod( Invocation.setter( @@ -2786,11 +2573,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get name => (super.noSuchMethod( Invocation.getter(#name), returnValue: '', ) as String); + @override set name(String? _name) => super.noSuchMethod( Invocation.setter( @@ -2799,11 +2588,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get description => (super.noSuchMethod( Invocation.getter(#description), returnValue: '', ) as String); + @override set description(String? _description) => super.noSuchMethod( Invocation.setter( @@ -2812,11 +2603,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get denom => (super.noSuchMethod( Invocation.getter(#denom), returnValue: '', ) as String); + @override set denom(String? _denom) => super.noSuchMethod( Invocation.setter( @@ -2825,11 +2618,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get price => (super.noSuchMethod( Invocation.getter(#price), returnValue: '', ) as String); + @override set price(String? _price) => super.noSuchMethod( Invocation.setter( @@ -2838,11 +2633,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get creator => (super.noSuchMethod( Invocation.getter(#creator), returnValue: '', ) as String); + @override set creator(String? _creator) => super.noSuchMethod( Invocation.setter( @@ -2851,11 +2648,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get owner => (super.noSuchMethod( Invocation.getter(#owner), returnValue: '', ) as String); + @override set owner(String? _owner) => super.noSuchMethod( Invocation.setter( @@ -2864,11 +2663,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override int get amountMinted => (super.noSuchMethod( Invocation.getter(#amountMinted), returnValue: 0, ) as int); + @override set amountMinted(int? _amountMinted) => super.noSuchMethod( Invocation.setter( @@ -2877,11 +2678,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override int get quantity => (super.noSuchMethod( Invocation.getter(#quantity), returnValue: 0, ) as int); + @override set quantity(int? _quantity) => super.noSuchMethod( Invocation.setter( @@ -2890,11 +2693,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get tradePercentage => (super.noSuchMethod( Invocation.getter(#tradePercentage), returnValue: '', ) as String); + @override set tradePercentage(String? _tradePercentage) => super.noSuchMethod( Invocation.setter( @@ -2903,11 +2708,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get cookbookID => (super.noSuchMethod( Invocation.getter(#cookbookID), returnValue: '', ) as String); + @override set cookbookID(String? _cookbookID) => super.noSuchMethod( Invocation.setter( @@ -2916,11 +2723,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get recipeID => (super.noSuchMethod( Invocation.getter(#recipeID), returnValue: '', ) as String); + @override set recipeID(String? _recipeID) => super.noSuchMethod( Invocation.setter( @@ -2929,11 +2738,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get itemID => (super.noSuchMethod( Invocation.getter(#itemID), returnValue: '', ) as String); + @override set itemID(String? _itemID) => super.noSuchMethod( Invocation.setter( @@ -2942,11 +2753,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get width => (super.noSuchMethod( Invocation.getter(#width), returnValue: '', ) as String); + @override set width(String? _width) => super.noSuchMethod( Invocation.setter( @@ -2955,11 +2768,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get height => (super.noSuchMethod( Invocation.getter(#height), returnValue: '', ) as String); + @override set height(String? _height) => super.noSuchMethod( Invocation.setter( @@ -2968,11 +2783,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get appType => (super.noSuchMethod( Invocation.getter(#appType), returnValue: '', ) as String); + @override set appType(String? _appType) => super.noSuchMethod( Invocation.setter( @@ -2981,11 +2798,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get tradeID => (super.noSuchMethod( Invocation.getter(#tradeID), returnValue: '', ) as String); + @override set tradeID(String? _tradeID) => super.noSuchMethod( Invocation.setter( @@ -2994,11 +2813,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get ownerAddress => (super.noSuchMethod( Invocation.getter(#ownerAddress), returnValue: '', ) as String); + @override set ownerAddress(String? _ownerAddress) => super.noSuchMethod( Invocation.setter( @@ -3007,11 +2828,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override _i34.IBCCoins get ibcCoins => (super.noSuchMethod( Invocation.getter(#ibcCoins), returnValue: _i34.IBCCoins.urun, ) as _i34.IBCCoins); + @override set ibcCoins(_i34.IBCCoins? _ibcCoins) => super.noSuchMethod( Invocation.setter( @@ -3020,11 +2843,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override _i35.NftType get type => (super.noSuchMethod( Invocation.getter(#type), returnValue: _i35.NftType.TYPE_RECIPE, ) as _i35.NftType); + @override set type(_i35.NftType? _type) => super.noSuchMethod( Invocation.setter( @@ -3033,11 +2858,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override _i35.AssetType get assetType => (super.noSuchMethod( Invocation.getter(#assetType), returnValue: _i35.AssetType.Audio, ) as _i35.AssetType); + @override set assetType(_i35.AssetType? _assetType) => super.noSuchMethod( Invocation.setter( @@ -3046,11 +2873,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get duration => (super.noSuchMethod( Invocation.getter(#duration), returnValue: '', ) as String); + @override set duration(String? _duration) => super.noSuchMethod( Invocation.setter( @@ -3059,11 +2888,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get fileSize => (super.noSuchMethod( Invocation.getter(#fileSize), returnValue: '', ) as String); + @override set fileSize(String? _fileSize) => super.noSuchMethod( Invocation.setter( @@ -3072,11 +2903,28 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + + @override + String get fileExtension => (super.noSuchMethod( + Invocation.getter(#fileExtension), + returnValue: '', + ) as String); + + @override + set fileExtension(String? _fileExtension) => super.noSuchMethod( + Invocation.setter( + #fileExtension, + _fileExtension, + ), + returnValueForMissingStub: null, + ); + @override String get hashtags => (super.noSuchMethod( Invocation.getter(#hashtags), returnValue: '', ) as String); + @override set hashtags(String? _hashtags) => super.noSuchMethod( Invocation.setter( @@ -3085,11 +2933,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get cid => (super.noSuchMethod( Invocation.getter(#cid), returnValue: '', ) as String); + @override set cid(String? _cid) => super.noSuchMethod( Invocation.setter( @@ -3098,11 +2948,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override String get createdAt => (super.noSuchMethod( Invocation.getter(#createdAt), returnValue: '', ) as String); + @override set createdAt(String? _createdAt) => super.noSuchMethod( Invocation.setter( @@ -3111,11 +2963,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override bool get realWorld => (super.noSuchMethod( Invocation.getter(#realWorld), returnValue: false, ) as bool); + @override set realWorld(bool? _realWorld) => super.noSuchMethod( Invocation.setter( @@ -3124,11 +2978,13 @@ class MockNFT extends _i1.Mock implements _i30.NFT { ), returnValueForMissingStub: null, ); + @override List get props => (super.noSuchMethod( Invocation.getter(#props), returnValue: [], ) as List); + @override _i8.Future getOwnerAddress() => (super.noSuchMethod( Invocation.method( diff --git a/wallet/test/widget_testing/pages/owner_view_screen_test.dart b/wallet/test/widget_testing/pages/owner_view_screen_test.dart index a8dac4e126..172da33167 100644 --- a/wallet/test/widget_testing/pages/owner_view_screen_test.dart +++ b/wallet/test/widget_testing/pages/owner_view_screen_test.dart @@ -1,6 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:get_it/get_it.dart'; import 'package:mockito/mockito.dart'; +import 'package:provider/provider.dart'; import 'package:pylons_wallet/pages/detailed_asset_view/owner_view.dart'; import 'package:pylons_wallet/pages/detailed_asset_view/owner_view_view_model.dart'; import 'package:pylons_wallet/pages/owner_purchase_view_common/button_state.dart'; @@ -16,12 +17,10 @@ import '../extension/size_extension.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - late OwnerViewViewModel viewModel; - late WalletsStore walletStore; - walletStore = MockWalletStore(); + final walletStore = MockWalletStore(); GetIt.I.registerLazySingleton(() => walletStore); - viewModel = MockOwnerViewViewModel(); - GetIt.I.registerLazySingleton(() => viewModel); + final viewModel = MockOwnerViewViewModel(); + GetIt.I.registerLazySingleton(() => viewModel); registerStubs(viewModel); @@ -62,6 +61,122 @@ void main() { expect(viewModel.videoPlayerController!.value.isPlaying, false); }, ); + + testWidgets( + "Image file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_IMAGE); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return OwnerView( + nft: MOCK_NFT_FREE_IMAGE, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_IMAGE.width}x${MOCK_NFT_FREE_IMAGE.height} ${MOCK_NFT_FREE_IMAGE.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "Video file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_VIDEO); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return OwnerView( + nft: MOCK_NFT_FREE_VIDEO, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_VIDEO.width}x${MOCK_NFT_FREE_VIDEO.height} ${MOCK_NFT_FREE_VIDEO.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "Audio file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_AUDIO); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return OwnerView( + nft: MOCK_NFT_FREE_AUDIO, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_AUDIO.width}x${MOCK_NFT_FREE_AUDIO.height} ${MOCK_NFT_FREE_AUDIO.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "3D file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_3D); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return OwnerView( + nft: MOCK_NFT_FREE_3D, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_3D.width}x${MOCK_NFT_FREE_3D.height} ${MOCK_NFT_FREE_3D.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + + testWidgets( + "Pdf file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_PDF); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return OwnerView( + nft: MOCK_NFT_FREE_PDF, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_PDF.width}x${MOCK_NFT_FREE_PDF.height} ${MOCK_NFT_FREE_PDF.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); } void registerStubs(OwnerViewViewModel viewModel) { diff --git a/wallet/test/widget_testing/pages/purchase_item/purchase_item_screen_test.dart b/wallet/test/widget_testing/pages/purchase_item/purchase_item_screen_test.dart index f75e13f345..827c8d8a0b 100644 --- a/wallet/test/widget_testing/pages/purchase_item/purchase_item_screen_test.dart +++ b/wallet/test/widget_testing/pages/purchase_item/purchase_item_screen_test.dart @@ -4,6 +4,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:get_it/get_it.dart'; import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; +import 'package:pylons_wallet/pages/owner_purchase_view_common/button_state.dart'; +import 'package:pylons_wallet/pages/owner_purchase_view_common/progress_bar_state.dart'; import 'package:pylons_wallet/pages/purchase_item/purchase_item_screen.dart'; import 'package:pylons_wallet/pages/purchase_item/purchase_item_view_model.dart'; import 'package:pylons_wallet/stores/wallet_store.dart'; @@ -14,16 +16,14 @@ import '../../../mocks/mock_wallet_store.dart'; import '../../../mocks/purchase_item_view_model.mocks.dart'; import '../../extension/size_extension.dart'; -void main(){ +void main() { TestWidgetsFlutterBinding.ensureInitialized(); final WalletsStore walletStore = MockWalletStore(); final PurchaseItemViewModel viewModel = MockPurchaseItemViewModel(); GetIt.I.registerLazySingleton(() => walletStore); GetIt.I.registerLazySingleton(() => viewModel); - testWidgets("Purchase Item Screen Bottom Sheet Visibility Test", (tester) async { - when(viewModel.collapsed).thenAnswer((realInvocation) => false); when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_IMAGE); when(viewModel.showBuyNowButton(isPlatformAndroid: Platform.isAndroid)).thenAnswer((realInvocation) => true); @@ -41,4 +41,133 @@ void main(){ final closeBottomSheetButton = find.byKey(const Key(kCloseBottomSheetKey)); expect(closeBottomSheetButton, findsOneWidget); }); + + testWidgets( + "Image file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_IMAGE); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return PurchaseItemScreen( + nft: MOCK_NFT_FREE_IMAGE, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_IMAGE.width}x${MOCK_NFT_FREE_IMAGE.height} ${MOCK_NFT_FREE_IMAGE.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "Video file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_VIDEO); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return PurchaseItemScreen( + nft: MOCK_NFT_FREE_VIDEO, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_VIDEO.width}x${MOCK_NFT_FREE_VIDEO.height} ${MOCK_NFT_FREE_VIDEO.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "Audio file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_AUDIO); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + when(viewModel.buttonNotifier).thenAnswer((realInvocation) => ValueNotifier(ButtonState.playing)); + when(viewModel.progressNotifier).thenAnswer( + (realInvocation) => ValueNotifier( + ProgressBarState( + current: const Duration( + seconds: 50, + ), + buffered: const Duration( + seconds: 10, + ), + total: const Duration(minutes: 2), + ), + ), + ); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return PurchaseItemScreen( + nft: MOCK_NFT_FREE_AUDIO, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_AUDIO.width}x${MOCK_NFT_FREE_AUDIO.height} ${MOCK_NFT_FREE_AUDIO.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "3D file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_3D); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return PurchaseItemScreen( + nft: MOCK_NFT_FREE_3D, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_3D.width}x${MOCK_NFT_FREE_3D.height} ${MOCK_NFT_FREE_3D.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); + + testWidgets( + "Pdf file extension should show to user", + (tester) async { + when(viewModel.nft).thenAnswer((realInvocation) => MOCK_NFT_FREE_PDF); + when(viewModel.collapsed).thenAnswer((realInvocation) => false); + when(viewModel.isViewingFullNft).thenAnswer((realInvocation) => false); + when(viewModel.isHistoryExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isOwnershipExpanded).thenAnswer((realInvocation) => false); + when(viewModel.isDetailsExpanded).thenAnswer((realInvocation) => true); + await tester.testAppForWidgetTesting( + ChangeNotifierProvider.value( + value: viewModel, + builder: (context, child) { + return PurchaseItemScreen( + nft: MOCK_NFT_FREE_PDF, + ); + }), + ); + await tester.pump(); + expect(find.text('${MOCK_NFT_FREE_PDF.width}x${MOCK_NFT_FREE_PDF.height} ${MOCK_NFT_FREE_PDF.fileExtension.toUpperCase()}'), findsOneWidget); + }, + ); }