From d843013fd1d91a9c937dd3af0495c511a3f7886e Mon Sep 17 00:00:00 2001 From: Sameri11 <51940183+Sameri11@users.noreply.github.com> Date: Sat, 5 Oct 2024 20:44:04 +0500 Subject: [PATCH] update devtools dependencies --- .vscode/launch.json | 12 +- .../provider/extension/devtools/config.yaml | 1 + .../provider_devtools_extension/.gitignore | 3 + .../provider_devtools_extension/.metadata | 12 +- .../lib/src/instance_viewer/eval.dart | 35 +- .../fake_freezed_annotation.dart | 26 - .../src/instance_viewer/instance_details.dart | 8 +- .../instance_details.freezed.dart | 1953 ++++++++--------- .../src/instance_viewer/instance_viewer.dart | 11 +- .../lib/src/instance_viewer/result.dart | 8 +- .../src/instance_viewer/result.freezed.dart | 199 +- .../lib/src/provider_screen.dart | 130 +- .../provider_devtools_extension/pubspec.yaml | 15 +- .../goldens/provider_screen/loading_state.png | Bin 0 -> 11294 bytes .../provider_screen/no_selected_provider.png | Bin 0 -> 13284 bytes .../provider_screen/selected_provider.png | Bin 0 -> 13446 bytes .../test/provider_screen_test.dart | 167 +- .../test/test_utils.dart | 13 +- .../web/index.html | 25 +- .../web/manifest.json | 2 +- 20 files changed, 1295 insertions(+), 1325 deletions(-) delete mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart create mode 100644 packages/provider_devtools_extension/test/goldens/provider_screen/loading_state.png create mode 100644 packages/provider_devtools_extension/test/goldens/provider_screen/no_selected_provider.png create mode 100644 packages/provider_devtools_extension/test/goldens/provider_screen/selected_provider.png diff --git a/.vscode/launch.json b/.vscode/launch.json index f938df15..d3e54d3b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -69,6 +69,16 @@ "request": "launch", "type": "dart", "flutterMode": "release" - } + }, + { + "name": "DevTools Extension Tests (Chrome)", + "request": "launch", + "type": "dart", + "program": "packages/provider_devtools_extension/test", + "args": [ + "--platform", + "chrome" + ] + }, ] } \ No newline at end of file diff --git a/packages/provider/extension/devtools/config.yaml b/packages/provider/extension/devtools/config.yaml index e0da96ef..63a0045a 100644 --- a/packages/provider/extension/devtools/config.yaml +++ b/packages/provider/extension/devtools/config.yaml @@ -2,3 +2,4 @@ name: provider issueTracker: https://github.com/rrousselGit/provider/issues version: 0.0.1 materialIconCodePoint: "0xe0b1" +requiresConnection: true diff --git a/packages/provider_devtools_extension/.gitignore b/packages/provider_devtools_extension/.gitignore index 24476c5d..5bfb97fe 100644 --- a/packages/provider_devtools_extension/.gitignore +++ b/packages/provider_devtools_extension/.gitignore @@ -42,3 +42,6 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Ignore failure screenshots created by golden tests +test/failures diff --git a/packages/provider_devtools_extension/.metadata b/packages/provider_devtools_extension/.metadata index 86e2f966..8dda3beb 100644 --- a/packages/provider_devtools_extension/.metadata +++ b/packages/provider_devtools_extension/.metadata @@ -4,8 +4,8 @@ # This file should be version controlled and should not be manually edited. version: - revision: "972d36c4efeee7e3bb16c050fd233389625a6470" - channel: "[user-branch]" + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 - base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 + base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 - platform: web - create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 - base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 + base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 # User provided section diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart index 1699b3a7..91cbe6df 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart @@ -14,21 +14,26 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:vm_service/vm_service.dart'; -Stream get _serviceConnectionStream => - _serviceConnectionStreamController.stream; -final _serviceConnectionStreamController = - StreamController.broadcast(); -void setServiceConnectionForProviderScreen(VmService service) { - _serviceConnectionStreamController.add(service); -} - -/// Exposes the current VmServiceWrapper. -/// By listening to this provider instead of directly accessing `serviceManager.service`, -/// this ensures that providers reload properly when the devtool is connected -/// to a different application. -final serviceProvider = StreamProvider((ref) async* { - yield serviceManager.service!; - yield* _serviceConnectionStream; +final serviceProvider = StreamProvider((ref) { + final controller = StreamController.broadcast(); + void handleConnectionChange() { + final isConnected = serviceManager.connectedState.value.connected; + final isServiceAvailable = serviceManager.isServiceAvailable; + if (isConnected && isServiceAvailable) { + controller.add(serviceManager.service!); + } + } + + serviceManager.connectedState.addListener(handleConnectionChange); + + handleConnectionChange(); + + ref.onDispose(() { + serviceManager.connectedState.removeListener(handleConnectionChange); + controller.close(); + }); + + return controller.stream; }); /// An [EvalOnDartLibrary] that has access to no specific library in particular diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart deleted file mode 100644 index e27aa470..00000000 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file contains annotations that behaves like package:freezed_annotation. -// This allows using Freezed without having the devtool depend on the package. -// We could instead remove the annotations, but that would make the process of -// updating the generated files tedious. - -const nullable = Object(); -const freezed = Object(); - -class Default { - const Default(Object value); -} - -class Assert { - const Assert(String exp); -} - -class JsonKey { - const JsonKey({ - bool? ignore, - Object? defaultValue, - }); -} diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart index 78578601..d2394825 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart @@ -2,19 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:collection/collection.dart'; import 'package:devtools_app_shared/service.dart'; import 'package:flutter/foundation.dart'; import 'package:vm_service/vm_service.dart'; -import 'fake_freezed_annotation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'result.dart'; -// This part is generated using `package:freezed`, but without the devtool depending -// on the package. -// To update the generated files, temporarily add freezed/freezed_annotation/build_runner -// as dependencies; replace the `fake_freezed_annotation.dart` import with the -// real annotation package, then execute `pub run build_runner build`. part 'instance_details.freezed.dart'; typedef Setter = Future Function(String newValue); diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart index e28024d1..f44bb9e1 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart @@ -1,6 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark part of 'instance_details.dart'; @@ -11,38 +12,7 @@ part of 'instance_details.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$PathToPropertyTearOff { - const _$PathToPropertyTearOff(); - - ListIndexPath listIndex(int index) { - return ListIndexPath( - index, - ); - } - - MapKeyPath mapKey({required String? ref}) { - return MapKeyPath( - ref: ref, - ); - } - - PropertyPath objectProperty( - {required String name, - required String ownerUri, - required String ownerName}) { - return PropertyPath( - name: name, - ownerUri: ownerUri, - ownerName: ownerName, - ); - } -} - -/// @nodoc -const $PathToProperty = _$PathToPropertyTearOff(); + '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#adding-getters-and-methods-to-our-models'); /// @nodoc mixin _$PathToProperty { @@ -56,9 +26,9 @@ mixin _$PathToProperty { throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult Function(int index)? listIndex, - TResult Function(String? ref)? mapKey, - TResult Function(String name, String ownerUri, String ownerName)? + TResult? Function(int index)? listIndex, + TResult? Function(String? ref)? mapKey, + TResult? Function(String name, String ownerUri, String ownerName)? objectProperty, }) => throw _privateConstructorUsedError; @@ -80,9 +50,9 @@ mixin _$PathToProperty { throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ - TResult Function(ListIndexPath value)? listIndex, - TResult Function(MapKeyPath value)? mapKey, - TResult Function(PropertyPath value)? objectProperty, + TResult? Function(ListIndexPath value)? listIndex, + TResult? Function(MapKeyPath value)? mapKey, + TResult? Function(PropertyPath value)? objectProperty, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -99,44 +69,49 @@ mixin _$PathToProperty { abstract class $PathToPropertyCopyWith<$Res> { factory $PathToPropertyCopyWith( PathToProperty value, $Res Function(PathToProperty) then) = - _$PathToPropertyCopyWithImpl<$Res>; + _$PathToPropertyCopyWithImpl<$Res, PathToProperty>; } /// @nodoc -class _$PathToPropertyCopyWithImpl<$Res> +class _$PathToPropertyCopyWithImpl<$Res, $Val extends PathToProperty> implements $PathToPropertyCopyWith<$Res> { _$PathToPropertyCopyWithImpl(this._value, this._then); - final PathToProperty _value; // ignore: unused_field - final $Res Function(PathToProperty) _then; + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. } /// @nodoc -abstract class $ListIndexPathCopyWith<$Res> { - factory $ListIndexPathCopyWith( - ListIndexPath value, $Res Function(ListIndexPath) then) = - _$ListIndexPathCopyWithImpl<$Res>; +abstract class _$$ListIndexPathImplCopyWith<$Res> { + factory _$$ListIndexPathImplCopyWith( + _$ListIndexPathImpl value, $Res Function(_$ListIndexPathImpl) then) = + __$$ListIndexPathImplCopyWithImpl<$Res>; + @useResult $Res call({int index}); } /// @nodoc -class _$ListIndexPathCopyWithImpl<$Res> - extends _$PathToPropertyCopyWithImpl<$Res> - implements $ListIndexPathCopyWith<$Res> { - _$ListIndexPathCopyWithImpl( - ListIndexPath _value, $Res Function(ListIndexPath) _then) - : super(_value, (v) => _then(v as ListIndexPath)); - - @override - ListIndexPath get _value => super._value as ListIndexPath; +class __$$ListIndexPathImplCopyWithImpl<$Res> + extends _$PathToPropertyCopyWithImpl<$Res, _$ListIndexPathImpl> + implements _$$ListIndexPathImplCopyWith<$Res> { + __$$ListIndexPathImplCopyWithImpl( + _$ListIndexPathImpl _value, $Res Function(_$ListIndexPathImpl) _then) + : super(_value, _then); + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? index = freezed, + Object? index = null, }) { - return _then(ListIndexPath( - index == freezed + return _then(_$ListIndexPathImpl( + null == index ? _value.index : index // ignore: cast_nullable_to_non_nullable as int, @@ -146,8 +121,10 @@ class _$ListIndexPathCopyWithImpl<$Res> /// @nodoc -class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { - const _$ListIndexPath(this.index); +class _$ListIndexPathImpl + with DiagnosticableTreeMixin + implements ListIndexPath { + const _$ListIndexPathImpl(this.index); @override final int index; @@ -166,21 +143,23 @@ class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is ListIndexPath && - const DeepCollectionEquality().equals(other.index, index)); + other is _$ListIndexPathImpl && + (identical(other.index, index) || other.index == index)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(index)); + int get hashCode => Object.hash(runtimeType, index); - @JsonKey(ignore: true) + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $ListIndexPathCopyWith get copyWith => - _$ListIndexPathCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$ListIndexPathImplCopyWith<_$ListIndexPathImpl> get copyWith => + __$$ListIndexPathImplCopyWithImpl<_$ListIndexPathImpl>(this, _$identity); @override @optionalTypeArgs @@ -196,9 +175,9 @@ class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(int index)? listIndex, - TResult Function(String? ref)? mapKey, - TResult Function(String name, String ownerUri, String ownerName)? + TResult? Function(int index)? listIndex, + TResult? Function(String? ref)? mapKey, + TResult? Function(String name, String ownerUri, String ownerName)? objectProperty, }) { return listIndex?.call(index); @@ -232,9 +211,9 @@ class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(ListIndexPath value)? listIndex, - TResult Function(MapKeyPath value)? mapKey, - TResult Function(PropertyPath value)? objectProperty, + TResult? Function(ListIndexPath value)? listIndex, + TResult? Function(MapKeyPath value)? mapKey, + TResult? Function(PropertyPath value)? objectProperty, }) { return listIndex?.call(this); } @@ -255,37 +234,43 @@ class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { } abstract class ListIndexPath implements PathToProperty { - const factory ListIndexPath(int index) = _$ListIndexPath; + const factory ListIndexPath(final int index) = _$ListIndexPathImpl; int get index; - @JsonKey(ignore: true) - $ListIndexPathCopyWith get copyWith => + + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ListIndexPathImplCopyWith<_$ListIndexPathImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MapKeyPathCopyWith<$Res> { - factory $MapKeyPathCopyWith( - MapKeyPath value, $Res Function(MapKeyPath) then) = - _$MapKeyPathCopyWithImpl<$Res>; +abstract class _$$MapKeyPathImplCopyWith<$Res> { + factory _$$MapKeyPathImplCopyWith( + _$MapKeyPathImpl value, $Res Function(_$MapKeyPathImpl) then) = + __$$MapKeyPathImplCopyWithImpl<$Res>; + @useResult $Res call({String? ref}); } /// @nodoc -class _$MapKeyPathCopyWithImpl<$Res> extends _$PathToPropertyCopyWithImpl<$Res> - implements $MapKeyPathCopyWith<$Res> { - _$MapKeyPathCopyWithImpl(MapKeyPath _value, $Res Function(MapKeyPath) _then) - : super(_value, (v) => _then(v as MapKeyPath)); - - @override - MapKeyPath get _value => super._value as MapKeyPath; +class __$$MapKeyPathImplCopyWithImpl<$Res> + extends _$PathToPropertyCopyWithImpl<$Res, _$MapKeyPathImpl> + implements _$$MapKeyPathImplCopyWith<$Res> { + __$$MapKeyPathImplCopyWithImpl( + _$MapKeyPathImpl _value, $Res Function(_$MapKeyPathImpl) _then) + : super(_value, _then); + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ Object? ref = freezed, }) { - return _then(MapKeyPath( - ref: ref == freezed + return _then(_$MapKeyPathImpl( + ref: freezed == ref ? _value.ref : ref // ignore: cast_nullable_to_non_nullable as String?, @@ -295,8 +280,8 @@ class _$MapKeyPathCopyWithImpl<$Res> extends _$PathToPropertyCopyWithImpl<$Res> /// @nodoc -class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { - const _$MapKeyPath({required this.ref}); +class _$MapKeyPathImpl with DiagnosticableTreeMixin implements MapKeyPath { + const _$MapKeyPathImpl({required this.ref}); @override final String? ref; @@ -315,21 +300,23 @@ class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is MapKeyPath && - const DeepCollectionEquality().equals(other.ref, ref)); + other is _$MapKeyPathImpl && + (identical(other.ref, ref) || other.ref == ref)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(ref)); + int get hashCode => Object.hash(runtimeType, ref); - @JsonKey(ignore: true) + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $MapKeyPathCopyWith get copyWith => - _$MapKeyPathCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$MapKeyPathImplCopyWith<_$MapKeyPathImpl> get copyWith => + __$$MapKeyPathImplCopyWithImpl<_$MapKeyPathImpl>(this, _$identity); @override @optionalTypeArgs @@ -345,9 +332,9 @@ class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(int index)? listIndex, - TResult Function(String? ref)? mapKey, - TResult Function(String name, String ownerUri, String ownerName)? + TResult? Function(int index)? listIndex, + TResult? Function(String? ref)? mapKey, + TResult? Function(String name, String ownerUri, String ownerName)? objectProperty, }) { return mapKey?.call(ref); @@ -381,9 +368,9 @@ class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(ListIndexPath value)? listIndex, - TResult Function(MapKeyPath value)? mapKey, - TResult Function(PropertyPath value)? objectProperty, + TResult? Function(ListIndexPath value)? listIndex, + TResult? Function(MapKeyPath value)? mapKey, + TResult? Function(PropertyPath value)? objectProperty, }) { return mapKey?.call(this); } @@ -404,49 +391,53 @@ class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { } abstract class MapKeyPath implements PathToProperty { - const factory MapKeyPath({required String? ref}) = _$MapKeyPath; + const factory MapKeyPath({required final String? ref}) = _$MapKeyPathImpl; String? get ref; - @JsonKey(ignore: true) - $MapKeyPathCopyWith get copyWith => + + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$MapKeyPathImplCopyWith<_$MapKeyPathImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PropertyPathCopyWith<$Res> { - factory $PropertyPathCopyWith( - PropertyPath value, $Res Function(PropertyPath) then) = - _$PropertyPathCopyWithImpl<$Res>; +abstract class _$$PropertyPathImplCopyWith<$Res> { + factory _$$PropertyPathImplCopyWith( + _$PropertyPathImpl value, $Res Function(_$PropertyPathImpl) then) = + __$$PropertyPathImplCopyWithImpl<$Res>; + @useResult $Res call({String name, String ownerUri, String ownerName}); } /// @nodoc -class _$PropertyPathCopyWithImpl<$Res> - extends _$PathToPropertyCopyWithImpl<$Res> - implements $PropertyPathCopyWith<$Res> { - _$PropertyPathCopyWithImpl( - PropertyPath _value, $Res Function(PropertyPath) _then) - : super(_value, (v) => _then(v as PropertyPath)); - - @override - PropertyPath get _value => super._value as PropertyPath; +class __$$PropertyPathImplCopyWithImpl<$Res> + extends _$PathToPropertyCopyWithImpl<$Res, _$PropertyPathImpl> + implements _$$PropertyPathImplCopyWith<$Res> { + __$$PropertyPathImplCopyWithImpl( + _$PropertyPathImpl _value, $Res Function(_$PropertyPathImpl) _then) + : super(_value, _then); + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, - Object? ownerUri = freezed, - Object? ownerName = freezed, + Object? name = null, + Object? ownerUri = null, + Object? ownerName = null, }) { - return _then(PropertyPath( - name: name == freezed + return _then(_$PropertyPathImpl( + name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable as String, - ownerUri: ownerUri == freezed + ownerUri: null == ownerUri ? _value.ownerUri : ownerUri // ignore: cast_nullable_to_non_nullable as String, - ownerName: ownerName == freezed + ownerName: null == ownerName ? _value.ownerName : ownerName // ignore: cast_nullable_to_non_nullable as String, @@ -456,19 +447,19 @@ class _$PropertyPathCopyWithImpl<$Res> /// @nodoc -class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { - const _$PropertyPath( +class _$PropertyPathImpl with DiagnosticableTreeMixin implements PropertyPath { + const _$PropertyPathImpl( {required this.name, required this.ownerUri, required this.ownerName}); @override final String name; - @override /// Path to the class/mixin that defined this property - final String ownerUri; @override + final String ownerUri; /// Name of the class/mixin that defined this property + @override final String ownerName; @override @@ -487,26 +478,27 @@ class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is PropertyPath && - const DeepCollectionEquality().equals(other.name, name) && - const DeepCollectionEquality().equals(other.ownerUri, ownerUri) && - const DeepCollectionEquality().equals(other.ownerName, ownerName)); + other is _$PropertyPathImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.ownerUri, ownerUri) || + other.ownerUri == ownerUri) && + (identical(other.ownerName, ownerName) || + other.ownerName == ownerName)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(name), - const DeepCollectionEquality().hash(ownerUri), - const DeepCollectionEquality().hash(ownerName)); + int get hashCode => Object.hash(runtimeType, name, ownerUri, ownerName); - @JsonKey(ignore: true) + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $PropertyPathCopyWith get copyWith => - _$PropertyPathCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$PropertyPathImplCopyWith<_$PropertyPathImpl> get copyWith => + __$$PropertyPathImplCopyWithImpl<_$PropertyPathImpl>(this, _$identity); @override @optionalTypeArgs @@ -522,9 +514,9 @@ class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(int index)? listIndex, - TResult Function(String? ref)? mapKey, - TResult Function(String name, String ownerUri, String ownerName)? + TResult? Function(int index)? listIndex, + TResult? Function(String? ref)? mapKey, + TResult? Function(String name, String ownerUri, String ownerName)? objectProperty, }) { return objectProperty?.call(name, ownerUri, ownerName); @@ -558,9 +550,9 @@ class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(ListIndexPath value)? listIndex, - TResult Function(MapKeyPath value)? mapKey, - TResult Function(PropertyPath value)? objectProperty, + TResult? Function(ListIndexPath value)? listIndex, + TResult? Function(MapKeyPath value)? mapKey, + TResult? Function(PropertyPath value)? objectProperty, }) { return objectProperty?.call(this); } @@ -582,9 +574,9 @@ class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { abstract class PropertyPath implements PathToProperty { const factory PropertyPath( - {required String name, - required String ownerUri, - required String ownerName}) = _$PropertyPath; + {required final String name, + required final String ownerUri, + required final String ownerName}) = _$PropertyPathImpl; String get name; @@ -593,38 +585,14 @@ abstract class PropertyPath implements PathToProperty { /// Name of the class/mixin that defined this property String get ownerName; - @JsonKey(ignore: true) - $PropertyPathCopyWith get copyWith => - throw _privateConstructorUsedError; -} -/// @nodoc -class _$ObjectFieldTearOff { - const _$ObjectFieldTearOff(); - - _ObjectField call( - {required String name, - required bool isFinal, - required String ownerName, - required String ownerUri, - required Result ref, - required EvalOnDartLibrary eval, - required bool isDefinedByDependency}) { - return _ObjectField( - name: name, - isFinal: isFinal, - ownerName: ownerName, - ownerUri: ownerUri, - ref: ref, - eval: eval, - isDefinedByDependency: isDefinedByDependency, - ); - } + /// Create a copy of PathToProperty + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PropertyPathImplCopyWith<_$PropertyPathImpl> get copyWith => + throw _privateConstructorUsedError; } -/// @nodoc -const $ObjectField = _$ObjectFieldTearOff(); - /// @nodoc mixin _$ObjectField { String get name => throw _privateConstructorUsedError; @@ -641,7 +609,9 @@ mixin _$ObjectField { /// This is used by the UI to hide variables that are not useful for the user. bool get isDefinedByDependency => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $ObjectFieldCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -650,7 +620,8 @@ mixin _$ObjectField { abstract class $ObjectFieldCopyWith<$Res> { factory $ObjectFieldCopyWith( ObjectField value, $Res Function(ObjectField) then) = - _$ObjectFieldCopyWithImpl<$Res>; + _$ObjectFieldCopyWithImpl<$Res, ObjectField>; + @useResult $Res call( {String name, bool isFinal, @@ -664,70 +635,79 @@ abstract class $ObjectFieldCopyWith<$Res> { } /// @nodoc -class _$ObjectFieldCopyWithImpl<$Res> implements $ObjectFieldCopyWith<$Res> { +class _$ObjectFieldCopyWithImpl<$Res, $Val extends ObjectField> + implements $ObjectFieldCopyWith<$Res> { _$ObjectFieldCopyWithImpl(this._value, this._then); - final ObjectField _value; // ignore: unused_field - final $Res Function(ObjectField) _then; + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, - Object? isFinal = freezed, - Object? ownerName = freezed, - Object? ownerUri = freezed, - Object? ref = freezed, - Object? eval = freezed, - Object? isDefinedByDependency = freezed, + Object? name = null, + Object? isFinal = null, + Object? ownerName = null, + Object? ownerUri = null, + Object? ref = null, + Object? eval = null, + Object? isDefinedByDependency = null, }) { return _then(_value.copyWith( - name: name == freezed + name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable as String, - isFinal: isFinal == freezed + isFinal: null == isFinal ? _value.isFinal : isFinal // ignore: cast_nullable_to_non_nullable as bool, - ownerName: ownerName == freezed + ownerName: null == ownerName ? _value.ownerName : ownerName // ignore: cast_nullable_to_non_nullable as String, - ownerUri: ownerUri == freezed + ownerUri: null == ownerUri ? _value.ownerUri : ownerUri // ignore: cast_nullable_to_non_nullable as String, - ref: ref == freezed + ref: null == ref ? _value.ref : ref // ignore: cast_nullable_to_non_nullable as Result, - eval: eval == freezed + eval: null == eval ? _value.eval : eval // ignore: cast_nullable_to_non_nullable as EvalOnDartLibrary, - isDefinedByDependency: isDefinedByDependency == freezed + isDefinedByDependency: null == isDefinedByDependency ? _value.isDefinedByDependency : isDefinedByDependency // ignore: cast_nullable_to_non_nullable as bool, - )); + ) as $Val); } + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. @override + @pragma('vm:prefer-inline') $ResultCopyWith get ref { return $ResultCopyWith(_value.ref, (value) { - return _then(_value.copyWith(ref: value)); + return _then(_value.copyWith(ref: value) as $Val); }); } } /// @nodoc -abstract class _$ObjectFieldCopyWith<$Res> +abstract class _$$ObjectFieldImplCopyWith<$Res> implements $ObjectFieldCopyWith<$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( {String name, bool isFinal, @@ -742,51 +722,52 @@ abstract class _$ObjectFieldCopyWith<$Res> } /// @nodoc -class __$ObjectFieldCopyWithImpl<$Res> extends _$ObjectFieldCopyWithImpl<$Res> - implements _$ObjectFieldCopyWith<$Res> { - __$ObjectFieldCopyWithImpl( - _ObjectField _value, $Res Function(_ObjectField) _then) - : super(_value, (v) => _then(v as _ObjectField)); - - @override - _ObjectField get _value => super._value as _ObjectField; +class __$$ObjectFieldImplCopyWithImpl<$Res> + extends _$ObjectFieldCopyWithImpl<$Res, _$ObjectFieldImpl> + implements _$$ObjectFieldImplCopyWith<$Res> { + __$$ObjectFieldImplCopyWithImpl( + _$ObjectFieldImpl _value, $Res Function(_$ObjectFieldImpl) _then) + : super(_value, _then); + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, - Object? isFinal = freezed, - Object? ownerName = freezed, - Object? ownerUri = freezed, - Object? ref = freezed, - Object? eval = freezed, - Object? isDefinedByDependency = freezed, - }) { - return _then(_ObjectField( - name: name == freezed + Object? name = null, + Object? isFinal = null, + Object? ownerName = null, + Object? ownerUri = null, + Object? ref = null, + Object? eval = null, + Object? isDefinedByDependency = null, + }) { + return _then(_$ObjectFieldImpl( + name: null == name ? _value.name : name // ignore: cast_nullable_to_non_nullable as String, - isFinal: isFinal == freezed + isFinal: null == isFinal ? _value.isFinal : isFinal // ignore: cast_nullable_to_non_nullable as bool, - ownerName: ownerName == freezed + ownerName: null == ownerName ? _value.ownerName : ownerName // ignore: cast_nullable_to_non_nullable as String, - ownerUri: ownerUri == freezed + ownerUri: null == ownerUri ? _value.ownerUri : ownerUri // ignore: cast_nullable_to_non_nullable as String, - ref: ref == freezed + ref: null == ref ? _value.ref : ref // ignore: cast_nullable_to_non_nullable as Result, - eval: eval == freezed + eval: null == eval ? _value.eval : eval // ignore: cast_nullable_to_non_nullable as EvalOnDartLibrary, - isDefinedByDependency: isDefinedByDependency == freezed + isDefinedByDependency: null == isDefinedByDependency ? _value.isDefinedByDependency : isDefinedByDependency // ignore: cast_nullable_to_non_nullable as bool, @@ -796,8 +777,8 @@ class __$ObjectFieldCopyWithImpl<$Res> extends _$ObjectFieldCopyWithImpl<$Res> /// @nodoc -class _$_ObjectField extends _ObjectField with DiagnosticableTreeMixin { - _$_ObjectField( +class _$ObjectFieldImpl extends _ObjectField with DiagnosticableTreeMixin { + _$ObjectFieldImpl( {required this.name, required this.isFinal, required this.ownerName, @@ -817,15 +798,15 @@ class _$_ObjectField extends _ObjectField with DiagnosticableTreeMixin { final String ownerUri; @override final Result ref; - @override /// An [EvalOnDartLibrary] that can access this field from the owner object - final EvalOnDartLibrary eval; @override + final EvalOnDartLibrary eval; /// Whether this field was defined by the inspected app or by one of its dependencies /// /// This is used by the UI to hide variables that are not useful for the user. + @override final bool isDefinedByDependency; @override @@ -849,46 +830,44 @@ class _$_ObjectField extends _ObjectField with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _ObjectField && - const DeepCollectionEquality().equals(other.name, name) && - const DeepCollectionEquality().equals(other.isFinal, isFinal) && - const DeepCollectionEquality().equals(other.ownerName, ownerName) && - const DeepCollectionEquality().equals(other.ownerUri, ownerUri) && - const DeepCollectionEquality().equals(other.ref, ref) && - const DeepCollectionEquality().equals(other.eval, eval) && - const DeepCollectionEquality() - .equals(other.isDefinedByDependency, isDefinedByDependency)); + other is _$ObjectFieldImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.isFinal, isFinal) || other.isFinal == isFinal) && + (identical(other.ownerName, ownerName) || + other.ownerName == ownerName) && + (identical(other.ownerUri, ownerUri) || + other.ownerUri == ownerUri) && + (identical(other.ref, ref) || other.ref == ref) && + (identical(other.eval, eval) || other.eval == eval) && + (identical(other.isDefinedByDependency, isDefinedByDependency) || + other.isDefinedByDependency == isDefinedByDependency)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(name), - const DeepCollectionEquality().hash(isFinal), - const DeepCollectionEquality().hash(ownerName), - const DeepCollectionEquality().hash(ownerUri), - const DeepCollectionEquality().hash(ref), - const DeepCollectionEquality().hash(eval), - const DeepCollectionEquality().hash(isDefinedByDependency)); + int get hashCode => Object.hash(runtimeType, name, isFinal, ownerName, + ownerUri, ref, eval, isDefinedByDependency); - @JsonKey(ignore: true) + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - _$ObjectFieldCopyWith<_ObjectField> get copyWith => - __$ObjectFieldCopyWithImpl<_ObjectField>(this, _$identity); + @pragma('vm:prefer-inline') + _$$ObjectFieldImplCopyWith<_$ObjectFieldImpl> get copyWith => + __$$ObjectFieldImplCopyWithImpl<_$ObjectFieldImpl>(this, _$identity); } abstract class _ObjectField extends ObjectField { factory _ObjectField( - {required String name, - required bool isFinal, - required String ownerName, - required String ownerUri, - required Result ref, - required EvalOnDartLibrary eval, - required bool isDefinedByDependency}) = _$_ObjectField; + {required final String name, + required final bool isFinal, + required final String ownerName, + required final String ownerUri, + required final Result ref, + required final EvalOnDartLibrary eval, + required final bool isDefinedByDependency}) = _$ObjectFieldImpl; _ObjectField._() : super._(); @override @@ -901,121 +880,29 @@ abstract class _ObjectField extends ObjectField { String get ownerUri; @override Result get ref; - @override /// An [EvalOnDartLibrary] that can access this field from the owner object - EvalOnDartLibrary get eval; @override + EvalOnDartLibrary get eval; /// Whether this field was defined by the inspected app or by one of its dependencies /// /// This is used by the UI to hide variables that are not useful for the user. + @override bool get isDefinedByDependency; + + /// Create a copy of ObjectField + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - _$ObjectFieldCopyWith<_ObjectField> get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ObjectFieldImplCopyWith<_$ObjectFieldImpl> get copyWith => throw _privateConstructorUsedError; } -/// @nodoc -class _$InstanceDetailsTearOff { - const _$InstanceDetailsTearOff(); - - NullInstance nill({required Setter? setter}) { - return NullInstance( - setter: setter, - ); - } - - BoolInstance boolean(String displayString, - {required String instanceRefId, required Setter? setter}) { - return BoolInstance( - displayString, - instanceRefId: instanceRefId, - setter: setter, - ); - } - - NumInstance number(String displayString, - {required String instanceRefId, required Setter? setter}) { - return NumInstance( - displayString, - instanceRefId: instanceRefId, - setter: setter, - ); - } - - StringInstance string(String displayString, - {required String instanceRefId, required Setter? setter}) { - return StringInstance( - displayString, - instanceRefId: instanceRefId, - setter: setter, - ); - } - - MapInstance map(List keys, - {required int hash, - required String instanceRefId, - required Setter? setter}) { - return MapInstance( - keys, - hash: hash, - instanceRefId: instanceRefId, - setter: setter, - ); - } - - ListInstance list( - {required int length, - required int hash, - required String instanceRefId, - required Setter? setter}) { - return ListInstance( - length: length, - hash: hash, - instanceRefId: instanceRefId, - setter: setter, - ); - } - - ObjectInstance object(List fields, - {required String type, - required int hash, - required String instanceRefId, - required Setter? setter, - required EvalOnDartLibrary evalForInstance}) { - return ObjectInstance( - fields, - type: type, - hash: hash, - instanceRefId: instanceRefId, - setter: setter, - evalForInstance: evalForInstance, - ); - } - - EnumInstance enumeration( - {required String type, - required String value, - required Setter? setter, - required String instanceRefId}) { - return EnumInstance( - type: type, - value: value, - setter: setter, - instanceRefId: instanceRefId, - ); - } -} - -/// @nodoc -const $InstanceDetails = _$InstanceDetailsTearOff(); - /// @nodoc mixin _$InstanceDetails { - Setter? get setter => throw _privateConstructorUsedError; - + Future Function(String)? get setter => + throw _privateConstructorUsedError; @optionalTypeArgs TResult when({ required TResult Function(Setter? setter) nill, @@ -1049,23 +936,23 @@ mixin _$InstanceDetails { throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -1073,7 +960,7 @@ mixin _$InstanceDetails { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) => @@ -1124,14 +1011,14 @@ mixin _$InstanceDetails { throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -1148,7 +1035,9 @@ mixin _$InstanceDetails { }) => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $InstanceDetailsCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1157,59 +1046,65 @@ mixin _$InstanceDetails { abstract class $InstanceDetailsCopyWith<$Res> { factory $InstanceDetailsCopyWith( InstanceDetails value, $Res Function(InstanceDetails) then) = - _$InstanceDetailsCopyWithImpl<$Res>; - $Res call({Setter? setter}); + _$InstanceDetailsCopyWithImpl<$Res, InstanceDetails>; + @useResult + $Res call({Future Function(String)? setter}); } /// @nodoc -class _$InstanceDetailsCopyWithImpl<$Res> +class _$InstanceDetailsCopyWithImpl<$Res, $Val extends InstanceDetails> implements $InstanceDetailsCopyWith<$Res> { _$InstanceDetailsCopyWithImpl(this._value, this._then); - final InstanceDetails _value; // ignore: unused_field - final $Res Function(InstanceDetails) _then; + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ Object? setter = freezed, }) { return _then(_value.copyWith( - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable - as Setter?, - )); + as Future Function(String)?, + ) as $Val); } } /// @nodoc -abstract class $NullInstanceCopyWith<$Res> +abstract class _$$NullInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $NullInstanceCopyWith( - NullInstance value, $Res Function(NullInstance) then) = - _$NullInstanceCopyWithImpl<$Res>; + factory _$$NullInstanceImplCopyWith( + _$NullInstanceImpl value, $Res Function(_$NullInstanceImpl) then) = + __$$NullInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({Setter? setter}); } /// @nodoc -class _$NullInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $NullInstanceCopyWith<$Res> { - _$NullInstanceCopyWithImpl( - NullInstance _value, $Res Function(NullInstance) _then) - : super(_value, (v) => _then(v as NullInstance)); - - @override - NullInstance get _value => super._value as NullInstance; +class __$$NullInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$NullInstanceImpl> + implements _$$NullInstanceImplCopyWith<$Res> { + __$$NullInstanceImplCopyWithImpl( + _$NullInstanceImpl _value, $Res Function(_$NullInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ Object? setter = freezed, }) { - return _then(NullInstance( - setter: setter == freezed + return _then(_$NullInstanceImpl( + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -1219,8 +1114,8 @@ class _$NullInstanceCopyWithImpl<$Res> /// @nodoc -class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { - _$NullInstance({required this.setter}) : super._(); +class _$NullInstanceImpl extends NullInstance with DiagnosticableTreeMixin { + _$NullInstanceImpl({required this.setter}) : super._(); @override final Setter? setter; @@ -1239,20 +1134,23 @@ class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is NullInstance && + other is _$NullInstanceImpl && (identical(other.setter, setter) || other.setter == setter)); } @override int get hashCode => Object.hash(runtimeType, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $NullInstanceCopyWith get copyWith => - _$NullInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$NullInstanceImplCopyWith<_$NullInstanceImpl> get copyWith => + __$$NullInstanceImplCopyWithImpl<_$NullInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -1291,23 +1189,23 @@ class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -1315,7 +1213,7 @@ class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -1378,14 +1276,14 @@ class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return nill?.call(this); } @@ -1411,54 +1309,58 @@ class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { } abstract class NullInstance extends InstanceDetails { - factory NullInstance({required Setter? setter}) = _$NullInstance; + factory NullInstance({required final Setter? setter}) = _$NullInstanceImpl; NullInstance._() : super._(); @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $NullInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$NullInstanceImplCopyWith<_$NullInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $BoolInstanceCopyWith<$Res> +abstract class _$$BoolInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $BoolInstanceCopyWith( - BoolInstance value, $Res Function(BoolInstance) then) = - _$BoolInstanceCopyWithImpl<$Res>; + factory _$$BoolInstanceImplCopyWith( + _$BoolInstanceImpl value, $Res Function(_$BoolInstanceImpl) then) = + __$$BoolInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({String displayString, String instanceRefId, Setter? setter}); } /// @nodoc -class _$BoolInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $BoolInstanceCopyWith<$Res> { - _$BoolInstanceCopyWithImpl( - BoolInstance _value, $Res Function(BoolInstance) _then) - : super(_value, (v) => _then(v as BoolInstance)); - - @override - BoolInstance get _value => super._value as BoolInstance; +class __$$BoolInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$BoolInstanceImpl> + implements _$$BoolInstanceImplCopyWith<$Res> { + __$$BoolInstanceImplCopyWithImpl( + _$BoolInstanceImpl _value, $Res Function(_$BoolInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? displayString = freezed, - Object? instanceRefId = freezed, + Object? displayString = null, + Object? instanceRefId = null, Object? setter = freezed, }) { - return _then(BoolInstance( - displayString == freezed + return _then(_$BoolInstanceImpl( + null == displayString ? _value.displayString : displayString // ignore: cast_nullable_to_non_nullable as String, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -1468,8 +1370,8 @@ class _$BoolInstanceCopyWithImpl<$Res> /// @nodoc -class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { - _$BoolInstance(this.displayString, +class _$BoolInstanceImpl extends BoolInstance with DiagnosticableTreeMixin { + _$BoolInstanceImpl(this.displayString, {required this.instanceRefId, required this.setter}) : super._(); @@ -1496,28 +1398,28 @@ class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is BoolInstance && - const DeepCollectionEquality() - .equals(other.displayString, displayString) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$BoolInstanceImpl && + (identical(other.displayString, displayString) || + other.displayString == displayString) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(displayString), - const DeepCollectionEquality().hash(instanceRefId), - setter); + int get hashCode => + Object.hash(runtimeType, displayString, instanceRefId, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $BoolInstanceCopyWith get copyWith => - _$BoolInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$BoolInstanceImplCopyWith<_$BoolInstanceImpl> get copyWith => + __$$BoolInstanceImplCopyWithImpl<_$BoolInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -1556,23 +1458,23 @@ class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -1580,7 +1482,7 @@ class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -1643,14 +1545,14 @@ class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return boolean?.call(this); } @@ -1676,58 +1578,62 @@ class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { } abstract class BoolInstance extends InstanceDetails { - factory BoolInstance(String displayString, - {required String instanceRefId, - required Setter? setter}) = _$BoolInstance; + factory BoolInstance(final String displayString, + {required final String instanceRefId, + required final Setter? setter}) = _$BoolInstanceImpl; BoolInstance._() : super._(); String get displayString; String get instanceRefId; @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $BoolInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$BoolInstanceImplCopyWith<_$BoolInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $NumInstanceCopyWith<$Res> +abstract class _$$NumInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $NumInstanceCopyWith( - NumInstance value, $Res Function(NumInstance) then) = - _$NumInstanceCopyWithImpl<$Res>; + factory _$$NumInstanceImplCopyWith( + _$NumInstanceImpl value, $Res Function(_$NumInstanceImpl) then) = + __$$NumInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({String displayString, String instanceRefId, Setter? setter}); } /// @nodoc -class _$NumInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $NumInstanceCopyWith<$Res> { - _$NumInstanceCopyWithImpl( - NumInstance _value, $Res Function(NumInstance) _then) - : super(_value, (v) => _then(v as NumInstance)); - - @override - NumInstance get _value => super._value as NumInstance; +class __$$NumInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$NumInstanceImpl> + implements _$$NumInstanceImplCopyWith<$Res> { + __$$NumInstanceImplCopyWithImpl( + _$NumInstanceImpl _value, $Res Function(_$NumInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? displayString = freezed, - Object? instanceRefId = freezed, + Object? displayString = null, + Object? instanceRefId = null, Object? setter = freezed, }) { - return _then(NumInstance( - displayString == freezed + return _then(_$NumInstanceImpl( + null == displayString ? _value.displayString : displayString // ignore: cast_nullable_to_non_nullable as String, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -1737,8 +1643,8 @@ class _$NumInstanceCopyWithImpl<$Res> /// @nodoc -class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { - _$NumInstance(this.displayString, +class _$NumInstanceImpl extends NumInstance with DiagnosticableTreeMixin { + _$NumInstanceImpl(this.displayString, {required this.instanceRefId, required this.setter}) : super._(); @@ -1765,28 +1671,28 @@ class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is NumInstance && - const DeepCollectionEquality() - .equals(other.displayString, displayString) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$NumInstanceImpl && + (identical(other.displayString, displayString) || + other.displayString == displayString) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(displayString), - const DeepCollectionEquality().hash(instanceRefId), - setter); + int get hashCode => + Object.hash(runtimeType, displayString, instanceRefId, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $NumInstanceCopyWith get copyWith => - _$NumInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$NumInstanceImplCopyWith<_$NumInstanceImpl> get copyWith => + __$$NumInstanceImplCopyWithImpl<_$NumInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -1825,23 +1731,23 @@ class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -1849,7 +1755,7 @@ class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -1912,14 +1818,14 @@ class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return number?.call(this); } @@ -1945,57 +1851,62 @@ class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { } abstract class NumInstance extends InstanceDetails { - factory NumInstance(String displayString, - {required String instanceRefId, required Setter? setter}) = _$NumInstance; + factory NumInstance(final String displayString, + {required final String instanceRefId, + required final Setter? setter}) = _$NumInstanceImpl; NumInstance._() : super._(); String get displayString; String get instanceRefId; @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $NumInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$NumInstanceImplCopyWith<_$NumInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $StringInstanceCopyWith<$Res> +abstract class _$$StringInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $StringInstanceCopyWith( - StringInstance value, $Res Function(StringInstance) then) = - _$StringInstanceCopyWithImpl<$Res>; + factory _$$StringInstanceImplCopyWith(_$StringInstanceImpl value, + $Res Function(_$StringInstanceImpl) then) = + __$$StringInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({String displayString, String instanceRefId, Setter? setter}); } /// @nodoc -class _$StringInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $StringInstanceCopyWith<$Res> { - _$StringInstanceCopyWithImpl( - StringInstance _value, $Res Function(StringInstance) _then) - : super(_value, (v) => _then(v as StringInstance)); - - @override - StringInstance get _value => super._value as StringInstance; +class __$$StringInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$StringInstanceImpl> + implements _$$StringInstanceImplCopyWith<$Res> { + __$$StringInstanceImplCopyWithImpl( + _$StringInstanceImpl _value, $Res Function(_$StringInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? displayString = freezed, - Object? instanceRefId = freezed, + Object? displayString = null, + Object? instanceRefId = null, Object? setter = freezed, }) { - return _then(StringInstance( - displayString == freezed + return _then(_$StringInstanceImpl( + null == displayString ? _value.displayString : displayString // ignore: cast_nullable_to_non_nullable as String, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -2005,8 +1916,8 @@ class _$StringInstanceCopyWithImpl<$Res> /// @nodoc -class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { - _$StringInstance(this.displayString, +class _$StringInstanceImpl extends StringInstance with DiagnosticableTreeMixin { + _$StringInstanceImpl(this.displayString, {required this.instanceRefId, required this.setter}) : super._(); @@ -2033,28 +1944,29 @@ class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is StringInstance && - const DeepCollectionEquality() - .equals(other.displayString, displayString) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$StringInstanceImpl && + (identical(other.displayString, displayString) || + other.displayString == displayString) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(displayString), - const DeepCollectionEquality().hash(instanceRefId), - setter); + int get hashCode => + Object.hash(runtimeType, displayString, instanceRefId, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $StringInstanceCopyWith get copyWith => - _$StringInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$StringInstanceImplCopyWith<_$StringInstanceImpl> get copyWith => + __$$StringInstanceImplCopyWithImpl<_$StringInstanceImpl>( + this, _$identity); @override @optionalTypeArgs @@ -2093,23 +2005,23 @@ class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -2117,7 +2029,7 @@ class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -2180,14 +2092,14 @@ class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return string?.call(this); } @@ -2213,28 +2125,32 @@ class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { } abstract class StringInstance extends InstanceDetails { - factory StringInstance(String displayString, - {required String instanceRefId, - required Setter? setter}) = _$StringInstance; + factory StringInstance(final String displayString, + {required final String instanceRefId, + required final Setter? setter}) = _$StringInstanceImpl; StringInstance._() : super._(); String get displayString; String get instanceRefId; @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $StringInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$StringInstanceImplCopyWith<_$StringInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MapInstanceCopyWith<$Res> +abstract class _$$MapInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $MapInstanceCopyWith( - MapInstance value, $Res Function(MapInstance) then) = - _$MapInstanceCopyWithImpl<$Res>; + factory _$$MapInstanceImplCopyWith( + _$MapInstanceImpl value, $Res Function(_$MapInstanceImpl) then) = + __$$MapInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call( {List keys, int hash, @@ -2243,37 +2159,37 @@ abstract class $MapInstanceCopyWith<$Res> } /// @nodoc -class _$MapInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $MapInstanceCopyWith<$Res> { - _$MapInstanceCopyWithImpl( - MapInstance _value, $Res Function(MapInstance) _then) - : super(_value, (v) => _then(v as MapInstance)); - - @override - MapInstance get _value => super._value as MapInstance; +class __$$MapInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$MapInstanceImpl> + implements _$$MapInstanceImplCopyWith<$Res> { + __$$MapInstanceImplCopyWithImpl( + _$MapInstanceImpl _value, $Res Function(_$MapInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? keys = freezed, - Object? hash = freezed, - Object? instanceRefId = freezed, + Object? keys = null, + Object? hash = null, + Object? instanceRefId = null, Object? setter = freezed, }) { - return _then(MapInstance( - keys == freezed - ? _value.keys + return _then(_$MapInstanceImpl( + null == keys + ? _value._keys : keys // ignore: cast_nullable_to_non_nullable as List, - hash: hash == freezed + hash: null == hash ? _value.hash : hash // ignore: cast_nullable_to_non_nullable as int, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -2283,13 +2199,20 @@ class _$MapInstanceCopyWithImpl<$Res> /// @nodoc -class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { - _$MapInstance(this.keys, +class _$MapInstanceImpl extends MapInstance with DiagnosticableTreeMixin { + _$MapInstanceImpl(final List keys, {required this.hash, required this.instanceRefId, required this.setter}) - : super._(); + : _keys = keys, + super._(); + final List _keys; @override - final List keys; + List get keys { + if (_keys is EqualUnmodifiableListView) return _keys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_keys); + } + @override final int hash; @override @@ -2314,29 +2237,28 @@ class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is MapInstance && - const DeepCollectionEquality().equals(other.keys, keys) && - const DeepCollectionEquality().equals(other.hash, hash) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$MapInstanceImpl && + const DeepCollectionEquality().equals(other._keys, _keys) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(keys), - const DeepCollectionEquality().hash(hash), - const DeepCollectionEquality().hash(instanceRefId), - setter); + int get hashCode => Object.hash(runtimeType, + const DeepCollectionEquality().hash(_keys), hash, instanceRefId, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $MapInstanceCopyWith get copyWith => - _$MapInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$MapInstanceImplCopyWith<_$MapInstanceImpl> get copyWith => + __$$MapInstanceImplCopyWithImpl<_$MapInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -2375,23 +2297,23 @@ class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -2399,7 +2321,7 @@ class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -2462,14 +2384,14 @@ class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return map?.call(this); } @@ -2495,10 +2417,10 @@ class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { } abstract class MapInstance extends InstanceDetails { - factory MapInstance(List keys, - {required int hash, - required String instanceRefId, - required Setter? setter}) = _$MapInstance; + factory MapInstance(final List keys, + {required final int hash, + required final String instanceRefId, + required final Setter? setter}) = _$MapInstanceImpl; MapInstance._() : super._(); List get keys; @@ -2506,54 +2428,58 @@ abstract class MapInstance extends InstanceDetails { String get instanceRefId; @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $MapInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$MapInstanceImplCopyWith<_$MapInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ListInstanceCopyWith<$Res> +abstract class _$$ListInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $ListInstanceCopyWith( - ListInstance value, $Res Function(ListInstance) then) = - _$ListInstanceCopyWithImpl<$Res>; + factory _$$ListInstanceImplCopyWith( + _$ListInstanceImpl value, $Res Function(_$ListInstanceImpl) then) = + __$$ListInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({int length, int hash, String instanceRefId, Setter? setter}); } /// @nodoc -class _$ListInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $ListInstanceCopyWith<$Res> { - _$ListInstanceCopyWithImpl( - ListInstance _value, $Res Function(ListInstance) _then) - : super(_value, (v) => _then(v as ListInstance)); - - @override - ListInstance get _value => super._value as ListInstance; +class __$$ListInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$ListInstanceImpl> + implements _$$ListInstanceImplCopyWith<$Res> { + __$$ListInstanceImplCopyWithImpl( + _$ListInstanceImpl _value, $Res Function(_$ListInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? length = freezed, - Object? hash = freezed, - Object? instanceRefId = freezed, + Object? length = null, + Object? hash = null, + Object? instanceRefId = null, Object? setter = freezed, }) { - return _then(ListInstance( - length: length == freezed + return _then(_$ListInstanceImpl( + length: null == length ? _value.length : length // ignore: cast_nullable_to_non_nullable as int, - hash: hash == freezed + hash: null == hash ? _value.hash : hash // ignore: cast_nullable_to_non_nullable as int, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, @@ -2563,8 +2489,8 @@ class _$ListInstanceCopyWithImpl<$Res> /// @nodoc -class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { - _$ListInstance( +class _$ListInstanceImpl extends ListInstance with DiagnosticableTreeMixin { + _$ListInstanceImpl( {required this.length, required this.hash, required this.instanceRefId, @@ -2597,29 +2523,28 @@ class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is ListInstance && - const DeepCollectionEquality().equals(other.length, length) && - const DeepCollectionEquality().equals(other.hash, hash) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$ListInstanceImpl && + (identical(other.length, length) || other.length == length) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(length), - const DeepCollectionEquality().hash(hash), - const DeepCollectionEquality().hash(instanceRefId), - setter); + int get hashCode => + Object.hash(runtimeType, length, hash, instanceRefId, setter); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $ListInstanceCopyWith get copyWith => - _$ListInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$ListInstanceImplCopyWith<_$ListInstanceImpl> get copyWith => + __$$ListInstanceImplCopyWithImpl<_$ListInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -2658,23 +2583,23 @@ class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -2682,7 +2607,7 @@ class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -2745,14 +2670,14 @@ class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return list?.call(this); } @@ -2779,10 +2704,10 @@ class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { abstract class ListInstance extends InstanceDetails { factory ListInstance( - {required int length, - required int hash, - required String instanceRefId, - required Setter? setter}) = _$ListInstance; + {required final int length, + required final int hash, + required final String instanceRefId, + required final Setter? setter}) = _$ListInstanceImpl; ListInstance._() : super._(); int get length; @@ -2790,19 +2715,23 @@ abstract class ListInstance extends InstanceDetails { String get instanceRefId; @override Setter? get setter; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $ListInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ListInstanceImplCopyWith<_$ListInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ObjectInstanceCopyWith<$Res> +abstract class _$$ObjectInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $ObjectInstanceCopyWith( - ObjectInstance value, $Res Function(ObjectInstance) then) = - _$ObjectInstanceCopyWithImpl<$Res>; + factory _$$ObjectInstanceImplCopyWith(_$ObjectInstanceImpl value, + $Res Function(_$ObjectInstanceImpl) then) = + __$$ObjectInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call( {List fields, String type, @@ -2813,47 +2742,47 @@ abstract class $ObjectInstanceCopyWith<$Res> } /// @nodoc -class _$ObjectInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $ObjectInstanceCopyWith<$Res> { - _$ObjectInstanceCopyWithImpl( - ObjectInstance _value, $Res Function(ObjectInstance) _then) - : super(_value, (v) => _then(v as ObjectInstance)); - - @override - ObjectInstance get _value => super._value as ObjectInstance; +class __$$ObjectInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$ObjectInstanceImpl> + implements _$$ObjectInstanceImplCopyWith<$Res> { + __$$ObjectInstanceImplCopyWithImpl( + _$ObjectInstanceImpl _value, $Res Function(_$ObjectInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? fields = freezed, - Object? type = freezed, - Object? hash = freezed, - Object? instanceRefId = freezed, + Object? fields = null, + Object? type = null, + Object? hash = null, + Object? instanceRefId = null, Object? setter = freezed, - Object? evalForInstance = freezed, + Object? evalForInstance = null, }) { - return _then(ObjectInstance( - fields == freezed - ? _value.fields + return _then(_$ObjectInstanceImpl( + null == fields + ? _value._fields : fields // ignore: cast_nullable_to_non_nullable as List, - type: type == freezed + type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable as String, - hash: hash == freezed + hash: null == hash ? _value.hash : hash // ignore: cast_nullable_to_non_nullable as int, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, - evalForInstance: evalForInstance == freezed + evalForInstance: null == evalForInstance ? _value.evalForInstance : evalForInstance // ignore: cast_nullable_to_non_nullable as EvalOnDartLibrary, @@ -2863,17 +2792,24 @@ class _$ObjectInstanceCopyWithImpl<$Res> /// @nodoc -class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { - _$ObjectInstance(this.fields, +class _$ObjectInstanceImpl extends ObjectInstance with DiagnosticableTreeMixin { + _$ObjectInstanceImpl(final List fields, {required this.type, required this.hash, required this.instanceRefId, required this.setter, required this.evalForInstance}) - : super._(); + : _fields = fields, + super._(); + final List _fields; @override - final List fields; + List get fields { + if (_fields is EqualUnmodifiableListView) return _fields; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_fields); + } + @override final String type; @override @@ -2882,11 +2818,11 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { final String instanceRefId; @override final Setter? setter; - @override /// An [EvalOnDartLibrary] associated with the library of this object /// /// This allows to edit private properties. + @override final EvalOnDartLibrary evalForInstance; @override @@ -2908,34 +2844,38 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is ObjectInstance && - const DeepCollectionEquality().equals(other.fields, fields) && - const DeepCollectionEquality().equals(other.type, type) && - const DeepCollectionEquality().equals(other.hash, hash) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId) && + other is _$ObjectInstanceImpl && + const DeepCollectionEquality().equals(other._fields, _fields) && + (identical(other.type, type) || other.type == type) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId) && (identical(other.setter, setter) || other.setter == setter) && - const DeepCollectionEquality() - .equals(other.evalForInstance, evalForInstance)); + (identical(other.evalForInstance, evalForInstance) || + other.evalForInstance == evalForInstance)); } @override int get hashCode => Object.hash( runtimeType, - const DeepCollectionEquality().hash(fields), - const DeepCollectionEquality().hash(type), - const DeepCollectionEquality().hash(hash), - const DeepCollectionEquality().hash(instanceRefId), + const DeepCollectionEquality().hash(_fields), + type, + hash, + instanceRefId, setter, - const DeepCollectionEquality().hash(evalForInstance)); + evalForInstance); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $ObjectInstanceCopyWith get copyWith => - _$ObjectInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$ObjectInstanceImplCopyWith<_$ObjectInstanceImpl> get copyWith => + __$$ObjectInstanceImplCopyWithImpl<_$ObjectInstanceImpl>( + this, _$identity); @override @optionalTypeArgs @@ -2974,23 +2914,23 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -2998,7 +2938,7 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -3062,14 +3002,14 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return object?.call(this); } @@ -3095,12 +3035,12 @@ class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { } abstract class ObjectInstance extends InstanceDetails { - factory ObjectInstance(List fields, - {required String type, - required int hash, - required String instanceRefId, - required Setter? setter, - required EvalOnDartLibrary evalForInstance}) = _$ObjectInstance; + factory ObjectInstance(final List fields, + {required final String type, + required final int hash, + required final String instanceRefId, + required final Setter? setter, + required final EvalOnDartLibrary evalForInstance}) = _$ObjectInstanceImpl; ObjectInstance._() : super._(); List get fields; @@ -3114,54 +3054,58 @@ abstract class ObjectInstance extends InstanceDetails { /// /// This allows to edit private properties. EvalOnDartLibrary get evalForInstance; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $ObjectInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ObjectInstanceImplCopyWith<_$ObjectInstanceImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $EnumInstanceCopyWith<$Res> +abstract class _$$EnumInstanceImplCopyWith<$Res> implements $InstanceDetailsCopyWith<$Res> { - factory $EnumInstanceCopyWith( - EnumInstance value, $Res Function(EnumInstance) then) = - _$EnumInstanceCopyWithImpl<$Res>; + factory _$$EnumInstanceImplCopyWith( + _$EnumInstanceImpl value, $Res Function(_$EnumInstanceImpl) then) = + __$$EnumInstanceImplCopyWithImpl<$Res>; @override + @useResult $Res call({String type, String value, Setter? setter, String instanceRefId}); } /// @nodoc -class _$EnumInstanceCopyWithImpl<$Res> - extends _$InstanceDetailsCopyWithImpl<$Res> - implements $EnumInstanceCopyWith<$Res> { - _$EnumInstanceCopyWithImpl( - EnumInstance _value, $Res Function(EnumInstance) _then) - : super(_value, (v) => _then(v as EnumInstance)); - - @override - EnumInstance get _value => super._value as EnumInstance; +class __$$EnumInstanceImplCopyWithImpl<$Res> + extends _$InstanceDetailsCopyWithImpl<$Res, _$EnumInstanceImpl> + implements _$$EnumInstanceImplCopyWith<$Res> { + __$$EnumInstanceImplCopyWithImpl( + _$EnumInstanceImpl _value, $Res Function(_$EnumInstanceImpl) _then) + : super(_value, _then); + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? type = freezed, - Object? value = freezed, + Object? type = null, + Object? value = null, Object? setter = freezed, - Object? instanceRefId = freezed, + Object? instanceRefId = null, }) { - return _then(EnumInstance( - type: type == freezed + return _then(_$EnumInstanceImpl( + type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable as String, - value: value == freezed + value: null == value ? _value.value : value // ignore: cast_nullable_to_non_nullable as String, - setter: setter == freezed + setter: freezed == setter ? _value.setter : setter // ignore: cast_nullable_to_non_nullable as Setter?, - instanceRefId: instanceRefId == freezed + instanceRefId: null == instanceRefId ? _value.instanceRefId : instanceRefId // ignore: cast_nullable_to_non_nullable as String, @@ -3171,8 +3115,8 @@ class _$EnumInstanceCopyWithImpl<$Res> /// @nodoc -class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { - _$EnumInstance( +class _$EnumInstanceImpl extends EnumInstance with DiagnosticableTreeMixin { + _$EnumInstanceImpl( {required this.type, required this.value, required this.setter, @@ -3205,29 +3149,28 @@ class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is EnumInstance && - const DeepCollectionEquality().equals(other.type, type) && - const DeepCollectionEquality().equals(other.value, value) && + other is _$EnumInstanceImpl && + (identical(other.type, type) || other.type == type) && + (identical(other.value, value) || other.value == value) && (identical(other.setter, setter) || other.setter == setter) && - const DeepCollectionEquality() - .equals(other.instanceRefId, instanceRefId)); + (identical(other.instanceRefId, instanceRefId) || + other.instanceRefId == instanceRefId)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(type), - const DeepCollectionEquality().hash(value), - setter, - const DeepCollectionEquality().hash(instanceRefId)); + int get hashCode => + Object.hash(runtimeType, type, value, setter, instanceRefId); - @JsonKey(ignore: true) + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - $EnumInstanceCopyWith get copyWith => - _$EnumInstanceCopyWithImpl(this, _$identity); + @pragma('vm:prefer-inline') + _$$EnumInstanceImplCopyWith<_$EnumInstanceImpl> get copyWith => + __$$EnumInstanceImplCopyWithImpl<_$EnumInstanceImpl>(this, _$identity); @override @optionalTypeArgs @@ -3266,23 +3209,23 @@ class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(Setter? setter)? nill, - TResult Function( + TResult? Function(Setter? setter)? nill, + TResult? Function( String displayString, String instanceRefId, Setter? setter)? boolean, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? number, - TResult Function( + TResult? Function( String displayString, String instanceRefId, Setter? setter)? string, - TResult Function(List keys, int hash, String instanceRefId, - Setter? setter)? + TResult? Function(List keys, int hash, + String instanceRefId, Setter? setter)? map, - TResult Function( + TResult? Function( int length, int hash, String instanceRefId, Setter? setter)? list, - TResult Function( + TResult? Function( List fields, String type, int hash, @@ -3290,7 +3233,7 @@ class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { Setter? setter, EvalOnDartLibrary evalForInstance)? object, - TResult Function( + TResult? Function( String type, String value, Setter? setter, String instanceRefId)? enumeration, }) { @@ -3353,14 +3296,14 @@ class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(NullInstance value)? nill, - TResult Function(BoolInstance value)? boolean, - TResult Function(NumInstance value)? number, - TResult Function(StringInstance value)? string, - TResult Function(MapInstance value)? map, - TResult Function(ListInstance value)? list, - TResult Function(ObjectInstance value)? object, - TResult Function(EnumInstance value)? enumeration, + TResult? Function(NullInstance value)? nill, + TResult? Function(BoolInstance value)? boolean, + TResult? Function(NumInstance value)? number, + TResult? Function(StringInstance value)? string, + TResult? Function(MapInstance value)? map, + TResult? Function(ListInstance value)? list, + TResult? Function(ObjectInstance value)? object, + TResult? Function(EnumInstance value)? enumeration, }) { return enumeration?.call(this); } @@ -3387,10 +3330,10 @@ class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { abstract class EnumInstance extends InstanceDetails { factory EnumInstance( - {required String type, - required String value, - required Setter? setter, - required String instanceRefId}) = _$EnumInstance; + {required final String type, + required final String value, + required final Setter? setter, + required final String instanceRefId}) = _$EnumInstanceImpl; EnumInstance._() : super._(); String get type; @@ -3398,40 +3341,18 @@ abstract class EnumInstance extends InstanceDetails { @override Setter? get setter; String get instanceRefId; + + /// Create a copy of InstanceDetails + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - $EnumInstanceCopyWith get copyWith => + @JsonKey(includeFromJson: false, includeToJson: false) + _$$EnumInstanceImplCopyWith<_$EnumInstanceImpl> get copyWith => throw _privateConstructorUsedError; } -/// @nodoc -class _$InstancePathTearOff { - const _$InstancePathTearOff(); - - _InstancePathFromInstanceId fromInstanceId(String instanceId, - {List pathToProperty = const []}) { - return _InstancePathFromInstanceId( - instanceId, - pathToProperty: pathToProperty, - ); - } - - _InstancePathFromProviderId fromProviderId(String providerId, - {List pathToProperty = const []}) { - return _InstancePathFromProviderId( - providerId, - pathToProperty: pathToProperty, - ); - } -} - -/// @nodoc -const $InstancePath = _$InstancePathTearOff(); - /// @nodoc mixin _$InstancePath { List get pathToProperty => throw _privateConstructorUsedError; - @optionalTypeArgs TResult when({ required TResult Function( @@ -3444,9 +3365,9 @@ mixin _$InstancePath { throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult Function(String instanceId, List pathToProperty)? + TResult? Function(String instanceId, List pathToProperty)? fromInstanceId, - TResult Function(String providerId, List pathToProperty)? + TResult? Function(String providerId, List pathToProperty)? fromProviderId, }) => throw _privateConstructorUsedError; @@ -3467,8 +3388,8 @@ mixin _$InstancePath { throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, - TResult Function(_InstancePathFromProviderId value)? fromProviderId, + TResult? Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult? Function(_InstancePathFromProviderId value)? fromProviderId, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -3479,7 +3400,9 @@ mixin _$InstancePath { }) => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $InstancePathCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -3488,66 +3411,73 @@ mixin _$InstancePath { abstract class $InstancePathCopyWith<$Res> { factory $InstancePathCopyWith( InstancePath value, $Res Function(InstancePath) then) = - _$InstancePathCopyWithImpl<$Res>; + _$InstancePathCopyWithImpl<$Res, InstancePath>; + @useResult $Res call({List pathToProperty}); } /// @nodoc -class _$InstancePathCopyWithImpl<$Res> implements $InstancePathCopyWith<$Res> { +class _$InstancePathCopyWithImpl<$Res, $Val extends InstancePath> + implements $InstancePathCopyWith<$Res> { _$InstancePathCopyWithImpl(this._value, this._then); - final InstancePath _value; // ignore: unused_field - final $Res Function(InstancePath) _then; + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? pathToProperty = freezed, + Object? pathToProperty = null, }) { return _then(_value.copyWith( - pathToProperty: pathToProperty == freezed + pathToProperty: null == pathToProperty ? _value.pathToProperty : pathToProperty // ignore: cast_nullable_to_non_nullable as List, - )); + ) as $Val); } } /// @nodoc -abstract class _$InstancePathFromInstanceIdCopyWith<$Res> +abstract class _$$InstancePathFromInstanceIdImplCopyWith<$Res> implements $InstancePathCopyWith<$Res> { - factory _$InstancePathFromInstanceIdCopyWith( - _InstancePathFromInstanceId value, - $Res Function(_InstancePathFromInstanceId) then) = - __$InstancePathFromInstanceIdCopyWithImpl<$Res>; + factory _$$InstancePathFromInstanceIdImplCopyWith( + _$InstancePathFromInstanceIdImpl value, + $Res Function(_$InstancePathFromInstanceIdImpl) then) = + __$$InstancePathFromInstanceIdImplCopyWithImpl<$Res>; @override + @useResult $Res call({String instanceId, List pathToProperty}); } /// @nodoc -class __$InstancePathFromInstanceIdCopyWithImpl<$Res> - extends _$InstancePathCopyWithImpl<$Res> - implements _$InstancePathFromInstanceIdCopyWith<$Res> { - __$InstancePathFromInstanceIdCopyWithImpl(_InstancePathFromInstanceId _value, - $Res Function(_InstancePathFromInstanceId) _then) - : super(_value, (v) => _then(v as _InstancePathFromInstanceId)); - - @override - _InstancePathFromInstanceId get _value => - super._value as _InstancePathFromInstanceId; - +class __$$InstancePathFromInstanceIdImplCopyWithImpl<$Res> + extends _$InstancePathCopyWithImpl<$Res, _$InstancePathFromInstanceIdImpl> + implements _$$InstancePathFromInstanceIdImplCopyWith<$Res> { + __$$InstancePathFromInstanceIdImplCopyWithImpl( + _$InstancePathFromInstanceIdImpl _value, + $Res Function(_$InstancePathFromInstanceIdImpl) _then) + : super(_value, _then); + + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? instanceId = freezed, - Object? pathToProperty = freezed, + Object? instanceId = null, + Object? pathToProperty = null, }) { - return _then(_InstancePathFromInstanceId( - instanceId == freezed + return _then(_$InstancePathFromInstanceIdImpl( + null == instanceId ? _value.instanceId : instanceId // ignore: cast_nullable_to_non_nullable as String, - pathToProperty: pathToProperty == freezed - ? _value.pathToProperty + pathToProperty: null == pathToProperty + ? _value._pathToProperty : pathToProperty // ignore: cast_nullable_to_non_nullable as List, )); @@ -3556,17 +3486,23 @@ class __$InstancePathFromInstanceIdCopyWithImpl<$Res> /// @nodoc -class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId +class _$InstancePathFromInstanceIdImpl extends _InstancePathFromInstanceId with DiagnosticableTreeMixin { - const _$_InstancePathFromInstanceId(this.instanceId, - {this.pathToProperty = const []}) - : super._(); + const _$InstancePathFromInstanceIdImpl(this.instanceId, + {final List pathToProperty = const []}) + : _pathToProperty = pathToProperty, + super._(); @override final String instanceId; - @JsonKey() + final List _pathToProperty; @override - final List pathToProperty; + @JsonKey() + List get pathToProperty { + if (_pathToProperty is EqualUnmodifiableListView) return _pathToProperty; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_pathToProperty); + } @override String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { @@ -3583,27 +3519,28 @@ class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _InstancePathFromInstanceId && + other is _$InstancePathFromInstanceIdImpl && + (identical(other.instanceId, instanceId) || + other.instanceId == instanceId) && const DeepCollectionEquality() - .equals(other.instanceId, instanceId) && - const DeepCollectionEquality() - .equals(other.pathToProperty, pathToProperty)); + .equals(other._pathToProperty, _pathToProperty)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(instanceId), - const DeepCollectionEquality().hash(pathToProperty)); + int get hashCode => Object.hash(runtimeType, instanceId, + const DeepCollectionEquality().hash(_pathToProperty)); - @JsonKey(ignore: true) + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - _$InstancePathFromInstanceIdCopyWith<_InstancePathFromInstanceId> - get copyWith => __$InstancePathFromInstanceIdCopyWithImpl< - _InstancePathFromInstanceId>(this, _$identity); + @pragma('vm:prefer-inline') + _$$InstancePathFromInstanceIdImplCopyWith<_$InstancePathFromInstanceIdImpl> + get copyWith => __$$InstancePathFromInstanceIdImplCopyWithImpl< + _$InstancePathFromInstanceIdImpl>(this, _$identity); @override @optionalTypeArgs @@ -3621,9 +3558,9 @@ class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(String instanceId, List pathToProperty)? + TResult? Function(String instanceId, List pathToProperty)? fromInstanceId, - TResult Function(String providerId, List pathToProperty)? + TResult? Function(String providerId, List pathToProperty)? fromProviderId, }) { return fromInstanceId?.call(instanceId, pathToProperty); @@ -3656,8 +3593,8 @@ class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, - TResult Function(_InstancePathFromProviderId value)? fromProviderId, + TResult? Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult? Function(_InstancePathFromProviderId value)? fromProviderId, }) { return fromInstanceId?.call(this); } @@ -3677,54 +3614,59 @@ class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId } abstract class _InstancePathFromInstanceId extends InstancePath { - const factory _InstancePathFromInstanceId(String instanceId, - {List pathToProperty}) = _$_InstancePathFromInstanceId; + const factory _InstancePathFromInstanceId(final String instanceId, + {final List pathToProperty}) = + _$InstancePathFromInstanceIdImpl; const _InstancePathFromInstanceId._() : super._(); String get instanceId; @override List get pathToProperty; + + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - _$InstancePathFromInstanceIdCopyWith<_InstancePathFromInstanceId> + @JsonKey(includeFromJson: false, includeToJson: false) + _$$InstancePathFromInstanceIdImplCopyWith<_$InstancePathFromInstanceIdImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$InstancePathFromProviderIdCopyWith<$Res> +abstract class _$$InstancePathFromProviderIdImplCopyWith<$Res> implements $InstancePathCopyWith<$Res> { - factory _$InstancePathFromProviderIdCopyWith( - _InstancePathFromProviderId value, - $Res Function(_InstancePathFromProviderId) then) = - __$InstancePathFromProviderIdCopyWithImpl<$Res>; + factory _$$InstancePathFromProviderIdImplCopyWith( + _$InstancePathFromProviderIdImpl value, + $Res Function(_$InstancePathFromProviderIdImpl) then) = + __$$InstancePathFromProviderIdImplCopyWithImpl<$Res>; @override + @useResult $Res call({String providerId, List pathToProperty}); } /// @nodoc -class __$InstancePathFromProviderIdCopyWithImpl<$Res> - extends _$InstancePathCopyWithImpl<$Res> - implements _$InstancePathFromProviderIdCopyWith<$Res> { - __$InstancePathFromProviderIdCopyWithImpl(_InstancePathFromProviderId _value, - $Res Function(_InstancePathFromProviderId) _then) - : super(_value, (v) => _then(v as _InstancePathFromProviderId)); - - @override - _InstancePathFromProviderId get _value => - super._value as _InstancePathFromProviderId; - +class __$$InstancePathFromProviderIdImplCopyWithImpl<$Res> + extends _$InstancePathCopyWithImpl<$Res, _$InstancePathFromProviderIdImpl> + implements _$$InstancePathFromProviderIdImplCopyWith<$Res> { + __$$InstancePathFromProviderIdImplCopyWithImpl( + _$InstancePathFromProviderIdImpl _value, + $Res Function(_$InstancePathFromProviderIdImpl) _then) + : super(_value, _then); + + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? providerId = freezed, - Object? pathToProperty = freezed, + Object? providerId = null, + Object? pathToProperty = null, }) { - return _then(_InstancePathFromProviderId( - providerId == freezed + return _then(_$InstancePathFromProviderIdImpl( + null == providerId ? _value.providerId : providerId // ignore: cast_nullable_to_non_nullable as String, - pathToProperty: pathToProperty == freezed - ? _value.pathToProperty + pathToProperty: null == pathToProperty + ? _value._pathToProperty : pathToProperty // ignore: cast_nullable_to_non_nullable as List, )); @@ -3733,17 +3675,23 @@ class __$InstancePathFromProviderIdCopyWithImpl<$Res> /// @nodoc -class _$_InstancePathFromProviderId extends _InstancePathFromProviderId +class _$InstancePathFromProviderIdImpl extends _InstancePathFromProviderId with DiagnosticableTreeMixin { - const _$_InstancePathFromProviderId(this.providerId, - {this.pathToProperty = const []}) - : super._(); + const _$InstancePathFromProviderIdImpl(this.providerId, + {final List pathToProperty = const []}) + : _pathToProperty = pathToProperty, + super._(); @override final String providerId; - @JsonKey() + final List _pathToProperty; @override - final List pathToProperty; + @JsonKey() + List get pathToProperty { + if (_pathToProperty is EqualUnmodifiableListView) return _pathToProperty; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_pathToProperty); + } @override String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { @@ -3760,27 +3708,28 @@ class _$_InstancePathFromProviderId extends _InstancePathFromProviderId } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _InstancePathFromProviderId && + other is _$InstancePathFromProviderIdImpl && + (identical(other.providerId, providerId) || + other.providerId == providerId) && const DeepCollectionEquality() - .equals(other.providerId, providerId) && - const DeepCollectionEquality() - .equals(other.pathToProperty, pathToProperty)); + .equals(other._pathToProperty, _pathToProperty)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(providerId), - const DeepCollectionEquality().hash(pathToProperty)); + int get hashCode => Object.hash(runtimeType, providerId, + const DeepCollectionEquality().hash(_pathToProperty)); - @JsonKey(ignore: true) + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - _$InstancePathFromProviderIdCopyWith<_InstancePathFromProviderId> - get copyWith => __$InstancePathFromProviderIdCopyWithImpl< - _InstancePathFromProviderId>(this, _$identity); + @pragma('vm:prefer-inline') + _$$InstancePathFromProviderIdImplCopyWith<_$InstancePathFromProviderIdImpl> + get copyWith => __$$InstancePathFromProviderIdImplCopyWithImpl< + _$InstancePathFromProviderIdImpl>(this, _$identity); @override @optionalTypeArgs @@ -3798,9 +3747,9 @@ class _$_InstancePathFromProviderId extends _InstancePathFromProviderId @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(String instanceId, List pathToProperty)? + TResult? Function(String instanceId, List pathToProperty)? fromInstanceId, - TResult Function(String providerId, List pathToProperty)? + TResult? Function(String providerId, List pathToProperty)? fromProviderId, }) { return fromProviderId?.call(providerId, pathToProperty); @@ -3833,8 +3782,8 @@ class _$_InstancePathFromProviderId extends _InstancePathFromProviderId @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, - TResult Function(_InstancePathFromProviderId value)? fromProviderId, + TResult? Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult? Function(_InstancePathFromProviderId value)? fromProviderId, }) { return fromProviderId?.call(this); } @@ -3854,15 +3803,19 @@ class _$_InstancePathFromProviderId extends _InstancePathFromProviderId } abstract class _InstancePathFromProviderId extends InstancePath { - const factory _InstancePathFromProviderId(String providerId, - {List pathToProperty}) = _$_InstancePathFromProviderId; + const factory _InstancePathFromProviderId(final String providerId, + {final List pathToProperty}) = + _$InstancePathFromProviderIdImpl; const _InstancePathFromProviderId._() : super._(); String get providerId; @override List get pathToProperty; + + /// Create a copy of InstancePath + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) - _$InstancePathFromProviderIdCopyWith<_InstancePathFromProviderId> + @JsonKey(includeFromJson: false, includeToJson: false) + _$$InstancePathFromProviderIdImplCopyWith<_$InstancePathFromProviderIdImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart index e7092179..1a763c1e 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart @@ -10,10 +10,12 @@ import 'dart:math' as math; import 'package:devtools_app_shared/service.dart'; import 'package:devtools_app_shared/ui.dart'; import 'package:devtools_app_shared/utils.dart'; +import 'package:devtools_extensions/api.dart'; +import 'package:devtools_extensions/devtools_extensions.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart' hide shortHash; import 'instance_details.dart'; import 'instance_providers.dart'; @@ -69,7 +71,7 @@ final estimatedChildCountProvider = }, list: (instance) { return expandableEstimatedChildCount( - List.generate(instance.length, $PathToProperty.listIndex), + List.generate(instance.length, PathToProperty.listIndex), ); }, object: (instance) { @@ -118,15 +120,14 @@ class _InstanceViewerState extends ConsumerState { Iterable _buildError( Object error, - StackTrace? _, + StackTrace? stack, InstancePath __, ) { if (error is SentinelException) { final valueAsString = error.sentinel.valueAsString; if (valueAsString != null) return [Text(valueAsString)]; } - - return const [Text('')]; + return [Text('\n$stack')]; } Iterable _buildListViewItems( diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart index 746129b8..7c78051e 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart @@ -2,18 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:collection/collection.dart'; import 'package:devtools_app_shared/service.dart'; import 'package:flutter/foundation.dart'; import 'package:vm_service/vm_service.dart' hide SentinelException, Error; -import 'fake_freezed_annotation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; -// This part is generated using `package:freezed`, but without the devtool depending -// on the package. -// To update the generated files, temporarily add freezed/freezed_annotation/build_runner -// as dependencies; replace the `fake_freezed_annotation.dart` import with the -// real annotation package, then execute `pub run build_runner build`. part 'result.freezed.dart'; @freezed diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart index 54635970..d045109f 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart @@ -1,6 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark part of 'result.dart'; @@ -11,28 +12,7 @@ part of 'result.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$ResultTearOff { - const _$ResultTearOff(); - - _ResultData data(T value) { - return _ResultData( - value, - ); - } - - _ResultError error(Object error, StackTrace stackTrace) { - return _ResultError( - error, - stackTrace, - ); - } -} - -/// @nodoc -const $Result = _$ResultTearOff(); + '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#adding-getters-and-methods-to-our-models'); /// @nodoc mixin _$Result { @@ -44,8 +24,8 @@ mixin _$Result { throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult Function(T value)? data, - TResult Function(Object error, StackTrace stackTrace)? error, + TResult? Function(T value)? data, + TResult? Function(Object error, StackTrace stackTrace)? error, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -63,8 +43,8 @@ mixin _$Result { throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_ResultData value)? data, - TResult Function(_ResultError value)? error, + TResult? Function(_ResultData value)? data, + TResult? Function(_ResultError value)? error, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -79,42 +59,49 @@ mixin _$Result { /// @nodoc abstract class $ResultCopyWith { factory $ResultCopyWith(Result value, $Res Function(Result) then) = - _$ResultCopyWithImpl; + _$ResultCopyWithImpl>; } /// @nodoc -class _$ResultCopyWithImpl implements $ResultCopyWith { +class _$ResultCopyWithImpl> + implements $ResultCopyWith { _$ResultCopyWithImpl(this._value, this._then); - final Result _value; // ignore: unused_field - final $Res Function(Result) _then; + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. } /// @nodoc -abstract class _$ResultDataCopyWith { - factory _$ResultDataCopyWith( - _ResultData value, $Res Function(_ResultData) then) = - __$ResultDataCopyWithImpl; +abstract class _$$ResultDataImplCopyWith { + factory _$$ResultDataImplCopyWith( + _$ResultDataImpl value, $Res Function(_$ResultDataImpl) then) = + __$$ResultDataImplCopyWithImpl; + @useResult $Res call({T value}); } /// @nodoc -class __$ResultDataCopyWithImpl extends _$ResultCopyWithImpl - implements _$ResultDataCopyWith { - __$ResultDataCopyWithImpl( - _ResultData _value, $Res Function(_ResultData) _then) - : super(_value, (v) => _then(v as _ResultData)); - - @override - _ResultData get _value => super._value as _ResultData; - +class __$$ResultDataImplCopyWithImpl + extends _$ResultCopyWithImpl> + implements _$$ResultDataImplCopyWith { + __$$ResultDataImplCopyWithImpl( + _$ResultDataImpl _value, $Res Function(_$ResultDataImpl) _then) + : super(_value, _then); + + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ Object? value = freezed, }) { - return _then(_ResultData( - value == freezed + return _then(_$ResultDataImpl( + freezed == value ? _value.value : value // ignore: cast_nullable_to_non_nullable as T, @@ -124,8 +111,8 @@ class __$ResultDataCopyWithImpl extends _$ResultCopyWithImpl /// @nodoc -class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { - _$_ResultData(this.value) : super._(); +class _$ResultDataImpl extends _ResultData with DiagnosticableTreeMixin { + _$ResultDataImpl(this.value) : super._(); @override final T value; @@ -144,10 +131,10 @@ class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _ResultData && + other is _$ResultDataImpl && const DeepCollectionEquality().equals(other.value, value)); } @@ -155,10 +142,13 @@ class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(value)); - @JsonKey(ignore: true) + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - _$ResultDataCopyWith> get copyWith => - __$ResultDataCopyWithImpl>(this, _$identity); + @pragma('vm:prefer-inline') + _$$ResultDataImplCopyWith> get copyWith => + __$$ResultDataImplCopyWithImpl>(this, _$identity); @override @optionalTypeArgs @@ -172,8 +162,8 @@ class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(T value)? data, - TResult Function(Object error, StackTrace stackTrace)? error, + TResult? Function(T value)? data, + TResult? Function(Object error, StackTrace stackTrace)? error, }) { return data?.call(value); } @@ -203,8 +193,8 @@ class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_ResultData value)? data, - TResult Function(_ResultError value)? error, + TResult? Function(_ResultData value)? data, + TResult? Function(_ResultError value)? error, }) { return data?.call(this); } @@ -224,44 +214,46 @@ class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { } abstract class _ResultData extends Result { - factory _ResultData(T value) = _$_ResultData; + factory _ResultData(final T value) = _$ResultDataImpl; _ResultData._() : super._(); T get value; - @JsonKey(ignore: true) - _$ResultDataCopyWith> get copyWith => + + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ResultDataImplCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$ResultErrorCopyWith { - factory _$ResultErrorCopyWith( - _ResultError value, $Res Function(_ResultError) then) = - __$ResultErrorCopyWithImpl; +abstract class _$$ResultErrorImplCopyWith { + factory _$$ResultErrorImplCopyWith(_$ResultErrorImpl value, + $Res Function(_$ResultErrorImpl) then) = + __$$ResultErrorImplCopyWithImpl; + @useResult $Res call({Object error, StackTrace stackTrace}); } /// @nodoc -class __$ResultErrorCopyWithImpl extends _$ResultCopyWithImpl - implements _$ResultErrorCopyWith { - __$ResultErrorCopyWithImpl( - _ResultError _value, $Res Function(_ResultError) _then) - : super(_value, (v) => _then(v as _ResultError)); - - @override - _ResultError get _value => super._value as _ResultError; - +class __$$ResultErrorImplCopyWithImpl + extends _$ResultCopyWithImpl> + implements _$$ResultErrorImplCopyWith { + __$$ResultErrorImplCopyWithImpl( + _$ResultErrorImpl _value, $Res Function(_$ResultErrorImpl) _then) + : super(_value, _then); + + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') @override $Res call({ - Object? error = freezed, - Object? stackTrace = freezed, + Object? error = null, + Object? stackTrace = null, }) { - return _then(_ResultError( - error == freezed - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as Object, - stackTrace == freezed + return _then(_$ResultErrorImpl( + null == error ? _value.error : error, + null == stackTrace ? _value.stackTrace : stackTrace // ignore: cast_nullable_to_non_nullable as StackTrace, @@ -271,8 +263,9 @@ class __$ResultErrorCopyWithImpl extends _$ResultCopyWithImpl /// @nodoc -class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { - _$_ResultError(this.error, this.stackTrace) : super._(); +class _$ResultErrorImpl extends _ResultError + with DiagnosticableTreeMixin { + _$ResultErrorImpl(this.error, this.stackTrace) : super._(); @override final Object error; @@ -294,25 +287,27 @@ class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _ResultError && + other is _$ResultErrorImpl && const DeepCollectionEquality().equals(other.error, error) && - const DeepCollectionEquality() - .equals(other.stackTrace, stackTrace)); + (identical(other.stackTrace, stackTrace) || + other.stackTrace == stackTrace)); } @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(error), - const DeepCollectionEquality().hash(stackTrace)); + runtimeType, const DeepCollectionEquality().hash(error), stackTrace); - @JsonKey(ignore: true) + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override - _$ResultErrorCopyWith> get copyWith => - __$ResultErrorCopyWithImpl>(this, _$identity); + @pragma('vm:prefer-inline') + _$$ResultErrorImplCopyWith> get copyWith => + __$$ResultErrorImplCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -326,8 +321,8 @@ class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? whenOrNull({ - TResult Function(T value)? data, - TResult Function(Object error, StackTrace stackTrace)? error, + TResult? Function(T value)? data, + TResult? Function(Object error, StackTrace stackTrace)? error, }) { return error?.call(this.error, stackTrace); } @@ -357,8 +352,8 @@ class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { @override @optionalTypeArgs TResult? mapOrNull({ - TResult Function(_ResultData value)? data, - TResult Function(_ResultError value)? error, + TResult? Function(_ResultData value)? data, + TResult? Function(_ResultError value)? error, }) { return error?.call(this); } @@ -378,12 +373,16 @@ class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { } abstract class _ResultError extends Result { - factory _ResultError(Object error, StackTrace stackTrace) = _$_ResultError; + factory _ResultError(final Object error, final StackTrace stackTrace) = + _$ResultErrorImpl; _ResultError._() : super._(); Object get error; StackTrace get stackTrace; - @JsonKey(ignore: true) - _$ResultErrorCopyWith> get copyWith => + + /// Create a copy of Result + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ResultErrorImplCopyWith> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/provider_devtools_extension/lib/src/provider_screen.dart b/packages/provider_devtools_extension/lib/src/provider_screen.dart index db725cde..19585216 100644 --- a/packages/provider_devtools_extension/lib/src/provider_screen.dart +++ b/packages/provider_devtools_extension/lib/src/provider_screen.dart @@ -13,6 +13,22 @@ import 'instance_viewer/instance_viewer.dart'; import 'provider_list.dart'; import 'provider_nodes.dart'; +final hasConnectionProvider = Provider.autoDispose((ref) { + final currentValue = serviceManager.connectedState.value.connected; + + listener() { + ref.state = serviceManager.connectedState.value.connected; + } + + serviceManager.connectedState.addListener(listener); + + ref.onDispose(() { + serviceManager.connectedState.removeListener(listener); + }); + + return currentValue; +}); + final _hasErrorProvider = Provider.autoDispose((ref) { if (ref.watch(sortedProviderNodesProvider) is AsyncError) return true; @@ -42,7 +58,9 @@ class ProviderScreenBody extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final splitAxis = Split.axisFor(context, 0.85); + final splitAxis = SplitPane.axisFor(context, 0.85); + + final hasConnection = ref.watch(hasConnectionProvider); // A provider will automatically be selected as soon as one is detected final selectedProviderId = ref.watch(selectedProviderIdProvider); @@ -54,59 +72,69 @@ class ProviderScreenBody extends ConsumerWidget { if (hasError) showProviderErrorBanner(); }); - return Split( - axis: splitAxis, - initialFractions: const [0.33, 0.67], - children: [ - const RoundedOutlinedBorder( - clip: true, - child: Column( - children: [ - AreaPaneHeader( - roundedTopBorder: false, - includeTopBorder: false, - title: Text('Providers'), - ), - Expanded( - child: ProviderList(), - ), - ], - ), - ), - RoundedOutlinedBorder( - clip: true, - child: Column( - children: [ - AreaPaneHeader( - roundedTopBorder: false, - includeTopBorder: false, - title: Text(detailsTitleText), - actions: [ - IconButton( - icon: const Icon(Icons.settings), - onPressed: () { - unawaited( - showDialog( - context: context, - builder: (_) => _StateInspectorSettingsDialog(), - ), - ); - }, - ), - ], - ), - if (selectedProviderId != null) + // This change needed for extension to work in simulated environment + // since new option `requiresConnection` to config.yml + // not works in this config and it is needed to check connection + // inside plugin itself. + if (hasConnection) { + return SplitPane( + axis: splitAxis, + initialFractions: const [0.33, 0.67], + children: [ + const RoundedOutlinedBorder( + clip: true, + child: Column( + children: [ + AreaPaneHeader( + roundedTopBorder: false, + includeTopBorder: false, + title: Text('Providers'), + ), Expanded( - child: InstanceViewer( - rootPath: InstancePath.fromProviderId(selectedProviderId), - showInternalProperties: ref.watch(_showInternals), - ), + child: ProviderList(), ), - ], + ], + ), ), - ), - ], - ); + RoundedOutlinedBorder( + clip: true, + child: Column( + children: [ + AreaPaneHeader( + roundedTopBorder: false, + includeTopBorder: false, + title: Text(detailsTitleText), + actions: [ + IconButton( + icon: const Icon(Icons.settings), + onPressed: () { + unawaited( + showDialog( + context: context, + builder: (_) => _StateInspectorSettingsDialog(), + ), + ); + }, + ), + ], + ), + if (selectedProviderId != null) + Expanded( + child: InstanceViewer( + rootPath: InstancePath.fromProviderId(selectedProviderId), + showInternalProperties: ref.watch(_showInternals), + ), + ), + ], + ), + ), + ], + ); + } else { + return const Center( + child: Text('Devtools are not connected to VmService'), + ); + } } } diff --git a/packages/provider_devtools_extension/pubspec.yaml b/packages/provider_devtools_extension/pubspec.yaml index 1011afff..aad54a1b 100644 --- a/packages/provider_devtools_extension/pubspec.yaml +++ b/packages/provider_devtools_extension/pubspec.yaml @@ -11,13 +11,13 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 - collection: ^1.15.0 - devtools_extensions: ^0.0.6 - devtools_app_shared: ^0.0.4 - # TODO: https://github.com/flutter/devtools/issues/4569 - unpin this version - flutter_riverpod: 2.0.0-dev.9 + collection: ^1.18.0 + devtools_extensions: ^0.2.2 + devtools_app_shared: ^0.2.2 + flutter_riverpod: ^2.5.1 logging: ^1.1.1 - vm_service: ">=11.9.0 <14.0.0" + vm_service: ^14.2.5 + freezed_annotation: ^2.4.4 dev_dependencies: flutter_driver: @@ -27,6 +27,9 @@ dev_dependencies: flutter_lints: ^2.0.0 integration_test: sdk: flutter + mockito: ^5.4.4 + freezed: ^2.5.7 + build_runner: ^2.4.12 flutter: uses-material-design: true diff --git a/packages/provider_devtools_extension/test/goldens/provider_screen/loading_state.png b/packages/provider_devtools_extension/test/goldens/provider_screen/loading_state.png new file mode 100644 index 0000000000000000000000000000000000000000..67765cb21bf4870965d66a426299e84c6e19bc93 GIT binary patch literal 11294 zcmeAS@N?(olHy`uVBq!ia0y~y;MmB(!2E)P4Je}B{7(r;F%}28J29*~C-V}>VJUX< z4B-HR8jh3>1_lKNPZ!6KiaBp?88R{`@EkBWaE$NIY8J^_Ay&}~w#E0EfLcJH;lfI0 z2#bN?z!8|J!?{r=C{#wn0g^UG!(lWWMl%B>4UC4vXgG}445KXtU@jP~7Duba(L^v> z9gLO)qt(G^buc<)04fPb+XRsMU^EHv>c8CqVl`5nTwRfAiiZ_7-d320!KJZ|H=rI|6wry zeEaXGpH6?)U%&qF*Q-}oRQK$CR$;?;`Q?|C&-)A8pC3-Vkz=;_+?Or4duMGw{QO*E zd+`ssx}^5qN0YAnsoE=-m%ds5e0_TR)hyFjKDXa~J8$1!TrvGv+~*HJEZ%(o9rzt+ z%Y%|XovhG!X_(VNPv)JYDMg>dWvC~gtAPC8zyRv7$2Jp ypT0QYmjoK41Azo};G#&OM>E;{dGU>hyLb%nB18;_uO;- z_kZrpoSckrTo14QaO;N<1g&=d+Q}V)R^El6_g=1C4zBD>*O-8xC9&>@4?uLj;Se}k z7JI8D zmi^eu{4QjzZF=x0ZMzJOFMW>rc!x)7vtDnNbB=Ak`82CvvgOF6A@MV7;|wYv&O^^i z%jmboGEc6Up;WrEU>~^qWQVny)psxjD?`R>vgzy?Nb` zFYol1w zkrGo%Gv4k-A(%xdRHq!%>Z;f=H*`FN8P*n(`jk2o+0b6@;y|>g4V-sVt5>icc0$lo zyER7Wk{8k6;PL8sB9T~3Ry@C-jfSxnbE`FCXfZD#H^JJnNRu+fkRx=5qZd5`ATV zGi5jqH8-giJDJ1X!bE#|*SV9F=Kd7^2f!OXf#|MQt68bokMZq36m0o8|$>lXddhpaJfIGpi@;{*BH5NA*}N9lLe1%t5mA+%9#P- zfvBIdUPPbDcXV{1P}xFod!LNO;b7D6?_cn(*5<~s@Je4{v@JowEXRru zowYR-K6{2ekA|QMW(d=3j|+w?PQ8^<&SnpfkB>JFYF$ZN(+PxDU##ED-Z*>$F6rirlHMD?=D7* zr6peRMX7|@_>{?>gq>~6pt^8VO2Lz7&uG&GVySYL$jC0LoOsRPydFL&4rL_I95`_d-3a!oIu~zq ziwJ;r;U2j9q+)vJt%O&1d8dsFB@dW1c8wS4R?HDZW`l@IirB4QA9tMXp5SE~b;N=pwN~56;Wqo|6bj{< z(9m$EcvB{?ls~_PLJ(KgrjSJiQw7u%m8&!Xmxs!De?d)}{klcv+R1e{f@`F3TI5d@ z9U|ZwX#;Rn*VdW^YK;eH#&i!1i>a`7SOGQ%12Z!-k@sF;M^I2-BLEk)wCZ0xFv?yY zdB_feos_unMFHPZGSBi}*52?U$2 zHDvsmp{|JH1+0t_DBjW+fdYX-7Z&esY6vS3Rv@gHN8rCa^^pKU0t5*VBtRetdGSWR zL3BF-)QfzMEg*qFfqbODp+XD-g%*nODAm{>3-CVruf8ETv@Mb_hx=JIq;@9eX8(OSY5zQLg+PuYHNH+ZVH#4gLQzZo!|P^3qhk zdCRUVeVZjooM1DpD~Wq8-X>gsSj@ftpvYYdLH74YRSttU*9Zi5O&sx@QkUjMXB>U| zGSa{JFh;sM`XD$UI6w#q{-Puxd_`eG(1vg4YXOi&{);X$vara)B3rnQ0|*WX4iG{D zgail)7C3+e0}>2>8Vob{688GRK0eR|_LXt{th&|Bx6{>gb2%TJ?p+gbbl5n|Gg$^R z&$`%rCfMD8Y7fC>38g_$THIn9w|%kJ?CW=OOu38YYKX8gf(F73=zoY5kior8`x_n< z)lUVSz+}W2QduFJM|6erQ+624#y;CaL+b6rRs1|qVoKZ`@0TxAhn8+xuGZBF6J6u| z4vQzxJ<&>0+YK%iQYn7~w_iM7%vsxuk+iia% z1~mJOKoVnXm~W`(*Bats z39Nm-YE!1bU{tcT$*O8>$DpDsvsG8T%5cMAta4lmq*Y(^*)~S9$wgiv0&pwpN$~k~ z@hNh$NfwDTiZgKO$V;)%YELZ9F3K3i=>x|zNPnEOc~lNxbuSBj4@%n`!Fv6d!kdwA6evNFm1xI1vp7loHVfiz=G zF&=GH+-d11Qg(%CD{#|9F9!!r%e(zv&90T>8`k@~2Hlaa2L;kM6icAGoZVDGKFsJ< zsrtAaPmu$U$jzLTMdj0I%vP`-pfTFQ<3GV*W{190IGSX|7zWjHF7pD{xiDL^LGApr zt3z??WzTvVMn~bBuD6&^6&lTU*IN|IdTs7~YWtqHU4x2)B_iqOCOMgVonbkwMhm6! z)-F;fQ0Y8%VVbZ_Cgzf>tE*pDjg?GlrsNhTCTPOc+QO?**fm-UqV6k|V1R*CiMkLl z)e+js;A%o=WbYSVt*ETb2-w`K(V$;*=JFIvp}OLe7|cD`pk?4piHIFzzs-Nd%hS{I z?kV%$u`!Fhygcj(C{qS){HNinE1lsR3s1!0)$-J(SyRQNfrOTUU35CVH`=!0)^RHK z)qp(&)!+b`1_n&Bi!RR+jdI!s=OW7luuV>5IO|ft=03UHO7CKQrsD>!R(=2~*QvwW zDyJ=o+0}rno^6SkvkA9*TVcgKiw_?d>%w z>TqriQT%+&B9QCYP+$KQKvahAIA8gFIb1+L8rS0y=cnJ)XXSd!;~_9@-VK)fkz=Nm zpO2YZ<+=vhYMuLNuAF@mcO&9%@Nw6`9$ U+egmR{wLvl(A9~4;Pkiu0Zrf8*#H0l literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/test/goldens/provider_screen/selected_provider.png b/packages/provider_devtools_extension/test/goldens/provider_screen/selected_provider.png new file mode 100644 index 0000000000000000000000000000000000000000..cda917c120289e3fc25de8300b6112a2913f8b3d GIT binary patch literal 13446 zcmeHOc~nzp7JuSK>rxdf6i}2}s3R3oM2H}*gA1})!3Y!rDk1^~WC;R6U`ne&DvSea zAqH9~V#AU`NRTyhSR!R>p%B9sAOb>20)~)4NHSlNgYbtvj6HK^{(1M0@Rs}C?=HW4 zUvl3i;Y-Jp8{XG`AA+C_wx?{IAV|Fkf>yp#Ujwe}jhE?zKPy6=P9B2_TXo04$*Ry} zw&&CVMXO)NLC{Xf*5-?I5sxPN+5+823G_jhMV3u_)`yK-CZKIs%(jQ^=d^CUYMg~% zv%1^;x1)!L>~QP0rhOZ=f$W#4mX@E3T0fw6)@V=Gsc+}(!Z$Od_;Z(c$9^^&`Ji2r zAz<@x;#XEJ9l3HuUck6W(#aPEM3yW3g0Zl#TwGiZrP=!* zNc$rU;gF2nyLT_(&g((_OhrWrukp%sf$mUTKJ(hlI9BL~^7O2n3zSZGOYpJVib~M# z0RbQ6F*uCb*+>F`(AC)Z@UY1d2S4nNnQrl+yUqiEMVdBW?E4{h;q$*TjFZVNE>X#e{@} z=p0n&-Oj;qszhC!`T5FQwSzhqX*oUIuDLmUm7!8tZ>qJ>kUjOJflcC{kzK57r#e_g zmAH|aB^x(x48ooV+lB5p8toci*8cJ~TJqYDrOM=tkf%*O}S6r!FnX6xy+%6pvom+^WiEEnjJ zlar%RT`HBPw^T<_e&hV)vtJ8fAyjQ01T~LMOynmepQIEOO%;$Rm6aYKh70ylfLdf` z{+jq2P9{Y-e&|?y%?~poQHo#%h|-}Q$$5T6;GEL()`o_t?c2Baz3@<|08LW6Su9e` zg~>U}F#?e&>UYmeN#W3ry`ovmA`0;_)KV9|bz}%vXzW?}gv;dykgO31qEIMwuaI4} zEW90iRyKc75YvBrruj(6$+k=ekH_;kxB}XrIXL;$%&aTmK$=krjm1ZHm@@k16HK!E z&DI#5O#G;DpX{?@GC7nhRO%7ym*Jw;xuNRLt0rSwK7~R-fNiLL=~0sxC`rl5G~u@^ zpaE2Pc=&m;8OyE)_+jqDQ;Qm6b-9lmHzdm}=kkkBltq&dHgr_5e)POprpo zo15C5+(AN@ngLA!RknCaXIkdC$m>|Ax&=X>_Z}l@ESwDRB#mpWPbW{Nr!2dhGm=sz zHMIgh=+(*1&0WXs>F&hi zUNM)O>uIR67ATUT@RyR}%r}D^P*JeHDyzZSkj-1Y!7(Zx^R<@x6%-Vpuu@I0=(9RH zI;B*ZSR7FpxsAy_*gJ2TI5FEvibZ8czi#vpEr{-qdAmm*EvpD(48S3-K3Y6@TbRj` z^ivpeS*hGvZi0>E3gsf^MQM*Dc_iJh--s+W0+v9*Lm=hLFU$

