From 00d8cbda150137bfadb5dbb2518c1fab93b62258 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Sun, 26 Nov 2023 17:07:08 +0100 Subject: [PATCH] Go to error when not able to connect --- app/lib/app_router.dart | 21 +- app/lib/app_router.g.dart | 73 ++- app/lib/app_router.gr.dart | 50 +- app/lib/models/adapter.dart | 29 +- app/lib/models/adapter.freezed.dart | 431 ++++++------- app/lib/models/adapter.g.dart | 401 +++++++++--- app/lib/models/book.dart | 54 +- app/lib/models/book.freezed.dart | 31 +- app/lib/models/capture.freezed.dart | 54 +- app/lib/models/capture.g.dart | 7 +- app/lib/models/communicator.dart | 167 ++--- app/lib/models/communicator.freezed.dart | 44 +- app/lib/models/communicator.g.dart | 7 +- app/lib/models/entry.g.dart | 176 +++++- app/lib/models/materials.freezed.dart | 42 +- app/lib/models/materials.g.dart | 9 +- app/lib/models/page.dart | 128 ++-- app/lib/models/page.freezed.dart | 86 +-- app/lib/models/page.g.dart | 507 +++++++++++++-- app/lib/models/potion_effects.g.dart | 2 +- app/lib/models/segment.freezed.dart | 33 +- app/lib/models/segment.g.dart | 67 +- app/lib/models/sounds.freezed.dart | 43 +- app/lib/models/sounds.g.dart | 69 ++- app/lib/models/writers.freezed.dart | 40 +- app/lib/models/writers.g.dart | 72 ++- app/lib/pages/error_connect_page.dart | 7 - app/lib/pages/page_editor.dart | 2 +- app/lib/pages/page_editor.g.dart | 4 +- app/lib/pages/pages_list.dart | 6 +- app/lib/pages/pages_list.freezed.dart | 41 +- app/lib/pages/pages_list.g.dart | 59 +- app/lib/utils/audio_player.g.dart | 2 +- .../components/app/cinematic_view.dart | 13 +- .../app/cinematic_view.freezed.dart | 108 ++-- .../components/app/cinematic_view.g.dart | 576 ++++++++++++++++-- .../components/app/entries_graph.g.dart | 2 +- .../widgets/components/app/entry_node.dart | 2 +- .../widgets/components/app/entry_node.g.dart | 57 +- .../widgets/components/app/entry_search.dart | 33 +- .../components/app/entry_search.g.dart | 4 +- .../widgets/components/app/page_search.dart | 14 +- .../widgets/components/app/page_search.g.dart | 4 +- .../components/app/search_bar.freezed.dart | 32 +- .../widgets/components/app/search_bar.g.dart | 8 +- .../components/app/select_entries.dart | 28 +- .../app/select_entries.freezed.dart | 35 +- .../components/app/select_entries.g.dart | 111 +++- .../components/app/static_entries_list.g.dart | 2 +- .../components/general/outline_button.dart | 6 +- .../components/general/toasts.freezed.dart | 67 +- .../components/general/tree_view.freezed.dart | 105 ++-- app/lib/widgets/inspector/editors.g.dart | 121 +++- app/lib/widgets/inspector/editors/list.g.dart | 57 +- .../widgets/inspector/editors/material.g.dart | 63 +- .../inspector/editors/page_selector.dart | 34 +- .../inspector/editors/potion_effect.g.dart | 2 +- .../widgets/inspector/editors/sound.g.dart | 7 +- app/lib/widgets/inspector/header.g.dart | 4 +- .../inspector/headers/capture_action.dart | 2 +- app/lib/widgets/inspector/heading.g.dart | 2 +- app/lib/widgets/inspector/inspector.g.dart | 2 +- app/macos/Podfile.lock | 2 +- app/pubspec.lock | 248 ++++---- app/pubspec.yaml | 22 +- 65 files changed, 3240 insertions(+), 1297 deletions(-) diff --git a/app/lib/app_router.dart b/app/lib/app_router.dart index 797622e82e..9e0c380477 100644 --- a/app/lib/app_router.dart +++ b/app/lib/app_router.dart @@ -29,7 +29,8 @@ class AppRouter extends _$AppRouter { @override RouteType get defaultRouteType => const RouteType.custom( - transitionsBuilder: TransitionsBuilders.noTransition); + transitionsBuilder: TransitionsBuilders.noTransition, + ); @override List get routes => [ @@ -65,12 +66,12 @@ RouteData? _fetchCurrentRouteData(String name, RoutingController controller) { /// Provides the current route data for the given [name]. @Riverpod(keepAlive: true) -RouteData? currentRouteData(CurrentRouteDataRef ref, String name) { +RouteData? currentRouteData(CurrentRouteDataRef ref, String path) { final router = ref.watch(appRouter); void invalidator() => ref.invalidateSelf(); router.addListener(invalidator); ref.onDispose(() => router.removeListener(invalidator)); - return _fetchCurrentRouteData(name, router); + return _fetchCurrentRouteData(path, router); } extension AppRouterX on AppRouter { @@ -89,15 +90,17 @@ extension AppRouterX on AppRouter { } } - /// Navigate to the given [pageId]. + /// Navigate to the given [pageName]. /// Returns true if the page was changed. - Future navigateToPage(PassingRef ref, String pageId) async { + Future navigateToPage(PassingRef ref, String pageName) async { final currentPage = ref.read(currentPageProvider); - if (currentPage?.name != pageId) { - await ref.read(appRouter).push(PageEditorRoute(id: pageId), - onFailure: (e) => - debugPrint("Failed to navigate to page $pageId: $e")); + if (currentPage?.pageName != pageName) { + await ref.read(appRouter).push( + PageEditorRoute(id: pageName), + onFailure: (e) => + debugPrint("Failed to navigate to page $pageName: $e"), + ); } } } diff --git a/app/lib/app_router.g.dart b/app/lib/app_router.g.dart index 54a4a4c0fc..b2ef27fd27 100644 --- a/app/lib/app_router.g.dart +++ b/app/lib/app_router.g.dart @@ -6,7 +6,7 @@ part of 'app_router.dart'; // RiverpodGenerator // ************************************************************************** -String _$currentRouteDataHash() => r'26e8ab76dc65802a22863a447292ee0d7c4e3b0d'; +String _$currentRouteDataHash() => r'3f2df7b23b6d8e38ccafd0d9de54c82fcc924dc6'; /// Copied from Dart SDK class _SystemHash { @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef CurrentRouteDataRef = ProviderRef; - /// Provides the current route data for the given [name]. /// /// Copied from [currentRouteData]. @@ -50,10 +48,10 @@ class CurrentRouteDataFamily extends Family { /// /// Copied from [currentRouteData]. CurrentRouteDataProvider call( - String name, + String path, ) { return CurrentRouteDataProvider( - name, + path, ); } @@ -62,7 +60,7 @@ class CurrentRouteDataFamily extends Family { covariant CurrentRouteDataProvider provider, ) { return call( - provider.name, + provider.path, ); } @@ -89,11 +87,11 @@ class CurrentRouteDataProvider extends Provider { /// /// Copied from [currentRouteData]. CurrentRouteDataProvider( - this.name, - ) : super.internal( + String path, + ) : this._internal( (ref) => currentRouteData( - ref, - name, + ref as CurrentRouteDataRef, + path, ), from: currentRouteDataProvider, name: r'currentRouteDataProvider', @@ -104,22 +102,69 @@ class CurrentRouteDataProvider extends Provider { dependencies: CurrentRouteDataFamily._dependencies, allTransitiveDependencies: CurrentRouteDataFamily._allTransitiveDependencies, + path: path, ); - final String name; + CurrentRouteDataProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.path, + }) : super.internal(); + + final String path; + + @override + Override overrideWith( + RouteData? Function(CurrentRouteDataRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: CurrentRouteDataProvider._internal( + (ref) => create(ref as CurrentRouteDataRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + path: path, + ), + ); + } + + @override + ProviderElement createElement() { + return _CurrentRouteDataProviderElement(this); + } @override bool operator ==(Object other) { - return other is CurrentRouteDataProvider && other.name == name; + return other is CurrentRouteDataProvider && other.path == path; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, path.hashCode); return _SystemHash.finish(hash); } } + +mixin CurrentRouteDataRef on ProviderRef { + /// The parameter `path` of this provider. + String get path; +} + +class _CurrentRouteDataProviderElement extends ProviderElement + with CurrentRouteDataRef { + _CurrentRouteDataProviderElement(super.provider); + + @override + String get path => (origin as CurrentRouteDataProvider).path; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/app_router.gr.dart b/app/lib/app_router.gr.dart index fb3ba00b3e..1fc944c205 100644 --- a/app/lib/app_router.gr.dart +++ b/app/lib/app_router.gr.dart @@ -55,15 +55,9 @@ abstract class _$AppRouter extends RootStackRouter { ); }, ErrorConnectRoute.name: (routeData) { - final args = routeData.argsAs(); return AutoRoutePage( routeData: routeData, - child: ErrorConnectPage( - hostname: args.hostname, - port: args.port, - token: args.token, - key: args.key, - ), + child: const ErrorConnectPage(), ); }, HomeRoute.name: (routeData) { @@ -176,50 +170,16 @@ class EmptyPageEditorRoute extends PageRouteInfo { /// generated route for /// [ErrorConnectPage] -class ErrorConnectRoute extends PageRouteInfo { - ErrorConnectRoute({ - required String hostname, - required int port, - String? token, - Key? key, - List? children, - }) : super( +class ErrorConnectRoute extends PageRouteInfo { + const ErrorConnectRoute({List? children}) + : super( ErrorConnectRoute.name, - args: ErrorConnectRouteArgs( - hostname: hostname, - port: port, - token: token, - key: key, - ), initialChildren: children, ); static const String name = 'ErrorConnectRoute'; - static const PageInfo page = - PageInfo(name); -} - -class ErrorConnectRouteArgs { - const ErrorConnectRouteArgs({ - required this.hostname, - required this.port, - this.token, - this.key, - }); - - final String hostname; - - final int port; - - final String? token; - - final Key? key; - - @override - String toString() { - return 'ErrorConnectRouteArgs{hostname: $hostname, port: $port, token: $token, key: $key}'; - } + static const PageInfo page = PageInfo(name); } /// generated route for diff --git a/app/lib/models/adapter.dart b/app/lib/models/adapter.dart index afeff2c6dc..140b19f9e8 100644 --- a/app/lib/models/adapter.dart +++ b/app/lib/models/adapter.dart @@ -22,25 +22,27 @@ List adapters(AdaptersRef ref) => ref.watch(bookProvider).adapters; List entryBlueprints(EntryBlueprintsRef ref) => ref.watch(adaptersProvider).expand((e) => e.entries).toList(); -/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. +/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. @riverpod -EntryBlueprint? entryBlueprint(EntryBlueprintRef ref, String name) => - ref.watch(entryBlueprintsProvider).firstWhereOrNull((e) => e.name == name); +EntryBlueprint? entryBlueprint(EntryBlueprintRef ref, String blueprintName) => + ref + .watch(entryBlueprintsProvider) + .firstWhereOrNull((e) => e.name == blueprintName); @riverpod -List entryTags(EntryTagsRef ref, String name) => - ref.watch(entryBlueprintProvider(name))?.tags ?? []; +List entryTags(EntryTagsRef ref, String blueprintName) => + ref.watch(entryBlueprintProvider(blueprintName))?.tags ?? []; /// Gets all the modifiers with a given name. @riverpod Map fieldModifiers( FieldModifiersRef ref, - String blueprint, - String name, + String blueprintName, + String modifierName, ) { return ref - .watch(entryBlueprintProvider(blueprint)) - ?.fieldsWithModifier(name) ?? + .watch(entryBlueprintProvider(blueprintName)) + ?.fieldsWithModifier(modifierName) ?? {}; } @@ -48,10 +50,13 @@ Map fieldModifiers( @riverpod List modifierPaths( ModifierPathsRef ref, - String blueprint, - String name, + String blueprintName, + String modifierName, ) { - return ref.watch(fieldModifiersProvider(blueprint, name)).keys.toList(); + return ref + .watch(fieldModifiersProvider(blueprintName, modifierName)) + .keys + .toList(); } /// A data model that represents an adapter. diff --git a/app/lib/models/adapter.freezed.dart b/app/lib/models/adapter.freezed.dart index 6bd1a1f4b9..8b8c191538 100644 --- a/app/lib/models/adapter.freezed.dart +++ b/app/lib/models/adapter.freezed.dart @@ -82,10 +82,10 @@ class _$AdapterCopyWithImpl<$Res, $Val extends Adapter> } /// @nodoc -abstract class _$$_AdapterCopyWith<$Res> implements $AdapterCopyWith<$Res> { - factory _$$_AdapterCopyWith( - _$_Adapter value, $Res Function(_$_Adapter) then) = - __$$_AdapterCopyWithImpl<$Res>; +abstract class _$$AdapterImplCopyWith<$Res> implements $AdapterCopyWith<$Res> { + factory _$$AdapterImplCopyWith( + _$AdapterImpl value, $Res Function(_$AdapterImpl) then) = + __$$AdapterImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -96,10 +96,11 @@ abstract class _$$_AdapterCopyWith<$Res> implements $AdapterCopyWith<$Res> { } /// @nodoc -class __$$_AdapterCopyWithImpl<$Res> - extends _$AdapterCopyWithImpl<$Res, _$_Adapter> - implements _$$_AdapterCopyWith<$Res> { - __$$_AdapterCopyWithImpl(_$_Adapter _value, $Res Function(_$_Adapter) _then) +class __$$AdapterImplCopyWithImpl<$Res> + extends _$AdapterCopyWithImpl<$Res, _$AdapterImpl> + implements _$$AdapterImplCopyWith<$Res> { + __$$AdapterImplCopyWithImpl( + _$AdapterImpl _value, $Res Function(_$AdapterImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -110,7 +111,7 @@ class __$$_AdapterCopyWithImpl<$Res> Object? version = null, Object? entries = null, }) { - return _then(_$_Adapter( + return _then(_$AdapterImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -133,16 +134,16 @@ class __$$_AdapterCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_Adapter with DiagnosticableTreeMixin implements _Adapter { - const _$_Adapter( +class _$AdapterImpl with DiagnosticableTreeMixin implements _Adapter { + const _$AdapterImpl( {required this.name, required this.description, required this.version, required final List entries}) : _entries = entries; - factory _$_Adapter.fromJson(Map json) => - _$$_AdapterFromJson(json); + factory _$AdapterImpl.fromJson(Map json) => + _$$AdapterImplFromJson(json); @override final String name; @@ -178,7 +179,7 @@ class _$_Adapter with DiagnosticableTreeMixin implements _Adapter { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Adapter && + other is _$AdapterImpl && (identical(other.name, name) || other.name == name) && (identical(other.description, description) || other.description == description) && @@ -194,12 +195,12 @@ class _$_Adapter with DiagnosticableTreeMixin implements _Adapter { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_AdapterCopyWith<_$_Adapter> get copyWith => - __$$_AdapterCopyWithImpl<_$_Adapter>(this, _$identity); + _$$AdapterImplCopyWith<_$AdapterImpl> get copyWith => + __$$AdapterImplCopyWithImpl<_$AdapterImpl>(this, _$identity); @override Map toJson() { - return _$$_AdapterToJson( + return _$$AdapterImplToJson( this, ); } @@ -210,9 +211,9 @@ abstract class _Adapter implements Adapter { {required final String name, required final String description, required final String version, - required final List entries}) = _$_Adapter; + required final List entries}) = _$AdapterImpl; - factory _Adapter.fromJson(Map json) = _$_Adapter.fromJson; + factory _Adapter.fromJson(Map json) = _$AdapterImpl.fromJson; @override String get name; @@ -224,7 +225,7 @@ abstract class _Adapter implements Adapter { List get entries; @override @JsonKey(ignore: true) - _$$_AdapterCopyWith<_$_Adapter> get copyWith => + _$$AdapterImplCopyWith<_$AdapterImpl> get copyWith => throw _privateConstructorUsedError; } @@ -321,11 +322,11 @@ class _$EntryBlueprintCopyWithImpl<$Res, $Val extends EntryBlueprint> } /// @nodoc -abstract class _$$_EntryBlueprintCopyWith<$Res> +abstract class _$$EntryBlueprintImplCopyWith<$Res> implements $EntryBlueprintCopyWith<$Res> { - factory _$$_EntryBlueprintCopyWith( - _$_EntryBlueprint value, $Res Function(_$_EntryBlueprint) then) = - __$$_EntryBlueprintCopyWithImpl<$Res>; + factory _$$EntryBlueprintImplCopyWith(_$EntryBlueprintImpl value, + $Res Function(_$EntryBlueprintImpl) then) = + __$$EntryBlueprintImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -339,11 +340,11 @@ abstract class _$$_EntryBlueprintCopyWith<$Res> } /// @nodoc -class __$$_EntryBlueprintCopyWithImpl<$Res> - extends _$EntryBlueprintCopyWithImpl<$Res, _$_EntryBlueprint> - implements _$$_EntryBlueprintCopyWith<$Res> { - __$$_EntryBlueprintCopyWithImpl( - _$_EntryBlueprint _value, $Res Function(_$_EntryBlueprint) _then) +class __$$EntryBlueprintImplCopyWithImpl<$Res> + extends _$EntryBlueprintCopyWithImpl<$Res, _$EntryBlueprintImpl> + implements _$$EntryBlueprintImplCopyWith<$Res> { + __$$EntryBlueprintImplCopyWithImpl( + _$EntryBlueprintImpl _value, $Res Function(_$EntryBlueprintImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -357,7 +358,7 @@ class __$$_EntryBlueprintCopyWithImpl<$Res> Object? color = null, Object? icon = null, }) { - return _then(_$_EntryBlueprint( + return _then(_$EntryBlueprintImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -392,10 +393,10 @@ class __$$_EntryBlueprintCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_EntryBlueprint +class _$EntryBlueprintImpl with DiagnosticableTreeMixin implements _EntryBlueprint { - const _$_EntryBlueprint( + const _$EntryBlueprintImpl( {required this.name, required this.description, required this.adapter, @@ -405,8 +406,8 @@ class _$_EntryBlueprint @IconConverter() this.icon = Icons.help}) : _tags = tags; - factory _$_EntryBlueprint.fromJson(Map json) => - _$$_EntryBlueprintFromJson(json); + factory _$EntryBlueprintImpl.fromJson(Map json) => + _$$EntryBlueprintImplFromJson(json); @override final String name; @@ -457,7 +458,7 @@ class _$_EntryBlueprint bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_EntryBlueprint && + other is _$EntryBlueprintImpl && (identical(other.name, name) || other.name == name) && (identical(other.description, description) || other.description == description) && @@ -483,12 +484,13 @@ class _$_EntryBlueprint @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_EntryBlueprintCopyWith<_$_EntryBlueprint> get copyWith => - __$$_EntryBlueprintCopyWithImpl<_$_EntryBlueprint>(this, _$identity); + _$$EntryBlueprintImplCopyWith<_$EntryBlueprintImpl> get copyWith => + __$$EntryBlueprintImplCopyWithImpl<_$EntryBlueprintImpl>( + this, _$identity); @override Map toJson() { - return _$$_EntryBlueprintToJson( + return _$$EntryBlueprintImplToJson( this, ); } @@ -502,10 +504,10 @@ abstract class _EntryBlueprint implements EntryBlueprint { required final ObjectField fields, final List tags, @ColorConverter() final Color color, - @IconConverter() final IconData icon}) = _$_EntryBlueprint; + @IconConverter() final IconData icon}) = _$EntryBlueprintImpl; factory _EntryBlueprint.fromJson(Map json) = - _$_EntryBlueprint.fromJson; + _$EntryBlueprintImpl.fromJson; @override String get name; @@ -525,7 +527,7 @@ abstract class _EntryBlueprint implements EntryBlueprint { IconData get icon; @override @JsonKey(ignore: true) - _$$_EntryBlueprintCopyWith<_$_EntryBlueprint> get copyWith => + _$$EntryBlueprintImplCopyWith<_$EntryBlueprintImpl> get copyWith => throw _privateConstructorUsedError; } @@ -689,21 +691,22 @@ class _$FieldInfoCopyWithImpl<$Res, $Val extends FieldInfo> } /// @nodoc -abstract class _$$_FieldTypeCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$_FieldTypeCopyWith( - _$_FieldType value, $Res Function(_$_FieldType) then) = - __$$_FieldTypeCopyWithImpl<$Res>; +abstract class _$$FieldTypeImplCopyWith<$Res> + implements $FieldInfoCopyWith<$Res> { + factory _$$FieldTypeImplCopyWith( + _$FieldTypeImpl value, $Res Function(_$FieldTypeImpl) then) = + __$$FieldTypeImplCopyWithImpl<$Res>; @override @useResult $Res call({List modifiers}); } /// @nodoc -class __$$_FieldTypeCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$_FieldType> - implements _$$_FieldTypeCopyWith<$Res> { - __$$_FieldTypeCopyWithImpl( - _$_FieldType _value, $Res Function(_$_FieldType) _then) +class __$$FieldTypeImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$FieldTypeImpl> + implements _$$FieldTypeImplCopyWith<$Res> { + __$$FieldTypeImplCopyWithImpl( + _$FieldTypeImpl _value, $Res Function(_$FieldTypeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -711,7 +714,7 @@ class __$$_FieldTypeCopyWithImpl<$Res> $Res call({ Object? modifiers = null, }) { - return _then(_$_FieldType( + return _then(_$FieldTypeImpl( modifiers: null == modifiers ? _value._modifiers : modifiers // ignore: cast_nullable_to_non_nullable @@ -722,14 +725,14 @@ class __$$_FieldTypeCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_FieldType with DiagnosticableTreeMixin implements _FieldType { - const _$_FieldType( +class _$FieldTypeImpl with DiagnosticableTreeMixin implements _FieldType { + const _$FieldTypeImpl( {final List modifiers = const [], final String? $type}) : _modifiers = modifiers, $type = $type ?? 'default'; - factory _$_FieldType.fromJson(Map json) => - _$$_FieldTypeFromJson(json); + factory _$FieldTypeImpl.fromJson(Map json) => + _$$FieldTypeImplFromJson(json); final List _modifiers; @override @@ -760,7 +763,7 @@ class _$_FieldType with DiagnosticableTreeMixin implements _FieldType { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_FieldType && + other is _$FieldTypeImpl && const DeepCollectionEquality() .equals(other._modifiers, _modifiers)); } @@ -773,8 +776,8 @@ class _$_FieldType with DiagnosticableTreeMixin implements _FieldType { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_FieldTypeCopyWith<_$_FieldType> get copyWith => - __$$_FieldTypeCopyWithImpl<_$_FieldType>(this, _$identity); + _$$FieldTypeImplCopyWith<_$FieldTypeImpl> get copyWith => + __$$FieldTypeImplCopyWithImpl<_$FieldTypeImpl>(this, _$identity); @override @optionalTypeArgs @@ -897,43 +900,43 @@ class _$_FieldType with DiagnosticableTreeMixin implements _FieldType { @override Map toJson() { - return _$$_FieldTypeToJson( + return _$$FieldTypeImplToJson( this, ); } } abstract class _FieldType implements FieldInfo { - const factory _FieldType({final List modifiers}) = _$_FieldType; + const factory _FieldType({final List modifiers}) = _$FieldTypeImpl; factory _FieldType.fromJson(Map json) = - _$_FieldType.fromJson; + _$FieldTypeImpl.fromJson; @override List get modifiers; @override @JsonKey(ignore: true) - _$$_FieldTypeCopyWith<_$_FieldType> get copyWith => + _$$FieldTypeImplCopyWith<_$FieldTypeImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PrimitiveFieldCopyWith<$Res> +abstract class _$$PrimitiveFieldImplCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$PrimitiveFieldCopyWith( - _$PrimitiveField value, $Res Function(_$PrimitiveField) then) = - __$$PrimitiveFieldCopyWithImpl<$Res>; + factory _$$PrimitiveFieldImplCopyWith(_$PrimitiveFieldImpl value, + $Res Function(_$PrimitiveFieldImpl) then) = + __$$PrimitiveFieldImplCopyWithImpl<$Res>; @override @useResult $Res call({PrimitiveFieldType type, List modifiers}); } /// @nodoc -class __$$PrimitiveFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$PrimitiveField> - implements _$$PrimitiveFieldCopyWith<$Res> { - __$$PrimitiveFieldCopyWithImpl( - _$PrimitiveField _value, $Res Function(_$PrimitiveField) _then) +class __$$PrimitiveFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$PrimitiveFieldImpl> + implements _$$PrimitiveFieldImplCopyWith<$Res> { + __$$PrimitiveFieldImplCopyWithImpl( + _$PrimitiveFieldImpl _value, $Res Function(_$PrimitiveFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -942,7 +945,7 @@ class __$$PrimitiveFieldCopyWithImpl<$Res> Object? type = null, Object? modifiers = null, }) { - return _then(_$PrimitiveField( + return _then(_$PrimitiveFieldImpl( type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -957,16 +960,18 @@ class __$$PrimitiveFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$PrimitiveField with DiagnosticableTreeMixin implements PrimitiveField { - const _$PrimitiveField( +class _$PrimitiveFieldImpl + with DiagnosticableTreeMixin + implements PrimitiveField { + const _$PrimitiveFieldImpl( {required this.type, final List modifiers = const [], final String? $type}) : _modifiers = modifiers, $type = $type ?? 'primitive'; - factory _$PrimitiveField.fromJson(Map json) => - _$$PrimitiveFieldFromJson(json); + factory _$PrimitiveFieldImpl.fromJson(Map json) => + _$$PrimitiveFieldImplFromJson(json); @override final PrimitiveFieldType type; @@ -1000,7 +1005,7 @@ class _$PrimitiveField with DiagnosticableTreeMixin implements PrimitiveField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PrimitiveField && + other is _$PrimitiveFieldImpl && (identical(other.type, type) || other.type == type) && const DeepCollectionEquality() .equals(other._modifiers, _modifiers)); @@ -1014,8 +1019,9 @@ class _$PrimitiveField with DiagnosticableTreeMixin implements PrimitiveField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PrimitiveFieldCopyWith<_$PrimitiveField> get copyWith => - __$$PrimitiveFieldCopyWithImpl<_$PrimitiveField>(this, _$identity); + _$$PrimitiveFieldImplCopyWith<_$PrimitiveFieldImpl> get copyWith => + __$$PrimitiveFieldImplCopyWithImpl<_$PrimitiveFieldImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1138,7 +1144,7 @@ class _$PrimitiveField with DiagnosticableTreeMixin implements PrimitiveField { @override Map toJson() { - return _$$PrimitiveFieldToJson( + return _$$PrimitiveFieldImplToJson( this, ); } @@ -1147,36 +1153,37 @@ class _$PrimitiveField with DiagnosticableTreeMixin implements PrimitiveField { abstract class PrimitiveField implements FieldInfo { const factory PrimitiveField( {required final PrimitiveFieldType type, - final List modifiers}) = _$PrimitiveField; + final List modifiers}) = _$PrimitiveFieldImpl; factory PrimitiveField.fromJson(Map json) = - _$PrimitiveField.fromJson; + _$PrimitiveFieldImpl.fromJson; PrimitiveFieldType get type; @override List get modifiers; @override @JsonKey(ignore: true) - _$$PrimitiveFieldCopyWith<_$PrimitiveField> get copyWith => + _$$PrimitiveFieldImplCopyWith<_$PrimitiveFieldImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$EnumFieldCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$EnumFieldCopyWith( - _$EnumField value, $Res Function(_$EnumField) then) = - __$$EnumFieldCopyWithImpl<$Res>; +abstract class _$$EnumFieldImplCopyWith<$Res> + implements $FieldInfoCopyWith<$Res> { + factory _$$EnumFieldImplCopyWith( + _$EnumFieldImpl value, $Res Function(_$EnumFieldImpl) then) = + __$$EnumFieldImplCopyWithImpl<$Res>; @override @useResult $Res call({List values, List modifiers}); } /// @nodoc -class __$$EnumFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$EnumField> - implements _$$EnumFieldCopyWith<$Res> { - __$$EnumFieldCopyWithImpl( - _$EnumField _value, $Res Function(_$EnumField) _then) +class __$$EnumFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$EnumFieldImpl> + implements _$$EnumFieldImplCopyWith<$Res> { + __$$EnumFieldImplCopyWithImpl( + _$EnumFieldImpl _value, $Res Function(_$EnumFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1185,7 +1192,7 @@ class __$$EnumFieldCopyWithImpl<$Res> Object? values = null, Object? modifiers = null, }) { - return _then(_$EnumField( + return _then(_$EnumFieldImpl( values: null == values ? _value._values : values // ignore: cast_nullable_to_non_nullable @@ -1200,8 +1207,8 @@ class __$$EnumFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$EnumField with DiagnosticableTreeMixin implements EnumField { - const _$EnumField( +class _$EnumFieldImpl with DiagnosticableTreeMixin implements EnumField { + const _$EnumFieldImpl( {required final List values, final List modifiers = const [], final String? $type}) @@ -1209,8 +1216,8 @@ class _$EnumField with DiagnosticableTreeMixin implements EnumField { _modifiers = modifiers, $type = $type ?? 'enum'; - factory _$EnumField.fromJson(Map json) => - _$$EnumFieldFromJson(json); + factory _$EnumFieldImpl.fromJson(Map json) => + _$$EnumFieldImplFromJson(json); final List _values; @override @@ -1250,7 +1257,7 @@ class _$EnumField with DiagnosticableTreeMixin implements EnumField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$EnumField && + other is _$EnumFieldImpl && const DeepCollectionEquality().equals(other._values, _values) && const DeepCollectionEquality() .equals(other._modifiers, _modifiers)); @@ -1266,8 +1273,8 @@ class _$EnumField with DiagnosticableTreeMixin implements EnumField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$EnumFieldCopyWith<_$EnumField> get copyWith => - __$$EnumFieldCopyWithImpl<_$EnumField>(this, _$identity); + _$$EnumFieldImplCopyWith<_$EnumFieldImpl> get copyWith => + __$$EnumFieldImplCopyWithImpl<_$EnumFieldImpl>(this, _$identity); @override @optionalTypeArgs @@ -1390,7 +1397,7 @@ class _$EnumField with DiagnosticableTreeMixin implements EnumField { @override Map toJson() { - return _$$EnumFieldToJson( + return _$$EnumFieldImplToJson( this, ); } @@ -1399,24 +1406,26 @@ class _$EnumField with DiagnosticableTreeMixin implements EnumField { abstract class EnumField implements FieldInfo { const factory EnumField( {required final List values, - final List modifiers}) = _$EnumField; + final List modifiers}) = _$EnumFieldImpl; - factory EnumField.fromJson(Map json) = _$EnumField.fromJson; + factory EnumField.fromJson(Map json) = + _$EnumFieldImpl.fromJson; List get values; @override List get modifiers; @override @JsonKey(ignore: true) - _$$EnumFieldCopyWith<_$EnumField> get copyWith => + _$$EnumFieldImplCopyWith<_$EnumFieldImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$ListFieldCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$ListFieldCopyWith( - _$ListField value, $Res Function(_$ListField) then) = - __$$ListFieldCopyWithImpl<$Res>; +abstract class _$$ListFieldImplCopyWith<$Res> + implements $FieldInfoCopyWith<$Res> { + factory _$$ListFieldImplCopyWith( + _$ListFieldImpl value, $Res Function(_$ListFieldImpl) then) = + __$$ListFieldImplCopyWithImpl<$Res>; @override @useResult $Res call({FieldInfo type, List modifiers}); @@ -1425,11 +1434,11 @@ abstract class _$$ListFieldCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { } /// @nodoc -class __$$ListFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$ListField> - implements _$$ListFieldCopyWith<$Res> { - __$$ListFieldCopyWithImpl( - _$ListField _value, $Res Function(_$ListField) _then) +class __$$ListFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$ListFieldImpl> + implements _$$ListFieldImplCopyWith<$Res> { + __$$ListFieldImplCopyWithImpl( + _$ListFieldImpl _value, $Res Function(_$ListFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1438,7 +1447,7 @@ class __$$ListFieldCopyWithImpl<$Res> Object? type = null, Object? modifiers = null, }) { - return _then(_$ListField( + return _then(_$ListFieldImpl( type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -1461,16 +1470,16 @@ class __$$ListFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$ListField with DiagnosticableTreeMixin implements ListField { - const _$ListField( +class _$ListFieldImpl with DiagnosticableTreeMixin implements ListField { + const _$ListFieldImpl( {required this.type, final List modifiers = const [], final String? $type}) : _modifiers = modifiers, $type = $type ?? 'list'; - factory _$ListField.fromJson(Map json) => - _$$ListFieldFromJson(json); + factory _$ListFieldImpl.fromJson(Map json) => + _$$ListFieldImplFromJson(json); @override final FieldInfo type; @@ -1504,7 +1513,7 @@ class _$ListField with DiagnosticableTreeMixin implements ListField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ListField && + other is _$ListFieldImpl && (identical(other.type, type) || other.type == type) && const DeepCollectionEquality() .equals(other._modifiers, _modifiers)); @@ -1518,8 +1527,8 @@ class _$ListField with DiagnosticableTreeMixin implements ListField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ListFieldCopyWith<_$ListField> get copyWith => - __$$ListFieldCopyWithImpl<_$ListField>(this, _$identity); + _$$ListFieldImplCopyWith<_$ListFieldImpl> get copyWith => + __$$ListFieldImplCopyWithImpl<_$ListFieldImpl>(this, _$identity); @override @optionalTypeArgs @@ -1642,7 +1651,7 @@ class _$ListField with DiagnosticableTreeMixin implements ListField { @override Map toJson() { - return _$$ListFieldToJson( + return _$$ListFieldImplToJson( this, ); } @@ -1651,24 +1660,26 @@ class _$ListField with DiagnosticableTreeMixin implements ListField { abstract class ListField implements FieldInfo { const factory ListField( {required final FieldInfo type, - final List modifiers}) = _$ListField; + final List modifiers}) = _$ListFieldImpl; - factory ListField.fromJson(Map json) = _$ListField.fromJson; + factory ListField.fromJson(Map json) = + _$ListFieldImpl.fromJson; FieldInfo get type; @override List get modifiers; @override @JsonKey(ignore: true) - _$$ListFieldCopyWith<_$ListField> get copyWith => + _$$ListFieldImplCopyWith<_$ListFieldImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$MapFieldCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$MapFieldCopyWith( - _$MapField value, $Res Function(_$MapField) then) = - __$$MapFieldCopyWithImpl<$Res>; +abstract class _$$MapFieldImplCopyWith<$Res> + implements $FieldInfoCopyWith<$Res> { + factory _$$MapFieldImplCopyWith( + _$MapFieldImpl value, $Res Function(_$MapFieldImpl) then) = + __$$MapFieldImplCopyWithImpl<$Res>; @override @useResult $Res call({FieldInfo key, FieldInfo value, List modifiers}); @@ -1678,10 +1689,11 @@ abstract class _$$MapFieldCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { } /// @nodoc -class __$$MapFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$MapField> - implements _$$MapFieldCopyWith<$Res> { - __$$MapFieldCopyWithImpl(_$MapField _value, $Res Function(_$MapField) _then) +class __$$MapFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$MapFieldImpl> + implements _$$MapFieldImplCopyWith<$Res> { + __$$MapFieldImplCopyWithImpl( + _$MapFieldImpl _value, $Res Function(_$MapFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1691,7 +1703,7 @@ class __$$MapFieldCopyWithImpl<$Res> Object? value = null, Object? modifiers = null, }) { - return _then(_$MapField( + return _then(_$MapFieldImpl( key: null == key ? _value.key : key // ignore: cast_nullable_to_non_nullable @@ -1726,8 +1738,8 @@ class __$$MapFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$MapField with DiagnosticableTreeMixin implements MapField { - const _$MapField( +class _$MapFieldImpl with DiagnosticableTreeMixin implements MapField { + const _$MapFieldImpl( {required this.key, required this.value, final List modifiers = const [], @@ -1735,8 +1747,8 @@ class _$MapField with DiagnosticableTreeMixin implements MapField { : _modifiers = modifiers, $type = $type ?? 'map'; - factory _$MapField.fromJson(Map json) => - _$$MapFieldFromJson(json); + factory _$MapFieldImpl.fromJson(Map json) => + _$$MapFieldImplFromJson(json); @override final FieldInfo key; @@ -1773,7 +1785,7 @@ class _$MapField with DiagnosticableTreeMixin implements MapField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MapField && + other is _$MapFieldImpl && (identical(other.key, key) || other.key == key) && (identical(other.value, value) || other.value == value) && const DeepCollectionEquality() @@ -1788,8 +1800,8 @@ class _$MapField with DiagnosticableTreeMixin implements MapField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$MapFieldCopyWith<_$MapField> get copyWith => - __$$MapFieldCopyWithImpl<_$MapField>(this, _$identity); + _$$MapFieldImplCopyWith<_$MapFieldImpl> get copyWith => + __$$MapFieldImplCopyWithImpl<_$MapFieldImpl>(this, _$identity); @override @optionalTypeArgs @@ -1912,7 +1924,7 @@ class _$MapField with DiagnosticableTreeMixin implements MapField { @override Map toJson() { - return _$$MapFieldToJson( + return _$$MapFieldImplToJson( this, ); } @@ -1922,9 +1934,10 @@ abstract class MapField implements FieldInfo { const factory MapField( {required final FieldInfo key, required final FieldInfo value, - final List modifiers}) = _$MapField; + final List modifiers}) = _$MapFieldImpl; - factory MapField.fromJson(Map json) = _$MapField.fromJson; + factory MapField.fromJson(Map json) = + _$MapFieldImpl.fromJson; FieldInfo get key; FieldInfo get value; @@ -1932,27 +1945,27 @@ abstract class MapField implements FieldInfo { List get modifiers; @override @JsonKey(ignore: true) - _$$MapFieldCopyWith<_$MapField> get copyWith => + _$$MapFieldImplCopyWith<_$MapFieldImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$ObjectFieldCopyWith<$Res> +abstract class _$$ObjectFieldImplCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$ObjectFieldCopyWith( - _$ObjectField value, $Res Function(_$ObjectField) then) = - __$$ObjectFieldCopyWithImpl<$Res>; + factory _$$ObjectFieldImplCopyWith( + _$ObjectFieldImpl value, $Res Function(_$ObjectFieldImpl) then) = + __$$ObjectFieldImplCopyWithImpl<$Res>; @override @useResult $Res call({Map fields, List modifiers}); } /// @nodoc -class __$$ObjectFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$ObjectField> - implements _$$ObjectFieldCopyWith<$Res> { - __$$ObjectFieldCopyWithImpl( - _$ObjectField _value, $Res Function(_$ObjectField) _then) +class __$$ObjectFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$ObjectFieldImpl> + implements _$$ObjectFieldImplCopyWith<$Res> { + __$$ObjectFieldImplCopyWithImpl( + _$ObjectFieldImpl _value, $Res Function(_$ObjectFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1961,7 +1974,7 @@ class __$$ObjectFieldCopyWithImpl<$Res> Object? fields = null, Object? modifiers = null, }) { - return _then(_$ObjectField( + return _then(_$ObjectFieldImpl( fields: null == fields ? _value._fields : fields // ignore: cast_nullable_to_non_nullable @@ -1976,8 +1989,8 @@ class __$$ObjectFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { - const _$ObjectField( +class _$ObjectFieldImpl with DiagnosticableTreeMixin implements ObjectField { + const _$ObjectFieldImpl( {required final Map fields, final List modifiers = const [], final String? $type}) @@ -1985,8 +1998,8 @@ class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { _modifiers = modifiers, $type = $type ?? 'object'; - factory _$ObjectField.fromJson(Map json) => - _$$ObjectFieldFromJson(json); + factory _$ObjectFieldImpl.fromJson(Map json) => + _$$ObjectFieldImplFromJson(json); final Map _fields; @override @@ -2026,7 +2039,7 @@ class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ObjectField && + other is _$ObjectFieldImpl && const DeepCollectionEquality().equals(other._fields, _fields) && const DeepCollectionEquality() .equals(other._modifiers, _modifiers)); @@ -2042,8 +2055,8 @@ class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ObjectFieldCopyWith<_$ObjectField> get copyWith => - __$$ObjectFieldCopyWithImpl<_$ObjectField>(this, _$identity); + _$$ObjectFieldImplCopyWith<_$ObjectFieldImpl> get copyWith => + __$$ObjectFieldImplCopyWithImpl<_$ObjectFieldImpl>(this, _$identity); @override @optionalTypeArgs @@ -2166,7 +2179,7 @@ class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { @override Map toJson() { - return _$$ObjectFieldToJson( + return _$$ObjectFieldImplToJson( this, ); } @@ -2175,26 +2188,26 @@ class _$ObjectField with DiagnosticableTreeMixin implements ObjectField { abstract class ObjectField implements FieldInfo { const factory ObjectField( {required final Map fields, - final List modifiers}) = _$ObjectField; + final List modifiers}) = _$ObjectFieldImpl; factory ObjectField.fromJson(Map json) = - _$ObjectField.fromJson; + _$ObjectFieldImpl.fromJson; Map get fields; @override List get modifiers; @override @JsonKey(ignore: true) - _$$ObjectFieldCopyWith<_$ObjectField> get copyWith => + _$$ObjectFieldImplCopyWith<_$ObjectFieldImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$CustomFieldCopyWith<$Res> +abstract class _$$CustomFieldImplCopyWith<$Res> implements $FieldInfoCopyWith<$Res> { - factory _$$CustomFieldCopyWith( - _$CustomField value, $Res Function(_$CustomField) then) = - __$$CustomFieldCopyWithImpl<$Res>; + factory _$$CustomFieldImplCopyWith( + _$CustomFieldImpl value, $Res Function(_$CustomFieldImpl) then) = + __$$CustomFieldImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -2207,11 +2220,11 @@ abstract class _$$CustomFieldCopyWith<$Res> } /// @nodoc -class __$$CustomFieldCopyWithImpl<$Res> - extends _$FieldInfoCopyWithImpl<$Res, _$CustomField> - implements _$$CustomFieldCopyWith<$Res> { - __$$CustomFieldCopyWithImpl( - _$CustomField _value, $Res Function(_$CustomField) _then) +class __$$CustomFieldImplCopyWithImpl<$Res> + extends _$FieldInfoCopyWithImpl<$Res, _$CustomFieldImpl> + implements _$$CustomFieldImplCopyWith<$Res> { + __$$CustomFieldImplCopyWithImpl( + _$CustomFieldImpl _value, $Res Function(_$CustomFieldImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2222,7 +2235,7 @@ class __$$CustomFieldCopyWithImpl<$Res> Object? fieldInfo = freezed, Object? modifiers = null, }) { - return _then(_$CustomField( + return _then(_$CustomFieldImpl( editor: null == editor ? _value.editor : editor // ignore: cast_nullable_to_non_nullable @@ -2257,8 +2270,8 @@ class __$$CustomFieldCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$CustomField with DiagnosticableTreeMixin implements CustomField { - const _$CustomField( +class _$CustomFieldImpl with DiagnosticableTreeMixin implements CustomField { + const _$CustomFieldImpl( {required this.editor, @JsonKey(name: "default") this.defaultValue, this.fieldInfo, @@ -2267,8 +2280,8 @@ class _$CustomField with DiagnosticableTreeMixin implements CustomField { : _modifiers = modifiers, $type = $type ?? 'custom'; - factory _$CustomField.fromJson(Map json) => - _$$CustomFieldFromJson(json); + factory _$CustomFieldImpl.fromJson(Map json) => + _$$CustomFieldImplFromJson(json); @override final String editor; @@ -2309,7 +2322,7 @@ class _$CustomField with DiagnosticableTreeMixin implements CustomField { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$CustomField && + other is _$CustomFieldImpl && (identical(other.editor, editor) || other.editor == editor) && const DeepCollectionEquality() .equals(other.defaultValue, defaultValue) && @@ -2331,8 +2344,8 @@ class _$CustomField with DiagnosticableTreeMixin implements CustomField { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$CustomFieldCopyWith<_$CustomField> get copyWith => - __$$CustomFieldCopyWithImpl<_$CustomField>(this, _$identity); + _$$CustomFieldImplCopyWith<_$CustomFieldImpl> get copyWith => + __$$CustomFieldImplCopyWithImpl<_$CustomFieldImpl>(this, _$identity); @override @optionalTypeArgs @@ -2455,7 +2468,7 @@ class _$CustomField with DiagnosticableTreeMixin implements CustomField { @override Map toJson() { - return _$$CustomFieldToJson( + return _$$CustomFieldImplToJson( this, ); } @@ -2466,10 +2479,10 @@ abstract class CustomField implements FieldInfo { {required final String editor, @JsonKey(name: "default") final dynamic defaultValue, final FieldInfo? fieldInfo, - final List modifiers}) = _$CustomField; + final List modifiers}) = _$CustomFieldImpl; factory CustomField.fromJson(Map json) = - _$CustomField.fromJson; + _$CustomFieldImpl.fromJson; String get editor; @JsonKey(name: "default") @@ -2479,7 +2492,7 @@ abstract class CustomField implements FieldInfo { List get modifiers; @override @JsonKey(ignore: true) - _$$CustomFieldCopyWith<_$CustomField> get copyWith => + _$$CustomFieldImplCopyWith<_$CustomFieldImpl> get copyWith => throw _privateConstructorUsedError; } @@ -2536,21 +2549,22 @@ class _$ModifierCopyWithImpl<$Res, $Val extends Modifier> } /// @nodoc -abstract class _$$_ModifierCopyWith<$Res> implements $ModifierCopyWith<$Res> { - factory _$$_ModifierCopyWith( - _$_Modifier value, $Res Function(_$_Modifier) then) = - __$$_ModifierCopyWithImpl<$Res>; +abstract class _$$ModifierImplCopyWith<$Res> + implements $ModifierCopyWith<$Res> { + factory _$$ModifierImplCopyWith( + _$ModifierImpl value, $Res Function(_$ModifierImpl) then) = + __$$ModifierImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, dynamic data}); } /// @nodoc -class __$$_ModifierCopyWithImpl<$Res> - extends _$ModifierCopyWithImpl<$Res, _$_Modifier> - implements _$$_ModifierCopyWith<$Res> { - __$$_ModifierCopyWithImpl( - _$_Modifier _value, $Res Function(_$_Modifier) _then) +class __$$ModifierImplCopyWithImpl<$Res> + extends _$ModifierCopyWithImpl<$Res, _$ModifierImpl> + implements _$$ModifierImplCopyWith<$Res> { + __$$ModifierImplCopyWithImpl( + _$ModifierImpl _value, $Res Function(_$ModifierImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2559,7 +2573,7 @@ class __$$_ModifierCopyWithImpl<$Res> Object? name = null, Object? data = freezed, }) { - return _then(_$_Modifier( + return _then(_$ModifierImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -2574,11 +2588,11 @@ class __$$_ModifierCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_Modifier with DiagnosticableTreeMixin implements _Modifier { - const _$_Modifier({required this.name, this.data}); +class _$ModifierImpl with DiagnosticableTreeMixin implements _Modifier { + const _$ModifierImpl({required this.name, this.data}); - factory _$_Modifier.fromJson(Map json) => - _$$_ModifierFromJson(json); + factory _$ModifierImpl.fromJson(Map json) => + _$$ModifierImplFromJson(json); @override final String name; @@ -2603,7 +2617,7 @@ class _$_Modifier with DiagnosticableTreeMixin implements _Modifier { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Modifier && + other is _$ModifierImpl && (identical(other.name, name) || other.name == name) && const DeepCollectionEquality().equals(other.data, data)); } @@ -2616,12 +2630,12 @@ class _$_Modifier with DiagnosticableTreeMixin implements _Modifier { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_ModifierCopyWith<_$_Modifier> get copyWith => - __$$_ModifierCopyWithImpl<_$_Modifier>(this, _$identity); + _$$ModifierImplCopyWith<_$ModifierImpl> get copyWith => + __$$ModifierImplCopyWithImpl<_$ModifierImpl>(this, _$identity); @override Map toJson() { - return _$$_ModifierToJson( + return _$$ModifierImplToJson( this, ); } @@ -2629,9 +2643,10 @@ class _$_Modifier with DiagnosticableTreeMixin implements _Modifier { abstract class _Modifier implements Modifier { const factory _Modifier({required final String name, final dynamic data}) = - _$_Modifier; + _$ModifierImpl; - factory _Modifier.fromJson(Map json) = _$_Modifier.fromJson; + factory _Modifier.fromJson(Map json) = + _$ModifierImpl.fromJson; @override String get name; @@ -2639,6 +2654,6 @@ abstract class _Modifier implements Modifier { dynamic get data; @override @JsonKey(ignore: true) - _$$_ModifierCopyWith<_$_Modifier> get copyWith => + _$$ModifierImplCopyWith<_$ModifierImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/adapter.g.dart b/app/lib/models/adapter.g.dart index c20a28bd23..14251eb731 100644 --- a/app/lib/models/adapter.g.dart +++ b/app/lib/models/adapter.g.dart @@ -6,7 +6,8 @@ part of 'adapter.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_Adapter _$$_AdapterFromJson(Map json) => _$_Adapter( +_$AdapterImpl _$$AdapterImplFromJson(Map json) => + _$AdapterImpl( name: json['name'] as String, description: json['description'] as String, version: json['version'] as String, @@ -15,7 +16,7 @@ _$_Adapter _$$_AdapterFromJson(Map json) => _$_Adapter( .toList(), ); -Map _$$_AdapterToJson(_$_Adapter instance) => +Map _$$AdapterImplToJson(_$AdapterImpl instance) => { 'name': instance.name, 'description': instance.description, @@ -23,8 +24,8 @@ Map _$$_AdapterToJson(_$_Adapter instance) => 'entries': instance.entries, }; -_$_EntryBlueprint _$$_EntryBlueprintFromJson(Map json) => - _$_EntryBlueprint( +_$EntryBlueprintImpl _$$EntryBlueprintImplFromJson(Map json) => + _$EntryBlueprintImpl( name: json['name'] as String, description: json['description'] as String, adapter: json['adapter'] as String, @@ -40,7 +41,8 @@ _$_EntryBlueprint _$$_EntryBlueprintFromJson(Map json) => : const IconConverter().fromJson(json['icon'] as String), ); -Map _$$_EntryBlueprintToJson(_$_EntryBlueprint instance) => +Map _$$EntryBlueprintImplToJson( + _$EntryBlueprintImpl instance) => { 'name': instance.name, 'description': instance.description, @@ -51,7 +53,8 @@ Map _$$_EntryBlueprintToJson(_$_EntryBlueprint instance) => 'icon': const IconConverter().toJson(instance.icon), }; -_$_FieldType _$$_FieldTypeFromJson(Map json) => _$_FieldType( +_$FieldTypeImpl _$$FieldTypeImplFromJson(Map json) => + _$FieldTypeImpl( modifiers: (json['modifiers'] as List?) ?.map((e) => Modifier.fromJson(e as Map)) .toList() ?? @@ -59,14 +62,14 @@ _$_FieldType _$$_FieldTypeFromJson(Map json) => _$_FieldType( $type: json['kind'] as String?, ); -Map _$$_FieldTypeToJson(_$_FieldType instance) => +Map _$$FieldTypeImplToJson(_$FieldTypeImpl instance) => { 'modifiers': instance.modifiers, 'kind': instance.$type, }; -_$PrimitiveField _$$PrimitiveFieldFromJson(Map json) => - _$PrimitiveField( +_$PrimitiveFieldImpl _$$PrimitiveFieldImplFromJson(Map json) => + _$PrimitiveFieldImpl( type: $enumDecode(_$PrimitiveFieldTypeEnumMap, json['type']), modifiers: (json['modifiers'] as List?) ?.map((e) => Modifier.fromJson(e as Map)) @@ -75,7 +78,8 @@ _$PrimitiveField _$$PrimitiveFieldFromJson(Map json) => $type: json['kind'] as String?, ); -Map _$$PrimitiveFieldToJson(_$PrimitiveField instance) => +Map _$$PrimitiveFieldImplToJson( + _$PrimitiveFieldImpl instance) => { 'type': _$PrimitiveFieldTypeEnumMap[instance.type]!, 'modifiers': instance.modifiers, @@ -89,7 +93,8 @@ const _$PrimitiveFieldTypeEnumMap = { PrimitiveFieldType.string: 'string', }; -_$EnumField _$$EnumFieldFromJson(Map json) => _$EnumField( +_$EnumFieldImpl _$$EnumFieldImplFromJson(Map json) => + _$EnumFieldImpl( values: (json['values'] as List).map((e) => e as String).toList(), modifiers: (json['modifiers'] as List?) @@ -99,14 +104,15 @@ _$EnumField _$$EnumFieldFromJson(Map json) => _$EnumField( $type: json['kind'] as String?, ); -Map _$$EnumFieldToJson(_$EnumField instance) => +Map _$$EnumFieldImplToJson(_$EnumFieldImpl instance) => { 'values': instance.values, 'modifiers': instance.modifiers, 'kind': instance.$type, }; -_$ListField _$$ListFieldFromJson(Map json) => _$ListField( +_$ListFieldImpl _$$ListFieldImplFromJson(Map json) => + _$ListFieldImpl( type: FieldInfo.fromJson(json['type'] as Map), modifiers: (json['modifiers'] as List?) ?.map((e) => Modifier.fromJson(e as Map)) @@ -115,14 +121,15 @@ _$ListField _$$ListFieldFromJson(Map json) => _$ListField( $type: json['kind'] as String?, ); -Map _$$ListFieldToJson(_$ListField instance) => +Map _$$ListFieldImplToJson(_$ListFieldImpl instance) => { 'type': instance.type, 'modifiers': instance.modifiers, 'kind': instance.$type, }; -_$MapField _$$MapFieldFromJson(Map json) => _$MapField( +_$MapFieldImpl _$$MapFieldImplFromJson(Map json) => + _$MapFieldImpl( key: FieldInfo.fromJson(json['key'] as Map), value: FieldInfo.fromJson(json['value'] as Map), modifiers: (json['modifiers'] as List?) @@ -132,7 +139,7 @@ _$MapField _$$MapFieldFromJson(Map json) => _$MapField( $type: json['kind'] as String?, ); -Map _$$MapFieldToJson(_$MapField instance) => +Map _$$MapFieldImplToJson(_$MapFieldImpl instance) => { 'key': instance.key, 'value': instance.value, @@ -140,8 +147,8 @@ Map _$$MapFieldToJson(_$MapField instance) => 'kind': instance.$type, }; -_$ObjectField _$$ObjectFieldFromJson(Map json) => - _$ObjectField( +_$ObjectFieldImpl _$$ObjectFieldImplFromJson(Map json) => + _$ObjectFieldImpl( fields: (json['fields'] as Map).map( (k, e) => MapEntry(k, FieldInfo.fromJson(e as Map)), ), @@ -152,15 +159,15 @@ _$ObjectField _$$ObjectFieldFromJson(Map json) => $type: json['kind'] as String?, ); -Map _$$ObjectFieldToJson(_$ObjectField instance) => +Map _$$ObjectFieldImplToJson(_$ObjectFieldImpl instance) => { 'fields': instance.fields, 'modifiers': instance.modifiers, 'kind': instance.$type, }; -_$CustomField _$$CustomFieldFromJson(Map json) => - _$CustomField( +_$CustomFieldImpl _$$CustomFieldImplFromJson(Map json) => + _$CustomFieldImpl( editor: json['editor'] as String, defaultValue: json['default'], fieldInfo: json['fieldInfo'] == null @@ -173,7 +180,7 @@ _$CustomField _$$CustomFieldFromJson(Map json) => $type: json['kind'] as String?, ); -Map _$$CustomFieldToJson(_$CustomField instance) => +Map _$$CustomFieldImplToJson(_$CustomFieldImpl instance) => { 'editor': instance.editor, 'default': instance.defaultValue, @@ -182,12 +189,13 @@ Map _$$CustomFieldToJson(_$CustomField instance) => 'kind': instance.$type, }; -_$_Modifier _$$_ModifierFromJson(Map json) => _$_Modifier( +_$ModifierImpl _$$ModifierImplFromJson(Map json) => + _$ModifierImpl( name: json['name'] as String, data: json['data'], ); -Map _$$_ModifierToJson(_$_Modifier instance) => +Map _$$ModifierImplToJson(_$ModifierImpl instance) => { 'name': instance.name, 'data': instance.data, @@ -231,7 +239,7 @@ final entryBlueprintsProvider = ); typedef EntryBlueprintsRef = AutoDisposeProviderRef>; -String _$entryBlueprintHash() => r'd49a1e5e458e22493e802271db7ba55fffb887bc'; +String _$entryBlueprintHash() => r'331a2ea9f825002876e28ac1a1805ed8e63e0934'; /// Copied from Dart SDK class _SystemHash { @@ -254,31 +262,29 @@ class _SystemHash { } } -typedef EntryBlueprintRef = AutoDisposeProviderRef; - -/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. +/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. @ProviderFor(entryBlueprint) const entryBlueprintProvider = EntryBlueprintFamily(); -/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. +/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. class EntryBlueprintFamily extends Family { - /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. + /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. const EntryBlueprintFamily(); - /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. + /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. EntryBlueprintProvider call( - String name, + String blueprintName, ) { return EntryBlueprintProvider( - name, + blueprintName, ); } @@ -287,7 +293,7 @@ class EntryBlueprintFamily extends Family { covariant EntryBlueprintProvider provider, ) { return call( - provider.name, + provider.blueprintName, ); } @@ -306,19 +312,19 @@ class EntryBlueprintFamily extends Family { String? get name => r'entryBlueprintProvider'; } -/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. +/// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. class EntryBlueprintProvider extends AutoDisposeProvider { - /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [name]. + /// A generated provider to fetch and cache a specific [EntryBlueprint] by its [blueprintName]. /// /// Copied from [entryBlueprint]. EntryBlueprintProvider( - this.name, - ) : super.internal( + String blueprintName, + ) : this._internal( (ref) => entryBlueprint( - ref, - name, + ref as EntryBlueprintRef, + blueprintName, ), from: entryBlueprintProvider, name: r'entryBlueprintProvider', @@ -329,26 +335,73 @@ class EntryBlueprintProvider extends AutoDisposeProvider { dependencies: EntryBlueprintFamily._dependencies, allTransitiveDependencies: EntryBlueprintFamily._allTransitiveDependencies, + blueprintName: blueprintName, ); - final String name; + EntryBlueprintProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.blueprintName, + }) : super.internal(); + + final String blueprintName; + + @override + Override overrideWith( + EntryBlueprint? Function(EntryBlueprintRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryBlueprintProvider._internal( + (ref) => create(ref as EntryBlueprintRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + blueprintName: blueprintName, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryBlueprintProviderElement(this); + } @override bool operator ==(Object other) { - return other is EntryBlueprintProvider && other.name == name; + return other is EntryBlueprintProvider && + other.blueprintName == blueprintName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, blueprintName.hashCode); return _SystemHash.finish(hash); } } -String _$entryTagsHash() => r'41b7964e296b646f18ac537db2579bf0dce7ab2a'; -typedef EntryTagsRef = AutoDisposeProviderRef>; +mixin EntryBlueprintRef on AutoDisposeProviderRef { + /// The parameter `blueprintName` of this provider. + String get blueprintName; +} + +class _EntryBlueprintProviderElement + extends AutoDisposeProviderElement with EntryBlueprintRef { + _EntryBlueprintProviderElement(super.provider); + + @override + String get blueprintName => (origin as EntryBlueprintProvider).blueprintName; +} + +String _$entryTagsHash() => r'7b74db2d147b0aa22b1ad3934f3c45dca69c8b97'; /// See also [entryTags]. @ProviderFor(entryTags) @@ -361,10 +414,10 @@ class EntryTagsFamily extends Family> { /// See also [entryTags]. EntryTagsProvider call( - String name, + String blueprintName, ) { return EntryTagsProvider( - name, + blueprintName, ); } @@ -373,7 +426,7 @@ class EntryTagsFamily extends Family> { covariant EntryTagsProvider provider, ) { return call( - provider.name, + provider.blueprintName, ); } @@ -396,11 +449,11 @@ class EntryTagsFamily extends Family> { class EntryTagsProvider extends AutoDisposeProvider> { /// See also [entryTags]. EntryTagsProvider( - this.name, - ) : super.internal( + String blueprintName, + ) : this._internal( (ref) => entryTags( - ref, - name, + ref as EntryTagsRef, + blueprintName, ), from: entryTagsProvider, name: r'entryTagsProvider', @@ -410,26 +463,72 @@ class EntryTagsProvider extends AutoDisposeProvider> { : _$entryTagsHash, dependencies: EntryTagsFamily._dependencies, allTransitiveDependencies: EntryTagsFamily._allTransitiveDependencies, + blueprintName: blueprintName, ); - final String name; + EntryTagsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.blueprintName, + }) : super.internal(); + + final String blueprintName; + + @override + Override overrideWith( + List Function(EntryTagsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryTagsProvider._internal( + (ref) => create(ref as EntryTagsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + blueprintName: blueprintName, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _EntryTagsProviderElement(this); + } @override bool operator ==(Object other) { - return other is EntryTagsProvider && other.name == name; + return other is EntryTagsProvider && other.blueprintName == blueprintName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, blueprintName.hashCode); return _SystemHash.finish(hash); } } -String _$fieldModifiersHash() => r'ad6700316538a1e9a2dfba24f4f124f68cf845c6'; -typedef FieldModifiersRef = AutoDisposeProviderRef>; +mixin EntryTagsRef on AutoDisposeProviderRef> { + /// The parameter `blueprintName` of this provider. + String get blueprintName; +} + +class _EntryTagsProviderElement extends AutoDisposeProviderElement> + with EntryTagsRef { + _EntryTagsProviderElement(super.provider); + + @override + String get blueprintName => (origin as EntryTagsProvider).blueprintName; +} + +String _$fieldModifiersHash() => r'2e926b371b7db972ec7c3ed7db468baaa6839aba'; /// Gets all the modifiers with a given name. /// @@ -450,12 +549,12 @@ class FieldModifiersFamily extends Family> { /// /// Copied from [fieldModifiers]. FieldModifiersProvider call( - String blueprint, - String name, + String blueprintName, + String modifierName, ) { return FieldModifiersProvider( - blueprint, - name, + blueprintName, + modifierName, ); } @@ -464,8 +563,8 @@ class FieldModifiersFamily extends Family> { covariant FieldModifiersProvider provider, ) { return call( - provider.blueprint, - provider.name, + provider.blueprintName, + provider.modifierName, ); } @@ -493,13 +592,13 @@ class FieldModifiersProvider /// /// Copied from [fieldModifiers]. FieldModifiersProvider( - this.blueprint, - this.name, - ) : super.internal( + String blueprintName, + String modifierName, + ) : this._internal( (ref) => fieldModifiers( - ref, - blueprint, - name, + ref as FieldModifiersRef, + blueprintName, + modifierName, ), from: fieldModifiersProvider, name: r'fieldModifiersProvider', @@ -510,30 +609,85 @@ class FieldModifiersProvider dependencies: FieldModifiersFamily._dependencies, allTransitiveDependencies: FieldModifiersFamily._allTransitiveDependencies, + blueprintName: blueprintName, + modifierName: modifierName, ); - final String blueprint; - final String name; + FieldModifiersProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.blueprintName, + required this.modifierName, + }) : super.internal(); + + final String blueprintName; + final String modifierName; + + @override + Override overrideWith( + Map Function(FieldModifiersRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: FieldModifiersProvider._internal( + (ref) => create(ref as FieldModifiersRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + blueprintName: blueprintName, + modifierName: modifierName, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _FieldModifiersProviderElement(this); + } @override bool operator ==(Object other) { return other is FieldModifiersProvider && - other.blueprint == blueprint && - other.name == name; + other.blueprintName == blueprintName && + other.modifierName == modifierName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, blueprint.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, blueprintName.hashCode); + hash = _SystemHash.combine(hash, modifierName.hashCode); return _SystemHash.finish(hash); } } -String _$modifierPathsHash() => r'da7347b63deeccd651514c7b338113d7d56424a5'; -typedef ModifierPathsRef = AutoDisposeProviderRef>; +mixin FieldModifiersRef on AutoDisposeProviderRef> { + /// The parameter `blueprintName` of this provider. + String get blueprintName; + + /// The parameter `modifierName` of this provider. + String get modifierName; +} + +class _FieldModifiersProviderElement + extends AutoDisposeProviderElement> + with FieldModifiersRef { + _FieldModifiersProviderElement(super.provider); + + @override + String get blueprintName => (origin as FieldModifiersProvider).blueprintName; + @override + String get modifierName => (origin as FieldModifiersProvider).modifierName; +} + +String _$modifierPathsHash() => r'18c0cd2f1537f62ba9ae9bd98446e1b8280fa226'; /// Gets all the paths from fields with a given modifier. /// @@ -554,12 +708,12 @@ class ModifierPathsFamily extends Family> { /// /// Copied from [modifierPaths]. ModifierPathsProvider call( - String blueprint, - String name, + String blueprintName, + String modifierName, ) { return ModifierPathsProvider( - blueprint, - name, + blueprintName, + modifierName, ); } @@ -568,8 +722,8 @@ class ModifierPathsFamily extends Family> { covariant ModifierPathsProvider provider, ) { return call( - provider.blueprint, - provider.name, + provider.blueprintName, + provider.modifierName, ); } @@ -596,13 +750,13 @@ class ModifierPathsProvider extends AutoDisposeProvider> { /// /// Copied from [modifierPaths]. ModifierPathsProvider( - this.blueprint, - this.name, - ) : super.internal( + String blueprintName, + String modifierName, + ) : this._internal( (ref) => modifierPaths( - ref, - blueprint, - name, + ref as ModifierPathsRef, + blueprintName, + modifierName, ), from: modifierPathsProvider, name: r'modifierPathsProvider', @@ -613,26 +767,81 @@ class ModifierPathsProvider extends AutoDisposeProvider> { dependencies: ModifierPathsFamily._dependencies, allTransitiveDependencies: ModifierPathsFamily._allTransitiveDependencies, + blueprintName: blueprintName, + modifierName: modifierName, ); - final String blueprint; - final String name; + ModifierPathsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.blueprintName, + required this.modifierName, + }) : super.internal(); + + final String blueprintName; + final String modifierName; + + @override + Override overrideWith( + List Function(ModifierPathsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: ModifierPathsProvider._internal( + (ref) => create(ref as ModifierPathsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + blueprintName: blueprintName, + modifierName: modifierName, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _ModifierPathsProviderElement(this); + } @override bool operator ==(Object other) { return other is ModifierPathsProvider && - other.blueprint == blueprint && - other.name == name; + other.blueprintName == blueprintName && + other.modifierName == modifierName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, blueprint.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, blueprintName.hashCode); + hash = _SystemHash.combine(hash, modifierName.hashCode); return _SystemHash.finish(hash); } } + +mixin ModifierPathsRef on AutoDisposeProviderRef> { + /// The parameter `blueprintName` of this provider. + String get blueprintName; + + /// The parameter `modifierName` of this provider. + String get modifierName; +} + +class _ModifierPathsProviderElement + extends AutoDisposeProviderElement> with ModifierPathsRef { + _ModifierPathsProviderElement(super.provider); + + @override + String get blueprintName => (origin as ModifierPathsProvider).blueprintName; + @override + String get modifierName => (origin as ModifierPathsProvider).modifierName; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/book.dart b/app/lib/models/book.dart index fa68638b28..c3fe1a0494 100644 --- a/app/lib/models/book.dart +++ b/app/lib/models/book.dart @@ -10,7 +10,8 @@ import "package:typewriter/models/page.dart"; part "book.freezed.dart"; final bookProvider = StateNotifierProvider( - (ref) => BookNotifier(const Book(name: "", adapters: [], pages: []), ref: ref), + (ref) => + BookNotifier(const Book(name: "", adapters: [], pages: []), ref: ref), name: "bookProvider", ); @@ -33,8 +34,11 @@ class BookNotifier extends StateNotifier { bool updateShouldNotify(Book old, Book current) => old != current; /// Creates a new page. - Future createPage(String name, [PageType type = PageType.static]) async { - final page = Page(name: name, type: type); + Future createPage( + String name, [ + PageType type = PageType.static, + ]) async { + final page = Page(pageName: name, type: type); await ref.read(communicatorProvider).createPage(page); state = state.copyWith( pages: [...state.pages, page], @@ -44,14 +48,16 @@ class BookNotifier extends StateNotifier { /// Inserts a page. If the page already exists, it will be replaced. void insertPage(Page page) { state = state.copyWith( - pages: state.pages.map((p) => p.name == page.name ? page : p).toList(), + pages: state.pages + .map((p) => p.pageName == page.pageName ? page : p) + .toList(), ); } /// Rename a page. /// If the page does not exist, it will be added. Future renamePage(String old, String newName) async { - final page = state.pages.firstWhereOrNull((p) => p.name == old); + final page = state.pages.firstWhereOrNull((p) => p.pageName == old); if (page == null) return; await ref.read(communicatorProvider).renamePage(old, newName); syncRenamePage(old, newName); @@ -70,12 +76,14 @@ class BookNotifier extends StateNotifier { /// Only for internal use. void syncRenamePage(String old, String newName) { - final page = state.pages.firstWhereOrNull((p) => p.name == old); + final page = state.pages.firstWhereOrNull((p) => p.pageName == old); if (page == null) return; state = state.copyWith( pages: [ - ...state.pages.where((p) => p.name != old).map((p) => _fixPage(p, old, newName)), - _fixPage(page, old, newName).copyWith(name: newName), + ...state.pages + .where((p) => p.pageName != old) + .map((p) => _fixPage(p, old, newName)), + _fixPage(page, old, newName).copyWith(pageName: newName), ], ); } @@ -83,18 +91,30 @@ class BookNotifier extends StateNotifier { /// Only for internal use. void syncDeletePage(String name) { state = state.copyWith( - pages: state.pages.where((p) => p.name != name).map((p) => _fixPage(p, name, null)).toList(), + pages: state.pages + .where((p) => p.pageName != name) + .map((p) => _fixPage(p, name, null)) + .toList(), ); } /// Fix page references. This is called for all other pages when a page is renamed or deleted. Page _fixPage(Page page, String targetId, String? newId) { - final newEntries = page.entries.map((entry) => _removedReferencesFromEntry(page, entry, targetId, newId)).toList(); + final newEntries = page.entries + .map( + (entry) => _removedReferencesFromEntry(page, entry, targetId, newId), + ) + .toList(); return page.copyWith(entries: newEntries); } /// When a page is renamed or deleted, all references to it must be updated. - Entry _removedReferencesFromEntry(Page page, Entry entry, String targetId, String? newId) { + Entry _removedReferencesFromEntry( + Page page, + Entry entry, + String targetId, + String? newId, + ) { final referenceEntryPaths = state.adapters .flatMap((adapter) => adapter.entries) .firstWhereOrNull((blueprint) => blueprint.name == entry.type) @@ -103,17 +123,23 @@ class BookNotifier extends StateNotifier { .toList() ?? []; - final referenceEntryIds = referenceEntryPaths.expand((path) => entry.getAll(path)).whereType().toList(); + final referenceEntryIds = referenceEntryPaths + .expand((path) => entry.getAll(path)) + .whereType() + .toList(); if (!referenceEntryIds.contains(targetId)) { return entry; } final newEntry = referenceEntryPaths.fold( entry, - (previousEntry, path) => previousEntry.copyMapped(path, (value) => value == targetId ? newId : value), + (previousEntry, path) => previousEntry.copyMapped( + path, + (value) => value == targetId ? newId : value, + ), ); - ref.read(communicatorProvider).updateEntireEntry(page.name, newEntry); + ref.read(communicatorProvider).updateEntireEntry(page.pageName, newEntry); return newEntry; } diff --git a/app/lib/models/book.freezed.dart b/app/lib/models/book.freezed.dart index a304711a9a..0175f83554 100644 --- a/app/lib/models/book.freezed.dart +++ b/app/lib/models/book.freezed.dart @@ -67,18 +67,20 @@ class _$BookCopyWithImpl<$Res, $Val extends Book> } /// @nodoc -abstract class _$$_BookCopyWith<$Res> implements $BookCopyWith<$Res> { - factory _$$_BookCopyWith(_$_Book value, $Res Function(_$_Book) then) = - __$$_BookCopyWithImpl<$Res>; +abstract class _$$BookImplCopyWith<$Res> implements $BookCopyWith<$Res> { + factory _$$BookImplCopyWith( + _$BookImpl value, $Res Function(_$BookImpl) then) = + __$$BookImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, List adapters, List pages}); } /// @nodoc -class __$$_BookCopyWithImpl<$Res> extends _$BookCopyWithImpl<$Res, _$_Book> - implements _$$_BookCopyWith<$Res> { - __$$_BookCopyWithImpl(_$_Book _value, $Res Function(_$_Book) _then) +class __$$BookImplCopyWithImpl<$Res> + extends _$BookCopyWithImpl<$Res, _$BookImpl> + implements _$$BookImplCopyWith<$Res> { + __$$BookImplCopyWithImpl(_$BookImpl _value, $Res Function(_$BookImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -88,7 +90,7 @@ class __$$_BookCopyWithImpl<$Res> extends _$BookCopyWithImpl<$Res, _$_Book> Object? adapters = null, Object? pages = null, }) { - return _then(_$_Book( + return _then(_$BookImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -107,8 +109,8 @@ class __$$_BookCopyWithImpl<$Res> extends _$BookCopyWithImpl<$Res, _$_Book> /// @nodoc -class _$_Book implements _Book { - const _$_Book( +class _$BookImpl implements _Book { + const _$BookImpl( {required this.name, required final List adapters, required final List pages}) @@ -142,7 +144,7 @@ class _$_Book implements _Book { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Book && + other is _$BookImpl && (identical(other.name, name) || other.name == name) && const DeepCollectionEquality().equals(other._adapters, _adapters) && const DeepCollectionEquality().equals(other._pages, _pages)); @@ -158,15 +160,15 @@ class _$_Book implements _Book { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_BookCopyWith<_$_Book> get copyWith => - __$$_BookCopyWithImpl<_$_Book>(this, _$identity); + _$$BookImplCopyWith<_$BookImpl> get copyWith => + __$$BookImplCopyWithImpl<_$BookImpl>(this, _$identity); } abstract class _Book implements Book { const factory _Book( {required final String name, required final List adapters, - required final List pages}) = _$_Book; + required final List pages}) = _$BookImpl; @override String get name; @@ -176,5 +178,6 @@ abstract class _Book implements Book { List get pages; @override @JsonKey(ignore: true) - _$$_BookCopyWith<_$_Book> get copyWith => throw _privateConstructorUsedError; + _$$BookImplCopyWith<_$BookImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/app/lib/models/capture.freezed.dart b/app/lib/models/capture.freezed.dart index cc60ee4066..b437696b8b 100644 --- a/app/lib/models/capture.freezed.dart +++ b/app/lib/models/capture.freezed.dart @@ -99,11 +99,11 @@ class _$CaptureRequestCopyWithImpl<$Res, $Val extends CaptureRequest> } /// @nodoc -abstract class _$$_CaptureRequestCopyWith<$Res> +abstract class _$$CaptureRequestImplCopyWith<$Res> implements $CaptureRequestCopyWith<$Res> { - factory _$$_CaptureRequestCopyWith( - _$_CaptureRequest value, $Res Function(_$_CaptureRequest) then) = - __$$_CaptureRequestCopyWithImpl<$Res>; + factory _$$CaptureRequestImplCopyWith(_$CaptureRequestImpl value, + $Res Function(_$CaptureRequestImpl) then) = + __$$CaptureRequestImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -116,11 +116,11 @@ abstract class _$$_CaptureRequestCopyWith<$Res> } /// @nodoc -class __$$_CaptureRequestCopyWithImpl<$Res> - extends _$CaptureRequestCopyWithImpl<$Res, _$_CaptureRequest> - implements _$$_CaptureRequestCopyWith<$Res> { - __$$_CaptureRequestCopyWithImpl( - _$_CaptureRequest _value, $Res Function(_$_CaptureRequest) _then) +class __$$CaptureRequestImplCopyWithImpl<$Res> + extends _$CaptureRequestCopyWithImpl<$Res, _$CaptureRequestImpl> + implements _$$CaptureRequestImplCopyWith<$Res> { + __$$CaptureRequestImplCopyWithImpl( + _$CaptureRequestImpl _value, $Res Function(_$CaptureRequestImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -133,7 +133,7 @@ class __$$_CaptureRequestCopyWithImpl<$Res> Object? cinematic = freezed, Object? cinematicRange = freezed, }) { - return _then(_$_CaptureRequest( + return _then(_$CaptureRequestImpl( capturerClassPath: null == capturerClassPath ? _value.capturerClassPath : capturerClassPath // ignore: cast_nullable_to_non_nullable @@ -164,8 +164,8 @@ class __$$_CaptureRequestCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_CaptureRequest implements _CaptureRequest { - const _$_CaptureRequest( +class _$CaptureRequestImpl implements _CaptureRequest { + const _$CaptureRequestImpl( {required this.capturerClassPath, required this.entryId, required this.fieldPath, @@ -173,8 +173,8 @@ class _$_CaptureRequest implements _CaptureRequest { this.cinematic, @IntRangeConverter() this.cinematicRange}); - factory _$_CaptureRequest.fromJson(Map json) => - _$$_CaptureRequestFromJson(json); + factory _$CaptureRequestImpl.fromJson(Map json) => + _$$CaptureRequestImplFromJson(json); @override final String capturerClassPath; @@ -199,7 +199,7 @@ class _$_CaptureRequest implements _CaptureRequest { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_CaptureRequest && + other is _$CaptureRequestImpl && (identical(other.capturerClassPath, capturerClassPath) || other.capturerClassPath == capturerClassPath) && (identical(other.entryId, entryId) || other.entryId == entryId) && @@ -227,12 +227,13 @@ class _$_CaptureRequest implements _CaptureRequest { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_CaptureRequestCopyWith<_$_CaptureRequest> get copyWith => - __$$_CaptureRequestCopyWithImpl<_$_CaptureRequest>(this, _$identity); + _$$CaptureRequestImplCopyWith<_$CaptureRequestImpl> get copyWith => + __$$CaptureRequestImplCopyWithImpl<_$CaptureRequestImpl>( + this, _$identity); @override Map toJson() { - return _$$_CaptureRequestToJson( + return _$$CaptureRequestImplToJson( this, ); } @@ -240,15 +241,16 @@ class _$_CaptureRequest implements _CaptureRequest { abstract class _CaptureRequest implements CaptureRequest { const factory _CaptureRequest( - {required final String capturerClassPath, - required final String entryId, - required final String fieldPath, - required final dynamic fieldValue, - final String? cinematic, - @IntRangeConverter() final IntRange? cinematicRange}) = _$_CaptureRequest; + {required final String capturerClassPath, + required final String entryId, + required final String fieldPath, + required final dynamic fieldValue, + final String? cinematic, + @IntRangeConverter() final IntRange? cinematicRange}) = + _$CaptureRequestImpl; factory _CaptureRequest.fromJson(Map json) = - _$_CaptureRequest.fromJson; + _$CaptureRequestImpl.fromJson; @override String get capturerClassPath; @@ -265,6 +267,6 @@ abstract class _CaptureRequest implements CaptureRequest { IntRange? get cinematicRange; @override @JsonKey(ignore: true) - _$$_CaptureRequestCopyWith<_$_CaptureRequest> get copyWith => + _$$CaptureRequestImplCopyWith<_$CaptureRequestImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/capture.g.dart b/app/lib/models/capture.g.dart index cad090067f..72b011f19a 100644 --- a/app/lib/models/capture.g.dart +++ b/app/lib/models/capture.g.dart @@ -6,8 +6,8 @@ part of 'capture.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_CaptureRequest _$$_CaptureRequestFromJson(Map json) => - _$_CaptureRequest( +_$CaptureRequestImpl _$$CaptureRequestImplFromJson(Map json) => + _$CaptureRequestImpl( capturerClassPath: json['capturerClassPath'] as String, entryId: json['entryId'] as String, fieldPath: json['fieldPath'] as String, @@ -17,7 +17,8 @@ _$_CaptureRequest _$$_CaptureRequestFromJson(Map json) => const IntRangeConverter().fromJson(json['cinematicRange']), ); -Map _$$_CaptureRequestToJson(_$_CaptureRequest instance) => +Map _$$CaptureRequestImplToJson( + _$CaptureRequestImpl instance) => { 'capturerClassPath': instance.capturerClassPath, 'entryId': instance.entryId, diff --git a/app/lib/models/communicator.dart b/app/lib/models/communicator.dart index 5eeba8ca74..882d0b1d5d 100644 --- a/app/lib/models/communicator.dart +++ b/app/lib/models/communicator.dart @@ -47,7 +47,43 @@ class SocketNotifier extends StateNotifier { /// When a socket gets disconnected, we want to try to reconnect it. /// Socket.io will try to reconnect automatically. /// Only if this fails within a certain time, we want consider the connection lost. - Timer? _disconnectTimer; + Timer? _timeoutTimer; + + void _startTimeoutTimer(Socket socket) { + final currentConnectionState = _connectionState; + _timeoutTimer = Timer(30.seconds, () { + if (_disposed) return; + if (_connectionState != currentConnectionState) return; + _connectionState = ConnectionState.none; + state?.dispose(); + state?.destroy(); + state = null; + socket + ..dispose() + ..destroy(); + ref.read(appRouter).replaceAll([ + const ErrorConnectRoute(), + ]); + }); + } + + void _handleError(String message) { + if (_disposed) { + debugPrint( + "The socket was disposed so a connection error should not be possible. This is a bug.", + ); + return; + } + if (_canError) return; + _connectionState = ConnectionState.none; + debugPrint(message); + state?.dispose(); + state = null; + + ref.read(appRouter).replaceAll( + [const ErrorConnectRoute()], + ); + } ConnectionState get _connectionState { return ref.read(connectionStateProvider); @@ -94,61 +130,20 @@ class SocketNotifier extends StateNotifier { return; } debugPrint("connected: $data"); - _disconnectTimer?.cancel(); + _timeoutTimer?.cancel(); state = socket; final shouldSetup = _connectionState == ConnectionState.connecting; _connectionState = ConnectionState.connected; if (shouldSetup) setup(socket); }) ..onConnectError((data) { - if (_disposed) { - debugPrint( - "The socket was disposed so a connection error should not be possible. This is a bug.", - ); - return; - } - if (_canError) return; - _connectionState = ConnectionState.none; - debugPrint("connect error $data"); - state?.dispose(); - state = null; - - ref.read(appRouter).replaceAll( - [ErrorConnectRoute(hostname: hostname, port: port, token: token)], - ); + _handleError("connect error $data"); }) ..onConnectTimeout((data) { - if (_disposed) { - debugPrint( - "The socket was disposed so a connection timeout should not be possible. This is a bug.", - ); - return; - } - if (_canError) return; - _connectionState = ConnectionState.none; - debugPrint("connect timeout $data"); - state?.dispose(); - state = null; - ref.read(appRouter).replaceAll( - [ErrorConnectRoute(hostname: hostname, port: port, token: token)], - ); + _handleError("connect timeout $data"); }) ..onError((data) { - if (_disposed) { - debugPrint( - "The socket was disposed so an error should not be possible. This is a bug.", - ); - return; - } - if (_canError) return; - _connectionState = ConnectionState.none; - - debugPrint("error $data"); - state?.dispose(); - state = null; - ref.read(appRouter).replaceAll( - [ErrorConnectRoute(hostname: hostname, port: port, token: token)], - ); + _handleError("error $data"); }) ..onDisconnect((data) { if (_disposed) { @@ -160,45 +155,56 @@ class SocketNotifier extends StateNotifier { if (_connectionState != ConnectionState.connected) return; _connectionState = ConnectionState.disconnected; debugPrint("disconnected: $data"); - - _disconnectTimer = Timer(30.seconds, () { - if (_disposed) return; - if (_connectionState != ConnectionState.disconnected) return; - _connectionState = ConnectionState.none; - state?.dispose(); - state = null; - ref.read(appRouter).replaceAll([ - ErrorConnectRoute(hostname: hostname, port: port, token: token), - ]); - }); + _startTimeoutTimer(socket); }) ..connect(); + + _startTimeoutTimer(socket); } Future setup(Socket socket) async { socket - ..on("stagingState", - (data) => ref.read(communicatorProvider).handleStagingState(data),) - ..on("createPage", - (data) => ref.read(communicatorProvider).handleCreatePage(data),) - ..on("renamePage", - (data) => ref.read(communicatorProvider).handleRenamePage(data),) - ..on("deletePage", - (data) => ref.read(communicatorProvider).handleDeletePage(data),) - ..on("createEntry", - (data) => ref.read(communicatorProvider).handleCreateEntry(data),) - ..on("updateEntry", - (data) => ref.read(communicatorProvider).handleUpdateEntry(data),) ..on( - "updateCompleteEntry", - (data) => - ref.read(communicatorProvider).handleUpdateCompleteEntry(data),) - ..on("reorderEntry", - (data) => ref.read(communicatorProvider).handleReorderEntry(data),) - ..on("deleteEntry", - (data) => ref.read(communicatorProvider).handleDeleteEntry(data),) - ..on("updateWriters", - (data) => ref.read(communicatorProvider).handleUpdateWriters(data),); + "stagingState", + (data) => ref.read(communicatorProvider).handleStagingState(data), + ) + ..on( + "createPage", + (data) => ref.read(communicatorProvider).handleCreatePage(data), + ) + ..on( + "renamePage", + (data) => ref.read(communicatorProvider).handleRenamePage(data), + ) + ..on( + "deletePage", + (data) => ref.read(communicatorProvider).handleDeletePage(data), + ) + ..on( + "createEntry", + (data) => ref.read(communicatorProvider).handleCreateEntry(data), + ) + ..on( + "updateEntry", + (data) => ref.read(communicatorProvider).handleUpdateEntry(data), + ) + ..on( + "updateCompleteEntry", + (data) => + ref.read(communicatorProvider).handleUpdateCompleteEntry(data), + ) + ..on( + "reorderEntry", + (data) => ref.read(communicatorProvider).handleReorderEntry(data), + ) + ..on( + "deleteEntry", + (data) => ref.read(communicatorProvider).handleDeleteEntry(data), + ) + ..on( + "updateWriters", + (data) => ref.read(communicatorProvider).handleUpdateWriters(data), + ); await ref.read(communicatorProvider).fetchBook(); await ref.read(appRouter).push(const BookRoute()); @@ -208,8 +214,9 @@ class SocketNotifier extends StateNotifier { void dispose() { debugPrint("Disposing socket"); _disposed = true; - _disconnectTimer?.cancel(); + _timeoutTimer?.cancel(); state?.dispose(); + state?.destroy(); super.dispose(); } } @@ -237,7 +244,7 @@ class Communicator { final jsonAdapters = jsonDecode(rawAdapters) as List; final pages = jsonPages.map((e) => Page.fromJson(e)).toList(); - final adapters = jsonAdapters.map((e) => Adapter.fromJson(e)).toList(); + final adapters = jsonAdapters.map((a) => Adapter.fromJson(a)).toList(); final book = Book(name: "Typewriter", adapters: adapters, pages: pages); ref.read(bookProvider.notifier).book = book; diff --git a/app/lib/models/communicator.freezed.dart b/app/lib/models/communicator.freezed.dart index f9ffadb813..72b085e9c0 100644 --- a/app/lib/models/communicator.freezed.dart +++ b/app/lib/models/communicator.freezed.dart @@ -67,21 +67,22 @@ class _$ResponseCopyWithImpl<$Res, $Val extends Response> } /// @nodoc -abstract class _$$_ResponseCopyWith<$Res> implements $ResponseCopyWith<$Res> { - factory _$$_ResponseCopyWith( - _$_Response value, $Res Function(_$_Response) then) = - __$$_ResponseCopyWithImpl<$Res>; +abstract class _$$ResponseImplCopyWith<$Res> + implements $ResponseCopyWith<$Res> { + factory _$$ResponseImplCopyWith( + _$ResponseImpl value, $Res Function(_$ResponseImpl) then) = + __$$ResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool success, String message}); } /// @nodoc -class __$$_ResponseCopyWithImpl<$Res> - extends _$ResponseCopyWithImpl<$Res, _$_Response> - implements _$$_ResponseCopyWith<$Res> { - __$$_ResponseCopyWithImpl( - _$_Response _value, $Res Function(_$_Response) _then) +class __$$ResponseImplCopyWithImpl<$Res> + extends _$ResponseCopyWithImpl<$Res, _$ResponseImpl> + implements _$$ResponseImplCopyWith<$Res> { + __$$ResponseImplCopyWithImpl( + _$ResponseImpl _value, $Res Function(_$ResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -90,7 +91,7 @@ class __$$_ResponseCopyWithImpl<$Res> Object? success = null, Object? message = null, }) { - return _then(_$_Response( + return _then(_$ResponseImpl( success: null == success ? _value.success : success // ignore: cast_nullable_to_non_nullable @@ -105,11 +106,11 @@ class __$$_ResponseCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_Response implements _Response { - const _$_Response({required this.success, required this.message}); +class _$ResponseImpl implements _Response { + const _$ResponseImpl({required this.success, required this.message}); - factory _$_Response.fromJson(Map json) => - _$$_ResponseFromJson(json); + factory _$ResponseImpl.fromJson(Map json) => + _$$ResponseImplFromJson(json); @override final bool success; @@ -125,7 +126,7 @@ class _$_Response implements _Response { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Response && + other is _$ResponseImpl && (identical(other.success, success) || other.success == success) && (identical(other.message, message) || other.message == message)); } @@ -137,12 +138,12 @@ class _$_Response implements _Response { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_ResponseCopyWith<_$_Response> get copyWith => - __$$_ResponseCopyWithImpl<_$_Response>(this, _$identity); + _$$ResponseImplCopyWith<_$ResponseImpl> get copyWith => + __$$ResponseImplCopyWithImpl<_$ResponseImpl>(this, _$identity); @override Map toJson() { - return _$$_ResponseToJson( + return _$$ResponseImplToJson( this, ); } @@ -151,9 +152,10 @@ class _$_Response implements _Response { abstract class _Response implements Response { const factory _Response( {required final bool success, - required final String message}) = _$_Response; + required final String message}) = _$ResponseImpl; - factory _Response.fromJson(Map json) = _$_Response.fromJson; + factory _Response.fromJson(Map json) = + _$ResponseImpl.fromJson; @override bool get success; @@ -161,6 +163,6 @@ abstract class _Response implements Response { String get message; @override @JsonKey(ignore: true) - _$$_ResponseCopyWith<_$_Response> get copyWith => + _$$ResponseImplCopyWith<_$ResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/communicator.g.dart b/app/lib/models/communicator.g.dart index 74b7d7d183..86a703df5c 100644 --- a/app/lib/models/communicator.g.dart +++ b/app/lib/models/communicator.g.dart @@ -6,12 +6,13 @@ part of 'communicator.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_Response _$$_ResponseFromJson(Map json) => _$_Response( +_$ResponseImpl _$$ResponseImplFromJson(Map json) => + _$ResponseImpl( success: json['success'] as bool, message: json['message'] as String, ); -Map _$$_ResponseToJson(_$_Response instance) => +Map _$$ResponseImplToJson(_$ResponseImpl instance) => { 'success': instance.success, 'message': instance.message, @@ -36,4 +37,4 @@ final communicatorProvider = Provider.internal( typedef CommunicatorRef = ProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/entry.g.dart b/app/lib/models/entry.g.dart index c3a460f9f7..c37c3493d8 100644 --- a/app/lib/models/entry.g.dart +++ b/app/lib/models/entry.g.dart @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef EntryDefinitionRef = AutoDisposeProviderRef; - /// See also [entryDefinition]. @ProviderFor(entryDefinition) const entryDefinitionProvider = EntryDefinitionFamily(); @@ -80,11 +78,11 @@ class EntryDefinitionFamily extends Family { class EntryDefinitionProvider extends AutoDisposeProvider { /// See also [entryDefinition]. EntryDefinitionProvider( - this.pageId, - this.entryId, - ) : super.internal( + String pageId, + String entryId, + ) : this._internal( (ref) => entryDefinition( - ref, + ref as EntryDefinitionRef, pageId, entryId, ), @@ -97,11 +95,48 @@ class EntryDefinitionProvider extends AutoDisposeProvider { dependencies: EntryDefinitionFamily._dependencies, allTransitiveDependencies: EntryDefinitionFamily._allTransitiveDependencies, + pageId: pageId, + entryId: entryId, ); + EntryDefinitionProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageId, + required this.entryId, + }) : super.internal(); + final String pageId; final String entryId; + @override + Override overrideWith( + EntryDefinition? Function(EntryDefinitionRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryDefinitionProvider._internal( + (ref) => create(ref as EntryDefinitionRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageId: pageId, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryDefinitionProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntryDefinitionProvider && @@ -119,8 +154,26 @@ class EntryDefinitionProvider extends AutoDisposeProvider { } } +mixin EntryDefinitionRef on AutoDisposeProviderRef { + /// The parameter `pageId` of this provider. + String get pageId; + + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryDefinitionProviderElement + extends AutoDisposeProviderElement + with EntryDefinitionRef { + _EntryDefinitionProviderElement(super.provider); + + @override + String get pageId => (origin as EntryDefinitionProvider).pageId; + @override + String get entryId => (origin as EntryDefinitionProvider).entryId; +} + String _$entryNameHash() => r'7e19e3e55767e19fe015a69c99f4af9173872ef2'; -typedef EntryNameRef = AutoDisposeProviderRef; /// See also [entryName]. @ProviderFor(entryName) @@ -168,10 +221,10 @@ class EntryNameFamily extends Family { class EntryNameProvider extends AutoDisposeProvider { /// See also [entryName]. EntryNameProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => entryName( - ref, + ref as EntryNameRef, entryId, ), from: entryNameProvider, @@ -182,10 +235,44 @@ class EntryNameProvider extends AutoDisposeProvider { : _$entryNameHash, dependencies: EntryNameFamily._dependencies, allTransitiveDependencies: EntryNameFamily._allTransitiveDependencies, + entryId: entryId, ); + EntryNameProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + String? Function(EntryNameRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryNameProvider._internal( + (ref) => create(ref as EntryNameRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryNameProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntryNameProvider && other.entryId == entryId; @@ -200,8 +287,20 @@ class EntryNameProvider extends AutoDisposeProvider { } } +mixin EntryNameRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryNameProviderElement extends AutoDisposeProviderElement + with EntryNameRef { + _EntryNameProviderElement(super.provider); + + @override + String get entryId => (origin as EntryNameProvider).entryId; +} + String _$entryTypeHash() => r'467b4a9545b746b07f721913e6c480ee100eedb1'; -typedef EntryTypeRef = AutoDisposeProviderRef; /// See also [entryType]. @ProviderFor(entryType) @@ -249,10 +348,10 @@ class EntryTypeFamily extends Family { class EntryTypeProvider extends AutoDisposeProvider { /// See also [entryType]. EntryTypeProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => entryType( - ref, + ref as EntryTypeRef, entryId, ), from: entryTypeProvider, @@ -263,10 +362,44 @@ class EntryTypeProvider extends AutoDisposeProvider { : _$entryTypeHash, dependencies: EntryTypeFamily._dependencies, allTransitiveDependencies: EntryTypeFamily._allTransitiveDependencies, + entryId: entryId, ); + EntryTypeProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + String? Function(EntryTypeRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryTypeProvider._internal( + (ref) => create(ref as EntryTypeRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryTypeProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntryTypeProvider && other.entryId == entryId; @@ -280,5 +413,18 @@ class EntryTypeProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +mixin EntryTypeRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryTypeProviderElement extends AutoDisposeProviderElement + with EntryTypeRef { + _EntryTypeProviderElement(super.provider); + + @override + String get entryId => (origin as EntryTypeProvider).entryId; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/materials.freezed.dart b/app/lib/models/materials.freezed.dart index 5958392406..8065d8e481 100644 --- a/app/lib/models/materials.freezed.dart +++ b/app/lib/models/materials.freezed.dart @@ -74,22 +74,22 @@ class _$MinecraftMaterialCopyWithImpl<$Res, $Val extends MinecraftMaterial> } /// @nodoc -abstract class _$$_MinecraftMaterialCopyWith<$Res> +abstract class _$$MinecraftMaterialImplCopyWith<$Res> implements $MinecraftMaterialCopyWith<$Res> { - factory _$$_MinecraftMaterialCopyWith(_$_MinecraftMaterial value, - $Res Function(_$_MinecraftMaterial) then) = - __$$_MinecraftMaterialCopyWithImpl<$Res>; + factory _$$MinecraftMaterialImplCopyWith(_$MinecraftMaterialImpl value, + $Res Function(_$MinecraftMaterialImpl) then) = + __$$MinecraftMaterialImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, List properties, String icon}); } /// @nodoc -class __$$_MinecraftMaterialCopyWithImpl<$Res> - extends _$MinecraftMaterialCopyWithImpl<$Res, _$_MinecraftMaterial> - implements _$$_MinecraftMaterialCopyWith<$Res> { - __$$_MinecraftMaterialCopyWithImpl( - _$_MinecraftMaterial _value, $Res Function(_$_MinecraftMaterial) _then) +class __$$MinecraftMaterialImplCopyWithImpl<$Res> + extends _$MinecraftMaterialCopyWithImpl<$Res, _$MinecraftMaterialImpl> + implements _$$MinecraftMaterialImplCopyWith<$Res> { + __$$MinecraftMaterialImplCopyWithImpl(_$MinecraftMaterialImpl _value, + $Res Function(_$MinecraftMaterialImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -99,7 +99,7 @@ class __$$_MinecraftMaterialCopyWithImpl<$Res> Object? properties = null, Object? icon = null, }) { - return _then(_$_MinecraftMaterial( + return _then(_$MinecraftMaterialImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -118,15 +118,15 @@ class __$$_MinecraftMaterialCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_MinecraftMaterial implements _MinecraftMaterial { - const _$_MinecraftMaterial( +class _$MinecraftMaterialImpl implements _MinecraftMaterial { + const _$MinecraftMaterialImpl( {required this.name, required final List properties, required this.icon}) : _properties = properties; - factory _$_MinecraftMaterial.fromJson(Map json) => - _$$_MinecraftMaterialFromJson(json); + factory _$MinecraftMaterialImpl.fromJson(Map json) => + _$$MinecraftMaterialImplFromJson(json); @override final String name; @@ -150,7 +150,7 @@ class _$_MinecraftMaterial implements _MinecraftMaterial { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_MinecraftMaterial && + other is _$MinecraftMaterialImpl && (identical(other.name, name) || other.name == name) && const DeepCollectionEquality() .equals(other._properties, _properties) && @@ -165,13 +165,13 @@ class _$_MinecraftMaterial implements _MinecraftMaterial { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_MinecraftMaterialCopyWith<_$_MinecraftMaterial> get copyWith => - __$$_MinecraftMaterialCopyWithImpl<_$_MinecraftMaterial>( + _$$MinecraftMaterialImplCopyWith<_$MinecraftMaterialImpl> get copyWith => + __$$MinecraftMaterialImplCopyWithImpl<_$MinecraftMaterialImpl>( this, _$identity); @override Map toJson() { - return _$$_MinecraftMaterialToJson( + return _$$MinecraftMaterialImplToJson( this, ); } @@ -181,10 +181,10 @@ abstract class _MinecraftMaterial implements MinecraftMaterial { const factory _MinecraftMaterial( {required final String name, required final List properties, - required final String icon}) = _$_MinecraftMaterial; + required final String icon}) = _$MinecraftMaterialImpl; factory _MinecraftMaterial.fromJson(Map json) = - _$_MinecraftMaterial.fromJson; + _$MinecraftMaterialImpl.fromJson; @override String get name; @@ -194,6 +194,6 @@ abstract class _MinecraftMaterial implements MinecraftMaterial { String get icon; @override @JsonKey(ignore: true) - _$$_MinecraftMaterialCopyWith<_$_MinecraftMaterial> get copyWith => + _$$MinecraftMaterialImplCopyWith<_$MinecraftMaterialImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/materials.g.dart b/app/lib/models/materials.g.dart index 1517238d31..f310d1d644 100644 --- a/app/lib/models/materials.g.dart +++ b/app/lib/models/materials.g.dart @@ -6,8 +6,9 @@ part of 'materials.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_MinecraftMaterial _$$_MinecraftMaterialFromJson(Map json) => - _$_MinecraftMaterial( +_$MinecraftMaterialImpl _$$MinecraftMaterialImplFromJson( + Map json) => + _$MinecraftMaterialImpl( name: json['name'] as String, properties: (json['properties'] as List) .map((e) => $enumDecode(_$MaterialPropertyEnumMap, e)) @@ -15,8 +16,8 @@ _$_MinecraftMaterial _$$_MinecraftMaterialFromJson(Map json) => icon: json['icon'] as String, ); -Map _$$_MinecraftMaterialToJson( - _$_MinecraftMaterial instance) => +Map _$$MinecraftMaterialImplToJson( + _$MinecraftMaterialImpl instance) => { 'name': instance.name, 'properties': instance.properties diff --git a/app/lib/models/page.dart b/app/lib/models/page.dart index d7456fdbaa..775a8a8c60 100644 --- a/app/lib/models/page.dart +++ b/app/lib/models/page.dart @@ -23,28 +23,38 @@ List pages(PagesRef ref) { } @riverpod -Page? page(PageRef ref, String name) { - return ref.watch(pagesProvider).firstWhereOrNull((page) => page.name == name); +Page? page(PageRef ref, String pageName) { + return ref + .watch(pagesProvider) + .firstWhereOrNull((page) => page.pageName == pageName); } @riverpod -bool pageExists(PageExistsRef ref, String name) { - return ref.watch(pageProvider(name)) != null; +bool pageExists(PageExistsRef ref, String pageName) { + return ref.watch(pageProvider(pageName)) != null; } @riverpod -PageType pageType(PageTypeRef ref, String name) { - return ref.watch(pageProvider(name))?.type ?? PageType.sequence; +PageType pageType(PageTypeRef ref, String pageName) { + return ref.watch(pageProvider(pageName))?.type ?? PageType.sequence; } @riverpod String? entriesPage(EntriesPageRef ref, String entryId) { - return ref.watch(pagesProvider).firstWhereOrNull((page) => page.entries.any((entry) => entry.id == entryId))?.name; + return ref + .watch(pagesProvider) + .firstWhereOrNull( + (page) => page.entries.any((entry) => entry.id == entryId), + ) + ?.pageName; } @riverpod Entry? entry(EntryRef ref, String pageId, String entryId) { - return ref.watch(pageProvider(pageId))?.entries.firstWhereOrNull((entry) => entry.id == entryId); + return ref + .watch(pageProvider(pageId)) + ?.entries + .firstWhereOrNull((entry) => entry.id == entryId); } @riverpod @@ -57,7 +67,10 @@ Entry? globalEntry(GlobalEntryRef ref, String entryId) { } @riverpod -MapEntry? globalEntryWithPage(GlobalEntryWithPageRef ref, String entryId) { +MapEntry? globalEntryWithPage( + GlobalEntryWithPageRef ref, + String entryId, +) { final page = ref.watch(entriesPageProvider(entryId)); if (page == null) { return null; @@ -98,7 +111,7 @@ enum PageType { @freezed class Page with _$Page { const factory Page({ - required String name, + @JsonKey(name: "name") required String pageName, required PageType type, @Default([]) List entries, }) = _Page; @@ -109,7 +122,7 @@ class Page with _$Page { extension PageExtension on Page { void updatePage(PassingRef ref, Page Function(Page) update) { // If multiple updates are done at the same time, `this` might be outdated. So we need to get the latest version. - final currentPage = ref.read(pageProvider(name)); + final currentPage = ref.read(pageProvider(pageName)); if (currentPage == null) { return; } @@ -122,7 +135,7 @@ extension PageExtension on Page { ref, (page) => _insertEntry(page, entry), ); - await ref.read(communicatorProvider).createEntry(name, entry); + await ref.read(communicatorProvider).createEntry(pageName, entry); } Future updateEntireEntry(PassingRef ref, Entry entry) async { @@ -130,20 +143,25 @@ extension PageExtension on Page { ref, (page) => _insertEntry(page, entry), ); - ref.read(communicatorProvider).updateEntireEntry(name, entry); + ref.read(communicatorProvider).updateEntireEntry(pageName, entry); } - void updateEntryValue(PassingRef ref, Entry entry, String path, dynamic value) { + void updateEntryValue( + PassingRef ref, + Entry entry, + String path, + dynamic value, + ) { updatePage( ref, (page) => _insertEntry(page, entry.copyWith(path, value)), ); - ref.read(communicatorProvider).updateEntry(name, entry.id, path, value); + ref.read(communicatorProvider).updateEntry(pageName, entry.id, path, value); } void reorderEntry(PassingRef ref, String entryId, int newIndex) { syncReorderEntry(ref, entryId, newIndex); - ref.read(communicatorProvider).reorderEntry(name, entryId, newIndex); + ref.read(communicatorProvider).reorderEntry(pageName, entryId, newIndex); } void syncReorderEntry(PassingRef ref, String entryId, int newIndex) { @@ -191,17 +209,23 @@ extension PageExtension on Page { } void deleteEntry(PassingRef ref, Entry entry) { - ref.read(communicatorProvider).deleteEntry(name, entry.id); + ref.read(communicatorProvider).deleteEntry(pageName, entry.id); updatePage( ref, (page) => page.copyWith( entries: [ - ...page.entries.where((e) => e.id != entry.id).map((e) => _removedReferencesFromEntry(ref, e, entry.id)), + ...page.entries + .where((e) => e.id != entry.id) + .map((e) => _removedReferencesFromEntry(ref, e, entry.id)), ], ), ); // Also delete all references to this entry from other pages. - ref.read(bookProvider).pages.where((page) => page.name != name).forEach((page) { + ref + .read(bookProvider) + .pages + .where((page) => page.pageName != pageName) + .forEach((page) { page.removeReferencesTo(ref, entry.id); }); @@ -215,26 +239,40 @@ extension PageExtension on Page { updatePage( ref, (page) => page.copyWith( - entries: [...page.entries.map((e) => _removedReferencesFromEntry(ref, e, entryId))], + entries: [ + ...page.entries + .map((e) => _removedReferencesFromEntry(ref, e, entryId)), + ], ), ); } /// When an entry is delete all references in other entries need to be removed. - Entry _removedReferencesFromEntry(PassingRef ref, Entry entry, String targetId) { - final referenceEntryPaths = ref.read(modifierPathsProvider(entry.type, "entry")); - - final referenceEntryIds = referenceEntryPaths.expand((path) => entry.getAll(path)).whereType().toList(); + Entry _removedReferencesFromEntry( + PassingRef ref, + Entry entry, + String targetId, + ) { + final referenceEntryPaths = + ref.read(modifierPathsProvider(entry.type, "entry")); + + final referenceEntryIds = referenceEntryPaths + .expand((path) => entry.getAll(path)) + .whereType() + .toList(); if (!referenceEntryIds.contains(targetId)) { return entry; } final newEntry = referenceEntryPaths.fold( entry, - (previousEntry, path) => previousEntry.copyMapped(path, (value) => value == targetId ? null : value), + (previousEntry, path) => previousEntry.copyMapped( + path, + (value) => value == targetId ? null : value, + ), ); - ref.read(communicatorProvider).updateEntireEntry(name, newEntry); + ref.read(communicatorProvider).updateEntireEntry(pageName, newEntry); return newEntry; } @@ -251,22 +289,31 @@ extension PageExtension on Page { /// These are specialized shortcuts for common operations. extension PageX on Page { - Future createEntryFromBlueprint(PassingRef ref, EntryBlueprint blueprint) async { - final entry = Entry.fromBlueprint(id: getRandomString(), blueprint: blueprint); + Future createEntryFromBlueprint( + PassingRef ref, + EntryBlueprint blueprint, + ) async { + final entry = + Entry.fromBlueprint(id: getRandomString(), blueprint: blueprint); await createEntry(ref, entry); return entry; } - Future _wireEntryToOtherEntry(PassingRef ref, Entry originalEntry, Entry newEntry) async { + Future _wireEntryToOtherEntry( + PassingRef ref, + Entry originalEntry, + Entry newEntry, + ) async { final currentTriggers = originalEntry.get("triggers"); if (currentTriggers == null || currentTriggers is! List) return; final newTriggers = currentTriggers + [newEntry.id]; - final modifiedOriginalEntry = originalEntry.copyWith("triggers", newTriggers); + final modifiedOriginalEntry = + originalEntry.copyWith("triggers", newTriggers); await updateEntireEntry(ref, modifiedOriginalEntry); } Future extendsWithDuplicate(PassingRef ref, String entryId) async { - final entry = ref.read(entryProvider(name, entryId)); + final entry = ref.read(entryProvider(pageName, entryId)); if (entry == null) return; final triggerPaths = ref.read(modifierPathsProvider(entry.type, "trigger")); if (!triggerPaths.contains("triggers.*")) { @@ -277,7 +324,10 @@ extension PageX on Page { final newEntry = triggerPaths .fold( entry.copyWith("id", getRandomString()), - (previousEntry, path) => previousEntry.copyMapped(path, (_) => null), // Remove all triggers + (previousEntry, path) => previousEntry.copyMapped( + path, + (_) => null, + ), // Remove all triggers ) .copyWith("name", entry.name.incrementedName); await createEntry(ref, newEntry); @@ -286,7 +336,7 @@ extension PageX on Page { } void extendsWith(PassingRef ref, String entryId) { - final entry = ref.read(entryProvider(name, entryId)); + final entry = ref.read(entryProvider(pageName, entryId)); if (entry == null) return; final triggerPaths = ref.read(modifierPathsProvider(entry.type, "trigger")); if (!triggerPaths.contains("triggers.*")) { @@ -300,7 +350,9 @@ extension PageX on Page { onAdd: (blueprint) async { final newEntry = await createEntryFromBlueprint(ref, blueprint); await _wireEntryToOtherEntry(ref, entry, newEntry); - await ref.read(inspectingEntryIdProvider.notifier).navigateAndSelectEntry(ref, newEntry.id); + await ref + .read(inspectingEntryIdProvider.notifier) + .navigateAndSelectEntry(ref, newEntry.id); return null; }, ) @@ -315,14 +367,18 @@ extension PageX on Page { bool canHave(EntryBlueprint blueprint) => blueprint.tags.contains(type.tag); - void deleteEntryWithConfirmation(BuildContext context, PassingRef ref, String entryId) { + void deleteEntryWithConfirmation( + BuildContext context, + PassingRef ref, + String entryId, + ) { showConfirmationDialogue( context: context, title: "Delete Entry", content: "Are you sure you want to delete this entry?", confirmText: "Delete", onConfirm: () { - final entry = ref.read(entryProvider(name, entryId)); + final entry = ref.read(entryProvider(pageName, entryId)); if (entry == null) return; deleteEntry(ref, entry); }, diff --git a/app/lib/models/page.freezed.dart b/app/lib/models/page.freezed.dart index 2dd0844a75..93fe122d9e 100644 --- a/app/lib/models/page.freezed.dart +++ b/app/lib/models/page.freezed.dart @@ -20,7 +20,8 @@ Page _$PageFromJson(Map json) { /// @nodoc mixin _$Page { - String get name => throw _privateConstructorUsedError; + @JsonKey(name: "name") + String get pageName => throw _privateConstructorUsedError; PageType get type => throw _privateConstructorUsedError; List get entries => throw _privateConstructorUsedError; @@ -34,7 +35,10 @@ abstract class $PageCopyWith<$Res> { factory $PageCopyWith(Page value, $Res Function(Page) then) = _$PageCopyWithImpl<$Res, Page>; @useResult - $Res call({String name, PageType type, List entries}); + $Res call( + {@JsonKey(name: "name") String pageName, + PageType type, + List entries}); } /// @nodoc @@ -50,14 +54,14 @@ class _$PageCopyWithImpl<$Res, $Val extends Page> @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, + Object? pageName = null, Object? type = null, Object? entries = null, }) { return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable + pageName: null == pageName + ? _value.pageName + : pageName // ignore: cast_nullable_to_non_nullable as String, type: null == type ? _value.type @@ -72,31 +76,36 @@ class _$PageCopyWithImpl<$Res, $Val extends Page> } /// @nodoc -abstract class _$$_PageCopyWith<$Res> implements $PageCopyWith<$Res> { - factory _$$_PageCopyWith(_$_Page value, $Res Function(_$_Page) then) = - __$$_PageCopyWithImpl<$Res>; +abstract class _$$PageImplCopyWith<$Res> implements $PageCopyWith<$Res> { + factory _$$PageImplCopyWith( + _$PageImpl value, $Res Function(_$PageImpl) then) = + __$$PageImplCopyWithImpl<$Res>; @override @useResult - $Res call({String name, PageType type, List entries}); + $Res call( + {@JsonKey(name: "name") String pageName, + PageType type, + List entries}); } /// @nodoc -class __$$_PageCopyWithImpl<$Res> extends _$PageCopyWithImpl<$Res, _$_Page> - implements _$$_PageCopyWith<$Res> { - __$$_PageCopyWithImpl(_$_Page _value, $Res Function(_$_Page) _then) +class __$$PageImplCopyWithImpl<$Res> + extends _$PageCopyWithImpl<$Res, _$PageImpl> + implements _$$PageImplCopyWith<$Res> { + __$$PageImplCopyWithImpl(_$PageImpl _value, $Res Function(_$PageImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, + Object? pageName = null, Object? type = null, Object? entries = null, }) { - return _then(_$_Page( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable + return _then(_$PageImpl( + pageName: null == pageName + ? _value.pageName + : pageName // ignore: cast_nullable_to_non_nullable as String, type: null == type ? _value.type @@ -112,17 +121,19 @@ class __$$_PageCopyWithImpl<$Res> extends _$PageCopyWithImpl<$Res, _$_Page> /// @nodoc @JsonSerializable() -class _$_Page implements _Page { - const _$_Page( - {required this.name, +class _$PageImpl implements _Page { + const _$PageImpl( + {@JsonKey(name: "name") required this.pageName, required this.type, final List entries = const []}) : _entries = entries; - factory _$_Page.fromJson(Map json) => _$$_PageFromJson(json); + factory _$PageImpl.fromJson(Map json) => + _$$PageImplFromJson(json); @override - final String name; + @JsonKey(name: "name") + final String pageName; @override final PageType type; final List _entries; @@ -136,33 +147,34 @@ class _$_Page implements _Page { @override String toString() { - return 'Page(name: $name, type: $type, entries: $entries)'; + return 'Page(pageName: $pageName, type: $type, entries: $entries)'; } @override bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Page && - (identical(other.name, name) || other.name == name) && + other is _$PageImpl && + (identical(other.pageName, pageName) || + other.pageName == pageName) && (identical(other.type, type) || other.type == type) && const DeepCollectionEquality().equals(other._entries, _entries)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, name, type, const DeepCollectionEquality().hash(_entries)); + int get hashCode => Object.hash(runtimeType, pageName, type, + const DeepCollectionEquality().hash(_entries)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_PageCopyWith<_$_Page> get copyWith => - __$$_PageCopyWithImpl<_$_Page>(this, _$identity); + _$$PageImplCopyWith<_$PageImpl> get copyWith => + __$$PageImplCopyWithImpl<_$PageImpl>(this, _$identity); @override Map toJson() { - return _$$_PageToJson( + return _$$PageImplToJson( this, ); } @@ -170,19 +182,21 @@ class _$_Page implements _Page { abstract class _Page implements Page { const factory _Page( - {required final String name, + {@JsonKey(name: "name") required final String pageName, required final PageType type, - final List entries}) = _$_Page; + final List entries}) = _$PageImpl; - factory _Page.fromJson(Map json) = _$_Page.fromJson; + factory _Page.fromJson(Map json) = _$PageImpl.fromJson; @override - String get name; + @JsonKey(name: "name") + String get pageName; @override PageType get type; @override List get entries; @override @JsonKey(ignore: true) - _$$_PageCopyWith<_$_Page> get copyWith => throw _privateConstructorUsedError; + _$$PageImplCopyWith<_$PageImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/app/lib/models/page.g.dart b/app/lib/models/page.g.dart index ae4a3601c7..ade71cb638 100644 --- a/app/lib/models/page.g.dart +++ b/app/lib/models/page.g.dart @@ -6,8 +6,8 @@ part of 'page.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_Page _$$_PageFromJson(Map json) => _$_Page( - name: json['name'] as String, +_$PageImpl _$$PageImplFromJson(Map json) => _$PageImpl( + pageName: json['name'] as String, type: $enumDecode(_$PageTypeEnumMap, json['type']), entries: (json['entries'] as List?) ?.map((e) => Entry.fromJson(e as Map)) @@ -15,8 +15,9 @@ _$_Page _$$_PageFromJson(Map json) => _$_Page( const [], ); -Map _$$_PageToJson(_$_Page instance) => { - 'name': instance.name, +Map _$$PageImplToJson(_$PageImpl instance) => + { + 'name': instance.pageName, 'type': _$PageTypeEnumMap[instance.type]!, 'entries': instance.entries, }; @@ -45,7 +46,7 @@ final pagesProvider = AutoDisposeProvider>.internal( ); typedef PagesRef = AutoDisposeProviderRef>; -String _$pageHash() => r'cac5f933a02820136d00b486570ced2b2a399fcd'; +String _$pageHash() => r'0c5240a645e0582f10cb6e594f6fd35bb2d48c1a'; /// Copied from Dart SDK class _SystemHash { @@ -68,8 +69,6 @@ class _SystemHash { } } -typedef PageRef = AutoDisposeProviderRef; - /// See also [page]. @ProviderFor(page) const pageProvider = PageFamily(); @@ -81,10 +80,10 @@ class PageFamily extends Family { /// See also [page]. PageProvider call( - String name, + String pageName, ) { return PageProvider( - name, + pageName, ); } @@ -93,7 +92,7 @@ class PageFamily extends Family { covariant PageProvider provider, ) { return call( - provider.name, + provider.pageName, ); } @@ -116,11 +115,11 @@ class PageFamily extends Family { class PageProvider extends AutoDisposeProvider { /// See also [page]. PageProvider( - this.name, - ) : super.internal( + String pageName, + ) : this._internal( (ref) => page( - ref, - name, + ref as PageRef, + pageName, ), from: pageProvider, name: r'pageProvider', @@ -128,26 +127,72 @@ class PageProvider extends AutoDisposeProvider { const bool.fromEnvironment('dart.vm.product') ? null : _$pageHash, dependencies: PageFamily._dependencies, allTransitiveDependencies: PageFamily._allTransitiveDependencies, + pageName: pageName, ); - final String name; + PageProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageName, + }) : super.internal(); + + final String pageName; + + @override + Override overrideWith( + Page? Function(PageRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: PageProvider._internal( + (ref) => create(ref as PageRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageName: pageName, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _PageProviderElement(this); + } @override bool operator ==(Object other) { - return other is PageProvider && other.name == name; + return other is PageProvider && other.pageName == pageName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, pageName.hashCode); return _SystemHash.finish(hash); } } -String _$pageExistsHash() => r'373af781e0ba0784c10a3800d513a56a510c87e0'; -typedef PageExistsRef = AutoDisposeProviderRef; +mixin PageRef on AutoDisposeProviderRef { + /// The parameter `pageName` of this provider. + String get pageName; +} + +class _PageProviderElement extends AutoDisposeProviderElement + with PageRef { + _PageProviderElement(super.provider); + + @override + String get pageName => (origin as PageProvider).pageName; +} + +String _$pageExistsHash() => r'1c42a5607890607b3818f12bb68d98196ccab59d'; /// See also [pageExists]. @ProviderFor(pageExists) @@ -160,10 +205,10 @@ class PageExistsFamily extends Family { /// See also [pageExists]. PageExistsProvider call( - String name, + String pageName, ) { return PageExistsProvider( - name, + pageName, ); } @@ -172,7 +217,7 @@ class PageExistsFamily extends Family { covariant PageExistsProvider provider, ) { return call( - provider.name, + provider.pageName, ); } @@ -195,11 +240,11 @@ class PageExistsFamily extends Family { class PageExistsProvider extends AutoDisposeProvider { /// See also [pageExists]. PageExistsProvider( - this.name, - ) : super.internal( + String pageName, + ) : this._internal( (ref) => pageExists( - ref, - name, + ref as PageExistsRef, + pageName, ), from: pageExistsProvider, name: r'pageExistsProvider', @@ -210,26 +255,72 @@ class PageExistsProvider extends AutoDisposeProvider { dependencies: PageExistsFamily._dependencies, allTransitiveDependencies: PageExistsFamily._allTransitiveDependencies, + pageName: pageName, ); - final String name; + PageExistsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageName, + }) : super.internal(); + + final String pageName; + + @override + Override overrideWith( + bool Function(PageExistsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: PageExistsProvider._internal( + (ref) => create(ref as PageExistsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageName: pageName, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _PageExistsProviderElement(this); + } @override bool operator ==(Object other) { - return other is PageExistsProvider && other.name == name; + return other is PageExistsProvider && other.pageName == pageName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, pageName.hashCode); return _SystemHash.finish(hash); } } -String _$pageTypeHash() => r'ddba8e6be7b24657a449a4bdc0afcffac3ae3d61'; -typedef PageTypeRef = AutoDisposeProviderRef; +mixin PageExistsRef on AutoDisposeProviderRef { + /// The parameter `pageName` of this provider. + String get pageName; +} + +class _PageExistsProviderElement extends AutoDisposeProviderElement + with PageExistsRef { + _PageExistsProviderElement(super.provider); + + @override + String get pageName => (origin as PageExistsProvider).pageName; +} + +String _$pageTypeHash() => r'6912833664c34d2689d328d901719f479be512ac'; /// See also [pageType]. @ProviderFor(pageType) @@ -242,10 +333,10 @@ class PageTypeFamily extends Family { /// See also [pageType]. PageTypeProvider call( - String name, + String pageName, ) { return PageTypeProvider( - name, + pageName, ); } @@ -254,7 +345,7 @@ class PageTypeFamily extends Family { covariant PageTypeProvider provider, ) { return call( - provider.name, + provider.pageName, ); } @@ -277,11 +368,11 @@ class PageTypeFamily extends Family { class PageTypeProvider extends AutoDisposeProvider { /// See also [pageType]. PageTypeProvider( - this.name, - ) : super.internal( + String pageName, + ) : this._internal( (ref) => pageType( - ref, - name, + ref as PageTypeRef, + pageName, ), from: pageTypeProvider, name: r'pageTypeProvider', @@ -291,26 +382,72 @@ class PageTypeProvider extends AutoDisposeProvider { : _$pageTypeHash, dependencies: PageTypeFamily._dependencies, allTransitiveDependencies: PageTypeFamily._allTransitiveDependencies, + pageName: pageName, ); - final String name; + PageTypeProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageName, + }) : super.internal(); + + final String pageName; + + @override + Override overrideWith( + PageType Function(PageTypeRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: PageTypeProvider._internal( + (ref) => create(ref as PageTypeRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageName: pageName, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _PageTypeProviderElement(this); + } @override bool operator ==(Object other) { - return other is PageTypeProvider && other.name == name; + return other is PageTypeProvider && other.pageName == pageName; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, name.hashCode); + hash = _SystemHash.combine(hash, pageName.hashCode); return _SystemHash.finish(hash); } } -String _$entriesPageHash() => r'722059484c7e53a0839547133217a6615f37bc6d'; -typedef EntriesPageRef = AutoDisposeProviderRef; +mixin PageTypeRef on AutoDisposeProviderRef { + /// The parameter `pageName` of this provider. + String get pageName; +} + +class _PageTypeProviderElement extends AutoDisposeProviderElement + with PageTypeRef { + _PageTypeProviderElement(super.provider); + + @override + String get pageName => (origin as PageTypeProvider).pageName; +} + +String _$entriesPageHash() => r'3e0b03d9a29e7f750327ccaf26fa961a567c745a'; /// See also [entriesPage]. @ProviderFor(entriesPage) @@ -358,10 +495,10 @@ class EntriesPageFamily extends Family { class EntriesPageProvider extends AutoDisposeProvider { /// See also [entriesPage]. EntriesPageProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => entriesPage( - ref, + ref as EntriesPageRef, entryId, ), from: entriesPageProvider, @@ -373,10 +510,44 @@ class EntriesPageProvider extends AutoDisposeProvider { dependencies: EntriesPageFamily._dependencies, allTransitiveDependencies: EntriesPageFamily._allTransitiveDependencies, + entryId: entryId, ); + EntriesPageProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + String? Function(EntriesPageRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntriesPageProvider._internal( + (ref) => create(ref as EntriesPageRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntriesPageProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntriesPageProvider && other.entryId == entryId; @@ -391,8 +562,20 @@ class EntriesPageProvider extends AutoDisposeProvider { } } +mixin EntriesPageRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntriesPageProviderElement extends AutoDisposeProviderElement + with EntriesPageRef { + _EntriesPageProviderElement(super.provider); + + @override + String get entryId => (origin as EntriesPageProvider).entryId; +} + String _$entryHash() => r'f1e00a6ad6ab8e50c1e2178680c8004c98dea055'; -typedef EntryRef = AutoDisposeProviderRef; /// See also [entry]. @ProviderFor(entry) @@ -443,11 +626,11 @@ class EntryFamily extends Family { class EntryProvider extends AutoDisposeProvider { /// See also [entry]. EntryProvider( - this.pageId, - this.entryId, - ) : super.internal( + String pageId, + String entryId, + ) : this._internal( (ref) => entry( - ref, + ref as EntryRef, pageId, entryId, ), @@ -459,11 +642,48 @@ class EntryProvider extends AutoDisposeProvider { : _$entryHash, dependencies: EntryFamily._dependencies, allTransitiveDependencies: EntryFamily._allTransitiveDependencies, + pageId: pageId, + entryId: entryId, ); + EntryProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageId, + required this.entryId, + }) : super.internal(); + final String pageId; final String entryId; + @override + Override overrideWith( + Entry? Function(EntryRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryProvider._internal( + (ref) => create(ref as EntryRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageId: pageId, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntryProvider && @@ -481,8 +701,25 @@ class EntryProvider extends AutoDisposeProvider { } } +mixin EntryRef on AutoDisposeProviderRef { + /// The parameter `pageId` of this provider. + String get pageId; + + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryProviderElement extends AutoDisposeProviderElement + with EntryRef { + _EntryProviderElement(super.provider); + + @override + String get pageId => (origin as EntryProvider).pageId; + @override + String get entryId => (origin as EntryProvider).entryId; +} + String _$globalEntryHash() => r'9aa2e0f379f22d9d87dee900fe3122f81698fac3'; -typedef GlobalEntryRef = AutoDisposeProviderRef; /// See also [globalEntry]. @ProviderFor(globalEntry) @@ -530,10 +767,10 @@ class GlobalEntryFamily extends Family { class GlobalEntryProvider extends AutoDisposeProvider { /// See also [globalEntry]. GlobalEntryProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => globalEntry( - ref, + ref as GlobalEntryRef, entryId, ), from: globalEntryProvider, @@ -545,10 +782,44 @@ class GlobalEntryProvider extends AutoDisposeProvider { dependencies: GlobalEntryFamily._dependencies, allTransitiveDependencies: GlobalEntryFamily._allTransitiveDependencies, + entryId: entryId, ); + GlobalEntryProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + Entry? Function(GlobalEntryRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: GlobalEntryProvider._internal( + (ref) => create(ref as GlobalEntryRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _GlobalEntryProviderElement(this); + } + @override bool operator ==(Object other) { return other is GlobalEntryProvider && other.entryId == entryId; @@ -563,10 +834,21 @@ class GlobalEntryProvider extends AutoDisposeProvider { } } +mixin GlobalEntryRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _GlobalEntryProviderElement extends AutoDisposeProviderElement + with GlobalEntryRef { + _GlobalEntryProviderElement(super.provider); + + @override + String get entryId => (origin as GlobalEntryProvider).entryId; +} + String _$globalEntryWithPageHash() => r'250ed7d1b0146d138e1237d22c12a53e00a7b0b9'; -typedef GlobalEntryWithPageRef - = AutoDisposeProviderRef?>; /// See also [globalEntryWithPage]. @ProviderFor(globalEntryWithPage) @@ -615,10 +897,10 @@ class GlobalEntryWithPageProvider extends AutoDisposeProvider?> { /// See also [globalEntryWithPage]. GlobalEntryWithPageProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => globalEntryWithPage( - ref, + ref as GlobalEntryWithPageRef, entryId, ), from: globalEntryWithPageProvider, @@ -630,10 +912,44 @@ class GlobalEntryWithPageProvider dependencies: GlobalEntryWithPageFamily._dependencies, allTransitiveDependencies: GlobalEntryWithPageFamily._allTransitiveDependencies, + entryId: entryId, ); + GlobalEntryWithPageProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + MapEntry? Function(GlobalEntryWithPageRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: GlobalEntryWithPageProvider._internal( + (ref) => create(ref as GlobalEntryWithPageRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement?> createElement() { + return _GlobalEntryWithPageProviderElement(this); + } + @override bool operator ==(Object other) { return other is GlobalEntryWithPageProvider && other.entryId == entryId; @@ -648,8 +964,22 @@ class GlobalEntryWithPageProvider } } +mixin GlobalEntryWithPageRef + on AutoDisposeProviderRef?> { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _GlobalEntryWithPageProviderElement + extends AutoDisposeProviderElement?> + with GlobalEntryWithPageRef { + _GlobalEntryWithPageProviderElement(super.provider); + + @override + String get entryId => (origin as GlobalEntryWithPageProvider).entryId; +} + String _$entryExistsHash() => r'7e7ddbceb9b0efb860e5cd01f53c509eb6009bf9'; -typedef EntryExistsRef = AutoDisposeProviderRef; /// See also [entryExists]. @ProviderFor(entryExists) @@ -697,10 +1027,10 @@ class EntryExistsFamily extends Family { class EntryExistsProvider extends AutoDisposeProvider { /// See also [entryExists]. EntryExistsProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => entryExists( - ref, + ref as EntryExistsRef, entryId, ), from: entryExistsProvider, @@ -712,10 +1042,44 @@ class EntryExistsProvider extends AutoDisposeProvider { dependencies: EntryExistsFamily._dependencies, allTransitiveDependencies: EntryExistsFamily._allTransitiveDependencies, + entryId: entryId, ); + EntryExistsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + bool Function(EntryExistsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: EntryExistsProvider._internal( + (ref) => create(ref as EntryExistsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EntryExistsProviderElement(this); + } + @override bool operator ==(Object other) { return other is EntryExistsProvider && other.entryId == entryId; @@ -729,5 +1093,18 @@ class EntryExistsProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +mixin EntryExistsRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryExistsProviderElement extends AutoDisposeProviderElement + with EntryExistsRef { + _EntryExistsProviderElement(super.provider); + + @override + String get entryId => (origin as EntryExistsProvider).entryId; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/potion_effects.g.dart b/app/lib/models/potion_effects.g.dart index 9ce72e8037..0d7b572140 100644 --- a/app/lib/models/potion_effects.g.dart +++ b/app/lib/models/potion_effects.g.dart @@ -22,4 +22,4 @@ final potionEffectsProvider = AutoDisposeFutureProvider>.internal( typedef PotionEffectsRef = AutoDisposeFutureProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/segment.freezed.dart b/app/lib/models/segment.freezed.dart index a7b1ada053..d476767b78 100644 --- a/app/lib/models/segment.freezed.dart +++ b/app/lib/models/segment.freezed.dart @@ -112,10 +112,10 @@ class _$SegmentCopyWithImpl<$Res, $Val extends Segment> } /// @nodoc -abstract class _$$_SegmentCopyWith<$Res> implements $SegmentCopyWith<$Res> { - factory _$$_SegmentCopyWith( - _$_Segment value, $Res Function(_$_Segment) then) = - __$$_SegmentCopyWithImpl<$Res>; +abstract class _$$SegmentImplCopyWith<$Res> implements $SegmentCopyWith<$Res> { + factory _$$SegmentImplCopyWith( + _$SegmentImpl value, $Res Function(_$SegmentImpl) then) = + __$$SegmentImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -131,10 +131,11 @@ abstract class _$$_SegmentCopyWith<$Res> implements $SegmentCopyWith<$Res> { } /// @nodoc -class __$$_SegmentCopyWithImpl<$Res> - extends _$SegmentCopyWithImpl<$Res, _$_Segment> - implements _$$_SegmentCopyWith<$Res> { - __$$_SegmentCopyWithImpl(_$_Segment _value, $Res Function(_$_Segment) _then) +class __$$SegmentImplCopyWithImpl<$Res> + extends _$SegmentCopyWithImpl<$Res, _$SegmentImpl> + implements _$$SegmentImplCopyWith<$Res> { + __$$SegmentImplCopyWithImpl( + _$SegmentImpl _value, $Res Function(_$SegmentImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -150,7 +151,7 @@ class __$$_SegmentCopyWithImpl<$Res> Object? maxFrames = freezed, Object? data = null, }) { - return _then(_$_Segment( + return _then(_$SegmentImpl( path: null == path ? _value.path : path // ignore: cast_nullable_to_non_nullable @@ -193,8 +194,8 @@ class __$$_SegmentCopyWithImpl<$Res> /// @nodoc -class _$_Segment implements _Segment { - const _$_Segment( +class _$SegmentImpl implements _Segment { + const _$SegmentImpl( {this.path = "", this.index = 0, this.color = Colors.white, @@ -246,7 +247,7 @@ class _$_Segment implements _Segment { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Segment && + other is _$SegmentImpl && (identical(other.path, path) || other.path == path) && (identical(other.index, index) || other.index == index) && (identical(other.color, color) || other.color == color) && @@ -278,8 +279,8 @@ class _$_Segment implements _Segment { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_SegmentCopyWith<_$_Segment> get copyWith => - __$$_SegmentCopyWithImpl<_$_Segment>(this, _$identity); + _$$SegmentImplCopyWith<_$SegmentImpl> get copyWith => + __$$SegmentImplCopyWithImpl<_$SegmentImpl>(this, _$identity); } abstract class _Segment implements Segment { @@ -292,7 +293,7 @@ abstract class _Segment implements Segment { final int endFrame, final int? minFrames, final int? maxFrames, - final Map data}) = _$_Segment; + final Map data}) = _$SegmentImpl; @override String get path; @@ -314,6 +315,6 @@ abstract class _Segment implements Segment { Map get data; @override @JsonKey(ignore: true) - _$$_SegmentCopyWith<_$_Segment> get copyWith => + _$$SegmentImplCopyWith<_$SegmentImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/segment.g.dart b/app/lib/models/segment.g.dart index 46f68d53e3..a38fbf257e 100644 --- a/app/lib/models/segment.g.dart +++ b/app/lib/models/segment.g.dart @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef SegmentWritersRef = AutoDisposeProviderRef>; - /// See also [segmentWriters]. @ProviderFor(segmentWriters) const segmentWritersProvider = SegmentWritersFamily(); @@ -80,11 +78,11 @@ class SegmentWritersFamily extends Family> { class SegmentWritersProvider extends AutoDisposeProvider> { /// See also [segmentWriters]. SegmentWritersProvider( - this.entryId, - this.segmentId, - ) : super.internal( + String entryId, + String segmentId, + ) : this._internal( (ref) => segmentWriters( - ref, + ref as SegmentWritersRef, entryId, segmentId, ), @@ -97,11 +95,48 @@ class SegmentWritersProvider extends AutoDisposeProvider> { dependencies: SegmentWritersFamily._dependencies, allTransitiveDependencies: SegmentWritersFamily._allTransitiveDependencies, + entryId: entryId, + segmentId: segmentId, ); + SegmentWritersProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + required this.segmentId, + }) : super.internal(); + final String entryId; final String segmentId; + @override + Override overrideWith( + List Function(SegmentWritersRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: SegmentWritersProvider._internal( + (ref) => create(ref as SegmentWritersRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + segmentId: segmentId, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _SegmentWritersProviderElement(this); + } + @override bool operator ==(Object other) { return other is SegmentWritersProvider && @@ -118,5 +153,23 @@ class SegmentWritersProvider extends AutoDisposeProvider> { return _SystemHash.finish(hash); } } + +mixin SegmentWritersRef on AutoDisposeProviderRef> { + /// The parameter `entryId` of this provider. + String get entryId; + + /// The parameter `segmentId` of this provider. + String get segmentId; +} + +class _SegmentWritersProviderElement + extends AutoDisposeProviderElement> with SegmentWritersRef { + _SegmentWritersProviderElement(super.provider); + + @override + String get entryId => (origin as SegmentWritersProvider).entryId; + @override + String get segmentId => (origin as SegmentWritersProvider).segmentId; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/sounds.freezed.dart b/app/lib/models/sounds.freezed.dart index 01662f9eca..8e96059016 100644 --- a/app/lib/models/sounds.freezed.dart +++ b/app/lib/models/sounds.freezed.dart @@ -73,21 +73,22 @@ class _$SoundDataCopyWithImpl<$Res, $Val extends SoundData> } /// @nodoc -abstract class _$$_SoundDataCopyWith<$Res> implements $SoundDataCopyWith<$Res> { - factory _$$_SoundDataCopyWith( - _$_SoundData value, $Res Function(_$_SoundData) then) = - __$$_SoundDataCopyWithImpl<$Res>; +abstract class _$$SoundDataImplCopyWith<$Res> + implements $SoundDataCopyWith<$Res> { + factory _$$SoundDataImplCopyWith( + _$SoundDataImpl value, $Res Function(_$SoundDataImpl) then) = + __$$SoundDataImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, int weight, double volume}); } /// @nodoc -class __$$_SoundDataCopyWithImpl<$Res> - extends _$SoundDataCopyWithImpl<$Res, _$_SoundData> - implements _$$_SoundDataCopyWith<$Res> { - __$$_SoundDataCopyWithImpl( - _$_SoundData _value, $Res Function(_$_SoundData) _then) +class __$$SoundDataImplCopyWithImpl<$Res> + extends _$SoundDataCopyWithImpl<$Res, _$SoundDataImpl> + implements _$$SoundDataImplCopyWith<$Res> { + __$$SoundDataImplCopyWithImpl( + _$SoundDataImpl _value, $Res Function(_$SoundDataImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -97,7 +98,7 @@ class __$$_SoundDataCopyWithImpl<$Res> Object? weight = null, Object? volume = null, }) { - return _then(_$_SoundData( + return _then(_$SoundDataImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -116,11 +117,11 @@ class __$$_SoundDataCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_SoundData implements _SoundData { - const _$_SoundData({this.name = "", this.weight = 1, this.volume = 1}); +class _$SoundDataImpl implements _SoundData { + const _$SoundDataImpl({this.name = "", this.weight = 1, this.volume = 1}); - factory _$_SoundData.fromJson(Map json) => - _$$_SoundDataFromJson(json); + factory _$SoundDataImpl.fromJson(Map json) => + _$$SoundDataImplFromJson(json); @override @JsonKey() @@ -141,7 +142,7 @@ class _$_SoundData implements _SoundData { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_SoundData && + other is _$SoundDataImpl && (identical(other.name, name) || other.name == name) && (identical(other.weight, weight) || other.weight == weight) && (identical(other.volume, volume) || other.volume == volume)); @@ -154,12 +155,12 @@ class _$_SoundData implements _SoundData { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_SoundDataCopyWith<_$_SoundData> get copyWith => - __$$_SoundDataCopyWithImpl<_$_SoundData>(this, _$identity); + _$$SoundDataImplCopyWith<_$SoundDataImpl> get copyWith => + __$$SoundDataImplCopyWithImpl<_$SoundDataImpl>(this, _$identity); @override Map toJson() { - return _$$_SoundDataToJson( + return _$$SoundDataImplToJson( this, ); } @@ -169,10 +170,10 @@ abstract class _SoundData implements SoundData { const factory _SoundData( {final String name, final int weight, - final double volume}) = _$_SoundData; + final double volume}) = _$SoundDataImpl; factory _SoundData.fromJson(Map json) = - _$_SoundData.fromJson; + _$SoundDataImpl.fromJson; @override String get name; @@ -182,6 +183,6 @@ abstract class _SoundData implements SoundData { double get volume; @override @JsonKey(ignore: true) - _$$_SoundDataCopyWith<_$_SoundData> get copyWith => + _$$SoundDataImplCopyWith<_$SoundDataImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/sounds.g.dart b/app/lib/models/sounds.g.dart index 36a7eb879a..f9a91afedc 100644 --- a/app/lib/models/sounds.g.dart +++ b/app/lib/models/sounds.g.dart @@ -6,13 +6,14 @@ part of 'sounds.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_SoundData _$$_SoundDataFromJson(Map json) => _$_SoundData( +_$SoundDataImpl _$$SoundDataImplFromJson(Map json) => + _$SoundDataImpl( name: json['name'] as String? ?? "", weight: json['weight'] as int? ?? 1, volume: (json['volume'] as num?)?.toDouble() ?? 1, ); -Map _$$_SoundDataToJson(_$_SoundData instance) => +Map _$$SoundDataImplToJson(_$SoundDataImpl instance) => { 'name': instance.name, 'weight': instance.weight, @@ -62,16 +63,12 @@ class _SystemHash { } } -typedef MinecraftSoundRef - = AutoDisposeFutureProviderRef>?>; - /// See also [minecraftSound]. @ProviderFor(minecraftSound) const minecraftSoundProvider = MinecraftSoundFamily(); /// See also [minecraftSound]. -class MinecraftSoundFamily - extends Family>?>> { +class MinecraftSoundFamily extends Family> { /// See also [minecraftSound]. const MinecraftSoundFamily(); @@ -110,13 +107,13 @@ class MinecraftSoundFamily /// See also [minecraftSound]. class MinecraftSoundProvider - extends AutoDisposeFutureProvider>?> { + extends AutoDisposeFutureProvider { /// See also [minecraftSound]. MinecraftSoundProvider( - this.id, - ) : super.internal( + String id, + ) : this._internal( (ref) => minecraftSound( - ref, + ref as MinecraftSoundRef, id, ), from: minecraftSoundProvider, @@ -128,10 +125,44 @@ class MinecraftSoundProvider dependencies: MinecraftSoundFamily._dependencies, allTransitiveDependencies: MinecraftSoundFamily._allTransitiveDependencies, + id: id, ); + MinecraftSoundProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.id, + }) : super.internal(); + final String id; + @override + Override overrideWith( + FutureOr Function(MinecraftSoundRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: MinecraftSoundProvider._internal( + (ref) => create(ref as MinecraftSoundRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + id: id, + ), + ); + } + + @override + AutoDisposeFutureProviderElement createElement() { + return _MinecraftSoundProviderElement(this); + } + @override bool operator ==(Object other) { return other is MinecraftSoundProvider && other.id == id; @@ -145,5 +176,19 @@ class MinecraftSoundProvider return _SystemHash.finish(hash); } } + +mixin MinecraftSoundRef on AutoDisposeFutureProviderRef { + /// The parameter `id` of this provider. + String get id; +} + +class _MinecraftSoundProviderElement + extends AutoDisposeFutureProviderElement + with MinecraftSoundRef { + _MinecraftSoundProviderElement(super.provider); + + @override + String get id => (origin as MinecraftSoundProvider).id; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/models/writers.freezed.dart b/app/lib/models/writers.freezed.dart index 101e758e9d..2f465cdd40 100644 --- a/app/lib/models/writers.freezed.dart +++ b/app/lib/models/writers.freezed.dart @@ -89,9 +89,10 @@ class _$WriterCopyWithImpl<$Res, $Val extends Writer> } /// @nodoc -abstract class _$$_WriterCopyWith<$Res> implements $WriterCopyWith<$Res> { - factory _$$_WriterCopyWith(_$_Writer value, $Res Function(_$_Writer) then) = - __$$_WriterCopyWithImpl<$Res>; +abstract class _$$WriterImplCopyWith<$Res> implements $WriterCopyWith<$Res> { + factory _$$WriterImplCopyWith( + _$WriterImpl value, $Res Function(_$WriterImpl) then) = + __$$WriterImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -103,10 +104,11 @@ abstract class _$$_WriterCopyWith<$Res> implements $WriterCopyWith<$Res> { } /// @nodoc -class __$$_WriterCopyWithImpl<$Res> - extends _$WriterCopyWithImpl<$Res, _$_Writer> - implements _$$_WriterCopyWith<$Res> { - __$$_WriterCopyWithImpl(_$_Writer _value, $Res Function(_$_Writer) _then) +class __$$WriterImplCopyWithImpl<$Res> + extends _$WriterCopyWithImpl<$Res, _$WriterImpl> + implements _$$WriterImplCopyWith<$Res> { + __$$WriterImplCopyWithImpl( + _$WriterImpl _value, $Res Function(_$WriterImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -118,7 +120,7 @@ class __$$_WriterCopyWithImpl<$Res> Object? entryId = freezed, Object? field = freezed, }) { - return _then(_$_Writer( + return _then(_$WriterImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable @@ -145,12 +147,12 @@ class __$$_WriterCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_Writer implements _Writer { - const _$_Writer( +class _$WriterImpl implements _Writer { + const _$WriterImpl( {required this.id, this.iconUrl, this.pageId, this.entryId, this.field}); - factory _$_Writer.fromJson(Map json) => - _$$_WriterFromJson(json); + factory _$WriterImpl.fromJson(Map json) => + _$$WriterImplFromJson(json); @override final String id; @@ -172,7 +174,7 @@ class _$_Writer implements _Writer { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Writer && + other is _$WriterImpl && (identical(other.id, id) || other.id == id) && (identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl) && (identical(other.pageId, pageId) || other.pageId == pageId) && @@ -188,12 +190,12 @@ class _$_Writer implements _Writer { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_WriterCopyWith<_$_Writer> get copyWith => - __$$_WriterCopyWithImpl<_$_Writer>(this, _$identity); + _$$WriterImplCopyWith<_$WriterImpl> get copyWith => + __$$WriterImplCopyWithImpl<_$WriterImpl>(this, _$identity); @override Map toJson() { - return _$$_WriterToJson( + return _$$WriterImplToJson( this, ); } @@ -205,9 +207,9 @@ abstract class _Writer implements Writer { final String? iconUrl, final String? pageId, final String? entryId, - final String? field}) = _$_Writer; + final String? field}) = _$WriterImpl; - factory _Writer.fromJson(Map json) = _$_Writer.fromJson; + factory _Writer.fromJson(Map json) = _$WriterImpl.fromJson; @override String get id; @@ -221,6 +223,6 @@ abstract class _Writer implements Writer { String? get field; @override @JsonKey(ignore: true) - _$$_WriterCopyWith<_$_Writer> get copyWith => + _$$WriterImplCopyWith<_$WriterImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/models/writers.g.dart b/app/lib/models/writers.g.dart index 45e64f9585..529b61bc7c 100644 --- a/app/lib/models/writers.g.dart +++ b/app/lib/models/writers.g.dart @@ -6,7 +6,7 @@ part of 'writers.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_Writer _$$_WriterFromJson(Map json) => _$_Writer( +_$WriterImpl _$$WriterImplFromJson(Map json) => _$WriterImpl( id: json['id'] as String, iconUrl: json['iconUrl'] as String?, pageId: json['pageId'] as String?, @@ -14,7 +14,8 @@ _$_Writer _$$_WriterFromJson(Map json) => _$_Writer( field: json['field'] as String?, ); -Map _$$_WriterToJson(_$_Writer instance) => { +Map _$$WriterImplToJson(_$WriterImpl instance) => + { 'id': instance.id, 'iconUrl': instance.iconUrl, 'pageId': instance.pageId, @@ -49,8 +50,6 @@ class _SystemHash { } } -typedef FieldWritersRef = AutoDisposeProviderRef>; - /// Get all the writers that are writhing in a specific field. /// [path] the given path of the field. /// @@ -118,11 +117,11 @@ class FieldWritersProvider extends AutoDisposeProvider> { /// /// Copied from [fieldWriters]. FieldWritersProvider( - this.path, { - this.exact = false, - }) : super.internal( + String path, { + bool exact = false, + }) : this._internal( (ref) => fieldWriters( - ref, + ref as FieldWritersRef, path, exact: exact, ), @@ -135,11 +134,48 @@ class FieldWritersProvider extends AutoDisposeProvider> { dependencies: FieldWritersFamily._dependencies, allTransitiveDependencies: FieldWritersFamily._allTransitiveDependencies, + path: path, + exact: exact, ); + FieldWritersProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.path, + required this.exact, + }) : super.internal(); + final String path; final bool exact; + @override + Override overrideWith( + List Function(FieldWritersRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: FieldWritersProvider._internal( + (ref) => create(ref as FieldWritersRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + path: path, + exact: exact, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _FieldWritersProviderElement(this); + } + @override bool operator ==(Object other) { return other is FieldWritersProvider && @@ -156,5 +192,23 @@ class FieldWritersProvider extends AutoDisposeProvider> { return _SystemHash.finish(hash); } } + +mixin FieldWritersRef on AutoDisposeProviderRef> { + /// The parameter `path` of this provider. + String get path; + + /// The parameter `exact` of this provider. + bool get exact; +} + +class _FieldWritersProviderElement + extends AutoDisposeProviderElement> with FieldWritersRef { + _FieldWritersProviderElement(super.provider); + + @override + String get path => (origin as FieldWritersProvider).path; + @override + bool get exact => (origin as FieldWritersProvider).exact; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/pages/error_connect_page.dart b/app/lib/pages/error_connect_page.dart index 447eacb0a3..9f39915afa 100644 --- a/app/lib/pages/error_connect_page.dart +++ b/app/lib/pages/error_connect_page.dart @@ -9,16 +9,9 @@ import "package:typewriter/widgets/components/general/copyable_text.dart"; @RoutePage() class ErrorConnectPage extends HookConsumerWidget { const ErrorConnectPage({ - required this.hostname, - required this.port, - this.token, super.key, }); - final String hostname; - final int port; - final String? token; - @override Widget build(BuildContext context, WidgetRef ref) { useDelayedExecution(() { diff --git a/app/lib/pages/page_editor.dart b/app/lib/pages/page_editor.dart index 541084e0d0..8c8269491f 100644 --- a/app/lib/pages/page_editor.dart +++ b/app/lib/pages/page_editor.dart @@ -40,7 +40,7 @@ Page? currentPage(CurrentPageRef ref) { final id = ref.watch(currentPageIdProvider); final book = ref.watch(bookProvider); - return book.pages.firstWhereOrNull((element) => element.name == id); + return book.pages.firstWhereOrNull((element) => element.pageName == id); } @riverpod diff --git a/app/lib/pages/page_editor.g.dart b/app/lib/pages/page_editor.g.dart index 3f7805080f..032a9aa49b 100644 --- a/app/lib/pages/page_editor.g.dart +++ b/app/lib/pages/page_editor.g.dart @@ -36,7 +36,7 @@ final currentPageLabelProvider = AutoDisposeProvider.internal( ); typedef CurrentPageLabelRef = AutoDisposeProviderRef; -String _$currentPageHash() => r'019404b1e80234d7a6d9ed18030acc589ce2d700'; +String _$currentPageHash() => r'e4061bc62721be6ea098919cee27392d81d8de10'; /// See also [currentPage]. @ProviderFor(currentPage) @@ -80,4 +80,4 @@ final _writersProvider = AutoDisposeProvider>.internal( typedef _WritersRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/pages/pages_list.dart b/app/lib/pages/pages_list.dart index acd380c1b4..70d61563c0 100644 --- a/app/lib/pages/pages_list.dart +++ b/app/lib/pages/pages_list.dart @@ -28,11 +28,11 @@ part "pages_list.freezed.dart"; part "pages_list.g.dart"; @freezed -class _PageData with _$_PageData { +class _PageData with _$PageData { const factory _PageData({ required String name, required PageType type, - }) = _$PageData; + }) = _$__PageData; } @riverpod @@ -40,7 +40,7 @@ List<_PageData> _pagesData(_PagesDataRef ref) { return ref .watch(bookProvider) .pages - .map((page) => _PageData(name: page.name, type: page.type)) + .map((page) => _PageData(name: page.pageName, type: page.type)) .toList(); } diff --git a/app/lib/pages/pages_list.freezed.dart b/app/lib/pages/pages_list.freezed.dart index 53c703c8b2..892aca7ed0 100644 --- a/app/lib/pages/pages_list.freezed.dart +++ b/app/lib/pages/pages_list.freezed.dart @@ -15,7 +15,7 @@ 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'); /// @nodoc -mixin _$_PageData { +mixin _$PageData { String get name => throw _privateConstructorUsedError; PageType get type => throw _privateConstructorUsedError; @@ -62,21 +62,22 @@ class __$PageDataCopyWithImpl<$Res, $Val extends _PageData> } /// @nodoc -abstract class _$$_$PageDataCopyWith<$Res> implements _$PageDataCopyWith<$Res> { - factory _$$_$PageDataCopyWith( - _$_$PageData value, $Res Function(_$_$PageData) then) = - __$$_$PageDataCopyWithImpl<$Res>; +abstract class _$$$__PageDataImplCopyWith<$Res> + implements _$PageDataCopyWith<$Res> { + factory _$$$__PageDataImplCopyWith( + _$$__PageDataImpl value, $Res Function(_$$__PageDataImpl) then) = + __$$$__PageDataImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, PageType type}); } /// @nodoc -class __$$_$PageDataCopyWithImpl<$Res> - extends __$PageDataCopyWithImpl<$Res, _$_$PageData> - implements _$$_$PageDataCopyWith<$Res> { - __$$_$PageDataCopyWithImpl( - _$_$PageData _value, $Res Function(_$_$PageData) _then) +class __$$$__PageDataImplCopyWithImpl<$Res> + extends __$PageDataCopyWithImpl<$Res, _$$__PageDataImpl> + implements _$$$__PageDataImplCopyWith<$Res> { + __$$$__PageDataImplCopyWithImpl( + _$$__PageDataImpl _value, $Res Function(_$$__PageDataImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -85,7 +86,7 @@ class __$$_$PageDataCopyWithImpl<$Res> Object? name = null, Object? type = null, }) { - return _then(_$_$PageData( + return _then(_$$__PageDataImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -100,8 +101,8 @@ class __$$_$PageDataCopyWithImpl<$Res> /// @nodoc -class _$_$PageData implements _$PageData { - const _$_$PageData({required this.name, required this.type}); +class _$$__PageDataImpl implements _$__PageData { + const _$$__PageDataImpl({required this.name, required this.type}); @override final String name; @@ -117,7 +118,7 @@ class _$_$PageData implements _$PageData { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_$PageData && + other is _$$__PageDataImpl && (identical(other.name, name) || other.name == name) && (identical(other.type, type) || other.type == type)); } @@ -128,14 +129,14 @@ class _$_$PageData implements _$PageData { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_$PageDataCopyWith<_$_$PageData> get copyWith => - __$$_$PageDataCopyWithImpl<_$_$PageData>(this, _$identity); + _$$$__PageDataImplCopyWith<_$$__PageDataImpl> get copyWith => + __$$$__PageDataImplCopyWithImpl<_$$__PageDataImpl>(this, _$identity); } -abstract class _$PageData implements _PageData { - const factory _$PageData( +abstract class _$__PageData implements _PageData { + const factory _$__PageData( {required final String name, - required final PageType type}) = _$_$PageData; + required final PageType type}) = _$$__PageDataImpl; @override String get name; @@ -143,6 +144,6 @@ abstract class _$PageData implements _PageData { PageType get type; @override @JsonKey(ignore: true) - _$$_$PageDataCopyWith<_$_$PageData> get copyWith => + _$$$__PageDataImplCopyWith<_$$__PageDataImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/pages/pages_list.g.dart b/app/lib/pages/pages_list.g.dart index 8fa4d64c77..c57e457525 100644 --- a/app/lib/pages/pages_list.g.dart +++ b/app/lib/pages/pages_list.g.dart @@ -6,7 +6,7 @@ part of 'pages_list.dart'; // RiverpodGenerator // ************************************************************************** -String _$pagesDataHash() => r'9907c05e4d5a4641c759f10afee98c130c47cf48'; +String _$pagesDataHash() => r'6a58b72136d723096bdf5493e50c580e73bd3cab'; /// See also [_pagesData]. @ProviderFor(_pagesData) @@ -57,8 +57,6 @@ class _SystemHash { } } -typedef _WritersRef = AutoDisposeProviderRef>; - /// See also [_writers]. @ProviderFor(_writers) const _writersProvider = _WritersFamily(); @@ -105,10 +103,10 @@ class _WritersFamily extends Family> { class _WritersProvider extends AutoDisposeProvider> { /// See also [_writers]. _WritersProvider( - this.pageId, - ) : super.internal( + String pageId, + ) : this._internal( (ref) => _writers( - ref, + ref as _WritersRef, pageId, ), from: _writersProvider, @@ -119,10 +117,44 @@ class _WritersProvider extends AutoDisposeProvider> { : _$writersHash, dependencies: _WritersFamily._dependencies, allTransitiveDependencies: _WritersFamily._allTransitiveDependencies, + pageId: pageId, ); + _WritersProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.pageId, + }) : super.internal(); + final String pageId; + @override + Override overrideWith( + List Function(_WritersRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _WritersProvider._internal( + (ref) => create(ref as _WritersRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + pageId: pageId, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _WritersProviderElement(this); + } + @override bool operator ==(Object other) { return other is _WritersProvider && other.pageId == pageId; @@ -136,5 +168,18 @@ class _WritersProvider extends AutoDisposeProvider> { return _SystemHash.finish(hash); } } + +mixin _WritersRef on AutoDisposeProviderRef> { + /// The parameter `pageId` of this provider. + String get pageId; +} + +class _WritersProviderElement extends AutoDisposeProviderElement> + with _WritersRef { + _WritersProviderElement(super.provider); + + @override + String get pageId => (origin as _WritersProvider).pageId; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/utils/audio_player.g.dart b/app/lib/utils/audio_player.g.dart index 75970c0655..11a447a4bb 100644 --- a/app/lib/utils/audio_player.g.dart +++ b/app/lib/utils/audio_player.g.dart @@ -21,4 +21,4 @@ final audioPlayerProvider = AutoDisposeProvider.internal( typedef AudioPlayerRef = AutoDisposeProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/cinematic_view.dart b/app/lib/widgets/components/app/cinematic_view.dart index 19904fa112..be7552a0e5 100644 --- a/app/lib/widgets/components/app/cinematic_view.dart +++ b/app/lib/widgets/components/app/cinematic_view.dart @@ -4,7 +4,6 @@ import "package:collection/collection.dart"; import "package:collection_ext/all.dart"; import "package:flutter/material.dart" hide Title, FilledButton; import "package:flutter/services.dart"; -import "package:flutter_animate/flutter_animate.dart"; import "package:flutter_hooks/flutter_hooks.dart"; import "package:font_awesome_flutter/font_awesome_flutter.dart"; import "package:freezed_annotation/freezed_annotation.dart"; @@ -191,7 +190,7 @@ int _totalSequenceFrames(_TotalSequenceFramesRef ref) { } @freezed -class _TrackState with _$_TrackState { +class _TrackState with _$TrackState { const factory _TrackState([ @Default(0) double start, @Default(1) double end, @@ -747,7 +746,7 @@ double _trackBackgroundFractionModifier( } @freezed -class _FrameLine with _$_FrameLine { +class _FrameLine with _$FrameLine { const factory _FrameLine({ required int frame, required double offset, @@ -969,7 +968,7 @@ bool _showThumbs(_ShowThumbsRef ref, int startFrame, int endFrame) { } @freezed -class _MoveState with _$_MoveState { +class _MoveState with _$MoveState { const factory _MoveState({ required Segment? previousSegment, required Segment? nextSegment, @@ -1100,7 +1099,7 @@ class _MoveNotifier extends StateNotifier<_MoveState?> { void _updateEntry(String entryId, String path, dynamic value) { final page = ref.read(currentPageProvider); if (page == null) return; - final entry = ref.read(entryProvider(page.name, entryId)); + final entry = ref.read(entryProvider(page.pageName, entryId)); if (entry == null) return; page.updateEntryValue(ref.passing, entry, path, value); } @@ -1361,7 +1360,7 @@ String? _addSegment( final segments = ref.read(_segmentsProvider(entryId, segmentPath)); final page = ref.read(currentPageProvider); if (page == null) return null; - final entry = ref.read(entryProvider(page.name, entryId)); + final entry = ref.read(entryProvider(page.pageName, entryId)); if (entry == null) return null; final blueprint = ref.read(entryBlueprintProvider(entry.type)); @@ -1482,7 +1481,7 @@ void _deleteSegment(PassingRef ref, String entryId, String segmentPath) { ); return; } - final entry = ref.read(entryProvider(page.name, entryId)); + final entry = ref.read(entryProvider(page.pageName, entryId)); if (entry == null) { Toasts.showError( ref, diff --git a/app/lib/widgets/components/app/cinematic_view.freezed.dart b/app/lib/widgets/components/app/cinematic_view.freezed.dart index 9a0995c55b..3780be61b6 100644 --- a/app/lib/widgets/components/app/cinematic_view.freezed.dart +++ b/app/lib/widgets/components/app/cinematic_view.freezed.dart @@ -15,7 +15,7 @@ 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'); /// @nodoc -mixin _$_TrackState { +mixin _$TrackState { double get start => throw _privateConstructorUsedError; double get end => throw _privateConstructorUsedError; int get totalFrames => throw _privateConstructorUsedError; @@ -75,22 +75,22 @@ class __$TrackStateCopyWithImpl<$Res, $Val extends _TrackState> } /// @nodoc -abstract class _$$_$__TrackStateCopyWith<$Res> +abstract class _$$$__TrackStateImplCopyWith<$Res> implements _$TrackStateCopyWith<$Res> { - factory _$$_$__TrackStateCopyWith( - _$_$__TrackState value, $Res Function(_$_$__TrackState) then) = - __$$_$__TrackStateCopyWithImpl<$Res>; + factory _$$$__TrackStateImplCopyWith( + _$$__TrackStateImpl value, $Res Function(_$$__TrackStateImpl) then) = + __$$$__TrackStateImplCopyWithImpl<$Res>; @override @useResult $Res call({double start, double end, int totalFrames, double width}); } /// @nodoc -class __$$_$__TrackStateCopyWithImpl<$Res> - extends __$TrackStateCopyWithImpl<$Res, _$_$__TrackState> - implements _$$_$__TrackStateCopyWith<$Res> { - __$$_$__TrackStateCopyWithImpl( - _$_$__TrackState _value, $Res Function(_$_$__TrackState) _then) +class __$$$__TrackStateImplCopyWithImpl<$Res> + extends __$TrackStateCopyWithImpl<$Res, _$$__TrackStateImpl> + implements _$$$__TrackStateImplCopyWith<$Res> { + __$$$__TrackStateImplCopyWithImpl( + _$$__TrackStateImpl _value, $Res Function(_$$__TrackStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -101,7 +101,7 @@ class __$$_$__TrackStateCopyWithImpl<$Res> Object? totalFrames = null, Object? width = null, }) { - return _then(_$_$__TrackState( + return _then(_$$__TrackStateImpl( null == start ? _value.start : start // ignore: cast_nullable_to_non_nullable @@ -124,8 +124,8 @@ class __$$_$__TrackStateCopyWithImpl<$Res> /// @nodoc -class _$_$__TrackState implements _$__TrackState { - const _$_$__TrackState( +class _$$__TrackStateImpl implements _$__TrackState { + const _$$__TrackStateImpl( [this.start = 0, this.end = 1, this.totalFrames = 0, this.width = 0]); @override @@ -150,7 +150,7 @@ class _$_$__TrackState implements _$__TrackState { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_$__TrackState && + other is _$$__TrackStateImpl && (identical(other.start, start) || other.start == start) && (identical(other.end, end) || other.end == end) && (identical(other.totalFrames, totalFrames) || @@ -164,8 +164,8 @@ class _$_$__TrackState implements _$__TrackState { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_$__TrackStateCopyWith<_$_$__TrackState> get copyWith => - __$$_$__TrackStateCopyWithImpl<_$_$__TrackState>(this, _$identity); + _$$$__TrackStateImplCopyWith<_$$__TrackStateImpl> get copyWith => + __$$$__TrackStateImplCopyWithImpl<_$$__TrackStateImpl>(this, _$identity); } abstract class _$__TrackState implements _TrackState { @@ -173,7 +173,7 @@ abstract class _$__TrackState implements _TrackState { [final double start, final double end, final int totalFrames, - final double width]) = _$_$__TrackState; + final double width]) = _$$__TrackStateImpl; @override double get start; @@ -185,12 +185,12 @@ abstract class _$__TrackState implements _TrackState { double get width; @override @JsonKey(ignore: true) - _$$_$__TrackStateCopyWith<_$_$__TrackState> get copyWith => + _$$$__TrackStateImplCopyWith<_$$__TrackStateImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -mixin _$_FrameLine { +mixin _$FrameLine { int get frame => throw _privateConstructorUsedError; double get offset => throw _privateConstructorUsedError; bool get primary => throw _privateConstructorUsedError; @@ -244,22 +244,22 @@ class __$FrameLineCopyWithImpl<$Res, $Val extends _FrameLine> } /// @nodoc -abstract class _$$_$__FrameLineCopyWith<$Res> +abstract class _$$$__FrameLineImplCopyWith<$Res> implements _$FrameLineCopyWith<$Res> { - factory _$$_$__FrameLineCopyWith( - _$_$__FrameLine value, $Res Function(_$_$__FrameLine) then) = - __$$_$__FrameLineCopyWithImpl<$Res>; + factory _$$$__FrameLineImplCopyWith( + _$$__FrameLineImpl value, $Res Function(_$$__FrameLineImpl) then) = + __$$$__FrameLineImplCopyWithImpl<$Res>; @override @useResult $Res call({int frame, double offset, bool primary}); } /// @nodoc -class __$$_$__FrameLineCopyWithImpl<$Res> - extends __$FrameLineCopyWithImpl<$Res, _$_$__FrameLine> - implements _$$_$__FrameLineCopyWith<$Res> { - __$$_$__FrameLineCopyWithImpl( - _$_$__FrameLine _value, $Res Function(_$_$__FrameLine) _then) +class __$$$__FrameLineImplCopyWithImpl<$Res> + extends __$FrameLineCopyWithImpl<$Res, _$$__FrameLineImpl> + implements _$$$__FrameLineImplCopyWith<$Res> { + __$$$__FrameLineImplCopyWithImpl( + _$$__FrameLineImpl _value, $Res Function(_$$__FrameLineImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -269,7 +269,7 @@ class __$$_$__FrameLineCopyWithImpl<$Res> Object? offset = null, Object? primary = null, }) { - return _then(_$_$__FrameLine( + return _then(_$$__FrameLineImpl( frame: null == frame ? _value.frame : frame // ignore: cast_nullable_to_non_nullable @@ -288,8 +288,8 @@ class __$$_$__FrameLineCopyWithImpl<$Res> /// @nodoc -class _$_$__FrameLine implements _$__FrameLine { - const _$_$__FrameLine( +class _$$__FrameLineImpl implements _$__FrameLine { + const _$$__FrameLineImpl( {required this.frame, required this.offset, required this.primary}); @override @@ -308,7 +308,7 @@ class _$_$__FrameLine implements _$__FrameLine { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_$__FrameLine && + other is _$$__FrameLineImpl && (identical(other.frame, frame) || other.frame == frame) && (identical(other.offset, offset) || other.offset == offset) && (identical(other.primary, primary) || other.primary == primary)); @@ -320,15 +320,15 @@ class _$_$__FrameLine implements _$__FrameLine { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_$__FrameLineCopyWith<_$_$__FrameLine> get copyWith => - __$$_$__FrameLineCopyWithImpl<_$_$__FrameLine>(this, _$identity); + _$$$__FrameLineImplCopyWith<_$$__FrameLineImpl> get copyWith => + __$$$__FrameLineImplCopyWithImpl<_$$__FrameLineImpl>(this, _$identity); } abstract class _$__FrameLine implements _FrameLine { const factory _$__FrameLine( {required final int frame, required final double offset, - required final bool primary}) = _$_$__FrameLine; + required final bool primary}) = _$$__FrameLineImpl; @override int get frame; @@ -338,12 +338,12 @@ abstract class _$__FrameLine implements _FrameLine { bool get primary; @override @JsonKey(ignore: true) - _$$_$__FrameLineCopyWith<_$_$__FrameLine> get copyWith => + _$$$__FrameLineImplCopyWith<_$$__FrameLineImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -mixin _$_MoveState { +mixin _$MoveState { Segment? get previousSegment => throw _privateConstructorUsedError; Segment? get nextSegment => throw _privateConstructorUsedError; double get innerPercent => throw _privateConstructorUsedError; @@ -425,11 +425,11 @@ class __$MoveStateCopyWithImpl<$Res, $Val extends _MoveState> } /// @nodoc -abstract class _$$_$__MoveStateCopyWith<$Res> +abstract class _$$$__MoveStateImplCopyWith<$Res> implements _$MoveStateCopyWith<$Res> { - factory _$$_$__MoveStateCopyWith( - _$_$__MoveState value, $Res Function(_$_$__MoveState) then) = - __$$_$__MoveStateCopyWithImpl<$Res>; + factory _$$$__MoveStateImplCopyWith( + _$$__MoveStateImpl value, $Res Function(_$$__MoveStateImpl) then) = + __$$$__MoveStateImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -442,11 +442,11 @@ abstract class _$$_$__MoveStateCopyWith<$Res> } /// @nodoc -class __$$_$__MoveStateCopyWithImpl<$Res> - extends __$MoveStateCopyWithImpl<$Res, _$_$__MoveState> - implements _$$_$__MoveStateCopyWith<$Res> { - __$$_$__MoveStateCopyWithImpl( - _$_$__MoveState _value, $Res Function(_$_$__MoveState) _then) +class __$$$__MoveStateImplCopyWithImpl<$Res> + extends __$MoveStateCopyWithImpl<$Res, _$$__MoveStateImpl> + implements _$$$__MoveStateImplCopyWith<$Res> { + __$$$__MoveStateImplCopyWithImpl( + _$$__MoveStateImpl _value, $Res Function(_$$__MoveStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -456,7 +456,7 @@ class __$$_$__MoveStateCopyWithImpl<$Res> Object? nextSegment = freezed, Object? innerPercent = null, }) { - return _then(_$_$__MoveState( + return _then(_$$__MoveStateImpl( previousSegment: freezed == previousSegment ? _value.previousSegment : previousSegment // ignore: cast_nullable_to_non_nullable @@ -475,8 +475,8 @@ class __$$_$__MoveStateCopyWithImpl<$Res> /// @nodoc -class _$_$__MoveState implements _$__MoveState { - const _$_$__MoveState( +class _$$__MoveStateImpl implements _$__MoveState { + const _$$__MoveStateImpl( {required this.previousSegment, required this.nextSegment, this.innerPercent = 0.0}); @@ -498,7 +498,7 @@ class _$_$__MoveState implements _$__MoveState { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_$__MoveState && + other is _$$__MoveStateImpl && (identical(other.previousSegment, previousSegment) || other.previousSegment == previousSegment) && (identical(other.nextSegment, nextSegment) || @@ -514,15 +514,15 @@ class _$_$__MoveState implements _$__MoveState { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_$__MoveStateCopyWith<_$_$__MoveState> get copyWith => - __$$_$__MoveStateCopyWithImpl<_$_$__MoveState>(this, _$identity); + _$$$__MoveStateImplCopyWith<_$$__MoveStateImpl> get copyWith => + __$$$__MoveStateImplCopyWithImpl<_$$__MoveStateImpl>(this, _$identity); } abstract class _$__MoveState implements _MoveState { const factory _$__MoveState( {required final Segment? previousSegment, required final Segment? nextSegment, - final double innerPercent}) = _$_$__MoveState; + final double innerPercent}) = _$$__MoveStateImpl; @override Segment? get previousSegment; @@ -532,6 +532,6 @@ abstract class _$__MoveState implements _MoveState { double get innerPercent; @override @JsonKey(ignore: true) - _$$_$__MoveStateCopyWith<_$_$__MoveState> get copyWith => + _$$$__MoveStateImplCopyWith<_$$__MoveStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/widgets/components/app/cinematic_view.g.dart b/app/lib/widgets/components/app/cinematic_view.g.dart index a183669aa1..5ab002ab20 100644 --- a/app/lib/widgets/components/app/cinematic_view.g.dart +++ b/app/lib/widgets/components/app/cinematic_view.g.dart @@ -44,8 +44,6 @@ class _SystemHash { } } -typedef _SegmentPathsRef = AutoDisposeProviderRef>; - /// See also [_segmentPaths]. @ProviderFor(_segmentPaths) const _segmentPathsProvider = _SegmentPathsFamily(); @@ -92,10 +90,10 @@ class _SegmentPathsFamily extends Family> { class _SegmentPathsProvider extends AutoDisposeProvider> { /// See also [_segmentPaths]. _SegmentPathsProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => _segmentPaths( - ref, + ref as _SegmentPathsRef, entryId, ), from: _segmentPathsProvider, @@ -107,10 +105,44 @@ class _SegmentPathsProvider extends AutoDisposeProvider> { dependencies: _SegmentPathsFamily._dependencies, allTransitiveDependencies: _SegmentPathsFamily._allTransitiveDependencies, + entryId: entryId, ); + _SegmentPathsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + Map Function(_SegmentPathsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _SegmentPathsProvider._internal( + (ref) => create(ref as _SegmentPathsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _SegmentPathsProviderElement(this); + } + @override bool operator ==(Object other) { return other is _SegmentPathsProvider && other.entryId == entryId; @@ -125,8 +157,21 @@ class _SegmentPathsProvider extends AutoDisposeProvider> { } } +mixin _SegmentPathsRef on AutoDisposeProviderRef> { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _SegmentPathsProviderElement + extends AutoDisposeProviderElement> + with _SegmentPathsRef { + _SegmentPathsProviderElement(super.provider); + + @override + String get entryId => (origin as _SegmentPathsProvider).entryId; +} + String _$segmentsHash() => r'9a50f061be29058473384d5e95184ca25b3fc3de'; -typedef _SegmentsRef = AutoDisposeProviderRef>; /// See also [_segments]. @ProviderFor(_segments) @@ -177,11 +222,11 @@ class _SegmentsFamily extends Family> { class _SegmentsProvider extends AutoDisposeProvider> { /// See also [_segments]. _SegmentsProvider( - this.entryId, - this.path, - ) : super.internal( + String entryId, + String path, + ) : this._internal( (ref) => _segments( - ref, + ref as _SegmentsRef, entryId, path, ), @@ -193,11 +238,48 @@ class _SegmentsProvider extends AutoDisposeProvider> { : _$segmentsHash, dependencies: _SegmentsFamily._dependencies, allTransitiveDependencies: _SegmentsFamily._allTransitiveDependencies, + entryId: entryId, + path: path, ); + _SegmentsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + required this.path, + }) : super.internal(); + final String entryId; final String path; + @override + Override overrideWith( + List Function(_SegmentsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _SegmentsProvider._internal( + (ref) => create(ref as _SegmentsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + path: path, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _SegmentsProviderElement(this); + } + @override bool operator ==(Object other) { return other is _SegmentsProvider && @@ -215,8 +297,25 @@ class _SegmentsProvider extends AutoDisposeProvider> { } } +mixin _SegmentsRef on AutoDisposeProviderRef> { + /// The parameter `entryId` of this provider. + String get entryId; + + /// The parameter `path` of this provider. + String get path; +} + +class _SegmentsProviderElement extends AutoDisposeProviderElement> + with _SegmentsRef { + _SegmentsProviderElement(super.provider); + + @override + String get entryId => (origin as _SegmentsProvider).entryId; + @override + String get path => (origin as _SegmentsProvider).path; +} + String _$allSegmentsHash() => r'00ddff554f166898f9bb911168a5c18e369887ef'; -typedef _AllSegmentsRef = AutoDisposeProviderRef>; /// See also [_allSegments]. @ProviderFor(_allSegments) @@ -264,10 +363,10 @@ class _AllSegmentsFamily extends Family> { class _AllSegmentsProvider extends AutoDisposeProvider> { /// See also [_allSegments]. _AllSegmentsProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => _allSegments( - ref, + ref as _AllSegmentsRef, entryId, ), from: _allSegmentsProvider, @@ -279,10 +378,44 @@ class _AllSegmentsProvider extends AutoDisposeProvider> { dependencies: _AllSegmentsFamily._dependencies, allTransitiveDependencies: _AllSegmentsFamily._allTransitiveDependencies, + entryId: entryId, ); + _AllSegmentsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + List Function(_AllSegmentsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _AllSegmentsProvider._internal( + (ref) => create(ref as _AllSegmentsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _AllSegmentsProviderElement(this); + } + @override bool operator ==(Object other) { return other is _AllSegmentsProvider && other.entryId == entryId; @@ -297,8 +430,20 @@ class _AllSegmentsProvider extends AutoDisposeProvider> { } } +mixin _AllSegmentsRef on AutoDisposeProviderRef> { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _AllSegmentsProviderElement + extends AutoDisposeProviderElement> with _AllSegmentsRef { + _AllSegmentsProviderElement(super.provider); + + @override + String get entryId => (origin as _AllSegmentsProvider).entryId; +} + String _$endingFrameHash() => r'b1ee54645a8ea133a3e35488b84aeb79b9701544'; -typedef _EndingFrameRef = AutoDisposeProviderRef; /// See also [_endingFrame]. @ProviderFor(_endingFrame) @@ -346,10 +491,10 @@ class _EndingFrameFamily extends Family { class _EndingFrameProvider extends AutoDisposeProvider { /// See also [_endingFrame]. _EndingFrameProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => _endingFrame( - ref, + ref as _EndingFrameRef, entryId, ), from: _endingFrameProvider, @@ -361,10 +506,44 @@ class _EndingFrameProvider extends AutoDisposeProvider { dependencies: _EndingFrameFamily._dependencies, allTransitiveDependencies: _EndingFrameFamily._allTransitiveDependencies, + entryId: entryId, ); + _EndingFrameProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + int Function(_EndingFrameRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _EndingFrameProvider._internal( + (ref) => create(ref as _EndingFrameRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _EndingFrameProviderElement(this); + } + @override bool operator ==(Object other) { return other is _EndingFrameProvider && other.entryId == entryId; @@ -379,6 +558,19 @@ class _EndingFrameProvider extends AutoDisposeProvider { } } +mixin _EndingFrameRef on AutoDisposeProviderRef { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EndingFrameProviderElement extends AutoDisposeProviderElement + with _EndingFrameRef { + _EndingFrameProviderElement(super.provider); + + @override + String get entryId => (origin as _EndingFrameProvider).entryId; +} + String _$totalSequenceFramesHash() => r'448efbdd8b67500a4a9578b7bf46f83f14456e91'; @@ -499,7 +691,6 @@ final _timeFractionsProvider = AutoDisposeProvider.internal( typedef _TimeFractionsRef = AutoDisposeProviderRef; String _$timeFractionFramesHash() => r'8015741ea21a16f837d627eefe543fbc6236db0f'; -typedef _TimeFractionFramesRef = AutoDisposeProviderRef>; /// See also [_timeFractionFrames]. @ProviderFor(_timeFractionFrames) @@ -547,10 +738,10 @@ class _TimeFractionFramesFamily extends Family> { class _TimeFractionFramesProvider extends AutoDisposeProvider> { /// See also [_timeFractionFrames]. _TimeFractionFramesProvider({ - this.fractionModifier = 1.0, - }) : super.internal( + double fractionModifier = 1.0, + }) : this._internal( (ref) => _timeFractionFrames( - ref, + ref as _TimeFractionFramesRef, fractionModifier: fractionModifier, ), from: _timeFractionFramesProvider, @@ -562,10 +753,44 @@ class _TimeFractionFramesProvider extends AutoDisposeProvider> { dependencies: _TimeFractionFramesFamily._dependencies, allTransitiveDependencies: _TimeFractionFramesFamily._allTransitiveDependencies, + fractionModifier: fractionModifier, ); + _TimeFractionFramesProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.fractionModifier, + }) : super.internal(); + final double fractionModifier; + @override + Override overrideWith( + List Function(_TimeFractionFramesRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _TimeFractionFramesProvider._internal( + (ref) => create(ref as _TimeFractionFramesRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + fractionModifier: fractionModifier, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _TimeFractionFramesProviderElement(this); + } + @override bool operator ==(Object other) { return other is _TimeFractionFramesProvider && @@ -581,8 +806,21 @@ class _TimeFractionFramesProvider extends AutoDisposeProvider> { } } +mixin _TimeFractionFramesRef on AutoDisposeProviderRef> { + /// The parameter `fractionModifier` of this provider. + double get fractionModifier; +} + +class _TimeFractionFramesProviderElement + extends AutoDisposeProviderElement> with _TimeFractionFramesRef { + _TimeFractionFramesProviderElement(super.provider); + + @override + double get fractionModifier => + (origin as _TimeFractionFramesProvider).fractionModifier; +} + String _$timePointOffsetHash() => r'7498c13cafb7517b374493ac38ab8e5e3a3441d0'; -typedef _TimePointOffsetRef = AutoDisposeProviderRef; /// See also [_timePointOffset]. @ProviderFor(_timePointOffset) @@ -633,11 +871,11 @@ class _TimePointOffsetFamily extends Family { class _TimePointOffsetProvider extends AutoDisposeProvider { /// See also [_timePointOffset]. _TimePointOffsetProvider( - this.frame, - this.widgetWidth, - ) : super.internal( + int frame, + double widgetWidth, + ) : this._internal( (ref) => _timePointOffset( - ref, + ref as _TimePointOffsetRef, frame, widgetWidth, ), @@ -650,11 +888,48 @@ class _TimePointOffsetProvider extends AutoDisposeProvider { dependencies: _TimePointOffsetFamily._dependencies, allTransitiveDependencies: _TimePointOffsetFamily._allTransitiveDependencies, + frame: frame, + widgetWidth: widgetWidth, ); + _TimePointOffsetProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.frame, + required this.widgetWidth, + }) : super.internal(); + final int frame; final double widgetWidth; + @override + Override overrideWith( + double Function(_TimePointOffsetRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _TimePointOffsetProvider._internal( + (ref) => create(ref as _TimePointOffsetRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + frame: frame, + widgetWidth: widgetWidth, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _TimePointOffsetProviderElement(this); + } + @override bool operator ==(Object other) { return other is _TimePointOffsetProvider && @@ -672,6 +947,24 @@ class _TimePointOffsetProvider extends AutoDisposeProvider { } } +mixin _TimePointOffsetRef on AutoDisposeProviderRef { + /// The parameter `frame` of this provider. + int get frame; + + /// The parameter `widgetWidth` of this provider. + double get widgetWidth; +} + +class _TimePointOffsetProviderElement extends AutoDisposeProviderElement + with _TimePointOffsetRef { + _TimePointOffsetProviderElement(super.provider); + + @override + int get frame => (origin as _TimePointOffsetProvider).frame; + @override + double get widgetWidth => (origin as _TimePointOffsetProvider).widgetWidth; +} + String _$trackBackgroundFractionModifierHash() => r'e0aaee2ac472bad0bf9777a0ca67ead08a2351b3'; @@ -707,7 +1000,6 @@ final _trackBackgroundLinesProvider = typedef _TrackBackgroundLinesRef = AutoDisposeProviderRef>; String _$frameStartOffsetHash() => r'13381822c602dddec85110a9b1c3855a47c07172'; -typedef _FrameStartOffsetRef = AutoDisposeProviderRef; /// See also [_frameStartOffset]. @ProviderFor(_frameStartOffset) @@ -755,10 +1047,10 @@ class _FrameStartOffsetFamily extends Family { class _FrameStartOffsetProvider extends AutoDisposeProvider { /// See also [_frameStartOffset]. _FrameStartOffsetProvider( - this.frame, - ) : super.internal( + int frame, + ) : this._internal( (ref) => _frameStartOffset( - ref, + ref as _FrameStartOffsetRef, frame, ), from: _frameStartOffsetProvider, @@ -770,10 +1062,44 @@ class _FrameStartOffsetProvider extends AutoDisposeProvider { dependencies: _FrameStartOffsetFamily._dependencies, allTransitiveDependencies: _FrameStartOffsetFamily._allTransitiveDependencies, + frame: frame, ); + _FrameStartOffsetProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.frame, + }) : super.internal(); + final int frame; + @override + Override overrideWith( + double Function(_FrameStartOffsetRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _FrameStartOffsetProvider._internal( + (ref) => create(ref as _FrameStartOffsetRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + frame: frame, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _FrameStartOffsetProviderElement(this); + } + @override bool operator ==(Object other) { return other is _FrameStartOffsetProvider && other.frame == frame; @@ -788,8 +1114,20 @@ class _FrameStartOffsetProvider extends AutoDisposeProvider { } } +mixin _FrameStartOffsetRef on AutoDisposeProviderRef { + /// The parameter `frame` of this provider. + int get frame; +} + +class _FrameStartOffsetProviderElement + extends AutoDisposeProviderElement with _FrameStartOffsetRef { + _FrameStartOffsetProviderElement(super.provider); + + @override + int get frame => (origin as _FrameStartOffsetProvider).frame; +} + String _$frameEndOffsetHash() => r'23292b810d25146945a92761725780a6c01c5616'; -typedef _FrameEndOffsetRef = AutoDisposeProviderRef; /// See also [_frameEndOffset]. @ProviderFor(_frameEndOffset) @@ -837,10 +1175,10 @@ class _FrameEndOffsetFamily extends Family { class _FrameEndOffsetProvider extends AutoDisposeProvider { /// See also [_frameEndOffset]. _FrameEndOffsetProvider( - this.frame, - ) : super.internal( + int frame, + ) : this._internal( (ref) => _frameEndOffset( - ref, + ref as _FrameEndOffsetRef, frame, ), from: _frameEndOffsetProvider, @@ -852,10 +1190,44 @@ class _FrameEndOffsetProvider extends AutoDisposeProvider { dependencies: _FrameEndOffsetFamily._dependencies, allTransitiveDependencies: _FrameEndOffsetFamily._allTransitiveDependencies, + frame: frame, ); + _FrameEndOffsetProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.frame, + }) : super.internal(); + final int frame; + @override + Override overrideWith( + double Function(_FrameEndOffsetRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _FrameEndOffsetProvider._internal( + (ref) => create(ref as _FrameEndOffsetRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + frame: frame, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _FrameEndOffsetProviderElement(this); + } + @override bool operator ==(Object other) { return other is _FrameEndOffsetProvider && other.frame == frame; @@ -870,8 +1242,20 @@ class _FrameEndOffsetProvider extends AutoDisposeProvider { } } +mixin _FrameEndOffsetRef on AutoDisposeProviderRef { + /// The parameter `frame` of this provider. + int get frame; +} + +class _FrameEndOffsetProviderElement extends AutoDisposeProviderElement + with _FrameEndOffsetRef { + _FrameEndOffsetProviderElement(super.provider); + + @override + int get frame => (origin as _FrameEndOffsetProvider).frame; +} + String _$showThumbsHash() => r'54d29c90b44317760879cbb63656a53fd73cced4'; -typedef _ShowThumbsRef = AutoDisposeProviderRef; /// See also [_showThumbs]. @ProviderFor(_showThumbs) @@ -922,11 +1306,11 @@ class _ShowThumbsFamily extends Family { class _ShowThumbsProvider extends AutoDisposeProvider { /// See also [_showThumbs]. _ShowThumbsProvider( - this.startFrame, - this.endFrame, - ) : super.internal( + int startFrame, + int endFrame, + ) : this._internal( (ref) => _showThumbs( - ref, + ref as _ShowThumbsRef, startFrame, endFrame, ), @@ -939,11 +1323,48 @@ class _ShowThumbsProvider extends AutoDisposeProvider { dependencies: _ShowThumbsFamily._dependencies, allTransitiveDependencies: _ShowThumbsFamily._allTransitiveDependencies, + startFrame: startFrame, + endFrame: endFrame, ); + _ShowThumbsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.startFrame, + required this.endFrame, + }) : super.internal(); + final int startFrame; final int endFrame; + @override + Override overrideWith( + bool Function(_ShowThumbsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _ShowThumbsProvider._internal( + (ref) => create(ref as _ShowThumbsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + startFrame: startFrame, + endFrame: endFrame, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _ShowThumbsProviderElement(this); + } + @override bool operator ==(Object other) { return other is _ShowThumbsProvider && @@ -961,6 +1382,24 @@ class _ShowThumbsProvider extends AutoDisposeProvider { } } +mixin _ShowThumbsRef on AutoDisposeProviderRef { + /// The parameter `startFrame` of this provider. + int get startFrame; + + /// The parameter `endFrame` of this provider. + int get endFrame; +} + +class _ShowThumbsProviderElement extends AutoDisposeProviderElement + with _ShowThumbsRef { + _ShowThumbsProviderElement(super.provider); + + @override + int get startFrame => (origin as _ShowThumbsProvider).startFrame; + @override + int get endFrame => (origin as _ShowThumbsProvider).endFrame; +} + String _$inspectingSegmentHash() => r'd7155fa87adad4c7e894d76ec98a91c9096f7632'; /// See also [inspectingSegment]. @@ -993,7 +1432,6 @@ final _ignoreEntryFieldsProvider = AutoDisposeProvider>.internal( typedef _IgnoreEntryFieldsRef = AutoDisposeProviderRef>; String _$entryContextActionsHash() => r'28cdf01b3a0ee4838ebb303ef475c14c090b88c1'; -typedef _EntryContextActionsRef = AutoDisposeProviderRef>; /// See also [_entryContextActions]. @ProviderFor(_entryContextActions) @@ -1042,10 +1480,10 @@ class _EntryContextActionsProvider extends AutoDisposeProvider> { /// See also [_entryContextActions]. _EntryContextActionsProvider( - this.entryId, - ) : super.internal( + String entryId, + ) : this._internal( (ref) => _entryContextActions( - ref, + ref as _EntryContextActionsRef, entryId, ), from: _entryContextActionsProvider, @@ -1057,10 +1495,44 @@ class _EntryContextActionsProvider dependencies: _EntryContextActionsFamily._dependencies, allTransitiveDependencies: _EntryContextActionsFamily._allTransitiveDependencies, + entryId: entryId, ); + _EntryContextActionsProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.entryId, + }) : super.internal(); + final String entryId; + @override + Override overrideWith( + List Function(_EntryContextActionsRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _EntryContextActionsProvider._internal( + (ref) => create(ref as _EntryContextActionsRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + entryId: entryId, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _EntryContextActionsProviderElement(this); + } + @override bool operator ==(Object other) { return other is _EntryContextActionsProvider && other.entryId == entryId; @@ -1075,6 +1547,20 @@ class _EntryContextActionsProvider } } +mixin _EntryContextActionsRef on AutoDisposeProviderRef> { + /// The parameter `entryId` of this provider. + String get entryId; +} + +class _EntryContextActionsProviderElement + extends AutoDisposeProviderElement> + with _EntryContextActionsRef { + _EntryContextActionsProviderElement(super.provider); + + @override + String get entryId => (origin as _EntryContextActionsProvider).entryId; +} + String _$segmentFieldsHash() => r'50de8ece747eb6fbdd3c504f30873d7546d54b50'; /// See also [_segmentFields]. @@ -1091,4 +1577,4 @@ final _segmentFieldsProvider = AutoDisposeProvider.internal( typedef _SegmentFieldsRef = AutoDisposeProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/entries_graph.g.dart b/app/lib/widgets/components/app/entries_graph.g.dart index f01cc6b20e..8ab4d22fc6 100644 --- a/app/lib/widgets/components/app/entries_graph.g.dart +++ b/app/lib/widgets/components/app/entries_graph.g.dart @@ -51,4 +51,4 @@ final graphProvider = AutoDisposeProvider.internal( typedef GraphRef = AutoDisposeProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/entry_node.dart b/app/lib/widgets/components/app/entry_node.dart index 26b3dba474..028cfe67a6 100644 --- a/app/lib/widgets/components/app/entry_node.dart +++ b/app/lib/widgets/components/app/entry_node.dart @@ -347,7 +347,7 @@ class ExternalEntryNode extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final blueprint = ref.watch(entryBlueprintProvider(entry.type)); final page = ref.watch(pageProvider(pageId)); - final pageName = page?.name.formatted ?? "Unknown page"; + final pageName = page?.pageName.formatted ?? "Unknown page"; final isSelectingEntries = ref.watch(isSelectingEntriesProvider); if (blueprint == null) { diff --git a/app/lib/widgets/components/app/entry_node.g.dart b/app/lib/widgets/components/app/entry_node.g.dart index 6d23aa0dd5..7669484a66 100644 --- a/app/lib/widgets/components/app/entry_node.g.dart +++ b/app/lib/widgets/components/app/entry_node.g.dart @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef _WritersRef = AutoDisposeProviderRef>; - /// See also [_writers]. @ProviderFor(_writers) const _writersProvider = _WritersFamily(); @@ -77,10 +75,10 @@ class _WritersFamily extends Family> { class _WritersProvider extends AutoDisposeProvider> { /// See also [_writers]. _WritersProvider( - this.id, - ) : super.internal( + String id, + ) : this._internal( (ref) => _writers( - ref, + ref as _WritersRef, id, ), from: _writersProvider, @@ -91,10 +89,44 @@ class _WritersProvider extends AutoDisposeProvider> { : _$writersHash, dependencies: _WritersFamily._dependencies, allTransitiveDependencies: _WritersFamily._allTransitiveDependencies, + id: id, ); + _WritersProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.id, + }) : super.internal(); + final String id; + @override + Override overrideWith( + List Function(_WritersRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _WritersProvider._internal( + (ref) => create(ref as _WritersRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + id: id, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _WritersProviderElement(this); + } + @override bool operator ==(Object other) { return other is _WritersProvider && other.id == id; @@ -108,5 +140,18 @@ class _WritersProvider extends AutoDisposeProvider> { return _SystemHash.finish(hash); } } + +mixin _WritersRef on AutoDisposeProviderRef> { + /// The parameter `id` of this provider. + String get id; +} + +class _WritersProviderElement extends AutoDisposeProviderElement> + with _WritersRef { + _WritersProviderElement(super.provider); + + @override + String get id => (origin as _WritersProvider).id; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/entry_search.dart b/app/lib/widgets/components/app/entry_search.dart index ac09254fb2..acb1ef07fb 100644 --- a/app/lib/widgets/components/app/entry_search.dart +++ b/app/lib/widgets/components/app/entry_search.dart @@ -88,7 +88,7 @@ Fuzzy _fuzzyEntries(_FuzzyEntriesRef ref) { final blueprint = ref.watch(entryBlueprintProvider(entry.type)); if (blueprint == null) return null; return EntryDefinition( - pageId: page.name, + pageId: page.pageName, blueprint: blueprint, entry: entry, ); @@ -99,7 +99,10 @@ Fuzzy _fuzzyEntries(_FuzzyEntriesRef ref) { definitions, options: FuzzyOptions( threshold: 0.4, - sortFn: (a, b) => a.matches.map((e) => e.score).sum.compareTo(b.matches.map((e) => e.score).sum), + sortFn: (a, b) => a.matches + .map((e) => e.score) + .sum + .compareTo(b.matches.map((e) => e.score).sum), // tokenize: true, // verbose: true, keys: [ @@ -143,7 +146,10 @@ Fuzzy _fuzzyBlueprints(_FuzzyBlueprintsRef ref) { blueprints, options: FuzzyOptions( threshold: 0.3, - sortFn: (a, b) => a.matches.map((e) => e.score).sum.compareTo(b.matches.map((e) => e.score).sum), + sortFn: (a, b) => a.matches + .map((e) => e.score) + .sum + .compareTo(b.matches.map((e) => e.score).sum), keys: [ WeightedKey( name: "name", @@ -192,7 +198,9 @@ class NewEntryFetcher extends SearchFetcher { final results = fuzzy.search(search.query); - return results.map((result) => AddEntrySearchElement(result.item, onAdd: onAdd)).toList(); + return results + .map((result) => AddEntrySearchElement(result.item, onAdd: onAdd)) + .toList(); } @override @@ -286,7 +294,8 @@ class EntrySearchElement extends SearchElement { Widget icon(BuildContext context) => Icon(blueprint.icon); @override - Widget suffixIcon(BuildContext context) => const Icon(FontAwesomeIcons.upRightFromSquare); + Widget suffixIcon(BuildContext context) => + const Icon(FontAwesomeIcons.upRightFromSquare); @override String description(BuildContext context) => definition.pageId.formatted; @@ -314,7 +323,9 @@ class EntrySearchElement extends SearchElement { return await onSelect?.call(entry) ?? true; } - await ref.read(inspectingEntryIdProvider.notifier).navigateAndSelectEntry(ref, entry.id); + await ref + .read(inspectingEntryIdProvider.notifier) + .navigateAndSelectEntry(ref, entry.id); return true; } } @@ -364,11 +375,17 @@ class AddEntrySearchElement extends SearchElement { final page = ref.read(currentPageProvider); if (page == null) return false; if (!page.canHave(blueprint)) { - Toasts.showError(ref, "Could not create entry!", description: "Page does not support this of entry."); + Toasts.showError( + ref, + "Could not create entry!", + description: "Page does not support this of entry.", + ); return false; } final entry = await page.createEntryFromBlueprint(ref, blueprint); - await ref.read(inspectingEntryIdProvider.notifier).navigateAndSelectEntry(ref, entry.id); + await ref + .read(inspectingEntryIdProvider.notifier) + .navigateAndSelectEntry(ref, entry.id); return true; } } diff --git a/app/lib/widgets/components/app/entry_search.g.dart b/app/lib/widgets/components/app/entry_search.g.dart index d8188af268..b35dea0adf 100644 --- a/app/lib/widgets/components/app/entry_search.g.dart +++ b/app/lib/widgets/components/app/entry_search.g.dart @@ -6,7 +6,7 @@ part of 'entry_search.dart'; // RiverpodGenerator // ************************************************************************** -String _$fuzzyEntriesHash() => r'6756227c4786a11a956591903085d93d150d5bc0'; +String _$fuzzyEntriesHash() => r'1d568c290f729be65ce227d120a07a4b08b69880'; /// See also [_fuzzyEntries]. @ProviderFor(_fuzzyEntries) @@ -38,4 +38,4 @@ final _fuzzyBlueprintsProvider = typedef _FuzzyBlueprintsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/page_search.dart b/app/lib/widgets/components/app/page_search.dart index 7464d825d9..5d86f5ba3b 100644 --- a/app/lib/widgets/components/app/page_search.dart +++ b/app/lib/widgets/components/app/page_search.dart @@ -45,12 +45,15 @@ Fuzzy _fuzzyPages(_FuzzyPagesRef ref) { pages, options: FuzzyOptions( threshold: 0.4, - sortFn: (a, b) => a.matches.map((e) => e.score).sum.compareTo(b.matches.map((e) => e.score).sum), + sortFn: (a, b) => a.matches + .map((e) => e.score) + .sum + .compareTo(b.matches.map((e) => e.score).sum), keys: [ WeightedKey( name: "name", weight: 0.8, - getter: (page) => page.name.formatted, + getter: (page) => page.pageName.formatted, ), WeightedKey( name: "type", @@ -149,7 +152,7 @@ class PageSearchElement extends SearchElement { final FutureOr Function(Page)? onSelect; @override - String get title => page.name.formatted; + String get title => page.pageName.formatted; @override String description(BuildContext context) => page.type.name; @@ -180,7 +183,7 @@ class PageSearchElement extends SearchElement { return await onSelect?.call(page) ?? true; } - await ref.read(appRouter).navigateToPage(ref, page.name); + await ref.read(appRouter).navigateToPage(ref, page.pageName); return true; } } @@ -221,7 +224,8 @@ class AddPageSearchElement extends SearchElement { Future activate(BuildContext context, PassingRef ref) async { final pageName = await showDialog( context: context, - builder: (context) => AddPageDialogue(fixedType: type, autoNavigate: false), + builder: (context) => + AddPageDialogue(fixedType: type, autoNavigate: false), ); if (pageName == null) return false; diff --git a/app/lib/widgets/components/app/page_search.g.dart b/app/lib/widgets/components/app/page_search.g.dart index 7d40c04acc..c5d85eb5d3 100644 --- a/app/lib/widgets/components/app/page_search.g.dart +++ b/app/lib/widgets/components/app/page_search.g.dart @@ -6,7 +6,7 @@ part of 'page_search.dart'; // RiverpodGenerator // ************************************************************************** -String _$fuzzyPagesHash() => r'cb1e8c4f005cd6cde3f1ac7d9aff7cee9e56d66a'; +String _$fuzzyPagesHash() => r'ddc5e584006a43f6159387453a42f260697990c4'; /// See also [_fuzzyPages]. @ProviderFor(_fuzzyPages) @@ -21,4 +21,4 @@ final _fuzzyPagesProvider = AutoDisposeProvider>.internal( typedef _FuzzyPagesRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/search_bar.freezed.dart b/app/lib/widgets/components/app/search_bar.freezed.dart index 508c4043c5..9936a402e0 100644 --- a/app/lib/widgets/components/app/search_bar.freezed.dart +++ b/app/lib/widgets/components/app/search_bar.freezed.dart @@ -77,9 +77,10 @@ class _$SearchCopyWithImpl<$Res, $Val extends Search> } /// @nodoc -abstract class _$$_SearchCopyWith<$Res> implements $SearchCopyWith<$Res> { - factory _$$_SearchCopyWith(_$_Search value, $Res Function(_$_Search) then) = - __$$_SearchCopyWithImpl<$Res>; +abstract class _$$SearchImplCopyWith<$Res> implements $SearchCopyWith<$Res> { + factory _$$SearchImplCopyWith( + _$SearchImpl value, $Res Function(_$SearchImpl) then) = + __$$SearchImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -90,10 +91,11 @@ abstract class _$$_SearchCopyWith<$Res> implements $SearchCopyWith<$Res> { } /// @nodoc -class __$$_SearchCopyWithImpl<$Res> - extends _$SearchCopyWithImpl<$Res, _$_Search> - implements _$$_SearchCopyWith<$Res> { - __$$_SearchCopyWithImpl(_$_Search _value, $Res Function(_$_Search) _then) +class __$$SearchImplCopyWithImpl<$Res> + extends _$SearchCopyWithImpl<$Res, _$SearchImpl> + implements _$$SearchImplCopyWith<$Res> { + __$$SearchImplCopyWithImpl( + _$SearchImpl _value, $Res Function(_$SearchImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -104,7 +106,7 @@ class __$$_SearchCopyWithImpl<$Res> Object? filters = null, Object? onEnd = freezed, }) { - return _then(_$_Search( + return _then(_$SearchImpl( query: null == query ? _value.query : query // ignore: cast_nullable_to_non_nullable @@ -127,8 +129,8 @@ class __$$_SearchCopyWithImpl<$Res> /// @nodoc -class _$_Search implements _Search { - const _$_Search( +class _$SearchImpl implements _Search { + const _$SearchImpl( {this.query = "", final List fetchers = const [], final List filters = const [], @@ -169,7 +171,7 @@ class _$_Search implements _Search { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Search && + other is _$SearchImpl && (identical(other.query, query) || other.query == query) && const DeepCollectionEquality().equals(other._fetchers, _fetchers) && const DeepCollectionEquality().equals(other._filters, _filters) && @@ -187,8 +189,8 @@ class _$_Search implements _Search { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_SearchCopyWith<_$_Search> get copyWith => - __$$_SearchCopyWithImpl<_$_Search>(this, _$identity); + _$$SearchImplCopyWith<_$SearchImpl> get copyWith => + __$$SearchImplCopyWithImpl<_$SearchImpl>(this, _$identity); } abstract class _Search implements Search { @@ -196,7 +198,7 @@ abstract class _Search implements Search { {final String query, final List fetchers, final List filters, - final dynamic Function()? onEnd}) = _$_Search; + final dynamic Function()? onEnd}) = _$SearchImpl; @override String get query; @@ -208,6 +210,6 @@ abstract class _Search implements Search { dynamic Function()? get onEnd; @override @JsonKey(ignore: true) - _$$_SearchCopyWith<_$_Search> get copyWith => + _$$SearchImplCopyWith<_$SearchImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/widgets/components/app/search_bar.g.dart b/app/lib/widgets/components/app/search_bar.g.dart index a5b6aa15f8..a84a933f65 100644 --- a/app/lib/widgets/components/app/search_bar.g.dart +++ b/app/lib/widgets/components/app/search_bar.g.dart @@ -57,8 +57,7 @@ String _$searchGlobalKeysHash() => r'bdabd3beff37b339bab7032a03c48a3714ac500f'; /// See also [searchGlobalKeys]. @ProviderFor(searchGlobalKeys) -final searchGlobalKeysProvider = - AutoDisposeProvider>>>.internal( +final searchGlobalKeysProvider = AutoDisposeProvider>.internal( searchGlobalKeys, name: r'searchGlobalKeysProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') @@ -68,8 +67,7 @@ final searchGlobalKeysProvider = allTransitiveDependencies: null, ); -typedef SearchGlobalKeysRef - = AutoDisposeProviderRef>>>; +typedef SearchGlobalKeysRef = AutoDisposeProviderRef>; String _$searchFocusNodesHash() => r'e8f229dddc824b6f24244adcd4193ae40daed175'; /// See also [searchFocusNodes]. @@ -134,4 +132,4 @@ final _searchActionsProvider = AutoDisposeProvider>.internal( typedef _SearchActionsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/select_entries.dart b/app/lib/widgets/components/app/select_entries.dart index 191ec5110a..6a0ff0e1ad 100644 --- a/app/lib/widgets/components/app/select_entries.dart +++ b/app/lib/widgets/components/app/select_entries.dart @@ -14,7 +14,8 @@ import "package:typewriter/widgets/components/general/filled_button.dart"; part "select_entries.freezed.dart"; part "select_entries.g.dart"; -final entrySelectionProvider = StateNotifierProvider.autoDispose((ref) { +final entrySelectionProvider = StateNotifierProvider.autoDispose< + EntriesSelectionNotifier, EntriesSelection?>((ref) { return EntriesSelectionNotifier(ref); }); @@ -44,7 +45,8 @@ bool canSelectEntry(CanSelectEntryRef ref, String id) { if (selection.excludedEntries.contains(id)) { return false; } - final entryType = ref.watch(globalEntryProvider(id).select((entry) => entry?.type)); + final entryType = + ref.watch(globalEntryProvider(id).select((entry) => entry?.type)); if (entryType == null) { return false; } @@ -112,13 +114,19 @@ class EntriesSelectionNotifier extends StateNotifier { } void selectEntry(String entryId) { - _modifySelection((selection) => selection.copyWith(selectedEntries: [...selection.selectedEntries, entryId])); + _modifySelection( + (selection) => selection.copyWith( + selectedEntries: [...selection.selectedEntries, entryId], + ), + ); } void unselectEntry(String entryId) { _modifySelection( - (selection) => - selection.copyWith(selectedEntries: selection.selectedEntries.where((id) => id != entryId).toList()), + (selection) => selection.copyWith( + selectedEntries: + selection.selectedEntries.where((id) => id != entryId).toList(), + ), ); } @@ -182,7 +190,8 @@ class EntriesSelectorInspector extends HookConsumerWidget { return Actions( actions: { ActivateIntent: CallbackAction(onInvoke: (intent) => _finish(ref)), - ButtonActivateIntent: CallbackAction(onInvoke: (intent) => _finish(ref)), + ButtonActivateIntent: + CallbackAction(onInvoke: (intent) => _finish(ref)), DismissIntent: CallbackAction(onInvoke: (intent) => _cancel(ref)), }, child: Padding( @@ -193,7 +202,10 @@ class EntriesSelectorInspector extends HookConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 16), - Text("Selected $tag", style: Theme.of(context).textTheme.titleLarge), + Text( + "Selected $tag", + style: Theme.of(context).textTheme.titleLarge, + ), const SizedBox(height: 12), Text( "Click on any $tag in the editor to (un)select it.\n\nHere you can see the list of selected ${tag}s:", @@ -229,7 +241,7 @@ class EntriesSelectorInspector extends HookConsumerWidget { } class _EntriesSelectorList extends HookConsumerWidget { - const _EntriesSelectorList({super.key}); + const _EntriesSelectorList(); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/app/lib/widgets/components/app/select_entries.freezed.dart b/app/lib/widgets/components/app/select_entries.freezed.dart index 10ac8b1274..ce81a29293 100644 --- a/app/lib/widgets/components/app/select_entries.freezed.dart +++ b/app/lib/widgets/components/app/select_entries.freezed.dart @@ -80,11 +80,11 @@ class _$EntriesSelectionCopyWithImpl<$Res, $Val extends EntriesSelection> } /// @nodoc -abstract class _$$_EntriesSelectionCopyWith<$Res> +abstract class _$$EntriesSelectionImplCopyWith<$Res> implements $EntriesSelectionCopyWith<$Res> { - factory _$$_EntriesSelectionCopyWith( - _$_EntriesSelection value, $Res Function(_$_EntriesSelection) then) = - __$$_EntriesSelectionCopyWithImpl<$Res>; + factory _$$EntriesSelectionImplCopyWith(_$EntriesSelectionImpl value, + $Res Function(_$EntriesSelectionImpl) then) = + __$$EntriesSelectionImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -95,11 +95,11 @@ abstract class _$$_EntriesSelectionCopyWith<$Res> } /// @nodoc -class __$$_EntriesSelectionCopyWithImpl<$Res> - extends _$EntriesSelectionCopyWithImpl<$Res, _$_EntriesSelection> - implements _$$_EntriesSelectionCopyWith<$Res> { - __$$_EntriesSelectionCopyWithImpl( - _$_EntriesSelection _value, $Res Function(_$_EntriesSelection) _then) +class __$$EntriesSelectionImplCopyWithImpl<$Res> + extends _$EntriesSelectionCopyWithImpl<$Res, _$EntriesSelectionImpl> + implements _$$EntriesSelectionImplCopyWith<$Res> { + __$$EntriesSelectionImplCopyWithImpl(_$EntriesSelectionImpl _value, + $Res Function(_$EntriesSelectionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -110,7 +110,7 @@ class __$$_EntriesSelectionCopyWithImpl<$Res> Object? excludedEntries = null, Object? onSelectionChanged = freezed, }) { - return _then(_$_EntriesSelection( + return _then(_$EntriesSelectionImpl( tag: null == tag ? _value.tag : tag // ignore: cast_nullable_to_non_nullable @@ -133,8 +133,8 @@ class __$$_EntriesSelectionCopyWithImpl<$Res> /// @nodoc -class _$_EntriesSelection implements _EntriesSelection { - const _$_EntriesSelection( +class _$EntriesSelectionImpl implements _EntriesSelection { + const _$EntriesSelectionImpl( {required this.tag, required final List selectedEntries, final List excludedEntries = const [], @@ -173,7 +173,7 @@ class _$_EntriesSelection implements _EntriesSelection { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_EntriesSelection && + other is _$EntriesSelectionImpl && (identical(other.tag, tag) || other.tag == tag) && const DeepCollectionEquality() .equals(other._selectedEntries, _selectedEntries) && @@ -194,8 +194,9 @@ class _$_EntriesSelection implements _EntriesSelection { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_EntriesSelectionCopyWith<_$_EntriesSelection> get copyWith => - __$$_EntriesSelectionCopyWithImpl<_$_EntriesSelection>(this, _$identity); + _$$EntriesSelectionImplCopyWith<_$EntriesSelectionImpl> get copyWith => + __$$EntriesSelectionImplCopyWithImpl<_$EntriesSelectionImpl>( + this, _$identity); } abstract class _EntriesSelection implements EntriesSelection { @@ -204,7 +205,7 @@ abstract class _EntriesSelection implements EntriesSelection { required final List selectedEntries, final List excludedEntries, final dynamic Function(Ref, List)? - onSelectionChanged}) = _$_EntriesSelection; + onSelectionChanged}) = _$EntriesSelectionImpl; @override String get tag; @@ -216,6 +217,6 @@ abstract class _EntriesSelection implements EntriesSelection { dynamic Function(Ref, List)? get onSelectionChanged; @override @JsonKey(ignore: true) - _$$_EntriesSelectionCopyWith<_$_EntriesSelection> get copyWith => + _$$EntriesSelectionImplCopyWith<_$EntriesSelectionImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/widgets/components/app/select_entries.g.dart b/app/lib/widgets/components/app/select_entries.g.dart index 330399b30b..1dae7a9751 100644 --- a/app/lib/widgets/components/app/select_entries.g.dart +++ b/app/lib/widgets/components/app/select_entries.g.dart @@ -46,8 +46,6 @@ class _SystemHash { } } -typedef HasEntryInSelectionRef = AutoDisposeProviderRef; - /// See also [hasEntryInSelection]. @ProviderFor(hasEntryInSelection) const hasEntryInSelectionProvider = HasEntryInSelectionFamily(); @@ -94,10 +92,10 @@ class HasEntryInSelectionFamily extends Family { class HasEntryInSelectionProvider extends AutoDisposeProvider { /// See also [hasEntryInSelection]. HasEntryInSelectionProvider( - this.id, - ) : super.internal( + String id, + ) : this._internal( (ref) => hasEntryInSelection( - ref, + ref as HasEntryInSelectionRef, id, ), from: hasEntryInSelectionProvider, @@ -109,10 +107,44 @@ class HasEntryInSelectionProvider extends AutoDisposeProvider { dependencies: HasEntryInSelectionFamily._dependencies, allTransitiveDependencies: HasEntryInSelectionFamily._allTransitiveDependencies, + id: id, ); + HasEntryInSelectionProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.id, + }) : super.internal(); + final String id; + @override + Override overrideWith( + bool Function(HasEntryInSelectionRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: HasEntryInSelectionProvider._internal( + (ref) => create(ref as HasEntryInSelectionRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + id: id, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _HasEntryInSelectionProviderElement(this); + } + @override bool operator ==(Object other) { return other is HasEntryInSelectionProvider && other.id == id; @@ -127,6 +159,19 @@ class HasEntryInSelectionProvider extends AutoDisposeProvider { } } +mixin HasEntryInSelectionRef on AutoDisposeProviderRef { + /// The parameter `id` of this provider. + String get id; +} + +class _HasEntryInSelectionProviderElement + extends AutoDisposeProviderElement with HasEntryInSelectionRef { + _HasEntryInSelectionProviderElement(super.provider); + + @override + String get id => (origin as HasEntryInSelectionProvider).id; +} + String _$selectingTagHash() => r'e22363af393fbc3ddb3ad07ab830c863da440dfa'; /// See also [selectingTag]. @@ -142,7 +187,6 @@ final selectingTagProvider = AutoDisposeProvider.internal( typedef SelectingTagRef = AutoDisposeProviderRef; String _$canSelectEntryHash() => r'071b3e46373b5397bd8d56e24e309cce442f5624'; -typedef CanSelectEntryRef = AutoDisposeProviderRef; /// See also [canSelectEntry]. @ProviderFor(canSelectEntry) @@ -190,10 +234,10 @@ class CanSelectEntryFamily extends Family { class CanSelectEntryProvider extends AutoDisposeProvider { /// See also [canSelectEntry]. CanSelectEntryProvider( - this.id, - ) : super.internal( + String id, + ) : this._internal( (ref) => canSelectEntry( - ref, + ref as CanSelectEntryRef, id, ), from: canSelectEntryProvider, @@ -205,10 +249,44 @@ class CanSelectEntryProvider extends AutoDisposeProvider { dependencies: CanSelectEntryFamily._dependencies, allTransitiveDependencies: CanSelectEntryFamily._allTransitiveDependencies, + id: id, ); + CanSelectEntryProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.id, + }) : super.internal(); + final String id; + @override + Override overrideWith( + bool Function(CanSelectEntryRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: CanSelectEntryProvider._internal( + (ref) => create(ref as CanSelectEntryRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + id: id, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _CanSelectEntryProviderElement(this); + } + @override bool operator ==(Object other) { return other is CanSelectEntryProvider && other.id == id; @@ -222,5 +300,18 @@ class CanSelectEntryProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +mixin CanSelectEntryRef on AutoDisposeProviderRef { + /// The parameter `id` of this provider. + String get id; +} + +class _CanSelectEntryProviderElement extends AutoDisposeProviderElement + with CanSelectEntryRef { + _CanSelectEntryProviderElement(super.provider); + + @override + String get id => (origin as CanSelectEntryProvider).id; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/app/static_entries_list.g.dart b/app/lib/widgets/components/app/static_entries_list.g.dart index 0fa5162c6f..698121055e 100644 --- a/app/lib/widgets/components/app/static_entries_list.g.dart +++ b/app/lib/widgets/components/app/static_entries_list.g.dart @@ -22,4 +22,4 @@ final _staticEntryIdsProvider = AutoDisposeProvider>.internal( typedef _StaticEntryIdsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/components/general/outline_button.dart b/app/lib/widgets/components/general/outline_button.dart index 3e597fff54..d7748c752e 100644 --- a/app/lib/widgets/components/general/outline_button.dart +++ b/app/lib/widgets/components/general/outline_button.dart @@ -35,10 +35,12 @@ class OutlineButton extends HookConsumerWidget { style: OutlinedButton.styleFrom( foregroundColor: color ?? Theme.of(context).colorScheme.primary, side: BorderSide( - color: color?.withOpacity(0.6) ?? Theme.of(context).colorScheme.primary.withOpacity(0.6), + color: color?.withOpacity(0.6) ?? + Theme.of(context).colorScheme.primary.withOpacity(0.6), width: 2, ), - disabledBackgroundColor: color?.withOpacity(0.3) ?? Theme.of(context).colorScheme.primary.withOpacity(0.3), + disabledBackgroundColor: color?.withOpacity(0.3) ?? + Theme.of(context).colorScheme.primary.withOpacity(0.3), padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(8)), diff --git a/app/lib/widgets/components/general/toasts.freezed.dart b/app/lib/widgets/components/general/toasts.freezed.dart index b2b1cdca8a..84dffff643 100644 --- a/app/lib/widgets/components/general/toasts.freezed.dart +++ b/app/lib/widgets/components/general/toasts.freezed.dart @@ -141,9 +141,10 @@ class _$ToastCopyWithImpl<$Res, $Val extends Toast> } /// @nodoc -abstract class _$$_ToastCopyWith<$Res> implements $ToastCopyWith<$Res> { - factory _$$_ToastCopyWith(_$_Toast value, $Res Function(_$_Toast) then) = - __$$_ToastCopyWithImpl<$Res>; +abstract class _$$ToastImplCopyWith<$Res> implements $ToastCopyWith<$Res> { + factory _$$ToastImplCopyWith( + _$ToastImpl value, $Res Function(_$ToastImpl) then) = + __$$ToastImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -156,9 +157,11 @@ abstract class _$$_ToastCopyWith<$Res> implements $ToastCopyWith<$Res> { } /// @nodoc -class __$$_ToastCopyWithImpl<$Res> extends _$ToastCopyWithImpl<$Res, _$_Toast> - implements _$$_ToastCopyWith<$Res> { - __$$_ToastCopyWithImpl(_$_Toast _value, $Res Function(_$_Toast) _then) +class __$$ToastImplCopyWithImpl<$Res> + extends _$ToastCopyWithImpl<$Res, _$ToastImpl> + implements _$$ToastImplCopyWith<$Res> { + __$$ToastImplCopyWithImpl( + _$ToastImpl _value, $Res Function(_$ToastImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -171,7 +174,7 @@ class __$$_ToastCopyWithImpl<$Res> extends _$ToastCopyWithImpl<$Res, _$_Toast> Object? icon = null, Object? shownAt = freezed, }) { - return _then(_$_Toast( + return _then(_$ToastImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable @@ -202,8 +205,8 @@ class __$$_ToastCopyWithImpl<$Res> extends _$ToastCopyWithImpl<$Res, _$_Toast> /// @nodoc -class _$_Toast implements _Toast { - const _$_Toast( +class _$ToastImpl implements _Toast { + const _$ToastImpl( {required this.id, required this.message, this.description, @@ -235,7 +238,7 @@ class _$_Toast implements _Toast { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_Toast && + other is _$ToastImpl && (identical(other.id, id) || other.id == id) && (identical(other.message, message) || other.message == message) && (identical(other.description, description) || @@ -252,8 +255,8 @@ class _$_Toast implements _Toast { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_ToastCopyWith<_$_Toast> get copyWith => - __$$_ToastCopyWithImpl<_$_Toast>(this, _$identity); + _$$ToastImplCopyWith<_$ToastImpl> get copyWith => + __$$ToastImplCopyWithImpl<_$ToastImpl>(this, _$identity); @override @optionalTypeArgs @@ -337,7 +340,7 @@ abstract class _Toast implements Toast { final String? description, final Color color, final IconData icon, - final DateTime? shownAt}) = _$_Toast; + final DateTime? shownAt}) = _$ToastImpl; @override String get id; @@ -353,15 +356,16 @@ abstract class _Toast implements Toast { DateTime? get shownAt; @override @JsonKey(ignore: true) - _$$_ToastCopyWith<_$_Toast> get copyWith => + _$$ToastImplCopyWith<_$ToastImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$TemporaryToastCopyWith<$Res> implements $ToastCopyWith<$Res> { - factory _$$TemporaryToastCopyWith( - _$TemporaryToast value, $Res Function(_$TemporaryToast) then) = - __$$TemporaryToastCopyWithImpl<$Res>; +abstract class _$$TemporaryToastImplCopyWith<$Res> + implements $ToastCopyWith<$Res> { + factory _$$TemporaryToastImplCopyWith(_$TemporaryToastImpl value, + $Res Function(_$TemporaryToastImpl) then) = + __$$TemporaryToastImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -375,11 +379,11 @@ abstract class _$$TemporaryToastCopyWith<$Res> implements $ToastCopyWith<$Res> { } /// @nodoc -class __$$TemporaryToastCopyWithImpl<$Res> - extends _$ToastCopyWithImpl<$Res, _$TemporaryToast> - implements _$$TemporaryToastCopyWith<$Res> { - __$$TemporaryToastCopyWithImpl( - _$TemporaryToast _value, $Res Function(_$TemporaryToast) _then) +class __$$TemporaryToastImplCopyWithImpl<$Res> + extends _$ToastCopyWithImpl<$Res, _$TemporaryToastImpl> + implements _$$TemporaryToastImplCopyWith<$Res> { + __$$TemporaryToastImplCopyWithImpl( + _$TemporaryToastImpl _value, $Res Function(_$TemporaryToastImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -393,7 +397,7 @@ class __$$TemporaryToastCopyWithImpl<$Res> Object? duration = null, Object? shownAt = freezed, }) { - return _then(_$TemporaryToast( + return _then(_$TemporaryToastImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable @@ -428,8 +432,8 @@ class __$$TemporaryToastCopyWithImpl<$Res> /// @nodoc -class _$TemporaryToast implements TemporaryToast { - const _$TemporaryToast( +class _$TemporaryToastImpl implements TemporaryToast { + const _$TemporaryToastImpl( {required this.id, required this.message, this.description, @@ -465,7 +469,7 @@ class _$TemporaryToast implements TemporaryToast { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$TemporaryToast && + other is _$TemporaryToastImpl && (identical(other.id, id) || other.id == id) && (identical(other.message, message) || other.message == message) && (identical(other.description, description) || @@ -484,8 +488,9 @@ class _$TemporaryToast implements TemporaryToast { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$TemporaryToastCopyWith<_$TemporaryToast> get copyWith => - __$$TemporaryToastCopyWithImpl<_$TemporaryToast>(this, _$identity); + _$$TemporaryToastImplCopyWith<_$TemporaryToastImpl> get copyWith => + __$$TemporaryToastImplCopyWithImpl<_$TemporaryToastImpl>( + this, _$identity); @override @optionalTypeArgs @@ -572,7 +577,7 @@ abstract class TemporaryToast implements Toast { final Color color, final IconData icon, final Duration duration, - final DateTime? shownAt}) = _$TemporaryToast; + final DateTime? shownAt}) = _$TemporaryToastImpl; @override String get id; @@ -589,6 +594,6 @@ abstract class TemporaryToast implements Toast { DateTime? get shownAt; @override @JsonKey(ignore: true) - _$$TemporaryToastCopyWith<_$TemporaryToast> get copyWith => + _$$TemporaryToastImplCopyWith<_$TemporaryToastImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/widgets/components/general/tree_view.freezed.dart b/app/lib/widgets/components/general/tree_view.freezed.dart index ef592b077d..771c0f5eb1 100644 --- a/app/lib/widgets/components/general/tree_view.freezed.dart +++ b/app/lib/widgets/components/general/tree_view.freezed.dart @@ -81,20 +81,20 @@ class _$TreeNodeCopyWithImpl> } /// @nodoc -abstract class _$$RootTreeNodeCopyWith { - factory _$$RootTreeNodeCopyWith( - _$RootTreeNode value, $Res Function(_$RootTreeNode) then) = - __$$RootTreeNodeCopyWithImpl; +abstract class _$$RootTreeNodeImplCopyWith { + factory _$$RootTreeNodeImplCopyWith(_$RootTreeNodeImpl value, + $Res Function(_$RootTreeNodeImpl) then) = + __$$RootTreeNodeImplCopyWithImpl; @useResult $Res call({List> children}); } /// @nodoc -class __$$RootTreeNodeCopyWithImpl - extends _$TreeNodeCopyWithImpl> - implements _$$RootTreeNodeCopyWith { - __$$RootTreeNodeCopyWithImpl( - _$RootTreeNode _value, $Res Function(_$RootTreeNode) _then) +class __$$RootTreeNodeImplCopyWithImpl + extends _$TreeNodeCopyWithImpl> + implements _$$RootTreeNodeImplCopyWith { + __$$RootTreeNodeImplCopyWithImpl( + _$RootTreeNodeImpl _value, $Res Function(_$RootTreeNodeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -102,7 +102,7 @@ class __$$RootTreeNodeCopyWithImpl $Res call({ Object? children = null, }) { - return _then(_$RootTreeNode( + return _then(_$RootTreeNodeImpl( children: null == children ? _value._children : children // ignore: cast_nullable_to_non_nullable @@ -113,8 +113,8 @@ class __$$RootTreeNodeCopyWithImpl /// @nodoc -class _$RootTreeNode implements RootTreeNode { - const _$RootTreeNode({required final List> children}) +class _$RootTreeNodeImpl implements RootTreeNode { + const _$RootTreeNodeImpl({required final List> children}) : _children = children; final List> _children; @@ -134,7 +134,7 @@ class _$RootTreeNode implements RootTreeNode { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RootTreeNode && + other is _$RootTreeNodeImpl && const DeepCollectionEquality().equals(other._children, _children)); } @@ -145,8 +145,9 @@ class _$RootTreeNode implements RootTreeNode { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RootTreeNodeCopyWith> get copyWith => - __$$RootTreeNodeCopyWithImpl>(this, _$identity); + _$$RootTreeNodeImplCopyWith> get copyWith => + __$$RootTreeNodeImplCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -219,29 +220,29 @@ class _$RootTreeNode implements RootTreeNode { abstract class RootTreeNode implements TreeNode { const factory RootTreeNode({required final List> children}) = - _$RootTreeNode; + _$RootTreeNodeImpl; List> get children; @JsonKey(ignore: true) - _$$RootTreeNodeCopyWith> get copyWith => + _$$RootTreeNodeImplCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$InnerTreeNodeCopyWith { - factory _$$InnerTreeNodeCopyWith( - _$InnerTreeNode value, $Res Function(_$InnerTreeNode) then) = - __$$InnerTreeNodeCopyWithImpl; +abstract class _$$InnerTreeNodeImplCopyWith { + factory _$$InnerTreeNodeImplCopyWith(_$InnerTreeNodeImpl value, + $Res Function(_$InnerTreeNodeImpl) then) = + __$$InnerTreeNodeImplCopyWithImpl; @useResult $Res call({String name, List> children}); } /// @nodoc -class __$$InnerTreeNodeCopyWithImpl - extends _$TreeNodeCopyWithImpl> - implements _$$InnerTreeNodeCopyWith { - __$$InnerTreeNodeCopyWithImpl( - _$InnerTreeNode _value, $Res Function(_$InnerTreeNode) _then) +class __$$InnerTreeNodeImplCopyWithImpl + extends _$TreeNodeCopyWithImpl> + implements _$$InnerTreeNodeImplCopyWith { + __$$InnerTreeNodeImplCopyWithImpl(_$InnerTreeNodeImpl _value, + $Res Function(_$InnerTreeNodeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -250,7 +251,7 @@ class __$$InnerTreeNodeCopyWithImpl Object? name = null, Object? children = null, }) { - return _then(_$InnerTreeNode( + return _then(_$InnerTreeNodeImpl( name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -265,8 +266,8 @@ class __$$InnerTreeNodeCopyWithImpl /// @nodoc -class _$InnerTreeNode implements InnerTreeNode { - const _$InnerTreeNode( +class _$InnerTreeNodeImpl implements InnerTreeNode { + const _$InnerTreeNodeImpl( {required this.name, required final List> children}) : _children = children; @@ -289,7 +290,7 @@ class _$InnerTreeNode implements InnerTreeNode { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$InnerTreeNode && + other is _$InnerTreeNodeImpl && (identical(other.name, name) || other.name == name) && const DeepCollectionEquality().equals(other._children, _children)); } @@ -301,8 +302,9 @@ class _$InnerTreeNode implements InnerTreeNode { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InnerTreeNodeCopyWith> get copyWith => - __$$InnerTreeNodeCopyWithImpl>(this, _$identity); + _$$InnerTreeNodeImplCopyWith> get copyWith => + __$$InnerTreeNodeImplCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -376,30 +378,30 @@ class _$InnerTreeNode implements InnerTreeNode { abstract class InnerTreeNode implements TreeNode { const factory InnerTreeNode( {required final String name, - required final List> children}) = _$InnerTreeNode; + required final List> children}) = _$InnerTreeNodeImpl; String get name; List> get children; @JsonKey(ignore: true) - _$$InnerTreeNodeCopyWith> get copyWith => + _$$InnerTreeNodeImplCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$LeafTreeNodeCopyWith { - factory _$$LeafTreeNodeCopyWith( - _$LeafTreeNode value, $Res Function(_$LeafTreeNode) then) = - __$$LeafTreeNodeCopyWithImpl; +abstract class _$$LeafTreeNodeImplCopyWith { + factory _$$LeafTreeNodeImplCopyWith(_$LeafTreeNodeImpl value, + $Res Function(_$LeafTreeNodeImpl) then) = + __$$LeafTreeNodeImplCopyWithImpl; @useResult $Res call({T value}); } /// @nodoc -class __$$LeafTreeNodeCopyWithImpl - extends _$TreeNodeCopyWithImpl> - implements _$$LeafTreeNodeCopyWith { - __$$LeafTreeNodeCopyWithImpl( - _$LeafTreeNode _value, $Res Function(_$LeafTreeNode) _then) +class __$$LeafTreeNodeImplCopyWithImpl + extends _$TreeNodeCopyWithImpl> + implements _$$LeafTreeNodeImplCopyWith { + __$$LeafTreeNodeImplCopyWithImpl( + _$LeafTreeNodeImpl _value, $Res Function(_$LeafTreeNodeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -407,7 +409,7 @@ class __$$LeafTreeNodeCopyWithImpl $Res call({ Object? value = freezed, }) { - return _then(_$LeafTreeNode( + return _then(_$LeafTreeNodeImpl( value: freezed == value ? _value.value : value // ignore: cast_nullable_to_non_nullable @@ -418,8 +420,8 @@ class __$$LeafTreeNodeCopyWithImpl /// @nodoc -class _$LeafTreeNode implements LeafTreeNode { - const _$LeafTreeNode({required this.value}); +class _$LeafTreeNodeImpl implements LeafTreeNode { + const _$LeafTreeNodeImpl({required this.value}); @override final T value; @@ -433,7 +435,7 @@ class _$LeafTreeNode implements LeafTreeNode { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$LeafTreeNode && + other is _$LeafTreeNodeImpl && const DeepCollectionEquality().equals(other.value, value)); } @@ -444,8 +446,9 @@ class _$LeafTreeNode implements LeafTreeNode { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LeafTreeNodeCopyWith> get copyWith => - __$$LeafTreeNodeCopyWithImpl>(this, _$identity); + _$$LeafTreeNodeImplCopyWith> get copyWith => + __$$LeafTreeNodeImplCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -517,10 +520,10 @@ class _$LeafTreeNode implements LeafTreeNode { } abstract class LeafTreeNode implements TreeNode { - const factory LeafTreeNode({required final T value}) = _$LeafTreeNode; + const factory LeafTreeNode({required final T value}) = _$LeafTreeNodeImpl; T get value; @JsonKey(ignore: true) - _$$LeafTreeNodeCopyWith> get copyWith => + _$$LeafTreeNodeImplCopyWith> get copyWith => throw _privateConstructorUsedError; } diff --git a/app/lib/widgets/inspector/editors.g.dart b/app/lib/widgets/inspector/editors.g.dart index aee58d86aa..0fd21e91ab 100644 --- a/app/lib/widgets/inspector/editors.g.dart +++ b/app/lib/widgets/inspector/editors.g.dart @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef FieldValueRef = AutoDisposeProviderRef; - /// See also [fieldValue]. @ProviderFor(fieldValue) const fieldValueProvider = FieldValueFamily(); @@ -80,11 +78,11 @@ class FieldValueFamily extends Family { class FieldValueProvider extends AutoDisposeProvider { /// See also [fieldValue]. FieldValueProvider( - this.path, [ - this.defaultValue, - ]) : super.internal( + String path, [ + dynamic defaultValue, + ]) : this._internal( (ref) => fieldValue( - ref, + ref as FieldValueRef, path, defaultValue, ), @@ -97,11 +95,48 @@ class FieldValueProvider extends AutoDisposeProvider { dependencies: FieldValueFamily._dependencies, allTransitiveDependencies: FieldValueFamily._allTransitiveDependencies, + path: path, + defaultValue: defaultValue, ); + FieldValueProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.path, + required this.defaultValue, + }) : super.internal(); + final String path; final dynamic defaultValue; + @override + Override overrideWith( + dynamic Function(FieldValueRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: FieldValueProvider._internal( + (ref) => create(ref as FieldValueRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + path: path, + defaultValue: defaultValue, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _FieldValueProviderElement(this); + } + @override bool operator ==(Object other) { return other is FieldValueProvider && @@ -119,6 +154,24 @@ class FieldValueProvider extends AutoDisposeProvider { } } +mixin FieldValueRef on AutoDisposeProviderRef { + /// The parameter `path` of this provider. + String get path; + + /// The parameter `defaultValue` of this provider. + dynamic get defaultValue; +} + +class _FieldValueProviderElement extends AutoDisposeProviderElement + with FieldValueRef { + _FieldValueProviderElement(super.provider); + + @override + String get path => (origin as FieldValueProvider).path; + @override + dynamic get defaultValue => (origin as FieldValueProvider).defaultValue; +} + String _$editorFiltersHash() => r'82881dad4fc36c0d7950c7bee132cd91a6e0314a'; /// See also [editorFilters]. @@ -135,7 +188,6 @@ final editorFiltersProvider = AutoDisposeProvider>.internal( typedef EditorFiltersRef = AutoDisposeProviderRef>; String _$pathDisplayNameHash() => r'c772e17ed429169ba903826d0a5605d60b129a31'; -typedef PathDisplayNameRef = AutoDisposeProviderRef; /// See also [pathDisplayName]. @ProviderFor(pathDisplayName) @@ -183,10 +235,10 @@ class PathDisplayNameFamily extends Family { class PathDisplayNameProvider extends AutoDisposeProvider { /// See also [pathDisplayName]. PathDisplayNameProvider( - this.path, - ) : super.internal( + String path, + ) : this._internal( (ref) => pathDisplayName( - ref, + ref as PathDisplayNameRef, path, ), from: pathDisplayNameProvider, @@ -198,10 +250,44 @@ class PathDisplayNameProvider extends AutoDisposeProvider { dependencies: PathDisplayNameFamily._dependencies, allTransitiveDependencies: PathDisplayNameFamily._allTransitiveDependencies, + path: path, ); + PathDisplayNameProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.path, + }) : super.internal(); + final String path; + @override + Override overrideWith( + String Function(PathDisplayNameRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: PathDisplayNameProvider._internal( + (ref) => create(ref as PathDisplayNameRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + path: path, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _PathDisplayNameProviderElement(this); + } + @override bool operator ==(Object other) { return other is PathDisplayNameProvider && other.path == path; @@ -215,5 +301,18 @@ class PathDisplayNameProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +mixin PathDisplayNameRef on AutoDisposeProviderRef { + /// The parameter `path` of this provider. + String get path; +} + +class _PathDisplayNameProviderElement extends AutoDisposeProviderElement + with PathDisplayNameRef { + _PathDisplayNameProviderElement(super.provider); + + @override + String get path => (origin as PathDisplayNameProvider).path; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/editors/list.g.dart b/app/lib/widgets/inspector/editors/list.g.dart index 5c3a059e5c..39a97cf3b3 100644 --- a/app/lib/widgets/inspector/editors/list.g.dart +++ b/app/lib/widgets/inspector/editors/list.g.dart @@ -29,8 +29,6 @@ class _SystemHash { } } -typedef _ListValueLengthRef = AutoDisposeProviderRef; - /// See also [_listValueLength]. @ProviderFor(_listValueLength) const _listValueLengthProvider = _ListValueLengthFamily(); @@ -77,10 +75,10 @@ class _ListValueLengthFamily extends Family { class _ListValueLengthProvider extends AutoDisposeProvider { /// See also [_listValueLength]. _ListValueLengthProvider( - this.path, - ) : super.internal( + String path, + ) : this._internal( (ref) => _listValueLength( - ref, + ref as _ListValueLengthRef, path, ), from: _listValueLengthProvider, @@ -92,10 +90,44 @@ class _ListValueLengthProvider extends AutoDisposeProvider { dependencies: _ListValueLengthFamily._dependencies, allTransitiveDependencies: _ListValueLengthFamily._allTransitiveDependencies, + path: path, ); + _ListValueLengthProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.path, + }) : super.internal(); + final String path; + @override + Override overrideWith( + int Function(_ListValueLengthRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: _ListValueLengthProvider._internal( + (ref) => create(ref as _ListValueLengthRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + path: path, + ), + ); + } + + @override + AutoDisposeProviderElement createElement() { + return _ListValueLengthProviderElement(this); + } + @override bool operator ==(Object other) { return other is _ListValueLengthProvider && other.path == path; @@ -109,5 +141,18 @@ class _ListValueLengthProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +mixin _ListValueLengthRef on AutoDisposeProviderRef { + /// The parameter `path` of this provider. + String get path; +} + +class _ListValueLengthProviderElement extends AutoDisposeProviderElement + with _ListValueLengthRef { + _ListValueLengthProviderElement(super.provider); + + @override + String get path => (origin as _ListValueLengthProvider).path; +} // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/editors/material.g.dart b/app/lib/widgets/inspector/editors/material.g.dart index 56231eb446..d8579f31cc 100644 --- a/app/lib/widgets/inspector/editors/material.g.dart +++ b/app/lib/widgets/inspector/editors/material.g.dart @@ -30,8 +30,6 @@ class _SystemHash { } } -typedef MaterialPropertiesRef = AutoDisposeProviderRef>; - /// See also [materialProperties]. @ProviderFor(materialProperties) const materialPropertiesProvider = MaterialPropertiesFamily(); @@ -79,10 +77,10 @@ class MaterialPropertiesProvider extends AutoDisposeProvider> { /// See also [materialProperties]. MaterialPropertiesProvider( - this.meta, - ) : super.internal( + String meta, + ) : this._internal( (ref) => materialProperties( - ref, + ref as MaterialPropertiesRef, meta, ), from: materialPropertiesProvider, @@ -94,10 +92,44 @@ class MaterialPropertiesProvider dependencies: MaterialPropertiesFamily._dependencies, allTransitiveDependencies: MaterialPropertiesFamily._allTransitiveDependencies, + meta: meta, ); + MaterialPropertiesProvider._internal( + super._createNotifier, { + required super.name, + required super.dependencies, + required super.allTransitiveDependencies, + required super.debugGetCreateSourceHash, + required super.from, + required this.meta, + }) : super.internal(); + final String meta; + @override + Override overrideWith( + List Function(MaterialPropertiesRef provider) create, + ) { + return ProviderOverride( + origin: this, + override: MaterialPropertiesProvider._internal( + (ref) => create(ref as MaterialPropertiesRef), + from: from, + name: null, + dependencies: null, + allTransitiveDependencies: null, + debugGetCreateSourceHash: null, + meta: meta, + ), + ); + } + + @override + AutoDisposeProviderElement> createElement() { + return _MaterialPropertiesProviderElement(this); + } + @override bool operator ==(Object other) { return other is MaterialPropertiesProvider && other.meta == meta; @@ -112,12 +144,26 @@ class MaterialPropertiesProvider } } +mixin MaterialPropertiesRef on AutoDisposeProviderRef> { + /// The parameter `meta` of this provider. + String get meta; +} + +class _MaterialPropertiesProviderElement + extends AutoDisposeProviderElement> + with MaterialPropertiesRef { + _MaterialPropertiesProviderElement(super.provider); + + @override + String get meta => (origin as MaterialPropertiesProvider).meta; +} + String _$fuzzyMaterialsHash() => r'bfaa303c86894a2592b383e46588f82a7a8b7e6d'; /// See also [_fuzzyMaterials]. @ProviderFor(_fuzzyMaterials) final _fuzzyMaterialsProvider = - AutoDisposeProvider>>.internal( + AutoDisposeProvider>.internal( _fuzzyMaterials, name: r'_fuzzyMaterialsProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') @@ -127,7 +173,6 @@ final _fuzzyMaterialsProvider = allTransitiveDependencies: null, ); -typedef _FuzzyMaterialsRef - = AutoDisposeProviderRef>>; +typedef _FuzzyMaterialsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/editors/page_selector.dart b/app/lib/widgets/inspector/editors/page_selector.dart index 4133fe35d7..bb21336409 100644 --- a/app/lib/widgets/inspector/editors/page_selector.dart +++ b/app/lib/widgets/inspector/editors/page_selector.dart @@ -16,10 +16,13 @@ import "package:typewriter/widgets/inspector/inspector.dart"; class PageSelectorEditorFilter extends EditorFilter { @override bool canEdit(FieldInfo info) => - info is PrimitiveField && info.type == PrimitiveFieldType.string && info.hasModifier("page"); + info is PrimitiveField && + info.type == PrimitiveFieldType.string && + info.hasModifier("page"); @override - Widget build(String path, FieldInfo info) => PageSelectorEditor(path: path, field: info as PrimitiveField); + Widget build(String path, FieldInfo info) => + PageSelectorEditor(path: path, field: info as PrimitiveField); } class PageSelectorEditor extends HookConsumerWidget { @@ -34,7 +37,9 @@ class PageSelectorEditor extends HookConsumerWidget { bool _update(PassingRef ref, Page? page) { if (page == null) return false; - ref.read(inspectingEntryDefinitionProvider)?.updateField(ref, path, page.name); + ref + .read(inspectingEntryDefinitionProvider) + ?.updateField(ref, path, page.pageName); return true; } @@ -77,7 +82,9 @@ class PageSelectorEditor extends HookConsumerWidget { icon: FontAwesomeIcons.solidSquareMinus, color: Colors.redAccent, onTap: () { - ref.read(inspectingEntryDefinitionProvider)?.updateField(ref.passing, path, null); + ref + .read(inspectingEntryDefinitionProvider) + ?.updateField(ref.passing, path, null); }, ), ], @@ -102,15 +109,19 @@ class PageSelectorEditor extends HookConsumerWidget { }, borderRadius: BorderRadius.circular(8), child: Padding( - padding: - EdgeInsets.only(left: hasPage ? 4 : 12, right: 16, top: hasPage ? 4 : 12, bottom: hasPage ? 4 : 12), + padding: EdgeInsets.only( + left: hasPage ? 4 : 12, + right: 16, + top: hasPage ? 4 : 12, + bottom: hasPage ? 4 : 12), child: Row( children: [ if (!hasPage) ...[ FaIcon( FontAwesomeIcons.database, size: 16, - color: Theme.of(context).inputDecorationTheme.hintStyle?.color, + color: + Theme.of(context).inputDecorationTheme.hintStyle?.color, ), const SizedBox(width: 12), ], @@ -118,13 +129,16 @@ class PageSelectorEditor extends HookConsumerWidget { Expanded(child: _SelectedPage(id: pageId)) else Expanded( - child: - Text("Select a ${type.tag} page", style: Theme.of(context).inputDecorationTheme.hintStyle),), + child: Text("Select a ${type.tag} page", + style: + Theme.of(context).inputDecorationTheme.hintStyle), + ), const SizedBox(width: 12), FaIcon( FontAwesomeIcons.caretDown, size: 16, - color: Theme.of(context).inputDecorationTheme.hintStyle?.color, + color: + Theme.of(context).inputDecorationTheme.hintStyle?.color, ), ], ), diff --git a/app/lib/widgets/inspector/editors/potion_effect.g.dart b/app/lib/widgets/inspector/editors/potion_effect.g.dart index db743689c4..b61af9a33c 100644 --- a/app/lib/widgets/inspector/editors/potion_effect.g.dart +++ b/app/lib/widgets/inspector/editors/potion_effect.g.dart @@ -23,4 +23,4 @@ final _fuzzyPotionEffectsProvider = AutoDisposeProvider>.internal( typedef _FuzzyPotionEffectsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/editors/sound.g.dart b/app/lib/widgets/inspector/editors/sound.g.dart index 5479369963..d31e98dfbf 100644 --- a/app/lib/widgets/inspector/editors/sound.g.dart +++ b/app/lib/widgets/inspector/editors/sound.g.dart @@ -11,7 +11,7 @@ String _$fuzzySoundsHash() => r'c933129eefe4f51743fed88103eb34d214a5aeb0'; /// See also [_fuzzySounds]. @ProviderFor(_fuzzySounds) final _fuzzySoundsProvider = - AutoDisposeProvider>>>.internal( + AutoDisposeProvider>.internal( _fuzzySounds, name: r'_fuzzySoundsProvider', debugGetCreateSourceHash: @@ -20,7 +20,6 @@ final _fuzzySoundsProvider = allTransitiveDependencies: null, ); -typedef _FuzzySoundsRef - = AutoDisposeProviderRef>>>; +typedef _FuzzySoundsRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/header.g.dart b/app/lib/widgets/inspector/header.g.dart index 9db19a45ba..9ff15fbc2b 100644 --- a/app/lib/widgets/inspector/header.g.dart +++ b/app/lib/widgets/inspector/header.g.dart @@ -7,7 +7,7 @@ part of 'header.dart'; // ************************************************************************** String _$headerActionFiltersHash() => - r'0290955ac2fcfeeade281d24b9fd661d2ba3c2ce'; + r'1948745106f42d9109becc8ea5068801689ece7a'; /// See also [headerActionFilters]. @ProviderFor(headerActionFilters) @@ -25,4 +25,4 @@ final headerActionFiltersProvider = typedef HeaderActionFiltersRef = AutoDisposeProviderRef>; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/headers/capture_action.dart b/app/lib/widgets/inspector/headers/capture_action.dart index 75ff7678df..e7f0e01257 100644 --- a/app/lib/widgets/inspector/headers/capture_action.dart +++ b/app/lib/widgets/inspector/headers/capture_action.dart @@ -67,7 +67,7 @@ class CaptureHeaderAction extends HookConsumerWidget { return; } - final cinematic = page.type == PageType.cinematic ? page.name : null; + final cinematic = page.type == PageType.cinematic ? page.pageName : null; /// ------- Segment In Out ------- final segment = ref.read(inspectingSegmentProvider); diff --git a/app/lib/widgets/inspector/heading.g.dart b/app/lib/widgets/inspector/heading.g.dart index 4b542ea467..44e32c8cc4 100644 --- a/app/lib/widgets/inspector/heading.g.dart +++ b/app/lib/widgets/inspector/heading.g.dart @@ -77,4 +77,4 @@ final _entryColorProvider = AutoDisposeProvider.internal( typedef _EntryColorRef = AutoDisposeProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/lib/widgets/inspector/inspector.g.dart b/app/lib/widgets/inspector/inspector.g.dart index 35ffb16139..b60f0d4b55 100644 --- a/app/lib/widgets/inspector/inspector.g.dart +++ b/app/lib/widgets/inspector/inspector.g.dart @@ -39,4 +39,4 @@ final inspectingEntryDefinitionProvider = typedef InspectingEntryDefinitionRef = AutoDisposeProviderRef; // ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/app/macos/Podfile.lock b/app/macos/Podfile.lock index 0f2bdc2f1a..d9a91ca937 100644 --- a/app/macos/Podfile.lock +++ b/app/macos/Podfile.lock @@ -33,7 +33,7 @@ SPEC CHECKSUMS: audioplayers_darwin: dcad41de4fbd0099cb3749f7ab3b0cb8f70b810c FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - rive_common: acedcab7802c0ece4b0d838b71d7deb637e1309a + rive_common: 0f0aadf670f0c6a7872dfe3e6186f112a5319108 url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 diff --git a/app/pubspec.lock b/app/pubspec.lock index e5c0673d13..27d28348a5 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "65.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.0" analyzer_plugin: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: archive - sha256: "49b1fad315e57ab0bbc15bcbb874e83116a1d78f77ebd500a4af6c9407d6b28e" + sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" url: "https://pub.dev" source: hosted - version: "3.3.8" + version: "3.4.9" args: dependency: transitive description: @@ -53,74 +53,74 @@ packages: dependency: "direct main" description: name: audioplayers - sha256: "8e94499b5c123df14cf17c16639de5ff3373e57e537f727e367487fbb7491363" + sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.2.1" audioplayers_android: dependency: transitive description: name: audioplayers_android - sha256: "1c12b60cc10a3b8617ca3f88b927e7e03768f470d9b4f747efd3d58a8a07ee1b" + sha256: b00e1a0e11365d88576320ec2d8c192bc21f1afb6c0e5995d1c57ae63156acb5 url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.3" audioplayers_darwin: dependency: transitive description: name: audioplayers_darwin - sha256: "2fb6133ffcf28fb3f9d3e11f8a3ef190e5fedb2b7b95ea865b56a21d1163e670" + sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.2" audioplayers_linux: dependency: transitive description: name: audioplayers_linux - sha256: cca3f272c7186dd2e0025b8864e1413ac5e081d74b17e28b02ceb2df4c110235 + sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" audioplayers_platform_interface: dependency: transitive description: name: audioplayers_platform_interface - sha256: "47eae55e99ced11589998cf27e4eaabf5b475a7bd8bea7516ee6c2536a2e1abf" + sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.1.0" audioplayers_web: dependency: transitive description: name: audioplayers_web - sha256: "9f155590c6ba9ba469df637f4729264e4234dc3941ece4690dad63ffac19b5af" + sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.0" audioplayers_windows: dependency: transitive description: name: audioplayers_windows - sha256: "8813b712ba919bb324bde5e3ba97edc81bface945953a54a3dea70b5608bcc70" + sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" auto_route: dependency: "direct main" description: name: auto_route - sha256: "72f21e8b6cbbe25f02ea69183e024996530bf495cc1b077a49e0ec6726f0c271" + sha256: "82f8df1d177416bc6b7a449127d0270ff1f0f633a91f2ceb7a85d4f07c3affa1" url: "https://pub.dev" source: hosted - version: "7.8.3" + version: "7.8.4" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: e7aa9ab44b77cd31a4619d94db645ab5736e543fd0b4c6058c281249e479dfb8 + sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" url: "https://pub.dev" source: hosted - version: "7.3.1" + version: "7.3.2" auto_size_text: dependency: "direct main" description: @@ -157,18 +157,18 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: d912852cce27c9e80a93603db721c267716894462e7033165178b91138587972 + sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" build_runner: dependency: "direct dev" description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.2.11" built_collection: dependency: transitive description: @@ -197,10 +197,10 @@ packages: dependency: transitive description: name: built_value - sha256: ff627b645b28fb8bdb69e645f910c2458fd6b65f6585c3a53e0626024897dedf + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.6.2" + version: "8.8.0" characters: dependency: transitive description: @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "315a598c7fbe77f22de1c9da7cfd6fd21816312f16ffa124453b4fc679e540f1" + sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.8.0" collapsible: dependency: "direct main" description: @@ -341,18 +341,18 @@ packages: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.4" dotted_border: dependency: "direct main" description: name: dotted_border - sha256: "07a5c5e8d4e6e992279e190e0352be8faa5b8f96d81c77a78b2d42f060279840" + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "2.0.0+3" + version: "2.1.0" duration: dependency: "direct main" description: @@ -402,42 +402,42 @@ packages: dependency: "direct main" description: name: flutter_animate - sha256: "62f346340a96192070e31e3f2a1bd30a28530f1fe8be978821e06cd56b74d6d2" + sha256: "1dbc1aabfb8ec1e9d9feed2b675c21fb6b0a11f99be53ec3bc0f1901af6a8eb7" url: "https://pub.dev" source: hosted - version: "4.2.0+1" + version: "4.3.0" flutter_hooks: dependency: "direct main" description: name: flutter_hooks - sha256: "6ae13b1145c589112cbd5c4fda6c65908993a9cb18d4f82042e9c28dd9fbf611" + sha256: "7c8db779c2d1010aa7f9ea3fbefe8f86524fcb87b69e8b0af31e1a4b55422dec" url: "https://pub.dev" source: hosted - version: "0.20.1" + version: "0.20.3" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.0.1" flutter_riverpod: dependency: transitive description: name: flutter_riverpod - sha256: "1bd39b04f1bcd217a969589777ca6bd642d116e3e5de65c3e6a8e8bdd8b178ec" + sha256: d261b0f2461e0595b96f92ed807841eb72cea84a6b12b8fd0c76e5ed803e7921 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.8" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.9" flutter_test: dependency: "direct dev" description: flutter @@ -452,18 +452,18 @@ packages: dependency: "direct main" description: name: font_awesome_flutter - sha256: "5fb789145cae1f4c3245c58b3f8fb287d055c26323879eab57a7bf0cfd1e45f3" + sha256: "52671aea66da73b58d42ec6d0912b727a42248dd9a7c76d6c20f275783c48c08" url: "https://pub.dev" source: hosted - version: "10.5.0" + version: "10.6.0" freezed: dependency: "direct dev" description: name: freezed - sha256: "83462cfc33dc9680533a7f3a4a6ab60aa94f287db5f4ee6511248c22833c497f" + sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.5" freezed_annotation: dependency: "direct main" description: @@ -484,10 +484,10 @@ packages: dependency: "direct main" description: name: fuzzy - sha256: baf5e5b1e651dc2eaab92399050f6ad6ebf7a56042b2bd141e697b0554940fa2 + sha256: af5fbd36f2f8de0663a5b562ef5ca209aea957e81a2f0e97f97475cfbed044ec url: "https://pub.dev" source: hosted - version: "0.4.0-nullsafety.0" + version: "0.5.1" glob: dependency: transitive description: @@ -516,10 +516,10 @@ packages: dependency: "direct main" description: name: hooks_riverpod - sha256: ad7b877c3687e38764633d221a1f65491bc7a540e724101e9a404a84db2a4276 + sha256: b271e06606e718cf8185db9a792d1af00e2049e7bf5da09583654e020c00fbaa url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.8" hotreloader: dependency: transitive description: @@ -532,10 +532,10 @@ packages: dependency: "direct main" description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: "38dce67ce909c338754840e2a1479c2c11347a2fc7ec3d5b166a5118a8a201db" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" http_multi_server: dependency: transitive description: @@ -556,18 +556,18 @@ packages: dependency: "direct dev" description: name: icons_launcher - sha256: af05397792f6d82b93375a8a0253b8db0d3f816ef1dd1bf5c35cbab55321d327 + sha256: "0c4a46dfbc1e9025745c1d28949149d601bdf56a892338e74c4b4dd9a7066987" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.5" image: dependency: transitive description: name: image - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf + sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" url: "https://pub.dev" source: hosted - version: "4.0.17" + version: "4.1.3" io: dependency: transitive description: @@ -608,14 +608,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.6" - latinize: - dependency: transitive - description: - name: latinize - sha256: "559eaa76d4641d977680b64080806174efabddebac365fc26d1c333aabb4070e" - url: "https://pub.dev" - source: hosted - version: "0.1.0-nullsafety.0" leak_tracker: dependency: transitive description: @@ -636,10 +628,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: transitive description: @@ -724,10 +716,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_foundation: dependency: transitive description: @@ -780,18 +772,18 @@ packages: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "2.1.7" pointycastle: dependency: transitive description: @@ -828,58 +820,58 @@ packages: dependency: "direct main" description: name: rive - sha256: "5fbb92f9f880cddbb9181342dc24099eee323ca43339e2c8e1ae6fad85df915e" + sha256: fd15b219f5cc110285ebf52093b0b0f4038c3ca750f2fc5fc44d9c80a56c44f3 url: "https://pub.dev" source: hosted - version: "0.11.16" + version: "0.12.3" rive_common: dependency: transitive description: name: rive_common - sha256: e41f12917cb58e0c9376836490ebaa431e12744da0c67e19dad8d4bee9fedd46 + sha256: f4e20d0a99c5040c85624a3eb2b0b6b19e614d93a693c3bb25cf6e7bb2d3d6d3 url: "https://pub.dev" source: hosted - version: "0.2.7" + version: "0.2.8" riverpod: dependency: transitive description: name: riverpod - sha256: a600120d6f213a9922860eea1abc32597436edd5b2c4e73b91410f8c2af67d22 + sha256: "08451ddbaad6eae73e2422d8109775885623340d721c6637b8719c9f4b478848" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.8" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: aa216069d72f5478126029fa555874b4b38119f17e3f0f6c93fd63365f74502d + sha256: d4dabc35358413bf4611fcb6abb46308a67c4ef4cd5e69fd3367b11925c59f57 url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.5.0" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: "6294fe7e7d1875f32bdf04c8fce7620e718070273703097847df8f3bf16995ea" + sha256: "02c9bced96ed3ed8d9970820d1ce7b16600955bc01aa8b2276f09dd3d9d29ed9" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.3.2" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: f668015d7b719c413c6001d4790689ea4a7bf76d5109118a1a98d5c23b20160d + sha256: "94b6c49bba879729611d690d434796e3b4e7c72a27e88b482b92c505e90f90d9" url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "2.3.8" riverpod_lint: dependency: "direct dev" description: name: riverpod_lint - sha256: "74123a5f0a8e809ab80078dbc02061ecf02e09647a2c3231c87b7342bcf8d399" + sha256: "6fc64ae102ba39b0889b7aa7f4ef6c5a8f71a2ad215b90c787f319a9407a128b" url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.3.6" rxdart: dependency: transitive description: @@ -949,6 +941,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: "direct main" description: @@ -989,6 +989,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + stringr: + dependency: transitive + description: + name: stringr + sha256: "2846b6811c3cbb34c8937a35e623986e3fbf7203b3bb33ffe7f80e496ea3eff2" + url: "https://pub.dev" + source: hosted + version: "1.0.0" synchronized: dependency: transitive description: @@ -1065,98 +1073,98 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.2.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" + sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "6.2.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.2.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" + sha256: "138bd45b3a456dcfafc46d1a146787424f8d2edfbf2809c9324361e58f851cf7" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.2.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.1.0" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.2.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f" + sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.9+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f" + sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.9+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e" + sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.9+1" vector_math: dependency: transitive description: @@ -1201,10 +1209,10 @@ packages: dependency: transitive description: name: win32 - sha256: "9e82a402b7f3d518fb9c02d0e9ae45952df31b9bf34d77baf19da2de03fc2aaa" + sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f" url: "https://pub.dev" source: hosted - version: "5.0.7" + version: "5.1.0" xdg_directories: dependency: transitive description: @@ -1230,5 +1238,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 395b23f892..3322b8bbf0 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -1,7 +1,7 @@ name: typewriter description: Visual quest configuration publish_to: 'none' -version: 0.2.0+1 +version: 0.4.0+1 environment: sdk: '>=3.0.0 <4.0.0' @@ -20,27 +20,27 @@ dependencies: auto_size_text: ^3.0.0 # google_fonts: ^4.0.4 font_awesome_flutter: ^10.5.0 - rive: ^0.11.14 - fuzzy: ^0.4.0-nullsafety.0 - auto_route: ^7.7.0 + rive: ^0.12.3 + fuzzy: ^0.5.1 + auto_route: ^7.8.4 collapsible: ^1.0.0 riverpod_annotation: ^2.1.2 ktx: ^1.1.6 # Keep this as the older one since we use SocketIO v2 on the server. socket_io_client: 1.0.2 clipboard: ^0.1.3 - dotted_border: ^2.0.0+3 - flutter_svg: ^2.0.7 + dotted_border: ^2.1.0 + flutter_svg: ^2.0.9 color: ^3.0.0 duration: ^3.0.13 - flutter_animate: ^4.2.0 + flutter_animate: ^4.3.0 text_scroll: ^0.2.0 url_launcher: ^6.1.12 http: - audioplayers: ^5.1.0 + audioplayers: ^5.2.1 collection_ext: ^1.0.0 tinycolor2: ^3.0.1 - uuid: ^3.0.7 + uuid: ^4.2.1 dev_dependencies: flutter_test: @@ -51,9 +51,9 @@ dev_dependencies: json_serializable: ^6.7.1 icons_launcher: ^2.1.3 auto_route_generator: ^7.2.0 - riverpod_generator: 2.2.6 + riverpod_generator: ^2.3.8 custom_lint: - riverpod_lint: ^2.0.1 + riverpod_lint: ^2.3.6 icons_launcher: image_path: "assets/Typewriter.png"