diff --git a/.gitignore b/.gitignore index 4a3b90ce..513cf185 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,11 @@ **/.flutter-plugins-dependencies **/.flutter-versions +# Generated files (auto-generated by build_runner and other code generators) +# These files are regenerated automatically in CI and should not be committed +*.g.dart +*.mocks.dart + # IntelliJ related .idea/ *.iml diff --git a/CLAUDE.md b/CLAUDE.md index 831889af..1fa2fe2f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -188,11 +188,12 @@ When orders are canceled, Mostro sends `Action.canceled` gift wrap: - Integration tests in `integration_test/` - Mocks generated using Mockito in `test/mocks.dart` -### Mock Files Guidelines +### Mock Files Guidelines - **Generated file**: `test/mocks.mocks.dart` is auto-generated by Mockito - **File-level ignores**: Contains comprehensive ignore directives at file level - **Regeneration**: Use `dart run build_runner build -d` to update mocks after changes - **No manual editing**: Never manually modify generated mock files +- **Not in git**: All `*.mocks.dart` files are in `.gitignore` and should NOT be committed ## Development Guidelines @@ -365,6 +366,10 @@ For complete technical documentation, see `RELAY_SYNC_IMPLEMENTATION.md`. - **Commit messages**: Descriptive messages following conventional commits - **No Claude references**: Don't include Claude/AI references in commit messages - **Code review**: All changes should pass `flutter analyze` before commit +- **Generated files**: NEVER commit `*.g.dart` or `*.mocks.dart` files - they are in `.gitignore` + - These files are automatically regenerated by CI/CD workflows + - Only commit source files that you manually write/edit + - If you see generated files in `git status`, do NOT stage them ## Project Context & Recent Work @@ -501,22 +506,47 @@ For complete technical documentation, see `RELAY_SYNC_IMPLEMENTATION.md`. - `RELAY_SYNC_IMPLEMENTATION.md` - Complete technical documentation ### Generated Files (Don't Edit Manually) -- `lib/generated/` - Generated localization files -- `*.g.dart` - Generated Riverpod and other code -- `*.mocks.dart` - Generated Mockito mock files (especially `test/mocks.mocks.dart`) +- `lib/generated/` - Generated localization files (in `.gitignore`) +- `*.g.dart` - Generated Riverpod and other code (in `.gitignore`) +- `*.mocks.dart` - Generated Mockito mock files (in `.gitignore`) - Platform-specific generated files ### Generated Files Best Practices - **NEVER manually edit** generated files (`.g.dart`, `.mocks.dart`, `lib/generated/`) +- **NEVER commit** generated files - they are in `.gitignore` and auto-generated by CI - **NEVER add individual ignore comments** to generated files (e.g., `// ignore: must_be_immutable`) - **DO NOT modify** `test/mocks.mocks.dart` - it already has file-level ignores - **If analyzer issues exist**: Regenerate files instead of adding ignores - **Mock files specifically**: Have file-level `// ignore_for_file: must_be_immutable` - don't add more -- **Regeneration commands**: +- **Regeneration commands**: - Riverpod: `dart run build_runner build -d` - Mocks: `dart run build_runner build -d` - Localization: `flutter gen-l10n` +### Generated Files Workflow +``` +Local Development: +1. Clone repo → flutter pub get +2. Generate files → dart run build_runner build -d +3. Develop → Edit source files only +4. Re-generate if needed → dart run build_runner build -d +5. Commit → git add (source files only, NO *.g.dart or *.mocks.dart) + +CI/CD Workflow: +1. Pull request created +2. CI runs → dart run build_runner build -d (auto-generates) +3. CI runs → flutter analyze +4. CI runs → flutter test +5. All generated files exist for CI, but NOT in git history +``` + +**Why This Approach?** +- ✅ Clean git diffs - only see actual code changes in PRs +- ✅ No merge conflicts from generated files +- ✅ Prevents accidental manual edits to generated code +- ✅ CI ensures files can always be regenerated correctly +- ✅ Smaller repository size + ## Notes for Future Development - Always maintain zero Flutter analyze issues @@ -529,10 +559,12 @@ For complete technical documentation, see `RELAY_SYNC_IMPLEMENTATION.md`. ### Generated Files - CRITICAL - **NEVER** manually edit `test/mocks.mocks.dart` or any `*.g.dart` files +- **NEVER** commit `*.g.dart` or `*.mocks.dart` files - they are in `.gitignore` - **NEVER** add `// ignore: must_be_immutable` to individual classes in generated files - **MockSharedPreferencesAsync** already has file-level ignore - don't add more - **duplicate_ignore warnings** are caused by adding individual ignores to files with file-level ignores - **Solution**: Always regenerate files instead of adding ignore comments +- **Git workflow**: Generated files exist locally for development, but are NOT tracked by git --- diff --git a/README.md b/README.md index 63450928..a5ea7a90 100644 --- a/README.md +++ b/README.md @@ -82,14 +82,21 @@ This is a fully-featured mobile application that enables secure, private, and de flutter pub get ``` -3. Generate localization and other required files: +3. **Generate required files (REQUIRED STEP):** ```bash dart run build_runner build -d ``` -> **Note:** -> These commands generate files needed by `flutter_intl` and any other code generators. You must run them after installing dependencies and whenever you update localization files or code generation sources. If you skip this step, you may encounter missing file errors when running the app. +> **⚠️ IMPORTANT:** +> This step is **mandatory** and must be run after cloning the repository. It generates code files (`*.g.dart`, `*.mocks.dart`) required for the app to compile and run. These generated files are not committed to the repository and are automatically recreated in CI/CD pipelines. +> +> You will need to run this command again whenever you: +> - Update localization files (`lib/l10n/*.arb`) +> - Modify files that use code generation (Riverpod providers, JSON serialization, etc.) +> - Pull changes that affect generated code +> +> If you see compilation errors about missing files or imports, run this command again. ## Running the App diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2690150e..244448a9 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -81,19 +81,25 @@ Mostro Mobile is a Flutter app designed with modularity and maintainability in m ```sh flutter pub get ``` -3. **Run the app:** +3. **Generate required files (CRITICAL STEP):** + ```sh + dart run build_runner build -d + ``` + This generates code files (`*.g.dart`, `*.mocks.dart`) required for the app to compile. You must run this after cloning and whenever you modify files that use code generation (Riverpod providers, JSON serialization, localization files, etc.). + +4. **Run the app:** ```sh flutter run ``` -4. **Configure environment:** +5. **Configure environment:** - Localization: Run `flutter gen-l10n` if you add new strings. - Platform-specific setup: See `README.md` for details. -5. **Testing:** +6. **Testing:** - Unit tests: `flutter test` - Integration tests: `flutter test integration_test/` -6. **Linting & Formatting:** +7. **Linting & Formatting:** - Check code style: `flutter analyze` - Format code: `flutter format .` @@ -111,6 +117,90 @@ Mostro Mobile is a Flutter app designed with modularity and maintainability in m --- +## Generated Files & Git Workflow + +### What Are Generated Files? + +This project uses code generation for several purposes: +- **Riverpod providers** (`*.g.dart`) +- **JSON serialization** (`*.g.dart`) +- **Mock classes for testing** (`*.mocks.dart`) +- **Localization** (`lib/generated/`) + +These files are automatically created by running: +```sh +dart run build_runner build -d +``` + +### Important: DO NOT Commit Generated Files + +**Generated files (`*.g.dart`, `*.mocks.dart`) are in `.gitignore` and should NEVER be committed to the repository.** + +#### Why? +- ✅ **Clean PRs**: Only source code changes appear in pull requests +- ✅ **No merge conflicts**: Generated files won't cause conflicts between branches +- ✅ **CI regenerates them**: GitHub Actions automatically regenerate these files during builds +- ✅ **Prevents errors**: No one can accidentally modify generated code manually + +### Development Workflow + +``` +1. Clone repo + └─> flutter pub get + └─> dart run build_runner build -d ← Generate files locally + +2. Develop your feature + └─> Make code changes + └─> If you modify providers/models, re-run build_runner + +3. Before committing + └─> flutter analyze ← Must pass with zero issues + └─> flutter test ← All tests must pass + └─> git add ← Add ONLY source files, NOT *.g.dart or *.mocks.dart + +4. Create PR + └─> CI automatically regenerates all files + └─> CI runs analyze and tests + └─> Your PR only shows actual code changes +``` + +### What If I See Generated Files in My Git Status? + +If you see modified `*.g.dart` or `*.mocks.dart` files when running `git status`, **do NOT commit them**. They are already in `.gitignore` and should be ignored automatically. If they appear as modified, it means they were tracked before the `.gitignore` update. + +Simply don't stage them: +```sh +git status # See what changed +git add lib/... # Add only your actual source files +git commit # Generated files won't be included +``` + +### Common Scenarios + +**Scenario 1: After pulling changes** +```sh +git pull +dart run build_runner build -d # Regenerate locally +flutter run # App works +``` + +**Scenario 2: Modified a model or provider** +```sh +# Edit lib/features/settings/settings.dart +dart run build_runner build -d # Regenerate affected files +flutter run # Test changes +git add lib/features/settings/settings.dart # Add ONLY source file +git commit -m "feat: add new setting" +``` + +**Scenario 3: Compilation errors about missing files** +```sh +# Error: "File not found: '*.g.dart'" +dart run build_runner build -d # Regenerate +``` + +--- + ## Contact & Further Resources - **Main repo:** [https://github.com/MostroP2P/mobile](https://github.com/MostroP2P/mobile) diff --git a/lib/features/order/providers/order_notifier_provider.g.dart b/lib/features/order/providers/order_notifier_provider.g.dart deleted file mode 100644 index 6fdeb268..00000000 --- a/lib/features/order/providers/order_notifier_provider.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_notifier_provider.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$orderTypeNotifierHash() => r'8162563dcc33acb976a55b96da8bb59e5e7c5abf'; - -/// See also [OrderTypeNotifier]. -@ProviderFor(OrderTypeNotifier) -final orderTypeNotifierProvider = - AutoDisposeNotifierProvider.internal( - OrderTypeNotifier.new, - name: r'orderTypeNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$orderTypeNotifierHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$OrderTypeNotifier = AutoDisposeNotifier; -// ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/services/event_bus.g.dart b/lib/services/event_bus.g.dart deleted file mode 100644 index 73a6084a..00000000 --- a/lib/services/event_bus.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'event_bus.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$eventBusHash() => r'8e50dc963edbcc64d7f61e4054c5537782944acf'; - -/// See also [eventBus]. -@ProviderFor(eventBus) -final eventBusProvider = AutoDisposeProvider.internal( - eventBus, - name: r'eventBusProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$eventBusHash, - dependencies: null, - allTransitiveDependencies: null, -); - -@Deprecated('Will be removed in 3.0. Use Ref instead') -// ignore: unused_element -typedef EventBusRef = AutoDisposeProviderRef; -// ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/shared/providers/mostro_service_provider.g.dart b/lib/shared/providers/mostro_service_provider.g.dart deleted file mode 100644 index 983ec992..00000000 --- a/lib/shared/providers/mostro_service_provider.g.dart +++ /dev/null @@ -1,43 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'mostro_service_provider.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$eventStorageHash() => r'ba0996d381cefc0cc74a999ed3b83baf77446117'; - -/// See also [eventStorage]. -@ProviderFor(eventStorage) -final eventStorageProvider = Provider.internal( - eventStorage, - name: r'eventStorageProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$eventStorageHash, - dependencies: null, - allTransitiveDependencies: null, -); - -@Deprecated('Will be removed in 3.0. Use Ref instead') -// ignore: unused_element -typedef EventStorageRef = ProviderRef; -String _$mostroServiceHash() => r'f33c395adee013f6c71bbbed4c7cfd2dd6286673'; - -/// See also [mostroService]. -@ProviderFor(mostroService) -final mostroServiceProvider = Provider.internal( - mostroService, - name: r'mostroServiceProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mostroServiceHash, - dependencies: null, - allTransitiveDependencies: null, -); - -@Deprecated('Will be removed in 3.0. Use Ref instead') -// ignore: unused_element -typedef MostroServiceRef = ProviderRef; -// ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/test/mocks.mocks.dart b/test/mocks.mocks.dart deleted file mode 100644 index 8439b3ba..00000000 --- a/test/mocks.mocks.dart +++ /dev/null @@ -1,3592 +0,0 @@ -// Mocks generated by Mockito 5.4.6 from annotations -// in mostro_mobile/test/mocks.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:io' as _i34; -import 'dart:typed_data' as _i33; - -import 'package:dart_nostr/dart_nostr.dart' as _i3; -import 'package:dart_nostr/nostr/model/relay_informations.dart' as _i18; -import 'package:flutter_riverpod/flutter_riverpod.dart' as _i4; -import 'package:logger/logger.dart' as _i13; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i19; -import 'package:mostro_mobile/data/enums.dart' as _i30; -import 'package:mostro_mobile/data/models.dart' as _i7; -import 'package:mostro_mobile/data/models/chat_room.dart' as _i16; -import 'package:mostro_mobile/data/models/order.dart' as _i20; -import 'package:mostro_mobile/data/repositories/mostro_storage.dart' as _i27; -import 'package:mostro_mobile/data/repositories/open_orders_repository.dart' - as _i22; -import 'package:mostro_mobile/data/repositories/session_storage.dart' as _i25; -import 'package:mostro_mobile/features/chat/notifiers/chat_room_notifier.dart' - as _i36; -import 'package:mostro_mobile/features/key_manager/key_manager.dart' as _i26; -import 'package:mostro_mobile/features/order/models/order_state.dart' as _i11; -import 'package:mostro_mobile/features/order/notfiers/order_notifier.dart' - as _i31; -import 'package:mostro_mobile/features/relays/relay.dart' as _i28; -import 'package:mostro_mobile/features/relays/relays_notifier.dart' as _i10; -import 'package:mostro_mobile/features/settings/settings.dart' as _i2; -import 'package:mostro_mobile/features/settings/settings_notifier.dart' as _i9; -import 'package:mostro_mobile/services/blossom_client.dart' as _i32; -import 'package:mostro_mobile/services/blossom_download_service.dart' as _i35; -import 'package:mostro_mobile/services/deep_link_service.dart' as _i21; -import 'package:mostro_mobile/services/encrypted_file_upload_service.dart' - as _i14; -import 'package:mostro_mobile/services/encrypted_image_upload_service.dart' - as _i15; -import 'package:mostro_mobile/services/mostro_service.dart' as _i12; -import 'package:mostro_mobile/services/nostr_service.dart' as _i17; -import 'package:riverpod/src/internals.dart' as _i8; -import 'package:sembast/sembast.dart' as _i6; -import 'package:sembast/src/api/transaction.dart' as _i24; -import 'package:shared_preferences/src/shared_preferences_async.dart' as _i23; -import 'package:state_notifier/state_notifier.dart' as _i29; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeSettings_0 extends _i1.SmartFake implements _i2.Settings { - _FakeSettings_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeNostrKeyPairs_1 extends _i1.SmartFake implements _i3.NostrKeyPairs { - _FakeNostrKeyPairs_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeNostrEvent_2 extends _i1.SmartFake implements _i3.NostrEvent { - _FakeNostrEvent_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRef_3 extends _i1.SmartFake - implements _i4.Ref { - _FakeRef_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFuture_4 extends _i1.SmartFake implements _i5.Future { - _FakeFuture_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDatabase_5 extends _i1.SmartFake implements _i6.Database { - _FakeDatabase_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeStoreRef_6 - extends _i1.SmartFake implements _i6.StoreRef { - _FakeStoreRef_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeSession_7 extends _i1.SmartFake implements _i7.Session { - _FakeSession_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFilter_8 extends _i1.SmartFake implements _i6.Filter { - _FakeFilter_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeMostroMessage_9 extends _i1.SmartFake - implements _i7.MostroMessage { - _FakeMostroMessage_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeProviderContainer_10 extends _i1.SmartFake - implements _i4.ProviderContainer { - _FakeProviderContainer_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeKeepAliveLink_11 extends _i1.SmartFake implements _i4.KeepAliveLink { - _FakeKeepAliveLink_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeProviderSubscription_12 extends _i1.SmartFake - implements _i4.ProviderSubscription { - _FakeProviderSubscription_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeNode_13 extends _i1.SmartFake implements _i8.Node { - _FakeNode_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeSettingsNotifier_14 extends _i1.SmartFake - implements _i9.SettingsNotifier { - _FakeSettingsNotifier_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRelayValidationResult_15 extends _i1.SmartFake - implements _i10.RelayValidationResult { - _FakeRelayValidationResult_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeOrderState_16 extends _i1.SmartFake implements _i11.OrderState { - _FakeOrderState_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeMostroService_17 extends _i1.SmartFake - implements _i12.MostroService { - _FakeMostroService_17( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLogger_18 extends _i1.SmartFake implements _i13.Logger { - _FakeLogger_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDuration_19 extends _i1.SmartFake implements Duration { - _FakeDuration_19( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeEncryptedFileUploadResult_20 extends _i1.SmartFake - implements _i14.EncryptedFileUploadResult { - _FakeEncryptedFileUploadResult_20( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeEncryptedImageUploadResult_21 extends _i1.SmartFake - implements _i15.EncryptedImageUploadResult { - _FakeEncryptedImageUploadResult_21( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeChatRoom_22 extends _i1.SmartFake implements _i16.ChatRoom { - _FakeChatRoom_22( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [NostrService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockNostrService extends _i1.Mock implements _i17.NostrService { - MockNostrService() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.Settings get settings => (super.noSuchMethod( - Invocation.getter(#settings), - returnValue: _FakeSettings_0( - this, - Invocation.getter(#settings), - ), - ) as _i2.Settings); - - @override - bool get isInitialized => (super.noSuchMethod( - Invocation.getter(#isInitialized), - returnValue: false, - ) as bool); - - @override - _i5.Future init(_i2.Settings? settings) => (super.noSuchMethod( - Invocation.method( - #init, - [settings], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateSettings(_i2.Settings? newSettings) => - (super.noSuchMethod( - Invocation.method( - #updateSettings, - [newSettings], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i18.RelayInformations?> getRelayInfo(String? relayUrl) => - (super.noSuchMethod( - Invocation.method( - #getRelayInfo, - [relayUrl], - ), - returnValue: _i5.Future<_i18.RelayInformations?>.value(), - ) as _i5.Future<_i18.RelayInformations?>); - - @override - _i5.Future publishEvent(_i3.NostrEvent? event) => (super.noSuchMethod( - Invocation.method( - #publishEvent, - [event], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchEvents( - _i3.NostrFilter? filter, { - List? specificRelays, - }) => - (super.noSuchMethod( - Invocation.method( - #fetchEvents, - [filter], - {#specificRelays: specificRelays}, - ), - returnValue: _i5.Future>.value(<_i3.NostrEvent>[]), - ) as _i5.Future>); - - @override - _i5.Stream<_i3.NostrEvent> subscribeToEvents(_i3.NostrRequest? request) => - (super.noSuchMethod( - Invocation.method( - #subscribeToEvents, - [request], - ), - returnValue: _i5.Stream<_i3.NostrEvent>.empty(), - ) as _i5.Stream<_i3.NostrEvent>); - - @override - _i5.Future disconnectFromRelays() => (super.noSuchMethod( - Invocation.method( - #disconnectFromRelays, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i3.NostrKeyPairs> generateKeyPair() => (super.noSuchMethod( - Invocation.method( - #generateKeyPair, - [], - ), - returnValue: _i5.Future<_i3.NostrKeyPairs>.value(_FakeNostrKeyPairs_1( - this, - Invocation.method( - #generateKeyPair, - [], - ), - )), - ) as _i5.Future<_i3.NostrKeyPairs>); - - @override - _i3.NostrKeyPairs generateKeyPairFromPrivateKey(String? privateKey) => - (super.noSuchMethod( - Invocation.method( - #generateKeyPairFromPrivateKey, - [privateKey], - ), - returnValue: _FakeNostrKeyPairs_1( - this, - Invocation.method( - #generateKeyPairFromPrivateKey, - [privateKey], - ), - ), - ) as _i3.NostrKeyPairs); - - @override - String getMostroPubKey() => (super.noSuchMethod( - Invocation.method( - #getMostroPubKey, - [], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #getMostroPubKey, - [], - ), - ), - ) as String); - - @override - _i5.Future<_i3.NostrEvent> createNIP59Event( - String? content, - String? recipientPubKey, - String? senderPrivateKey, - ) => - (super.noSuchMethod( - Invocation.method( - #createNIP59Event, - [ - content, - recipientPubKey, - senderPrivateKey, - ], - ), - returnValue: _i5.Future<_i3.NostrEvent>.value(_FakeNostrEvent_2( - this, - Invocation.method( - #createNIP59Event, - [ - content, - recipientPubKey, - senderPrivateKey, - ], - ), - )), - ) as _i5.Future<_i3.NostrEvent>); - - @override - _i5.Future<_i3.NostrEvent> decryptNIP59Event( - _i3.NostrEvent? event, - String? privateKey, - ) => - (super.noSuchMethod( - Invocation.method( - #decryptNIP59Event, - [ - event, - privateKey, - ], - ), - returnValue: _i5.Future<_i3.NostrEvent>.value(_FakeNostrEvent_2( - this, - Invocation.method( - #decryptNIP59Event, - [ - event, - privateKey, - ], - ), - )), - ) as _i5.Future<_i3.NostrEvent>); - - @override - _i5.Future createRumor( - _i3.NostrKeyPairs? senderKeyPair, - String? wrapperKey, - String? recipientPubKey, - String? content, - ) => - (super.noSuchMethod( - Invocation.method( - #createRumor, - [ - senderKeyPair, - wrapperKey, - recipientPubKey, - content, - ], - ), - returnValue: _i5.Future.value(_i19.dummyValue( - this, - Invocation.method( - #createRumor, - [ - senderKeyPair, - wrapperKey, - recipientPubKey, - content, - ], - ), - )), - ) as _i5.Future); - - @override - _i5.Future createSeal( - _i3.NostrKeyPairs? senderKeyPair, - String? wrapperKey, - String? recipientPubKey, - String? encryptedContent, - ) => - (super.noSuchMethod( - Invocation.method( - #createSeal, - [ - senderKeyPair, - wrapperKey, - recipientPubKey, - encryptedContent, - ], - ), - returnValue: _i5.Future.value(_i19.dummyValue( - this, - Invocation.method( - #createSeal, - [ - senderKeyPair, - wrapperKey, - recipientPubKey, - encryptedContent, - ], - ), - )), - ) as _i5.Future); - - @override - _i5.Future<_i3.NostrEvent> createWrap( - _i3.NostrKeyPairs? wrapperKeyPair, - String? sealedContent, - String? recipientPubKey, - ) => - (super.noSuchMethod( - Invocation.method( - #createWrap, - [ - wrapperKeyPair, - sealedContent, - recipientPubKey, - ], - ), - returnValue: _i5.Future<_i3.NostrEvent>.value(_FakeNostrEvent_2( - this, - Invocation.method( - #createWrap, - [ - wrapperKeyPair, - sealedContent, - recipientPubKey, - ], - ), - )), - ) as _i5.Future<_i3.NostrEvent>); - - @override - void unsubscribe(String? id) => super.noSuchMethod( - Invocation.method( - #unsubscribe, - [id], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future<_i20.Order?> fetchEventById( - String? eventId, [ - List? specificRelays, - ]) => - (super.noSuchMethod( - Invocation.method( - #fetchEventById, - [ - eventId, - specificRelays, - ], - ), - returnValue: _i5.Future<_i20.Order?>.value(), - ) as _i5.Future<_i20.Order?>); - - @override - _i5.Future<_i21.OrderInfo?> fetchOrderInfoByEventId( - String? eventId, [ - List? specificRelays, - ]) => - (super.noSuchMethod( - Invocation.method( - #fetchOrderInfoByEventId, - [ - eventId, - specificRelays, - ], - ), - returnValue: _i5.Future<_i21.OrderInfo?>.value(), - ) as _i5.Future<_i21.OrderInfo?>); -} - -/// A class which mocks [MostroService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockMostroService extends _i1.Mock implements _i12.MostroService { - MockMostroService() { - _i1.throwOnMissingStub(this); - } - - @override - _i4.Ref get ref => (super.noSuchMethod( - Invocation.getter(#ref), - returnValue: _FakeRef_3( - this, - Invocation.getter(#ref), - ), - ) as _i4.Ref); - - @override - void init() => super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future submitOrder(_i7.MostroMessage<_i7.Payload>? order) => - (super.noSuchMethod( - Invocation.method( - #submitOrder, - [order], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future takeBuyOrder( - String? orderId, - int? amount, - ) => - (super.noSuchMethod( - Invocation.method( - #takeBuyOrder, - [ - orderId, - amount, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future takeSellOrder( - String? orderId, - int? amount, - String? lnAddress, - ) => - (super.noSuchMethod( - Invocation.method( - #takeSellOrder, - [ - orderId, - amount, - lnAddress, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sendInvoice( - String? orderId, - String? invoice, - int? amount, - ) => - (super.noSuchMethod( - Invocation.method( - #sendInvoice, - [ - orderId, - invoice, - amount, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future cancelOrder(String? orderId) => (super.noSuchMethod( - Invocation.method( - #cancelOrder, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sendFiatSent(String? orderId) => (super.noSuchMethod( - Invocation.method( - #sendFiatSent, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future releaseOrder(String? orderId) => (super.noSuchMethod( - Invocation.method( - #releaseOrder, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future disputeOrder(String? orderId) => (super.noSuchMethod( - Invocation.method( - #disputeOrder, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future submitRating( - String? orderId, - int? rating, - ) => - (super.noSuchMethod( - Invocation.method( - #submitRating, - [ - orderId, - rating, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future publishOrder(_i7.MostroMessage<_i7.Payload>? order) => - (super.noSuchMethod( - Invocation.method( - #publishOrder, - [order], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void updateSettings(_i2.Settings? settings) => super.noSuchMethod( - Invocation.method( - #updateSettings, - [settings], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [OpenOrdersRepository]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockOpenOrdersRepository extends _i1.Mock - implements _i22.OpenOrdersRepository { - MockOpenOrdersRepository() { - _i1.throwOnMissingStub(this); - } - - @override - _i5.Stream> get eventsStream => (super.noSuchMethod( - Invocation.getter(#eventsStream), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future<_i3.NostrEvent?> getOrderById(String? orderId) => - (super.noSuchMethod( - Invocation.method( - #getOrderById, - [orderId], - ), - returnValue: _i5.Future<_i3.NostrEvent?>.value(), - ) as _i5.Future<_i3.NostrEvent?>); - - @override - _i5.Future addOrder(_i3.NostrEvent? order) => (super.noSuchMethod( - Invocation.method( - #addOrder, - [order], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteOrder(String? orderId) => (super.noSuchMethod( - Invocation.method( - #deleteOrder, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> getAllOrders() => (super.noSuchMethod( - Invocation.method( - #getAllOrders, - [], - ), - returnValue: _i5.Future>.value(<_i3.NostrEvent>[]), - ) as _i5.Future>); - - @override - _i5.Future updateOrder(_i3.NostrEvent? order) => (super.noSuchMethod( - Invocation.method( - #updateOrder, - [order], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void updateSettings(_i2.Settings? settings) => super.noSuchMethod( - Invocation.method( - #updateSettings, - [settings], - ), - returnValueForMissingStub: null, - ); - - @override - void reloadData() => super.noSuchMethod( - Invocation.method( - #reloadData, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void clearCache() => super.noSuchMethod( - Invocation.method( - #clearCache, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [SharedPreferencesAsync]. -/// -/// See the documentation for Mockito's code generation for more information. -// ignore: must_be_immutable -class MockSharedPreferencesAsync extends _i1.Mock - implements _i23.SharedPreferencesAsync { - MockSharedPreferencesAsync() { - _i1.throwOnMissingStub(this); - } - - @override - _i5.Future> getKeys({Set? allowList}) => - (super.noSuchMethod( - Invocation.method( - #getKeys, - [], - {#allowList: allowList}, - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); - - @override - _i5.Future> getAll({Set? allowList}) => - (super.noSuchMethod( - Invocation.method( - #getAll, - [], - {#allowList: allowList}, - ), - returnValue: - _i5.Future>.value({}), - ) as _i5.Future>); - - @override - _i5.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method( - #getBool, - [key], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getInt(String? key) => (super.noSuchMethod( - Invocation.method( - #getInt, - [key], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method( - #getDouble, - [key], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getString(String? key) => (super.noSuchMethod( - Invocation.method( - #getString, - [key], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future?> getStringList(String? key) => (super.noSuchMethod( - Invocation.method( - #getStringList, - [key], - ), - returnValue: _i5.Future?>.value(), - ) as _i5.Future?>); - - @override - _i5.Future containsKey(String? key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future setBool( - String? key, - bool? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setBool, - [ - key, - value, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future setInt( - String? key, - int? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setInt, - [ - key, - value, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future setDouble( - String? key, - double? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setDouble, - [ - key, - value, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future setString( - String? key, - String? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setString, - [ - key, - value, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future setStringList( - String? key, - List? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setStringList, - [ - key, - value, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future remove(String? key) => (super.noSuchMethod( - Invocation.method( - #remove, - [key], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future clear({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #clear, - [], - {#allowList: allowList}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [Database]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDatabase extends _i1.Mock implements _i6.Database { - MockDatabase() { - _i1.throwOnMissingStub(this); - } - - @override - int get version => (super.noSuchMethod( - Invocation.getter(#version), - returnValue: 0, - ) as int); - - @override - String get path => (super.noSuchMethod( - Invocation.getter(#path), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#path), - ), - ) as String); - - @override - _i5.Future transaction( - _i5.FutureOr Function(_i24.Transaction)? action) => - (super.noSuchMethod( - Invocation.method( - #transaction, - [action], - ), - returnValue: _i19.ifNotNull( - _i19.dummyValueOrNull( - this, - Invocation.method( - #transaction, - [action], - ), - ), - (T v) => _i5.Future.value(v), - ) ?? - _FakeFuture_4( - this, - Invocation.method( - #transaction, - [action], - ), - ), - ) as _i5.Future); - - @override - _i5.Future close() => (super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [SessionStorage]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockSessionStorage extends _i1.Mock implements _i25.SessionStorage { - MockSessionStorage() { - _i1.throwOnMissingStub(this); - } - - @override - _i6.Database get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeDatabase_5( - this, - Invocation.getter(#db), - ), - ) as _i6.Database); - - @override - _i6.StoreRef> get store => (super.noSuchMethod( - Invocation.getter(#store), - returnValue: _FakeStoreRef_6>( - this, - Invocation.getter(#store), - ), - ) as _i6.StoreRef>); - - @override - Map toDbMap(_i7.Session? session) => (super.noSuchMethod( - Invocation.method( - #toDbMap, - [session], - ), - returnValue: {}, - ) as Map); - - @override - _i7.Session fromDbMap( - String? key, - Map? jsonMap, - ) => - (super.noSuchMethod( - Invocation.method( - #fromDbMap, - [ - key, - jsonMap, - ], - ), - returnValue: _FakeSession_7( - this, - Invocation.method( - #fromDbMap, - [ - key, - jsonMap, - ], - ), - ), - ) as _i7.Session); - - @override - _i5.Future putSession(_i7.Session? session) => (super.noSuchMethod( - Invocation.method( - #putSession, - [session], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i7.Session?> getSession(String? sessionId) => (super.noSuchMethod( - Invocation.method( - #getSession, - [sessionId], - ), - returnValue: _i5.Future<_i7.Session?>.value(), - ) as _i5.Future<_i7.Session?>); - - @override - _i5.Future> getAllSessions() => (super.noSuchMethod( - Invocation.method( - #getAllSessions, - [], - ), - returnValue: _i5.Future>.value(<_i7.Session>[]), - ) as _i5.Future>); - - @override - _i5.Future deleteSession(String? sessionId) => (super.noSuchMethod( - Invocation.method( - #deleteSession, - [sessionId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Stream<_i7.Session?> watchSession(String? sessionId) => - (super.noSuchMethod( - Invocation.method( - #watchSession, - [sessionId], - ), - returnValue: _i5.Stream<_i7.Session?>.empty(), - ) as _i5.Stream<_i7.Session?>); - - @override - _i5.Stream> watchAllSessions() => (super.noSuchMethod( - Invocation.method( - #watchAllSessions, - [], - ), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); - - @override - _i5.Future putItem( - String? id, - _i7.Session? item, - ) => - (super.noSuchMethod( - Invocation.method( - #putItem, - [ - id, - item, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i7.Session?> getItem(String? id) => (super.noSuchMethod( - Invocation.method( - #getItem, - [id], - ), - returnValue: _i5.Future<_i7.Session?>.value(), - ) as _i5.Future<_i7.Session?>); - - @override - _i5.Future hasItem(String? id) => (super.noSuchMethod( - Invocation.method( - #hasItem, - [id], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future deleteItem(String? id) => (super.noSuchMethod( - Invocation.method( - #deleteItem, - [id], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteAll() => (super.noSuchMethod( - Invocation.method( - #deleteAll, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteWhere(_i6.Filter? filter) => (super.noSuchMethod( - Invocation.method( - #deleteWhere, - [filter], - ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); - - @override - _i5.Future> find({ - _i6.Filter? filter, - List<_i6.SortOrder>? sort, - int? limit, - int? offset, - }) => - (super.noSuchMethod( - Invocation.method( - #find, - [], - { - #filter: filter, - #sort: sort, - #limit: limit, - #offset: offset, - }, - ), - returnValue: _i5.Future>.value(<_i7.Session>[]), - ) as _i5.Future>); - - @override - _i5.Future> getAll() => (super.noSuchMethod( - Invocation.method( - #getAll, - [], - ), - returnValue: _i5.Future>.value(<_i7.Session>[]), - ) as _i5.Future>); - - @override - _i5.Stream> watch({ - _i6.Filter? filter, - List<_i6.SortOrder>? sort, - }) => - (super.noSuchMethod( - Invocation.method( - #watch, - [], - { - #filter: filter, - #sort: sort, - }, - ), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); - - @override - _i5.Stream<_i7.Session?> watchById(String? id) => (super.noSuchMethod( - Invocation.method( - #watchById, - [id], - ), - returnValue: _i5.Stream<_i7.Session?>.empty(), - ) as _i5.Stream<_i7.Session?>); - - @override - _i6.Filter eq( - String? field, - Object? value, - ) => - (super.noSuchMethod( - Invocation.method( - #eq, - [ - field, - value, - ], - ), - returnValue: _FakeFilter_8( - this, - Invocation.method( - #eq, - [ - field, - value, - ], - ), - ), - ) as _i6.Filter); -} - -/// A class which mocks [KeyManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockKeyManager extends _i1.Mock implements _i26.KeyManager { - MockKeyManager() { - _i1.throwOnMissingStub(this); - } - - @override - set masterKeyPair(_i3.NostrKeyPairs? _masterKeyPair) => super.noSuchMethod( - Invocation.setter( - #masterKeyPair, - _masterKeyPair, - ), - returnValueForMissingStub: null, - ); - - @override - set tradeKeyIndex(int? _tradeKeyIndex) => super.noSuchMethod( - Invocation.setter( - #tradeKeyIndex, - _tradeKeyIndex, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future hasMasterKey() => (super.noSuchMethod( - Invocation.method( - #hasMasterKey, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future generateAndStoreMasterKey() => (super.noSuchMethod( - Invocation.method( - #generateAndStoreMasterKey, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future generateAndStoreMasterKeyFromMnemonic(String? mnemonic) => - (super.noSuchMethod( - Invocation.method( - #generateAndStoreMasterKeyFromMnemonic, - [mnemonic], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future importMnemonic(String? mnemonic) => (super.noSuchMethod( - Invocation.method( - #importMnemonic, - [mnemonic], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getMnemonic() => (super.noSuchMethod( - Invocation.method( - #getMnemonic, - [], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i3.NostrKeyPairs> deriveTradeKey() => (super.noSuchMethod( - Invocation.method( - #deriveTradeKey, - [], - ), - returnValue: _i5.Future<_i3.NostrKeyPairs>.value(_FakeNostrKeyPairs_1( - this, - Invocation.method( - #deriveTradeKey, - [], - ), - )), - ) as _i5.Future<_i3.NostrKeyPairs>); - - @override - _i3.NostrKeyPairs deriveTradeKeyPair(int? index) => (super.noSuchMethod( - Invocation.method( - #deriveTradeKeyPair, - [index], - ), - returnValue: _FakeNostrKeyPairs_1( - this, - Invocation.method( - #deriveTradeKeyPair, - [index], - ), - ), - ) as _i3.NostrKeyPairs); - - @override - _i5.Future<_i3.NostrKeyPairs> deriveTradeKeyFromIndex(int? index) => - (super.noSuchMethod( - Invocation.method( - #deriveTradeKeyFromIndex, - [index], - ), - returnValue: _i5.Future<_i3.NostrKeyPairs>.value(_FakeNostrKeyPairs_1( - this, - Invocation.method( - #deriveTradeKeyFromIndex, - [index], - ), - )), - ) as _i5.Future<_i3.NostrKeyPairs>); - - @override - _i5.Future getCurrentKeyIndex() => (super.noSuchMethod( - Invocation.method( - #getCurrentKeyIndex, - [], - ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); - - @override - _i5.Future getNextKeyIndex() => (super.noSuchMethod( - Invocation.method( - #getNextKeyIndex, - [], - ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); - - @override - _i5.Future setCurrentKeyIndex(int? index) => (super.noSuchMethod( - Invocation.method( - #setCurrentKeyIndex, - [index], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [MostroStorage]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockMostroStorage extends _i1.Mock implements _i27.MostroStorage { - MockMostroStorage() { - _i1.throwOnMissingStub(this); - } - - @override - _i6.Database get db => (super.noSuchMethod( - Invocation.getter(#db), - returnValue: _FakeDatabase_5( - this, - Invocation.getter(#db), - ), - ) as _i6.Database); - - @override - _i6.StoreRef> get store => (super.noSuchMethod( - Invocation.getter(#store), - returnValue: _FakeStoreRef_6>( - this, - Invocation.getter(#store), - ), - ) as _i6.StoreRef>); - - @override - _i5.Future addMessage( - String? key, - _i7.MostroMessage<_i7.Payload>? message, - ) => - (super.noSuchMethod( - Invocation.method( - #addMessage, - [ - key, - message, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future>> getAllMessages() => - (super.noSuchMethod( - Invocation.method( - #getAllMessages, - [], - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i5.Future deleteAllMessages() => (super.noSuchMethod( - Invocation.method( - #deleteAllMessages, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteAllMessagesByOrderId(String? orderId) => - (super.noSuchMethod( - Invocation.method( - #deleteAllMessagesByOrderId, - [orderId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future>> - getMessagesOfType() => (super.noSuchMethod( - Invocation.method( - #getMessagesOfType, - [], - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i5.Future<_i7.MostroMessage<_i7.Payload>?> - getLatestMessageOfTypeById(String? orderId) => - (super.noSuchMethod( - Invocation.method( - #getLatestMessageOfTypeById, - [orderId], - ), - returnValue: _i5.Future<_i7.MostroMessage<_i7.Payload>?>.value(), - ) as _i5.Future<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Future>> getMessagesForId( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #getMessagesForId, - [orderId], - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i7.MostroMessage<_i7.Payload> fromDbMap( - String? key, - Map? jsonMap, - ) => - (super.noSuchMethod( - Invocation.method( - #fromDbMap, - [ - key, - jsonMap, - ], - ), - returnValue: _FakeMostroMessage_9<_i7.Payload>( - this, - Invocation.method( - #fromDbMap, - [ - key, - jsonMap, - ], - ), - ), - ) as _i7.MostroMessage<_i7.Payload>); - - @override - Map toDbMap(_i7.MostroMessage<_i7.Payload>? item) => - (super.noSuchMethod( - Invocation.method( - #toDbMap, - [item], - ), - returnValue: {}, - ) as Map); - - @override - _i5.Future hasMessageByKey(String? key) => (super.noSuchMethod( - Invocation.method( - #hasMessageByKey, - [key], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future<_i7.MostroMessage<_i7.Payload>?> getLatestMessageById( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #getLatestMessageById, - [orderId], - ), - returnValue: _i5.Future<_i7.MostroMessage<_i7.Payload>?>.value(), - ) as _i5.Future<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Stream<_i7.MostroMessage<_i7.Payload>?> watchLatestMessage( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #watchLatestMessage, - [orderId], - ), - returnValue: _i5.Stream<_i7.MostroMessage<_i7.Payload>?>.empty(), - ) as _i5.Stream<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Stream<_i7.MostroMessage<_i7.Payload>?> watchLatestMessageOfType( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #watchLatestMessageOfType, - [orderId], - ), - returnValue: _i5.Stream<_i7.MostroMessage<_i7.Payload>?>.empty(), - ) as _i5.Stream<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Stream>> watchAllMessages( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #watchAllMessages, - [orderId], - ), - returnValue: _i5.Stream>>.empty(), - ) as _i5.Stream>>); - - @override - _i5.Stream<_i7.MostroMessage<_i7.Payload>?> watchByRequestId( - int? requestId) => - (super.noSuchMethod( - Invocation.method( - #watchByRequestId, - [requestId], - ), - returnValue: _i5.Stream<_i7.MostroMessage<_i7.Payload>?>.empty(), - ) as _i5.Stream<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Future>> getAllMessagesForOrderId( - String? orderId) => - (super.noSuchMethod( - Invocation.method( - #getAllMessagesForOrderId, - [orderId], - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i5.Future putItem( - String? id, - _i7.MostroMessage<_i7.Payload>? item, - ) => - (super.noSuchMethod( - Invocation.method( - #putItem, - [ - id, - item, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i7.MostroMessage<_i7.Payload>?> getItem(String? id) => - (super.noSuchMethod( - Invocation.method( - #getItem, - [id], - ), - returnValue: _i5.Future<_i7.MostroMessage<_i7.Payload>?>.value(), - ) as _i5.Future<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i5.Future hasItem(String? id) => (super.noSuchMethod( - Invocation.method( - #hasItem, - [id], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future deleteItem(String? id) => (super.noSuchMethod( - Invocation.method( - #deleteItem, - [id], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteAll() => (super.noSuchMethod( - Invocation.method( - #deleteAll, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteWhere(_i6.Filter? filter) => (super.noSuchMethod( - Invocation.method( - #deleteWhere, - [filter], - ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); - - @override - _i5.Future>> find({ - _i6.Filter? filter, - List<_i6.SortOrder>? sort, - int? limit, - int? offset, - }) => - (super.noSuchMethod( - Invocation.method( - #find, - [], - { - #filter: filter, - #sort: sort, - #limit: limit, - #offset: offset, - }, - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i5.Future>> getAll() => - (super.noSuchMethod( - Invocation.method( - #getAll, - [], - ), - returnValue: _i5.Future>>.value( - <_i7.MostroMessage<_i7.Payload>>[]), - ) as _i5.Future>>); - - @override - _i5.Stream>> watch({ - _i6.Filter? filter, - List<_i6.SortOrder>? sort, - }) => - (super.noSuchMethod( - Invocation.method( - #watch, - [], - { - #filter: filter, - #sort: sort, - }, - ), - returnValue: _i5.Stream>>.empty(), - ) as _i5.Stream>>); - - @override - _i5.Stream<_i7.MostroMessage<_i7.Payload>?> watchById(String? id) => - (super.noSuchMethod( - Invocation.method( - #watchById, - [id], - ), - returnValue: _i5.Stream<_i7.MostroMessage<_i7.Payload>?>.empty(), - ) as _i5.Stream<_i7.MostroMessage<_i7.Payload>?>); - - @override - _i6.Filter eq( - String? field, - Object? value, - ) => - (super.noSuchMethod( - Invocation.method( - #eq, - [ - field, - value, - ], - ), - returnValue: _FakeFilter_8( - this, - Invocation.method( - #eq, - [ - field, - value, - ], - ), - ), - ) as _i6.Filter); -} - -/// A class which mocks [Settings]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockSettings extends _i1.Mock implements _i2.Settings { - MockSettings() { - _i1.throwOnMissingStub(this); - } - - @override - bool get fullPrivacyMode => (super.noSuchMethod( - Invocation.getter(#fullPrivacyMode), - returnValue: false, - ) as bool); - - @override - List get relays => (super.noSuchMethod( - Invocation.getter(#relays), - returnValue: [], - ) as List); - - @override - String get mostroPublicKey => (super.noSuchMethod( - Invocation.getter(#mostroPublicKey), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#mostroPublicKey), - ), - ) as String); - - @override - List get blacklistedRelays => (super.noSuchMethod( - Invocation.getter(#blacklistedRelays), - returnValue: [], - ) as List); - - @override - List> get userRelays => (super.noSuchMethod( - Invocation.getter(#userRelays), - returnValue: >[], - ) as List>); - - @override - bool get isLoggingEnabled => (super.noSuchMethod( - Invocation.getter(#isLoggingEnabled), - returnValue: false, - ) as bool); - - @override - bool get pushNotificationsEnabled => (super.noSuchMethod( - Invocation.getter(#pushNotificationsEnabled), - returnValue: false, - ) as bool); - - @override - bool get notificationSoundEnabled => (super.noSuchMethod( - Invocation.getter(#notificationSoundEnabled), - returnValue: false, - ) as bool); - - @override - bool get notificationVibrationEnabled => (super.noSuchMethod( - Invocation.getter(#notificationVibrationEnabled), - returnValue: false, - ) as bool); - - @override - _i2.Settings copyWith({ - List? relays, - bool? privacyModeSetting, - String? mostroPublicKey, - String? defaultFiatCode, - String? selectedLanguage, - String? defaultLightningAddress, - bool? clearDefaultLightningAddress = false, - List? blacklistedRelays, - List>? userRelays, - bool? isLoggingEnabled, - bool? pushNotificationsEnabled, - bool? notificationSoundEnabled, - bool? notificationVibrationEnabled, - }) => - (super.noSuchMethod( - Invocation.method( - #copyWith, - [], - { - #relays: relays, - #privacyModeSetting: privacyModeSetting, - #mostroPublicKey: mostroPublicKey, - #defaultFiatCode: defaultFiatCode, - #selectedLanguage: selectedLanguage, - #defaultLightningAddress: defaultLightningAddress, - #clearDefaultLightningAddress: clearDefaultLightningAddress, - #blacklistedRelays: blacklistedRelays, - #userRelays: userRelays, - #isLoggingEnabled: isLoggingEnabled, - #pushNotificationsEnabled: pushNotificationsEnabled, - #notificationSoundEnabled: notificationSoundEnabled, - #notificationVibrationEnabled: notificationVibrationEnabled, - }, - ), - returnValue: _FakeSettings_0( - this, - Invocation.method( - #copyWith, - [], - { - #relays: relays, - #privacyModeSetting: privacyModeSetting, - #mostroPublicKey: mostroPublicKey, - #defaultFiatCode: defaultFiatCode, - #selectedLanguage: selectedLanguage, - #defaultLightningAddress: defaultLightningAddress, - #clearDefaultLightningAddress: clearDefaultLightningAddress, - #blacklistedRelays: blacklistedRelays, - #userRelays: userRelays, - #isLoggingEnabled: isLoggingEnabled, - #pushNotificationsEnabled: pushNotificationsEnabled, - #notificationSoundEnabled: notificationSoundEnabled, - #notificationVibrationEnabled: notificationVibrationEnabled, - }, - ), - ), - ) as _i2.Settings); - - @override - Map toJson() => (super.noSuchMethod( - Invocation.method( - #toJson, - [], - ), - returnValue: {}, - ) as Map); -} - -/// A class which mocks [Ref]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockRef extends _i1.Mock - implements _i4.Ref { - MockRef() { - _i1.throwOnMissingStub(this); - } - - @override - _i4.ProviderContainer get container => (super.noSuchMethod( - Invocation.getter(#container), - returnValue: _FakeProviderContainer_10( - this, - Invocation.getter(#container), - ), - ) as _i4.ProviderContainer); - - @override - T refresh(_i4.Refreshable? provider) => (super.noSuchMethod( - Invocation.method( - #refresh, - [provider], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #refresh, - [provider], - ), - ), - ) as T); - - @override - void invalidate(_i4.ProviderOrFamily? provider) => super.noSuchMethod( - Invocation.method( - #invalidate, - [provider], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void listenSelf( - void Function( - State?, - State, - )? listener, { - void Function( - Object, - StackTrace, - )? onError, - }) => - super.noSuchMethod( - Invocation.method( - #listenSelf, - [listener], - {#onError: onError}, - ), - returnValueForMissingStub: null, - ); - - @override - void invalidateSelf() => super.noSuchMethod( - Invocation.method( - #invalidateSelf, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void onAddListener(void Function()? cb) => super.noSuchMethod( - Invocation.method( - #onAddListener, - [cb], - ), - returnValueForMissingStub: null, - ); - - @override - void onRemoveListener(void Function()? cb) => super.noSuchMethod( - Invocation.method( - #onRemoveListener, - [cb], - ), - returnValueForMissingStub: null, - ); - - @override - void onResume(void Function()? cb) => super.noSuchMethod( - Invocation.method( - #onResume, - [cb], - ), - returnValueForMissingStub: null, - ); - - @override - void onCancel(void Function()? cb) => super.noSuchMethod( - Invocation.method( - #onCancel, - [cb], - ), - returnValueForMissingStub: null, - ); - - @override - void onDispose(void Function()? cb) => super.noSuchMethod( - Invocation.method( - #onDispose, - [cb], - ), - returnValueForMissingStub: null, - ); - - @override - T read(_i4.ProviderListenable? provider) => (super.noSuchMethod( - Invocation.method( - #read, - [provider], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #read, - [provider], - ), - ), - ) as T); - - @override - bool exists(_i4.ProviderBase? provider) => (super.noSuchMethod( - Invocation.method( - #exists, - [provider], - ), - returnValue: false, - ) as bool); - - @override - T watch(_i4.ProviderListenable? provider) => (super.noSuchMethod( - Invocation.method( - #watch, - [provider], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #watch, - [provider], - ), - ), - ) as T); - - @override - _i4.KeepAliveLink keepAlive() => (super.noSuchMethod( - Invocation.method( - #keepAlive, - [], - ), - returnValue: _FakeKeepAliveLink_11( - this, - Invocation.method( - #keepAlive, - [], - ), - ), - ) as _i4.KeepAliveLink); - - @override - _i4.ProviderSubscription listen( - _i4.ProviderListenable? provider, - void Function( - T?, - T, - )? listener, { - void Function( - Object, - StackTrace, - )? onError, - bool? fireImmediately, - }) => - (super.noSuchMethod( - Invocation.method( - #listen, - [ - provider, - listener, - ], - { - #onError: onError, - #fireImmediately: fireImmediately, - }, - ), - returnValue: _FakeProviderSubscription_12( - this, - Invocation.method( - #listen, - [ - provider, - listener, - ], - { - #onError: onError, - #fireImmediately: fireImmediately, - }, - ), - ), - ) as _i4.ProviderSubscription); -} - -/// A class which mocks [ProviderSubscription]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockProviderSubscription extends _i1.Mock - implements _i4.ProviderSubscription { - MockProviderSubscription() { - _i1.throwOnMissingStub(this); - } - - @override - _i8.Node get source => (super.noSuchMethod( - Invocation.getter(#source), - returnValue: _FakeNode_13( - this, - Invocation.getter(#source), - ), - ) as _i8.Node); - - @override - bool get closed => (super.noSuchMethod( - Invocation.getter(#closed), - returnValue: false, - ) as bool); - - @override - State read() => (super.noSuchMethod( - Invocation.method( - #read, - [], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #read, - [], - ), - ), - ) as State); - - @override - void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [RelaysNotifier]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockRelaysNotifier extends _i1.Mock implements _i10.RelaysNotifier { - MockRelaysNotifier() { - _i1.throwOnMissingStub(this); - } - - @override - _i9.SettingsNotifier get settings => (super.noSuchMethod( - Invocation.getter(#settings), - returnValue: _FakeSettingsNotifier_14( - this, - Invocation.getter(#settings), - ), - ) as _i9.SettingsNotifier); - - @override - _i4.Ref get ref => (super.noSuchMethod( - Invocation.getter(#ref), - returnValue: _FakeRef_3( - this, - Invocation.getter(#ref), - ), - ) as _i4.Ref); - - @override - List get blacklistedRelays => (super.noSuchMethod( - Invocation.getter(#blacklistedRelays), - returnValue: [], - ) as List); - - @override - List<_i28.MostroRelayInfo> get mostroRelaysWithStatus => (super.noSuchMethod( - Invocation.getter(#mostroRelaysWithStatus), - returnValue: <_i28.MostroRelayInfo>[], - ) as List<_i28.MostroRelayInfo>); - - @override - bool get mounted => (super.noSuchMethod( - Invocation.getter(#mounted), - returnValue: false, - ) as bool); - - @override - _i5.Stream> get stream => (super.noSuchMethod( - Invocation.getter(#stream), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); - - @override - List<_i28.Relay> get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: <_i28.Relay>[], - ) as List<_i28.Relay>); - - @override - List<_i28.Relay> get debugState => (super.noSuchMethod( - Invocation.getter(#debugState), - returnValue: <_i28.Relay>[], - ) as List<_i28.Relay>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - set onError(_i4.ErrorListener? _onError) => super.noSuchMethod( - Invocation.setter( - #onError, - _onError, - ), - returnValueForMissingStub: null, - ); - - @override - set state(List<_i28.Relay>? value) => super.noSuchMethod( - Invocation.setter( - #state, - value, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future addRelay(_i28.Relay? relay) => (super.noSuchMethod( - Invocation.method( - #addRelay, - [relay], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateRelay( - _i28.Relay? oldRelay, - _i28.Relay? updatedRelay, - ) => - (super.noSuchMethod( - Invocation.method( - #updateRelay, - [ - oldRelay, - updatedRelay, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future removeRelay(String? url) => (super.noSuchMethod( - Invocation.method( - #removeRelay, - [url], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - String? normalizeRelayUrl(String? input) => - (super.noSuchMethod(Invocation.method( - #normalizeRelayUrl, - [input], - )) as String?); - - @override - bool isValidDomainFormat(String? input) => (super.noSuchMethod( - Invocation.method( - #isValidDomainFormat, - [input], - ), - returnValue: false, - ) as bool); - - @override - _i5.Future testRelayConnectivity(String? url) => (super.noSuchMethod( - Invocation.method( - #testRelayConnectivity, - [url], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future<_i10.RelayValidationResult> addRelayWithSmartValidation( - String? input, { - required String? errorOnlySecure, - required String? errorNoHttp, - required String? errorInvalidDomain, - required String? errorAlreadyExists, - required String? errorNotValid, - }) => - (super.noSuchMethod( - Invocation.method( - #addRelayWithSmartValidation, - [input], - { - #errorOnlySecure: errorOnlySecure, - #errorNoHttp: errorNoHttp, - #errorInvalidDomain: errorInvalidDomain, - #errorAlreadyExists: errorAlreadyExists, - #errorNotValid: errorNotValid, - }, - ), - returnValue: _i5.Future<_i10.RelayValidationResult>.value( - _FakeRelayValidationResult_15( - this, - Invocation.method( - #addRelayWithSmartValidation, - [input], - { - #errorOnlySecure: errorOnlySecure, - #errorNoHttp: errorNoHttp, - #errorInvalidDomain: errorInvalidDomain, - #errorAlreadyExists: errorAlreadyExists, - #errorNotValid: errorNotValid, - }, - ), - )), - ) as _i5.Future<_i10.RelayValidationResult>); - - @override - _i5.Future refreshRelayHealth() => (super.noSuchMethod( - Invocation.method( - #refreshRelayHealth, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future syncWithMostroInstance() => (super.noSuchMethod( - Invocation.method( - #syncWithMostroInstance, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future removeRelayWithBlacklist(String? url) => (super.noSuchMethod( - Invocation.method( - #removeRelayWithBlacklist, - [url], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - bool isRelayBlacklisted(String? url) => (super.noSuchMethod( - Invocation.method( - #isRelayBlacklisted, - [url], - ), - returnValue: false, - ) as bool); - - @override - bool wouldLeaveNoActiveRelays(String? urlToBlacklist) => (super.noSuchMethod( - Invocation.method( - #wouldLeaveNoActiveRelays, - [urlToBlacklist], - ), - returnValue: false, - ) as bool); - - @override - _i5.Future toggleMostroRelayBlacklist(String? url) => - (super.noSuchMethod( - Invocation.method( - #toggleMostroRelayBlacklist, - [url], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future clearBlacklistAndResync() => (super.noSuchMethod( - Invocation.method( - #clearBlacklistAndResync, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - bool updateShouldNotify( - List<_i28.Relay>? old, - List<_i28.Relay>? current, - ) => - (super.noSuchMethod( - Invocation.method( - #updateShouldNotify, - [ - old, - current, - ], - ), - returnValue: false, - ) as bool); - - @override - _i4.RemoveListener addListener( - _i29.Listener>? listener, { - bool? fireImmediately = true, - }) => - (super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - {#fireImmediately: fireImmediately}, - ), - returnValue: () {}, - ) as _i4.RemoveListener); -} - -/// A class which mocks [OrderState]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockOrderState extends _i1.Mock implements _i11.OrderState { - MockOrderState() { - _i1.throwOnMissingStub(this); - } - - @override - _i30.Status get status => (super.noSuchMethod( - Invocation.getter(#status), - returnValue: _i30.Status.active, - ) as _i30.Status); - - @override - _i30.Action get action => (super.noSuchMethod( - Invocation.getter(#action), - returnValue: _i30.Action.newOrder, - ) as _i30.Action); - - @override - _i11.OrderState copyWith({ - _i30.Status? status, - _i30.Action? action, - _i20.Order? order, - _i7.PaymentRequest? paymentRequest, - _i7.CantDo? cantDo, - _i7.Dispute? dispute, - _i7.Peer? peer, - _i7.PaymentFailed? paymentFailed, - }) => - (super.noSuchMethod( - Invocation.method( - #copyWith, - [], - { - #status: status, - #action: action, - #order: order, - #paymentRequest: paymentRequest, - #cantDo: cantDo, - #dispute: dispute, - #peer: peer, - #paymentFailed: paymentFailed, - }, - ), - returnValue: _FakeOrderState_16( - this, - Invocation.method( - #copyWith, - [], - { - #status: status, - #action: action, - #order: order, - #paymentRequest: paymentRequest, - #cantDo: cantDo, - #dispute: dispute, - #peer: peer, - #paymentFailed: paymentFailed, - }, - ), - ), - ) as _i11.OrderState); - - @override - _i11.OrderState updateWith(_i7.MostroMessage<_i7.Payload>? message) => - (super.noSuchMethod( - Invocation.method( - #updateWith, - [message], - ), - returnValue: _FakeOrderState_16( - this, - Invocation.method( - #updateWith, - [message], - ), - ), - ) as _i11.OrderState); - - @override - List<_i30.Action> getActions(_i30.Role? role) => (super.noSuchMethod( - Invocation.method( - #getActions, - [role], - ), - returnValue: <_i30.Action>[], - ) as List<_i30.Action>); -} - -/// A class which mocks [OrderNotifier]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockOrderNotifier extends _i1.Mock implements _i31.OrderNotifier { - MockOrderNotifier() { - _i1.throwOnMissingStub(this); - } - - @override - _i12.MostroService get mostroService => (super.noSuchMethod( - Invocation.getter(#mostroService), - returnValue: _FakeMostroService_17( - this, - Invocation.getter(#mostroService), - ), - ) as _i12.MostroService); - - @override - set mostroService(_i12.MostroService? _mostroService) => super.noSuchMethod( - Invocation.setter( - #mostroService, - _mostroService, - ), - returnValueForMissingStub: null, - ); - - @override - String get orderId => (super.noSuchMethod( - Invocation.getter(#orderId), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#orderId), - ), - ) as String); - - @override - _i4.Ref get ref => (super.noSuchMethod( - Invocation.getter(#ref), - returnValue: _FakeRef_3( - this, - Invocation.getter(#ref), - ), - ) as _i4.Ref); - - @override - _i13.Logger get logger => (super.noSuchMethod( - Invocation.getter(#logger), - returnValue: _FakeLogger_18( - this, - Invocation.getter(#logger), - ), - ) as _i13.Logger); - - @override - _i7.Session get session => (super.noSuchMethod( - Invocation.getter(#session), - returnValue: _FakeSession_7( - this, - Invocation.getter(#session), - ), - ) as _i7.Session); - - @override - set session(_i7.Session? _session) => super.noSuchMethod( - Invocation.setter( - #session, - _session, - ), - returnValueForMissingStub: null, - ); - - @override - set subscription( - _i4.ProviderSubscription< - _i4.AsyncValue<_i7.MostroMessage<_i7.Payload>?>>? - _subscription) => - super.noSuchMethod( - Invocation.setter( - #subscription, - _subscription, - ), - returnValueForMissingStub: null, - ); - - @override - bool get mounted => (super.noSuchMethod( - Invocation.getter(#mounted), - returnValue: false, - ) as bool); - - @override - _i5.Stream<_i11.OrderState> get stream => (super.noSuchMethod( - Invocation.getter(#stream), - returnValue: _i5.Stream<_i11.OrderState>.empty(), - ) as _i5.Stream<_i11.OrderState>); - - @override - _i11.OrderState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _FakeOrderState_16( - this, - Invocation.getter(#state), - ), - ) as _i11.OrderState); - - @override - _i11.OrderState get debugState => (super.noSuchMethod( - Invocation.getter(#debugState), - returnValue: _FakeOrderState_16( - this, - Invocation.getter(#debugState), - ), - ) as _i11.OrderState); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - set onError(_i4.ErrorListener? _onError) => super.noSuchMethod( - Invocation.setter( - #onError, - _onError, - ), - returnValueForMissingStub: null, - ); - - @override - set state(_i11.OrderState? value) => super.noSuchMethod( - Invocation.setter( - #state, - value, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future handleEvent( - _i7.MostroMessage<_i7.Payload>? event, { - bool? bypassTimestampGate = false, - }) => - (super.noSuchMethod( - Invocation.method( - #handleEvent, - [event], - {#bypassTimestampGate: bypassTimestampGate}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sync() => (super.noSuchMethod( - Invocation.method( - #sync, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future takeSellOrder( - String? orderId, - int? amount, - String? lnAddress, - ) => - (super.noSuchMethod( - Invocation.method( - #takeSellOrder, - [ - orderId, - amount, - lnAddress, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future takeBuyOrder( - String? orderId, - int? amount, - ) => - (super.noSuchMethod( - Invocation.method( - #takeBuyOrder, - [ - orderId, - amount, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sendInvoice( - String? orderId, - String? invoice, - int? amount, - ) => - (super.noSuchMethod( - Invocation.method( - #sendInvoice, - [ - orderId, - invoice, - amount, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future cancelOrder() => (super.noSuchMethod( - Invocation.method( - #cancelOrder, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sendFiatSent() => (super.noSuchMethod( - Invocation.method( - #sendFiatSent, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future releaseOrder() => (super.noSuchMethod( - Invocation.method( - #releaseOrder, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future disputeOrder() => (super.noSuchMethod( - Invocation.method( - #disputeOrder, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future submitRating(int? rating) => (super.noSuchMethod( - Invocation.method( - #submitRating, - [rating], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void updateStateFromMessage(_i7.MostroMessage<_i7.Payload>? message) => - super.noSuchMethod( - Invocation.method( - #updateStateFromMessage, - [message], - ), - returnValueForMissingStub: null, - ); - - @override - void updateDispute(_i7.Dispute? dispute) => super.noSuchMethod( - Invocation.method( - #updateDispute, - [dispute], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void subscribe() => super.noSuchMethod( - Invocation.method( - #subscribe, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void handleError( - Object? err, - StackTrace? stack, - ) => - super.noSuchMethod( - Invocation.method( - #handleError, - [ - err, - stack, - ], - ), - returnValueForMissingStub: null, - ); - - @override - void sendNotification( - _i30.Action? action, { - Map? values, - bool? isTemporary = false, - String? eventId, - }) => - super.noSuchMethod( - Invocation.method( - #sendNotification, - [action], - { - #values: values, - #isTemporary: isTemporary, - #eventId: eventId, - }, - ), - returnValueForMissingStub: null, - ); - - @override - bool updateShouldNotify( - _i11.OrderState? old, - _i11.OrderState? current, - ) => - (super.noSuchMethod( - Invocation.method( - #updateShouldNotify, - [ - old, - current, - ], - ), - returnValue: false, - ) as bool); - - @override - _i4.RemoveListener addListener( - _i29.Listener<_i11.OrderState>? listener, { - bool? fireImmediately = true, - }) => - (super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - {#fireImmediately: fireImmediately}, - ), - returnValue: () {}, - ) as _i4.RemoveListener); -} - -/// A class which mocks [NostrKeyPairs]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockNostrKeyPairs extends _i1.Mock implements _i3.NostrKeyPairs { - MockNostrKeyPairs() { - _i1.throwOnMissingStub(this); - } - - @override - String get private => (super.noSuchMethod( - Invocation.getter(#private), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#private), - ), - ) as String); - - @override - String get public => (super.noSuchMethod( - Invocation.getter(#public), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#public), - ), - ) as String); - - @override - List get props => (super.noSuchMethod( - Invocation.getter(#props), - returnValue: [], - ) as List); - - @override - set public(String? _public) => super.noSuchMethod( - Invocation.setter( - #public, - _public, - ), - returnValueForMissingStub: null, - ); - - @override - String sign(String? message) => (super.noSuchMethod( - Invocation.method( - #sign, - [message], - ), - returnValue: _i19.dummyValue( - this, - Invocation.method( - #sign, - [message], - ), - ), - ) as String); -} - -/// A class which mocks [BlossomClient]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockBlossomClient extends _i1.Mock implements _i32.BlossomClient { - MockBlossomClient() { - _i1.throwOnMissingStub(this); - } - - @override - String get serverUrl => (super.noSuchMethod( - Invocation.getter(#serverUrl), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#serverUrl), - ), - ) as String); - - @override - Duration get timeout => (super.noSuchMethod( - Invocation.getter(#timeout), - returnValue: _FakeDuration_19( - this, - Invocation.getter(#timeout), - ), - ) as Duration); - - @override - _i5.Future uploadImage({ - required _i33.Uint8List? imageData, - required String? mimeType, - }) => - (super.noSuchMethod( - Invocation.method( - #uploadImage, - [], - { - #imageData: imageData, - #mimeType: mimeType, - }, - ), - returnValue: _i5.Future.value(_i19.dummyValue( - this, - Invocation.method( - #uploadImage, - [], - { - #imageData: imageData, - #mimeType: mimeType, - }, - ), - )), - ) as _i5.Future); -} - -/// A class which mocks [EncryptedFileUploadService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockEncryptedFileUploadService extends _i1.Mock - implements _i14.EncryptedFileUploadService { - MockEncryptedFileUploadService() { - _i1.throwOnMissingStub(this); - } - - @override - _i5.Future<_i14.EncryptedFileUploadResult> uploadEncryptedFile({ - required _i34.File? file, - required _i33.Uint8List? sharedKey, - }) => - (super.noSuchMethod( - Invocation.method( - #uploadEncryptedFile, - [], - { - #file: file, - #sharedKey: sharedKey, - }, - ), - returnValue: _i5.Future<_i14.EncryptedFileUploadResult>.value( - _FakeEncryptedFileUploadResult_20( - this, - Invocation.method( - #uploadEncryptedFile, - [], - { - #file: file, - #sharedKey: sharedKey, - }, - ), - )), - ) as _i5.Future<_i14.EncryptedFileUploadResult>); - - @override - _i5.Future<_i33.Uint8List> downloadAndDecryptFile({ - required String? blossomUrl, - required _i33.Uint8List? sharedKey, - }) => - (super.noSuchMethod( - Invocation.method( - #downloadAndDecryptFile, - [], - { - #blossomUrl: blossomUrl, - #sharedKey: sharedKey, - }, - ), - returnValue: _i5.Future<_i33.Uint8List>.value(_i33.Uint8List(0)), - ) as _i5.Future<_i33.Uint8List>); -} - -/// A class which mocks [EncryptedImageUploadService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockEncryptedImageUploadService extends _i1.Mock - implements _i15.EncryptedImageUploadService { - MockEncryptedImageUploadService() { - _i1.throwOnMissingStub(this); - } - - @override - _i5.Future<_i15.EncryptedImageUploadResult> uploadEncryptedImage({ - required _i34.File? imageFile, - required _i33.Uint8List? sharedKey, - String? filename, - }) => - (super.noSuchMethod( - Invocation.method( - #uploadEncryptedImage, - [], - { - #imageFile: imageFile, - #sharedKey: sharedKey, - #filename: filename, - }, - ), - returnValue: _i5.Future<_i15.EncryptedImageUploadResult>.value( - _FakeEncryptedImageUploadResult_21( - this, - Invocation.method( - #uploadEncryptedImage, - [], - { - #imageFile: imageFile, - #sharedKey: sharedKey, - #filename: filename, - }, - ), - )), - ) as _i5.Future<_i15.EncryptedImageUploadResult>); - - @override - _i5.Future<_i33.Uint8List> downloadAndDecryptImage({ - required String? blossomUrl, - required _i33.Uint8List? sharedKey, - }) => - (super.noSuchMethod( - Invocation.method( - #downloadAndDecryptImage, - [], - { - #blossomUrl: blossomUrl, - #sharedKey: sharedKey, - }, - ), - returnValue: _i5.Future<_i33.Uint8List>.value(_i33.Uint8List(0)), - ) as _i5.Future<_i33.Uint8List>); -} - -/// A class which mocks [BlossomDownloadService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockBlossomDownloadService extends _i1.Mock - implements _i35.BlossomDownloadService { - MockBlossomDownloadService() { - _i1.throwOnMissingStub(this); - } -} - -/// A class which mocks [ChatRoomNotifier]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockChatRoomNotifier extends _i1.Mock implements _i36.ChatRoomNotifier { - MockChatRoomNotifier() { - _i1.throwOnMissingStub(this); - } - - @override - String get orderId => (super.noSuchMethod( - Invocation.getter(#orderId), - returnValue: _i19.dummyValue( - this, - Invocation.getter(#orderId), - ), - ) as String); - - @override - _i4.Ref get ref => (super.noSuchMethod( - Invocation.getter(#ref), - returnValue: _FakeRef_3( - this, - Invocation.getter(#ref), - ), - ) as _i4.Ref); - - @override - bool get isInitialized => (super.noSuchMethod( - Invocation.getter(#isInitialized), - returnValue: false, - ) as bool); - - @override - bool get mounted => (super.noSuchMethod( - Invocation.getter(#mounted), - returnValue: false, - ) as bool); - - @override - _i5.Stream<_i16.ChatRoom> get stream => (super.noSuchMethod( - Invocation.getter(#stream), - returnValue: _i5.Stream<_i16.ChatRoom>.empty(), - ) as _i5.Stream<_i16.ChatRoom>); - - @override - _i16.ChatRoom get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _FakeChatRoom_22( - this, - Invocation.getter(#state), - ), - ) as _i16.ChatRoom); - - @override - _i16.ChatRoom get debugState => (super.noSuchMethod( - Invocation.getter(#debugState), - returnValue: _FakeChatRoom_22( - this, - Invocation.getter(#debugState), - ), - ) as _i16.ChatRoom); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - set onError(_i4.ErrorListener? _onError) => super.noSuchMethod( - Invocation.setter( - #onError, - _onError, - ), - returnValueForMissingStub: null, - ); - - @override - set state(_i16.ChatRoom? value) => super.noSuchMethod( - Invocation.setter( - #state, - value, - ), - returnValueForMissingStub: null, - ); - - @override - void reload() => super.noSuchMethod( - Invocation.method( - #reload, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future initialize() => (super.noSuchMethod( - Invocation.method( - #initialize, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void subscribe() => super.noSuchMethod( - Invocation.method( - #subscribe, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future sendMessage(String? text) => (super.noSuchMethod( - Invocation.method( - #sendMessage, - [text], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i33.Uint8List> getSharedKey() => (super.noSuchMethod( - Invocation.method( - #getSharedKey, - [], - ), - returnValue: _i5.Future<_i33.Uint8List>.value(_i33.Uint8List(0)), - ) as _i5.Future<_i33.Uint8List>); - - @override - void cacheDecryptedImage( - String? messageId, - _i33.Uint8List? imageData, - _i15.EncryptedImageUploadResult? metadata, - ) => - super.noSuchMethod( - Invocation.method( - #cacheDecryptedImage, - [ - messageId, - imageData, - metadata, - ], - ), - returnValueForMissingStub: null, - ); - - @override - _i33.Uint8List? getCachedImage(String? messageId) => - (super.noSuchMethod(Invocation.method( - #getCachedImage, - [messageId], - )) as _i33.Uint8List?); - - @override - _i15.EncryptedImageUploadResult? getImageMetadata(String? messageId) => - (super.noSuchMethod(Invocation.method( - #getImageMetadata, - [messageId], - )) as _i15.EncryptedImageUploadResult?); - - @override - void cacheDecryptedFile( - String? messageId, - _i33.Uint8List? fileData, - _i14.EncryptedFileUploadResult? metadata, - ) => - super.noSuchMethod( - Invocation.method( - #cacheDecryptedFile, - [ - messageId, - fileData, - metadata, - ], - ), - returnValueForMissingStub: null, - ); - - @override - _i33.Uint8List? getCachedFile(String? messageId) => - (super.noSuchMethod(Invocation.method( - #getCachedFile, - [messageId], - )) as _i33.Uint8List?); - - @override - _i14.EncryptedFileUploadResult? getFileMetadata(String? messageId) => - (super.noSuchMethod(Invocation.method( - #getFileMetadata, - [messageId], - )) as _i14.EncryptedFileUploadResult?); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - bool updateShouldNotify( - _i16.ChatRoom? old, - _i16.ChatRoom? current, - ) => - (super.noSuchMethod( - Invocation.method( - #updateShouldNotify, - [ - old, - current, - ], - ), - returnValue: false, - ) as bool); - - @override - _i4.RemoveListener addListener( - _i29.Listener<_i16.ChatRoom>? listener, { - bool? fireImmediately = true, - }) => - (super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - {#fireImmediately: fireImmediately}, - ), - returnValue: () {}, - ) as _i4.RemoveListener); -}