From bca92c11d84f66ca42966275729936f8ebf603f1 Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Fri, 23 Feb 2024 16:08:58 +0100 Subject: [PATCH] refactor: Dart format --- README.md | 21 +++++ melos.yaml | 4 +- .../mocks/provider/network_provider.g.dart | 10 +-- .../lib/provider/app_state_provider.dart | 2 +- .../lib/provider/app_state_provider.g.dart | 10 +-- .../lib/provider/data_provider.g.dart | 78 ++++++------------- .../local_preferences_provider.g.dart | 38 +++------ .../lib/provider/network_provider.g.dart | 20 ++--- .../lib/services/network/data_manager.dart | 3 +- .../lib/utils/environment.dart | 4 +- .../screens/display/bout/bout_shortcuts.dart | 3 +- .../view/screens/edit/bout_config_edit.dart | 3 +- .../view/screens/edit/membership_edit.dart | 3 +- .../lib/view/screens/edit/team_edit.dart | 10 +-- .../team_match/league_weight_class_edit.dart | 4 +- .../edit/team_match/team_match_bout_edit.dart | 7 +- .../edit/team_match/team_match_edit.dart | 29 +++---- .../team_match/team_match_overview.dart | 3 +- .../lib/src/data/bout.freezed.dart | 38 +++------ .../lib/src/data/bout.g.dart | 20 ++--- .../lib/src/data/bout_action.freezed.dart | 59 ++++---------- .../lib/src/data/bout_action.g.dart | 6 +- .../lib/src/data/bout_config.freezed.dart | 50 ++++-------- .../lib/src/data/bout_config.g.dart | 6 +- .../lib/src/data/club.freezed.dart | 31 +++----- .../lib/src/data/club.g.dart | 3 +- .../data/competition/competition.freezed.dart | 42 ++++------ .../src/data/competition/competition.g.dart | 9 +-- .../competition/competition_bout.freezed.dart | 46 ++++------- .../data/competition/competition_bout.g.dart | 11 +-- .../competition_person.freezed.dart | 39 +++------- .../competition/competition_person.g.dart | 11 +-- .../competition_team_participation.dart | 3 +- ...ompetition_team_participation.freezed.dart | 49 ++++-------- .../competition_team_participation.g.dart | 9 +-- .../lib/src/data/lineup.freezed.dart | 38 +++------ .../lib/src/data/lineup.g.dart | 11 +-- .../lib/src/data/membership.freezed.dart | 42 ++++------ .../lib/src/data/membership.g.dart | 6 +- .../src/data/participant_state.freezed.dart | 43 ++++------ .../lib/src/data/participant_state.g.dart | 11 +-- .../lib/src/data/participation.freezed.dart | 60 ++++---------- .../lib/src/data/participation.g.dart | 14 ++-- .../lib/src/data/person.freezed.dart | 53 ++++--------- .../lib/src/data/person.g.dart | 7 +- .../lib/src/data/team.freezed.dart | 38 +++------ .../lib/src/data/team.g.dart | 3 +- .../src/data/team_match/league.freezed.dart | 38 +++------ .../lib/src/data/team_match/league.g.dart | 6 +- .../league_team_participation.freezed.dart | 46 ++++------- .../league_team_participation.g.dart | 7 +- .../league_weight_class.freezed.dart | 39 +++------- .../team_match/league_weight_class.g.dart | 11 +-- .../data/team_match/team_match.freezed.dart | 64 ++++----------- .../lib/src/data/team_match/team_match.g.dart | 31 +++----- .../team_match/team_match_bout.freezed.dart | 37 +++------ .../data/team_match/team_match_bout.g.dart | 6 +- .../lib/src/data/weight_class.freezed.dart | 50 ++++-------- .../lib/src/data/weight_class.g.dart | 9 +-- .../lib/src/enums/bout_result.dart | 5 +- .../lib/src/util/data_wrapper.dart | 6 +- .../lib/controllers/entity_controller.dart | 4 +- .../lib/controllers/websocket_handler.dart | 34 ++++---- .../test/server_test.dart | 2 +- 64 files changed, 471 insertions(+), 934 deletions(-) diff --git a/README.md b/README.md index d92fbb42..0e350dd7 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,27 @@ Tags: scoreboard, wrestling, scoring, bracket, mat, team fight, competition, tou ## Setup & Installation +Wrestling Scoreboard is a monorepo. +Therefor it uses [Melos](https://github.com/invertase/melos) to manage the project and dependencies. +All the commands can be found in the [melos.yaml](melos.yaml) file. + +To install Melos, run the following command from your terminal: + +```bash +flutter pub global activate melos +``` + +Next, at the root of your locally cloned repository bootstrap the projects dependencies: + +```bash +melos bs +``` + +To format your code, call: +```bash +melos format +``` + Please read the documentation for setting up the according components: - [Server](wrestling_scoreboard_server/README.md) - [Database](wrestling_scoreboard_server/database/README.md) diff --git a/melos.yaml b/melos.yaml index b5a395c6..18ef57f1 100644 --- a/melos.yaml +++ b/melos.yaml @@ -22,11 +22,11 @@ scripts: description: Run `flutter analyze` for all packages. format: - run: melos exec dart format . --fix + run: melos exec dart format . --fix -l 120 description: Run `dart format` for all packages. format-check: - run: melos exec dart format . --set-exit-if-changed + run: melos exec dart format . --set-exit-if-changed -l 120 description: Run `dart format` checks for all packages. dartdoc: diff --git a/wrestling_scoreboard_client/lib/mocks/provider/network_provider.g.dart b/wrestling_scoreboard_client/lib/mocks/provider/network_provider.g.dart index 23cad827..70ceeb3c 100644 --- a/wrestling_scoreboard_client/lib/mocks/provider/network_provider.g.dart +++ b/wrestling_scoreboard_client/lib/mocks/provider/network_provider.g.dart @@ -6,18 +6,14 @@ part of 'network_provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$mockDataManagerNotifierHash() => - r'9c3e0e3c990b61d515e8b2f23636bb3ca9201415'; +String _$mockDataManagerNotifierHash() => r'9c3e0e3c990b61d515e8b2f23636bb3ca9201415'; /// See also [MockDataManagerNotifier]. @ProviderFor(MockDataManagerNotifier) -final mockDataManagerNotifierProvider = NotifierProvider< - MockDataManagerNotifier, Raw>>.internal( +final mockDataManagerNotifierProvider = NotifierProvider>>.internal( MockDataManagerNotifier.new, name: r'mockDataManagerNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mockDataManagerNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$mockDataManagerNotifierHash, dependencies: null, allTransitiveDependencies: null, ); diff --git a/wrestling_scoreboard_client/lib/provider/app_state_provider.dart b/wrestling_scoreboard_client/lib/provider/app_state_provider.dart index 95d9fc3a..1f4526ab 100644 --- a/wrestling_scoreboard_client/lib/provider/app_state_provider.dart +++ b/wrestling_scoreboard_client/lib/provider/app_state_provider.dart @@ -1,4 +1,4 @@ -import 'package:wrestling_scoreboard_client/platform/html.dart' if (dart.library.html) 'dart:html'; // +import 'package:wrestling_scoreboard_client/platform/html.dart' if (dart.library.html) 'dart:html'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/wrestling_scoreboard_client/lib/provider/app_state_provider.g.dart b/wrestling_scoreboard_client/lib/provider/app_state_provider.g.dart index 5fb31a6d..03ba3333 100644 --- a/wrestling_scoreboard_client/lib/provider/app_state_provider.g.dart +++ b/wrestling_scoreboard_client/lib/provider/app_state_provider.g.dart @@ -6,18 +6,14 @@ part of 'app_state_provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$windowStateNotifierHash() => - r'929e42278b3ca7b70a11395dce93897096154217'; +String _$windowStateNotifierHash() => r'929e42278b3ca7b70a11395dce93897096154217'; /// See also [WindowStateNotifier]. @ProviderFor(WindowStateNotifier) -final windowStateNotifierProvider = - NotifierProvider>>.internal( +final windowStateNotifierProvider = NotifierProvider>>.internal( WindowStateNotifier.new, name: r'windowStateNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$windowStateNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$windowStateNotifierHash, dependencies: null, allTransitiveDependencies: null, ); diff --git a/wrestling_scoreboard_client/lib/provider/data_provider.g.dart b/wrestling_scoreboard_client/lib/provider/data_provider.g.dart index ba8244e4..6c057914 100644 --- a/wrestling_scoreboard_client/lib/provider/data_provider.g.dart +++ b/wrestling_scoreboard_client/lib/provider/data_provider.g.dart @@ -46,8 +46,7 @@ class SingleDataStreamFamily extends Family { Iterable? get dependencies => _dependencies; @override - Iterable? get allTransitiveDependencies => - _allTransitiveDependencies; + Iterable? get allTransitiveDependencies => _allTransitiveDependencies; @override String? get name => r'singleDataStreamProvider'; @@ -72,9 +71,7 @@ class SingleDataStreamFamily extends Family { } /// Enables overriding the behavior of this provider, no matter the parameters. - Override overrideWith( - Stream Function(SingleDataStreamRef ref) - create) { + Override overrideWith(Stream Function(SingleDataStreamRef ref) create) { return _$SingleDataStreamFamilyOverride(this, create); } } @@ -82,8 +79,7 @@ class SingleDataStreamFamily extends Family { class _$SingleDataStreamFamilyOverride implements FamilyOverride { _$SingleDataStreamFamilyOverride(this.overriddenFamily, this.create); - final Stream Function(SingleDataStreamRef ref) - create; + final Stream Function(SingleDataStreamRef ref) create; @override final SingleDataStreamFamily overriddenFamily; @@ -97,8 +93,7 @@ class _$SingleDataStreamFamilyOverride implements FamilyOverride { } /// See also [singleDataStream]. -class SingleDataStreamProvider - extends AutoDisposeStreamProvider { +class SingleDataStreamProvider extends AutoDisposeStreamProvider { /// See also [singleDataStream]. SingleDataStreamProvider( SingleProviderData pData, @@ -109,13 +104,9 @@ class SingleDataStreamProvider ), from: singleDataStreamProvider, name: r'singleDataStreamProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$singleDataStreamHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$singleDataStreamHash, dependencies: SingleDataStreamFamily._dependencies, - allTransitiveDependencies: - SingleDataStreamFamily._allTransitiveDependencies, + allTransitiveDependencies: SingleDataStreamFamily._allTransitiveDependencies, pData: pData, ); @@ -175,9 +166,7 @@ class SingleDataStreamProvider @override bool operator ==(Object other) { - return other is SingleDataStreamProvider && - other.runtimeType == runtimeType && - other.pData == pData; + return other is SingleDataStreamProvider && other.runtimeType == runtimeType && other.pData == pData; } @override @@ -190,19 +179,17 @@ class SingleDataStreamProvider } } -mixin SingleDataStreamRef - on AutoDisposeStreamProviderRef { +mixin SingleDataStreamRef on AutoDisposeStreamProviderRef { /// The parameter `pData` of this provider. SingleProviderData get pData; } -class _SingleDataStreamProviderElement - extends AutoDisposeStreamProviderElement with SingleDataStreamRef { +class _SingleDataStreamProviderElement extends AutoDisposeStreamProviderElement + with SingleDataStreamRef { _SingleDataStreamProviderElement(super.provider); @override - SingleProviderData get pData => - (origin as SingleDataStreamProvider).pData; + SingleProviderData get pData => (origin as SingleDataStreamProvider).pData; } String _$manyDataStreamHash() => r'61ddb2c86c206435d72abedf3803853a3a8b5e88'; @@ -224,15 +211,13 @@ class ManyDataStreamFamily extends Family { Iterable? get dependencies => _dependencies; @override - Iterable? get allTransitiveDependencies => - _allTransitiveDependencies; + Iterable? get allTransitiveDependencies => _allTransitiveDependencies; @override String? get name => r'manyDataStreamProvider'; /// See also [manyDataStream]. - ManyDataStreamProvider - call( + ManyDataStreamProvider call( ManyProviderData pData, ) { return ManyDataStreamProvider( @@ -252,9 +237,7 @@ class ManyDataStreamFamily extends Family { /// Enables overriding the behavior of this provider, no matter the parameters. Override overrideWith( - Stream> Function( - ManyDataStreamRef ref) - create) { + Stream> Function(ManyDataStreamRef ref) create) { return _$ManyDataStreamFamilyOverride(this, create); } } @@ -262,8 +245,7 @@ class ManyDataStreamFamily extends Family { class _$ManyDataStreamFamilyOverride implements FamilyOverride { _$ManyDataStreamFamilyOverride(this.overriddenFamily, this.create); - final Stream> Function( - ManyDataStreamRef ref) create; + final Stream> Function(ManyDataStreamRef ref) create; @override final ManyDataStreamFamily overriddenFamily; @@ -277,8 +259,7 @@ class _$ManyDataStreamFamilyOverride implements FamilyOverride { } /// See also [manyDataStream]. -class ManyDataStreamProvider - extends AutoDisposeStreamProvider> { +class ManyDataStreamProvider extends AutoDisposeStreamProvider> { /// See also [manyDataStream]. ManyDataStreamProvider( ManyProviderData pData, @@ -289,13 +270,9 @@ class ManyDataStreamProvider ), from: manyDataStreamProvider, name: r'manyDataStreamProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$manyDataStreamHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$manyDataStreamHash, dependencies: ManyDataStreamFamily._dependencies, - allTransitiveDependencies: - ManyDataStreamFamily._allTransitiveDependencies, + allTransitiveDependencies: ManyDataStreamFamily._allTransitiveDependencies, pData: pData, ); @@ -340,9 +317,7 @@ class ManyDataStreamProvider } ManyDataStreamProvider _copyWith( - Stream> Function( - ManyDataStreamRef ref) - create, + Stream> Function(ManyDataStreamRef ref) create, ) { return ManyDataStreamProvider._internal( (ref) => create(ref as ManyDataStreamRef), @@ -357,9 +332,7 @@ class ManyDataStreamProvider @override bool operator ==(Object other) { - return other is ManyDataStreamProvider && - other.runtimeType == runtimeType && - other.pData == pData; + return other is ManyDataStreamProvider && other.runtimeType == runtimeType && other.pData == pData; } @override @@ -373,20 +346,17 @@ class ManyDataStreamProvider } } -mixin ManyDataStreamRef - on AutoDisposeStreamProviderRef> { +mixin ManyDataStreamRef on AutoDisposeStreamProviderRef> { /// The parameter `pData` of this provider. ManyProviderData get pData; } -class _ManyDataStreamProviderElement extends AutoDisposeStreamProviderElement> - with ManyDataStreamRef { +class _ManyDataStreamProviderElement + extends AutoDisposeStreamProviderElement> with ManyDataStreamRef { _ManyDataStreamProviderElement(super.provider); @override - ManyProviderData get pData => - (origin as ManyDataStreamProvider).pData; + ManyProviderData get pData => (origin as ManyDataStreamProvider).pData; } // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, inference_failure_on_uninitialized_variable, inference_failure_on_function_return_type, inference_failure_on_untyped_parameter, deprecated_member_use_from_same_package diff --git a/wrestling_scoreboard_client/lib/provider/local_preferences_provider.g.dart b/wrestling_scoreboard_client/lib/provider/local_preferences_provider.g.dart index 439cf8e6..a7b65b39 100644 --- a/wrestling_scoreboard_client/lib/provider/local_preferences_provider.g.dart +++ b/wrestling_scoreboard_client/lib/provider/local_preferences_provider.g.dart @@ -12,13 +12,10 @@ String _$localeNotifierHash() => r'e1e390bd02d18a8474b484ee33bc40edca7e9c3d'; /// /// Copied from [LocaleNotifier]. @ProviderFor(LocaleNotifier) -final localeNotifierProvider = - NotifierProvider>>.internal( +final localeNotifierProvider = NotifierProvider>>.internal( LocaleNotifier.new, name: r'localeNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$localeNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$localeNotifierHash, dependencies: null, allTransitiveDependencies: null, ); @@ -28,30 +25,23 @@ String _$themeModeNotifierHash() => r'29aedc145964f8e32034ab495a26ee3ccedfed82'; /// See also [ThemeModeNotifier]. @ProviderFor(ThemeModeNotifier) -final themeModeNotifierProvider = - NotifierProvider>>.internal( +final themeModeNotifierProvider = NotifierProvider>>.internal( ThemeModeNotifier.new, name: r'themeModeNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$themeModeNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$themeModeNotifierHash, dependencies: null, allTransitiveDependencies: null, ); typedef _$ThemeModeNotifier = Notifier>>; -String _$webSocketUrlNotifierHash() => - r'3e384b28903aca1717d43fa65ace0651b39b668a'; +String _$webSocketUrlNotifierHash() => r'3e384b28903aca1717d43fa65ace0651b39b668a'; /// See also [WebSocketUrlNotifier]. @ProviderFor(WebSocketUrlNotifier) -final webSocketUrlNotifierProvider = - NotifierProvider>>.internal( +final webSocketUrlNotifierProvider = NotifierProvider>>.internal( WebSocketUrlNotifier.new, name: r'webSocketUrlNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$webSocketUrlNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$webSocketUrlNotifierHash, dependencies: null, allTransitiveDependencies: null, ); @@ -61,13 +51,10 @@ String _$apiUrlNotifierHash() => r'8c063b9ec135234c56970345957760282a21fbde'; /// See also [ApiUrlNotifier]. @ProviderFor(ApiUrlNotifier) -final apiUrlNotifierProvider = - NotifierProvider>>.internal( +final apiUrlNotifierProvider = NotifierProvider>>.internal( ApiUrlNotifier.new, name: r'apiUrlNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$apiUrlNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$apiUrlNotifierHash, dependencies: null, allTransitiveDependencies: null, ); @@ -77,13 +64,10 @@ String _$bellSoundNotifierHash() => r'1c9d805977f6f32cd7b44e7bd1ecfecd15447ddd'; /// See also [BellSoundNotifier]. @ProviderFor(BellSoundNotifier) -final bellSoundNotifierProvider = - NotifierProvider>>.internal( +final bellSoundNotifierProvider = NotifierProvider>>.internal( BellSoundNotifier.new, name: r'bellSoundNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$bellSoundNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$bellSoundNotifierHash, dependencies: null, allTransitiveDependencies: null, ); diff --git a/wrestling_scoreboard_client/lib/provider/network_provider.g.dart b/wrestling_scoreboard_client/lib/provider/network_provider.g.dart index ef7c92db..10366950 100644 --- a/wrestling_scoreboard_client/lib/provider/network_provider.g.dart +++ b/wrestling_scoreboard_client/lib/provider/network_provider.g.dart @@ -6,35 +6,27 @@ part of 'network_provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$webSocketStateStreamHash() => - r'04de839e83ee6df7389b8831f579692fbe40e400'; +String _$webSocketStateStreamHash() => r'04de839e83ee6df7389b8831f579692fbe40e400'; /// See also [webSocketStateStream]. @ProviderFor(webSocketStateStream) -final webSocketStateStreamProvider = - StreamProvider.internal( +final webSocketStateStreamProvider = StreamProvider.internal( webSocketStateStream, name: r'webSocketStateStreamProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$webSocketStateStreamHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$webSocketStateStreamHash, dependencies: null, allTransitiveDependencies: null, ); typedef WebSocketStateStreamRef = StreamProviderRef; -String _$dataManagerNotifierHash() => - r'5b99bb7d219662dd70ff7bf93f67d89a4c48f2e7'; +String _$dataManagerNotifierHash() => r'5b99bb7d219662dd70ff7bf93f67d89a4c48f2e7'; /// See also [DataManagerNotifier]. @ProviderFor(DataManagerNotifier) -final dataManagerNotifierProvider = - NotifierProvider>>.internal( +final dataManagerNotifierProvider = NotifierProvider>>.internal( DataManagerNotifier.new, name: r'dataManagerNotifierProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$dataManagerNotifierHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null : _$dataManagerNotifierHash, dependencies: null, allTransitiveDependencies: null, ); diff --git a/wrestling_scoreboard_client/lib/services/network/data_manager.dart b/wrestling_scoreboard_client/lib/services/network/data_manager.dart index 61485fee..9151be9a 100644 --- a/wrestling_scoreboard_client/lib/services/network/data_manager.dart +++ b/wrestling_scoreboard_client/lib/services/network/data_manager.dart @@ -5,9 +5,8 @@ import 'package:wrestling_scoreboard_common/common.dart'; /// Data exchange layer with CRUD operations abstract class DataManager { - WebSocketManager get webSocketManager; - + /// READ: get a single object Future readSingle(int id); diff --git a/wrestling_scoreboard_client/lib/utils/environment.dart b/wrestling_scoreboard_client/lib/utils/environment.dart index 76c110eb..1faec757 100644 --- a/wrestling_scoreboard_client/lib/utils/environment.dart +++ b/wrestling_scoreboard_client/lib/utils/environment.dart @@ -1,13 +1,13 @@ enum Env { apiUrl, webSocketUrl, - + /// 'mock' -> debug and mock data /// 'development' -> debug and connect to API /// 'production' -> connect to API appEnvironment, bellSoundPath, - + /// Use [PathUrlStrategy] instead of the [HashUrlStrategy]. This must be supported by your server, see /// https://docs.flutter.dev/ui/navigation/url-strategies#configuring-your-web-server usePathUrlStrategy; diff --git a/wrestling_scoreboard_client/lib/view/screens/display/bout/bout_shortcuts.dart b/wrestling_scoreboard_client/lib/view/screens/display/bout/bout_shortcuts.dart index 2143aa24..4139c776 100644 --- a/wrestling_scoreboard_client/lib/view/screens/display/bout/bout_shortcuts.dart +++ b/wrestling_scoreboard_client/lib/view/screens/display/bout/bout_shortcuts.dart @@ -293,7 +293,8 @@ class BoutActionHandler extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { Future handleIntent(BoutScreenActionIntent intent, {BuildContext? context}) async { - await intent.handle(await ref.read(dataManagerNotifierProvider), stopwatch, bouts, getActions, boutIndex, doAction, + await intent.handle( + await ref.read(dataManagerNotifierProvider), stopwatch, bouts, getActions, boutIndex, doAction, context: context, navigateToBoutByIndex: navigateToBoutByIndex); } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/bout_config_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/bout_config_edit.dart index 85a70ffa..5d2c4b45 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/bout_config_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/bout_config_edit.dart @@ -135,7 +135,8 @@ abstract class BoutConfigEditState extends ConsumerSta injuryDuration: Duration(seconds: _injuryDurationInSecs!), periodCount: _periodCount!, ); - boutConfig = boutConfig.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(boutConfig)); + boutConfig = + boutConfig.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(boutConfig)); await handleNested(boutConfig); navigator.pop(); } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/membership_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/membership_edit.dart index 78fe30df..e852f0d3 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/membership_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/membership_edit.dart @@ -39,6 +39,7 @@ class MembershipEditState extends PersonEditState { @override Future handleNested(person) async { var membership = Membership(id: widget.membership?.id, person: person, club: widget.initialClub, no: _no); - membership = membership.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(membership)); + membership = + membership.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(membership)); } } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/team_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/team_edit.dart index 86c08649..58c5b904 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/team_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/team_edit.dart @@ -100,11 +100,11 @@ class TeamEditState extends ConsumerState { if (_formKey.currentState!.validate()) { _formKey.currentState!.save(); await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Team( - id: widget.team?.id, - name: _name!, - description: _description, - club: _club!, - )); + id: widget.team?.id, + name: _name!, + description: _description, + club: _club!, + )); navigator.pop(); } } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/league_weight_class_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/league_weight_class_edit.dart index 76ab4ec6..952f20b4 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/league_weight_class_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/league_weight_class_edit.dart @@ -46,7 +46,7 @@ class LeagueWeightClassEditState extends WeightClassEditState handleNested(weightClass) async { var leagueWeightClass = LeagueWeightClass( id: widget.leagueWeightClass?.id, league: widget.initialLeague, pos: _pos, weightClass: weightClass); - leagueWeightClass = - leagueWeightClass.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(leagueWeightClass)); + leagueWeightClass = leagueWeightClass + .copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(leagueWeightClass)); } } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_bout_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_bout_edit.dart index 91b6a33e..7d1d63e6 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_bout_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_bout_edit.dart @@ -50,10 +50,11 @@ class TeamMatchBoutEditState extends BoutEditState { Future handleNested(bout) async { var teamMatchBout = TeamMatchBout(id: widget.teamMatchBout?.id, teamMatch: widget.initialTeamMatch, pos: _pos, bout: bout); - teamMatchBout = teamMatchBout.copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(teamMatchBout)); + teamMatchBout = teamMatchBout + .copyWithId(await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(teamMatchBout)); } @override - Future> get availableWeightClasses async => - (await ref.read(dataManagerNotifierProvider)).readMany(filterObject: widget.initialTeamMatch.league); + Future> get availableWeightClasses async => (await ref.read(dataManagerNotifierProvider)) + .readMany(filterObject: widget.initialTeamMatch.league); } diff --git a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_edit.dart b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_edit.dart index 5555d437..11b70a9d 100644 --- a/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_edit.dart +++ b/wrestling_scoreboard_client/lib/view/screens/edit/team_match/team_match_edit.dart @@ -182,7 +182,8 @@ class TeamMatchEditState extends ConsumerState { var home = widget.teamMatch?.home; if (home == null) { - final homeId = await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Lineup(team: _homeTeam!)); + final homeId = + await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Lineup(team: _homeTeam!)); home = Lineup(id: homeId, team: _homeTeam!); // TODO check if it works without refetching the objects } else if (home.team != _homeTeam) { // Update Lineup team only, no need to replace whole lineup @@ -191,24 +192,26 @@ class TeamMatchEditState extends ConsumerState { var guest = widget.teamMatch?.guest; if (guest == null) { - final guestId = await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Lineup(team: _guestTeam!)); + final guestId = + await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Lineup(team: _guestTeam!)); guest = Lineup(id: guestId, team: _guestTeam!); // TODO check if it works without refetching the objects } else if (guest.team != _guestTeam) { // Update Lineup team only, no need to replace whole lineup - await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle(Lineup(id: guest.id, team: _guestTeam!)); + await (await ref.read(dataManagerNotifierProvider)) + .createOrUpdateSingle(Lineup(id: guest.id, team: _guestTeam!)); } await (await ref.read(dataManagerNotifierProvider)).createOrUpdateSingle( - TeamMatch( - id: widget.teamMatch?.id, - location: _location!, - no: _no, - home: home, - guest: guest, - date: _date, - league: _league, - ), - ); + TeamMatch( + id: widget.teamMatch?.id, + location: _location!, + no: _no, + home: home, + guest: guest, + date: _date, + league: _league, + ), + ); navigator.pop(); } } diff --git a/wrestling_scoreboard_client/lib/view/screens/overview/team_match/team_match_overview.dart b/wrestling_scoreboard_client/lib/view/screens/overview/team_match/team_match_overview.dart index 37b4bd42..15c985e9 100644 --- a/wrestling_scoreboard_client/lib/view/screens/overview/team_match/team_match_overview.dart +++ b/wrestling_scoreboard_client/lib/view/screens/overview/team_match/team_match_overview.dart @@ -64,7 +64,8 @@ class TeamMatchOverview extends ConsumerWidget { editPage: TeamMatchEdit( teamMatch: match, ), - onDelete: () async => (await ref.read(dataManagerNotifierProvider)).deleteSingle(match), + onDelete: () async => + (await ref.read(dataManagerNotifierProvider)).deleteSingle(match), classLocale: localizations.match, children: [ ContentItem( diff --git a/wrestling_scoreboard_common/lib/src/data/bout.freezed.dart b/wrestling_scoreboard_common/lib/src/data/bout.freezed.dart index 2112adbb..1db10b87 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout.freezed.dart @@ -36,8 +36,7 @@ mixin _$Bout { /// @nodoc abstract class $BoutCopyWith<$Res> { - factory $BoutCopyWith(Bout value, $Res Function(Bout) then) = - _$BoutCopyWithImpl<$Res, Bout>; + factory $BoutCopyWith(Bout value, $Res Function(Bout) then) = _$BoutCopyWithImpl<$Res, Bout>; @useResult $Res call( {int? id, @@ -55,8 +54,7 @@ abstract class $BoutCopyWith<$Res> { } /// @nodoc -class _$BoutCopyWithImpl<$Res, $Val extends Bout> - implements $BoutCopyWith<$Res> { +class _$BoutCopyWithImpl<$Res, $Val extends Bout> implements $BoutCopyWith<$Res> { _$BoutCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -151,9 +149,7 @@ class _$BoutCopyWithImpl<$Res, $Val extends Bout> /// @nodoc abstract class _$$BoutImplCopyWith<$Res> implements $BoutCopyWith<$Res> { - factory _$$BoutImplCopyWith( - _$BoutImpl value, $Res Function(_$BoutImpl) then) = - __$$BoutImplCopyWithImpl<$Res>; + factory _$$BoutImplCopyWith(_$BoutImpl value, $Res Function(_$BoutImpl) then) = __$$BoutImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -175,11 +171,8 @@ abstract class _$$BoutImplCopyWith<$Res> implements $BoutCopyWith<$Res> { } /// @nodoc -class __$$BoutImplCopyWithImpl<$Res> - extends _$BoutCopyWithImpl<$Res, _$BoutImpl> - implements _$$BoutImplCopyWith<$Res> { - __$$BoutImplCopyWithImpl(_$BoutImpl _value, $Res Function(_$BoutImpl) _then) - : super(_value, _then); +class __$$BoutImplCopyWithImpl<$Res> extends _$BoutCopyWithImpl<$Res, _$BoutImpl> implements _$$BoutImplCopyWith<$Res> { + __$$BoutImplCopyWithImpl(_$BoutImpl _value, $Res Function(_$BoutImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -244,8 +237,7 @@ class _$BoutImpl extends _Bout { this.duration = Duration.zero}) : super._(); - factory _$BoutImpl.fromJson(Map json) => - _$$BoutImplFromJson(json); + factory _$BoutImpl.fromJson(Map json) => _$$BoutImplFromJson(json); @override final int? id; @@ -280,26 +272,21 @@ class _$BoutImpl extends _Bout { (identical(other.id, id) || other.id == id) && (identical(other.r, r) || other.r == r) && (identical(other.b, b) || other.b == b) && - (identical(other.weightClass, weightClass) || - other.weightClass == weightClass) && + (identical(other.weightClass, weightClass) || other.weightClass == weightClass) && (identical(other.pool, pool) || other.pool == pool) && - (identical(other.winnerRole, winnerRole) || - other.winnerRole == winnerRole) && + (identical(other.winnerRole, winnerRole) || other.winnerRole == winnerRole) && (identical(other.result, result) || other.result == result) && - (identical(other.duration, duration) || - other.duration == duration)); + (identical(other.duration, duration) || other.duration == duration)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, id, r, b, weightClass, pool, winnerRole, result, duration); + int get hashCode => Object.hash(runtimeType, id, r, b, weightClass, pool, winnerRole, result, duration); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BoutImplCopyWith<_$BoutImpl> get copyWith => - __$$BoutImplCopyWithImpl<_$BoutImpl>(this, _$identity); + _$$BoutImplCopyWith<_$BoutImpl> get copyWith => __$$BoutImplCopyWithImpl<_$BoutImpl>(this, _$identity); @override Map toJson() { @@ -341,6 +328,5 @@ abstract class _Bout extends Bout { Duration get duration; @override @JsonKey(ignore: true) - _$$BoutImplCopyWith<_$BoutImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BoutImplCopyWith<_$BoutImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/bout.g.dart b/wrestling_scoreboard_common/lib/src/data/bout.g.dart index 79eb85f1..7d0da2a4 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout.g.dart @@ -8,25 +8,17 @@ part of 'bout.dart'; _$BoutImpl _$$BoutImplFromJson(Map json) => _$BoutImpl( id: json['id'] as int?, - r: json['r'] == null - ? null - : ParticipantState.fromJson(json['r'] as Map), - b: json['b'] == null - ? null - : ParticipantState.fromJson(json['b'] as Map), - weightClass: json['weightClass'] == null - ? null - : WeightClass.fromJson(json['weightClass'] as Map), + r: json['r'] == null ? null : ParticipantState.fromJson(json['r'] as Map), + b: json['b'] == null ? null : ParticipantState.fromJson(json['b'] as Map), + weightClass: + json['weightClass'] == null ? null : WeightClass.fromJson(json['weightClass'] as Map), pool: json['pool'] as int?, winnerRole: $enumDecodeNullable(_$BoutRoleEnumMap, json['winnerRole']), result: $enumDecodeNullable(_$BoutResultEnumMap, json['result']), - duration: json['duration'] == null - ? Duration.zero - : Duration(microseconds: json['duration'] as int), + duration: json['duration'] == null ? Duration.zero : Duration(microseconds: json['duration'] as int), ); -Map _$$BoutImplToJson(_$BoutImpl instance) => - { +Map _$$BoutImplToJson(_$BoutImpl instance) => { 'id': instance.id, 'r': instance.r?.toJson(), 'b': instance.b?.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/bout_action.freezed.dart b/wrestling_scoreboard_common/lib/src/data/bout_action.freezed.dart index 44973a58..5e9c3558 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout_action.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout_action.freezed.dart @@ -29,30 +29,21 @@ mixin _$BoutAction { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $BoutActionCopyWith get copyWith => - throw _privateConstructorUsedError; + $BoutActionCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BoutActionCopyWith<$Res> { - factory $BoutActionCopyWith( - BoutAction value, $Res Function(BoutAction) then) = + factory $BoutActionCopyWith(BoutAction value, $Res Function(BoutAction) then) = _$BoutActionCopyWithImpl<$Res, BoutAction>; @useResult - $Res call( - {int? id, - BoutActionType actionType, - Bout bout, - Duration duration, - BoutRole role, - int? pointCount}); + $Res call({int? id, BoutActionType actionType, Bout bout, Duration duration, BoutRole role, int? pointCount}); $BoutCopyWith<$Res> get bout; } /// @nodoc -class _$BoutActionCopyWithImpl<$Res, $Val extends BoutAction> - implements $BoutActionCopyWith<$Res> { +class _$BoutActionCopyWithImpl<$Res, $Val extends BoutAction> implements $BoutActionCopyWith<$Res> { _$BoutActionCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -108,32 +99,21 @@ class _$BoutActionCopyWithImpl<$Res, $Val extends BoutAction> } /// @nodoc -abstract class _$$BoutActionImplCopyWith<$Res> - implements $BoutActionCopyWith<$Res> { - factory _$$BoutActionImplCopyWith( - _$BoutActionImpl value, $Res Function(_$BoutActionImpl) then) = +abstract class _$$BoutActionImplCopyWith<$Res> implements $BoutActionCopyWith<$Res> { + factory _$$BoutActionImplCopyWith(_$BoutActionImpl value, $Res Function(_$BoutActionImpl) then) = __$$BoutActionImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? id, - BoutActionType actionType, - Bout bout, - Duration duration, - BoutRole role, - int? pointCount}); + $Res call({int? id, BoutActionType actionType, Bout bout, Duration duration, BoutRole role, int? pointCount}); @override $BoutCopyWith<$Res> get bout; } /// @nodoc -class __$$BoutActionImplCopyWithImpl<$Res> - extends _$BoutActionCopyWithImpl<$Res, _$BoutActionImpl> +class __$$BoutActionImplCopyWithImpl<$Res> extends _$BoutActionCopyWithImpl<$Res, _$BoutActionImpl> implements _$$BoutActionImplCopyWith<$Res> { - __$$BoutActionImplCopyWithImpl( - _$BoutActionImpl _value, $Res Function(_$BoutActionImpl) _then) - : super(_value, _then); + __$$BoutActionImplCopyWithImpl(_$BoutActionImpl _value, $Res Function(_$BoutActionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -186,8 +166,7 @@ class _$BoutActionImpl extends _BoutAction { this.pointCount}) : super._(); - factory _$BoutActionImpl.fromJson(Map json) => - _$$BoutActionImplFromJson(json); + factory _$BoutActionImpl.fromJson(Map json) => _$$BoutActionImplFromJson(json); @override final int? id; @@ -208,20 +187,16 @@ class _$BoutActionImpl extends _BoutAction { (other.runtimeType == runtimeType && other is _$BoutActionImpl && (identical(other.id, id) || other.id == id) && - (identical(other.actionType, actionType) || - other.actionType == actionType) && + (identical(other.actionType, actionType) || other.actionType == actionType) && (identical(other.bout, bout) || other.bout == bout) && - (identical(other.duration, duration) || - other.duration == duration) && + (identical(other.duration, duration) || other.duration == duration) && (identical(other.role, role) || other.role == role) && - (identical(other.pointCount, pointCount) || - other.pointCount == pointCount)); + (identical(other.pointCount, pointCount) || other.pointCount == pointCount)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, id, actionType, bout, duration, role, pointCount); + int get hashCode => Object.hash(runtimeType, id, actionType, bout, duration, role, pointCount); @JsonKey(ignore: true) @override @@ -247,8 +222,7 @@ abstract class _BoutAction extends BoutAction { final int? pointCount}) = _$BoutActionImpl; const _BoutAction._() : super._(); - factory _BoutAction.fromJson(Map json) = - _$BoutActionImpl.fromJson; + factory _BoutAction.fromJson(Map json) = _$BoutActionImpl.fromJson; @override int? get id; @@ -264,6 +238,5 @@ abstract class _BoutAction extends BoutAction { int? get pointCount; @override @JsonKey(ignore: true) - _$$BoutActionImplCopyWith<_$BoutActionImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BoutActionImplCopyWith<_$BoutActionImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/bout_action.g.dart b/wrestling_scoreboard_common/lib/src/data/bout_action.g.dart index 079d4f1c..edebaf6f 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout_action.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout_action.g.dart @@ -6,8 +6,7 @@ part of 'bout_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BoutActionImpl _$$BoutActionImplFromJson(Map json) => - _$BoutActionImpl( +_$BoutActionImpl _$$BoutActionImplFromJson(Map json) => _$BoutActionImpl( id: json['id'] as int?, actionType: $enumDecode(_$BoutActionTypeEnumMap, json['actionType']), bout: Bout.fromJson(json['bout'] as Map), @@ -16,8 +15,7 @@ _$BoutActionImpl _$$BoutActionImplFromJson(Map json) => pointCount: json['pointCount'] as int?, ); -Map _$$BoutActionImplToJson(_$BoutActionImpl instance) => - { +Map _$$BoutActionImplToJson(_$BoutActionImpl instance) => { 'id': instance.id, 'actionType': _$BoutActionTypeEnumMap[instance.actionType]!, 'bout': instance.bout.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/bout_config.freezed.dart b/wrestling_scoreboard_common/lib/src/data/bout_config.freezed.dart index 5cfae1eb..217ec3a2 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout_config.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout_config.freezed.dart @@ -29,14 +29,12 @@ mixin _$BoutConfig { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $BoutConfigCopyWith get copyWith => - throw _privateConstructorUsedError; + $BoutConfigCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BoutConfigCopyWith<$Res> { - factory $BoutConfigCopyWith( - BoutConfig value, $Res Function(BoutConfig) then) = + factory $BoutConfigCopyWith(BoutConfig value, $Res Function(BoutConfig) then) = _$BoutConfigCopyWithImpl<$Res, BoutConfig>; @useResult $Res call( @@ -49,8 +47,7 @@ abstract class $BoutConfigCopyWith<$Res> { } /// @nodoc -class _$BoutConfigCopyWithImpl<$Res, $Val extends BoutConfig> - implements $BoutConfigCopyWith<$Res> { +class _$BoutConfigCopyWithImpl<$Res, $Val extends BoutConfig> implements $BoutConfigCopyWith<$Res> { _$BoutConfigCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -98,10 +95,8 @@ class _$BoutConfigCopyWithImpl<$Res, $Val extends BoutConfig> } /// @nodoc -abstract class _$$BoutConfigImplCopyWith<$Res> - implements $BoutConfigCopyWith<$Res> { - factory _$$BoutConfigImplCopyWith( - _$BoutConfigImpl value, $Res Function(_$BoutConfigImpl) then) = +abstract class _$$BoutConfigImplCopyWith<$Res> implements $BoutConfigCopyWith<$Res> { + factory _$$BoutConfigImplCopyWith(_$BoutConfigImpl value, $Res Function(_$BoutConfigImpl) then) = __$$BoutConfigImplCopyWithImpl<$Res>; @override @useResult @@ -115,12 +110,9 @@ abstract class _$$BoutConfigImplCopyWith<$Res> } /// @nodoc -class __$$BoutConfigImplCopyWithImpl<$Res> - extends _$BoutConfigCopyWithImpl<$Res, _$BoutConfigImpl> +class __$$BoutConfigImplCopyWithImpl<$Res> extends _$BoutConfigCopyWithImpl<$Res, _$BoutConfigImpl> implements _$$BoutConfigImplCopyWith<$Res> { - __$$BoutConfigImplCopyWithImpl( - _$BoutConfigImpl _value, $Res Function(_$BoutConfigImpl) _then) - : super(_value, _then); + __$$BoutConfigImplCopyWithImpl(_$BoutConfigImpl _value, $Res Function(_$BoutConfigImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -173,8 +165,7 @@ class _$BoutConfigImpl extends _BoutConfig { this.periodCount = BoutConfig.defaultPeriodCount}) : super._(); - factory _$BoutConfigImpl.fromJson(Map json) => - _$$BoutConfigImplFromJson(json); + factory _$BoutConfigImpl.fromJson(Map json) => _$$BoutConfigImplFromJson(json); @override final int? id; @@ -205,22 +196,17 @@ class _$BoutConfigImpl extends _BoutConfig { (other.runtimeType == runtimeType && other is _$BoutConfigImpl && (identical(other.id, id) || other.id == id) && - (identical(other.periodDuration, periodDuration) || - other.periodDuration == periodDuration) && - (identical(other.breakDuration, breakDuration) || - other.breakDuration == breakDuration) && - (identical(other.activityDuration, activityDuration) || - other.activityDuration == activityDuration) && - (identical(other.injuryDuration, injuryDuration) || - other.injuryDuration == injuryDuration) && - (identical(other.periodCount, periodCount) || - other.periodCount == periodCount)); + (identical(other.periodDuration, periodDuration) || other.periodDuration == periodDuration) && + (identical(other.breakDuration, breakDuration) || other.breakDuration == breakDuration) && + (identical(other.activityDuration, activityDuration) || other.activityDuration == activityDuration) && + (identical(other.injuryDuration, injuryDuration) || other.injuryDuration == injuryDuration) && + (identical(other.periodCount, periodCount) || other.periodCount == periodCount)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, id, periodDuration, - breakDuration, activityDuration, injuryDuration, periodCount); + int get hashCode => + Object.hash(runtimeType, id, periodDuration, breakDuration, activityDuration, injuryDuration, periodCount); @JsonKey(ignore: true) @override @@ -246,8 +232,7 @@ abstract class _BoutConfig extends BoutConfig { final int periodCount}) = _$BoutConfigImpl; const _BoutConfig._() : super._(); - factory _BoutConfig.fromJson(Map json) = - _$BoutConfigImpl.fromJson; + factory _BoutConfig.fromJson(Map json) = _$BoutConfigImpl.fromJson; @override int? get id; @@ -263,6 +248,5 @@ abstract class _BoutConfig extends BoutConfig { int get periodCount; @override @JsonKey(ignore: true) - _$$BoutConfigImplCopyWith<_$BoutConfigImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BoutConfigImplCopyWith<_$BoutConfigImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/bout_config.g.dart b/wrestling_scoreboard_common/lib/src/data/bout_config.g.dart index 84967d43..703d5e40 100644 --- a/wrestling_scoreboard_common/lib/src/data/bout_config.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/bout_config.g.dart @@ -6,8 +6,7 @@ part of 'bout_config.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BoutConfigImpl _$$BoutConfigImplFromJson(Map json) => - _$BoutConfigImpl( +_$BoutConfigImpl _$$BoutConfigImplFromJson(Map json) => _$BoutConfigImpl( id: json['id'] as int?, periodDuration: json['periodDuration'] == null ? BoutConfig.defaultPeriodDuration @@ -24,8 +23,7 @@ _$BoutConfigImpl _$$BoutConfigImplFromJson(Map json) => periodCount: json['periodCount'] as int? ?? BoutConfig.defaultPeriodCount, ); -Map _$$BoutConfigImplToJson(_$BoutConfigImpl instance) => - { +Map _$$BoutConfigImplToJson(_$BoutConfigImpl instance) => { 'id': instance.id, 'periodDuration': instance.periodDuration.inMicroseconds, 'breakDuration': instance.breakDuration.inMicroseconds, diff --git a/wrestling_scoreboard_common/lib/src/data/club.freezed.dart b/wrestling_scoreboard_common/lib/src/data/club.freezed.dart index 590fba67..a5501790 100644 --- a/wrestling_scoreboard_common/lib/src/data/club.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/club.freezed.dart @@ -31,15 +31,13 @@ mixin _$Club { /// @nodoc abstract class $ClubCopyWith<$Res> { - factory $ClubCopyWith(Club value, $Res Function(Club) then) = - _$ClubCopyWithImpl<$Res, Club>; + factory $ClubCopyWith(Club value, $Res Function(Club) then) = _$ClubCopyWithImpl<$Res, Club>; @useResult $Res call({int? id, String name, String? no}); } /// @nodoc -class _$ClubCopyWithImpl<$Res, $Val extends Club> - implements $ClubCopyWith<$Res> { +class _$ClubCopyWithImpl<$Res, $Val extends Club> implements $ClubCopyWith<$Res> { _$ClubCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -73,20 +71,15 @@ class _$ClubCopyWithImpl<$Res, $Val extends Club> /// @nodoc abstract class _$$ClubImplCopyWith<$Res> implements $ClubCopyWith<$Res> { - factory _$$ClubImplCopyWith( - _$ClubImpl value, $Res Function(_$ClubImpl) then) = - __$$ClubImplCopyWithImpl<$Res>; + factory _$$ClubImplCopyWith(_$ClubImpl value, $Res Function(_$ClubImpl) then) = __$$ClubImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, String name, String? no}); } /// @nodoc -class __$$ClubImplCopyWithImpl<$Res> - extends _$ClubCopyWithImpl<$Res, _$ClubImpl> - implements _$$ClubImplCopyWith<$Res> { - __$$ClubImplCopyWithImpl(_$ClubImpl _value, $Res Function(_$ClubImpl) _then) - : super(_value, _then); +class __$$ClubImplCopyWithImpl<$Res> extends _$ClubCopyWithImpl<$Res, _$ClubImpl> implements _$$ClubImplCopyWith<$Res> { + __$$ClubImplCopyWithImpl(_$ClubImpl _value, $Res Function(_$ClubImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -117,8 +110,7 @@ class __$$ClubImplCopyWithImpl<$Res> class _$ClubImpl extends _Club { const _$ClubImpl({this.id, required this.name, this.no}) : super._(); - factory _$ClubImpl.fromJson(Map json) => - _$$ClubImplFromJson(json); + factory _$ClubImpl.fromJson(Map json) => _$$ClubImplFromJson(json); @override final int? id; @@ -149,8 +141,7 @@ class _$ClubImpl extends _Club { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ClubImplCopyWith<_$ClubImpl> get copyWith => - __$$ClubImplCopyWithImpl<_$ClubImpl>(this, _$identity); + _$$ClubImplCopyWith<_$ClubImpl> get copyWith => __$$ClubImplCopyWithImpl<_$ClubImpl>(this, _$identity); @override Map toJson() { @@ -161,10 +152,7 @@ class _$ClubImpl extends _Club { } abstract class _Club extends Club { - const factory _Club( - {final int? id, - required final String name, - final String? no}) = _$ClubImpl; + const factory _Club({final int? id, required final String name, final String? no}) = _$ClubImpl; const _Club._() : super._(); factory _Club.fromJson(Map json) = _$ClubImpl.fromJson; @@ -177,6 +165,5 @@ abstract class _Club extends Club { String? get no; @override @JsonKey(ignore: true) - _$$ClubImplCopyWith<_$ClubImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ClubImplCopyWith<_$ClubImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/club.g.dart b/wrestling_scoreboard_common/lib/src/data/club.g.dart index 4ffcc2ad..778ddeeb 100644 --- a/wrestling_scoreboard_common/lib/src/data/club.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/club.g.dart @@ -12,8 +12,7 @@ _$ClubImpl _$$ClubImplFromJson(Map json) => _$ClubImpl( no: json['no'] as String?, ); -Map _$$ClubImplToJson(_$ClubImpl instance) => - { +Map _$$ClubImplToJson(_$ClubImpl instance) => { 'id': instance.id, 'name': instance.name, 'no': instance.no, diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition.freezed.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition.freezed.dart index 09d19815..e6a30dca 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition.freezed.dart @@ -31,14 +31,12 @@ mixin _$Competition { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $CompetitionCopyWith get copyWith => - throw _privateConstructorUsedError; + $CompetitionCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CompetitionCopyWith<$Res> { - factory $CompetitionCopyWith( - Competition value, $Res Function(Competition) then) = + factory $CompetitionCopyWith(Competition value, $Res Function(Competition) then) = _$CompetitionCopyWithImpl<$Res, Competition>; @useResult $Res call( @@ -55,8 +53,7 @@ abstract class $CompetitionCopyWith<$Res> { } /// @nodoc -class _$CompetitionCopyWithImpl<$Res, $Val extends Competition> - implements $CompetitionCopyWith<$Res> { +class _$CompetitionCopyWithImpl<$Res, $Val extends Competition> implements $CompetitionCopyWith<$Res> { _$CompetitionCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -122,10 +119,8 @@ class _$CompetitionCopyWithImpl<$Res, $Val extends Competition> } /// @nodoc -abstract class _$$CompetitionImplCopyWith<$Res> - implements $CompetitionCopyWith<$Res> { - factory _$$CompetitionImplCopyWith( - _$CompetitionImpl value, $Res Function(_$CompetitionImpl) then) = +abstract class _$$CompetitionImplCopyWith<$Res> implements $CompetitionCopyWith<$Res> { + factory _$$CompetitionImplCopyWith(_$CompetitionImpl value, $Res Function(_$CompetitionImpl) then) = __$$CompetitionImplCopyWithImpl<$Res>; @override @useResult @@ -144,11 +139,9 @@ abstract class _$$CompetitionImplCopyWith<$Res> } /// @nodoc -class __$$CompetitionImplCopyWithImpl<$Res> - extends _$CompetitionCopyWithImpl<$Res, _$CompetitionImpl> +class __$$CompetitionImplCopyWithImpl<$Res> extends _$CompetitionCopyWithImpl<$Res, _$CompetitionImpl> implements _$$CompetitionImplCopyWith<$Res> { - __$$CompetitionImplCopyWithImpl( - _$CompetitionImpl _value, $Res Function(_$CompetitionImpl) _then) + __$$CompetitionImplCopyWithImpl(_$CompetitionImpl _value, $Res Function(_$CompetitionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -214,8 +207,7 @@ class _$CompetitionImpl extends _Competition { this.comment}) : super._(); - factory _$CompetitionImpl.fromJson(Map json) => - _$$CompetitionImplFromJson(json); + factory _$CompetitionImpl.fromJson(Map json) => _$$CompetitionImplFromJson(json); @override final int? id; @@ -246,21 +238,17 @@ class _$CompetitionImpl extends _Competition { other is _$CompetitionImpl && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && - (identical(other.boutConfig, boutConfig) || - other.boutConfig == boutConfig) && - (identical(other.location, location) || - other.location == location) && + (identical(other.boutConfig, boutConfig) || other.boutConfig == boutConfig) && + (identical(other.location, location) || other.location == location) && (identical(other.date, date) || other.date == date) && (identical(other.no, no) || other.no == no) && - (identical(other.visitorsCount, visitorsCount) || - other.visitorsCount == visitorsCount) && + (identical(other.visitorsCount, visitorsCount) || other.visitorsCount == visitorsCount) && (identical(other.comment, comment) || other.comment == comment)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, id, name, boutConfig, location, - date, no, visitorsCount, comment); + int get hashCode => Object.hash(runtimeType, id, name, boutConfig, location, date, no, visitorsCount, comment); @JsonKey(ignore: true) @override @@ -288,8 +276,7 @@ abstract class _Competition extends Competition { final String? comment}) = _$CompetitionImpl; const _Competition._() : super._(); - factory _Competition.fromJson(Map json) = - _$CompetitionImpl.fromJson; + factory _Competition.fromJson(Map json) = _$CompetitionImpl.fromJson; @override int? get id; @@ -309,6 +296,5 @@ abstract class _Competition extends Competition { String? get comment; @override @JsonKey(ignore: true) - _$$CompetitionImplCopyWith<_$CompetitionImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CompetitionImplCopyWith<_$CompetitionImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition.g.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition.g.dart index bb24d7f3..7e5f920a 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition.g.dart @@ -6,12 +6,10 @@ part of 'competition.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CompetitionImpl _$$CompetitionImplFromJson(Map json) => - _$CompetitionImpl( +_$CompetitionImpl _$$CompetitionImplFromJson(Map json) => _$CompetitionImpl( id: json['id'] as int?, name: json['name'] as String, - boutConfig: - BoutConfig.fromJson(json['boutConfig'] as Map), + boutConfig: BoutConfig.fromJson(json['boutConfig'] as Map), location: json['location'] as String?, date: DateTime.parse(json['date'] as String), no: json['no'] as String?, @@ -19,8 +17,7 @@ _$CompetitionImpl _$$CompetitionImplFromJson(Map json) => comment: json['comment'] as String?, ); -Map _$$CompetitionImplToJson(_$CompetitionImpl instance) => - { +Map _$$CompetitionImplToJson(_$CompetitionImpl instance) => { 'id': instance.id, 'name': instance.name, 'boutConfig': instance.boutConfig.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.freezed.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.freezed.dart index a9563b0d..a94df923 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.freezed.dart @@ -26,14 +26,12 @@ mixin _$CompetitionBout { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $CompetitionBoutCopyWith get copyWith => - throw _privateConstructorUsedError; + $CompetitionBoutCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CompetitionBoutCopyWith<$Res> { - factory $CompetitionBoutCopyWith( - CompetitionBout value, $Res Function(CompetitionBout) then) = + factory $CompetitionBoutCopyWith(CompetitionBout value, $Res Function(CompetitionBout) then) = _$CompetitionBoutCopyWithImpl<$Res, CompetitionBout>; @useResult $Res call({int? id, Competition competition, Bout bout}); @@ -43,8 +41,7 @@ abstract class $CompetitionBoutCopyWith<$Res> { } /// @nodoc -class _$CompetitionBoutCopyWithImpl<$Res, $Val extends CompetitionBout> - implements $CompetitionBoutCopyWith<$Res> { +class _$CompetitionBoutCopyWithImpl<$Res, $Val extends CompetitionBout> implements $CompetitionBoutCopyWith<$Res> { _$CompetitionBoutCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -93,10 +90,8 @@ class _$CompetitionBoutCopyWithImpl<$Res, $Val extends CompetitionBout> } /// @nodoc -abstract class _$$CompetitionBoutImplCopyWith<$Res> - implements $CompetitionBoutCopyWith<$Res> { - factory _$$CompetitionBoutImplCopyWith(_$CompetitionBoutImpl value, - $Res Function(_$CompetitionBoutImpl) then) = +abstract class _$$CompetitionBoutImplCopyWith<$Res> implements $CompetitionBoutCopyWith<$Res> { + factory _$$CompetitionBoutImplCopyWith(_$CompetitionBoutImpl value, $Res Function(_$CompetitionBoutImpl) then) = __$$CompetitionBoutImplCopyWithImpl<$Res>; @override @useResult @@ -109,11 +104,9 @@ abstract class _$$CompetitionBoutImplCopyWith<$Res> } /// @nodoc -class __$$CompetitionBoutImplCopyWithImpl<$Res> - extends _$CompetitionBoutCopyWithImpl<$Res, _$CompetitionBoutImpl> +class __$$CompetitionBoutImplCopyWithImpl<$Res> extends _$CompetitionBoutCopyWithImpl<$Res, _$CompetitionBoutImpl> implements _$$CompetitionBoutImplCopyWith<$Res> { - __$$CompetitionBoutImplCopyWithImpl( - _$CompetitionBoutImpl _value, $Res Function(_$CompetitionBoutImpl) _then) + __$$CompetitionBoutImplCopyWithImpl(_$CompetitionBoutImpl _value, $Res Function(_$CompetitionBoutImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -143,12 +136,9 @@ class __$$CompetitionBoutImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$CompetitionBoutImpl extends _CompetitionBout { - const _$CompetitionBoutImpl( - {this.id, required this.competition, required this.bout}) - : super._(); + const _$CompetitionBoutImpl({this.id, required this.competition, required this.bout}) : super._(); - factory _$CompetitionBoutImpl.fromJson(Map json) => - _$$CompetitionBoutImplFromJson(json); + factory _$CompetitionBoutImpl.fromJson(Map json) => _$$CompetitionBoutImplFromJson(json); @override final int? id; @@ -168,8 +158,7 @@ class _$CompetitionBoutImpl extends _CompetitionBout { (other.runtimeType == runtimeType && other is _$CompetitionBoutImpl && (identical(other.id, id) || other.id == id) && - (identical(other.competition, competition) || - other.competition == competition) && + (identical(other.competition, competition) || other.competition == competition) && (identical(other.bout, bout) || other.bout == bout)); } @@ -181,8 +170,7 @@ class _$CompetitionBoutImpl extends _CompetitionBout { @override @pragma('vm:prefer-inline') _$$CompetitionBoutImplCopyWith<_$CompetitionBoutImpl> get copyWith => - __$$CompetitionBoutImplCopyWithImpl<_$CompetitionBoutImpl>( - this, _$identity); + __$$CompetitionBoutImplCopyWithImpl<_$CompetitionBoutImpl>(this, _$identity); @override Map toJson() { @@ -193,14 +181,11 @@ class _$CompetitionBoutImpl extends _CompetitionBout { } abstract class _CompetitionBout extends CompetitionBout { - const factory _CompetitionBout( - {final int? id, - required final Competition competition, - required final Bout bout}) = _$CompetitionBoutImpl; + const factory _CompetitionBout({final int? id, required final Competition competition, required final Bout bout}) = + _$CompetitionBoutImpl; const _CompetitionBout._() : super._(); - factory _CompetitionBout.fromJson(Map json) = - _$CompetitionBoutImpl.fromJson; + factory _CompetitionBout.fromJson(Map json) = _$CompetitionBoutImpl.fromJson; @override int? get id; @@ -210,6 +195,5 @@ abstract class _CompetitionBout extends CompetitionBout { Bout get bout; @override @JsonKey(ignore: true) - _$$CompetitionBoutImplCopyWith<_$CompetitionBoutImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CompetitionBoutImplCopyWith<_$CompetitionBoutImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.g.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.g.dart index ff796f26..d71e1200 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_bout.g.dart @@ -6,18 +6,13 @@ part of 'competition_bout.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CompetitionBoutImpl _$$CompetitionBoutImplFromJson( - Map json) => - _$CompetitionBoutImpl( +_$CompetitionBoutImpl _$$CompetitionBoutImplFromJson(Map json) => _$CompetitionBoutImpl( id: json['id'] as int?, - competition: - Competition.fromJson(json['competition'] as Map), + competition: Competition.fromJson(json['competition'] as Map), bout: Bout.fromJson(json['bout'] as Map), ); -Map _$$CompetitionBoutImplToJson( - _$CompetitionBoutImpl instance) => - { +Map _$$CompetitionBoutImplToJson(_$CompetitionBoutImpl instance) => { 'id': instance.id, 'competition': instance.competition.toJson(), 'bout': instance.bout.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_person.freezed.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_person.freezed.dart index 41decd99..f6fe13bc 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_person.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_person.freezed.dart @@ -27,14 +27,12 @@ mixin _$CompetitionPerson { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $CompetitionPersonCopyWith get copyWith => - throw _privateConstructorUsedError; + $CompetitionPersonCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CompetitionPersonCopyWith<$Res> { - factory $CompetitionPersonCopyWith( - CompetitionPerson value, $Res Function(CompetitionPerson) then) = + factory $CompetitionPersonCopyWith(CompetitionPerson value, $Res Function(CompetitionPerson) then) = _$CompetitionPersonCopyWithImpl<$Res, CompetitionPerson>; @useResult $Res call({int? id, Competition competition, Person person, PersonRole role}); @@ -99,10 +97,8 @@ class _$CompetitionPersonCopyWithImpl<$Res, $Val extends CompetitionPerson> } /// @nodoc -abstract class _$$CompetitionPersonImplCopyWith<$Res> - implements $CompetitionPersonCopyWith<$Res> { - factory _$$CompetitionPersonImplCopyWith(_$CompetitionPersonImpl value, - $Res Function(_$CompetitionPersonImpl) then) = +abstract class _$$CompetitionPersonImplCopyWith<$Res> implements $CompetitionPersonCopyWith<$Res> { + factory _$$CompetitionPersonImplCopyWith(_$CompetitionPersonImpl value, $Res Function(_$CompetitionPersonImpl) then) = __$$CompetitionPersonImplCopyWithImpl<$Res>; @override @useResult @@ -115,11 +111,9 @@ abstract class _$$CompetitionPersonImplCopyWith<$Res> } /// @nodoc -class __$$CompetitionPersonImplCopyWithImpl<$Res> - extends _$CompetitionPersonCopyWithImpl<$Res, _$CompetitionPersonImpl> +class __$$CompetitionPersonImplCopyWithImpl<$Res> extends _$CompetitionPersonCopyWithImpl<$Res, _$CompetitionPersonImpl> implements _$$CompetitionPersonImplCopyWith<$Res> { - __$$CompetitionPersonImplCopyWithImpl(_$CompetitionPersonImpl _value, - $Res Function(_$CompetitionPersonImpl) _then) + __$$CompetitionPersonImplCopyWithImpl(_$CompetitionPersonImpl _value, $Res Function(_$CompetitionPersonImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -154,15 +148,10 @@ class __$$CompetitionPersonImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$CompetitionPersonImpl extends _CompetitionPerson { - const _$CompetitionPersonImpl( - {this.id, - required this.competition, - required this.person, - required this.role}) + const _$CompetitionPersonImpl({this.id, required this.competition, required this.person, required this.role}) : super._(); - factory _$CompetitionPersonImpl.fromJson(Map json) => - _$$CompetitionPersonImplFromJson(json); + factory _$CompetitionPersonImpl.fromJson(Map json) => _$$CompetitionPersonImplFromJson(json); @override final int? id; @@ -184,8 +173,7 @@ class _$CompetitionPersonImpl extends _CompetitionPerson { (other.runtimeType == runtimeType && other is _$CompetitionPersonImpl && (identical(other.id, id) || other.id == id) && - (identical(other.competition, competition) || - other.competition == competition) && + (identical(other.competition, competition) || other.competition == competition) && (identical(other.person, person) || other.person == person) && (identical(other.role, role) || other.role == role)); } @@ -198,8 +186,7 @@ class _$CompetitionPersonImpl extends _CompetitionPerson { @override @pragma('vm:prefer-inline') _$$CompetitionPersonImplCopyWith<_$CompetitionPersonImpl> get copyWith => - __$$CompetitionPersonImplCopyWithImpl<_$CompetitionPersonImpl>( - this, _$identity); + __$$CompetitionPersonImplCopyWithImpl<_$CompetitionPersonImpl>(this, _$identity); @override Map toJson() { @@ -217,8 +204,7 @@ abstract class _CompetitionPerson extends CompetitionPerson { required final PersonRole role}) = _$CompetitionPersonImpl; const _CompetitionPerson._() : super._(); - factory _CompetitionPerson.fromJson(Map json) = - _$CompetitionPersonImpl.fromJson; + factory _CompetitionPerson.fromJson(Map json) = _$CompetitionPersonImpl.fromJson; @override int? get id; @@ -230,6 +216,5 @@ abstract class _CompetitionPerson extends CompetitionPerson { PersonRole get role; @override @JsonKey(ignore: true) - _$$CompetitionPersonImplCopyWith<_$CompetitionPersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CompetitionPersonImplCopyWith<_$CompetitionPersonImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_person.g.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_person.g.dart index 927bd455..9596f863 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_person.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_person.g.dart @@ -6,19 +6,14 @@ part of 'competition_person.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CompetitionPersonImpl _$$CompetitionPersonImplFromJson( - Map json) => - _$CompetitionPersonImpl( +_$CompetitionPersonImpl _$$CompetitionPersonImplFromJson(Map json) => _$CompetitionPersonImpl( id: json['id'] as int?, - competition: - Competition.fromJson(json['competition'] as Map), + competition: Competition.fromJson(json['competition'] as Map), person: Person.fromJson(json['person'] as Map), role: $enumDecode(_$PersonRoleEnumMap, json['role']), ); -Map _$$CompetitionPersonImplToJson( - _$CompetitionPersonImpl instance) => - { +Map _$$CompetitionPersonImplToJson(_$CompetitionPersonImpl instance) => { 'id': instance.id, 'competition': instance.competition.toJson(), 'person': instance.person.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.dart index 032cb52b..cd40bf5f 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.dart @@ -30,7 +30,8 @@ class CompetitionTeamParticipation with _$CompetitionTeamParticipation implement }; } - static Future fromRaw(Map e, GetSingleOfTypeCallback getSingle) async => + static Future fromRaw( + Map e, GetSingleOfTypeCallback getSingle) async => CompetitionTeamParticipation( id: e['id'] as int?, competition: (await getSingle(e['competition_id'] as int))!, diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.freezed.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.freezed.dart index 4a222221..daaafcb5 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.freezed.dart @@ -14,8 +14,7 @@ T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); -CompetitionTeamParticipation _$CompetitionTeamParticipationFromJson( - Map json) { +CompetitionTeamParticipation _$CompetitionTeamParticipationFromJson(Map json) { return _CompetitionTeamParticipation.fromJson(json); } @@ -27,17 +26,15 @@ mixin _$CompetitionTeamParticipation { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $CompetitionTeamParticipationCopyWith - get copyWith => throw _privateConstructorUsedError; + $CompetitionTeamParticipationCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class $CompetitionTeamParticipationCopyWith<$Res> { factory $CompetitionTeamParticipationCopyWith( - CompetitionTeamParticipation value, - $Res Function(CompetitionTeamParticipation) then) = - _$CompetitionTeamParticipationCopyWithImpl<$Res, - CompetitionTeamParticipation>; + CompetitionTeamParticipation value, $Res Function(CompetitionTeamParticipation) then) = + _$CompetitionTeamParticipationCopyWithImpl<$Res, CompetitionTeamParticipation>; @useResult $Res call({int? id, Competition competition, Team team}); @@ -46,8 +43,7 @@ abstract class $CompetitionTeamParticipationCopyWith<$Res> { } /// @nodoc -class _$CompetitionTeamParticipationCopyWithImpl<$Res, - $Val extends CompetitionTeamParticipation> +class _$CompetitionTeamParticipationCopyWithImpl<$Res, $Val extends CompetitionTeamParticipation> implements $CompetitionTeamParticipationCopyWith<$Res> { _$CompetitionTeamParticipationCopyWithImpl(this._value, this._then); @@ -100,8 +96,7 @@ class _$CompetitionTeamParticipationCopyWithImpl<$Res, abstract class _$$CompetitionTeamParticipationImplCopyWith<$Res> implements $CompetitionTeamParticipationCopyWith<$Res> { factory _$$CompetitionTeamParticipationImplCopyWith( - _$CompetitionTeamParticipationImpl value, - $Res Function(_$CompetitionTeamParticipationImpl) then) = + _$CompetitionTeamParticipationImpl value, $Res Function(_$CompetitionTeamParticipationImpl) then) = __$$CompetitionTeamParticipationImplCopyWithImpl<$Res>; @override @useResult @@ -115,12 +110,10 @@ abstract class _$$CompetitionTeamParticipationImplCopyWith<$Res> /// @nodoc class __$$CompetitionTeamParticipationImplCopyWithImpl<$Res> - extends _$CompetitionTeamParticipationCopyWithImpl<$Res, - _$CompetitionTeamParticipationImpl> + extends _$CompetitionTeamParticipationCopyWithImpl<$Res, _$CompetitionTeamParticipationImpl> implements _$$CompetitionTeamParticipationImplCopyWith<$Res> { __$$CompetitionTeamParticipationImplCopyWithImpl( - _$CompetitionTeamParticipationImpl _value, - $Res Function(_$CompetitionTeamParticipationImpl) _then) + _$CompetitionTeamParticipationImpl _value, $Res Function(_$CompetitionTeamParticipationImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -150,12 +143,9 @@ class __$$CompetitionTeamParticipationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$CompetitionTeamParticipationImpl extends _CompetitionTeamParticipation { - const _$CompetitionTeamParticipationImpl( - {this.id, required this.competition, required this.team}) - : super._(); + const _$CompetitionTeamParticipationImpl({this.id, required this.competition, required this.team}) : super._(); - factory _$CompetitionTeamParticipationImpl.fromJson( - Map json) => + factory _$CompetitionTeamParticipationImpl.fromJson(Map json) => _$$CompetitionTeamParticipationImplFromJson(json); @override @@ -176,8 +166,7 @@ class _$CompetitionTeamParticipationImpl extends _CompetitionTeamParticipation { (other.runtimeType == runtimeType && other is _$CompetitionTeamParticipationImpl && (identical(other.id, id) || other.id == id) && - (identical(other.competition, competition) || - other.competition == competition) && + (identical(other.competition, competition) || other.competition == competition) && (identical(other.team, team) || other.team == team)); } @@ -188,10 +177,8 @@ class _$CompetitionTeamParticipationImpl extends _CompetitionTeamParticipation { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$CompetitionTeamParticipationImplCopyWith< - _$CompetitionTeamParticipationImpl> - get copyWith => __$$CompetitionTeamParticipationImplCopyWithImpl< - _$CompetitionTeamParticipationImpl>(this, _$identity); + _$$CompetitionTeamParticipationImplCopyWith<_$CompetitionTeamParticipationImpl> get copyWith => + __$$CompetitionTeamParticipationImplCopyWithImpl<_$CompetitionTeamParticipationImpl>(this, _$identity); @override Map toJson() { @@ -201,8 +188,7 @@ class _$CompetitionTeamParticipationImpl extends _CompetitionTeamParticipation { } } -abstract class _CompetitionTeamParticipation - extends CompetitionTeamParticipation { +abstract class _CompetitionTeamParticipation extends CompetitionTeamParticipation { const factory _CompetitionTeamParticipation( {final int? id, required final Competition competition, @@ -220,7 +206,6 @@ abstract class _CompetitionTeamParticipation Team get team; @override @JsonKey(ignore: true) - _$$CompetitionTeamParticipationImplCopyWith< - _$CompetitionTeamParticipationImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CompetitionTeamParticipationImplCopyWith<_$CompetitionTeamParticipationImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.g.dart b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.g.dart index d8c906cd..0a0beec2 100644 --- a/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/competition/competition_team_participation.g.dart @@ -6,17 +6,14 @@ part of 'competition_team_participation.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CompetitionTeamParticipationImpl _$$CompetitionTeamParticipationImplFromJson( - Map json) => +_$CompetitionTeamParticipationImpl _$$CompetitionTeamParticipationImplFromJson(Map json) => _$CompetitionTeamParticipationImpl( id: json['id'] as int?, - competition: - Competition.fromJson(json['competition'] as Map), + competition: Competition.fromJson(json['competition'] as Map), team: Team.fromJson(json['team'] as Map), ); -Map _$$CompetitionTeamParticipationImplToJson( - _$CompetitionTeamParticipationImpl instance) => +Map _$$CompetitionTeamParticipationImplToJson(_$CompetitionTeamParticipationImpl instance) => { 'id': instance.id, 'competition': instance.competition.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/lineup.freezed.dart b/wrestling_scoreboard_common/lib/src/data/lineup.freezed.dart index 01a015d1..3d0e5cf1 100644 --- a/wrestling_scoreboard_common/lib/src/data/lineup.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/lineup.freezed.dart @@ -22,8 +22,7 @@ Lineup _$LineupFromJson(Map json) { mixin _$Lineup { int? get id => throw _privateConstructorUsedError; Team get team => throw _privateConstructorUsedError; - Membership? get leader => - throw _privateConstructorUsedError; // Mannschaftsführer + Membership? get leader => throw _privateConstructorUsedError; // Mannschaftsführer Membership? get coach => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @@ -33,8 +32,7 @@ mixin _$Lineup { /// @nodoc abstract class $LineupCopyWith<$Res> { - factory $LineupCopyWith(Lineup value, $Res Function(Lineup) then) = - _$LineupCopyWithImpl<$Res, Lineup>; + factory $LineupCopyWith(Lineup value, $Res Function(Lineup) then) = _$LineupCopyWithImpl<$Res, Lineup>; @useResult $Res call({int? id, Team team, Membership? leader, Membership? coach}); @@ -44,8 +42,7 @@ abstract class $LineupCopyWith<$Res> { } /// @nodoc -class _$LineupCopyWithImpl<$Res, $Val extends Lineup> - implements $LineupCopyWith<$Res> { +class _$LineupCopyWithImpl<$Res, $Val extends Lineup> implements $LineupCopyWith<$Res> { _$LineupCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -116,8 +113,7 @@ class _$LineupCopyWithImpl<$Res, $Val extends Lineup> /// @nodoc abstract class _$$LineupImplCopyWith<$Res> implements $LineupCopyWith<$Res> { - factory _$$LineupImplCopyWith( - _$LineupImpl value, $Res Function(_$LineupImpl) then) = + factory _$$LineupImplCopyWith(_$LineupImpl value, $Res Function(_$LineupImpl) then) = __$$LineupImplCopyWithImpl<$Res>; @override @useResult @@ -132,12 +128,9 @@ abstract class _$$LineupImplCopyWith<$Res> implements $LineupCopyWith<$Res> { } /// @nodoc -class __$$LineupImplCopyWithImpl<$Res> - extends _$LineupCopyWithImpl<$Res, _$LineupImpl> +class __$$LineupImplCopyWithImpl<$Res> extends _$LineupCopyWithImpl<$Res, _$LineupImpl> implements _$$LineupImplCopyWith<$Res> { - __$$LineupImplCopyWithImpl( - _$LineupImpl _value, $Res Function(_$LineupImpl) _then) - : super(_value, _then); + __$$LineupImplCopyWithImpl(_$LineupImpl _value, $Res Function(_$LineupImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -171,11 +164,9 @@ class __$$LineupImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$LineupImpl extends _Lineup { - const _$LineupImpl({this.id, required this.team, this.leader, this.coach}) - : super._(); + const _$LineupImpl({this.id, required this.team, this.leader, this.coach}) : super._(); - factory _$LineupImpl.fromJson(Map json) => - _$$LineupImplFromJson(json); + factory _$LineupImpl.fromJson(Map json) => _$$LineupImplFromJson(json); @override final int? id; @@ -210,8 +201,7 @@ class _$LineupImpl extends _Lineup { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LineupImplCopyWith<_$LineupImpl> get copyWith => - __$$LineupImplCopyWithImpl<_$LineupImpl>(this, _$identity); + _$$LineupImplCopyWith<_$LineupImpl> get copyWith => __$$LineupImplCopyWithImpl<_$LineupImpl>(this, _$identity); @override Map toJson() { @@ -222,11 +212,8 @@ class _$LineupImpl extends _Lineup { } abstract class _Lineup extends Lineup { - const factory _Lineup( - {final int? id, - required final Team team, - final Membership? leader, - final Membership? coach}) = _$LineupImpl; + const factory _Lineup({final int? id, required final Team team, final Membership? leader, final Membership? coach}) = + _$LineupImpl; const _Lineup._() : super._(); factory _Lineup.fromJson(Map json) = _$LineupImpl.fromJson; @@ -241,6 +228,5 @@ abstract class _Lineup extends Lineup { Membership? get coach; @override @JsonKey(ignore: true) - _$$LineupImplCopyWith<_$LineupImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LineupImplCopyWith<_$LineupImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/lineup.g.dart b/wrestling_scoreboard_common/lib/src/data/lineup.g.dart index 7827da83..89760abb 100644 --- a/wrestling_scoreboard_common/lib/src/data/lineup.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/lineup.g.dart @@ -9,16 +9,11 @@ part of 'lineup.dart'; _$LineupImpl _$$LineupImplFromJson(Map json) => _$LineupImpl( id: json['id'] as int?, team: Team.fromJson(json['team'] as Map), - leader: json['leader'] == null - ? null - : Membership.fromJson(json['leader'] as Map), - coach: json['coach'] == null - ? null - : Membership.fromJson(json['coach'] as Map), + leader: json['leader'] == null ? null : Membership.fromJson(json['leader'] as Map), + coach: json['coach'] == null ? null : Membership.fromJson(json['coach'] as Map), ); -Map _$$LineupImplToJson(_$LineupImpl instance) => - { +Map _$$LineupImplToJson(_$LineupImpl instance) => { 'id': instance.id, 'team': instance.team.toJson(), 'leader': instance.leader?.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/membership.freezed.dart b/wrestling_scoreboard_common/lib/src/data/membership.freezed.dart index 7838d460..ecd47d86 100644 --- a/wrestling_scoreboard_common/lib/src/data/membership.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/membership.freezed.dart @@ -27,14 +27,12 @@ mixin _$Membership { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $MembershipCopyWith get copyWith => - throw _privateConstructorUsedError; + $MembershipCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MembershipCopyWith<$Res> { - factory $MembershipCopyWith( - Membership value, $Res Function(Membership) then) = + factory $MembershipCopyWith(Membership value, $Res Function(Membership) then) = _$MembershipCopyWithImpl<$Res, Membership>; @useResult $Res call({int? id, String? no, Club club, Person person}); @@ -44,8 +42,7 @@ abstract class $MembershipCopyWith<$Res> { } /// @nodoc -class _$MembershipCopyWithImpl<$Res, $Val extends Membership> - implements $MembershipCopyWith<$Res> { +class _$MembershipCopyWithImpl<$Res, $Val extends Membership> implements $MembershipCopyWith<$Res> { _$MembershipCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -99,10 +96,8 @@ class _$MembershipCopyWithImpl<$Res, $Val extends Membership> } /// @nodoc -abstract class _$$MembershipImplCopyWith<$Res> - implements $MembershipCopyWith<$Res> { - factory _$$MembershipImplCopyWith( - _$MembershipImpl value, $Res Function(_$MembershipImpl) then) = +abstract class _$$MembershipImplCopyWith<$Res> implements $MembershipCopyWith<$Res> { + factory _$$MembershipImplCopyWith(_$MembershipImpl value, $Res Function(_$MembershipImpl) then) = __$$MembershipImplCopyWithImpl<$Res>; @override @useResult @@ -115,12 +110,9 @@ abstract class _$$MembershipImplCopyWith<$Res> } /// @nodoc -class __$$MembershipImplCopyWithImpl<$Res> - extends _$MembershipCopyWithImpl<$Res, _$MembershipImpl> +class __$$MembershipImplCopyWithImpl<$Res> extends _$MembershipCopyWithImpl<$Res, _$MembershipImpl> implements _$$MembershipImplCopyWith<$Res> { - __$$MembershipImplCopyWithImpl( - _$MembershipImpl _value, $Res Function(_$MembershipImpl) _then) - : super(_value, _then); + __$$MembershipImplCopyWithImpl(_$MembershipImpl _value, $Res Function(_$MembershipImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -154,12 +146,9 @@ class __$$MembershipImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$MembershipImpl extends _Membership { - const _$MembershipImpl( - {this.id, this.no, required this.club, required this.person}) - : super._(); + const _$MembershipImpl({this.id, this.no, required this.club, required this.person}) : super._(); - factory _$MembershipImpl.fromJson(Map json) => - _$$MembershipImplFromJson(json); + factory _$MembershipImpl.fromJson(Map json) => _$$MembershipImplFromJson(json); @override final int? id; @@ -206,15 +195,11 @@ class _$MembershipImpl extends _Membership { } abstract class _Membership extends Membership { - const factory _Membership( - {final int? id, - final String? no, - required final Club club, - required final Person person}) = _$MembershipImpl; + const factory _Membership({final int? id, final String? no, required final Club club, required final Person person}) = + _$MembershipImpl; const _Membership._() : super._(); - factory _Membership.fromJson(Map json) = - _$MembershipImpl.fromJson; + factory _Membership.fromJson(Map json) = _$MembershipImpl.fromJson; @override int? get id; @@ -226,6 +211,5 @@ abstract class _Membership extends Membership { Person get person; @override @JsonKey(ignore: true) - _$$MembershipImplCopyWith<_$MembershipImpl> get copyWith => - throw _privateConstructorUsedError; + _$$MembershipImplCopyWith<_$MembershipImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/membership.g.dart b/wrestling_scoreboard_common/lib/src/data/membership.g.dart index 569ec470..85889f66 100644 --- a/wrestling_scoreboard_common/lib/src/data/membership.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/membership.g.dart @@ -6,16 +6,14 @@ part of 'membership.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MembershipImpl _$$MembershipImplFromJson(Map json) => - _$MembershipImpl( +_$MembershipImpl _$$MembershipImplFromJson(Map json) => _$MembershipImpl( id: json['id'] as int?, no: json['no'] as String?, club: Club.fromJson(json['club'] as Map), person: Person.fromJson(json['person'] as Map), ); -Map _$$MembershipImplToJson(_$MembershipImpl instance) => - { +Map _$$MembershipImplToJson(_$MembershipImpl instance) => { 'id': instance.id, 'no': instance.no, 'club': instance.club.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/participant_state.freezed.dart b/wrestling_scoreboard_common/lib/src/data/participant_state.freezed.dart index 6c5c8205..e5390351 100644 --- a/wrestling_scoreboard_common/lib/src/data/participant_state.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/participant_state.freezed.dart @@ -26,14 +26,12 @@ mixin _$ParticipantState { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ParticipantStateCopyWith get copyWith => - throw _privateConstructorUsedError; + $ParticipantStateCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ParticipantStateCopyWith<$Res> { - factory $ParticipantStateCopyWith( - ParticipantState value, $Res Function(ParticipantState) then) = + factory $ParticipantStateCopyWith(ParticipantState value, $Res Function(ParticipantState) then) = _$ParticipantStateCopyWithImpl<$Res, ParticipantState>; @useResult $Res call({int? id, Participation participation, int? classificationPoints}); @@ -42,8 +40,7 @@ abstract class $ParticipantStateCopyWith<$Res> { } /// @nodoc -class _$ParticipantStateCopyWithImpl<$Res, $Val extends ParticipantState> - implements $ParticipantStateCopyWith<$Res> { +class _$ParticipantStateCopyWithImpl<$Res, $Val extends ParticipantState> implements $ParticipantStateCopyWith<$Res> { _$ParticipantStateCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -84,10 +81,8 @@ class _$ParticipantStateCopyWithImpl<$Res, $Val extends ParticipantState> } /// @nodoc -abstract class _$$ParticipantStateImplCopyWith<$Res> - implements $ParticipantStateCopyWith<$Res> { - factory _$$ParticipantStateImplCopyWith(_$ParticipantStateImpl value, - $Res Function(_$ParticipantStateImpl) then) = +abstract class _$$ParticipantStateImplCopyWith<$Res> implements $ParticipantStateCopyWith<$Res> { + factory _$$ParticipantStateImplCopyWith(_$ParticipantStateImpl value, $Res Function(_$ParticipantStateImpl) then) = __$$ParticipantStateImplCopyWithImpl<$Res>; @override @useResult @@ -98,11 +93,9 @@ abstract class _$$ParticipantStateImplCopyWith<$Res> } /// @nodoc -class __$$ParticipantStateImplCopyWithImpl<$Res> - extends _$ParticipantStateCopyWithImpl<$Res, _$ParticipantStateImpl> +class __$$ParticipantStateImplCopyWithImpl<$Res> extends _$ParticipantStateCopyWithImpl<$Res, _$ParticipantStateImpl> implements _$$ParticipantStateImplCopyWith<$Res> { - __$$ParticipantStateImplCopyWithImpl(_$ParticipantStateImpl _value, - $Res Function(_$ParticipantStateImpl) _then) + __$$ParticipantStateImplCopyWithImpl(_$ParticipantStateImpl _value, $Res Function(_$ParticipantStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -132,12 +125,9 @@ class __$$ParticipantStateImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$ParticipantStateImpl extends _ParticipantState { - const _$ParticipantStateImpl( - {this.id, required this.participation, this.classificationPoints}) - : super._(); + const _$ParticipantStateImpl({this.id, required this.participation, this.classificationPoints}) : super._(); - factory _$ParticipantStateImpl.fromJson(Map json) => - _$$ParticipantStateImplFromJson(json); + factory _$ParticipantStateImpl.fromJson(Map json) => _$$ParticipantStateImplFromJson(json); @override final int? id; @@ -157,23 +147,20 @@ class _$ParticipantStateImpl extends _ParticipantState { (other.runtimeType == runtimeType && other is _$ParticipantStateImpl && (identical(other.id, id) || other.id == id) && - (identical(other.participation, participation) || - other.participation == participation) && + (identical(other.participation, participation) || other.participation == participation) && (identical(other.classificationPoints, classificationPoints) || other.classificationPoints == classificationPoints)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, id, participation, classificationPoints); + int get hashCode => Object.hash(runtimeType, id, participation, classificationPoints); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') _$$ParticipantStateImplCopyWith<_$ParticipantStateImpl> get copyWith => - __$$ParticipantStateImplCopyWithImpl<_$ParticipantStateImpl>( - this, _$identity); + __$$ParticipantStateImplCopyWithImpl<_$ParticipantStateImpl>(this, _$identity); @override Map toJson() { @@ -190,8 +177,7 @@ abstract class _ParticipantState extends ParticipantState { final int? classificationPoints}) = _$ParticipantStateImpl; const _ParticipantState._() : super._(); - factory _ParticipantState.fromJson(Map json) = - _$ParticipantStateImpl.fromJson; + factory _ParticipantState.fromJson(Map json) = _$ParticipantStateImpl.fromJson; @override int? get id; @@ -201,6 +187,5 @@ abstract class _ParticipantState extends ParticipantState { int? get classificationPoints; @override @JsonKey(ignore: true) - _$$ParticipantStateImplCopyWith<_$ParticipantStateImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ParticipantStateImplCopyWith<_$ParticipantStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/participant_state.g.dart b/wrestling_scoreboard_common/lib/src/data/participant_state.g.dart index 8458acb1..4c7076e1 100644 --- a/wrestling_scoreboard_common/lib/src/data/participant_state.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/participant_state.g.dart @@ -6,18 +6,13 @@ part of 'participant_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ParticipantStateImpl _$$ParticipantStateImplFromJson( - Map json) => - _$ParticipantStateImpl( +_$ParticipantStateImpl _$$ParticipantStateImplFromJson(Map json) => _$ParticipantStateImpl( id: json['id'] as int?, - participation: - Participation.fromJson(json['participation'] as Map), + participation: Participation.fromJson(json['participation'] as Map), classificationPoints: json['classificationPoints'] as int?, ); -Map _$$ParticipantStateImplToJson( - _$ParticipantStateImpl instance) => - { +Map _$$ParticipantStateImplToJson(_$ParticipantStateImpl instance) => { 'id': instance.id, 'participation': instance.participation.toJson(), 'classificationPoints': instance.classificationPoints, diff --git a/wrestling_scoreboard_common/lib/src/data/participation.freezed.dart b/wrestling_scoreboard_common/lib/src/data/participation.freezed.dart index f9c22740..c45e01f3 100644 --- a/wrestling_scoreboard_common/lib/src/data/participation.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/participation.freezed.dart @@ -28,22 +28,15 @@ mixin _$Participation { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ParticipationCopyWith get copyWith => - throw _privateConstructorUsedError; + $ParticipationCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ParticipationCopyWith<$Res> { - factory $ParticipationCopyWith( - Participation value, $Res Function(Participation) then) = + factory $ParticipationCopyWith(Participation value, $Res Function(Participation) then) = _$ParticipationCopyWithImpl<$Res, Participation>; @useResult - $Res call( - {int? id, - Membership membership, - Lineup lineup, - WeightClass? weightClass, - double? weight}); + $Res call({int? id, Membership membership, Lineup lineup, WeightClass? weightClass, double? weight}); $MembershipCopyWith<$Res> get membership; $LineupCopyWith<$Res> get lineup; @@ -51,8 +44,7 @@ abstract class $ParticipationCopyWith<$Res> { } /// @nodoc -class _$ParticipationCopyWithImpl<$Res, $Val extends Participation> - implements $ParticipationCopyWith<$Res> { +class _$ParticipationCopyWithImpl<$Res, $Val extends Participation> implements $ParticipationCopyWith<$Res> { _$ParticipationCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -123,19 +115,12 @@ class _$ParticipationCopyWithImpl<$Res, $Val extends Participation> } /// @nodoc -abstract class _$$ParticipationImplCopyWith<$Res> - implements $ParticipationCopyWith<$Res> { - factory _$$ParticipationImplCopyWith( - _$ParticipationImpl value, $Res Function(_$ParticipationImpl) then) = +abstract class _$$ParticipationImplCopyWith<$Res> implements $ParticipationCopyWith<$Res> { + factory _$$ParticipationImplCopyWith(_$ParticipationImpl value, $Res Function(_$ParticipationImpl) then) = __$$ParticipationImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? id, - Membership membership, - Lineup lineup, - WeightClass? weightClass, - double? weight}); + $Res call({int? id, Membership membership, Lineup lineup, WeightClass? weightClass, double? weight}); @override $MembershipCopyWith<$Res> get membership; @@ -146,11 +131,9 @@ abstract class _$$ParticipationImplCopyWith<$Res> } /// @nodoc -class __$$ParticipationImplCopyWithImpl<$Res> - extends _$ParticipationCopyWithImpl<$Res, _$ParticipationImpl> +class __$$ParticipationImplCopyWithImpl<$Res> extends _$ParticipationCopyWithImpl<$Res, _$ParticipationImpl> implements _$$ParticipationImplCopyWith<$Res> { - __$$ParticipationImplCopyWithImpl( - _$ParticipationImpl _value, $Res Function(_$ParticipationImpl) _then) + __$$ParticipationImplCopyWithImpl(_$ParticipationImpl _value, $Res Function(_$ParticipationImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -190,16 +173,10 @@ class __$$ParticipationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$ParticipationImpl extends _Participation { - const _$ParticipationImpl( - {this.id, - required this.membership, - required this.lineup, - this.weightClass, - this.weight}) + const _$ParticipationImpl({this.id, required this.membership, required this.lineup, this.weightClass, this.weight}) : super._(); - factory _$ParticipationImpl.fromJson(Map json) => - _$$ParticipationImplFromJson(json); + factory _$ParticipationImpl.fromJson(Map json) => _$$ParticipationImplFromJson(json); @override final int? id; @@ -223,18 +200,15 @@ class _$ParticipationImpl extends _Participation { (other.runtimeType == runtimeType && other is _$ParticipationImpl && (identical(other.id, id) || other.id == id) && - (identical(other.membership, membership) || - other.membership == membership) && + (identical(other.membership, membership) || other.membership == membership) && (identical(other.lineup, lineup) || other.lineup == lineup) && - (identical(other.weightClass, weightClass) || - other.weightClass == weightClass) && + (identical(other.weightClass, weightClass) || other.weightClass == weightClass) && (identical(other.weight, weight) || other.weight == weight)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, id, membership, lineup, weightClass, weight); + int get hashCode => Object.hash(runtimeType, id, membership, lineup, weightClass, weight); @JsonKey(ignore: true) @override @@ -259,8 +233,7 @@ abstract class _Participation extends Participation { final double? weight}) = _$ParticipationImpl; const _Participation._() : super._(); - factory _Participation.fromJson(Map json) = - _$ParticipationImpl.fromJson; + factory _Participation.fromJson(Map json) = _$ParticipationImpl.fromJson; @override int? get id; @@ -274,6 +247,5 @@ abstract class _Participation extends Participation { double? get weight; @override @JsonKey(ignore: true) - _$$ParticipationImplCopyWith<_$ParticipationImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ParticipationImplCopyWith<_$ParticipationImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/participation.g.dart b/wrestling_scoreboard_common/lib/src/data/participation.g.dart index e3a5ad65..c636bc61 100644 --- a/wrestling_scoreboard_common/lib/src/data/participation.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/participation.g.dart @@ -6,20 +6,16 @@ part of 'participation.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ParticipationImpl _$$ParticipationImplFromJson(Map json) => - _$ParticipationImpl( +_$ParticipationImpl _$$ParticipationImplFromJson(Map json) => _$ParticipationImpl( id: json['id'] as int?, - membership: - Membership.fromJson(json['membership'] as Map), + membership: Membership.fromJson(json['membership'] as Map), lineup: Lineup.fromJson(json['lineup'] as Map), - weightClass: json['weightClass'] == null - ? null - : WeightClass.fromJson(json['weightClass'] as Map), + weightClass: + json['weightClass'] == null ? null : WeightClass.fromJson(json['weightClass'] as Map), weight: (json['weight'] as num?)?.toDouble(), ); -Map _$$ParticipationImplToJson(_$ParticipationImpl instance) => - { +Map _$$ParticipationImplToJson(_$ParticipationImpl instance) => { 'id': instance.id, 'membership': instance.membership.toJson(), 'lineup': instance.lineup.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/person.freezed.dart b/wrestling_scoreboard_common/lib/src/data/person.freezed.dart index d734cf0b..53b85772 100644 --- a/wrestling_scoreboard_common/lib/src/data/person.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/person.freezed.dart @@ -33,20 +33,13 @@ mixin _$Person { /// @nodoc abstract class $PersonCopyWith<$Res> { - factory $PersonCopyWith(Person value, $Res Function(Person) then) = - _$PersonCopyWithImpl<$Res, Person>; + factory $PersonCopyWith(Person value, $Res Function(Person) then) = _$PersonCopyWithImpl<$Res, Person>; @useResult - $Res call( - {int? id, - String prename, - String surname, - Gender? gender, - DateTime? birthDate}); + $Res call({int? id, String prename, String surname, Gender? gender, DateTime? birthDate}); } /// @nodoc -class _$PersonCopyWithImpl<$Res, $Val extends Person> - implements $PersonCopyWith<$Res> { +class _$PersonCopyWithImpl<$Res, $Val extends Person> implements $PersonCopyWith<$Res> { _$PersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -90,26 +83,17 @@ class _$PersonCopyWithImpl<$Res, $Val extends Person> /// @nodoc abstract class _$$PersonImplCopyWith<$Res> implements $PersonCopyWith<$Res> { - factory _$$PersonImplCopyWith( - _$PersonImpl value, $Res Function(_$PersonImpl) then) = + factory _$$PersonImplCopyWith(_$PersonImpl value, $Res Function(_$PersonImpl) then) = __$$PersonImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? id, - String prename, - String surname, - Gender? gender, - DateTime? birthDate}); + $Res call({int? id, String prename, String surname, Gender? gender, DateTime? birthDate}); } /// @nodoc -class __$$PersonImplCopyWithImpl<$Res> - extends _$PersonCopyWithImpl<$Res, _$PersonImpl> +class __$$PersonImplCopyWithImpl<$Res> extends _$PersonCopyWithImpl<$Res, _$PersonImpl> implements _$$PersonImplCopyWith<$Res> { - __$$PersonImplCopyWithImpl( - _$PersonImpl _value, $Res Function(_$PersonImpl) _then) - : super(_value, _then); + __$$PersonImplCopyWithImpl(_$PersonImpl _value, $Res Function(_$PersonImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -148,16 +132,9 @@ class __$$PersonImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$PersonImpl extends _Person { - const _$PersonImpl( - {this.id, - required this.prename, - required this.surname, - this.gender, - this.birthDate}) - : super._(); + const _$PersonImpl({this.id, required this.prename, required this.surname, this.gender, this.birthDate}) : super._(); - factory _$PersonImpl.fromJson(Map json) => - _$$PersonImplFromJson(json); + factory _$PersonImpl.fromJson(Map json) => _$$PersonImplFromJson(json); @override final int? id; @@ -184,20 +161,17 @@ class _$PersonImpl extends _Person { (identical(other.prename, prename) || other.prename == prename) && (identical(other.surname, surname) || other.surname == surname) && (identical(other.gender, gender) || other.gender == gender) && - (identical(other.birthDate, birthDate) || - other.birthDate == birthDate)); + (identical(other.birthDate, birthDate) || other.birthDate == birthDate)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, id, prename, surname, gender, birthDate); + int get hashCode => Object.hash(runtimeType, id, prename, surname, gender, birthDate); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PersonImplCopyWith<_$PersonImpl> get copyWith => - __$$PersonImplCopyWithImpl<_$PersonImpl>(this, _$identity); + _$$PersonImplCopyWith<_$PersonImpl> get copyWith => __$$PersonImplCopyWithImpl<_$PersonImpl>(this, _$identity); @override Map toJson() { @@ -230,6 +204,5 @@ abstract class _Person extends Person { DateTime? get birthDate; @override @JsonKey(ignore: true) - _$$PersonImplCopyWith<_$PersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonImplCopyWith<_$PersonImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/person.g.dart b/wrestling_scoreboard_common/lib/src/data/person.g.dart index fce6839a..fe57eedd 100644 --- a/wrestling_scoreboard_common/lib/src/data/person.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/person.g.dart @@ -11,13 +11,10 @@ _$PersonImpl _$$PersonImplFromJson(Map json) => _$PersonImpl( prename: json['prename'] as String, surname: json['surname'] as String, gender: $enumDecodeNullable(_$GenderEnumMap, json['gender']), - birthDate: json['birthDate'] == null - ? null - : DateTime.parse(json['birthDate'] as String), + birthDate: json['birthDate'] == null ? null : DateTime.parse(json['birthDate'] as String), ); -Map _$$PersonImplToJson(_$PersonImpl instance) => - { +Map _$$PersonImplToJson(_$PersonImpl instance) => { 'id': instance.id, 'prename': instance.prename, 'surname': instance.surname, diff --git a/wrestling_scoreboard_common/lib/src/data/team.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team.freezed.dart index e046732d..74d738aa 100644 --- a/wrestling_scoreboard_common/lib/src/data/team.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team.freezed.dart @@ -32,8 +32,7 @@ mixin _$Team { /// @nodoc abstract class $TeamCopyWith<$Res> { - factory $TeamCopyWith(Team value, $Res Function(Team) then) = - _$TeamCopyWithImpl<$Res, Team>; + factory $TeamCopyWith(Team value, $Res Function(Team) then) = _$TeamCopyWithImpl<$Res, Team>; @useResult $Res call({int? id, String name, Club club, String? description}); @@ -41,8 +40,7 @@ abstract class $TeamCopyWith<$Res> { } /// @nodoc -class _$TeamCopyWithImpl<$Res, $Val extends Team> - implements $TeamCopyWith<$Res> { +class _$TeamCopyWithImpl<$Res, $Val extends Team> implements $TeamCopyWith<$Res> { _$TeamCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -89,9 +87,7 @@ class _$TeamCopyWithImpl<$Res, $Val extends Team> /// @nodoc abstract class _$$TeamImplCopyWith<$Res> implements $TeamCopyWith<$Res> { - factory _$$TeamImplCopyWith( - _$TeamImpl value, $Res Function(_$TeamImpl) then) = - __$$TeamImplCopyWithImpl<$Res>; + factory _$$TeamImplCopyWith(_$TeamImpl value, $Res Function(_$TeamImpl) then) = __$$TeamImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, String name, Club club, String? description}); @@ -101,11 +97,8 @@ abstract class _$$TeamImplCopyWith<$Res> implements $TeamCopyWith<$Res> { } /// @nodoc -class __$$TeamImplCopyWithImpl<$Res> - extends _$TeamCopyWithImpl<$Res, _$TeamImpl> - implements _$$TeamImplCopyWith<$Res> { - __$$TeamImplCopyWithImpl(_$TeamImpl _value, $Res Function(_$TeamImpl) _then) - : super(_value, _then); +class __$$TeamImplCopyWithImpl<$Res> extends _$TeamCopyWithImpl<$Res, _$TeamImpl> implements _$$TeamImplCopyWith<$Res> { + __$$TeamImplCopyWithImpl(_$TeamImpl _value, $Res Function(_$TeamImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -139,12 +132,9 @@ class __$$TeamImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$TeamImpl extends _Team { - const _$TeamImpl( - {this.id, required this.name, required this.club, this.description}) - : super._(); + const _$TeamImpl({this.id, required this.name, required this.club, this.description}) : super._(); - factory _$TeamImpl.fromJson(Map json) => - _$$TeamImplFromJson(json); + factory _$TeamImpl.fromJson(Map json) => _$$TeamImplFromJson(json); @override final int? id; @@ -168,8 +158,7 @@ class _$TeamImpl extends _Team { (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.club, club) || other.club == club) && - (identical(other.description, description) || - other.description == description)); + (identical(other.description, description) || other.description == description)); } @JsonKey(ignore: true) @@ -179,8 +168,7 @@ class _$TeamImpl extends _Team { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$TeamImplCopyWith<_$TeamImpl> get copyWith => - __$$TeamImplCopyWithImpl<_$TeamImpl>(this, _$identity); + _$$TeamImplCopyWith<_$TeamImpl> get copyWith => __$$TeamImplCopyWithImpl<_$TeamImpl>(this, _$identity); @override Map toJson() { @@ -192,10 +180,7 @@ class _$TeamImpl extends _Team { abstract class _Team extends Team { const factory _Team( - {final int? id, - required final String name, - required final Club club, - final String? description}) = _$TeamImpl; + {final int? id, required final String name, required final Club club, final String? description}) = _$TeamImpl; const _Team._() : super._(); factory _Team.fromJson(Map json) = _$TeamImpl.fromJson; @@ -210,6 +195,5 @@ abstract class _Team extends Team { String? get description; @override @JsonKey(ignore: true) - _$$TeamImplCopyWith<_$TeamImpl> get copyWith => - throw _privateConstructorUsedError; + _$$TeamImplCopyWith<_$TeamImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team.g.dart b/wrestling_scoreboard_common/lib/src/data/team.g.dart index fa496893..6c13cfb3 100644 --- a/wrestling_scoreboard_common/lib/src/data/team.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team.g.dart @@ -13,8 +13,7 @@ _$TeamImpl _$$TeamImplFromJson(Map json) => _$TeamImpl( description: json['description'] as String?, ); -Map _$$TeamImplToJson(_$TeamImpl instance) => - { +Map _$$TeamImplToJson(_$TeamImpl instance) => { 'id': instance.id, 'name': instance.name, 'club': instance.club.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league.freezed.dart index 8c0e9c85..515eac52 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league.freezed.dart @@ -32,8 +32,7 @@ mixin _$League { /// @nodoc abstract class $LeagueCopyWith<$Res> { - factory $LeagueCopyWith(League value, $Res Function(League) then) = - _$LeagueCopyWithImpl<$Res, League>; + factory $LeagueCopyWith(League value, $Res Function(League) then) = _$LeagueCopyWithImpl<$Res, League>; @useResult $Res call({int? id, String name, DateTime startDate, BoutConfig boutConfig}); @@ -41,8 +40,7 @@ abstract class $LeagueCopyWith<$Res> { } /// @nodoc -class _$LeagueCopyWithImpl<$Res, $Val extends League> - implements $LeagueCopyWith<$Res> { +class _$LeagueCopyWithImpl<$Res, $Val extends League> implements $LeagueCopyWith<$Res> { _$LeagueCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -89,8 +87,7 @@ class _$LeagueCopyWithImpl<$Res, $Val extends League> /// @nodoc abstract class _$$LeagueImplCopyWith<$Res> implements $LeagueCopyWith<$Res> { - factory _$$LeagueImplCopyWith( - _$LeagueImpl value, $Res Function(_$LeagueImpl) then) = + factory _$$LeagueImplCopyWith(_$LeagueImpl value, $Res Function(_$LeagueImpl) then) = __$$LeagueImplCopyWithImpl<$Res>; @override @useResult @@ -101,12 +98,9 @@ abstract class _$$LeagueImplCopyWith<$Res> implements $LeagueCopyWith<$Res> { } /// @nodoc -class __$$LeagueImplCopyWithImpl<$Res> - extends _$LeagueCopyWithImpl<$Res, _$LeagueImpl> +class __$$LeagueImplCopyWithImpl<$Res> extends _$LeagueCopyWithImpl<$Res, _$LeagueImpl> implements _$$LeagueImplCopyWith<$Res> { - __$$LeagueImplCopyWithImpl( - _$LeagueImpl _value, $Res Function(_$LeagueImpl) _then) - : super(_value, _then); + __$$LeagueImplCopyWithImpl(_$LeagueImpl _value, $Res Function(_$LeagueImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -140,15 +134,9 @@ class __$$LeagueImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$LeagueImpl extends _League { - const _$LeagueImpl( - {this.id, - required this.name, - required this.startDate, - required this.boutConfig}) - : super._(); + const _$LeagueImpl({this.id, required this.name, required this.startDate, required this.boutConfig}) : super._(); - factory _$LeagueImpl.fromJson(Map json) => - _$$LeagueImplFromJson(json); + factory _$LeagueImpl.fromJson(Map json) => _$$LeagueImplFromJson(json); @override final int? id; @@ -171,10 +159,8 @@ class _$LeagueImpl extends _League { other is _$LeagueImpl && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && - (identical(other.startDate, startDate) || - other.startDate == startDate) && - (identical(other.boutConfig, boutConfig) || - other.boutConfig == boutConfig)); + (identical(other.startDate, startDate) || other.startDate == startDate) && + (identical(other.boutConfig, boutConfig) || other.boutConfig == boutConfig)); } @JsonKey(ignore: true) @@ -184,8 +170,7 @@ class _$LeagueImpl extends _League { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LeagueImplCopyWith<_$LeagueImpl> get copyWith => - __$$LeagueImplCopyWithImpl<_$LeagueImpl>(this, _$identity); + _$$LeagueImplCopyWith<_$LeagueImpl> get copyWith => __$$LeagueImplCopyWithImpl<_$LeagueImpl>(this, _$identity); @override Map toJson() { @@ -215,6 +200,5 @@ abstract class _League extends League { BoutConfig get boutConfig; @override @JsonKey(ignore: true) - _$$LeagueImplCopyWith<_$LeagueImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LeagueImplCopyWith<_$LeagueImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league.g.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league.g.dart index aafec85b..a79da856 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league.g.dart @@ -10,12 +10,10 @@ _$LeagueImpl _$$LeagueImplFromJson(Map json) => _$LeagueImpl( id: json['id'] as int?, name: json['name'] as String, startDate: DateTime.parse(json['startDate'] as String), - boutConfig: - BoutConfig.fromJson(json['boutConfig'] as Map), + boutConfig: BoutConfig.fromJson(json['boutConfig'] as Map), ); -Map _$$LeagueImplToJson(_$LeagueImpl instance) => - { +Map _$$LeagueImplToJson(_$LeagueImpl instance) => { 'id': instance.id, 'name': instance.name, 'startDate': instance.startDate.toIso8601String(), diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.freezed.dart index e7463540..cd0bd4ac 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.freezed.dart @@ -14,8 +14,7 @@ T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); -LeagueTeamParticipation _$LeagueTeamParticipationFromJson( - Map json) { +LeagueTeamParticipation _$LeagueTeamParticipationFromJson(Map json) { return _LeagueTeamParticipation.fromJson(json); } @@ -27,14 +26,12 @@ mixin _$LeagueTeamParticipation { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $LeagueTeamParticipationCopyWith get copyWith => - throw _privateConstructorUsedError; + $LeagueTeamParticipationCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LeagueTeamParticipationCopyWith<$Res> { - factory $LeagueTeamParticipationCopyWith(LeagueTeamParticipation value, - $Res Function(LeagueTeamParticipation) then) = + factory $LeagueTeamParticipationCopyWith(LeagueTeamParticipation value, $Res Function(LeagueTeamParticipation) then) = _$LeagueTeamParticipationCopyWithImpl<$Res, LeagueTeamParticipation>; @useResult $Res call({int? id, League league, Team team}); @@ -44,8 +41,7 @@ abstract class $LeagueTeamParticipationCopyWith<$Res> { } /// @nodoc -class _$LeagueTeamParticipationCopyWithImpl<$Res, - $Val extends LeagueTeamParticipation> +class _$LeagueTeamParticipationCopyWithImpl<$Res, $Val extends LeagueTeamParticipation> implements $LeagueTeamParticipationCopyWith<$Res> { _$LeagueTeamParticipationCopyWithImpl(this._value, this._then); @@ -95,11 +91,9 @@ class _$LeagueTeamParticipationCopyWithImpl<$Res, } /// @nodoc -abstract class _$$LeagueTeamParticipationImplCopyWith<$Res> - implements $LeagueTeamParticipationCopyWith<$Res> { +abstract class _$$LeagueTeamParticipationImplCopyWith<$Res> implements $LeagueTeamParticipationCopyWith<$Res> { factory _$$LeagueTeamParticipationImplCopyWith( - _$LeagueTeamParticipationImpl value, - $Res Function(_$LeagueTeamParticipationImpl) then) = + _$LeagueTeamParticipationImpl value, $Res Function(_$LeagueTeamParticipationImpl) then) = __$$LeagueTeamParticipationImplCopyWithImpl<$Res>; @override @useResult @@ -113,12 +107,10 @@ abstract class _$$LeagueTeamParticipationImplCopyWith<$Res> /// @nodoc class __$$LeagueTeamParticipationImplCopyWithImpl<$Res> - extends _$LeagueTeamParticipationCopyWithImpl<$Res, - _$LeagueTeamParticipationImpl> + extends _$LeagueTeamParticipationCopyWithImpl<$Res, _$LeagueTeamParticipationImpl> implements _$$LeagueTeamParticipationImplCopyWith<$Res> { __$$LeagueTeamParticipationImplCopyWithImpl( - _$LeagueTeamParticipationImpl _value, - $Res Function(_$LeagueTeamParticipationImpl) _then) + _$LeagueTeamParticipationImpl _value, $Res Function(_$LeagueTeamParticipationImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -148,9 +140,7 @@ class __$$LeagueTeamParticipationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$LeagueTeamParticipationImpl extends _LeagueTeamParticipation { - const _$LeagueTeamParticipationImpl( - {this.id, required this.league, required this.team}) - : super._(); + const _$LeagueTeamParticipationImpl({this.id, required this.league, required this.team}) : super._(); factory _$LeagueTeamParticipationImpl.fromJson(Map json) => _$$LeagueTeamParticipationImplFromJson(json); @@ -184,9 +174,8 @@ class _$LeagueTeamParticipationImpl extends _LeagueTeamParticipation { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LeagueTeamParticipationImplCopyWith<_$LeagueTeamParticipationImpl> - get copyWith => __$$LeagueTeamParticipationImplCopyWithImpl< - _$LeagueTeamParticipationImpl>(this, _$identity); + _$$LeagueTeamParticipationImplCopyWith<_$LeagueTeamParticipationImpl> get copyWith => + __$$LeagueTeamParticipationImplCopyWithImpl<_$LeagueTeamParticipationImpl>(this, _$identity); @override Map toJson() { @@ -197,14 +186,11 @@ class _$LeagueTeamParticipationImpl extends _LeagueTeamParticipation { } abstract class _LeagueTeamParticipation extends LeagueTeamParticipation { - const factory _LeagueTeamParticipation( - {final int? id, - required final League league, - required final Team team}) = _$LeagueTeamParticipationImpl; + const factory _LeagueTeamParticipation({final int? id, required final League league, required final Team team}) = + _$LeagueTeamParticipationImpl; const _LeagueTeamParticipation._() : super._(); - factory _LeagueTeamParticipation.fromJson(Map json) = - _$LeagueTeamParticipationImpl.fromJson; + factory _LeagueTeamParticipation.fromJson(Map json) = _$LeagueTeamParticipationImpl.fromJson; @override int? get id; @@ -214,6 +200,6 @@ abstract class _LeagueTeamParticipation extends LeagueTeamParticipation { Team get team; @override @JsonKey(ignore: true) - _$$LeagueTeamParticipationImplCopyWith<_$LeagueTeamParticipationImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LeagueTeamParticipationImplCopyWith<_$LeagueTeamParticipationImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.g.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.g.dart index f97b48e4..dea2234d 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league_team_participation.g.dart @@ -6,17 +6,14 @@ part of 'league_team_participation.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LeagueTeamParticipationImpl _$$LeagueTeamParticipationImplFromJson( - Map json) => +_$LeagueTeamParticipationImpl _$$LeagueTeamParticipationImplFromJson(Map json) => _$LeagueTeamParticipationImpl( id: json['id'] as int?, league: League.fromJson(json['league'] as Map), team: Team.fromJson(json['team'] as Map), ); -Map _$$LeagueTeamParticipationImplToJson( - _$LeagueTeamParticipationImpl instance) => - { +Map _$$LeagueTeamParticipationImplToJson(_$LeagueTeamParticipationImpl instance) => { 'id': instance.id, 'league': instance.league.toJson(), 'team': instance.team.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.freezed.dart index 47152af2..417cffa6 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.freezed.dart @@ -27,14 +27,12 @@ mixin _$LeagueWeightClass { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $LeagueWeightClassCopyWith get copyWith => - throw _privateConstructorUsedError; + $LeagueWeightClassCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LeagueWeightClassCopyWith<$Res> { - factory $LeagueWeightClassCopyWith( - LeagueWeightClass value, $Res Function(LeagueWeightClass) then) = + factory $LeagueWeightClassCopyWith(LeagueWeightClass value, $Res Function(LeagueWeightClass) then) = _$LeagueWeightClassCopyWithImpl<$Res, LeagueWeightClass>; @useResult $Res call({int? id, int pos, League league, WeightClass weightClass}); @@ -99,10 +97,8 @@ class _$LeagueWeightClassCopyWithImpl<$Res, $Val extends LeagueWeightClass> } /// @nodoc -abstract class _$$LeagueWeightClassImplCopyWith<$Res> - implements $LeagueWeightClassCopyWith<$Res> { - factory _$$LeagueWeightClassImplCopyWith(_$LeagueWeightClassImpl value, - $Res Function(_$LeagueWeightClassImpl) then) = +abstract class _$$LeagueWeightClassImplCopyWith<$Res> implements $LeagueWeightClassCopyWith<$Res> { + factory _$$LeagueWeightClassImplCopyWith(_$LeagueWeightClassImpl value, $Res Function(_$LeagueWeightClassImpl) then) = __$$LeagueWeightClassImplCopyWithImpl<$Res>; @override @useResult @@ -115,11 +111,9 @@ abstract class _$$LeagueWeightClassImplCopyWith<$Res> } /// @nodoc -class __$$LeagueWeightClassImplCopyWithImpl<$Res> - extends _$LeagueWeightClassCopyWithImpl<$Res, _$LeagueWeightClassImpl> +class __$$LeagueWeightClassImplCopyWithImpl<$Res> extends _$LeagueWeightClassCopyWithImpl<$Res, _$LeagueWeightClassImpl> implements _$$LeagueWeightClassImplCopyWith<$Res> { - __$$LeagueWeightClassImplCopyWithImpl(_$LeagueWeightClassImpl _value, - $Res Function(_$LeagueWeightClassImpl) _then) + __$$LeagueWeightClassImplCopyWithImpl(_$LeagueWeightClassImpl _value, $Res Function(_$LeagueWeightClassImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -154,15 +148,10 @@ class __$$LeagueWeightClassImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$LeagueWeightClassImpl extends _LeagueWeightClass { - const _$LeagueWeightClassImpl( - {this.id, - required this.pos, - required this.league, - required this.weightClass}) + const _$LeagueWeightClassImpl({this.id, required this.pos, required this.league, required this.weightClass}) : super._(); - factory _$LeagueWeightClassImpl.fromJson(Map json) => - _$$LeagueWeightClassImplFromJson(json); + factory _$LeagueWeightClassImpl.fromJson(Map json) => _$$LeagueWeightClassImplFromJson(json); @override final int? id; @@ -186,8 +175,7 @@ class _$LeagueWeightClassImpl extends _LeagueWeightClass { (identical(other.id, id) || other.id == id) && (identical(other.pos, pos) || other.pos == pos) && (identical(other.league, league) || other.league == league) && - (identical(other.weightClass, weightClass) || - other.weightClass == weightClass)); + (identical(other.weightClass, weightClass) || other.weightClass == weightClass)); } @JsonKey(ignore: true) @@ -198,8 +186,7 @@ class _$LeagueWeightClassImpl extends _LeagueWeightClass { @override @pragma('vm:prefer-inline') _$$LeagueWeightClassImplCopyWith<_$LeagueWeightClassImpl> get copyWith => - __$$LeagueWeightClassImplCopyWithImpl<_$LeagueWeightClassImpl>( - this, _$identity); + __$$LeagueWeightClassImplCopyWithImpl<_$LeagueWeightClassImpl>(this, _$identity); @override Map toJson() { @@ -217,8 +204,7 @@ abstract class _LeagueWeightClass extends LeagueWeightClass { required final WeightClass weightClass}) = _$LeagueWeightClassImpl; const _LeagueWeightClass._() : super._(); - factory _LeagueWeightClass.fromJson(Map json) = - _$LeagueWeightClassImpl.fromJson; + factory _LeagueWeightClass.fromJson(Map json) = _$LeagueWeightClassImpl.fromJson; @override int? get id; @@ -230,6 +216,5 @@ abstract class _LeagueWeightClass extends LeagueWeightClass { WeightClass get weightClass; @override @JsonKey(ignore: true) - _$$LeagueWeightClassImplCopyWith<_$LeagueWeightClassImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LeagueWeightClassImplCopyWith<_$LeagueWeightClassImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.g.dart b/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.g.dart index ef5ccc01..c8b39eef 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/league_weight_class.g.dart @@ -6,19 +6,14 @@ part of 'league_weight_class.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LeagueWeightClassImpl _$$LeagueWeightClassImplFromJson( - Map json) => - _$LeagueWeightClassImpl( +_$LeagueWeightClassImpl _$$LeagueWeightClassImplFromJson(Map json) => _$LeagueWeightClassImpl( id: json['id'] as int?, pos: json['pos'] as int, league: League.fromJson(json['league'] as Map), - weightClass: - WeightClass.fromJson(json['weightClass'] as Map), + weightClass: WeightClass.fromJson(json['weightClass'] as Map), ); -Map _$$LeagueWeightClassImplToJson( - _$LeagueWeightClassImpl instance) => - { +Map _$$LeagueWeightClassImplToJson(_$LeagueWeightClassImpl instance) => { 'id': instance.id, 'pos': instance.pos, 'league': instance.league.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/team_match.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team_match/team_match.freezed.dart index f306093b..8f0220a2 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/team_match.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/team_match.freezed.dart @@ -37,14 +37,12 @@ mixin _$TeamMatch { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $TeamMatchCopyWith get copyWith => - throw _privateConstructorUsedError; + $TeamMatchCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $TeamMatchCopyWith<$Res> { - factory $TeamMatchCopyWith(TeamMatch value, $Res Function(TeamMatch) then) = - _$TeamMatchCopyWithImpl<$Res, TeamMatch>; + factory $TeamMatchCopyWith(TeamMatch value, $Res Function(TeamMatch) then) = _$TeamMatchCopyWithImpl<$Res, TeamMatch>; @useResult $Res call( {int? id, @@ -73,8 +71,7 @@ abstract class $TeamMatchCopyWith<$Res> { } /// @nodoc -class _$TeamMatchCopyWithImpl<$Res, $Val extends TeamMatch> - implements $TeamMatchCopyWith<$Res> { +class _$TeamMatchCopyWithImpl<$Res, $Val extends TeamMatch> implements $TeamMatchCopyWith<$Res> { _$TeamMatchCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -250,10 +247,8 @@ class _$TeamMatchCopyWithImpl<$Res, $Val extends TeamMatch> } /// @nodoc -abstract class _$$TeamMatchImplCopyWith<$Res> - implements $TeamMatchCopyWith<$Res> { - factory _$$TeamMatchImplCopyWith( - _$TeamMatchImpl value, $Res Function(_$TeamMatchImpl) then) = +abstract class _$$TeamMatchImplCopyWith<$Res> implements $TeamMatchCopyWith<$Res> { + factory _$$TeamMatchImplCopyWith(_$TeamMatchImpl value, $Res Function(_$TeamMatchImpl) then) = __$$TeamMatchImplCopyWithImpl<$Res>; @override @useResult @@ -292,12 +287,9 @@ abstract class _$$TeamMatchImplCopyWith<$Res> } /// @nodoc -class __$$TeamMatchImplCopyWithImpl<$Res> - extends _$TeamMatchCopyWithImpl<$Res, _$TeamMatchImpl> +class __$$TeamMatchImplCopyWithImpl<$Res> extends _$TeamMatchCopyWithImpl<$Res, _$TeamMatchImpl> implements _$$TeamMatchImplCopyWith<$Res> { - __$$TeamMatchImplCopyWithImpl( - _$TeamMatchImpl _value, $Res Function(_$TeamMatchImpl) _then) - : super(_value, _then); + __$$TeamMatchImplCopyWithImpl(_$TeamMatchImpl _value, $Res Function(_$TeamMatchImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override @@ -398,8 +390,7 @@ class _$TeamMatchImpl extends _TeamMatch { this.comment}) : super._(); - factory _$TeamMatchImpl.fromJson(Map json) => - _$$TeamMatchImplFromJson(json); + factory _$TeamMatchImpl.fromJson(Map json) => _$$TeamMatchImplFromJson(json); @override final int? id; @@ -444,41 +435,22 @@ class _$TeamMatchImpl extends _TeamMatch { (identical(other.home, home) || other.home == home) && (identical(other.guest, guest) || other.guest == guest) && (identical(other.league, league) || other.league == league) && - (identical(other.matChairman, matChairman) || - other.matChairman == matChairman) && + (identical(other.matChairman, matChairman) || other.matChairman == matChairman) && (identical(other.referee, referee) || other.referee == referee) && (identical(other.judge, judge) || other.judge == judge) && - (identical(other.timeKeeper, timeKeeper) || - other.timeKeeper == timeKeeper) && - (identical(other.transcriptWriter, transcriptWriter) || - other.transcriptWriter == transcriptWriter) && + (identical(other.timeKeeper, timeKeeper) || other.timeKeeper == timeKeeper) && + (identical(other.transcriptWriter, transcriptWriter) || other.transcriptWriter == transcriptWriter) && (identical(other.no, no) || other.no == no) && - (identical(other.location, location) || - other.location == location) && + (identical(other.location, location) || other.location == location) && (identical(other.date, date) || other.date == date) && - (identical(other.visitorsCount, visitorsCount) || - other.visitorsCount == visitorsCount) && + (identical(other.visitorsCount, visitorsCount) || other.visitorsCount == visitorsCount) && (identical(other.comment, comment) || other.comment == comment)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - id, - home, - guest, - league, - matChairman, - referee, - judge, - timeKeeper, - transcriptWriter, - no, - location, - date, - visitorsCount, - comment); + int get hashCode => Object.hash(runtimeType, id, home, guest, league, matChairman, referee, judge, timeKeeper, + transcriptWriter, no, location, date, visitorsCount, comment); @JsonKey(ignore: true) @override @@ -512,8 +484,7 @@ abstract class _TeamMatch extends TeamMatch { final String? comment}) = _$TeamMatchImpl; const _TeamMatch._() : super._(); - factory _TeamMatch.fromJson(Map json) = - _$TeamMatchImpl.fromJson; + factory _TeamMatch.fromJson(Map json) = _$TeamMatchImpl.fromJson; @override int? get id; @@ -545,6 +516,5 @@ abstract class _TeamMatch extends TeamMatch { String? get comment; @override @JsonKey(ignore: true) - _$$TeamMatchImplCopyWith<_$TeamMatchImpl> get copyWith => - throw _privateConstructorUsedError; + _$$TeamMatchImplCopyWith<_$TeamMatchImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/team_match.g.dart b/wrestling_scoreboard_common/lib/src/data/team_match/team_match.g.dart index 20c5e925..36c5d371 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/team_match.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/team_match.g.dart @@ -6,29 +6,17 @@ part of 'team_match.dart'; // JsonSerializableGenerator // ************************************************************************** -_$TeamMatchImpl _$$TeamMatchImplFromJson(Map json) => - _$TeamMatchImpl( +_$TeamMatchImpl _$$TeamMatchImplFromJson(Map json) => _$TeamMatchImpl( id: json['id'] as int?, home: Lineup.fromJson(json['home'] as Map), guest: Lineup.fromJson(json['guest'] as Map), - league: json['league'] == null - ? null - : League.fromJson(json['league'] as Map), - matChairman: json['matChairman'] == null - ? null - : Person.fromJson(json['matChairman'] as Map), - referee: json['referee'] == null - ? null - : Person.fromJson(json['referee'] as Map), - judge: json['judge'] == null - ? null - : Person.fromJson(json['judge'] as Map), - timeKeeper: json['timeKeeper'] == null - ? null - : Person.fromJson(json['timeKeeper'] as Map), - transcriptWriter: json['transcriptWriter'] == null - ? null - : Person.fromJson(json['transcriptWriter'] as Map), + league: json['league'] == null ? null : League.fromJson(json['league'] as Map), + matChairman: json['matChairman'] == null ? null : Person.fromJson(json['matChairman'] as Map), + referee: json['referee'] == null ? null : Person.fromJson(json['referee'] as Map), + judge: json['judge'] == null ? null : Person.fromJson(json['judge'] as Map), + timeKeeper: json['timeKeeper'] == null ? null : Person.fromJson(json['timeKeeper'] as Map), + transcriptWriter: + json['transcriptWriter'] == null ? null : Person.fromJson(json['transcriptWriter'] as Map), no: json['no'] as String?, location: json['location'] as String?, date: DateTime.parse(json['date'] as String), @@ -36,8 +24,7 @@ _$TeamMatchImpl _$$TeamMatchImplFromJson(Map json) => comment: json['comment'] as String?, ); -Map _$$TeamMatchImplToJson(_$TeamMatchImpl instance) => - { +Map _$$TeamMatchImplToJson(_$TeamMatchImpl instance) => { 'id': instance.id, 'home': instance.home.toJson(), 'guest': instance.guest.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.freezed.dart b/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.freezed.dart index 93bee361..30fc9f27 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.freezed.dart @@ -27,14 +27,12 @@ mixin _$TeamMatchBout { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $TeamMatchBoutCopyWith get copyWith => - throw _privateConstructorUsedError; + $TeamMatchBoutCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $TeamMatchBoutCopyWith<$Res> { - factory $TeamMatchBoutCopyWith( - TeamMatchBout value, $Res Function(TeamMatchBout) then) = + factory $TeamMatchBoutCopyWith(TeamMatchBout value, $Res Function(TeamMatchBout) then) = _$TeamMatchBoutCopyWithImpl<$Res, TeamMatchBout>; @useResult $Res call({int? id, int pos, TeamMatch teamMatch, Bout bout}); @@ -44,8 +42,7 @@ abstract class $TeamMatchBoutCopyWith<$Res> { } /// @nodoc -class _$TeamMatchBoutCopyWithImpl<$Res, $Val extends TeamMatchBout> - implements $TeamMatchBoutCopyWith<$Res> { +class _$TeamMatchBoutCopyWithImpl<$Res, $Val extends TeamMatchBout> implements $TeamMatchBoutCopyWith<$Res> { _$TeamMatchBoutCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -99,10 +96,8 @@ class _$TeamMatchBoutCopyWithImpl<$Res, $Val extends TeamMatchBout> } /// @nodoc -abstract class _$$TeamMatchBoutImplCopyWith<$Res> - implements $TeamMatchBoutCopyWith<$Res> { - factory _$$TeamMatchBoutImplCopyWith( - _$TeamMatchBoutImpl value, $Res Function(_$TeamMatchBoutImpl) then) = +abstract class _$$TeamMatchBoutImplCopyWith<$Res> implements $TeamMatchBoutCopyWith<$Res> { + factory _$$TeamMatchBoutImplCopyWith(_$TeamMatchBoutImpl value, $Res Function(_$TeamMatchBoutImpl) then) = __$$TeamMatchBoutImplCopyWithImpl<$Res>; @override @useResult @@ -115,11 +110,9 @@ abstract class _$$TeamMatchBoutImplCopyWith<$Res> } /// @nodoc -class __$$TeamMatchBoutImplCopyWithImpl<$Res> - extends _$TeamMatchBoutCopyWithImpl<$Res, _$TeamMatchBoutImpl> +class __$$TeamMatchBoutImplCopyWithImpl<$Res> extends _$TeamMatchBoutCopyWithImpl<$Res, _$TeamMatchBoutImpl> implements _$$TeamMatchBoutImplCopyWith<$Res> { - __$$TeamMatchBoutImplCopyWithImpl( - _$TeamMatchBoutImpl _value, $Res Function(_$TeamMatchBoutImpl) _then) + __$$TeamMatchBoutImplCopyWithImpl(_$TeamMatchBoutImpl _value, $Res Function(_$TeamMatchBoutImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -154,12 +147,9 @@ class __$$TeamMatchBoutImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$TeamMatchBoutImpl extends _TeamMatchBout { - const _$TeamMatchBoutImpl( - {this.id, required this.pos, required this.teamMatch, required this.bout}) - : super._(); + const _$TeamMatchBoutImpl({this.id, required this.pos, required this.teamMatch, required this.bout}) : super._(); - factory _$TeamMatchBoutImpl.fromJson(Map json) => - _$$TeamMatchBoutImplFromJson(json); + factory _$TeamMatchBoutImpl.fromJson(Map json) => _$$TeamMatchBoutImplFromJson(json); @override final int? id; @@ -182,8 +172,7 @@ class _$TeamMatchBoutImpl extends _TeamMatchBout { other is _$TeamMatchBoutImpl && (identical(other.id, id) || other.id == id) && (identical(other.pos, pos) || other.pos == pos) && - (identical(other.teamMatch, teamMatch) || - other.teamMatch == teamMatch) && + (identical(other.teamMatch, teamMatch) || other.teamMatch == teamMatch) && (identical(other.bout, bout) || other.bout == bout)); } @@ -213,8 +202,7 @@ abstract class _TeamMatchBout extends TeamMatchBout { required final Bout bout}) = _$TeamMatchBoutImpl; const _TeamMatchBout._() : super._(); - factory _TeamMatchBout.fromJson(Map json) = - _$TeamMatchBoutImpl.fromJson; + factory _TeamMatchBout.fromJson(Map json) = _$TeamMatchBoutImpl.fromJson; @override int? get id; @@ -226,6 +214,5 @@ abstract class _TeamMatchBout extends TeamMatchBout { Bout get bout; @override @JsonKey(ignore: true) - _$$TeamMatchBoutImplCopyWith<_$TeamMatchBoutImpl> get copyWith => - throw _privateConstructorUsedError; + _$$TeamMatchBoutImplCopyWith<_$TeamMatchBoutImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.g.dart b/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.g.dart index 3af8a147..d9a4950f 100644 --- a/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/team_match/team_match_bout.g.dart @@ -6,16 +6,14 @@ part of 'team_match_bout.dart'; // JsonSerializableGenerator // ************************************************************************** -_$TeamMatchBoutImpl _$$TeamMatchBoutImplFromJson(Map json) => - _$TeamMatchBoutImpl( +_$TeamMatchBoutImpl _$$TeamMatchBoutImplFromJson(Map json) => _$TeamMatchBoutImpl( id: json['id'] as int?, pos: json['pos'] as int, teamMatch: TeamMatch.fromJson(json['teamMatch'] as Map), bout: Bout.fromJson(json['bout'] as Map), ); -Map _$$TeamMatchBoutImplToJson(_$TeamMatchBoutImpl instance) => - { +Map _$$TeamMatchBoutImplToJson(_$TeamMatchBoutImpl instance) => { 'id': instance.id, 'pos': instance.pos, 'teamMatch': instance.teamMatch.toJson(), diff --git a/wrestling_scoreboard_common/lib/src/data/weight_class.freezed.dart b/wrestling_scoreboard_common/lib/src/data/weight_class.freezed.dart index b9029118..194f90c4 100644 --- a/wrestling_scoreboard_common/lib/src/data/weight_class.freezed.dart +++ b/wrestling_scoreboard_common/lib/src/data/weight_class.freezed.dart @@ -28,27 +28,19 @@ mixin _$WeightClass { Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $WeightClassCopyWith get copyWith => - throw _privateConstructorUsedError; + $WeightClassCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $WeightClassCopyWith<$Res> { - factory $WeightClassCopyWith( - WeightClass value, $Res Function(WeightClass) then) = + factory $WeightClassCopyWith(WeightClass value, $Res Function(WeightClass) then) = _$WeightClassCopyWithImpl<$Res, WeightClass>; @useResult - $Res call( - {int? id, - int weight, - WrestlingStyle style, - String? suffix, - WeightUnit unit}); + $Res call({int? id, int weight, WrestlingStyle style, String? suffix, WeightUnit unit}); } /// @nodoc -class _$WeightClassCopyWithImpl<$Res, $Val extends WeightClass> - implements $WeightClassCopyWith<$Res> { +class _$WeightClassCopyWithImpl<$Res, $Val extends WeightClass> implements $WeightClassCopyWith<$Res> { _$WeightClassCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -91,27 +83,18 @@ class _$WeightClassCopyWithImpl<$Res, $Val extends WeightClass> } /// @nodoc -abstract class _$$WeightClassImplCopyWith<$Res> - implements $WeightClassCopyWith<$Res> { - factory _$$WeightClassImplCopyWith( - _$WeightClassImpl value, $Res Function(_$WeightClassImpl) then) = +abstract class _$$WeightClassImplCopyWith<$Res> implements $WeightClassCopyWith<$Res> { + factory _$$WeightClassImplCopyWith(_$WeightClassImpl value, $Res Function(_$WeightClassImpl) then) = __$$WeightClassImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? id, - int weight, - WrestlingStyle style, - String? suffix, - WeightUnit unit}); + $Res call({int? id, int weight, WrestlingStyle style, String? suffix, WeightUnit unit}); } /// @nodoc -class __$$WeightClassImplCopyWithImpl<$Res> - extends _$WeightClassCopyWithImpl<$Res, _$WeightClassImpl> +class __$$WeightClassImplCopyWithImpl<$Res> extends _$WeightClassCopyWithImpl<$Res, _$WeightClassImpl> implements _$$WeightClassImplCopyWith<$Res> { - __$$WeightClassImplCopyWithImpl( - _$WeightClassImpl _value, $Res Function(_$WeightClassImpl) _then) + __$$WeightClassImplCopyWithImpl(_$WeightClassImpl _value, $Res Function(_$WeightClassImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -152,15 +135,10 @@ class __$$WeightClassImplCopyWithImpl<$Res> @JsonSerializable() class _$WeightClassImpl extends _WeightClass { const _$WeightClassImpl( - {this.id, - required this.weight, - required this.style, - this.suffix, - this.unit = WeightUnit.kilogram}) + {this.id, required this.weight, required this.style, this.suffix, this.unit = WeightUnit.kilogram}) : super._(); - factory _$WeightClassImpl.fromJson(Map json) => - _$$WeightClassImplFromJson(json); + factory _$WeightClassImpl.fromJson(Map json) => _$$WeightClassImplFromJson(json); @override final int? id; @@ -202,8 +180,7 @@ abstract class _WeightClass extends WeightClass { final WeightUnit unit}) = _$WeightClassImpl; const _WeightClass._() : super._(); - factory _WeightClass.fromJson(Map json) = - _$WeightClassImpl.fromJson; + factory _WeightClass.fromJson(Map json) = _$WeightClassImpl.fromJson; @override int? get id; @@ -217,6 +194,5 @@ abstract class _WeightClass extends WeightClass { WeightUnit get unit; @override @JsonKey(ignore: true) - _$$WeightClassImplCopyWith<_$WeightClassImpl> get copyWith => - throw _privateConstructorUsedError; + _$$WeightClassImplCopyWith<_$WeightClassImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/wrestling_scoreboard_common/lib/src/data/weight_class.g.dart b/wrestling_scoreboard_common/lib/src/data/weight_class.g.dart index acdaa35a..c0ef8a44 100644 --- a/wrestling_scoreboard_common/lib/src/data/weight_class.g.dart +++ b/wrestling_scoreboard_common/lib/src/data/weight_class.g.dart @@ -6,18 +6,15 @@ part of 'weight_class.dart'; // JsonSerializableGenerator // ************************************************************************** -_$WeightClassImpl _$$WeightClassImplFromJson(Map json) => - _$WeightClassImpl( +_$WeightClassImpl _$$WeightClassImplFromJson(Map json) => _$WeightClassImpl( id: json['id'] as int?, weight: json['weight'] as int, style: $enumDecode(_$WrestlingStyleEnumMap, json['style']), suffix: json['suffix'] as String?, - unit: $enumDecodeNullable(_$WeightUnitEnumMap, json['unit']) ?? - WeightUnit.kilogram, + unit: $enumDecodeNullable(_$WeightUnitEnumMap, json['unit']) ?? WeightUnit.kilogram, ); -Map _$$WeightClassImplToJson(_$WeightClassImpl instance) => - { +Map _$$WeightClassImplToJson(_$WeightClassImpl instance) => { 'id': instance.id, 'weight': instance.weight, 'style': _$WrestlingStyleEnumMap[instance.style]!, diff --git a/wrestling_scoreboard_common/lib/src/enums/bout_result.dart b/wrestling_scoreboard_common/lib/src/enums/bout_result.dart index 91bc9d1e..c7b14268 100644 --- a/wrestling_scoreboard_common/lib/src/enums/bout_result.dart +++ b/wrestling_scoreboard_common/lib/src/enums/bout_result.dart @@ -42,10 +42,7 @@ enum BoutResult { } extension BoutResultParser on BoutResult { - String get name => - toString() - .split('.') - .last; + String get name => toString().split('.').last; static BoutResult valueOf(String name) => BoutResult.values.singleWhere((element) => element.name == name); } diff --git a/wrestling_scoreboard_common/lib/src/util/data_wrapper.dart b/wrestling_scoreboard_common/lib/src/util/data_wrapper.dart index cc73f534..ebdccd84 100644 --- a/wrestling_scoreboard_common/lib/src/util/data_wrapper.dart +++ b/wrestling_scoreboard_common/lib/src/util/data_wrapper.dart @@ -38,7 +38,8 @@ typedef HandleManyCallback = Future Function( typedef HandleManyRawCallback = Future Function( {required CRUD operation, required ManyDataObject> many}); -Future handleFromJson(Map json, { +Future handleFromJson( + Map json, { required HandleSingleCallback handleSingle, required HandleManyCallback handleMany, required HandleSingleRawCallback handleSingleRaw, @@ -159,7 +160,8 @@ Future handleFromJson(Map json, { } } -Future _handleFromJsonGeneric(Map json, { +Future _handleFromJsonGeneric( + Map json, { required HandleSingleCallback handleSingle, required HandleManyCallback handleMany, required HandleSingleRawCallback handleSingleRaw, diff --git a/wrestling_scoreboard_server/lib/controllers/entity_controller.dart b/wrestling_scoreboard_server/lib/controllers/entity_controller.dart index d605bfa2..d69934d6 100644 --- a/wrestling_scoreboard_server/lib/controllers/entity_controller.dart +++ b/wrestling_scoreboard_server/lib/controllers/entity_controller.dart @@ -325,8 +325,8 @@ abstract class EntityController { static Future> getManyFromDataType( {List? conditions, Conjunction conjunction = Conjunction.and, Map? substitutionValues}) { - return getControllerFromDataType(T) - .getMany(conditions: conditions, conjunction: conjunction, substitutionValues: substitutionValues) as Future>; + return getControllerFromDataType(T).getMany( + conditions: conditions, conjunction: conjunction, substitutionValues: substitutionValues) as Future>; } static EntityController getControllerFromDataType(Type t) { diff --git a/wrestling_scoreboard_server/lib/controllers/websocket_handler.dart b/wrestling_scoreboard_server/lib/controllers/websocket_handler.dart index fb25da8f..a7f12c8f 100644 --- a/wrestling_scoreboard_server/lib/controllers/websocket_handler.dart +++ b/wrestling_scoreboard_server/lib/controllers/websocket_handler.dart @@ -35,8 +35,7 @@ void broadcastSingle(T single) async { } else if (single is Bout) { } else if (single is BoutAction) { broadcast(jsonEncode(manyToJson( - await BoutActionController() - .getMany(conditions: ['bout_id = @id'], substitutionValues: {'id': single.bout.id}), + await BoutActionController().getMany(conditions: ['bout_id = @id'], substitutionValues: {'id': single.bout.id}), BoutAction, CRUD.update, isRaw: false, @@ -50,7 +49,7 @@ void broadcastSingle(T single) async { await LeagueWeightClassController() .getMany(conditions: ['league_id = @id'], substitutionValues: {'id': single.league.id}), LeagueWeightClass, - CRUD.update, + CRUD.update, isRaw: false, filterType: League, filterId: single.league.id))); @@ -60,14 +59,16 @@ void broadcastSingle(T single) async { await leagueTeamParticipationController .getMany(conditions: ['league_id = @id'], substitutionValues: {'id': single.league.id}), LeagueTeamParticipation, - CRUD.update, isRaw: false, + CRUD.update, + isRaw: false, filterType: League, filterId: single.league.id))); broadcast(jsonEncode(manyToJson( await leagueTeamParticipationController .getMany(conditions: ['team_id = @id'], substitutionValues: {'id': single.team.id}), LeagueTeamParticipation, - CRUD.update, isRaw: false, + CRUD.update, + isRaw: false, filterType: Team, filterId: single.team.id))); } else if (single is Lineup) { @@ -76,7 +77,8 @@ void broadcastSingle(T single) async { broadcast(jsonEncode(manyToJson( await MembershipController().getMany(conditions: ['club_id = @id'], substitutionValues: {'id': single.club.id}), Membership, - CRUD.update, isRaw: false, + CRUD.update, + isRaw: false, filterType: Club, filterId: single.club.id))); } else if (single is Participation) { @@ -84,7 +86,8 @@ void broadcastSingle(T single) async { await ParticipationController() .getMany(conditions: ['lineup_id = @id'], substitutionValues: {'id': single.lineup.id}), Participation, - CRUD.update, isRaw: false, + CRUD.update, + isRaw: false, filterType: Lineup, filterId: single.lineup.id))); } else if (single is ParticipantState) { @@ -94,7 +97,8 @@ void broadcastSingle(T single) async { broadcast(jsonEncode(manyToJson( await TeamController().getMany(conditions: ['club_id = @id'], substitutionValues: {'id': single.club.id}), Team, - CRUD.update, isRaw: false, + CRUD.update, + isRaw: false, filterType: Club, filterId: single.club.id))); } else if (single is TeamMatch) { @@ -102,13 +106,13 @@ void broadcastSingle(T single) async { final homeMatches = await teamMatchController .getManyFromQuery(TeamController.teamMatchesQuery, substitutionValues: {'id': single.home.team.id}); - broadcast( - jsonEncode(manyToJson(homeMatches, TeamMatch, CRUD.update, isRaw: false, filterType: Team, filterId: single.home.team.id))); + broadcast(jsonEncode(manyToJson(homeMatches, TeamMatch, CRUD.update, + isRaw: false, filterType: Team, filterId: single.home.team.id))); final guestMatches = await teamMatchController .getManyFromQuery(TeamController.teamMatchesQuery, substitutionValues: {'id': single.guest.team.id}); - broadcast( - jsonEncode(manyToJson(guestMatches, TeamMatch, CRUD.update, isRaw: false, filterType: Team, filterId: single.guest.team.id))); + broadcast(jsonEncode(manyToJson(guestMatches, TeamMatch, CRUD.update, + isRaw: false, filterType: Team, filterId: single.guest.team.id))); if (single.league?.id != null) { final leagueMatches = await teamMatchController @@ -212,13 +216,15 @@ void broadcastSingleRaw(Map single) async substitutionValues: {'id': single['home_id']}))['team_id']; final homeMatches = await teamMatchController .getManyRawFromQuery(TeamController.teamMatchesQuery, substitutionValues: {'id': homeTeamId}); - broadcast(jsonEncode(manyToJson(homeMatches, TeamMatch, CRUD.update, isRaw: true, filterType: Team, filterId: homeTeamId))); + broadcast(jsonEncode( + manyToJson(homeMatches, TeamMatch, CRUD.update, isRaw: true, filterType: Team, filterId: homeTeamId))); final guestTeamId = (await EntityController.query(await LineupController.teamIdStmt, substitutionValues: {'id': single['guest_id']}))['team_id']; final guestMatches = await teamMatchController .getManyRawFromQuery(TeamController.teamMatchesQuery, substitutionValues: {'id': guestTeamId}); - broadcast(jsonEncode(manyToJson(guestMatches, TeamMatch, CRUD.update, isRaw: true, filterType: Team, filterId: guestTeamId))); + broadcast(jsonEncode( + manyToJson(guestMatches, TeamMatch, CRUD.update, isRaw: true, filterType: Team, filterId: guestTeamId))); if (single['league_id'] != null) { final leagueMatches = await teamMatchController diff --git a/wrestling_scoreboard_server/test/server_test.dart b/wrestling_scoreboard_server/test/server_test.dart index 6cee0fb0..1a7e2834 100644 --- a/wrestling_scoreboard_server/test/server_test.dart +++ b/wrestling_scoreboard_server/test/server_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; void main() { myTestMethod() => 42; - + test('Run some test', () { expect(myTestMethod(), 42); });