$Qi1npIUq zp}2wiN65(NAK#&r{nVIRnu$nw6DZ4f3DlDP8E%(5$i8jkQo}QaRkHd-O-fbO%>a&d zPY*sI8haM1eG&3ElDz$XK%Bk~~>r@bZyf0y)e!W(lZb zf|LdPOtyyn|Fl`Q9Q;)?VZjUWUB2YPK2|;!fx~vfu7F*kN}Q$NNnljKsDM$S@W7vZ zX@?U8P7pXj-~{+FWeJHctx97_|#mHkadWuort}7K>d&3)Xw!t%XK!Aj`XTc5?nv=!8V- z6{Iv|Am!;|mwL&w4?a}7=X2N(upeL$C@}!Ns~u$v?fJ(wUi-4DbcXn_M zf@=^Ag1=US-~s{{kcGhuIEUaIf}f^vMT9FNToFMQEPWjCa;qxF{Cm39_E%!Qq5ZNd z@YIRzy>dCr9@2(@zp4m>POVAq0$(gKz zhd5j{-@Br(zTyVIcvP|OXEgrPoI8DiA`(w9d0j8B)A%ey$h@MOq-DGs88M*tpr)mp zrm%Heyd1rM=4@dw7-@>}c>KZ4wk$MhXl8~@t9D^n)yL2hMf{*FB9YvzYPpkI{4v{+ zNa@%&0&D#T!Mfg6)pzSJZFV3xr*DR!{?xIsE&TqzIxZLe$T64PE0D={Ip(IMY*9sc z*P)gJBZA}k42~9kDw+0>WIQf8+Qq?`I&f@2CtrMPHhKr2MN0;gzpu)9`68KkYM;LT z(P;6eoYWvsFrE%5s75FR3v@U_#I1|s4&P1^P3Ak#U!9Zsw5%-QqSla1c66>iKB1_OZO~XF*jU2XEHsfhb_V6dN=^n@UVXR6*MB+=P7BK?4cEO&sQH2a~UA^pc4w#`=r-`nrIM6<4|t^GUjDF0|jNZEH(batU# zSf6tkN|Vkuam;o86{w~#gW`1B-XP_Bdjk`KqqiCUI1*XZ7pU0WT!zki&BYA|2xcw8 zKfQP#D8o6OPIUr-4V~8m3&#N*YWLf)L`5vVH;qNRgTo>S4VQ{=%xl^?e|XJ|%nU1c qc&SaFYQhRZOr0mfD|`w2WIFTqKUN)1^fgi3w>|D?Q+Vvc*Z&61dPYA0 literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/test/provider_screen_test.dart b/packages/provider_devtools_extension/test/provider_screen_test.dart index dcd87bc5..6cebebaf 100644 --- a/packages/provider_devtools_extension/test/provider_screen_test.dart +++ b/packages/provider_devtools_extension/test/provider_screen_test.dart @@ -2,28 +2,35 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@TestOn('vm') +@TestOn('browser') +import 'dart:async'; + +import 'package:mockito/mockito.dart'; +import 'package:provider_devtools_extension/src/instance_viewer/eval.dart'; import 'package:provider_devtools_extension/src/provider_screen.dart'; import 'package:provider_devtools_extension/src/instance_viewer/instance_details.dart'; import 'package:provider_devtools_extension/src/instance_viewer/instance_providers.dart'; import 'package:provider_devtools_extension/src/provider_list.dart'; import 'package:provider_devtools_extension/src/provider_nodes.dart'; +import 'package:devtools_extensions/devtools_extensions.dart'; +import 'package:devtools_app_shared/utils.dart'; +import 'package:devtools_app_shared/ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; - +import 'package:vm_service/vm_service.dart'; import 'test_utils.dart'; +class MockVmService extends Mock implements VmService {} + void main() { // Set a wide enough screen width that we do not run into overflow. const windowSize = Size(2225.0, 1000.0); late Widget providerScreen; - setUpAll(() async => await loadFonts()); - - setUp(() { - // setGlobal(IdeTheme, getIdeTheme()); + setUp(() async { + setGlobal(IdeTheme, getIdeTheme()); }); setUp(() { @@ -32,7 +39,7 @@ void main() { child: Directionality( textDirection: TextDirection.ltr, child: wrap( - const ProviderScreenBody(), + const DevToolsExtension(child: ProviderScreenBody()), ), ), ); @@ -84,9 +91,7 @@ void main() { test('selects the first provider available', () async { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.loading(), - ), + sortedProviderNodesProvider.overrideWith((ref) => ref.future), ], ); addTearDown(container.dispose); @@ -99,14 +104,12 @@ void main() { expect(sub.read(), isNull); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ - ProviderNode(id: '0', type: 'Provider'), - ProviderNode(id: '1', type: 'Provider'), - ]), - ), + sortedProviderNodesProvider.overrideWith((ref) => const [ + ProviderNode(id: '0', type: 'Provider'), + ProviderNode(id: '1', type: 'Provider'), + ]), ]); - + container.invalidate(sortedProviderNodesProvider); await container.pump(); expect(sub.read(), '0'); @@ -115,9 +118,7 @@ void main() { test('selects the first provider available after an error', () async { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider.overrideWithValue( - AsyncValue.error(Error()), - ), + sortedProviderNodesProvider.overrideWith((ref) => throw Exception()), ], ); addTearDown(container.dispose); @@ -133,14 +134,14 @@ void main() { expect(sub.read(), isNull); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '0', type: 'Provider'), ProviderNode(id: '1', type: 'Provider'), - ]), + ], ), ]); - + container.invalidate(sortedProviderNodesProvider); // wait for the ids update to be handled await container.pump(); @@ -152,10 +153,10 @@ void main() { () { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '0', type: 'Provider'), - ]), + ], ), ], ); @@ -169,13 +170,15 @@ void main() { expect(sub.read(), '0'); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '1', type: 'Provider'), - ]), + ], ), ]); + container.invalidate(sortedProviderNodesProvider); + expect(sub.read(), '1'); }, ); @@ -183,10 +186,10 @@ void main() { test('Once a provider is selected, further updates are no-op', () async { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '0', type: 'Provider'), - ]), + ], ), ], ); @@ -202,12 +205,13 @@ void main() { expect(sub.read(), '0'); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - // '0' is no-longer the first provider on purpose - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => + // '0' is no-longer the first provider on purpose + const [ ProviderNode(id: '1', type: 'Provider'), ProviderNode(id: '0', type: 'Provider'), - ]), + ], ), ]); @@ -222,10 +226,10 @@ void main() { () async { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '0', type: 'Provider'), - ]), + ], ), ], ); @@ -241,23 +245,23 @@ void main() { expect(sub.read(), '0'); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([]), + sortedProviderNodesProvider.overrideWith( + (ref) => const [], ), ]); - + container.invalidate(sortedProviderNodesProvider); await container.pump(); expect(sub.read(), isNull); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ + sortedProviderNodesProvider.overrideWith( + (ref) => const [ ProviderNode(id: '1', type: 'Provider'), - ]), + ], ), ]); - + container.invalidate(sortedProviderNodesProvider); await container.pump(); expect(sub.read(), '1'); @@ -268,14 +272,12 @@ void main() { group('ProviderList', () { List getOverrides() { return [ - instanceProvider(const InstancePath.fromProviderId('0')) - .overrideWithValue( - AsyncValue.data( - InstanceDetails.string( - 'Value0', - instanceRefId: 'string/0', - setter: null, - ), + hasConnectionProvider.overrideWithValue(true), + instanceProvider(const InstancePath.fromProviderId('0')).overrideWith( + (ref) => InstanceDetails.string( + 'Value0', + instanceRefId: 'string/0', + setter: null, ), ), ]; @@ -287,8 +289,7 @@ void main() { (tester) async { final container = ProviderContainer( overrides: [ - sortedProviderNodesProvider - .overrideWithValue(const AsyncValue.loading()), + sortedProviderNodesProvider.overrideWith((ref) => []), ...getOverrides(), ], ); @@ -299,9 +300,11 @@ void main() { child: providerScreen, ), ); + await tester.pumpAndSettle(); expect(container.read(selectedProviderIdProvider), isNull); expect(find.byType(ProviderNodeItem), findsNothing); + expect(find.byType(SplitPane), findsOne); await expectLater( find.byType(ProviderScreenBody), @@ -311,16 +314,14 @@ void main() { ); container.updateOverrides([ - sortedProviderNodesProvider.overrideWithValue( - const AsyncValue.data([ - ProviderNode(id: '0', type: 'Provider'), - ProviderNode(id: '1', type: 'Provider'), - ]), - ), + sortedProviderNodesProvider.overrideWith((ref) => const [ + ProviderNode(id: '0', type: 'Provider'), + ProviderNode(id: '1', type: 'Provider'), + ]), ...getOverrides(), ]); - - await tester.pump(); + container.invalidate(sortedProviderNodesProvider); + await tester.pumpAndSettle(); expect(container.read(selectedProviderIdProvider), '0'); expect(find.byType(ProviderNodeItem), findsNWidgets(2)); @@ -405,4 +406,40 @@ void main() { // }, // ); }); + + group('ServiceManager states', () { + final Override availableService = + serviceProvider.overrideWith((ref) => Stream.value(MockVmService())); + testWidgetsWithWindowSize('Loading state', windowSize, (tester) async { + await tester.pumpWidget(ProviderScope( + overrides: [ + hasConnectionProvider.overrideWithValue(false), + availableService, + ], + child: providerScreen, + )); + + final finder = find.byType(Text); + + expect(finder, findsOne); + expect((finder.found.first.widget as Text).data, + equals('Devtools are not connected to VmService')); + }); + + testWidgetsWithWindowSize('Data state', windowSize, (tester) async { + await tester.pumpWidget(ProviderScope( + overrides: [ + hasConnectionProvider.overrideWithValue(true), + availableService, + ], + child: providerScreen, + )); + + await tester.pump(); + + final finder = find.byType(SplitPane); + + expect(finder, findsOne); + }); + }); } diff --git a/packages/provider_devtools_extension/test/test_utils.dart b/packages/provider_devtools_extension/test/test_utils.dart index 316c87c6..047d4601 100644 --- a/packages/provider_devtools_extension/test/test_utils.dart +++ b/packages/provider_devtools_extension/test/test_utils.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:devtools_app_shared/ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -8,11 +6,6 @@ import 'package:flutter_test/flutter_test.dart'; Future loadFonts() async { // source: https://medium.com/swlh/test-your-flutter-widgets-using-golden-files-b533ac0de469 - //https://github.com/flutter/flutter/issues/20907 - if (Directory.current.path.endsWith('/test')) { - Directory.current = Directory.current.parent; - } - const fonts = { 'Roboto': [ 'fonts/Roboto/Roboto-Thin.ttf', @@ -37,11 +30,7 @@ Future loadFonts() async { final loader = FontLoader(entry.key); for (final path in entry.value) { - final fontData = File(path).readAsBytes().then((bytes) { - return ByteData.view(Uint8List.fromList(bytes).buffer); - }); - - loader.addFont(fontData); + loader.addFont(rootBundle.load(path)); } await loader.load(); diff --git a/packages/provider_devtools_extension/web/index.html b/packages/provider_devtools_extension/web/index.html index 402143db..2b4f816f 100644 --- a/packages/provider_devtools_extension/web/index.html +++ b/packages/provider_devtools_extension/web/index.html @@ -18,7 +18,7 @@ - + @@ -31,29 +31,8 @@ provider_devtools_extension - - - - - + diff --git a/packages/provider_devtools_extension/web/manifest.json b/packages/provider_devtools_extension/web/manifest.json index 57825ce7..91ce6448 100644 --- a/packages/provider_devtools_extension/web/manifest.json +++ b/packages/provider_devtools_extension/web/manifest.json @@ -5,7 +5,7 @@ "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": ""A new Flutter project."", + "description": "A new Flutter project.", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [