From a689f406d2e937993de4ad9fa3028f126fab695e Mon Sep 17 00:00:00 2001 From: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com> Date: Sun, 24 Sep 2023 14:26:37 -0700 Subject: [PATCH] Create DevTools extension for `package:provider` (#832) --- .github/workflows/build.yml | 4 + .gitignore | 2 +- .vscode/launch.json | 74 + build_devtool.sh | 15 + example/.metadata | 10 - packages/provider/.gitignore | 1 + .../provider/CHANGELOG.md | 107 +- LICENSE => packages/provider/LICENSE | 0 README.md => packages/provider/README.md | 0 packages/provider/analysis_options.yaml | 5 + .../provider/example}/.gitignore | 0 packages/provider/example/.metadata | 45 + .../provider/example}/lib/main.dart | 1 - .../provider/example}/pubspec.yaml | 0 .../provider/example}/test/widget_test.dart | 0 .../provider/example}/test_driver/app.dart | 0 .../example}/test_driver/app_test.dart | 0 .../provider/extension/devtools/config.yaml | 4 + {lib => packages/provider/lib}/provider.dart | 0 .../provider/lib}/single_child_widget.dart | 0 .../provider/lib}/src/async_provider.dart | 0 .../lib}/src/change_notifier_provider.dart | 0 .../provider/lib}/src/consumer.dart | 0 .../lib}/src/deferred_inherited_provider.dart | 0 .../provider/lib}/src/devtool.dart | 0 .../provider/lib}/src/inherited_provider.dart | 0 .../lib}/src/listenable_provider.dart | 0 .../provider/lib}/src/provider.dart | 0 .../provider/lib}/src/proxy_provider.dart | 0 .../provider/lib}/src/reassemble_handler.dart | 0 .../provider/lib}/src/selector.dart | 0 .../lib}/src/value_listenable_provider.dart | 0 .../provider/pubspec.yaml | 0 .../test}/null_safe/builder_test.dart | 0 .../change_notifier_provider_test.dart | 0 .../provider/test}/null_safe/common.dart | 0 .../test}/null_safe/consumer_test.dart | 0 .../test}/null_safe/context_test.dart | 0 .../test}/null_safe/devtool_test.dart | 0 .../test}/null_safe/future_provider_test.dart | 0 .../null_safe/inherited_provider_test.dart | 0 .../null_safe/listenable_provider_test.dart | 0 .../listenable_proxy_provider_test.dart | 0 .../provider/test}/null_safe/matchers.dart | 0 .../test}/null_safe/multi_provider_test.dart | 0 .../test}/null_safe/provider_test.dart | 0 .../test}/null_safe/proxy_provider_test.dart | 0 .../test}/null_safe/reassemble_test.dart | 0 .../test}/null_safe/selector_test.dart | 0 .../null_safe/stateful_provider_test.dart | 0 .../test}/null_safe/stream_provider_test.dart | 0 .../null_safe/value_listenable_test.dart | 0 .../provider_devtools_extension/.gitignore | 44 + .../provider_devtools_extension/.metadata | 30 + .../provider_devtools_extension/CHANGELOG.md | 3 + .../provider_devtools_extension/README.md | 7 + .../analysis_options.yaml | 32 + .../provider_integration_test.dart | 3 + .../provider_devtools_extension/lib/main.dart | 24 + .../lib/src/instance_viewer/eval.dart | 73 + .../fake_freezed_annotation.dart | 26 + .../src/instance_viewer/instance_details.dart | 203 + .../instance_details.freezed.dart | 3868 +++++++++++++++++ .../instance_viewer/instance_providers.dart | 435 ++ .../src/instance_viewer/instance_viewer.dart | 638 +++ .../lib/src/instance_viewer/result.dart | 82 + .../src/instance_viewer/result.freezed.dart | 389 ++ .../lib/src/provider_list.dart | 128 + .../lib/src/provider_nodes.dart | 108 + .../lib/src/provider_screen.dart | 160 + .../utils/riverpod_error_logger_observer.dart | 44 + .../utils/sliver_iterable_child_delegate.dart | 43 + .../provider_devtools_extension/pubspec.yaml | 32 + .../test/provider_screen_test.dart | 408 ++ .../test/test_utils.dart | 106 + .../test_driver/integration_test.dart | 7 + .../web/favicon.png | Bin 0 -> 917 bytes .../web/icons/Icon-192.png | Bin 0 -> 5292 bytes .../web/icons/Icon-512.png | Bin 0 -> 8252 bytes .../web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes .../web/index.html | 59 + .../web/manifest.json | 35 + 83 files changed, 7192 insertions(+), 63 deletions(-) create mode 100644 .vscode/launch.json create mode 100755 build_devtool.sh delete mode 100644 example/.metadata create mode 100644 packages/provider/.gitignore rename CHANGELOG.md => packages/provider/CHANGELOG.md (95%) rename LICENSE => packages/provider/LICENSE (100%) rename README.md => packages/provider/README.md (100%) create mode 100644 packages/provider/analysis_options.yaml rename {example => packages/provider/example}/.gitignore (100%) create mode 100644 packages/provider/example/.metadata rename {example => packages/provider/example}/lib/main.dart (97%) rename {example => packages/provider/example}/pubspec.yaml (100%) rename {example => packages/provider/example}/test/widget_test.dart (100%) rename {example => packages/provider/example}/test_driver/app.dart (100%) rename {example => packages/provider/example}/test_driver/app_test.dart (100%) create mode 100644 packages/provider/extension/devtools/config.yaml rename {lib => packages/provider/lib}/provider.dart (100%) rename {lib => packages/provider/lib}/single_child_widget.dart (100%) rename {lib => packages/provider/lib}/src/async_provider.dart (100%) rename {lib => packages/provider/lib}/src/change_notifier_provider.dart (100%) rename {lib => packages/provider/lib}/src/consumer.dart (100%) rename {lib => packages/provider/lib}/src/deferred_inherited_provider.dart (100%) rename {lib => packages/provider/lib}/src/devtool.dart (100%) rename {lib => packages/provider/lib}/src/inherited_provider.dart (100%) rename {lib => packages/provider/lib}/src/listenable_provider.dart (100%) rename {lib => packages/provider/lib}/src/provider.dart (100%) rename {lib => packages/provider/lib}/src/proxy_provider.dart (100%) rename {lib => packages/provider/lib}/src/reassemble_handler.dart (100%) rename {lib => packages/provider/lib}/src/selector.dart (100%) rename {lib => packages/provider/lib}/src/value_listenable_provider.dart (100%) rename pubspec.yaml => packages/provider/pubspec.yaml (100%) rename {test => packages/provider/test}/null_safe/builder_test.dart (100%) rename {test => packages/provider/test}/null_safe/change_notifier_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/common.dart (100%) rename {test => packages/provider/test}/null_safe/consumer_test.dart (100%) rename {test => packages/provider/test}/null_safe/context_test.dart (100%) rename {test => packages/provider/test}/null_safe/devtool_test.dart (100%) rename {test => packages/provider/test}/null_safe/future_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/inherited_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/listenable_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/listenable_proxy_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/matchers.dart (100%) rename {test => packages/provider/test}/null_safe/multi_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/proxy_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/reassemble_test.dart (100%) rename {test => packages/provider/test}/null_safe/selector_test.dart (100%) rename {test => packages/provider/test}/null_safe/stateful_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/stream_provider_test.dart (100%) rename {test => packages/provider/test}/null_safe/value_listenable_test.dart (100%) create mode 100644 packages/provider_devtools_extension/.gitignore create mode 100644 packages/provider_devtools_extension/.metadata create mode 100644 packages/provider_devtools_extension/CHANGELOG.md create mode 100644 packages/provider_devtools_extension/README.md create mode 100644 packages/provider_devtools_extension/analysis_options.yaml create mode 100644 packages/provider_devtools_extension/integration_test/provider_integration_test.dart create mode 100644 packages/provider_devtools_extension/lib/main.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/instance_providers.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/result.dart create mode 100644 packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart create mode 100644 packages/provider_devtools_extension/lib/src/provider_list.dart create mode 100644 packages/provider_devtools_extension/lib/src/provider_nodes.dart create mode 100644 packages/provider_devtools_extension/lib/src/provider_screen.dart create mode 100644 packages/provider_devtools_extension/lib/src/utils/riverpod_error_logger_observer.dart create mode 100644 packages/provider_devtools_extension/lib/src/utils/sliver_iterable_child_delegate.dart create mode 100644 packages/provider_devtools_extension/pubspec.yaml create mode 100644 packages/provider_devtools_extension/test/provider_screen_test.dart create mode 100644 packages/provider_devtools_extension/test/test_utils.dart create mode 100644 packages/provider_devtools_extension/test_driver/integration_test.dart create mode 100644 packages/provider_devtools_extension/web/favicon.png create mode 100644 packages/provider_devtools_extension/web/icons/Icon-192.png create mode 100644 packages/provider_devtools_extension/web/icons/Icon-512.png create mode 100644 packages/provider_devtools_extension/web/icons/Icon-maskable-192.png create mode 100644 packages/provider_devtools_extension/web/icons/Icon-maskable-512.png create mode 100644 packages/provider_devtools_extension/web/index.html create mode 100644 packages/provider_devtools_extension/web/manifest.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8891c55a..4cc7740e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,10 @@ jobs: flutter: runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/provider + strategy: matrix: channel: diff --git a/.gitignore b/.gitignore index f568fbec..673e009a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ macos/ pubspec.lock # Conventional directory for build outputs -build/ +/build/ coverage/ # Directory created by dartdoc diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..f938df15 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,74 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "provider", + "request": "launch", + "type": "dart" + }, + { + "name": "provider (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "provider (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "example", + "cwd": "example", + "request": "launch", + "type": "dart" + }, + { + "name": "example (profile mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "example (release mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "provider_devtools_extension", + "cwd": "packages/provider_devtools_extension", + "request": "launch", + "type": "dart" + }, + { + "name": "provider_devtools_extension + simulated environment", + "program": "packages/provider_devtools_extension/lib/main.dart", + "request": "launch", + "type": "dart", + "args": [ + "--dart-define=use_simulated_environment=true" + ], + }, + { + "name": "provider_devtools_extension (profile mode)", + "cwd": "packages/provider_devtools_extension", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "provider_devtools_extension (release mode)", + "cwd": "packages/provider_devtools_extension", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/build_devtool.sh b/build_devtool.sh new file mode 100755 index 00000000..13eda0af --- /dev/null +++ b/build_devtool.sh @@ -0,0 +1,15 @@ +pushd packages/provider + +rm -rf extension/devtools/build +mkdir extension/devtools/build + +popd + +pushd packages/provider_devtools_extension + +flutter pub get && +dart run devtools_extensions build_and_copy \ + --source=. \ + --dest=../provider/extension/devtools + +popd diff --git a/example/.metadata b/example/.metadata deleted file mode 100644 index 170cb555..00000000 --- a/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: b593f5167bce84fb3cad5c258477bf3abc1b14eb - channel: unknown - -project_type: app diff --git a/packages/provider/.gitignore b/packages/provider/.gitignore new file mode 100644 index 00000000..23648f3d --- /dev/null +++ b/packages/provider/.gitignore @@ -0,0 +1 @@ +extension/devtools/build \ No newline at end of file diff --git a/CHANGELOG.md b/packages/provider/CHANGELOG.md similarity index 95% rename from CHANGELOG.md rename to packages/provider/CHANGELOG.md index 4c4fcb2e..82cbb54e 100644 --- a/CHANGELOG.md +++ b/packages/provider/CHANGELOG.md @@ -1,28 +1,33 @@ -# 6.0.5 +## Unreleased minor -dev + +- Moved the implementation of the devtool extension + in the source of Provider (thanks to @kenzieschmoll) + +## 6.0.5 - Fix broken links on pub.dev -# 6.0.4 +## 6.0.4 Fix typos and broken links in the documentation -# 6.0.3 +## 6.0.3 - fix late initialization error when using `debugPrintRebuildDirtyWidgets` - slightly reduced the binary size of release mode applications using provider - Fix typos in the error message of ProviderNotFoundException - improve performances for reading providers (thanks to @jiahaog) -# 6.0.2 +## 6.0.2 Added error details for provider that threw during the creation (thanks to @jmewes) -# 6.0.1 +## 6.0.1 Removed the assert that prevented from using `ChangeNotifierProvider` with notifiers that already had listeners. -# 6.0.0 +## 6.0.0 - **Breaking**: It is no longer possible to define providers where their only difference is the nullability of the exposed value: @@ -69,7 +74,7 @@ with notifiers that already had listeners. which will try to obtain a matching provider. But if none are found, `null` will be returned instead of throwing. -# 6.0.0-dev +## 6.0.0-dev - **Breaking**: It is no longer possible to define providers where their only difference is the nullability of the exposed value: @@ -116,21 +121,21 @@ with notifiers that already had listeners. which will try to obtain a matching provider. But if none are found, `null` will be returned instead of throwing. -# 5.0.0 +## 5.0.0 - Stable, null-safe release. - pre-release of the mechanism for state-inspection using the Flutter devtool - Updated oudated doc in `StreamProvider` -# 5.0.0-nullsafety.5 +## 5.0.0-nullsafety.5 Fixed an issue where providers with an `update` parameter in sound null-safety mode could throw null exceptions. -# 5.0.0-nullsafety.4 +## 5.0.0-nullsafety.4 - Upgraded `nested` dependency to 1.0.0 and `collection` to 1.15.0 -# 5.0.0-nullsafety.3 +## 5.0.0-nullsafety.3 - Improved the error message of `ProviderNotFoundException` to mention hot-reload. (#595) - Removed the asserts that prevented `ChangeNotifier`s in `ChangeNotifierProvider()` @@ -138,15 +143,15 @@ Fixed an issue where providers with an `update` parameter in sound null-safety m - Removed the opinionated asserts in `context.watch`/`context.read` that prevented them to be used inside specific conditions (#585) -# 5.0.0-nullsafety.2 +## 5.0.0-nullsafety.2 - Improved the error message when an exception is thrown inside `create` of a provider` -# 5.0.0-nullsafety.1 +## 5.0.0-nullsafety.1 - Reintroduced `ValueListenableProvider.value` (the default constructor is still removed). -# 5.0.0-nullsafety.0 +## 5.0.0-nullsafety.0 Migrated Provider to non-nullable types: @@ -198,7 +203,7 @@ Migrated Provider to non-nullable types: ) ``` -# 4.3.3 +## 4.3.3 - Improved the error message of `ProviderNotFoundException` to mention hot-reload. (#595) - Removed the asserts that prevented `ChangeNotifier`s in `ChangeNotifierProvider()` @@ -206,37 +211,37 @@ Migrated Provider to non-nullable types: - Removed the opinionated asserts in `context.watch`/`context.read` that prevented them to be used inside specific conditions (#585) -# 4.3.2+4 +## 4.3.2+4 `ValueListenableProvider` is no-longer deprecated. Only its default constructor is deprecated (the `.value` constructor is kept) -# 4.3.2+3 +## 4.3.2+3 Marked `ValueListenableProvider` as deprecated -# 4.3.2+2 +## 4.3.2+2 Improve pub score -# 4.3.2+1 +## 4.3.2+1 Documentation improvement about the `builder` parameter of Providers. -# 4.3.2 +## 4.3.2 Fixed typo in the error message of `ProviderNotFoundException` -# 4.3.1 +## 4.3.1 - Fixed a bug where hot-reload forced all lazy-loaded providers to be computed. -# 4.3.0 +## 4.3.0 - Added `ReassembleHandler` interface, for objects to implement so that `provider` let them handle hot-reload. -# 4.2.0 +## 4.2.0 - Added a `builder` parameter on `MultiProvider` (thanks to @joaomarcos96): @@ -252,11 +257,11 @@ Fixed typo in the error message of `ProviderNotFoundException` ); ``` -# 4.1.3+1 +## 4.1.3+1 - Small Readme changes -# 4.1.3 +## 4.1.3 - Improved the error message of `ProviderNotFoundException` with instructions that better fit what is usually the problem. @@ -275,16 +280,16 @@ Fixed typo in the error message of `ProviderNotFoundException` - Improve the error message when calling `context.read/watch/select`/`Provider.of` with a `context` that is `null`. -# 4.1.2 +## 4.1.2 - Loosened the constraint on Flutter's version to be compatible with `beta` channel. -# 4.1.1 +## 4.1.1 - Fixes an "aspect" leak with `context.select`, leading to memory leaks and unnecessary rebuilds - Fixes the `builder` parameter of providers not working (thanks to @passsy) -# 4.1.0 +## 4.1.0 - Now requires: - Flutter >= 1.6.0 @@ -356,41 +361,41 @@ Fixed typo in the error message of `ProviderNotFoundException` - Added a `Locator` typedef and an extension on [BuildContext], to help with being able to read providers from a class that doesn't depend on Flutter. -# 4.0.5+1 +## 4.0.5+1 - Added Português translation of the readme file (thanks to @robsonsilv4) -# 4.0.5 +## 4.0.5 - Improve error message when forgetting to pass a `child` when using a provider outside of `MultiProvider` (thanks to @felangel) -# 4.0.4 +## 4.0.4 - Update the ProviderNotFoundException to remove outdated solution. (thanks @augustinreille) -# 4.0.3 +## 4.0.3 - improved error message when `Provider.of` is called without specifying `listen: false` outside of the widget tree. -# 4.0.2 +## 4.0.2 - fix `Provider.of` returning the previous value instead of the new value if called inside `didChangeDependencies`. - fixed an issue where `update` was unnecessarily called. -# 4.0.1 +## 4.0.1 - stable release of 4.0.0-hotfix+1 - fix some typos -# 4.0.0-hotfix.1 +## 4.0.0-hotfix.1 - removed the inference of the `listen` flag of `Provider.of` in favor of an exception in debug mode if `listen` is true when it shouldn't. This is because it caused a critical performance issue. See https://github.com/rrousselGit/provider/issues/305 -# 4.0.0 +## 4.0.0 - `Selector` now deeply compares collections by default, and offers a `shouldRebuild` to customize the rebuild behavior. @@ -408,13 +413,13 @@ Fixed typo in the error message of `ProviderNotFoundException` - renamed `builder` of `*Provider` to `create` - added a `*ProxyProvider0` variant -# 3.2.0 +## 3.2.0 - Deprecated "builder" of providers in favor to "create" - Deprecated "initialBuilder"/"builder" of proxy providers in favor of respectively "create" and "update" -# 3.1.0 +## 3.1.0 - Added `Selector`, similar to `Consumer` but can filter unneeded updates - improved the overall documentation @@ -434,9 +439,9 @@ Fixed typo in the error message of `ProviderNotFoundException` ); ``` -# 3.0.0 +## 3.0.0 -## breaking (see the readme for migration steps) +### breaking (see the readme for migration steps) - `Provider` now throws if used with a `Listenable`/`Stream`. This can be disabled by setting `Provider.debugCheckInvalidValueType` to `null`. @@ -446,7 +451,7 @@ Fixed typo in the error message of `ProviderNotFoundException` - Added `FutureProvider`, which takes a future and updates dependents when the future completes. - Providers can no longer be instantiated using `const` constructors. -## non-breaking +### non-breaking - Added `ProxyProvider`, `ListenableProxyProvider`, and `ChangeNotifierProxyProvider`. These providers allows building values that depends on other providers, @@ -454,7 +459,7 @@ Fixed typo in the error message of `ProviderNotFoundException` - Added `DelegateWidget` and a few related classes to help building custom providers. - Exposed the internal generic `InheritedWidget` to help building custom providers. -# 2.0.1 +## 2.0.1 - fix a bug where `ListenableProvider.value`/`ChangeNotifierProvider.value` /`StreamProvider.value`/`ValueListenableProvider.value` subscribed/unsubscribed @@ -462,7 +467,7 @@ Fixed typo in the error message of `ProviderNotFoundException` - fix a bug where `ListenableProvider.value`/`ChangeNotifierProvider.value` may rebuild too often or skip some. -# 2.0.0 +## 2.0.0 - `Consumer` now takes an optional `child` argument for optimization purposes. - merged `Provider` and `StatefulProvider` @@ -470,46 +475,46 @@ Fixed typo in the error message of `ProviderNotFoundException` - normalized providers constructors such that the default constructor is a "builder", and offer a `value` named constructor. -# 1.6.1 +## 1.6.1 - `Provider.of` now crashes with a `ProviderNotFoundException` when no `Provider` are found in the ancestors of the context used. -# 1.6.0 +## 1.6.0 - new: `ChangeNotifierProvider`, similar to scoped_model that exposes `ChangeNotifer` subclass and rebuilds dependents only when `notifyListeners` is called. - new: `ValueListenableProvider`, a provider that rebuilds whenever the value passed to a `ValueNotifier` change. -# 1.5.0 +## 1.5.0 - new: Add `Consumer` with up to 6 parameters. - new: `MultiProvider`, a provider that makes a tree of provider more readable - new: `StreamProvider`, a stream that exposes to its descendants the current value of a `Stream`. -# 1.4.0 +## 1.4.0 - Reintroduced `StatefulProvider` with a modified prototype. The second argument of `valueBuilder` and `didChangeDependencies` have been removed. And `valueBuilder` is now called only once for the whole life-cycle of `StatefulProvider`. -# 1.3.0 +## 1.3.0 - Added `Consumer`, useful when we need to both expose and consume a value simultaneously. -# 1.2.0 +## 1.2.0 - Added: `HookProvider`, a `Provider` that creates its value from a `Hook`. - Deprecated `StatefulProvider`. Either make a `StatefulWidget` or use `HookProvider`. - Integrated the widget inspector, so that `Provider` widget shows the current value. -# 1.1.1 +## 1.1.1 - add `didChangeDependencies` callback to allow updating the value based on an `InheritedWidget` - add `updateShouldNotify` method to both `Provider` and `StatefulProvider` -# 1.1.0 +## 1.1.0 - `onDispose` has been added to `StatefulProvider` - [BuildContext] is now passed to `valueBuilder` callback diff --git a/LICENSE b/packages/provider/LICENSE similarity index 100% rename from LICENSE rename to packages/provider/LICENSE diff --git a/README.md b/packages/provider/README.md similarity index 100% rename from README.md rename to packages/provider/README.md diff --git a/packages/provider/analysis_options.yaml b/packages/provider/analysis_options.yaml new file mode 100644 index 00000000..db4f7f6b --- /dev/null +++ b/packages/provider/analysis_options.yaml @@ -0,0 +1,5 @@ +include: ../../analysis_options.yaml +linter: + rules: + public_member_api_docs: false + lines_longer_than_80_chars: false \ No newline at end of file diff --git a/example/.gitignore b/packages/provider/example/.gitignore similarity index 100% rename from example/.gitignore rename to packages/provider/example/.gitignore diff --git a/packages/provider/example/.metadata b/packages/provider/example/.metadata new file mode 100644 index 00000000..b6e02ec2 --- /dev/null +++ b/packages/provider/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "8bc223e3e5cc919bada837ecc0afdc546969a79e" + channel: "master" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: android + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: ios + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: linux + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: macos + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: web + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + - platform: windows + create_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + base_revision: 8bc223e3e5cc919bada837ecc0afdc546969a79e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/example/lib/main.dart b/packages/provider/example/lib/main.dart similarity index 97% rename from example/lib/main.dart rename to packages/provider/example/lib/main.dart index 9d653ca7..d9f50d64 100644 --- a/example/lib/main.dart +++ b/packages/provider/example/lib/main.dart @@ -1,4 +1,3 @@ -// ignore_for_file: public_member_api_docs, lines_longer_than_80_chars import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/example/pubspec.yaml b/packages/provider/example/pubspec.yaml similarity index 100% rename from example/pubspec.yaml rename to packages/provider/example/pubspec.yaml diff --git a/example/test/widget_test.dart b/packages/provider/example/test/widget_test.dart similarity index 100% rename from example/test/widget_test.dart rename to packages/provider/example/test/widget_test.dart diff --git a/example/test_driver/app.dart b/packages/provider/example/test_driver/app.dart similarity index 100% rename from example/test_driver/app.dart rename to packages/provider/example/test_driver/app.dart diff --git a/example/test_driver/app_test.dart b/packages/provider/example/test_driver/app_test.dart similarity index 100% rename from example/test_driver/app_test.dart rename to packages/provider/example/test_driver/app_test.dart diff --git a/packages/provider/extension/devtools/config.yaml b/packages/provider/extension/devtools/config.yaml new file mode 100644 index 00000000..e0da96ef --- /dev/null +++ b/packages/provider/extension/devtools/config.yaml @@ -0,0 +1,4 @@ +name: provider +issueTracker: https://github.com/rrousselGit/provider/issues +version: 0.0.1 +materialIconCodePoint: "0xe0b1" diff --git a/lib/provider.dart b/packages/provider/lib/provider.dart similarity index 100% rename from lib/provider.dart rename to packages/provider/lib/provider.dart diff --git a/lib/single_child_widget.dart b/packages/provider/lib/single_child_widget.dart similarity index 100% rename from lib/single_child_widget.dart rename to packages/provider/lib/single_child_widget.dart diff --git a/lib/src/async_provider.dart b/packages/provider/lib/src/async_provider.dart similarity index 100% rename from lib/src/async_provider.dart rename to packages/provider/lib/src/async_provider.dart diff --git a/lib/src/change_notifier_provider.dart b/packages/provider/lib/src/change_notifier_provider.dart similarity index 100% rename from lib/src/change_notifier_provider.dart rename to packages/provider/lib/src/change_notifier_provider.dart diff --git a/lib/src/consumer.dart b/packages/provider/lib/src/consumer.dart similarity index 100% rename from lib/src/consumer.dart rename to packages/provider/lib/src/consumer.dart diff --git a/lib/src/deferred_inherited_provider.dart b/packages/provider/lib/src/deferred_inherited_provider.dart similarity index 100% rename from lib/src/deferred_inherited_provider.dart rename to packages/provider/lib/src/deferred_inherited_provider.dart diff --git a/lib/src/devtool.dart b/packages/provider/lib/src/devtool.dart similarity index 100% rename from lib/src/devtool.dart rename to packages/provider/lib/src/devtool.dart diff --git a/lib/src/inherited_provider.dart b/packages/provider/lib/src/inherited_provider.dart similarity index 100% rename from lib/src/inherited_provider.dart rename to packages/provider/lib/src/inherited_provider.dart diff --git a/lib/src/listenable_provider.dart b/packages/provider/lib/src/listenable_provider.dart similarity index 100% rename from lib/src/listenable_provider.dart rename to packages/provider/lib/src/listenable_provider.dart diff --git a/lib/src/provider.dart b/packages/provider/lib/src/provider.dart similarity index 100% rename from lib/src/provider.dart rename to packages/provider/lib/src/provider.dart diff --git a/lib/src/proxy_provider.dart b/packages/provider/lib/src/proxy_provider.dart similarity index 100% rename from lib/src/proxy_provider.dart rename to packages/provider/lib/src/proxy_provider.dart diff --git a/lib/src/reassemble_handler.dart b/packages/provider/lib/src/reassemble_handler.dart similarity index 100% rename from lib/src/reassemble_handler.dart rename to packages/provider/lib/src/reassemble_handler.dart diff --git a/lib/src/selector.dart b/packages/provider/lib/src/selector.dart similarity index 100% rename from lib/src/selector.dart rename to packages/provider/lib/src/selector.dart diff --git a/lib/src/value_listenable_provider.dart b/packages/provider/lib/src/value_listenable_provider.dart similarity index 100% rename from lib/src/value_listenable_provider.dart rename to packages/provider/lib/src/value_listenable_provider.dart diff --git a/pubspec.yaml b/packages/provider/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to packages/provider/pubspec.yaml diff --git a/test/null_safe/builder_test.dart b/packages/provider/test/null_safe/builder_test.dart similarity index 100% rename from test/null_safe/builder_test.dart rename to packages/provider/test/null_safe/builder_test.dart diff --git a/test/null_safe/change_notifier_provider_test.dart b/packages/provider/test/null_safe/change_notifier_provider_test.dart similarity index 100% rename from test/null_safe/change_notifier_provider_test.dart rename to packages/provider/test/null_safe/change_notifier_provider_test.dart diff --git a/test/null_safe/common.dart b/packages/provider/test/null_safe/common.dart similarity index 100% rename from test/null_safe/common.dart rename to packages/provider/test/null_safe/common.dart diff --git a/test/null_safe/consumer_test.dart b/packages/provider/test/null_safe/consumer_test.dart similarity index 100% rename from test/null_safe/consumer_test.dart rename to packages/provider/test/null_safe/consumer_test.dart diff --git a/test/null_safe/context_test.dart b/packages/provider/test/null_safe/context_test.dart similarity index 100% rename from test/null_safe/context_test.dart rename to packages/provider/test/null_safe/context_test.dart diff --git a/test/null_safe/devtool_test.dart b/packages/provider/test/null_safe/devtool_test.dart similarity index 100% rename from test/null_safe/devtool_test.dart rename to packages/provider/test/null_safe/devtool_test.dart diff --git a/test/null_safe/future_provider_test.dart b/packages/provider/test/null_safe/future_provider_test.dart similarity index 100% rename from test/null_safe/future_provider_test.dart rename to packages/provider/test/null_safe/future_provider_test.dart diff --git a/test/null_safe/inherited_provider_test.dart b/packages/provider/test/null_safe/inherited_provider_test.dart similarity index 100% rename from test/null_safe/inherited_provider_test.dart rename to packages/provider/test/null_safe/inherited_provider_test.dart diff --git a/test/null_safe/listenable_provider_test.dart b/packages/provider/test/null_safe/listenable_provider_test.dart similarity index 100% rename from test/null_safe/listenable_provider_test.dart rename to packages/provider/test/null_safe/listenable_provider_test.dart diff --git a/test/null_safe/listenable_proxy_provider_test.dart b/packages/provider/test/null_safe/listenable_proxy_provider_test.dart similarity index 100% rename from test/null_safe/listenable_proxy_provider_test.dart rename to packages/provider/test/null_safe/listenable_proxy_provider_test.dart diff --git a/test/null_safe/matchers.dart b/packages/provider/test/null_safe/matchers.dart similarity index 100% rename from test/null_safe/matchers.dart rename to packages/provider/test/null_safe/matchers.dart diff --git a/test/null_safe/multi_provider_test.dart b/packages/provider/test/null_safe/multi_provider_test.dart similarity index 100% rename from test/null_safe/multi_provider_test.dart rename to packages/provider/test/null_safe/multi_provider_test.dart diff --git a/test/null_safe/provider_test.dart b/packages/provider/test/null_safe/provider_test.dart similarity index 100% rename from test/null_safe/provider_test.dart rename to packages/provider/test/null_safe/provider_test.dart diff --git a/test/null_safe/proxy_provider_test.dart b/packages/provider/test/null_safe/proxy_provider_test.dart similarity index 100% rename from test/null_safe/proxy_provider_test.dart rename to packages/provider/test/null_safe/proxy_provider_test.dart diff --git a/test/null_safe/reassemble_test.dart b/packages/provider/test/null_safe/reassemble_test.dart similarity index 100% rename from test/null_safe/reassemble_test.dart rename to packages/provider/test/null_safe/reassemble_test.dart diff --git a/test/null_safe/selector_test.dart b/packages/provider/test/null_safe/selector_test.dart similarity index 100% rename from test/null_safe/selector_test.dart rename to packages/provider/test/null_safe/selector_test.dart diff --git a/test/null_safe/stateful_provider_test.dart b/packages/provider/test/null_safe/stateful_provider_test.dart similarity index 100% rename from test/null_safe/stateful_provider_test.dart rename to packages/provider/test/null_safe/stateful_provider_test.dart diff --git a/test/null_safe/stream_provider_test.dart b/packages/provider/test/null_safe/stream_provider_test.dart similarity index 100% rename from test/null_safe/stream_provider_test.dart rename to packages/provider/test/null_safe/stream_provider_test.dart diff --git a/test/null_safe/value_listenable_test.dart b/packages/provider/test/null_safe/value_listenable_test.dart similarity index 100% rename from test/null_safe/value_listenable_test.dart rename to packages/provider/test/null_safe/value_listenable_test.dart diff --git a/packages/provider_devtools_extension/.gitignore b/packages/provider_devtools_extension/.gitignore new file mode 100644 index 00000000..24476c5d --- /dev/null +++ b/packages/provider_devtools_extension/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/provider_devtools_extension/.metadata b/packages/provider_devtools_extension/.metadata new file mode 100644 index 00000000..86e2f966 --- /dev/null +++ b/packages/provider_devtools_extension/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "972d36c4efeee7e3bb16c050fd233389625a6470" + channel: "[user-branch]" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + - platform: web + create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/provider_devtools_extension/CHANGELOG.md b/packages/provider_devtools_extension/CHANGELOG.md new file mode 100644 index 00000000..edfacc94 --- /dev/null +++ b/packages/provider_devtools_extension/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +Initial release \ No newline at end of file diff --git a/packages/provider_devtools_extension/README.md b/packages/provider_devtools_extension/README.md new file mode 100644 index 00000000..de2f4129 --- /dev/null +++ b/packages/provider_devtools_extension/README.md @@ -0,0 +1,7 @@ +This is the source of the provider's devtool. + +You can locally run it with: + +``` +flutter run -d chrome --dart-define=use_simulated_environment=true +``` \ No newline at end of file diff --git a/packages/provider_devtools_extension/analysis_options.yaml b/packages/provider_devtools_extension/analysis_options.yaml new file mode 100644 index 00000000..1bcc7f2f --- /dev/null +++ b/packages/provider_devtools_extension/analysis_options.yaml @@ -0,0 +1,32 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options + +analyzer: + exclude: + - "**/*.freezed.dart" \ No newline at end of file diff --git a/packages/provider_devtools_extension/integration_test/provider_integration_test.dart b/packages/provider_devtools_extension/integration_test/provider_integration_test.dart new file mode 100644 index 00000000..d3c5a680 --- /dev/null +++ b/packages/provider_devtools_extension/integration_test/provider_integration_test.dart @@ -0,0 +1,3 @@ +// TODO: write integration test as proper integration test. +// See legacy test here: +// https://github.com/flutter/devtools/blob/master/packages/devtools_app/test/provider/provider_screen_integration_test.dart diff --git a/packages/provider_devtools_extension/lib/main.dart b/packages/provider_devtools_extension/lib/main.dart new file mode 100644 index 00000000..e90a5fe2 --- /dev/null +++ b/packages/provider_devtools_extension/lib/main.dart @@ -0,0 +1,24 @@ +import 'package:devtools_extensions/devtools_extensions.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import 'src/provider_screen.dart'; +import 'src/utils/riverpod_error_logger_observer.dart'; + +void main() { + runApp(const ProviderScope( + observers: [ErrorLoggerObserver()], + child: ProviderDevToolsExtension(), + )); +} + +class ProviderDevToolsExtension extends StatelessWidget { + const ProviderDevToolsExtension({super.key}); + + @override + Widget build(BuildContext context) { + return const DevToolsExtension( + child: ProviderScreenBody(), + ); + } +} diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart new file mode 100644 index 00000000..1699b3a7 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/eval.dart @@ -0,0 +1,73 @@ +// 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. + +/// A few utilities related to evaluating dart code + +library eval; + +import 'dart:async'; + +import 'package:devtools_app_shared/service.dart'; +import 'package:devtools_extensions/devtools_extensions.dart'; +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; +}); + +/// An [EvalOnDartLibrary] that has access to no specific library in particular +/// +/// Not suitable to be used when evaluating third-party objects, as it would +/// otherwise not be possible to read private properties. +final evalProvider = libraryEvalProvider('dart:io'); + +/// An [EvalOnDartLibrary] that has access to `provider` +final providerEvalProvider = + libraryEvalProvider('package:provider/src/provider.dart'); + +/// An [EvalOnDartLibrary] for custom objects. +final libraryEvalProvider = + FutureProviderFamily((ref, libraryPath) async { + final service = await ref.watch(serviceProvider.future); + + final eval = EvalOnDartLibrary( + libraryPath, + service, + serviceManager: serviceManager, + ); + ref.onDispose(eval.dispose); + return eval; +}); + +final hotRestartEventProvider = + ChangeNotifierProvider>((ref) { + final selectedIsolateListenable = + serviceManager.isolateManager.selectedIsolate; + + // Since ChangeNotifierProvider calls `dispose` on the returned ChangeNotifier + // when the provider is destroyed, we can't simply return `selectedIsolateListenable`. + // So we're making a copy of it instead. + final notifier = ValueNotifier(selectedIsolateListenable.value); + + void listener() => notifier.value = selectedIsolateListenable.value; + selectedIsolateListenable.addListener(listener); + ref.onDispose(() => selectedIsolateListenable.removeListener(listener)); + + return notifier; +}); 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 new file mode 100644 index 00000000..e27aa470 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart @@ -0,0 +1,26 @@ +// 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 new file mode 100644 index 00000000..78578601 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.dart @@ -0,0 +1,203 @@ +// 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. + +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 '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); + +@freezed +class PathToProperty with _$PathToProperty { + const factory PathToProperty.listIndex(int index) = ListIndexPath; + + // TODO test that mutating a Map does not collapse previously expanded keys + const factory PathToProperty.mapKey({ + required String? ref, + }) = MapKeyPath; + + /// Must not depend on [InstanceRef] and its ID, as they may change across + /// re-evaluations of the object. + /// Depending on those would lead to the UI collapsing previously expanded objects + /// because the new path to a property would be different. + /// + /// We can't just rely on the property name either, because in some cases + /// an object can have multiple properties with the same name (private properties + /// defined in different libraries) + const factory PathToProperty.objectProperty({ + required String name, + + /// Path to the class/mixin that defined this property + required String ownerUri, + + /// Name of the class/mixin that defined this property + required String ownerName, + }) = PropertyPath; + + factory PathToProperty.fromObjectField(ObjectField field) { + return PathToProperty.objectProperty( + name: field.name, + ownerUri: field.ownerUri, + ownerName: field.ownerName, + ); + } +} + +@freezed +class ObjectField with _$ObjectField { + factory ObjectField({ + required String name, + required bool isFinal, + required String ownerName, + required String ownerUri, + required Result ref, + + /// An [EvalOnDartLibrary] that can access this field from the owner object + required 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. + required bool isDefinedByDependency, + }) = _ObjectField; + + ObjectField._(); + + bool get isPrivate => name.startsWith('_'); +} + +@freezed +class InstanceDetails with _$InstanceDetails { + InstanceDetails._(); + + factory InstanceDetails.nill({ + required Setter? setter, + }) = NullInstance; + + factory InstanceDetails.boolean( + String displayString, { + required String instanceRefId, + required Setter? setter, + }) = BoolInstance; + + factory InstanceDetails.number( + String displayString, { + required String instanceRefId, + required Setter? setter, + }) = NumInstance; + + factory InstanceDetails.string( + String displayString, { + required String instanceRefId, + required Setter? setter, + }) = StringInstance; + + factory InstanceDetails.map( + List keys, { + required int hash, + required String instanceRefId, + required Setter? setter, + }) = MapInstance; + + factory InstanceDetails.list({ + required int length, + required int hash, + required String instanceRefId, + required Setter? setter, + }) = ListInstance; + + factory InstanceDetails.object( + List fields, { + required String type, + required int hash, + required String instanceRefId, + required Setter? setter, + + /// An [EvalOnDartLibrary] associated with the library of this object + /// + /// This allows to edit private properties. + required EvalOnDartLibrary evalForInstance, + }) = ObjectInstance; + + factory InstanceDetails.enumeration({ + required String type, + required String value, + required Setter? setter, + required String instanceRefId, + }) = EnumInstance; + + bool get isExpandable { + bool falsy(Object _) => false; + + return map( + nill: falsy, + boolean: falsy, + number: falsy, + string: falsy, + enumeration: falsy, + map: (instance) => instance.keys.isNotEmpty, + list: (instance) => instance.length > 0, + object: (instance) => instance.fields.isNotEmpty, + ); + } + + // Since `nil` doesn't have those properties, we are manually exposing them + String? get instanceRefId { + return map( + nill: (_) => null, + boolean: (a) => a.instanceRefId, + number: (a) => a.instanceRefId, + string: (a) => a.instanceRefId, + map: (a) => a.instanceRefId, + list: (a) => a.instanceRefId, + object: (a) => a.instanceRefId, + enumeration: (a) => a.instanceRefId, + ); + } +} + +/// The path to visit child elements of an [Instance] or providers from `provider`/`riverpod`. +@freezed +class InstancePath with _$InstancePath { + const InstancePath._(); + + const factory InstancePath.fromInstanceId( + String instanceId, { + @Default([]) List pathToProperty, + }) = _InstancePathFromInstanceId; + + const factory InstancePath.fromProviderId( + String providerId, { + @Default([]) List pathToProperty, + }) = _InstancePathFromProviderId; + + InstancePath get root => copyWith(pathToProperty: []); + + InstancePath? get parent { + if (pathToProperty.isEmpty) return null; + + return copyWith( + pathToProperty: [ + for (var i = 0; i + 1 < pathToProperty.length; i++) pathToProperty[i], + ], + ); + } + + InstancePath pathForChild(PathToProperty property) { + return copyWith( + pathToProperty: [...pathToProperty, property], + ); + } +} 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 new file mode 100644 index 00000000..e28024d1 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_details.freezed.dart @@ -0,0 +1,3868 @@ +// 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 + +part of 'instance_details.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +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(); + +/// @nodoc +mixin _$PathToProperty { + @optionalTypeArgs + TResult when({ + required TResult Function(int index) listIndex, + required TResult Function(String? ref) mapKey, + required TResult Function(String name, String ownerUri, String ownerName) + objectProperty, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ListIndexPath value) listIndex, + required TResult Function(MapKeyPath value) mapKey, + required TResult Function(PropertyPath value) objectProperty, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PathToPropertyCopyWith<$Res> { + factory $PathToPropertyCopyWith( + PathToProperty value, $Res Function(PathToProperty) then) = + _$PathToPropertyCopyWithImpl<$Res>; +} + +/// @nodoc +class _$PathToPropertyCopyWithImpl<$Res> + implements $PathToPropertyCopyWith<$Res> { + _$PathToPropertyCopyWithImpl(this._value, this._then); + + final PathToProperty _value; + // ignore: unused_field + final $Res Function(PathToProperty) _then; +} + +/// @nodoc +abstract class $ListIndexPathCopyWith<$Res> { + factory $ListIndexPathCopyWith( + ListIndexPath value, $Res Function(ListIndexPath) then) = + _$ListIndexPathCopyWithImpl<$Res>; + $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; + + @override + $Res call({ + Object? index = freezed, + }) { + return _then(ListIndexPath( + index == freezed + ? _value.index + : index // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$ListIndexPath with DiagnosticableTreeMixin implements ListIndexPath { + const _$ListIndexPath(this.index); + + @override + final int index; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'PathToProperty.listIndex(index: $index)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'PathToProperty.listIndex')) + ..add(DiagnosticsProperty('index', index)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ListIndexPath && + const DeepCollectionEquality().equals(other.index, index)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(index)); + + @JsonKey(ignore: true) + @override + $ListIndexPathCopyWith get copyWith => + _$ListIndexPathCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int index) listIndex, + required TResult Function(String? ref) mapKey, + required TResult Function(String name, String ownerUri, String ownerName) + objectProperty, + }) { + return listIndex(index); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + }) { + return listIndex?.call(index); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + required TResult orElse(), + }) { + if (listIndex != null) { + return listIndex(index); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ListIndexPath value) listIndex, + required TResult Function(MapKeyPath value) mapKey, + required TResult Function(PropertyPath value) objectProperty, + }) { + return listIndex(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + }) { + return listIndex?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + required TResult orElse(), + }) { + if (listIndex != null) { + return listIndex(this); + } + return orElse(); + } +} + +abstract class ListIndexPath implements PathToProperty { + const factory ListIndexPath(int index) = _$ListIndexPath; + + int get index; + @JsonKey(ignore: true) + $ListIndexPathCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $MapKeyPathCopyWith<$Res> { + factory $MapKeyPathCopyWith( + MapKeyPath value, $Res Function(MapKeyPath) then) = + _$MapKeyPathCopyWithImpl<$Res>; + $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; + + @override + $Res call({ + Object? ref = freezed, + }) { + return _then(MapKeyPath( + ref: ref == freezed + ? _value.ref + : ref // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc + +class _$MapKeyPath with DiagnosticableTreeMixin implements MapKeyPath { + const _$MapKeyPath({required this.ref}); + + @override + final String? ref; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'PathToProperty.mapKey(ref: $ref)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'PathToProperty.mapKey')) + ..add(DiagnosticsProperty('ref', ref)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is MapKeyPath && + const DeepCollectionEquality().equals(other.ref, ref)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(ref)); + + @JsonKey(ignore: true) + @override + $MapKeyPathCopyWith get copyWith => + _$MapKeyPathCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int index) listIndex, + required TResult Function(String? ref) mapKey, + required TResult Function(String name, String ownerUri, String ownerName) + objectProperty, + }) { + return mapKey(ref); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + }) { + return mapKey?.call(ref); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + required TResult orElse(), + }) { + if (mapKey != null) { + return mapKey(ref); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ListIndexPath value) listIndex, + required TResult Function(MapKeyPath value) mapKey, + required TResult Function(PropertyPath value) objectProperty, + }) { + return mapKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + }) { + return mapKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + required TResult orElse(), + }) { + if (mapKey != null) { + return mapKey(this); + } + return orElse(); + } +} + +abstract class MapKeyPath implements PathToProperty { + const factory MapKeyPath({required String? ref}) = _$MapKeyPath; + + String? get ref; + @JsonKey(ignore: true) + $MapKeyPathCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PropertyPathCopyWith<$Res> { + factory $PropertyPathCopyWith( + PropertyPath value, $Res Function(PropertyPath) then) = + _$PropertyPathCopyWithImpl<$Res>; + $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; + + @override + $Res call({ + Object? name = freezed, + Object? ownerUri = freezed, + Object? ownerName = freezed, + }) { + return _then(PropertyPath( + name: name == freezed + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ownerUri: ownerUri == freezed + ? _value.ownerUri + : ownerUri // ignore: cast_nullable_to_non_nullable + as String, + ownerName: ownerName == freezed + ? _value.ownerName + : ownerName // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PropertyPath with DiagnosticableTreeMixin implements PropertyPath { + const _$PropertyPath( + {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 + + /// Name of the class/mixin that defined this property + final String ownerName; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'PathToProperty.objectProperty(name: $name, ownerUri: $ownerUri, ownerName: $ownerName)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'PathToProperty.objectProperty')) + ..add(DiagnosticsProperty('name', name)) + ..add(DiagnosticsProperty('ownerUri', ownerUri)) + ..add(DiagnosticsProperty('ownerName', ownerName)); + } + + @override + bool operator ==(dynamic 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)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(name), + const DeepCollectionEquality().hash(ownerUri), + const DeepCollectionEquality().hash(ownerName)); + + @JsonKey(ignore: true) + @override + $PropertyPathCopyWith get copyWith => + _$PropertyPathCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int index) listIndex, + required TResult Function(String? ref) mapKey, + required TResult Function(String name, String ownerUri, String ownerName) + objectProperty, + }) { + return objectProperty(name, ownerUri, ownerName); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + 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); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int index)? listIndex, + TResult Function(String? ref)? mapKey, + TResult Function(String name, String ownerUri, String ownerName)? + objectProperty, + required TResult orElse(), + }) { + if (objectProperty != null) { + return objectProperty(name, ownerUri, ownerName); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ListIndexPath value) listIndex, + required TResult Function(MapKeyPath value) mapKey, + required TResult Function(PropertyPath value) objectProperty, + }) { + return objectProperty(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + }) { + return objectProperty?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ListIndexPath value)? listIndex, + TResult Function(MapKeyPath value)? mapKey, + TResult Function(PropertyPath value)? objectProperty, + required TResult orElse(), + }) { + if (objectProperty != null) { + return objectProperty(this); + } + return orElse(); + } +} + +abstract class PropertyPath implements PathToProperty { + const factory PropertyPath( + {required String name, + required String ownerUri, + required String ownerName}) = _$PropertyPath; + + String get name; + + /// Path to the class/mixin that defined this property + String get ownerUri; + + /// 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, + ); + } +} + +/// @nodoc +const $ObjectField = _$ObjectFieldTearOff(); + +/// @nodoc +mixin _$ObjectField { + String get name => throw _privateConstructorUsedError; + bool get isFinal => throw _privateConstructorUsedError; + String get ownerName => throw _privateConstructorUsedError; + String get ownerUri => throw _privateConstructorUsedError; + Result get ref => throw _privateConstructorUsedError; + + /// An [EvalOnDartLibrary] that can access this field from the owner object + EvalOnDartLibrary get eval => throw _privateConstructorUsedError; + + /// 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. + bool get isDefinedByDependency => throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $ObjectFieldCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ObjectFieldCopyWith<$Res> { + factory $ObjectFieldCopyWith( + ObjectField value, $Res Function(ObjectField) then) = + _$ObjectFieldCopyWithImpl<$Res>; + $Res call( + {String name, + bool isFinal, + String ownerName, + String ownerUri, + Result ref, + EvalOnDartLibrary eval, + bool isDefinedByDependency}); + + $ResultCopyWith get ref; +} + +/// @nodoc +class _$ObjectFieldCopyWithImpl<$Res> implements $ObjectFieldCopyWith<$Res> { + _$ObjectFieldCopyWithImpl(this._value, this._then); + + final ObjectField _value; + // ignore: unused_field + final $Res Function(ObjectField) _then; + + @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(_value.copyWith( + name: name == freezed + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + isFinal: isFinal == freezed + ? _value.isFinal + : isFinal // ignore: cast_nullable_to_non_nullable + as bool, + ownerName: ownerName == freezed + ? _value.ownerName + : ownerName // ignore: cast_nullable_to_non_nullable + as String, + ownerUri: ownerUri == freezed + ? _value.ownerUri + : ownerUri // ignore: cast_nullable_to_non_nullable + as String, + ref: ref == freezed + ? _value.ref + : ref // ignore: cast_nullable_to_non_nullable + as Result, + eval: eval == freezed + ? _value.eval + : eval // ignore: cast_nullable_to_non_nullable + as EvalOnDartLibrary, + isDefinedByDependency: isDefinedByDependency == freezed + ? _value.isDefinedByDependency + : isDefinedByDependency // ignore: cast_nullable_to_non_nullable + as bool, + )); + } + + @override + $ResultCopyWith get ref { + return $ResultCopyWith(_value.ref, (value) { + return _then(_value.copyWith(ref: value)); + }); + } +} + +/// @nodoc +abstract class _$ObjectFieldCopyWith<$Res> + implements $ObjectFieldCopyWith<$Res> { + factory _$ObjectFieldCopyWith( + _ObjectField value, $Res Function(_ObjectField) then) = + __$ObjectFieldCopyWithImpl<$Res>; + @override + $Res call( + {String name, + bool isFinal, + String ownerName, + String ownerUri, + Result ref, + EvalOnDartLibrary eval, + bool isDefinedByDependency}); + + @override + $ResultCopyWith get ref; +} + +/// @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; + + @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 + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + isFinal: isFinal == freezed + ? _value.isFinal + : isFinal // ignore: cast_nullable_to_non_nullable + as bool, + ownerName: ownerName == freezed + ? _value.ownerName + : ownerName // ignore: cast_nullable_to_non_nullable + as String, + ownerUri: ownerUri == freezed + ? _value.ownerUri + : ownerUri // ignore: cast_nullable_to_non_nullable + as String, + ref: ref == freezed + ? _value.ref + : ref // ignore: cast_nullable_to_non_nullable + as Result, + eval: eval == freezed + ? _value.eval + : eval // ignore: cast_nullable_to_non_nullable + as EvalOnDartLibrary, + isDefinedByDependency: isDefinedByDependency == freezed + ? _value.isDefinedByDependency + : isDefinedByDependency // ignore: cast_nullable_to_non_nullable + as bool, + )); + } +} + +/// @nodoc + +class _$_ObjectField extends _ObjectField with DiagnosticableTreeMixin { + _$_ObjectField( + {required this.name, + required this.isFinal, + required this.ownerName, + required this.ownerUri, + required this.ref, + required this.eval, + required this.isDefinedByDependency}) + : super._(); + + @override + final String name; + @override + final bool isFinal; + @override + final String ownerName; + @override + final String ownerUri; + @override + final Result ref; + @override + + /// An [EvalOnDartLibrary] that can access this field from the owner object + final EvalOnDartLibrary eval; + @override + + /// 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. + final bool isDefinedByDependency; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'ObjectField(name: $name, isFinal: $isFinal, ownerName: $ownerName, ownerUri: $ownerUri, ref: $ref, eval: $eval, isDefinedByDependency: $isDefinedByDependency)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'ObjectField')) + ..add(DiagnosticsProperty('name', name)) + ..add(DiagnosticsProperty('isFinal', isFinal)) + ..add(DiagnosticsProperty('ownerName', ownerName)) + ..add(DiagnosticsProperty('ownerUri', ownerUri)) + ..add(DiagnosticsProperty('ref', ref)) + ..add(DiagnosticsProperty('eval', eval)) + ..add( + DiagnosticsProperty('isDefinedByDependency', isDefinedByDependency)); + } + + @override + bool operator ==(dynamic 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)); + } + + @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)); + + @JsonKey(ignore: true) + @override + _$ObjectFieldCopyWith<_ObjectField> get copyWith => + __$ObjectFieldCopyWithImpl<_ObjectField>(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; + _ObjectField._() : super._(); + + @override + String get name; + @override + bool get isFinal; + @override + String get ownerName; + @override + String get ownerUri; + @override + Result get ref; + @override + + /// An [EvalOnDartLibrary] that can access this field from the owner object + EvalOnDartLibrary get eval; + @override + + /// 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. + bool get isDefinedByDependency; + @override + @JsonKey(ignore: true) + _$ObjectFieldCopyWith<_ObjectField> 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; + + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) => + 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, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $InstanceDetailsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $InstanceDetailsCopyWith<$Res> { + factory $InstanceDetailsCopyWith( + InstanceDetails value, $Res Function(InstanceDetails) then) = + _$InstanceDetailsCopyWithImpl<$Res>; + $Res call({Setter? setter}); +} + +/// @nodoc +class _$InstanceDetailsCopyWithImpl<$Res> + implements $InstanceDetailsCopyWith<$Res> { + _$InstanceDetailsCopyWithImpl(this._value, this._then); + + final InstanceDetails _value; + // ignore: unused_field + final $Res Function(InstanceDetails) _then; + + @override + $Res call({ + Object? setter = freezed, + }) { + return _then(_value.copyWith( + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc +abstract class $NullInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $NullInstanceCopyWith( + NullInstance value, $Res Function(NullInstance) then) = + _$NullInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? setter = freezed, + }) { + return _then(NullInstance( + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$NullInstance extends NullInstance with DiagnosticableTreeMixin { + _$NullInstance({required this.setter}) : super._(); + + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.nill(setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.nill')) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NullInstance && + (identical(other.setter, setter) || other.setter == setter)); + } + + @override + int get hashCode => Object.hash(runtimeType, setter); + + @JsonKey(ignore: true) + @override + $NullInstanceCopyWith get copyWith => + _$NullInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return nill(setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return nill?.call(setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (nill != null) { + return nill(setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return nill(this); + } + + @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, + }) { + return nill?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (nill != null) { + return nill(this); + } + return orElse(); + } +} + +abstract class NullInstance extends InstanceDetails { + factory NullInstance({required Setter? setter}) = _$NullInstance; + NullInstance._() : super._(); + + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $NullInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $BoolInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $BoolInstanceCopyWith( + BoolInstance value, $Res Function(BoolInstance) then) = + _$BoolInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? displayString = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + }) { + return _then(BoolInstance( + displayString == freezed + ? _value.displayString + : displayString // ignore: cast_nullable_to_non_nullable + as String, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$BoolInstance extends BoolInstance with DiagnosticableTreeMixin { + _$BoolInstance(this.displayString, + {required this.instanceRefId, required this.setter}) + : super._(); + + @override + final String displayString; + @override + final String instanceRefId; + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.boolean(displayString: $displayString, instanceRefId: $instanceRefId, setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.boolean')) + ..add(DiagnosticsProperty('displayString', displayString)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is BoolInstance && + const DeepCollectionEquality() + .equals(other.displayString, displayString) && + const DeepCollectionEquality() + .equals(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); + + @JsonKey(ignore: true) + @override + $BoolInstanceCopyWith get copyWith => + _$BoolInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return boolean(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return boolean?.call(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (boolean != null) { + return boolean(displayString, instanceRefId, setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return boolean(this); + } + + @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, + }) { + return boolean?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (boolean != null) { + return boolean(this); + } + return orElse(); + } +} + +abstract class BoolInstance extends InstanceDetails { + factory BoolInstance(String displayString, + {required String instanceRefId, + required Setter? setter}) = _$BoolInstance; + BoolInstance._() : super._(); + + String get displayString; + String get instanceRefId; + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $BoolInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $NumInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $NumInstanceCopyWith( + NumInstance value, $Res Function(NumInstance) then) = + _$NumInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? displayString = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + }) { + return _then(NumInstance( + displayString == freezed + ? _value.displayString + : displayString // ignore: cast_nullable_to_non_nullable + as String, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$NumInstance extends NumInstance with DiagnosticableTreeMixin { + _$NumInstance(this.displayString, + {required this.instanceRefId, required this.setter}) + : super._(); + + @override + final String displayString; + @override + final String instanceRefId; + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.number(displayString: $displayString, instanceRefId: $instanceRefId, setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.number')) + ..add(DiagnosticsProperty('displayString', displayString)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NumInstance && + const DeepCollectionEquality() + .equals(other.displayString, displayString) && + const DeepCollectionEquality() + .equals(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); + + @JsonKey(ignore: true) + @override + $NumInstanceCopyWith get copyWith => + _$NumInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return number(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return number?.call(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (number != null) { + return number(displayString, instanceRefId, setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return number(this); + } + + @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, + }) { + return number?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (number != null) { + return number(this); + } + return orElse(); + } +} + +abstract class NumInstance extends InstanceDetails { + factory NumInstance(String displayString, + {required String instanceRefId, required Setter? setter}) = _$NumInstance; + NumInstance._() : super._(); + + String get displayString; + String get instanceRefId; + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $NumInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $StringInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $StringInstanceCopyWith( + StringInstance value, $Res Function(StringInstance) then) = + _$StringInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? displayString = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + }) { + return _then(StringInstance( + displayString == freezed + ? _value.displayString + : displayString // ignore: cast_nullable_to_non_nullable + as String, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$StringInstance extends StringInstance with DiagnosticableTreeMixin { + _$StringInstance(this.displayString, + {required this.instanceRefId, required this.setter}) + : super._(); + + @override + final String displayString; + @override + final String instanceRefId; + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.string(displayString: $displayString, instanceRefId: $instanceRefId, setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.string')) + ..add(DiagnosticsProperty('displayString', displayString)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StringInstance && + const DeepCollectionEquality() + .equals(other.displayString, displayString) && + const DeepCollectionEquality() + .equals(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); + + @JsonKey(ignore: true) + @override + $StringInstanceCopyWith get copyWith => + _$StringInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return string(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return string?.call(displayString, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (string != null) { + return string(displayString, instanceRefId, setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return string(this); + } + + @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, + }) { + return string?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (string != null) { + return string(this); + } + return orElse(); + } +} + +abstract class StringInstance extends InstanceDetails { + factory StringInstance(String displayString, + {required String instanceRefId, + required Setter? setter}) = _$StringInstance; + StringInstance._() : super._(); + + String get displayString; + String get instanceRefId; + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $StringInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $MapInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $MapInstanceCopyWith( + MapInstance value, $Res Function(MapInstance) then) = + _$MapInstanceCopyWithImpl<$Res>; + @override + $Res call( + {List keys, + int hash, + String instanceRefId, + Setter? setter}); +} + +/// @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; + + @override + $Res call({ + Object? keys = freezed, + Object? hash = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + }) { + return _then(MapInstance( + keys == freezed + ? _value.keys + : keys // ignore: cast_nullable_to_non_nullable + as List, + hash: hash == freezed + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as int, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$MapInstance extends MapInstance with DiagnosticableTreeMixin { + _$MapInstance(this.keys, + {required this.hash, required this.instanceRefId, required this.setter}) + : super._(); + + @override + final List keys; + @override + final int hash; + @override + final String instanceRefId; + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.map(keys: $keys, hash: $hash, instanceRefId: $instanceRefId, setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.map')) + ..add(DiagnosticsProperty('keys', keys)) + ..add(DiagnosticsProperty('hash', hash)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic 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) && + (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); + + @JsonKey(ignore: true) + @override + $MapInstanceCopyWith get copyWith => + _$MapInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return map(keys, hash, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return map?.call(keys, hash, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (map != null) { + return map(keys, hash, instanceRefId, setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return map(this); + } + + @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, + }) { + return map?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (map != null) { + return map(this); + } + return orElse(); + } +} + +abstract class MapInstance extends InstanceDetails { + factory MapInstance(List keys, + {required int hash, + required String instanceRefId, + required Setter? setter}) = _$MapInstance; + MapInstance._() : super._(); + + List get keys; + int get hash; + String get instanceRefId; + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $MapInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ListInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $ListInstanceCopyWith( + ListInstance value, $Res Function(ListInstance) then) = + _$ListInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? length = freezed, + Object? hash = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + }) { + return _then(ListInstance( + length: length == freezed + ? _value.length + : length // ignore: cast_nullable_to_non_nullable + as int, + hash: hash == freezed + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as int, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + )); + } +} + +/// @nodoc + +class _$ListInstance extends ListInstance with DiagnosticableTreeMixin { + _$ListInstance( + {required this.length, + required this.hash, + required this.instanceRefId, + required this.setter}) + : super._(); + + @override + final int length; + @override + final int hash; + @override + final String instanceRefId; + @override + final Setter? setter; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.list(length: $length, hash: $hash, instanceRefId: $instanceRefId, setter: $setter)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.list')) + ..add(DiagnosticsProperty('length', length)) + ..add(DiagnosticsProperty('hash', hash)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)); + } + + @override + bool operator ==(dynamic 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) && + (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); + + @JsonKey(ignore: true) + @override + $ListInstanceCopyWith get copyWith => + _$ListInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return list(length, hash, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return list?.call(length, hash, instanceRefId, setter); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (list != null) { + return list(length, hash, instanceRefId, setter); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return list(this); + } + + @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, + }) { + return list?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (list != null) { + return list(this); + } + return orElse(); + } +} + +abstract class ListInstance extends InstanceDetails { + factory ListInstance( + {required int length, + required int hash, + required String instanceRefId, + required Setter? setter}) = _$ListInstance; + ListInstance._() : super._(); + + int get length; + int get hash; + String get instanceRefId; + @override + Setter? get setter; + @override + @JsonKey(ignore: true) + $ListInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ObjectInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $ObjectInstanceCopyWith( + ObjectInstance value, $Res Function(ObjectInstance) then) = + _$ObjectInstanceCopyWithImpl<$Res>; + @override + $Res call( + {List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance}); +} + +/// @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; + + @override + $Res call({ + Object? fields = freezed, + Object? type = freezed, + Object? hash = freezed, + Object? instanceRefId = freezed, + Object? setter = freezed, + Object? evalForInstance = freezed, + }) { + return _then(ObjectInstance( + fields == freezed + ? _value.fields + : fields // ignore: cast_nullable_to_non_nullable + as List, + type: type == freezed + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + hash: hash == freezed + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as int, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + evalForInstance: evalForInstance == freezed + ? _value.evalForInstance + : evalForInstance // ignore: cast_nullable_to_non_nullable + as EvalOnDartLibrary, + )); + } +} + +/// @nodoc + +class _$ObjectInstance extends ObjectInstance with DiagnosticableTreeMixin { + _$ObjectInstance(this.fields, + {required this.type, + required this.hash, + required this.instanceRefId, + required this.setter, + required this.evalForInstance}) + : super._(); + + @override + final List fields; + @override + final String type; + @override + final int hash; + @override + final String instanceRefId; + @override + final Setter? setter; + @override + + /// An [EvalOnDartLibrary] associated with the library of this object + /// + /// This allows to edit private properties. + final EvalOnDartLibrary evalForInstance; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.object(fields: $fields, type: $type, hash: $hash, instanceRefId: $instanceRefId, setter: $setter, evalForInstance: $evalForInstance)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.object')) + ..add(DiagnosticsProperty('fields', fields)) + ..add(DiagnosticsProperty('type', type)) + ..add(DiagnosticsProperty('hash', hash)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)) + ..add(DiagnosticsProperty('setter', setter)) + ..add(DiagnosticsProperty('evalForInstance', evalForInstance)); + } + + @override + bool operator ==(dynamic 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) && + (identical(other.setter, setter) || other.setter == setter) && + const DeepCollectionEquality() + .equals(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), + setter, + const DeepCollectionEquality().hash(evalForInstance)); + + @JsonKey(ignore: true) + @override + $ObjectInstanceCopyWith get copyWith => + _$ObjectInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return object(fields, type, hash, instanceRefId, setter, evalForInstance); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return object?.call( + fields, type, hash, instanceRefId, setter, evalForInstance); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (object != null) { + return object(fields, type, hash, instanceRefId, setter, evalForInstance); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return object(this); + } + + @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, + }) { + return object?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (object != null) { + return object(this); + } + return orElse(); + } +} + +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; + ObjectInstance._() : super._(); + + List get fields; + String get type; + int get hash; + String get instanceRefId; + @override + Setter? get setter; + + /// An [EvalOnDartLibrary] associated with the library of this object + /// + /// This allows to edit private properties. + EvalOnDartLibrary get evalForInstance; + @override + @JsonKey(ignore: true) + $ObjectInstanceCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $EnumInstanceCopyWith<$Res> + implements $InstanceDetailsCopyWith<$Res> { + factory $EnumInstanceCopyWith( + EnumInstance value, $Res Function(EnumInstance) then) = + _$EnumInstanceCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? type = freezed, + Object? value = freezed, + Object? setter = freezed, + Object? instanceRefId = freezed, + }) { + return _then(EnumInstance( + type: type == freezed + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + value: value == freezed + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + setter: setter == freezed + ? _value.setter + : setter // ignore: cast_nullable_to_non_nullable + as Setter?, + instanceRefId: instanceRefId == freezed + ? _value.instanceRefId + : instanceRefId // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EnumInstance extends EnumInstance with DiagnosticableTreeMixin { + _$EnumInstance( + {required this.type, + required this.value, + required this.setter, + required this.instanceRefId}) + : super._(); + + @override + final String type; + @override + final String value; + @override + final Setter? setter; + @override + final String instanceRefId; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstanceDetails.enumeration(type: $type, value: $value, setter: $setter, instanceRefId: $instanceRefId)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstanceDetails.enumeration')) + ..add(DiagnosticsProperty('type', type)) + ..add(DiagnosticsProperty('value', value)) + ..add(DiagnosticsProperty('setter', setter)) + ..add(DiagnosticsProperty('instanceRefId', instanceRefId)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is EnumInstance && + const DeepCollectionEquality().equals(other.type, type) && + const DeepCollectionEquality().equals(other.value, value) && + (identical(other.setter, setter) || other.setter == setter) && + const DeepCollectionEquality() + .equals(other.instanceRefId, instanceRefId)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(type), + const DeepCollectionEquality().hash(value), + setter, + const DeepCollectionEquality().hash(instanceRefId)); + + @JsonKey(ignore: true) + @override + $EnumInstanceCopyWith get copyWith => + _$EnumInstanceCopyWithImpl(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Setter? setter) nill, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + boolean, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + number, + required TResult Function( + String displayString, String instanceRefId, Setter? setter) + string, + required TResult Function(List keys, int hash, + String instanceRefId, Setter? setter) + map, + required TResult Function( + int length, int hash, String instanceRefId, Setter? setter) + list, + required TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance) + object, + required TResult Function( + String type, String value, Setter? setter, String instanceRefId) + enumeration, + }) { + return enumeration(type, value, setter, instanceRefId); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + }) { + return enumeration?.call(type, value, setter, instanceRefId); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Setter? setter)? nill, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + boolean, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + number, + TResult Function( + String displayString, String instanceRefId, Setter? setter)? + string, + TResult Function(List keys, int hash, String instanceRefId, + Setter? setter)? + map, + TResult Function( + int length, int hash, String instanceRefId, Setter? setter)? + list, + TResult Function( + List fields, + String type, + int hash, + String instanceRefId, + Setter? setter, + EvalOnDartLibrary evalForInstance)? + object, + TResult Function( + String type, String value, Setter? setter, String instanceRefId)? + enumeration, + required TResult orElse(), + }) { + if (enumeration != null) { + return enumeration(type, value, setter, instanceRefId); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NullInstance value) nill, + required TResult Function(BoolInstance value) boolean, + required TResult Function(NumInstance value) number, + required TResult Function(StringInstance value) string, + required TResult Function(MapInstance value) map, + required TResult Function(ListInstance value) list, + required TResult Function(ObjectInstance value) object, + required TResult Function(EnumInstance value) enumeration, + }) { + return enumeration(this); + } + + @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, + }) { + return enumeration?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + 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, + required TResult orElse(), + }) { + if (enumeration != null) { + return enumeration(this); + } + return orElse(); + } +} + +abstract class EnumInstance extends InstanceDetails { + factory EnumInstance( + {required String type, + required String value, + required Setter? setter, + required String instanceRefId}) = _$EnumInstance; + EnumInstance._() : super._(); + + String get type; + String get value; + @override + Setter? get setter; + String get instanceRefId; + @override + @JsonKey(ignore: true) + $EnumInstanceCopyWith 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( + String instanceId, List pathToProperty) + fromInstanceId, + required TResult Function( + String providerId, List pathToProperty) + fromProviderId, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(_InstancePathFromInstanceId value) fromInstanceId, + required TResult Function(_InstancePathFromProviderId value) fromProviderId, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $InstancePathCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $InstancePathCopyWith<$Res> { + factory $InstancePathCopyWith( + InstancePath value, $Res Function(InstancePath) then) = + _$InstancePathCopyWithImpl<$Res>; + $Res call({List pathToProperty}); +} + +/// @nodoc +class _$InstancePathCopyWithImpl<$Res> implements $InstancePathCopyWith<$Res> { + _$InstancePathCopyWithImpl(this._value, this._then); + + final InstancePath _value; + // ignore: unused_field + final $Res Function(InstancePath) _then; + + @override + $Res call({ + Object? pathToProperty = freezed, + }) { + return _then(_value.copyWith( + pathToProperty: pathToProperty == freezed + ? _value.pathToProperty + : pathToProperty // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc +abstract class _$InstancePathFromInstanceIdCopyWith<$Res> + implements $InstancePathCopyWith<$Res> { + factory _$InstancePathFromInstanceIdCopyWith( + _InstancePathFromInstanceId value, + $Res Function(_InstancePathFromInstanceId) then) = + __$InstancePathFromInstanceIdCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? instanceId = freezed, + Object? pathToProperty = freezed, + }) { + return _then(_InstancePathFromInstanceId( + instanceId == freezed + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as String, + pathToProperty: pathToProperty == freezed + ? _value.pathToProperty + : pathToProperty // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc + +class _$_InstancePathFromInstanceId extends _InstancePathFromInstanceId + with DiagnosticableTreeMixin { + const _$_InstancePathFromInstanceId(this.instanceId, + {this.pathToProperty = const []}) + : super._(); + + @override + final String instanceId; + @JsonKey() + @override + final List pathToProperty; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstancePath.fromInstanceId(instanceId: $instanceId, pathToProperty: $pathToProperty)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstancePath.fromInstanceId')) + ..add(DiagnosticsProperty('instanceId', instanceId)) + ..add(DiagnosticsProperty('pathToProperty', pathToProperty)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _InstancePathFromInstanceId && + const DeepCollectionEquality() + .equals(other.instanceId, instanceId) && + const DeepCollectionEquality() + .equals(other.pathToProperty, pathToProperty)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(instanceId), + const DeepCollectionEquality().hash(pathToProperty)); + + @JsonKey(ignore: true) + @override + _$InstancePathFromInstanceIdCopyWith<_InstancePathFromInstanceId> + get copyWith => __$InstancePathFromInstanceIdCopyWithImpl< + _InstancePathFromInstanceId>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function( + String instanceId, List pathToProperty) + fromInstanceId, + required TResult Function( + String providerId, List pathToProperty) + fromProviderId, + }) { + return fromInstanceId(instanceId, pathToProperty); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + }) { + return fromInstanceId?.call(instanceId, pathToProperty); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + required TResult orElse(), + }) { + if (fromInstanceId != null) { + return fromInstanceId(instanceId, pathToProperty); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(_InstancePathFromInstanceId value) fromInstanceId, + required TResult Function(_InstancePathFromProviderId value) fromProviderId, + }) { + return fromInstanceId(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + }) { + return fromInstanceId?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + required TResult orElse(), + }) { + if (fromInstanceId != null) { + return fromInstanceId(this); + } + return orElse(); + } +} + +abstract class _InstancePathFromInstanceId extends InstancePath { + const factory _InstancePathFromInstanceId(String instanceId, + {List pathToProperty}) = _$_InstancePathFromInstanceId; + const _InstancePathFromInstanceId._() : super._(); + + String get instanceId; + @override + List get pathToProperty; + @override + @JsonKey(ignore: true) + _$InstancePathFromInstanceIdCopyWith<_InstancePathFromInstanceId> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$InstancePathFromProviderIdCopyWith<$Res> + implements $InstancePathCopyWith<$Res> { + factory _$InstancePathFromProviderIdCopyWith( + _InstancePathFromProviderId value, + $Res Function(_InstancePathFromProviderId) then) = + __$InstancePathFromProviderIdCopyWithImpl<$Res>; + @override + $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; + + @override + $Res call({ + Object? providerId = freezed, + Object? pathToProperty = freezed, + }) { + return _then(_InstancePathFromProviderId( + providerId == freezed + ? _value.providerId + : providerId // ignore: cast_nullable_to_non_nullable + as String, + pathToProperty: pathToProperty == freezed + ? _value.pathToProperty + : pathToProperty // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc + +class _$_InstancePathFromProviderId extends _InstancePathFromProviderId + with DiagnosticableTreeMixin { + const _$_InstancePathFromProviderId(this.providerId, + {this.pathToProperty = const []}) + : super._(); + + @override + final String providerId; + @JsonKey() + @override + final List pathToProperty; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'InstancePath.fromProviderId(providerId: $providerId, pathToProperty: $pathToProperty)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'InstancePath.fromProviderId')) + ..add(DiagnosticsProperty('providerId', providerId)) + ..add(DiagnosticsProperty('pathToProperty', pathToProperty)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _InstancePathFromProviderId && + const DeepCollectionEquality() + .equals(other.providerId, providerId) && + const DeepCollectionEquality() + .equals(other.pathToProperty, pathToProperty)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(providerId), + const DeepCollectionEquality().hash(pathToProperty)); + + @JsonKey(ignore: true) + @override + _$InstancePathFromProviderIdCopyWith<_InstancePathFromProviderId> + get copyWith => __$InstancePathFromProviderIdCopyWithImpl< + _InstancePathFromProviderId>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function( + String instanceId, List pathToProperty) + fromInstanceId, + required TResult Function( + String providerId, List pathToProperty) + fromProviderId, + }) { + return fromProviderId(providerId, pathToProperty); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + }) { + return fromProviderId?.call(providerId, pathToProperty); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String instanceId, List pathToProperty)? + fromInstanceId, + TResult Function(String providerId, List pathToProperty)? + fromProviderId, + required TResult orElse(), + }) { + if (fromProviderId != null) { + return fromProviderId(providerId, pathToProperty); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(_InstancePathFromInstanceId value) fromInstanceId, + required TResult Function(_InstancePathFromProviderId value) fromProviderId, + }) { + return fromProviderId(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + }) { + return fromProviderId?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_InstancePathFromInstanceId value)? fromInstanceId, + TResult Function(_InstancePathFromProviderId value)? fromProviderId, + required TResult orElse(), + }) { + if (fromProviderId != null) { + return fromProviderId(this); + } + return orElse(); + } +} + +abstract class _InstancePathFromProviderId extends InstancePath { + const factory _InstancePathFromProviderId(String providerId, + {List pathToProperty}) = _$_InstancePathFromProviderId; + const _InstancePathFromProviderId._() : super._(); + + String get providerId; + @override + List get pathToProperty; + @override + @JsonKey(ignore: true) + _$InstancePathFromProviderIdCopyWith<_InstancePathFromProviderId> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/instance_providers.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_providers.dart new file mode 100644 index 00000000..8a730d8b --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_providers.dart @@ -0,0 +1,435 @@ +// 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. + +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:devtools_app_shared/service.dart'; +import 'package:devtools_app_shared/utils.dart'; +import 'package:devtools_extensions/devtools_extensions.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:vm_service/vm_service.dart' hide SentinelException; + +import 'eval.dart'; +import 'instance_details.dart'; +import 'result.dart'; + +Future _resolveInstanceRefForPath( + InstancePath path, { + required AutoDisposeRef ref, + required Disposable isAlive, + required InstanceDetails? parent, +}) async { + if (parent == null) { + // root of the provider tree + + return path.map( + fromProviderId: (path) async { + final eval = await ref.watch(providerEvalProvider.future); + // cause the instances to be re-evaluated when the devtool is notified + // that a provider changed + ref.watch(_providerChanged(path.providerId)); + + return eval.safeEval( + 'ProviderBinding.debugInstance.providerDetails["${path.providerId}"]?.value', + isAlive: isAlive, + ); + }, + fromInstanceId: (path) async { + final eval = await ref.watch(evalProvider.future); + return eval.safeEval( + 'value', + isAlive: isAlive, + scope: {'value': path.instanceId}, + ); + }, + ); + } + + final eval = await ref.watch(evalProvider.future); + + return parent.maybeMap( + // TODO: support sets + // TODO: iterables should use iterators / next() for iterable to navigate, to avoid recomputing the content + + map: (parent) { + final keyPath = path.pathToProperty.last as MapKeyPath; + final key = keyPath.ref == null ? 'null' : 'key'; + final keyPathRef = keyPath.ref; + + return eval.safeEval( + 'parent[$key]', + isAlive: isAlive, + scope: { + 'parent': parent.instanceRefId, + if (keyPathRef != null) 'key': keyPathRef, + }, + ); + }, + list: (parent) { + final indexPath = path.pathToProperty.last as ListIndexPath; + + return eval.safeEval( + 'parent[${indexPath.index}]', + isAlive: isAlive, + scope: {'parent': parent.instanceRefId}, + ); + }, + object: (parent) { + final propertyPath = path.pathToProperty.last as PropertyPath; + + // compare by both name and ref ID because an object may have multiple + // fields with the same name + final field = parent.fields.firstWhere( + (element) => + element.name == propertyPath.name && + element.ownerName == propertyPath.ownerName && + element.ownerUri == propertyPath.ownerUri, + ); + + final ref = field.ref.dataOrThrow; + + // we cannot do `eval('parent.propertyName')` because it is possible for + // objects to have multiple properties with the same name + return eval.safeGetInstance(ref, isAlive); + }, + orElse: () => throw Exception('Unexpected instance type.'), + ); +} + +/// Update a variable using the `=` operator. +/// +/// In rare cases, it is possible for this function to mutate the wrong property. +/// This can happen when an object contains multiple fields with the same name +/// (such as private properties or overridden properties), where the conflicting +/// fields are both defined in the same library. +Future _mutate( + String newValueExpression, { + required InstancePath path, + required AutoDisposeRef ref, + required Disposable isAlive, + required InstanceDetails parent, +}) async { + await parent.maybeMap( + list: (parent) async { + final eval = await ref.watch(evalProvider.future); + final indexPath = path.pathToProperty.last as ListIndexPath; + + return eval.safeEval( + 'parent[${indexPath.index}] = $newValueExpression', + isAlive: isAlive, + scope: { + 'parent': parent.instanceRefId, + }, + ); + }, + map: (parent) async { + final eval = await ref.watch(evalProvider.future); + final keyPath = path.pathToProperty.last as MapKeyPath; + final keyRefVar = keyPath.ref == null ? 'null' : 'key'; + final keyPathRef = keyPath.ref; + + return eval.safeEval( + 'parent[$keyRefVar] = $newValueExpression', + isAlive: isAlive, + scope: { + 'parent': parent.instanceRefId, + if (keyPathRef != null) 'key': keyPathRef, + }, + ); + }, + // TODO test can mutate properties of a mixin placed in a different library that the class that uses it + object: (parent) { + final propertyPath = path.pathToProperty.last as PropertyPath; + + final field = parent.fields.firstWhere( + (f) => + f.name == propertyPath.name && + f.ownerName == propertyPath.ownerName, + ); + + return field.eval.safeEval( + '(parent as ${propertyPath.ownerName}).${propertyPath.name} = $newValueExpression', + isAlive: isAlive, + scope: { + 'parent': parent.instanceRefId, + }, + ); + }, + orElse: () => throw StateError('Can only mutate lists/maps/objects'), + ); + + // TODO(rrousselGit): call notifyListeners/setState/notifyClients based on the modified object + + // Since the same object can be used in multiple locations at once, we need + // to refresh the entire tree instead of just the node that was modified. + ref.refresh(instanceProvider(path.root)); + + // Forces the UI to rebuild after the state change + await serviceManager.performHotReload(); +} + +Future _resolveParent( + AutoDisposeRef ref, + InstancePath path, +) async { + return path.pathToProperty.isNotEmpty + ? await ref.watch(instanceProvider(path.parent!).future) + : null; +} + +Future _tryParseEnum( + Instance instance, { + required EvalOnDartLibrary eval, + required Disposable isAlive, + required String instanceRefId, + required Setter? setter, +}) async { + if (instance.kind != InstanceKind.kPlainInstance || + instance.fields?.length != 2) return null; + + InstanceRef? findPropertyWithName(String name) { + return instance.fields + ?.firstWhereOrNull((element) => element.decl?.name == name) + ?.value; + } + + final nameRef = findPropertyWithName('_name'); + final indexRef = findPropertyWithName('index'); + if (nameRef == null || indexRef == null) return null; + + final nameInstanceFuture = eval.safeGetInstance(nameRef, isAlive); + final indexInstanceFuture = eval.safeGetInstance(indexRef, isAlive); + + final index = await indexInstanceFuture; + if (index.kind != InstanceKind.kInt) return null; + + final name = await nameInstanceFuture; + if (name.kind != InstanceKind.kString) return null; + + // Some Dart versions have for name "EnumType.valueName", others only have "valueName". + // So we have to strip the type manually + final nameSplit = name.valueAsString!.split('.'); + + return EnumInstance( + type: instance.classRef!.name!, + value: nameSplit.last, + instanceRefId: instanceRefId, + setter: setter, + ); +} + +Setter? _parseSetter({ + required InstancePath path, + required AutoDisposeRef ref, + required Disposable isAlive, + required InstanceDetails? parent, +}) { + if (parent == null) return null; + + Future mutate(String expression) { + return _mutate( + expression, + path: path, + ref: ref, + isAlive: isAlive, + parent: parent, + ); + } + + return parent.maybeMap( + // TODO const collections should have no setter + map: (parent) => mutate, + list: (parent) => mutate, + object: (parent) { + final keyPath = path.pathToProperty.last as PropertyPath; + + // Mutate properties by name as we can't mutate them from a reference. + // This may edit the wrong property when an object has two properties with + // with the same name. + // TODO use ownerUri + final field = parent.fields.firstWhere( + (field) => + field.name == keyPath.name && field.ownerName == keyPath.ownerName, + ); + + if (field.isFinal) return null; + return mutate; + }, + orElse: () => throw Exception('Unexpected instance type.'), + ); +} + +/// Fetches informations related to an instance/provider at a given path +/// +/// The UI should not be used directly. Instead, use [instanceProvider]. +final AutoDisposeFutureProviderFamily + instanceProvider = + AutoDisposeFutureProviderFamily( + (ref, path) async { + ref.watch(hotRestartEventProvider); + + final eval = await ref.watch(evalProvider.future); + + final isAlive = Disposable(); + ref.onDispose(isAlive.dispose); + + final parent = await _resolveParent(ref, path); + + final instanceRef = await _resolveInstanceRefForPath( + path, + ref: ref, + parent: parent, + isAlive: isAlive, + ); + + final setter = _parseSetter( + path: path, + isAlive: isAlive, + ref: ref, + parent: parent, + ); + + final instance = await eval.safeGetInstance(instanceRef, isAlive); + + switch (instance.kind) { + case InstanceKind.kNull: + return InstanceDetails.nill(setter: setter); + case InstanceKind.kBool: + return InstanceDetails.boolean( + instance.valueAsString!, + instanceRefId: instanceRef.id!, + setter: setter, + ); + case InstanceKind.kInt: + case InstanceKind.kDouble: + return InstanceDetails.number( + instance.valueAsString!, + instanceRefId: instanceRef.id!, + setter: setter, + ); + case InstanceKind.kString: + return InstanceDetails.string( + instance.valueAsString!, + instanceRefId: instanceRef.id!, + setter: setter, + ); + + case InstanceKind.kMap: + + // voluntarily throw if a key failed to load + final keysRef = instance.associations!.map((e) => e.key as InstanceRef); + + final keysFuture = Future.wait([ + for (final keyRef in keysRef) + ref.watch( + instanceProvider(InstancePath.fromInstanceId(keyRef.id!)).future, + ), + ]); + + return InstanceDetails.map( + await keysFuture, + hash: await eval.getHashCode(instance, isAlive: isAlive), + instanceRefId: instanceRef.id!, + setter: setter, + ); + + // TODO(rrousselGit): support sets + // TODO(rrousselGit): support custom lists + // TODO(rrousselGit): support Type + case InstanceKind.kList: + return InstanceDetails.list( + length: instance.length!, + hash: await eval.getHashCode(instance, isAlive: isAlive), + instanceRefId: instanceRef.id!, + setter: setter, + ); + + case InstanceKind.kPlainInstance: + default: + final enumDetails = await _tryParseEnum( + instance, + eval: eval, + isAlive: isAlive, + instanceRefId: instanceRef.id!, + setter: setter, + ); + + if (enumDetails != null) return enumDetails; + + final classInstance = + await eval.safeGetClass(instance.classRef!, isAlive); + final evalForInstance = + // TODO(rrousselGit) when can `library` be null? + ref.watch(libraryEvalProvider(classInstance.library!.uri!).future); + + final appName = tryParsePackageName(eval.isolate!.rootLib!.uri!); + + final fields = await _parseFields( + ref, + eval, + instance, + isAlive: isAlive, + appName: appName, + ); + + return InstanceDetails.object( + fields.sorted((a, b) => sortFieldsByName(a.name, b.name)), + hash: await eval.getHashCode(instance, isAlive: isAlive), + type: classInstance.name!, + instanceRefId: instanceRef.id!, + evalForInstance: await evalForInstance, + setter: setter, + ); + } + }, +); + +final _packageNameExp = RegExp( + r'package:(.+?)/', +); + +String? tryParsePackageName(String uri) { + return _packageNameExp.firstMatch(uri)?.group(1); +} + +Future> _parseFields( + AutoDisposeRef ref, + EvalOnDartLibrary eval, + Instance instance, { + required Disposable isAlive, + required String? appName, +}) { + final fields = instance.fields!.map((field) async { + final fieldDeclaration = field.decl!; + final owner = + await eval.safeGetClass(fieldDeclaration.owner! as ClassRef, isAlive); + + final ownerUri = fieldDeclaration.location!.script!.uri!; + final ownerName = owner.mixin?.name ?? owner.name!; + final ownerPackageName = tryParsePackageName(ownerUri); + + return ObjectField( + name: fieldDeclaration.name!, + isFinal: fieldDeclaration.isFinal!, + ref: parseSentinel(field.value), + ownerName: ownerName, + ownerUri: ownerUri, + eval: await ref.watch(libraryEvalProvider(ownerUri).future), + isDefinedByDependency: ownerPackageName != appName, + ); + }).toList(); + + return Future.wait(fields); +} + +final _providerChanged = + AutoDisposeStreamProviderFamily((ref, id) async* { + final service = await ref.watch(serviceProvider.future); + + yield* service.onExtensionEvent.where((event) { + return event.extensionKind == 'provider:provider_changed' && + event.extensionData?.data['id'] == id; + }); +}); 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 new file mode 100644 index 00000000..08746460 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/instance_viewer.dart @@ -0,0 +1,638 @@ +// 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. + +// TODO(rrousselGit) merge this code with the debugger view + +import 'dart:async'; +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:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import 'instance_details.dart'; +import 'instance_providers.dart'; + +import '../utils/sliver_iterable_child_delegate.dart'; + +const typeColor = Color.fromARGB(255, 78, 201, 176); +const boolColor = Color.fromARGB(255, 86, 156, 214); +const nullColor = boolColor; +const numColor = Color.fromARGB(255, 181, 206, 168); +const stringColor = Color.fromARGB(255, 206, 145, 120); + +const double rowHeight = 20.0; + +final isExpandedProvider = StateProviderFamily((ref, path) { + // expands the root by default, but not children + return path.pathToProperty.isEmpty; +}); + +final estimatedChildCountProvider = + AutoDisposeProviderFamily((ref, rootPath) { + int estimatedChildCount(InstancePath path) { + int one(InstanceDetails _) => 1; + + int expandableEstimatedChildCount(Iterable keys) { + if (!ref.watch(isExpandedProvider(path))) { + return 1; + } + return keys.fold(1, (acc, element) { + return acc + + estimatedChildCount( + path.pathForChild(element), + ); + }); + } + + return ref.watch(instanceProvider(path)).when( + loading: () => 1, + error: (err, stack) => 1, + data: (instance) { + return instance.map( + nill: one, + boolean: one, + number: one, + string: one, + enumeration: one, + map: (instance) { + return expandableEstimatedChildCount( + instance.keys.map( + (key) => PathToProperty.mapKey(ref: key.instanceRefId), + ), + ); + }, + list: (instance) { + return expandableEstimatedChildCount( + List.generate(instance.length, $PathToProperty.listIndex), + ); + }, + object: (instance) { + return expandableEstimatedChildCount( + instance.fields.map( + (field) => PathToProperty.fromObjectField(field), + ), + ); + }, + ); + }, + ); + } + + return estimatedChildCount(rootPath); +}); + +void showErrorSnackBar(BuildContext context, Object error) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('Error: $error')), + ); +} + +class InstanceViewer extends ConsumerStatefulWidget { + const InstanceViewer({ + Key? key, + required this.rootPath, + required this.showInternalProperties, + }) : super(key: key); + + final InstancePath rootPath; + final bool showInternalProperties; + + @override + ConsumerState createState() => _InstanceViewerState(); +} + +class _InstanceViewerState extends ConsumerState { + final scrollController = ScrollController(); + + @override + void dispose() { + scrollController.dispose(); + super.dispose(); + } + + Iterable _buildError( + Object error, + StackTrace? _, + InstancePath __, + ) { + if (error is SentinelException) { + final valueAsString = error.sentinel.valueAsString; + if (valueAsString != null) return [Text(valueAsString)]; + } + + return const [Text('')]; + } + + Iterable _buildListViewItems( + BuildContext context, + WidgetRef ref, { + required InstancePath path, + bool disableExpand = false, + }) { + return ref.watch(instanceProvider(path)).when( + loading: () => const [Text('loading...')], + error: (err, stack) => _buildError(err, stack, path), + data: (instance) sync* { + final isExpanded = ref.watch(isExpandedProvider(path).state); + yield _buildHeader( + instance, + path: path, + isExpanded: isExpanded, + disableExpand: disableExpand, + ); + + if (isExpanded.state) { + yield* instance.maybeMap( + object: (instance) => _buildObjectItem( + context, + ref, + instance, + path: path, + ), + list: (list) => _buildListItem( + context, + ref, + list, + path: path, + ), + map: (map) => _buildMapItem( + context, + ref, + map, + path: path, + ), + // Reaches when the root of the instance tree is a string/numbers/bool/.... + orElse: () => const [], + ); + } + }, + ); + } + + Widget _buildHeader( + InstanceDetails instance, { + required InstancePath path, + StateController? isExpanded, + bool disableExpand = false, + }) { + return _Expandable( + key: ValueKey(path), + isExpandable: !disableExpand && instance.isExpandable, + isExpanded: isExpanded, + title: instance.map( + enumeration: (instance) => _EditableField( + setter: instance.setter, + initialEditString: '${instance.type}.${instance.value}', + child: Text.rich( + TextSpan( + children: [ + TextSpan( + text: instance.type, + style: const TextStyle(color: typeColor), + ), + TextSpan(text: '.${instance.value}'), + ], + ), + ), + ), + nill: (instance) => _EditableField( + setter: instance.setter, + initialEditString: 'null', + child: const Text('null', style: TextStyle(color: nullColor)), + ), + string: (instance) => _EditableField( + setter: instance.setter, + initialEditString: '"${instance.displayString}"', + child: Text.rich( + TextSpan( + children: [ + const TextSpan(text: '"'), + TextSpan( + text: instance.displayString, + style: const TextStyle(color: stringColor), + ), + const TextSpan(text: '"'), + ], + ), + ), + ), + number: (instance) => _EditableField( + setter: instance.setter, + initialEditString: instance.displayString, + child: Text( + instance.displayString, + style: const TextStyle(color: numColor), + ), + ), + boolean: (instance) => _EditableField( + setter: instance.setter, + initialEditString: instance.displayString, + child: Text( + instance.displayString, + style: const TextStyle(color: boolColor), + ), + ), + map: (instance) => _ObjectHeader( + startToken: '{', + endToken: '}', + hash: instance.hash, + meta: instance.keys.isEmpty + ? null + : '${instance.keys.length} ${pluralize('element', instance.keys.length)}', + ), + list: (instance) => _ObjectHeader( + startToken: '[', + endToken: ']', + hash: instance.hash, + meta: instance.length == 0 + ? null + : '${instance.length} ${pluralize('element', instance.length)}', + ), + object: (instance) => _ObjectHeader( + type: instance.type, + hash: instance.hash, + startToken: '', + endToken: '', + // Never show the number of elements when using custom objects + meta: null, + ), + ), + ); + } + + Iterable _buildMapItem( + BuildContext context, + WidgetRef ref, + MapInstance instance, { + required InstancePath path, + }) sync* { + for (final key in instance.keys) { + final value = _buildListViewItems( + context, + ref, + path: path.pathForChild(PathToProperty.mapKey(ref: key.instanceRefId)), + ); + + final keyHeader = _buildHeader(key, disableExpand: true, path: path); + + var isFirstItem = true; + for (final child in value) { + yield child != null + ? Padding( + padding: const EdgeInsets.only(left: defaultSpacing), + child: isFirstItem + ? Row( + children: [ + keyHeader, + const Text(': '), + Expanded(child: child), + ], + ) + : child, + ) + : const SizedBox(); + + isFirstItem = false; + } + + assert( + !isFirstItem, + 'Bad state: the value of $key did not render any widget', + ); + } + } + + Iterable _buildListItem( + BuildContext context, + WidgetRef ref, + ListInstance instance, { + required InstancePath path, + }) sync* { + for (var index = 0; index < instance.length; index++) { + final children = _buildListViewItems( + context, + ref, + path: path.pathForChild(PathToProperty.listIndex(index)), + ); + + bool isFirst = true; + + for (final child in children) { + Widget? rowItem = child; + + // Add the item index only on the first line of the element + if (isFirst && rowItem != null) { + isFirst = false; + rowItem = Row( + children: [ + Text('[$index]: '), + Expanded(child: rowItem), + ], + ); + } + + yield rowItem != null + ? Padding( + padding: const EdgeInsets.only(left: defaultSpacing), + child: rowItem, + ) + : const SizedBox(); + } + } + } + + Iterable _buildObjectItem( + BuildContext context, + WidgetRef ref, + ObjectInstance instance, { + required InstancePath path, + }) sync* { + for (final field in instance.fields) { + if (!widget.showInternalProperties && + field.isDefinedByDependency && + field.isPrivate) { + // Hide private properties from classes defined by dependencies + continue; + } + + final children = _buildListViewItems( + context, + ref, + path: path.pathForChild(PathToProperty.fromObjectField(field)), + ); + + bool isFirst = true; + + for (final child in children) { + Widget? rowItem = child; + if (isFirst && rowItem != null) { + isFirst = false; + rowItem = Row( + children: [ + if (field.isFinal) + Text( + 'final ', + style: Theme.of(context).subtleTextStyle, + ), + Text('${field.name}: '), + Expanded(child: rowItem), + ], + ); + } + + yield rowItem != null + ? Padding( + padding: const EdgeInsets.only(left: defaultSpacing), + child: rowItem, + ) + : const SizedBox(); + } + } + } + + @override + Widget build(BuildContext context) { + return Scrollbar( + thumbVisibility: true, + controller: scrollController, + child: ListView.custom( + controller: scrollController, + // TODO: item height should be based on font size + itemExtent: rowHeight, + padding: const EdgeInsets.symmetric( + vertical: denseSpacing, + horizontal: defaultSpacing, + ), + childrenDelegate: SliverIterableChildDelegate( + _buildListViewItems( + context, + ref, + path: widget.rootPath, + disableExpand: true, + ).cast(), // This cast is necessary to avoid Null type errors + estimatedChildCount: + ref.watch(estimatedChildCountProvider(widget.rootPath)), + ), + ), + ); + } +} + +class _ObjectHeader extends StatelessWidget { + const _ObjectHeader({ + Key? key, + this.type, + required this.hash, + required this.meta, + required this.startToken, + required this.endToken, + }) : super(key: key); + + final String? type; + final int hash; + final String? meta; + final String startToken; + final String endToken; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Text.rich( + TextSpan( + children: [ + if (type != null) + TextSpan( + text: type, + style: const TextStyle(color: typeColor), + ), + TextSpan( + text: '#${shortHash(hash)}', + style: theme.subtleTextStyle, + ), + TextSpan(text: startToken), + if (meta != null) TextSpan(text: meta), + TextSpan(text: endToken), + ], + ), + ); + } +} + +class _EditableField extends StatefulWidget { + const _EditableField({ + Key? key, + required this.setter, + required this.child, + required this.initialEditString, + }) : super(key: key); + + final Widget child; + final String initialEditString; + final Future Function(String)? setter; + + @override + _EditableFieldState createState() => _EditableFieldState(); +} + +class _EditableFieldState extends State<_EditableField> { + final controller = TextEditingController(); + final focusNode = FocusNode(debugLabel: 'editable-field'); + final textFieldFocusNode = FocusNode(debugLabel: 'text-field'); + var isHovering = false; + + final _isAlive = Disposable(); + + @override + void dispose() { + _isAlive.dispose(); + controller.dispose(); + focusNode.dispose(); + textFieldFocusNode.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + if (widget.setter == null) return widget.child; + + final colorScheme = Theme.of(context).colorScheme; + + final editingChild = TextField( + autofocus: true, + controller: controller, + focusNode: textFieldFocusNode, + onSubmitted: (value) async { + try { + final setter = widget.setter; + if (setter != null) await setter(value); + } catch (err) { + if (!context.mounted) return; + showErrorSnackBar(context, err); + } + }, + decoration: InputDecoration( + contentPadding: const EdgeInsets.all(densePadding), + isDense: true, + border: OutlineInputBorder( + borderRadius: const BorderRadius.all(Radius.circular(5)), + borderSide: BorderSide(color: colorScheme.surface), + ), + ), + ); + + final displayChild = Stack( + clipBehavior: Clip.none, + children: [ + if (isHovering) + Positioned( + bottom: -5, + left: -5, + top: -5, + right: -5, + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: defaultBorderRadius, + border: Border.all(color: colorScheme.surface), + ), + ), + ), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + focusNode.requestFocus(); + textFieldFocusNode.requestFocus(); + controller.text = widget.initialEditString; + controller.selection = TextSelection( + baseOffset: 0, + extentOffset: widget.initialEditString.length, + ); + }, + child: Align( + alignment: Alignment.centerLeft, + heightFactor: 1, + child: widget.child, + ), + ), + ], + ); + + return AnimatedBuilder( + animation: focusNode, + builder: (context, _) { + final isEditing = focusNode.hasFocus; + + return Focus( + focusNode: focusNode, + onKey: (node, key) { + if (key.data.physicalKey == PhysicalKeyboardKey.escape) { + focusNode.unfocus(); + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + }, + child: MouseRegion( + onEnter: (_) => setState(() => isHovering = true), + onExit: (_) => setState(() => isHovering = false), + // use a Stack to show the borders, to avoid the UI "moving" when hovering + child: isEditing ? editingChild : displayChild, + ), + ); + }, + ); + } +} + +class _Expandable extends StatelessWidget { + const _Expandable({ + Key? key, + required this.isExpanded, + required this.isExpandable, + required this.title, + }) : super(key: key); + + final StateController? isExpanded; + final bool isExpandable; + final Widget title; + + @override + Widget build(BuildContext context) { + if (!isExpandable) { + return Align( + alignment: Alignment.centerLeft, + child: title, + ); + } + + final isExpanded = this.isExpanded!; + + return GestureDetector( + onTap: () => isExpanded.state = !isExpanded.state, + behavior: HitTestBehavior.opaque, + child: Row( + children: [ + TweenAnimationBuilder( + tween: Tween(end: isExpanded.state ? 0 : -math.pi / 2), + duration: defaultDuration, + builder: (context, angle, _) { + return Transform.rotate( + angle: angle, + child: Icon( + Icons.expand_more, + size: defaultIconSize, + ), + ); + }, + ), + title, + ], + ), + ); + } +} diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart new file mode 100644 index 00000000..746129b8 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/result.dart @@ -0,0 +1,82 @@ +// 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. + +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'; + +// 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 +class Result with _$Result { + Result._(); + factory Result.data(T value) = _ResultData; + factory Result.error(Object error, StackTrace stackTrace) = _ResultError; + + factory Result.guard(T Function() cb) { + try { + return Result.data(cb()); + } catch (err, stack) { + return Result.error(err, stack); + } + } + + static Future> guardFuture(Future Function() cb) async { + try { + return Result.data(await cb()); + } catch (err, stack) { + return Result.error(err, stack); + } + } + + Result chain(Res Function(T value) cb) { + return when( + data: (value) { + try { + return Result.data(cb(value)); + } catch (err, stack) { + return Result.error(err, stack); + } + }, + error: (err, stack) => Result.error(err, stack), + ); + } + + T get dataOrThrow { + return when( + data: (value) => value, + error: Error.throwWithStackTrace, + ); + } +} + +Result parseSentinel(Object? value) { + if (value is T) return Result.data(value); + + if (value == null) { + return Result.error( + ArgumentError( + 'Expected $value to be an instance of $T but received `null`', + ), + StackTrace.current, + ); + } + + if (value is Sentinel) { + return Result.error( + SentinelException(value), + StackTrace.current, + ); + } + + return Result.error(value, StackTrace.current); +} 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 new file mode 100644 index 00000000..54635970 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/result.freezed.dart @@ -0,0 +1,389 @@ +// 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 + +part of 'result.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +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(); + +/// @nodoc +mixin _$Result { + @optionalTypeArgs + TResult when({ + required TResult Function(T value) data, + required TResult Function(Object error, StackTrace stackTrace) error, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(_ResultData value) data, + required TResult Function(_ResultError value) error, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ResultCopyWith { + factory $ResultCopyWith(Result value, $Res Function(Result) then) = + _$ResultCopyWithImpl; +} + +/// @nodoc +class _$ResultCopyWithImpl implements $ResultCopyWith { + _$ResultCopyWithImpl(this._value, this._then); + + final Result _value; + // ignore: unused_field + final $Res Function(Result) _then; +} + +/// @nodoc +abstract class _$ResultDataCopyWith { + factory _$ResultDataCopyWith( + _ResultData value, $Res Function(_ResultData) then) = + __$ResultDataCopyWithImpl; + $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; + + @override + $Res call({ + Object? value = freezed, + }) { + return _then(_ResultData( + value == freezed + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as T, + )); + } +} + +/// @nodoc + +class _$_ResultData extends _ResultData with DiagnosticableTreeMixin { + _$_ResultData(this.value) : super._(); + + @override + final T value; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'Result<$T>.data(value: $value)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'Result<$T>.data')) + ..add(DiagnosticsProperty('value', value)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _ResultData && + const DeepCollectionEquality().equals(other.value, value)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(value)); + + @JsonKey(ignore: true) + @override + _$ResultDataCopyWith> get copyWith => + __$ResultDataCopyWithImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(T value) data, + required TResult Function(Object error, StackTrace stackTrace) error, + }) { + return data(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + }) { + return data?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + required TResult orElse(), + }) { + if (data != null) { + return data(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(_ResultData value) data, + required TResult Function(_ResultError value) error, + }) { + return data(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + }) { + return data?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + required TResult orElse(), + }) { + if (data != null) { + return data(this); + } + return orElse(); + } +} + +abstract class _ResultData extends Result { + factory _ResultData(T value) = _$_ResultData; + _ResultData._() : super._(); + + T get value; + @JsonKey(ignore: true) + _$ResultDataCopyWith> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$ResultErrorCopyWith { + factory _$ResultErrorCopyWith( + _ResultError value, $Res Function(_ResultError) then) = + __$ResultErrorCopyWithImpl; + $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; + + @override + $Res call({ + Object? error = freezed, + Object? stackTrace = freezed, + }) { + return _then(_ResultError( + error == freezed + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as Object, + stackTrace == freezed + ? _value.stackTrace + : stackTrace // ignore: cast_nullable_to_non_nullable + as StackTrace, + )); + } +} + +/// @nodoc + +class _$_ResultError extends _ResultError with DiagnosticableTreeMixin { + _$_ResultError(this.error, this.stackTrace) : super._(); + + @override + final Object error; + @override + final StackTrace stackTrace; + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'Result<$T>.error(error: $error, stackTrace: $stackTrace)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'Result<$T>.error')) + ..add(DiagnosticsProperty('error', error)) + ..add(DiagnosticsProperty('stackTrace', stackTrace)); + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _ResultError && + const DeepCollectionEquality().equals(other.error, error) && + const DeepCollectionEquality() + .equals(other.stackTrace, stackTrace)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(error), + const DeepCollectionEquality().hash(stackTrace)); + + @JsonKey(ignore: true) + @override + _$ResultErrorCopyWith> get copyWith => + __$ResultErrorCopyWithImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(T value) data, + required TResult Function(Object error, StackTrace stackTrace) error, + }) { + return error(this.error, stackTrace); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + }) { + return error?.call(this.error, stackTrace); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(T value)? data, + TResult Function(Object error, StackTrace stackTrace)? error, + required TResult orElse(), + }) { + if (error != null) { + return error(this.error, stackTrace); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(_ResultData value) data, + required TResult Function(_ResultError value) error, + }) { + return error(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + }) { + return error?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_ResultData value)? data, + TResult Function(_ResultError value)? error, + required TResult orElse(), + }) { + if (error != null) { + return error(this); + } + return orElse(); + } +} + +abstract class _ResultError extends Result { + factory _ResultError(Object error, StackTrace stackTrace) = _$_ResultError; + _ResultError._() : super._(); + + Object get error; + StackTrace get stackTrace; + @JsonKey(ignore: true) + _$ResultErrorCopyWith> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/packages/provider_devtools_extension/lib/src/provider_list.dart b/packages/provider_devtools_extension/lib/src/provider_list.dart new file mode 100644 index 00000000..d564df44 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/provider_list.dart @@ -0,0 +1,128 @@ +// 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. + +import 'package:devtools_app_shared/ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import 'provider_nodes.dart'; + +const _tilePadding = EdgeInsets.only( + left: defaultSpacing, + right: densePadding, + top: densePadding, + bottom: densePadding, +); + +final AutoDisposeStateNotifierProvider, String?> + selectedProviderIdProvider = + AutoDisposeStateNotifierProvider, String?>( + (ref) { + final controller = StateController(null); + + ref.listen>>( + sortedProviderNodesProvider, + (prev, value) { + final nodes = value.asData?.value; + if (nodes == null) return; + + if (controller.state == null) { + if (nodes.isNotEmpty) controller.state = nodes.first.id; + return; + } + + if (nodes.isEmpty) { + controller.state = null; + } + + /// The previously selected provider was unmounted + else if (!nodes.any((node) => node.id == controller.state)) { + controller.state = nodes.first.id; + } + }, + fireImmediately: true, + ); + + return controller; + }, + name: 'selectedProviderIdProvider', +); + +class ProviderList extends ConsumerStatefulWidget { + const ProviderList({Key? key}) : super(key: key); + + @override + ConsumerState createState() => _ProviderListState(); +} + +class _ProviderListState extends ConsumerState { + final scrollController = ScrollController(); + + @override + void dispose() { + scrollController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final nodes = ref.watch(sortedProviderNodesProvider); + + return nodes.when( + loading: () => const Center(child: CircularProgressIndicator()), + error: (err, stack) => Padding( + padding: _tilePadding, + child: Text('\n$stack'), + ), + data: (nodes) { + return Scrollbar( + controller: scrollController, + thumbVisibility: true, + child: ListView.builder( + primary: false, + controller: scrollController, + itemCount: nodes.length, + itemBuilder: (context, index) { + final node = nodes[index]; + return ProviderNodeItem( + key: Key('provider-${node.id}'), + node: node, + ); + }, + ), + ); + }, + ); + } +} + +class ProviderNodeItem extends ConsumerWidget { + const ProviderNodeItem({ + Key? key, + required this.node, + }) : super(key: key); + + final ProviderNode node; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final isSelected = ref.watch(selectedProviderIdProvider) == node.id; + + final colorScheme = Theme.of(context).colorScheme; + final backgroundColor = + isSelected ? colorScheme.selectedRowBackgroundColor : null; + + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + ref.read(selectedProviderIdProvider.notifier).state = node.id; + }, + child: Container( + color: backgroundColor, + padding: _tilePadding, + child: Text('${node.type}()'), + ), + ); + } +} diff --git a/packages/provider_devtools_extension/lib/src/provider_nodes.dart b/packages/provider_devtools_extension/lib/src/provider_nodes.dart new file mode 100644 index 00000000..11012680 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/provider_nodes.dart @@ -0,0 +1,108 @@ +// 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. + +import 'dart:async'; + +import 'package:devtools_app_shared/service.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:vm_service/vm_service.dart'; + +import 'instance_viewer/eval.dart'; + +@immutable +class ProviderNode { + const ProviderNode({ + required this.id, + required this.type, + }); + + final String id; + final String type; +} + +final _providerListChanged = AutoDisposeStreamProvider((ref) async* { + final service = await ref.watch(serviceProvider.future); + + yield* service.onExtensionEvent.where((event) { + return event.extensionKind == 'provider:provider_list_changed'; + }); +}); + +final _rawProviderIdsProvider = AutoDisposeFutureProvider>( + (ref) async { + // recompute the list of providers on hot-restart + ref.watch(hotRestartEventProvider); + // cause the list of providers to be re-evaluated when notified of a change + ref.watch(_providerListChanged); + + final isAlive = Disposable(); + ref.onDispose(isAlive.dispose); + + final eval = await ref.watch(providerEvalProvider.future); + + final providerIdRefs = await eval.evalInstance( + 'ProviderBinding.debugInstance.providerDetails.keys.toList()', + isAlive: isAlive, + ); + + final providerIdInstances = await Future.wait([ + for (final idRef in providerIdRefs.elements!.cast()) + eval.safeGetInstance(idRef, isAlive), + ]); + + return [ + for (final idInstance in providerIdInstances) idInstance.valueAsString!, + ]; + }, + name: '_rawProviderIdsProvider', +); + +final _rawProviderNodeProvider = + AutoDisposeFutureProviderFamily( + (ref, id) async { + // recompute the providers informations on hot-restart + ref.watch(hotRestartEventProvider); + + final isAlive = Disposable(); + ref.onDispose(isAlive.dispose); + + final eval = await ref.watch(providerEvalProvider.future); + + final providerNodeInstance = await eval.evalInstance( + "ProviderBinding.debugInstance.providerDetails['$id']", + isAlive: isAlive, + ); + + Future getFieldWithName(String name) { + return eval.safeGetInstance( + providerNodeInstance.fields! + .firstWhere((e) => e.decl?.name == name) + .value as InstanceRef, + isAlive, + ); + } + + final type = await getFieldWithName('type'); + + return ProviderNode( + id: id, + type: type.valueAsString!, + ); + }, + name: '_rawProviderNodeProvider', +); + +/// Combines [providerIdsProvider] with [providerNodeProvider] to obtain all +/// the [ProviderNode]s at once, sorted alphabetically. +final sortedProviderNodesProvider = + AutoDisposeFutureProvider>((ref) async { + final ids = await ref.watch(_rawProviderIdsProvider.future); + + final nodes = await Future.wait( + ids.map((id) => ref.watch(_rawProviderNodeProvider(id).future)), + ); + + return nodes.toList()..sort((a, b) => a.type.compareTo(b.type)); +}); diff --git a/packages/provider_devtools_extension/lib/src/provider_screen.dart b/packages/provider_devtools_extension/lib/src/provider_screen.dart new file mode 100644 index 00000000..db725cde --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/provider_screen.dart @@ -0,0 +1,160 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:devtools_app_shared/ui.dart'; +import 'package:devtools_extensions/devtools_extensions.dart'; +import 'package:flutter/material.dart'; + +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import 'instance_viewer/instance_details.dart'; +import 'instance_viewer/instance_providers.dart'; +import 'instance_viewer/instance_viewer.dart'; +import 'provider_list.dart'; +import 'provider_nodes.dart'; + +final _hasErrorProvider = Provider.autoDispose((ref) { + if (ref.watch(sortedProviderNodesProvider) is AsyncError) return true; + + final selectedProviderId = ref.watch(selectedProviderIdProvider); + + if (selectedProviderId == null) return false; + + final instance = ref.watch( + instanceProvider(InstancePath.fromProviderId(selectedProviderId)), + ); + + return instance is AsyncError; +}); + +final _selectedProviderNode = AutoDisposeProvider((ref) { + final selectedId = ref.watch(selectedProviderIdProvider); + + return ref.watch(sortedProviderNodesProvider).asData?.value.firstWhereOrNull( + (node) => node.id == selectedId, + ); +}); + +final _showInternals = StateProvider((ref) => false); + +class ProviderScreenBody extends ConsumerWidget { + const ProviderScreenBody({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final splitAxis = Split.axisFor(context, 0.85); + + // A provider will automatically be selected as soon as one is detected + final selectedProviderId = ref.watch(selectedProviderIdProvider); + final detailsTitleText = selectedProviderId != null + ? ref.watch(_selectedProviderNode)?.type ?? '' + : '[No provider selected]'; + + ref.listen(_hasErrorProvider, (_, hasError) { + 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) + Expanded( + child: InstanceViewer( + rootPath: InstancePath.fromProviderId(selectedProviderId), + showInternalProperties: ref.watch(_showInternals), + ), + ), + ], + ), + ), + ], + ); + } +} + +void showProviderErrorBanner() { + extensionManager.showBannerMessage( + key: 'provider_unknown_error', + type: 'error', + message: ''' +DevTools failed to connect with package:provider. + +This could be caused by an older version of package:provider; please make sure that you are using version >=5.0.0.''', + extensionName: 'provider', + ); +} + +class _StateInspectorSettingsDialog extends ConsumerWidget { + static const title = 'State inspector configurations'; + + @override + Widget build(BuildContext context, WidgetRef ref) { + return DevToolsDialog( + title: const DialogTitleText(title), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: () => + ref.read(_showInternals.notifier).update((state) => !state), + child: Row( + children: [ + Checkbox( + value: ref.watch(_showInternals), + onChanged: (_) => ref + .read(_showInternals.notifier) + .update((state) => !state), + ), + const Text( + 'Show private properties inherited from SDKs/packages', + ), + ], + ), + ), + ], + ), + actions: const [ + DialogCloseButton(), + ], + ); + } +} diff --git a/packages/provider_devtools_extension/lib/src/utils/riverpod_error_logger_observer.dart b/packages/provider_devtools_extension/lib/src/utils/riverpod_error_logger_observer.dart new file mode 100644 index 00000000..01343997 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/utils/riverpod_error_logger_observer.dart @@ -0,0 +1,44 @@ +// 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. + +import 'package:devtools_app_shared/service.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:logging/logging.dart'; + +final _log = Logger('riverpod_error_logger_observer'); + +class ErrorLoggerObserver extends ProviderObserver { + const ErrorLoggerObserver(); + + @override + void didAddProvider( + ProviderBase provider, + Object? value, + ProviderContainer container, + ) { + _maybeLogError(provider, value); + } + + @override + void didUpdateProvider( + ProviderBase provider, + Object? previousValue, + Object? newValue, + ProviderContainer container, + ) { + _maybeLogError(provider, newValue); + } + + void _maybeLogError(ProviderBase provider, Object? value) { + if (value is AsyncError) { + if (value.error is SentinelException) return; + _log.shout('Provider $provider failed with "${value.error}"'); + + final stackTrace = value.stackTrace; + if (stackTrace != null) { + _log.info(stackTrace); + } + } + } +} diff --git a/packages/provider_devtools_extension/lib/src/utils/sliver_iterable_child_delegate.dart b/packages/provider_devtools_extension/lib/src/utils/sliver_iterable_child_delegate.dart new file mode 100644 index 00000000..da32e4c6 --- /dev/null +++ b/packages/provider_devtools_extension/lib/src/utils/sliver_iterable_child_delegate.dart @@ -0,0 +1,43 @@ +// 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. + +import 'package:flutter/widgets.dart'; + +/// A delegate that allows using ListView with an undetermined list length +/// while preserve the "build only what is visible" behaviour. +class SliverIterableChildDelegate extends SliverChildDelegate { + SliverIterableChildDelegate( + this.children, { + this.estimatedChildCount, + }); + + final Iterable children; + int? _lastAccessedIndex; + late Iterator _lastAccessedIterator; + + @override + Widget? build(BuildContext context, int index) { + if (_lastAccessedIndex == null || _lastAccessedIndex! > index) { + _lastAccessedIndex = -1; + _lastAccessedIterator = children.iterator; + } + + while (_lastAccessedIndex! < index) { + _lastAccessedIterator.moveNext(); + _lastAccessedIndex = _lastAccessedIndex! + 1; + } + + return _lastAccessedIterator.current; + } + + @override + final int? estimatedChildCount; + + @override + bool shouldRebuild(SliverIterableChildDelegate oldDelegate) { + return children != oldDelegate.children || + _lastAccessedIndex != oldDelegate._lastAccessedIndex || + _lastAccessedIterator != oldDelegate._lastAccessedIterator; + } +} diff --git a/packages/provider_devtools_extension/pubspec.yaml b/packages/provider_devtools_extension/pubspec.yaml new file mode 100644 index 00000000..e82db472 --- /dev/null +++ b/packages/provider_devtools_extension/pubspec.yaml @@ -0,0 +1,32 @@ +name: provider_devtools_extension +description: "The Flutter web app for the package:provider DevTools extension." +publish_to: 'none' + +version: 0.0.1 + +environment: + sdk: '>=3.0.0 <4.0.0' + +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 + logging: ^1.1.1 + vm_service: ^11.9.0 + +dev_dependencies: + flutter_driver: + sdk: flutter + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + integration_test: + sdk: flutter + +flutter: + uses-material-design: true diff --git a/packages/provider_devtools_extension/test/provider_screen_test.dart b/packages/provider_devtools_extension/test/provider_screen_test.dart new file mode 100644 index 00000000..dcd87bc5 --- /dev/null +++ b/packages/provider_devtools_extension/test/provider_screen_test.dart @@ -0,0 +1,408 @@ +// 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. + +@TestOn('vm') +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:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'test_utils.dart'; + +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(() { + providerScreen = Container( + color: Colors.grey, + child: Directionality( + textDirection: TextDirection.ltr, + child: wrap( + const ProviderScreenBody(), + ), + ), + ); + }); + + // TODO: add a test that verifies the add banner message request was posted + // to devtools via the extension manager. + // group('ProviderScreen', () { + // testWidgetsWithWindowSize( + // 'shows ProviderUnknownErrorBanner if the devtool failed to fetch the list of providers', + // windowSize, + // (tester) async { + // await tester.pumpWidget( + // ProviderScope( + // overrides: [ + // sortedProviderNodesProvider.overrideWithValue( + // const AsyncValue.loading(), + // ), + // ], + // child: providerScreen, + // ), + // ); + + // await tester.pumpWidget( + // ProviderScope( + // overrides: [ + // sortedProviderNodesProvider.overrideWithValue( + // AsyncValue.error(StateError('')), + // ), + // ], + // child: providerScreen, + // ), + // ); + + // // wait for the Banner to appear as it is mounted asynchronously + // await tester.pump(); + + // await expectLater( + // find.byType(ProviderScreenBody), + // matchesGoldenFile( + // 'goldens/provider_screen/list_error_banner.png', + // ), + // ); + // }, + // ); + // }); + + group('selectedProviderIdProvider', () { + test('selects the first provider available', () async { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.loading(), + ), + ], + ); + addTearDown(container.dispose); + + final sub = container.listen( + selectedProviderIdProvider, + (prev, next) {}, + ); + + expect(sub.read(), isNull); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ProviderNode(id: '1', type: 'Provider'), + ]), + ), + ]); + + await container.pump(); + + expect(sub.read(), '0'); + }); + + test('selects the first provider available after an error', () async { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider.overrideWithValue( + AsyncValue.error(Error()), + ), + ], + ); + addTearDown(container.dispose); + + final sub = container.listen( + selectedProviderIdProvider, + (prev, next) {}, + ); + + // wait for the error to be handled + await container.pump(); + + expect(sub.read(), isNull); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ProviderNode(id: '1', type: 'Provider'), + ]), + ), + ]); + + // wait for the ids update to be handled + await container.pump(); + + expect(sub.read(), '0'); + }); + + test( + 'When the currently selected provider is removed, selects the next first provider', + () { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ]), + ), + ], + ); + addTearDown(container.dispose); + + final sub = container.listen( + selectedProviderIdProvider, + (prev, next) {}, + ); + + expect(sub.read(), '0'); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '1', type: 'Provider'), + ]), + ), + ]); + + expect(sub.read(), '1'); + }, + ); + + test('Once a provider is selected, further updates are no-op', () async { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ]), + ), + ], + ); + addTearDown(container.dispose); + + final sub = container.listen( + selectedProviderIdProvider, + (prev, next) {}, + ); + + await container.pump(); + + expect(sub.read(), '0'); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + // '0' is no-longer the first provider on purpose + const AsyncValue.data([ + ProviderNode(id: '1', type: 'Provider'), + ProviderNode(id: '0', type: 'Provider'), + ]), + ), + ]); + + await container.pump(); + + expect(sub.read(), '0'); + }); + + test( + 'when the list of providers becomes empty, the current provider is unselected ' + ', then, the first provider will be selected when the list becomes non-empty again.', + () async { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ]), + ), + ], + ); + addTearDown(container.dispose); + + final sub = container.listen( + selectedProviderIdProvider, + (prev, next) {}, + ); + + await container.pump(); + + expect(sub.read(), '0'); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([]), + ), + ]); + + await container.pump(); + + expect(sub.read(), isNull); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '1', type: 'Provider'), + ]), + ), + ]); + + await container.pump(); + + expect(sub.read(), '1'); + }, + ); + }); + + group('ProviderList', () { + List getOverrides() { + return [ + instanceProvider(const InstancePath.fromProviderId('0')) + .overrideWithValue( + AsyncValue.data( + InstanceDetails.string( + 'Value0', + instanceRefId: 'string/0', + setter: null, + ), + ), + ), + ]; + } + + testWidgetsWithWindowSize( + 'selects the first provider the first time a provider is received', + windowSize, + (tester) async { + final container = ProviderContainer( + overrides: [ + sortedProviderNodesProvider + .overrideWithValue(const AsyncValue.loading()), + ...getOverrides(), + ], + ); + + await tester.pumpWidget( + UncontrolledProviderScope( + container: container, + child: providerScreen, + ), + ); + + expect(container.read(selectedProviderIdProvider), isNull); + expect(find.byType(ProviderNodeItem), findsNothing); + + await expectLater( + find.byType(ProviderScreenBody), + matchesGoldenFile( + 'goldens/provider_screen/no_selected_provider.png', + ), + ); + + container.updateOverrides([ + sortedProviderNodesProvider.overrideWithValue( + const AsyncValue.data([ + ProviderNode(id: '0', type: 'Provider'), + ProviderNode(id: '1', type: 'Provider'), + ]), + ), + ...getOverrides(), + ]); + + await tester.pump(); + + expect(container.read(selectedProviderIdProvider), '0'); + expect(find.byType(ProviderNodeItem), findsNWidgets(2)); + expect( + find.descendant( + of: find.byKey(const Key('provider-0')), + matching: find.text('Provider()'), + ), + findsOneWidget, + ); + expect( + find.descendant( + of: find.byKey(const Key('provider-1')), + matching: find.text('Provider()'), + ), + findsOneWidget, + ); + + await expectLater( + find.byType(ProviderScreenBody), + matchesGoldenFile( + 'goldens/provider_screen/selected_provider.png', + ), + ); + }, + ); + + // TODO: add a test that verifies the add banner message request was posted + // to devtools via the extension manager. + // testWidgetsWithWindowSize( + // 'shows ProviderUnknownErrorBanner if the devtool failed to fetch the selected provider', + // windowSize, + // (tester) async { + // final overrides = [ + // sortedProviderNodesProvider.overrideWithValue( + // const AsyncValue.data([ + // ProviderNode(id: '0', type: 'Provider'), + // ProviderNode(id: '1', type: 'Provider'), + // ]), + // ), + // ...getOverrides(), + // ]; + + // await tester.pumpWidget( + // ProviderScope( + // overrides: [ + // ...overrides, + // instanceProvider(const InstancePath.fromProviderId('0')) + // .overrideWithValue(const AsyncValue.loading()), + // ], + // child: providerScreen, + // ), + // ); + + // await tester.pumpWidget( + // ProviderScope( + // overrides: [ + // ...overrides, + // instanceProvider(const InstancePath.fromProviderId('0')) + // .overrideWithValue(AsyncValue.error(Error())), + // ], + // child: providerScreen, + // ), + // ); + + // // await for the modal to be mounted as it is rendered asynchronously + // await tester.pump(); + + // expect( + // find.byKey( + // Key('ProviderUnknownErrorBanner - ${ProviderScreen.id}'), + // ), + // findsOneWidget, + // ); + + // await expectLater( + // find.byType(ProviderScreenBody), + // matchesGoldenFile( + // 'goldens/provider_screen/selected_provider_error_banner.png', + // ), + // ); + // }, + // ); + }); +} diff --git a/packages/provider_devtools_extension/test/test_utils.dart b/packages/provider_devtools_extension/test/test_utils.dart new file mode 100644 index 00000000..316c87c6 --- /dev/null +++ b/packages/provider_devtools_extension/test/test_utils.dart @@ -0,0 +1,106 @@ +import 'dart:io'; + +import 'package:devtools_app_shared/ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +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', + 'fonts/Roboto/Roboto-Light.ttf', + 'fonts/Roboto/Roboto-Regular.ttf', + 'fonts/Roboto/Roboto-Medium.ttf', + 'fonts/Roboto/Roboto-Bold.ttf', + 'fonts/Roboto/Roboto-Black.ttf', + ], + 'RobotoMono': [ + 'fonts/Roboto_Mono/RobotoMono-Thin.ttf', + 'fonts/Roboto_Mono/RobotoMono-Light.ttf', + 'fonts/Roboto_Mono/RobotoMono-Regular.ttf', + 'fonts/Roboto_Mono/RobotoMono-Medium.ttf', + 'fonts/Roboto_Mono/RobotoMono-Bold.ttf', + ], + 'Octicons': ['fonts/Octicons.ttf'], + // 'Codicon': ['packages/codicon/font/codicon.ttf'] + }; + + final loadFontsFuture = fonts.entries.map((entry) 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); + } + + await loader.load(); + }); + + await Future.wait(loadFontsFuture); +} + +// NOTE: the below helpers are duplicated from +// `flutter/devtools/packages/devtools_test`. We copied because `devtools_test` +// is not published on pub.dev for us to import. + +/// Wraps [widget] with the build context it needs to load in a test. +/// +/// This includes a [MaterialApp] to provide context like [Theme.of], a +/// [Material] to support elements like [TextField] that draw ink effects, and a +/// [Directionality] to support [RenderFlex] widgets like [Row] and [Column]. +Widget wrap(Widget widget) { + return MaterialApp( + theme: themeFor( + isDarkTheme: false, + ideTheme: IdeTheme(), + theme: ThemeData( + useMaterial3: true, + colorScheme: lightColorScheme, + ), + ), + home: Directionality( + textDirection: TextDirection.ltr, + child: widget, + ), + ); +} + +/// Runs a test with the size of the app window under test to [windowSize]. +void testWidgetsWithWindowSize( + String name, + Size windowSize, + WidgetTesterCallback test, { + bool skip = false, +}) { + testWidgets( + name, + (WidgetTester tester) async { + await _setWindowSize(tester, windowSize); + await test(tester); + await _resetWindowSize(tester); + }, + skip: skip, + ); +} + +Future _setWindowSize(WidgetTester tester, Size windowSize) async { + final binding = TestWidgetsFlutterBinding.ensureInitialized(); + await binding.setSurfaceSize(windowSize); + tester.view.physicalSize = windowSize; + tester.view.devicePixelRatio = 1.0; +} + +Future _resetWindowSize(WidgetTester tester) async { + await _setWindowSize(tester, const Size(800.0, 600.0)); +} diff --git a/packages/provider_devtools_extension/test_driver/integration_test.dart b/packages/provider_devtools_extension/test_driver/integration_test.dart new file mode 100644 index 00000000..be070e2b --- /dev/null +++ b/packages/provider_devtools_extension/test_driver/integration_test.dart @@ -0,0 +1,7 @@ +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:integration_test/integration_test_driver_extended.dart'; + +Future main() async { + final driver = await FlutterDriver.connect(); + await integrationDriver(driver: driver); +} diff --git a/packages/provider_devtools_extension/web/favicon.png b/packages/provider_devtools_extension/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/web/icons/Icon-192.png b/packages/provider_devtools_extension/web/icons/Icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..b749bfef07473333cf1dd31e9eed89862a5d52aa GIT binary patch literal 5292 zcmZ`-2T+sGz6~)*FVZ`aW+(v>MIm&M-g^@e2u-B-DoB?qO+b1Tq<5uCCv>ESfRum& zp%X;f!~1{tzL__3=gjVJ=j=J>+nMj%ncXj1Q(b|Ckbw{Y0FWpt%4y%$uD=Z*c-x~o zE;IoE;xa#7Ll5nj-e4CuXB&G*IM~D21rCP$*xLXAK8rIMCSHuSu%bL&S3)8YI~vyp@KBu9Ph7R_pvKQ@xv>NQ`dZp(u{Z8K3yOB zn7-AR+d2JkW)KiGx0hosml;+eCXp6+w%@STjFY*CJ?udJ64&{BCbuebcuH;}(($@@ znNlgBA@ZXB)mcl9nbX#F!f_5Z=W>0kh|UVWnf!At4V*LQP%*gPdCXd6P@J4Td;!Ur z<2ZLmwr(NG`u#gDEMP19UcSzRTL@HsK+PnIXbVBT@oHm53DZr?~V(0{rsalAfwgo zEh=GviaqkF;}F_5-yA!1u3!gxaR&Mj)hLuj5Q-N-@Lra{%<4ONja8pycD90&>yMB` zchhd>0C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umgmP9d6=PHmFIgx=0$(sjb>+0CHG)K@cPG{IxaJ&Ueo8)0RWgV9+gO7+Bl1(F z7!BslJ2MP*PWJ;x)QXbR$6jEr5q3 z(3}F@YO_P1NyTdEXRLU6fp?9V2-S=E+YaeLL{Y)W%6`k7$(EW8EZSA*(+;e5@jgD^I zaJQ2|oCM1n!A&-8`;#RDcZyk*+RPkn_r8?Ak@agHiSp*qFNX)&i21HE?yuZ;-C<3C zwJGd1lx5UzViP7sZJ&|LqH*mryb}y|%AOw+v)yc`qM)03qyyrqhX?ub`Cjwx2PrR! z)_z>5*!*$x1=Qa-0uE7jy0z`>|Ni#X+uV|%_81F7)b+nf%iz=`fF4g5UfHS_?PHbr zB;0$bK@=di?f`dS(j{l3-tSCfp~zUuva+=EWxJcRfp(<$@vd(GigM&~vaYZ0c#BTs z3ijkxMl=vw5AS&DcXQ%eeKt!uKvh2l3W?&3=dBHU=Gz?O!40S&&~ei2vg**c$o;i89~6DVns zG>9a*`k5)NI9|?W!@9>rzJ;9EJ=YlJTx1r1BA?H`LWijk(rTax9(OAu;q4_wTj-yj z1%W4GW&K4T=uEGb+E!>W0SD_C0RR91 literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/web/icons/Icon-512.png b/packages/provider_devtools_extension/web/icons/Icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..88cfd48dff1169879ba46840804b412fe02fefd6 GIT binary patch literal 8252 zcmd5=2T+s!lYZ%-(h(2@5fr2dC?F^$C=i-}R6$UX8af(!je;W5yC_|HmujSgN*6?W z3knF*TL1$|?oD*=zPbBVex*RUIKsL<(&Rj9%^UD2IK3W?2j>D?eWQgvS-HLymHo9%~|N2Q{~j za?*X-{b9JRowv_*Mh|;*-kPFn>PI;r<#kFaxFqbn?aq|PduQg=2Q;~Qc}#z)_T%x9 zE|0!a70`58wjREmAH38H1)#gof)U3g9FZ^ zF7&-0^Hy{4XHWLoC*hOG(dg~2g6&?-wqcpf{ z&3=o8vw7lMi22jCG9RQb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9j?ZCtvb^37U$sFpBrkT{7Jpd?HpIvj2!}RIq zH{9~+gErN2+}J`>Jvng2hwM`=PLNkc7pkjblKW|+Fk9rc)G1R>Ww>RC=r-|!m-u7( zc(a$9NG}w#PjWNMS~)o=i~WA&4L(YIW25@AL9+H9!?3Y}sv#MOdY{bb9j>p`{?O(P zIvb`n?_(gP2w3P#&91JX*md+bBEr%xUHMVqfB;(f?OPtMnAZ#rm5q5mh;a2f_si2_ z3oXWB?{NF(JtkAn6F(O{z@b76OIqMC$&oJ_&S|YbFJ*)3qVX_uNf5b8(!vGX19hsG z(OP>RmZp29KH9Ge2kKjKigUmOe^K_!UXP`von)PR8Qz$%=EmOB9xS(ZxE_tnyzo}7 z=6~$~9k0M~v}`w={AeqF?_)9q{m8K#6M{a&(;u;O41j)I$^T?lx5(zlebpY@NT&#N zR+1bB)-1-xj}R8uwqwf=iP1GbxBjneCC%UrSdSxK1vM^i9;bUkS#iRZw2H>rS<2<$ zNT3|sDH>{tXb=zq7XZi*K?#Zsa1h1{h5!Tq_YbKFm_*=A5-<~j63he;4`77!|LBlo zR^~tR3yxcU=gDFbshyF6>o0bdp$qmHS7D}m3;^QZq9kBBU|9$N-~oU?G5;jyFR7>z hN`IR97YZXIo@y!QgFWddJ3|0`sjFx!m))><{BI=FK%f8s literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/web/icons/Icon-maskable-192.png b/packages/provider_devtools_extension/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 zcmdT|`#%%j|KDb2V@0DPm$^(Lx5}lO%Yv(=e*7hl@QqKS50#~#^IQPxBmuh|i9sXnt4ch@VT0F7% zMtrs@KWIOo+QV@lSs66A>2pz6-`9Jk=0vv&u?)^F@HZ)-6HT=B7LF;rdj zskUyBfbojcX#CS>WrIWo9D=DIwcXM8=I5D{SGf$~=gh-$LwY?*)cD%38%sCc?5OsX z-XfkyL-1`VavZ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^k?XMQ7u64;KmFJ#POzdG#np~F&H ze-BUh@g54)dsS%nkBb}+GuUEKU~pHcYIg4vSo$J(J|U36bs0Use+3A&IMcR%6@jv$ z=+QI+@wW@?iu}Hpyzlvj-EYeop{f65GX0O%>w#0t|V z1-svWk`hU~m`|O$kw5?Yn5UhI%9P-<45A(v0ld1n+%Ziq&TVpBcV9n}L9Tus-TI)f zd_(g+nYCDR@+wYNQm1GwxhUN4tGMLCzDzPqY$~`l<47{+l<{FZ$L6(>J)|}!bi<)| zE35dl{a2)&leQ@LlDxLQOfUDS`;+ZQ4ozrleQwaR-K|@9T{#hB5Z^t#8 zC-d_G;B4;F#8A2EBL58s$zF-=SCr`P#z zNCTnHF&|X@q>SkAoYu>&s9v@zCpv9lLSH-UZzfhJh`EZA{X#%nqw@@aW^vPcfQrlPs(qQxmC|4tp^&sHy!H!2FH5eC{M@g;ElWNzlb-+ zxpfc0m4<}L){4|RZ>KReag2j%Ot_UKkgpJN!7Y_y3;Ssz{9 z!K3isRtaFtQII5^6}cm9RZd5nTp9psk&u1C(BY`(_tolBwzV_@0F*m%3G%Y?2utyS zY`xM0iDRT)yTyYukFeGQ&W@ReM+ADG1xu@ruq&^GK35`+2r}b^V!m1(VgH|QhIPDE X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/web/icons/Icon-maskable-512.png b/packages/provider_devtools_extension/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2tlbLMU<{!p(#yjqEe+=0IA_oih%ScH9@5#MNp&}Y#;;(h=A0@ zh7{>lT2MkSQ344eAvrhici!td|HJuyvJm#Y_w1Q9Yu3!26dNlO-oxUDK_C#XnW^Co z5C{VN6#{~B0)K2j7}*1Xq(Nqemv23A-6&=ZpEijkVnSwVGqLv40?n0=p;k3-U5e5+ z+z3>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|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/packages/provider_devtools_extension/web/index.html b/packages/provider_devtools_extension/web/index.html new file mode 100644 index 00000000..402143db --- /dev/null +++ b/packages/provider_devtools_extension/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + provider_devtools_extension + + + + + + + + + + diff --git a/packages/provider_devtools_extension/web/manifest.json b/packages/provider_devtools_extension/web/manifest.json new file mode 100644 index 00000000..57825ce7 --- /dev/null +++ b/packages/provider_devtools_extension/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "provider_devtools_extension", + "short_name": "provider_devtools_extension", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": ""A new Flutter project."", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}