From b9d8dbd22041c55660e1cfdfff492082643c291c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 31 May 2025 15:27:09 -0700 Subject: [PATCH 1/4] WIP: update to Dart 3.8 --- .github/workflows/dart.yml | 64 +- _test_yaml/pubspec.yaml | 2 +- _test_yaml/test/src/build_config.dart | 23 +- _test_yaml/test/src/build_config.g.dart | 214 +- _test_yaml/test/yaml_test.dart | 8 +- analysis_options.yaml | 2 +- checked_yaml/example/example.dart | 6 +- checked_yaml/example/example.g.dart | 34 +- checked_yaml/lib/checked_yaml.dart | 25 +- checked_yaml/pubspec.yaml | 2 +- checked_yaml/test/custom_error_test.dart | 19 +- checked_yaml/test/example_test.dart | 80 +- checked_yaml/test/readme_test.dart | 27 +- example/lib/example.dart | 7 +- example/lib/example.g.dart | 82 +- .../lib/generic_response_class_example.dart | 21 +- .../lib/generic_response_class_example.g.dart | 30 +- example/lib/json_converter_example.g.dart | 43 +- example/lib/nested_values_example.dart | 14 +- example/lib/nested_values_example.g.dart | 5 +- example/lib/tuple_example.dart | 6 +- example/lib/tuple_example.g.dart | 29 +- example/pubspec.yaml | 2 +- example/test/example_test.dart | 5 +- example/test/generic_response_class_test.dart | 8 +- example/test/json_convert_example_test.dart | 64 +- .../lib/src/allowed_keys_helpers.dart | 20 +- json_annotation/lib/src/checked_helpers.dart | 34 +- .../lib/src/json_serializable.dart | 28 +- .../lib/src/json_serializable.g.dart | 134 +- json_annotation/pubspec.yaml | 2 +- json_serializable/README.md | 25 +- json_serializable/example/example.g.dart | 20 +- json_serializable/lib/builder.dart | 2 +- .../lib/src/check_dependencies.dart | 16 +- json_serializable/lib/src/decode_helper.dart | 101 +- json_serializable/lib/src/encoder_helper.dart | 44 +- json_serializable/lib/src/enum_utils.dart | 18 +- json_serializable/lib/src/field_helpers.dart | 43 +- .../lib/src/generator_helper.dart | 48 +- json_serializable/lib/src/helper_core.dart | 33 +- .../lib/src/json_enum_generator.dart | 10 +- json_serializable/lib/src/json_key_utils.dart | 65 +- .../lib/src/json_literal_generator.dart | 9 +- .../lib/src/json_part_builder.dart | 32 +- .../lib/src/json_serializable_generator.dart | 21 +- json_serializable/lib/src/lambda_result.dart | 4 +- json_serializable/lib/src/settings.dart | 29 +- .../lib/src/shared_checkers.dart | 2 +- .../lib/src/type_helper_ctx.dart | 61 +- .../lib/src/type_helpers/big_int_helper.dart | 19 +- .../lib/src/type_helpers/config_types.dart | 41 +- .../lib/src/type_helpers/convert_helper.dart | 6 +- .../src/type_helpers/date_time_helper.dart | 24 +- .../type_helpers/generic_factory_helper.dart | 6 +- .../type_helpers/json_converter_helper.dart | 27 +- .../lib/src/type_helpers/json_helper.dart | 26 +- .../lib/src/type_helpers/map_helper.dart | 29 +- .../lib/src/type_helpers/record_helper.dart | 25 +- .../lib/src/type_helpers/to_from_string.dart | 25 +- .../lib/src/type_helpers/uri_helper.dart | 16 +- .../lib/src/type_helpers/value_helper.dart | 8 +- json_serializable/lib/src/utils.dart | 80 +- json_serializable/pubspec.yaml | 2 +- .../test/annotation_version_test.dart | 75 +- json_serializable/test/config_test.dart | 49 +- .../test/custom_configuration_test.dart | 116 +- .../test/default_value/default_value.dart | 8 +- .../test/default_value/default_value.g.dart | 117 +- .../default_value.g_any_map__checked.dart | 13 +- .../default_value.g_any_map__checked.g.dart | 180 +- .../default_value_interface.dart | 9 +- .../default_value/default_value_test.dart | 4 +- .../default_value/implicit_default_value.dart | 2 +- .../implicit_default_value.g.dart | 175 +- json_serializable/test/enum_helper_test.dart | 2 +- json_serializable/test/field_matrix_test.dart | 54 +- .../test/field_matrix_test.field_matrix.dart | 36 +- .../field_matrix_test.field_matrix.g.dart | 333 +- .../generic_argument_factories.dart | 12 +- .../generic_argument_factories.g.dart | 48 +- .../generic_argument_factories_nullable.dart | 12 +- ...generic_argument_factories_nullable.g.dart | 106 +- .../test/generic_files/generic_class.dart | 30 +- .../test/generic_files/generic_class.g.dart | 169 +- .../test/generic_files/generic_test.dart | 73 +- .../test/integration/converter_examples.dart | 4 +- .../integration/converter_examples.g.dart | 86 +- .../create_per_field_to_json_example.dart | 18 +- .../create_per_field_to_json_example.g.dart | 102 +- .../test/integration/field_map_example.dart | 6 +- .../test/integration/field_map_example.g.dart | 20 +- .../test/integration/integration_test.dart | 197 +- .../test/integration/json_enum_example.dart | 38 +- .../test/integration/json_enum_example.g.dart | 45 +- .../test/integration/json_keys_example.dart | 6 +- .../test/integration/json_keys_example.g.dart | 12 +- .../test/integration/json_test_common.dart | 10 +- .../test/integration/json_test_example.dart | 14 +- .../test/integration/json_test_example.g.dart | 205 +- .../json_test_example.g_any_map.dart | 34 +- .../json_test_example.g_any_map.g.dart | 220 +- .../test/kitchen_sink/kitchen_sink.dart | 78 +- .../test/kitchen_sink/kitchen_sink.g.dart | 426 +- .../kitchen_sink/kitchen_sink.g_any_map.dart | 87 +- .../kitchen_sink.g_any_map.g.dart | 406 +- .../kitchen_sink.g_any_map__checked.dart | 90 +- .../kitchen_sink.g_any_map__checked.g.dart | 714 +- .../kitchen_sink.g_exclude_null.dart | 87 +- .../kitchen_sink.g_exclude_null.g.dart | 455 +- .../kitchen_sink.g_explicit_to_json.dart | 87 +- .../kitchen_sink.g_explicit_to_json.g.dart | 432 +- .../kitchen_sink/kitchen_sink_interface.dart | 6 +- .../test/kitchen_sink/kitchen_sink_test.dart | 73 +- .../kitchen_sink_test_shared.dart | 13 +- .../kitchen_sink/kitchen_sink_yaml_test.dart | 37 +- .../test/kitchen_sink/simple_object.g.dart | 9 +- .../test/literal/json_literal.g.dart | 14 +- .../test/literal/json_literal_test.dart | 7 +- json_serializable/test/shared_config.dart | 35 +- .../src/_json_serializable_test_input.dart | 184 +- .../test/src/checked_test_input.dart | 36 +- .../test/src/constants_copy.dart | 2 +- .../test/src/core_subclass_type_input.dart | 44 +- .../test/src/default_value_input.dart | 74 +- .../test/src/field_namer_input.dart | 12 +- .../test/src/generic_test_input.dart | 42 +- .../test/src/inheritance_test_input.dart | 64 +- .../test/src/json_converter_test_input.dart | 101 +- .../test/src/map_key_variety_test_input.dart | 14 +- .../test/src/setter_test_input.dart | 6 +- .../test/src/to_from_json_test_input.dart | 129 +- .../src/unknown_enum_value_test_input.dart | 21 +- .../test/supported_types/extra_map_test.dart | 4 +- .../test/supported_types/input.dart | 5 +- .../test/supported_types/input.g.dart | 6 +- .../supported_types/input.type_bigint.dart | 10 +- .../supported_types/input.type_bigint.g.dart | 20 +- .../test/supported_types/input.type_bool.dart | 10 +- .../supported_types/input.type_bool.g.dart | 16 +- .../supported_types/input.type_datetime.dart | 10 +- .../input.type_datetime.g.dart | 20 +- .../supported_types/input.type_double.dart | 10 +- .../supported_types/input.type_double.g.dart | 16 +- .../supported_types/input.type_duration.dart | 8 +- .../input.type_duration.g.dart | 15 +- .../supported_types/input.type_enumtype.dart | 10 +- .../input.type_enumtype.g.dart | 17 +- .../test/supported_types/input.type_int.dart | 10 +- .../supported_types/input.type_int.g.dart | 16 +- .../supported_types/input.type_iterable.dart | 294 +- .../input.type_iterable.g.dart | 850 +- .../test/supported_types/input.type_list.dart | 294 +- .../supported_types/input.type_list.g.dart | 905 +- .../test/supported_types/input.type_map.dart | 2991 ++--- .../supported_types/input.type_map.g.dart | 9672 ++++++++--------- .../test/supported_types/input.type_num.dart | 10 +- .../supported_types/input.type_num.g.dart | 16 +- .../supported_types/input.type_object.dart | 10 +- .../supported_types/input.type_object.g.dart | 21 +- .../supported_types/input.type_record.dart | 300 +- .../supported_types/input.type_record.g.dart | 1796 ++- .../test/supported_types/input.type_set.dart | 294 +- .../supported_types/input.type_set.g.dart | 900 +- .../supported_types/input.type_string.dart | 10 +- .../supported_types/input.type_string.g.dart | 16 +- .../test/supported_types/input.type_uri.dart | 10 +- .../supported_types/input.type_uri.g.dart | 20 +- .../support_types_extra_test.dart | 24 +- .../type_test.bigint_test.dart | 24 +- .../supported_types/type_test.bool_test.dart | 24 +- .../test/supported_types/type_test.dart | 25 +- .../type_test.datetime_test.dart | 24 +- .../type_test.double_test.dart | 24 +- .../type_test.duration_test.dart | 21 +- .../type_test.enumtype_test.dart | 24 +- .../supported_types/type_test.int_test.dart | 24 +- .../type_test.iterable_test.dart | 24 +- .../supported_types/type_test.list_test.dart | 24 +- .../supported_types/type_test.map_test.dart | 24 +- .../supported_types/type_test.num_test.dart | 24 +- .../type_test.object_test.dart | 24 +- .../supported_types/type_test.set_test.dart | 24 +- .../type_test.string_test.dart | 24 +- .../supported_types/type_test.uri_test.dart | 24 +- .../tool/field_matrix_builder.dart | 12 +- .../tool/readme/readme_examples.dart | 5 +- .../tool/readme/readme_examples.g.dart | 26 +- json_serializable/tool/readme_builder.dart | 77 +- json_serializable/tool/shared.dart | 17 +- json_serializable/tool/test_builder.dart | 52 +- json_serializable/tool/test_type_builder.dart | 56 +- json_serializable/tool/test_type_data.dart | 98 +- pubspec.yaml | 2 +- shared_test/pubspec.yaml | 2 +- tool/ci.sh | 2 +- 196 files changed, 12880 insertions(+), 14869 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 4af5af68b..db6794a07 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.2 +# Created with package:mono_repo v6.6.3 name: Dart CI on: push: @@ -36,27 +36,27 @@ jobs: name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.2 + run: dart pub global activate mono_repo 6.6.3 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; Dart 3.6.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dart analyze`" + name: "analyzer_and_format; Dart 3.8.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -192,23 +192,23 @@ jobs: if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" working-directory: json_serializable job_004: - name: "unit_test; Dart 3.6.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `dart test`" + name: "unit_test; Dart 3.8.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example-json_serializable - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example-json_serializable + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -253,23 +253,23 @@ jobs: - job_002 - job_003 job_005: - name: "unit_test; Dart 3.6.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/annotation_version_test.dart`" + name: "unit_test; Dart 3.8.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/annotation_version_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable;commands:test_3" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable;commands:test_3" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -287,23 +287,23 @@ jobs: - job_002 - job_003 job_006: - name: "unit_test; Dart 3.6.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + name: "unit_test; Dart 3.8.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -321,23 +321,23 @@ jobs: - job_002 - job_003 job_007: - name: "unit_test; Dart 3.6.0; PKG: json_serializable; `dart test -p chrome`" + name: "unit_test; Dart 3.8.0; PKG: json_serializable; `dart test -p chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:json_serializable - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:json_serializable + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -518,23 +518,23 @@ jobs: - job_002 - job_003 job_012: - name: "ensure_build; Dart 3.6.0; PKGS: _test_yaml, checked_yaml, example; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + name: "ensure_build; Dart 3.8.0; PKGS: _test_yaml, checked_yaml, example; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:_test_yaml-checked_yaml-example - os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:_test_yaml-checked_yaml-example + os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c with: - sdk: "3.6.0" + sdk: "3.8.0" - id: checkout name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 diff --git a/_test_yaml/pubspec.yaml b/_test_yaml/pubspec.yaml index 5fa5ac1ac..a2496e7ce 100644 --- a/_test_yaml/pubspec.yaml +++ b/_test_yaml/pubspec.yaml @@ -2,7 +2,7 @@ name: _test_yaml publish_to: none environment: - sdk: ^3.6.0 + sdk: ^3.8.0 resolution: workspace diff --git a/_test_yaml/test/src/build_config.dart b/_test_yaml/test/src/build_config.dart index a31c1c5b6..958329f8d 100644 --- a/_test_yaml/test/src/build_config.dart +++ b/_test_yaml/test/src/build_config.dart @@ -22,10 +22,11 @@ class Config { } @JsonSerializable( - includeIfNull: false, - disallowUnrecognizedKeys: true, - checked: true, - anyMap: true) + includeIfNull: false, + disallowUnrecognizedKeys: true, + checked: true, + anyMap: true, +) class Builder { final String? target; @@ -71,8 +72,11 @@ class Builder { this.configLocation, }) { if (builderFactories.isEmpty) { - throw ArgumentError.value(builderFactories, 'builderFactories', - 'Must have at least one value.'); + throw ArgumentError.value( + builderFactories, + 'builderFactories', + 'Must have at least one value.', + ); } } @@ -82,11 +86,6 @@ class Builder { } @JsonEnum(fieldRename: FieldRename.snake) -enum AutoApply { - none, - dependents, - allPackages, - rootPackage, -} +enum AutoApply { none, dependents, allPackages, rootPackage } enum BuildTo { cache, source } diff --git a/_test_yaml/test/src/build_config.g.dart b/_test_yaml/test/src/build_config.g.dart index e4d832e78..e453d996c 100644 --- a/_test_yaml/test/src/build_config.g.dart +++ b/_test_yaml/test/src/build_config.g.dart @@ -6,36 +6,34 @@ part of 'build_config.dart'; // JsonSerializableGenerator // ************************************************************************** -Config _$ConfigFromJson(Map json) => $checkedCreate( - 'Config', - json, - ($checkedConvert) { - $checkKeys( - json, - requiredKeys: const ['builders'], - ); - final val = Config( - builders: $checkedConvert( - 'builders', - (v) => (v as Map).map( - (k, e) => MapEntry(k as String, Builder.fromJson(e as Map)), - )), - ); - $checkedConvert( - 'weights', - (v) => val.weights = (v as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$AutoApplyEnumMap, k), (e as num?)?.toInt()), - )); - return val; - }, - ); +Config _$ConfigFromJson(Map json) => $checkedCreate('Config', json, ( + $checkedConvert, +) { + $checkKeys(json, requiredKeys: const ['builders']); + final val = Config( + builders: $checkedConvert( + 'builders', + (v) => (v as Map).map( + (k, e) => MapEntry(k as String, Builder.fromJson(e as Map)), + ), + ), + ); + $checkedConvert( + 'weights', + (v) => val.weights = (v as Map?)?.map( + (k, e) => + MapEntry($enumDecode(_$AutoApplyEnumMap, k), (e as num?)?.toInt()), + ), + ); + return val; +}); Map _$ConfigToJson(Config instance) => { - 'builders': instance.builders, - 'weights': - instance.weights?.map((k, e) => MapEntry(_$AutoApplyEnumMap[k]!, e)), - }; + 'builders': instance.builders, + 'weights': instance.weights?.map( + (k, e) => MapEntry(_$AutoApplyEnumMap[k]!, e), + ), +}; const _$AutoApplyEnumMap = { AutoApply.none: 'none', @@ -45,83 +43,93 @@ const _$AutoApplyEnumMap = { }; Builder _$BuilderFromJson(Map json) => $checkedCreate( - 'Builder', + 'Builder', + json, + ($checkedConvert) { + $checkKeys( json, - ($checkedConvert) { - $checkKeys( - json, - allowedKeys: const [ - 'target', - 'import', - 'is_optional', - 'configLocation', - 'auto_apply', - 'build_to', - 'defaultEnumTest', - 'builder_factories', - 'applies_builders', - 'required_inputs', - 'build_extensions' - ], - disallowNullValues: const ['configLocation', 'auto_apply'], - ); - final val = Builder( - import: $checkedConvert('import', (v) => v as String?), - target: $checkedConvert('target', (v) => v as String?), - isOptional: $checkedConvert('is_optional', (v) => v as bool?), - autoApply: $checkedConvert( - 'auto_apply', (v) => $enumDecodeNullable(_$AutoApplyEnumMap, v)), - buildTo: $checkedConvert( - 'build_to', (v) => $enumDecodeNullable(_$BuildToEnumMap, v)), - defaultEnumTest: $checkedConvert('defaultEnumTest', - (v) => $enumDecodeNullable(_$AutoApplyEnumMap, v)), - builderFactories: $checkedConvert('builder_factories', - (v) => (v as List).map((e) => e as String).toList()), - appliesBuilders: $checkedConvert('applies_builders', - (v) => (v as List?)?.map((e) => e as String).toList()), - requiredInputs: $checkedConvert('required_inputs', - (v) => (v as List?)?.map((e) => e as String).toList()), - buildExtensions: $checkedConvert( - 'build_extensions', - (v) => (v as Map?)?.map( - (k, e) => MapEntry(k as String, - (e as List).map((e) => e as String).toList()), - )), - configLocation: $checkedConvert('configLocation', - (v) => v == null ? null : Uri.parse(v as String)), - ); - return val; - }, - fieldKeyMap: const { - 'isOptional': 'is_optional', - 'autoApply': 'auto_apply', - 'buildTo': 'build_to', - 'builderFactories': 'builder_factories', - 'appliesBuilders': 'applies_builders', - 'requiredInputs': 'required_inputs', - 'buildExtensions': 'build_extensions' - }, + allowedKeys: const [ + 'target', + 'import', + 'is_optional', + 'configLocation', + 'auto_apply', + 'build_to', + 'defaultEnumTest', + 'builder_factories', + 'applies_builders', + 'required_inputs', + 'build_extensions', + ], + disallowNullValues: const ['configLocation', 'auto_apply'], ); + final val = Builder( + import: $checkedConvert('import', (v) => v as String?), + target: $checkedConvert('target', (v) => v as String?), + isOptional: $checkedConvert('is_optional', (v) => v as bool?), + autoApply: $checkedConvert( + 'auto_apply', + (v) => $enumDecodeNullable(_$AutoApplyEnumMap, v), + ), + buildTo: $checkedConvert( + 'build_to', + (v) => $enumDecodeNullable(_$BuildToEnumMap, v), + ), + defaultEnumTest: $checkedConvert( + 'defaultEnumTest', + (v) => $enumDecodeNullable(_$AutoApplyEnumMap, v), + ), + builderFactories: $checkedConvert( + 'builder_factories', + (v) => (v as List).map((e) => e as String).toList(), + ), + appliesBuilders: $checkedConvert( + 'applies_builders', + (v) => (v as List?)?.map((e) => e as String).toList(), + ), + requiredInputs: $checkedConvert( + 'required_inputs', + (v) => (v as List?)?.map((e) => e as String).toList(), + ), + buildExtensions: $checkedConvert( + 'build_extensions', + (v) => (v as Map?)?.map( + (k, e) => MapEntry( + k as String, + (e as List).map((e) => e as String).toList(), + ), + ), + ), + configLocation: $checkedConvert( + 'configLocation', + (v) => v == null ? null : Uri.parse(v as String), + ), + ); + return val; + }, + fieldKeyMap: const { + 'isOptional': 'is_optional', + 'autoApply': 'auto_apply', + 'buildTo': 'build_to', + 'builderFactories': 'builder_factories', + 'appliesBuilders': 'applies_builders', + 'requiredInputs': 'required_inputs', + 'buildExtensions': 'build_extensions', + }, +); Map _$BuilderToJson(Builder instance) => { - if (instance.target case final value?) 'target': value, - if (instance.import case final value?) 'import': value, - if (instance.isOptional case final value?) 'is_optional': value, - if (instance.configLocation?.toString() case final value?) - 'configLocation': value, - if (_$AutoApplyEnumMap[instance.autoApply] case final value?) - 'auto_apply': value, - if (_$BuildToEnumMap[instance.buildTo] case final value?) - 'build_to': value, - if (_$AutoApplyEnumMap[instance.defaultEnumTest] case final value?) - 'defaultEnumTest': value, - 'builder_factories': instance.builderFactories, - if (instance.appliesBuilders case final value?) 'applies_builders': value, - if (instance.requiredInputs case final value?) 'required_inputs': value, - if (instance.buildExtensions case final value?) 'build_extensions': value, - }; - -const _$BuildToEnumMap = { - BuildTo.cache: 'cache', - BuildTo.source: 'source', + 'target': ?instance.target, + 'import': ?instance.import, + 'is_optional': ?instance.isOptional, + 'configLocation': ?instance.configLocation?.toString(), + 'auto_apply': ?_$AutoApplyEnumMap[instance.autoApply], + 'build_to': ?_$BuildToEnumMap[instance.buildTo], + 'defaultEnumTest': ?_$AutoApplyEnumMap[instance.defaultEnumTest], + 'builder_factories': instance.builderFactories, + 'applies_builders': ?instance.appliesBuilders, + 'required_inputs': ?instance.requiredInputs, + 'build_extensions': ?instance.buildExtensions, }; + +const _$BuildToEnumMap = {BuildTo.cache: 'cache', BuildTo.source: 'source'}; diff --git a/_test_yaml/test/yaml_test.dart b/_test_yaml/test/yaml_test.dart index 29856bf8c..06a49a665 100644 --- a/_test_yaml/test/yaml_test.dart +++ b/_test_yaml/test/yaml_test.dart @@ -27,10 +27,8 @@ void main() { for (final filePath in _tests) { test(p.basenameWithoutExtension(filePath), () { final content = File(filePath).readAsStringSync(); - final yamlContent = loadYaml( - content, - sourceUrl: Uri.file(filePath), - ) as YamlMap; + final yamlContent = + loadYaml(content, sourceUrl: Uri.file(filePath)) as YamlMap; try { final config = Config.fromJson(yamlContent); @@ -157,5 +155,5 @@ line 4, column 21 of file.yaml: Unsupported value for "configLocation". Illegal ╷ 4 │ configLocation: "user@host:invalid/uri" │ ^^^^^^^^^^^^^^^^^^^^^^^ - ╵''' + ╵''', }; diff --git a/analysis_options.yaml b/analysis_options.yaml index 629e6274d..f87c95a72 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -27,6 +27,6 @@ linter: - prefer_final_locals - sort_child_properties_last - unnecessary_breaks + - unnecessary_ignore - use_full_hex_values_for_flutter_colors - use_string_buffers - - unnecessary_ignore diff --git a/checked_yaml/example/example.dart b/checked_yaml/example/example.dart index f89308843..416ca3a8b 100644 --- a/checked_yaml/example/example.dart +++ b/checked_yaml/example/example.dart @@ -9,11 +9,7 @@ import 'package:json_annotation/json_annotation.dart'; part 'example.g.dart'; -@JsonSerializable( - anyMap: true, - checked: true, - disallowUnrecognizedKeys: true, -) +@JsonSerializable(anyMap: true, checked: true, disallowUnrecognizedKeys: true) class Configuration { @JsonKey(required: true) final String name; diff --git a/checked_yaml/example/example.g.dart b/checked_yaml/example/example.g.dart index 96f10dae8..b5547e94f 100644 --- a/checked_yaml/example/example.g.dart +++ b/checked_yaml/example/example.g.dart @@ -6,25 +6,19 @@ part of 'example.dart'; // JsonSerializableGenerator // ************************************************************************** -Configuration _$ConfigurationFromJson(Map json) => $checkedCreate( - 'Configuration', - json, - ($checkedConvert) { - $checkKeys( - json, - allowedKeys: const ['name', 'count'], - requiredKeys: const ['name'], - ); - final val = Configuration( - name: $checkedConvert('name', (v) => v as String), - count: $checkedConvert('count', (v) => (v as num).toInt()), - ); - return val; - }, - ); +Configuration _$ConfigurationFromJson(Map json) => + $checkedCreate('Configuration', json, ($checkedConvert) { + $checkKeys( + json, + allowedKeys: const ['name', 'count'], + requiredKeys: const ['name'], + ); + final val = Configuration( + name: $checkedConvert('name', (v) => v as String), + count: $checkedConvert('count', (v) => (v as num).toInt()), + ); + return val; + }); Map _$ConfigurationToJson(Configuration instance) => - { - 'name': instance.name, - 'count': instance.count, - }; + {'name': instance.name, 'count': instance.count}; diff --git a/checked_yaml/lib/checked_yaml.dart b/checked_yaml/lib/checked_yaml.dart index c9a75ee56..17c5ce0c1 100644 --- a/checked_yaml/lib/checked_yaml.dart +++ b/checked_yaml/lib/checked_yaml.dart @@ -66,14 +66,13 @@ ParsedYamlException toParsedYamlException( ? innerError.unrecognizedKeys.first : exception.key; - final node = yamlMap.nodes.keys.singleWhere( - (k) => (k as YamlScalar).value == key, - orElse: () => yamlMap) as YamlNode; - return ParsedYamlException( - exception.message!, - node, - innerError: exception, - ); + final node = + yamlMap.nodes.keys.singleWhere( + (k) => (k as YamlScalar).value == key, + orElse: () => yamlMap, + ) + as YamlNode; + return ParsedYamlException(exception.message!, node, innerError: exception); } else { if (exception.key == null) { return ParsedYamlException( @@ -119,13 +118,9 @@ class ParsedYamlException implements Exception { /// contains the source error object. final Object? innerError; - ParsedYamlException( - String message, - YamlNode this.yamlNode, { - this.innerError, - }) : - // TODO(kevmoo) remove when dart-lang/sdk#50756 is fixed! - message = message.replaceAll(" of ' in type cast'", ' in type cast'); + ParsedYamlException(String message, YamlNode this.yamlNode, {this.innerError}) + : // TODO(kevmoo) remove when dart-lang/sdk#50756 is fixed! + message = message.replaceAll(" of ' in type cast'", ' in type cast'); factory ParsedYamlException.fromYamlException(YamlException exception) => _WrappedYamlException(exception); diff --git a/checked_yaml/pubspec.yaml b/checked_yaml/pubspec.yaml index 7e7fbc9d4..ada787451 100644 --- a/checked_yaml/pubspec.yaml +++ b/checked_yaml/pubspec.yaml @@ -13,7 +13,7 @@ topics: - codegen environment: - sdk: ^3.6.0 + sdk: ^3.8.0 resolution: workspace diff --git a/checked_yaml/test/custom_error_test.dart b/checked_yaml/test/custom_error_test.dart index 6ce0e42e1..6c17bda9d 100644 --- a/checked_yaml/test/custom_error_test.dart +++ b/checked_yaml/test/custom_error_test.dart @@ -6,17 +6,14 @@ import 'package:yaml/yaml.dart'; void main() { test('bob', () { expect( - () => checkedYamlDecode( - '{"innerMap": {}}', - (m) { - throw CheckedFromJsonException( - m!['innerMap'] as YamlMap, - null, - 'nothing', - null, - ); - }, - ), + () => checkedYamlDecode('{"innerMap": {}}', (m) { + throw CheckedFromJsonException( + m!['innerMap'] as YamlMap, + null, + 'nothing', + null, + ); + }), throwsA( isA() .having( diff --git a/checked_yaml/test/example_test.dart b/checked_yaml/test/example_test.dart index 7761c36f5..fe56b19ad 100644 --- a/checked_yaml/test/example_test.dart +++ b/checked_yaml/test/example_test.dart @@ -18,114 +18,90 @@ Configuration: {name: bob, count: 42} }); test('empty map', () { - _expectThrows( - '{}', - r''' + _expectThrows('{}', r''' line 1, column 1: Required keys are missing: name. ╷ 1 │ {} │ ^^ - ╵''', - ); + ╵'''); }); test('missing count', () { - _expectThrows( - '{"name":"something"}', - r''' + _expectThrows('{"name":"something"}', r''' line 1, column 1: Missing key "count". type 'Null' is not a subtype of type 'num' in type cast ╷ 1 │ {"name":"something"} │ ^^^^^^^^^^^^^^^^^^^^ - ╵''', - ); + ╵'''); }); test('not a map', () { - _expectThrows( - '42', - r''' + _expectThrows('42', r''' line 1, column 1: Not a map ╷ 1 │ 42 │ ^^ - ╵''', - ); + ╵'''); }); test('invalid yaml', () { - _expectThrows( - '{', - r''' + _expectThrows('{', r''' line 1, column 2: Expected node content. ╷ 1 │ { │ ^ - ╵''', - ); + ╵'''); }); test('duplicate keys', () { - _expectThrows( - '{"a":null, "a":null}', - r''' + _expectThrows('{"a":null, "a":null}', r''' line 1, column 12: Duplicate mapping key. ╷ 1 │ {"a":null, "a":null} │ ^^^ - ╵''', - ); + ╵'''); }); test('unexpected key', () { - _expectThrows( - '{"bob": 42}', - r''' + _expectThrows('{"bob": 42}', r''' line 1, column 2: Unrecognized keys: [bob]; supported keys: [name, count] ╷ 1 │ {"bob": 42} │ ^^^^^ - ╵''', - ); + ╵'''); }); test('bad name type', () { - _expectThrows( - '{"name": 42, "count": 42}', - r''' + _expectThrows('{"name": 42, "count": 42}', r''' line 1, column 10: Unsupported value for "name". type 'int' is not a subtype of type 'String' in type cast ╷ 1 │ {"name": 42, "count": 42} │ ^^ - ╵''', - ); + ╵'''); }); test('bad name contents', () { - _expectThrows( - '{"name": "", "count": 42}', - r''' + _expectThrows('{"name": "", "count": 42}', r''' line 1, column 10: Unsupported value for "name". Cannot be empty. ╷ 1 │ {"name": "", "count": 42} │ ^^ - ╵''', - ); + ╵'''); }); } void _expectThrows(String yamlContent, String matcher) => expect( - () => _run(yamlContent), - throwsA( - isA().having( - (e) { - printOnFailure("r'''\n${e.formattedMessage}'''"); - return e.formattedMessage; - }, - 'formattedMessage', - matcher, - ), - ), - ); + () => _run(yamlContent), + throwsA( + isA().having( + (e) { + printOnFailure("r'''\n${e.formattedMessage}'''"); + return e.formattedMessage; + }, + 'formattedMessage', + matcher, + ), + ), +); void _run(String yamlContent) => example.main([yamlContent]); diff --git a/checked_yaml/test/readme_test.dart b/checked_yaml/test/readme_test.dart index 21f530d06..813ed6f43 100644 --- a/checked_yaml/test/readme_test.dart +++ b/checked_yaml/test/readme_test.dart @@ -23,14 +23,18 @@ void _member(String startToken) { final classEnd = _exampleContent.indexOf(_memberEnd, start); expect(classEnd, greaterThan(start)); - final content = - _exampleContent.substring(start, classEnd + _memberEnd.length).trim(); + final content = _exampleContent + .substring(start, classEnd + _memberEnd.length) + .trim(); - expect(_readmeContent, contains(''' + expect( + _readmeContent, + contains(''' ```dart $content ``` -''')); +'''), + ); } void main() { @@ -52,16 +56,19 @@ ParsedYamlException: line 1, column 10: Unsupported value for "name". Cannot be │ ^^ ╵'''; - expect(_readmeContent, contains(''' + expect( + _readmeContent, + contains(''' ```console \$ dart example/example.dart '$inputContent' $errorContent -```''')); - - final proc = await TestProcess.start( - Platform.resolvedExecutable, - [_examplePath, inputContent], +```'''), ); + + final proc = await TestProcess.start(Platform.resolvedExecutable, [ + _examplePath, + inputContent, + ]); await expectLater( proc.stderr, emitsInOrder(LineSplitter.split(errorContent)), diff --git a/example/lib/example.dart b/example/lib/example.dart index c928b5508..8fc8f5bc5 100644 --- a/example/lib/example.dart +++ b/example/lib/example.dart @@ -43,9 +43,10 @@ class Order { Item? item; @JsonKey( - name: 'prep-time', - fromJson: _durationFromMilliseconds, - toJson: _durationToMilliseconds) + name: 'prep-time', + fromJson: _durationFromMilliseconds, + toJson: _durationToMilliseconds, + ) Duration? prepTime; @JsonKey(fromJson: _dateTimeFromEpochUs, toJson: _dateTimeToEpochUs) diff --git a/example/lib/example.g.dart b/example/lib/example.g.dart index f497bc0e7..6c1d3cb06 100644 --- a/example/lib/example.g.dart +++ b/example/lib/example.g.dart @@ -7,49 +7,47 @@ part of 'example.dart'; // ************************************************************************** Person _$PersonFromJson(Map json) => Person( - json['firstName'] as String, - json['lastName'] as String, - DateTime.parse(json['date-of-birth'] as String), - middleName: json['middleName'] as String?, - lastOrder: json['last-order'] == null - ? null - : DateTime.parse(json['last-order'] as String), - orders: (json['orders'] as List?) - ?.map((e) => Order.fromJson(e as Map)) - .toList(), - ); + json['firstName'] as String, + json['lastName'] as String, + DateTime.parse(json['date-of-birth'] as String), + middleName: json['middleName'] as String?, + lastOrder: json['last-order'] == null + ? null + : DateTime.parse(json['last-order'] as String), + orders: (json['orders'] as List?) + ?.map((e) => Order.fromJson(e as Map)) + .toList(), +); Map _$PersonToJson(Person instance) => { - 'firstName': instance.firstName, - if (instance.middleName case final value?) 'middleName': value, - 'lastName': instance.lastName, - 'date-of-birth': instance.dateOfBirth.toIso8601String(), - 'last-order': instance.lastOrder?.toIso8601String(), - 'orders': instance.orders, - }; + 'firstName': instance.firstName, + 'middleName': ?instance.middleName, + 'lastName': instance.lastName, + 'date-of-birth': instance.dateOfBirth.toIso8601String(), + 'last-order': instance.lastOrder?.toIso8601String(), + 'orders': instance.orders, +}; -Order _$OrderFromJson(Map json) => Order( - Order._dateTimeFromEpochUs((json['date'] as num).toInt()), - ) +Order _$OrderFromJson(Map json) => + Order(Order._dateTimeFromEpochUs((json['date'] as num).toInt())) ..count = (json['count'] as num?)?.toInt() ..itemNumber = (json['itemNumber'] as num?)?.toInt() ..isRushed = json['isRushed'] as bool? ..item = json['item'] == null ? null : Item.fromJson(json['item'] as Map) - ..prepTime = - Order._durationFromMilliseconds((json['prep-time'] as num?)?.toInt()); + ..prepTime = Order._durationFromMilliseconds( + (json['prep-time'] as num?)?.toInt(), + ); Map _$OrderToJson(Order instance) => { - if (instance.count case final value?) 'count': value, - if (instance.itemNumber case final value?) 'itemNumber': value, - if (instance.isRushed case final value?) 'isRushed': value, - if (instance.item case final value?) 'item': value, - if (Order._durationToMilliseconds(instance.prepTime) case final value?) - 'prep-time': value, - if (Order._dateTimeToEpochUs(instance.date) case final value?) - 'date': value, - }; + 'count': ?instance.count, + 'itemNumber': ?instance.itemNumber, + 'isRushed': ?instance.isRushed, + 'item': ?instance.item, + 'prep-time': ?Order._durationToMilliseconds(instance.prepTime), + 'date': ?Order._dateTimeToEpochUs(instance.date), +}; Item _$ItemFromJson(Map json) => Item() ..count = (json['count'] as num?)?.toInt() @@ -57,10 +55,10 @@ Item _$ItemFromJson(Map json) => Item() ..isRushed = json['isRushed'] as bool?; Map _$ItemToJson(Item instance) => { - 'count': instance.count, - 'itemNumber': instance.itemNumber, - 'isRushed': instance.isRushed, - }; + 'count': instance.count, + 'itemNumber': instance.itemNumber, + 'isRushed': instance.isRushed, +}; // ************************************************************************** // JsonLiteralGenerator @@ -80,11 +78,11 @@ final _$glossaryDataJsonLiteral = { 'Abbrev': 'ISO 8879:1986', 'GlossDef': { 'para': 'A meta-markup language, used to create markup languages.', - 'GlossSeeAlso': ['GML', 'XML'] + 'GlossSeeAlso': ['GML', 'XML'], }, - 'GlossSee': 'markup' - } - } - } - } + 'GlossSee': 'markup', + }, + }, + }, + }, }; diff --git a/example/lib/generic_response_class_example.dart b/example/lib/generic_response_class_example.dart index 5565aed8d..928957695 100644 --- a/example/lib/generic_response_class_example.dart +++ b/example/lib/generic_response_class_example.dart @@ -18,11 +18,7 @@ class BaseResponse { @JsonKey(fromJson: _dataFromJson) final T? data; - const BaseResponse({ - this.status, - this.msg, - this.data, - }); + const BaseResponse({this.status, this.msg, this.data}); factory BaseResponse.fromJson(Map json) => _$BaseResponseFromJson(json); @@ -43,8 +39,9 @@ class BaseResponse { // necessary to "peek" into non-empty lists to determine the type! return json - .map((e) => Article.fromJson(e as Map)) - .toList() as T; + .map((e) => Article.fromJson(e as Map)) + .toList() + as T; } throw ArgumentError.value( @@ -80,10 +77,7 @@ class User { final int? id; final String? email; - const User({ - this.id, - this.email, - }); + const User({this.id, this.email}); factory User.fromJson(Map json) => _$UserFromJson(json); } @@ -93,10 +87,7 @@ class Comment { final String? content; final int? id; - const Comment({ - this.id, - this.content, - }); + const Comment({this.id, this.content}); factory Comment.fromJson(Map json) => _$CommentFromJson(json); diff --git a/example/lib/generic_response_class_example.g.dart b/example/lib/generic_response_class_example.g.dart index e61f09efc..4ee26fa88 100644 --- a/example/lib/generic_response_class_example.g.dart +++ b/example/lib/generic_response_class_example.g.dart @@ -14,22 +14,20 @@ BaseResponse _$BaseResponseFromJson(Map json) => ); Article _$ArticleFromJson(Map json) => Article( - id: (json['id'] as num).toInt(), - title: json['title'] as String, - author: json['author'] == null - ? null - : User.fromJson(json['author'] as Map), - comments: (json['comments'] as List?) - ?.map((e) => Comment.fromJson(e as Map)) - .toList(), - ); + id: (json['id'] as num).toInt(), + title: json['title'] as String, + author: json['author'] == null + ? null + : User.fromJson(json['author'] as Map), + comments: (json['comments'] as List?) + ?.map((e) => Comment.fromJson(e as Map)) + .toList(), +); -User _$UserFromJson(Map json) => User( - id: (json['id'] as num?)?.toInt(), - email: json['email'] as String?, - ); +User _$UserFromJson(Map json) => + User(id: (json['id'] as num?)?.toInt(), email: json['email'] as String?); Comment _$CommentFromJson(Map json) => Comment( - id: (json['id'] as num?)?.toInt(), - content: json['content'] as String?, - ); + id: (json['id'] as num?)?.toInt(), + content: json['content'] as String?, +); diff --git a/example/lib/json_converter_example.g.dart b/example/lib/json_converter_example.g.dart index 01b2e46f5..ccea4f967 100644 --- a/example/lib/json_converter_example.g.dart +++ b/example/lib/json_converter_example.g.dart @@ -17,32 +17,27 @@ Map _$DateTimeExampleToJson(DateTimeExample instance) => }; GenericCollection _$GenericCollectionFromJson( - Map json) => - GenericCollection( - page: (json['page'] as num?)?.toInt(), - totalResults: (json['total_results'] as num?)?.toInt(), - totalPages: (json['total_pages'] as num?)?.toInt(), - results: (json['results'] as List?) - ?.map(_Converter().fromJson) - .toList(), - ); + Map json, +) => GenericCollection( + page: (json['page'] as num?)?.toInt(), + totalResults: (json['total_results'] as num?)?.toInt(), + totalPages: (json['total_pages'] as num?)?.toInt(), + results: (json['results'] as List?) + ?.map(_Converter().fromJson) + .toList(), +); Map _$GenericCollectionToJson( - GenericCollection instance) => - { - 'page': instance.page, - 'total_results': instance.totalResults, - 'total_pages': instance.totalPages, - 'results': instance.results?.map(_Converter().toJson).toList(), - }; + GenericCollection instance, +) => { + 'page': instance.page, + 'total_results': instance.totalResults, + 'total_pages': instance.totalPages, + 'results': instance.results?.map(_Converter().toJson).toList(), +}; -CustomResult _$CustomResultFromJson(Map json) => CustomResult( - json['name'] as String, - (json['size'] as num).toInt(), - ); +CustomResult _$CustomResultFromJson(Map json) => + CustomResult(json['name'] as String, (json['size'] as num).toInt()); Map _$CustomResultToJson(CustomResult instance) => - { - 'name': instance.name, - 'size': instance.size, - }; + {'name': instance.name, 'size': instance.size}; diff --git a/example/lib/nested_values_example.dart b/example/lib/nested_values_example.dart index 3bd1e47f6..79c54d0ee 100644 --- a/example/lib/nested_values_example.dart +++ b/example/lib/nested_values_example.dart @@ -24,14 +24,14 @@ class _NestedListConverter @override List fromJson(Map json) => [ - for (var e in json['items'] as List) - (e as Map)['name'] as String - ]; + for (var e in json['items'] as List) + (e as Map)['name'] as String, + ]; @override Map toJson(List object) => { - 'items': [ - for (var item in object) {'name': item} - ] - }; + 'items': [ + for (var item in object) {'name': item}, + ], + }; } diff --git a/example/lib/nested_values_example.g.dart b/example/lib/nested_values_example.g.dart index 39dc2b8c2..ee41d257d 100644 --- a/example/lib/nested_values_example.g.dart +++ b/example/lib/nested_values_example.g.dart @@ -8,8 +8,9 @@ part of 'nested_values_example.dart'; NestedValueExample _$NestedValueExampleFromJson(Map json) => NestedValueExample( - const _NestedListConverter() - .fromJson(json['root_items'] as Map), + const _NestedListConverter().fromJson( + json['root_items'] as Map, + ), ); Map _$NestedValueExampleToJson(NestedValueExample instance) => diff --git a/example/lib/tuple_example.dart b/example/lib/tuple_example.dart index 35bcbe6a7..806a49ae8 100644 --- a/example/lib/tuple_example.dart +++ b/example/lib/tuple_example.dart @@ -18,14 +18,12 @@ class Tuple { Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, - ) => - _$TupleFromJson(json, fromJsonT, fromJsonS); + ) => _$TupleFromJson(json, fromJsonT, fromJsonS); Map toJson( Object Function(T value) toJsonT, Object Function(S value) toJsonS, - ) => - _$TupleToJson(this, toJsonT, toJsonS); + ) => _$TupleToJson(this, toJsonT, toJsonS); } @JsonSerializable() diff --git a/example/lib/tuple_example.g.dart b/example/lib/tuple_example.g.dart index f4a537901..71aff0c6f 100644 --- a/example/lib/tuple_example.g.dart +++ b/example/lib/tuple_example.g.dart @@ -10,32 +10,29 @@ Tuple _$TupleFromJson( Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, -) => - Tuple( - fromJsonT(json['value1']), - fromJsonS(json['value2']), - ); +) => Tuple(fromJsonT(json['value1']), fromJsonS(json['value2'])); Map _$TupleToJson( Tuple instance, Object? Function(T value) toJsonT, Object? Function(S value) toJsonS, -) => - { - 'value1': toJsonT(instance.value1), - 'value2': toJsonS(instance.value2), - }; +) => { + 'value1': toJsonT(instance.value1), + 'value2': toJsonS(instance.value2), +}; ConcreteClass _$ConcreteClassFromJson(Map json) => ConcreteClass( Tuple.fromJson( - json['tuple1'] as Map, - (value) => (value as num).toInt(), - (value) => DateTime.parse(value as String)), + json['tuple1'] as Map, + (value) => (value as num).toInt(), + (value) => DateTime.parse(value as String), + ), Tuple.fromJson( - json['tuple2'] as Map, - (value) => Duration(microseconds: (value as num).toInt()), - (value) => BigInt.parse(value as String)), + json['tuple2'] as Map, + (value) => Duration(microseconds: (value as num).toInt()), + (value) => BigInt.parse(value as String), + ), ); Map _$ConcreteClassToJson(ConcreteClass instance) => diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 3926249e9..392a1cd2f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -2,7 +2,7 @@ name: example publish_to: none environment: - sdk: ^3.6.0 + sdk: ^3.8.0 resolution: workspace diff --git a/example/test/example_test.dart b/example/test/example_test.dart index 99dc2ed53..6a33c796c 100644 --- a/example/test/example_test.dart +++ b/example/test/example_test.dart @@ -19,8 +19,9 @@ void main() { final personJson = loudEncode(person); - final person2 = - Person.fromJson(json.decode(personJson) as Map); + final person2 = Person.fromJson( + json.decode(personJson) as Map, + ); expect(person.firstName, person2.firstName); expect(person.lastName, person2.lastName); diff --git a/example/test/generic_response_class_test.dart b/example/test/generic_response_class_test.dart index 8faaf39ec..d922938a2 100644 --- a/example/test/generic_response_class_test.dart +++ b/example/test/generic_response_class_test.dart @@ -8,7 +8,7 @@ import 'package:test/test.dart'; const _jsonUser = { 'status': 200, 'msg': 'success', - 'data': {'id': 1, 'email': 'test@test.com'} + 'data': {'id': 1, 'email': 'test@test.com'}, }; final _jsonArticle = { @@ -21,8 +21,8 @@ final _jsonArticle = { 'comments': [ {'content': 'comment context', 'id': 1}, {'content': 'comment context', 'id': 2}, - ] - } + ], + }, }; final _jsonArticleList = { @@ -31,7 +31,7 @@ final _jsonArticleList = { 'data': [ {'id': 1, 'title': 'title1'}, _jsonArticle['data'], - ] + ], }; void _testResponse(BaseResponse response, void Function(T) testFunction) { diff --git a/example/test/json_convert_example_test.dart b/example/test/json_convert_example_test.dart index 5751b72de..bd8a152d8 100644 --- a/example/test/json_convert_example_test.dart +++ b/example/test/json_convert_example_test.dart @@ -19,18 +19,24 @@ void main() { "when": $value }'''); - final copy = - DateTimeExample.fromJson(jsonDecode(json) as Map); + final copy = DateTimeExample.fromJson( + jsonDecode(json) as Map, + ); expect(copy.when, epochDateTime); }); test('trivial case', () { final collection = GenericCollection( - page: 0, totalPages: 3, totalResults: 10, results: [1, 2, 3]); + page: 0, + totalPages: 3, + totalResults: 10, + results: [1, 2, 3], + ); final encoded = loudEncode(collection); final collection2 = GenericCollection.fromJson( - jsonDecode(encoded) as Map); + jsonDecode(encoded) as Map, + ); expect(collection2.results, [1, 2, 3]); @@ -39,14 +45,16 @@ void main() { test('custom result', () { final collection = GenericCollection( - page: 0, - totalPages: 3, - totalResults: 10, - results: [CustomResult('bob', 42)]); + page: 0, + totalPages: 3, + totalResults: 10, + results: [CustomResult('bob', 42)], + ); final encoded = loudEncode(collection); final collection2 = GenericCollection.fromJson( - jsonDecode(encoded) as Map); + jsonDecode(encoded) as Map, + ); expect(collection2.results, [CustomResult('bob', 42)]); @@ -54,37 +62,45 @@ void main() { }); test('mixed values in generic collection', () { - final collection = - GenericCollection(page: 0, totalPages: 3, totalResults: 10, results: [ - 1, - 3.14, - null, - 'bob', - ['list'], - {'map': 'map'}, - CustomResult('bob', 42) - ]); + final collection = GenericCollection( + page: 0, + totalPages: 3, + totalResults: 10, + results: [ + 1, + 3.14, + null, + 'bob', + ['list'], + {'map': 'map'}, + CustomResult('bob', 42), + ], + ); final encoded = loudEncode(collection); expect( () => GenericCollection.fromJson( - jsonDecode(encoded) as Map), + jsonDecode(encoded) as Map, + ), throwsTypeError, ); expect( () => GenericCollection.fromJson( - jsonDecode(encoded) as Map), + jsonDecode(encoded) as Map, + ), throwsTypeError, ); expect( () => GenericCollection.fromJson( - jsonDecode(encoded) as Map), + jsonDecode(encoded) as Map, + ), throwsTypeError, ); final collection2 = GenericCollection.fromJson( - jsonDecode(encoded) as Map); + jsonDecode(encoded) as Map, + ); expect(collection2.results, [ 1, @@ -93,7 +109,7 @@ void main() { 'bob', ['list'], {'map': 'map'}, - CustomResult('bob', 42) + CustomResult('bob', 42), ]); expect(loudEncode(collection2), encoded); diff --git a/json_annotation/lib/src/allowed_keys_helpers.dart b/json_annotation/lib/src/allowed_keys_helpers.dart index 48c3689b7..5ea896a79 100644 --- a/json_annotation/lib/src/allowed_keys_helpers.dart +++ b/json_annotation/lib/src/allowed_keys_helpers.dart @@ -14,16 +14,19 @@ void $checkKeys( List? disallowNullValues, }) { if (allowedKeys != null) { - final invalidKeys = - map.keys.cast().where((k) => !allowedKeys.contains(k)).toList(); + final invalidKeys = map.keys + .cast() + .where((k) => !allowedKeys.contains(k)) + .toList(); if (invalidKeys.isNotEmpty) { throw UnrecognizedKeysException(invalidKeys, map, allowedKeys); } } if (requiredKeys != null) { - final missingKeys = - requiredKeys.where((k) => !map.keys.contains(k)).toList(); + final missingKeys = requiredKeys + .where((k) => !map.keys.contains(k)) + .toList(); if (missingKeys.isNotEmpty) { throw MissingRequiredKeysException(missingKeys, map); } @@ -73,7 +76,7 @@ class UnrecognizedKeysException extends BadKeyException { '[${allowedKeys.join(', ')}]'; UnrecognizedKeysException(this.unrecognizedKeys, Map map, this.allowedKeys) - : super._(map); + : super._(map); } /// Exception thrown if there are missing required keys in a JSON map that was @@ -86,8 +89,8 @@ class MissingRequiredKeysException extends BadKeyException { String get message => 'Required keys are missing: ${missingKeys.join(', ')}.'; MissingRequiredKeysException(this.missingKeys, Map map) - : assert(missingKeys.isNotEmpty), - super._(map); + : assert(missingKeys.isNotEmpty), + super._(map); } /// Exception thrown if there are keys with disallowed `null` values in a JSON @@ -98,6 +101,7 @@ class DisallowedNullValueException extends BadKeyException { DisallowedNullValueException(this.keysWithNullValues, Map map) : super._(map); @override - String get message => 'These keys had `null` values, ' + String get message => + 'These keys had `null` values, ' 'which is not allowed: $keysWithNullValues'; } diff --git a/json_annotation/lib/src/checked_helpers.dart b/json_annotation/lib/src/checked_helpers.dart index 04c54d871..15d0e7b67 100644 --- a/json_annotation/lib/src/checked_helpers.dart +++ b/json_annotation/lib/src/checked_helpers.dart @@ -17,15 +17,15 @@ T $checkedCreate( S Function(Object?), { Object? Function(Map, String)? readValue, }), - ) constructor, { + ) + constructor, { Map fieldKeyMap = const {}, }) { Q checkedConvert( String key, Q Function(Object?) convertFunction, { Object? Function(Map, String)? readValue, - }) => - $checkedConvert(map, key, convertFunction, readValue: readValue); + }) => $checkedConvert(map, key, convertFunction, readValue: readValue); return $checkedNew( className, @@ -135,9 +135,9 @@ class CheckedFromJsonException implements Exception { String className, this.message, { this.badKey = false, - }) : _className = className, - innerError = null, - innerStack = null; + }) : _className = className, + innerError = null, + innerStack = null; CheckedFromJsonException._( Object this.innerError, @@ -145,9 +145,9 @@ class CheckedFromJsonException implements Exception { this.map, this.key, { String? className, - }) : _className = className, - badKey = innerError is BadKeyException, - message = _getMessage(innerError); + }) : _className = className, + badKey = innerError is BadKeyException, + message = _getMessage(innerError); static String _getMessage(Object error) { if (error is ArgumentError) { @@ -171,12 +171,12 @@ class CheckedFromJsonException implements Exception { @override String toString() => [ - 'CheckedFromJsonException', - if (_className != null) 'Could not create `$_className`.', - if (key != null) 'There is a problem with "$key".', - if (message != null) - message! - else if (innerError != null) - innerError.toString(), - ].join('\n'); + 'CheckedFromJsonException', + if (_className != null) 'Could not create `$_className`.', + if (key != null) 'There is a problem with "$key".', + if (message != null) + message! + else if (innerError != null) + innerError.toString(), + ].join('\n'); } diff --git a/json_annotation/lib/src/json_serializable.dart b/json_annotation/lib/src/json_serializable.dart index 64d1990e0..7c82e2f2e 100644 --- a/json_annotation/lib/src/json_serializable.dart +++ b/json_annotation/lib/src/json_serializable.dart @@ -305,20 +305,20 @@ class JsonSerializable { /// [defaults]. @Deprecated('Was only ever included to support builder infrastructure.') JsonSerializable withDefaults() => JsonSerializable( - anyMap: anyMap ?? defaults.anyMap, - checked: checked ?? defaults.checked, - constructor: constructor ?? defaults.constructor, - createFactory: createFactory ?? defaults.createFactory, - createToJson: createToJson ?? defaults.createToJson, - disallowUnrecognizedKeys: - disallowUnrecognizedKeys ?? defaults.disallowUnrecognizedKeys, - explicitToJson: explicitToJson ?? defaults.explicitToJson, - fieldRename: fieldRename ?? defaults.fieldRename, - ignoreUnannotated: ignoreUnannotated ?? defaults.ignoreUnannotated, - includeIfNull: includeIfNull ?? defaults.includeIfNull, - genericArgumentFactories: - genericArgumentFactories ?? defaults.genericArgumentFactories, - ); + anyMap: anyMap ?? defaults.anyMap, + checked: checked ?? defaults.checked, + constructor: constructor ?? defaults.constructor, + createFactory: createFactory ?? defaults.createFactory, + createToJson: createToJson ?? defaults.createToJson, + disallowUnrecognizedKeys: + disallowUnrecognizedKeys ?? defaults.disallowUnrecognizedKeys, + explicitToJson: explicitToJson ?? defaults.explicitToJson, + fieldRename: fieldRename ?? defaults.fieldRename, + ignoreUnannotated: ignoreUnannotated ?? defaults.ignoreUnannotated, + includeIfNull: includeIfNull ?? defaults.includeIfNull, + genericArgumentFactories: + genericArgumentFactories ?? defaults.genericArgumentFactories, + ); Map toJson() => _$JsonSerializableToJson(this); } diff --git a/json_annotation/lib/src/json_serializable.g.dart b/json_annotation/lib/src/json_serializable.g.dart index 80614717e..80a3e4c86 100644 --- a/json_annotation/lib/src/json_serializable.g.dart +++ b/json_annotation/lib/src/json_serializable.g.dart @@ -6,71 +6,79 @@ part of 'json_serializable.dart'; // JsonSerializableGenerator // ************************************************************************** -JsonSerializable _$JsonSerializableFromJson(Map json) => - $checkedCreate( - 'JsonSerializable', +JsonSerializable _$JsonSerializableFromJson( + Map json, +) => $checkedCreate( + 'JsonSerializable', + json, + ($checkedConvert) { + $checkKeys( json, - ($checkedConvert) { - $checkKeys( - json, - allowedKeys: const [ - 'any_map', - 'checked', - 'constructor', - 'create_factory', - 'create_field_map', - 'create_json_keys', - 'create_per_field_to_json', - 'create_to_json', - 'disallow_unrecognized_keys', - 'explicit_to_json', - 'field_rename', - 'generic_argument_factories', - 'ignore_unannotated', - 'include_if_null' - ], - ); - final val = JsonSerializable( - anyMap: $checkedConvert('any_map', (v) => v as bool?), - checked: $checkedConvert('checked', (v) => v as bool?), - constructor: $checkedConvert('constructor', (v) => v as String?), - createFieldMap: - $checkedConvert('create_field_map', (v) => v as bool?), - createJsonKeys: - $checkedConvert('create_json_keys', (v) => v as bool?), - createFactory: $checkedConvert('create_factory', (v) => v as bool?), - createToJson: $checkedConvert('create_to_json', (v) => v as bool?), - disallowUnrecognizedKeys: - $checkedConvert('disallow_unrecognized_keys', (v) => v as bool?), - explicitToJson: - $checkedConvert('explicit_to_json', (v) => v as bool?), - fieldRename: $checkedConvert('field_rename', - (v) => $enumDecodeNullable(_$FieldRenameEnumMap, v)), - ignoreUnannotated: - $checkedConvert('ignore_unannotated', (v) => v as bool?), - includeIfNull: $checkedConvert('include_if_null', (v) => v as bool?), - genericArgumentFactories: - $checkedConvert('generic_argument_factories', (v) => v as bool?), - createPerFieldToJson: - $checkedConvert('create_per_field_to_json', (v) => v as bool?), - ); - return val; - }, - fieldKeyMap: const { - 'anyMap': 'any_map', - 'createFieldMap': 'create_field_map', - 'createJsonKeys': 'create_json_keys', - 'createFactory': 'create_factory', - 'createToJson': 'create_to_json', - 'disallowUnrecognizedKeys': 'disallow_unrecognized_keys', - 'explicitToJson': 'explicit_to_json', - 'fieldRename': 'field_rename', - 'ignoreUnannotated': 'ignore_unannotated', - 'includeIfNull': 'include_if_null', - 'genericArgumentFactories': 'generic_argument_factories', - 'createPerFieldToJson': 'create_per_field_to_json' - }, + allowedKeys: const [ + 'any_map', + 'checked', + 'constructor', + 'create_factory', + 'create_field_map', + 'create_json_keys', + 'create_per_field_to_json', + 'create_to_json', + 'disallow_unrecognized_keys', + 'explicit_to_json', + 'field_rename', + 'generic_argument_factories', + 'ignore_unannotated', + 'include_if_null', + ], ); + final val = JsonSerializable( + anyMap: $checkedConvert('any_map', (v) => v as bool?), + checked: $checkedConvert('checked', (v) => v as bool?), + constructor: $checkedConvert('constructor', (v) => v as String?), + createFieldMap: $checkedConvert('create_field_map', (v) => v as bool?), + createJsonKeys: $checkedConvert('create_json_keys', (v) => v as bool?), + createFactory: $checkedConvert('create_factory', (v) => v as bool?), + createToJson: $checkedConvert('create_to_json', (v) => v as bool?), + disallowUnrecognizedKeys: $checkedConvert( + 'disallow_unrecognized_keys', + (v) => v as bool?, + ), + explicitToJson: $checkedConvert('explicit_to_json', (v) => v as bool?), + fieldRename: $checkedConvert( + 'field_rename', + (v) => $enumDecodeNullable(_$FieldRenameEnumMap, v), + ), + ignoreUnannotated: $checkedConvert( + 'ignore_unannotated', + (v) => v as bool?, + ), + includeIfNull: $checkedConvert('include_if_null', (v) => v as bool?), + genericArgumentFactories: $checkedConvert( + 'generic_argument_factories', + (v) => v as bool?, + ), + createPerFieldToJson: $checkedConvert( + 'create_per_field_to_json', + (v) => v as bool?, + ), + ); + return val; + }, + fieldKeyMap: const { + 'anyMap': 'any_map', + 'createFieldMap': 'create_field_map', + 'createJsonKeys': 'create_json_keys', + 'createFactory': 'create_factory', + 'createToJson': 'create_to_json', + 'disallowUnrecognizedKeys': 'disallow_unrecognized_keys', + 'explicitToJson': 'explicit_to_json', + 'fieldRename': 'field_rename', + 'ignoreUnannotated': 'ignore_unannotated', + 'includeIfNull': 'include_if_null', + 'genericArgumentFactories': 'generic_argument_factories', + 'createPerFieldToJson': 'create_per_field_to_json', + }, +); Map _$JsonSerializableToJson(JsonSerializable instance) => { diff --git a/json_annotation/pubspec.yaml b/json_annotation/pubspec.yaml index 4c3da5f3e..f1cd2c79b 100644 --- a/json_annotation/pubspec.yaml +++ b/json_annotation/pubspec.yaml @@ -11,7 +11,7 @@ topics: - codegen environment: - sdk: ^3.6.0 + sdk: ^3.8.0 resolution: workspace diff --git a/json_serializable/README.md b/json_serializable/README.md index d53e3138e..47c0d0cbb 100644 --- a/json_serializable/README.md +++ b/json_serializable/README.md @@ -56,18 +56,18 @@ Building creates the corresponding part `example.g.dart`: part of 'example.dart'; Person _$PersonFromJson(Map json) => Person( - firstName: json['firstName'] as String, - lastName: json['lastName'] as String, - dateOfBirth: json['dateOfBirth'] == null - ? null - : DateTime.parse(json['dateOfBirth'] as String), - ); + firstName: json['firstName'] as String, + lastName: json['lastName'] as String, + dateOfBirth: json['dateOfBirth'] == null + ? null + : DateTime.parse(json['dateOfBirth'] as String), +); Map _$PersonToJson(Person instance) => { - 'firstName': instance.firstName, - 'lastName': instance.lastName, - 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), - }; + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), +}; ``` # Running the code generator @@ -211,10 +211,7 @@ customize the encoding/decoding of any type, you have a few options. factory Sample3.fromJson(Map json) => _$Sample3FromJson(json); - @JsonKey( - toJson: _toJson, - fromJson: _fromJson, - ) + @JsonKey(toJson: _toJson, fromJson: _fromJson) final DateTime value; Map toJson() => _$Sample3ToJson(this); diff --git a/json_serializable/example/example.g.dart b/json_serializable/example/example.g.dart index 0ed069cae..8dceaa3f8 100644 --- a/json_serializable/example/example.g.dart +++ b/json_serializable/example/example.g.dart @@ -9,15 +9,15 @@ part of 'example.dart'; // ************************************************************************** Person _$PersonFromJson(Map json) => Person( - firstName: json['firstName'] as String, - lastName: json['lastName'] as String, - dateOfBirth: json['dateOfBirth'] == null - ? null - : DateTime.parse(json['dateOfBirth'] as String), - ); + firstName: json['firstName'] as String, + lastName: json['lastName'] as String, + dateOfBirth: json['dateOfBirth'] == null + ? null + : DateTime.parse(json['dateOfBirth'] as String), +); Map _$PersonToJson(Person instance) => { - 'firstName': instance.firstName, - 'lastName': instance.lastName, - 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), - }; + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), +}; diff --git a/json_serializable/lib/builder.dart b/json_serializable/lib/builder.dart index b68eb7587..9c90094ce 100644 --- a/json_serializable/lib/builder.dart +++ b/json_serializable/lib/builder.dart @@ -27,7 +27,7 @@ Builder jsonSerializable(BuilderOptions options) { return jsonPartBuilder(config: config); } on CheckedFromJsonException catch (e) { final lines = [ - 'Could not parse the options provided for `json_serializable`.' + 'Could not parse the options provided for `json_serializable`.', ]; if (e.key != null) { diff --git a/json_serializable/lib/src/check_dependencies.dart b/json_serializable/lib/src/check_dependencies.dart index 13117f268..21de3153c 100644 --- a/json_serializable/lib/src/check_dependencies.dart +++ b/json_serializable/lib/src/check_dependencies.dart @@ -12,16 +12,18 @@ import 'constants.dart'; const _productionDirectories = {'lib', 'bin'}; const _annotationPkgName = 'json_annotation'; -final _supportLanguageRange = - VersionConstraint.parse(supportedLanguageConstraint); +final _supportLanguageRange = VersionConstraint.parse( + supportedLanguageConstraint, +); final requiredJsonAnnotationMinVersion = Version.parse('4.9.0'); Future pubspecHasRightVersion(BuildStep buildStep) async { final segments = buildStep.inputId.pathSegments; final productionDependency = segments.length > 1 && _productionDirectories.contains(segments.first); - final resource = - productionDependency ? _productionDependency : _developmentDependency; + final resource = productionDependency + ? _productionDependency + : _developmentDependency; await resource.run(buildStep); } @@ -62,16 +64,14 @@ Future _validatePubspec(bool production, BuildStep buildStep) async { final thisPackageVer = Version.parse('$thisPackageVersion.0'); if (!_supportLanguageRange.allows(thisPackageVer)) { - log.warning( - ''' + log.warning(''' The language version ($thisPackageVer) of this package ($currentPackageName) does not match the required range `$supportedLanguageConstraint`. Edit pubspec.yaml to include an SDK constraint of at least $supportedLanguageConstraint. environment: sdk: $supportedLanguageConstraint -''', - ); +'''); } } diff --git a/json_serializable/lib/src/decode_helper.dart b/json_serializable/lib/src/decode_helper.dart index 3a20abbbc..633935e7d 100644 --- a/json_serializable/lib/src/decode_helper.dart +++ b/json_serializable/lib/src/decode_helper.dart @@ -30,9 +30,11 @@ mixin DecodeHelper implements HelperCore { final buffer = StringBuffer(); final mapType = config.anyMap ? 'Map' : 'Map'; - buffer.write('$targetClassReference ' - '${prefix}FromJson${genericClassArgumentsImpl(withConstraints: true)}' - '($mapType json'); + buffer.write( + '$targetClassReference ' + '${prefix}FromJson${genericClassArgumentsImpl(withConstraints: true)}' + '($mapType json', + ); if (config.genericArgumentFactories) { for (var arg in element.typeParameters) { @@ -51,10 +53,13 @@ mixin DecodeHelper implements HelperCore { final fromJsonLines = []; - String deserializeFun(String paramOrFieldName, - {ParameterElement? ctorParam}) => - _deserializeForField(accessibleFields[paramOrFieldName]!, - ctorParam: ctorParam); + String deserializeFun( + String paramOrFieldName, { + ParameterElement? ctorParam, + }) => _deserializeForField( + accessibleFields[paramOrFieldName]!, + ctorParam: ctorParam, + ); final data = _writeConstructorInvocation( element, @@ -69,8 +74,9 @@ mixin DecodeHelper implements HelperCore { ); final checks = _checkKeys( - accessibleFields.values - .where((fe) => data.usedCtorParamsAndFields.contains(fe.name)), + accessibleFields.values.where( + (fe) => data.usedCtorParamsAndFields.contains(fe.name), + ), ).toList(); if (config.checked) { @@ -94,9 +100,7 @@ mixin DecodeHelper implements HelperCore { ..write(''' \$checkedConvert($safeName, (v) => ''') ..write('val.$fieldName = ') - ..write( - _deserializeForField(fieldValue, checkedProperty: true), - ); + ..write(_deserializeForField(fieldValue, checkedProperty: true)); final readValueFunc = jsonKeyFor(fieldValue).readValueFunctionName; if (readValueFunc != null) { @@ -109,9 +113,11 @@ mixin DecodeHelper implements HelperCore { sectionBuffer.write('''\n return val; }'''); - final fieldKeyMap = Map.fromEntries(data.usedCtorParamsAndFields - .map((k) => MapEntry(k, nameAccess(accessibleFields[k]!))) - .where((me) => me.key != me.value)); + final fieldKeyMap = Map.fromEntries( + data.usedCtorParamsAndFields + .map((k) => MapEntry(k, nameAccess(accessibleFields[k]!))) + .where((me) => me.key != me.value), + ); String fieldKeyMapArg; if (fieldKeyMap.isEmpty) { @@ -128,7 +134,8 @@ mixin DecodeHelper implements HelperCore { } else { fromJsonLines.addAll(checks); - final sectionBuffer = StringBuffer()..write(''' + final sectionBuffer = StringBuffer() + ..write(''' ${data.content}'''); for (final field in data.fieldsToSet) { sectionBuffer @@ -168,8 +175,9 @@ mixin DecodeHelper implements HelperCore { args.add('allowedKeys: $allowKeysLiteral'); } - final requiredKeys = - accessibleFields.where((fe) => jsonKeyFor(fe).required).toList(); + final requiredKeys = accessibleFields + .where((fe) => jsonKeyFor(fe).required) + .toList(); if (requiredKeys.isNotEmpty) { final requiredKeyLiteral = constantList(requiredKeys); @@ -205,11 +213,7 @@ mixin DecodeHelper implements HelperCore { final readValueFunc = jsonKey.readValueFunctionName; String deserialize(String expression) => contextHelper - .deserialize( - targetType, - expression, - defaultValue: defaultValue, - ) + .deserialize(targetType, expression, defaultValue: defaultValue) .toString(); String value; @@ -217,8 +221,9 @@ mixin DecodeHelper implements HelperCore { if (config.checked) { value = deserialize('v'); if (!checkedProperty) { - final readValueBit = - readValueFunc == null ? '' : ',readValue: $readValueFunc,'; + final readValueBit = readValueFunc == null + ? '' + : ',readValue: $readValueFunc,'; value = '\$checkedConvert($jsonKeyName, (v) => $value$readValueBit)'; } } else { @@ -240,9 +245,11 @@ mixin DecodeHelper implements HelperCore { if (defaultValue != null) { if (jsonKey.disallowNullValue && jsonKey.required) { - log.warning('The `defaultValue` on field `${field.name}` will have no ' - 'effect because both `disallowNullValue` and `required` are set to ' - '`true`.'); + log.warning( + 'The `defaultValue` on field `${field.name}` will have no ' + 'effect because both `disallowNullValue` and `required` are set to ' + '`true`.', + ); } } return value; @@ -266,7 +273,7 @@ _ConstructorData _writeConstructorInvocation( Iterable writableFields, Map unavailableReasons, String Function(String paramOrFieldName, {ParameterElement ctorParam}) - deserializeForField, + deserializeForField, ) { final className = classElement.name; @@ -279,7 +286,8 @@ _ConstructorData _writeConstructorInvocation( for (final arg in ctor.parameters) { if (!availableConstructorParameters.contains(arg.name)) { if (arg.isRequired) { - var msg = 'Cannot populate the required constructor ' + var msg = + 'Cannot populate the required constructor ' 'argument: ${arg.name}.'; final additionalInfo = unavailableReasons[arg.name]; @@ -304,8 +312,9 @@ _ConstructorData _writeConstructorInvocation( } // fields that aren't already set by the constructor and that aren't final - final remainingFieldsForInvocationBody = - writableFields.toSet().difference(usedCtorParamsAndFields); + final remainingFieldsForInvocationBody = writableFields.toSet().difference( + usedCtorParamsAndFields, + ); final constructorExtra = constructorName.isEmpty ? '' : '.$constructorName'; @@ -315,16 +324,24 @@ _ConstructorData _writeConstructorInvocation( '${genericClassArguments(classElement, false)}' '$constructorExtra(', ) - ..writeAll(constructorArguments.map((paramElement) { - final content = - deserializeForField(paramElement.name, ctorParam: paramElement); - return ' $content,\n'; - })) - ..writeAll(namedConstructorArguments.map((paramElement) { - final value = - deserializeForField(paramElement.name, ctorParam: paramElement); - return ' ${paramElement.name}: $value,\n'; - })) + ..writeAll( + constructorArguments.map((paramElement) { + final content = deserializeForField( + paramElement.name, + ctorParam: paramElement, + ); + return ' $content,\n'; + }), + ) + ..writeAll( + namedConstructorArguments.map((paramElement) { + final value = deserializeForField( + paramElement.name, + ctorParam: paramElement, + ); + return ' ${paramElement.name}: $value,\n'; + }), + ) ..write(')'); usedCtorParamsAndFields.addAll(remainingFieldsForInvocationBody); diff --git a/json_serializable/lib/src/encoder_helper.dart b/json_serializable/lib/src/encoder_helper.dart index 4e876b757..dc7e8a9ec 100644 --- a/json_serializable/lib/src/encoder_helper.dart +++ b/json_serializable/lib/src/encoder_helper.dart @@ -92,26 +92,30 @@ mixin EncodeHelper implements HelperCore { final functionName = '${prefix}ToJson${genericClassArgumentsImpl(withConstraints: true)}'; - buffer.write('Map ' - '$functionName($targetClassReference $_toJsonParamName'); + buffer.write( + 'Map ' + '$functionName($targetClassReference $_toJsonParamName', + ); if (config.genericArgumentFactories) _writeGenericArgumentFactories(buffer); buffer ..write(') ') ..writeln('=> {') - ..writeAll(accessibleFields.map((field) { - final access = _fieldAccess(field); - - final keyExpression = safeNameAccess(field); - final valueExpression = _serializeField(field, access); - - final keyValuePair = _canWriteJsonWithoutNullCheck(field) - ? '$keyExpression: $valueExpression' - : 'if ($valueExpression case final $generatedLocalVarName?) ' - '$keyExpression: $generatedLocalVarName'; - return ' $keyValuePair,\n'; - })) + ..writeAll( + accessibleFields.map((field) { + final access = _fieldAccess(field); + + final keyExpression = safeNameAccess(field); + final valueExpression = _serializeField(field, access); + + final keyValuePair = _canWriteJsonWithoutNullCheck(field) + ? '$keyExpression: $valueExpression' + : 'if ($valueExpression case final $generatedLocalVarName?) ' + '$keyExpression: $generatedLocalVarName'; + return ' $keyValuePair,\n'; + }), + ) ..writeln('};'); yield buffer.toString(); @@ -133,9 +137,9 @@ mixin EncodeHelper implements HelperCore { String _serializeField(FieldElement field, String accessExpression) { try { - return getHelperContext(field) - .serialize(field.type, accessExpression) - .toString(); + return getHelperContext( + field, + ).serialize(field.type, accessExpression).toString(); } on UnsupportedTypeError catch (e) // ignore: avoid_catching_errors { throw createInvalidGenerationError('toJson', field, e); @@ -158,8 +162,10 @@ mixin EncodeHelper implements HelperCore { return !serializeConvertData.returnType.isNullableType; } - final nullableEncodeConverter = - hasConverterNullEncode(field.type, helperContext); + final nullableEncodeConverter = hasConverterNullEncode( + field.type, + helperContext, + ); if (nullableEncodeConverter != null) { return !nullableEncodeConverter && !field.type.isNullableType; diff --git a/json_serializable/lib/src/enum_utils.dart b/json_serializable/lib/src/enum_utils.dart index d5aa4d2d2..00f0cbc0f 100644 --- a/json_serializable/lib/src/enum_utils.dart +++ b/json_serializable/lib/src/enum_utils.dart @@ -35,14 +35,19 @@ String? enumValueMapFromType( DartType targetType, { bool nullWithNoAnnotation = false, }) { - final enumMap = - _enumMap(targetType, nullWithNoAnnotation: nullWithNoAnnotation); + final enumMap = _enumMap( + targetType, + nullWithNoAnnotation: nullWithNoAnnotation, + ); if (enumMap == null) return null; final items = enumMap.entries - .map((e) => ' ${targetType.element!.name}.${e.key.name}: ' - '${jsonLiteralAsDart(e.value)},') + .map( + (e) => + ' ${targetType.element!.name}.${e.key.name}: ' + '${jsonLiteralAsDart(e.value)},', + ) .join(); return 'const ${constMapName(targetType)} = {\n$items\n};'; @@ -78,8 +83,9 @@ Object? _generateEntry({ required JsonEnum jsonEnum, required DartType targetType, }) { - final annotation = - const TypeChecker.fromRuntime(JsonValue).firstAnnotationOfExact(field); + final annotation = const TypeChecker.fromRuntime( + JsonValue, + ).firstAnnotationOfExact(field); if (annotation == null) { final valueField = jsonEnum.valueField; diff --git a/json_serializable/lib/src/field_helpers.dart b/json_serializable/lib/src/field_helpers.dart index 8f8811f47..bc9d6133f 100644 --- a/json_serializable/lib/src/field_helpers.dart +++ b/json_serializable/lib/src/field_helpers.dart @@ -4,11 +4,9 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/src/dart/element/element.dart' // ignore: implementation_imports - show - InterfaceElementImpl; + show InterfaceElementImpl; import 'package:analyzer/src/dart/element/inheritance_manager3.dart' // ignore: implementation_imports - show - InheritanceManager3; + show InheritanceManager3; import 'package:source_gen/source_gen.dart'; import 'utils.dart'; @@ -18,7 +16,7 @@ class _FieldSet implements Comparable<_FieldSet> { final FieldElement sortField; _FieldSet._(this.field, this.sortField) - : assert(field.name == sortField.name); + : assert(field.name == sortField.name); factory _FieldSet(FieldElement? classField, FieldElement? superField) { // At least one of these will != null, perhaps both. @@ -29,8 +27,10 @@ class _FieldSet implements Comparable<_FieldSet> { // Prefer the field that's annotated with `JsonKey`, if any. // If not, use the class field. - final fieldHasJsonKey = - fields.firstWhere(hasJsonKeyAnnotation, orElse: () => fields.first); + final fieldHasJsonKey = fields.firstWhere( + hasJsonKeyAnnotation, + orElse: () => fields.first, + ); return _FieldSet._(fieldHasJsonKey, sortField); } @@ -52,7 +52,8 @@ class _FieldSet implements Comparable<_FieldSet> { } final checkerB = TypeChecker.fromStatic( - (b.enclosingElement3 as InterfaceElement).thisType); + (b.enclosingElement3 as InterfaceElement).thisType, + ); if (checkerB.isAssignableFrom(a.enclosingElement3)) { return 1; @@ -79,14 +80,16 @@ List createSortedFieldSet(ClassElement element) { // Get all of the fields that need to be assigned // TODO: support overriding the field set with an annotation option final elementInstanceFields = Map.fromEntries( - element.fields.where((e) => !e.isStatic).map((e) => MapEntry(e.name, e))); + element.fields.where((e) => !e.isStatic).map((e) => MapEntry(e.name, e)), + ); final inheritedFields = {}; final manager = InheritanceManager3(); - for (final v in manager - .getInheritedConcreteMap2(element as InterfaceElementImpl) - .values) { + for (final v + in manager + .getInheritedConcreteMap2(element as InterfaceElementImpl) + .values) { assert(v is! FieldElement); if (_dartCoreObjectChecker.isExactly(v.enclosingElement3)) { continue; @@ -102,13 +105,15 @@ List createSortedFieldSet(ClassElement element) { } // Get the list of all fields for `element` - final allFields = - elementInstanceFields.keys.toSet().union(inheritedFields.keys.toSet()); - - final fields = allFields - .map((e) => _FieldSet(elementInstanceFields[e], inheritedFields[e])) - .toList() - ..sort(); + final allFields = elementInstanceFields.keys.toSet().union( + inheritedFields.keys.toSet(), + ); + + final fields = + allFields + .map((e) => _FieldSet(elementInstanceFields[e], inheritedFields[e])) + .toList() + ..sort(); return fields.map((fs) => fs.field).toList(growable: false); } diff --git a/json_serializable/lib/src/generator_helper.dart b/json_serializable/lib/src/generator_helper.dart index 8c0e13b4a..ef1bf16e0 100644 --- a/json_serializable/lib/src/generator_helper.dart +++ b/json_serializable/lib/src/generator_helper.dart @@ -23,12 +23,9 @@ class GeneratorHelper extends HelperCore with EncodeHelper, DecodeHelper { ClassElement element, ConstantReader annotation, ) : super( - element, - mergeConfig( - _generator.config, - annotation, - classElement: element, - )); + element, + mergeConfig(_generator.config, annotation, classElement: element), + ); @override void addMember(String memberContent) { @@ -93,40 +90,37 @@ class GeneratorHelper extends HelperCore with EncodeHelper, DecodeHelper { // Need to add candidates BACK even if they are not used in the factory if // they are forced to be used for toJSON - for (var candidate in sortedFields.where((element) => - jsonKeyFor(element).explicitYesToJson && - !fieldsToUse.contains(element))) { + for (var candidate in sortedFields.where( + (element) => + jsonKeyFor(element).explicitYesToJson && + !fieldsToUse.contains(element), + )) { fieldsToUse.add(candidate); } // Need the fields to maintain the original source ordering fieldsToUse.sort( - (a, b) => sortedFields.indexOf(a).compareTo(sortedFields.indexOf(b))); + (a, b) => sortedFields.indexOf(a).compareTo(sortedFields.indexOf(b)), + ); accessibleFieldSet = fieldsToUse.toSet(); } accessibleFieldSet - ..removeWhere( - (element) => jsonKeyFor(element).explicitNoToJson, - ) - + ..removeWhere((element) => jsonKeyFor(element).explicitNoToJson) // Check for duplicate JSON keys due to colliding annotations. // We do this now, since we have a final field list after any pruning done // by `_writeCtor`. - ..fold( - {}, - (Set set, fe) { - final jsonKey = nameAccess(fe); - if (!set.add(jsonKey)) { - throw InvalidGenerationSourceError( - 'More than one field has the JSON key for name "$jsonKey".', - element: fe, - ); - } - return set; - }, - ); + ..fold({}, (Set set, fe) { + final jsonKey = nameAccess(fe); + if (!set.add(jsonKey)) { + throw InvalidGenerationSourceError( + 'More than one field has the JSON key for name "$jsonKey".', + element: fe, + ); + } + return set; + }); if (config.createFieldMap) { yield createFieldMap(accessibleFieldSet); diff --git a/json_serializable/lib/src/helper_core.dart b/json_serializable/lib/src/helper_core.dart index 0a054f828..6e9e731ab 100644 --- a/json_serializable/lib/src/helper_core.dart +++ b/json_serializable/lib/src/helper_core.dart @@ -65,11 +65,13 @@ InvalidGenerationSourceError createInvalidGenerationError( String? todo; if (error.type is TypeParameterType) { - message = '$message because of type ' + message = + '$message because of type ' '`${error.type.toStringNonNullable()}` ' '(type parameter)'; - todo = ''' + todo = + ''' To support type parameters (generic types) you can: $converterOrKeyInstructions * Set `JsonSerializable.genericArgumentFactories` to `true` @@ -78,17 +80,14 @@ $converterOrKeyInstructions message = '$message because of type `${typeToCode(error.type)}`'; } else { final element = error.type.element?.name; - todo = ''' + todo = + ''' To support the type `${element ?? error.type}` you can: $converterOrKeyInstructions'''; } return InvalidGenerationSourceError( - [ - '$message.', - if (error.reason != null) error.reason, - if (todo != null) todo, - ].join('\n'), + ['$message.', if (error.reason != null) error.reason, ?todo].join('\n'), element: field, ); } @@ -119,13 +118,15 @@ String genericClassArguments(ClassElement element, bool? withConstraints) { if (withConstraints == null || element.typeParameters.isEmpty) { return ''; } - final values = element.typeParameters.map((t) { - if (withConstraints && t.bound != null) { - final boundCode = typeToCode(t.bound!); - return '${t.name} extends $boundCode'; - } else { - return t.name; - } - }).join(', '); + final values = element.typeParameters + .map((t) { + if (withConstraints && t.bound != null) { + final boundCode = typeToCode(t.bound!); + return '${t.name} extends $boundCode'; + } else { + return t.name; + } + }) + .join(', '); return '<$values>'; } diff --git a/json_serializable/lib/src/json_enum_generator.dart b/json_serializable/lib/src/json_enum_generator.dart index e72657add..17fe4bd8b 100644 --- a/json_serializable/lib/src/json_enum_generator.dart +++ b/json_serializable/lib/src/json_enum_generator.dart @@ -25,11 +25,11 @@ class JsonEnumGenerator extends GeneratorForAnnotation { ); } - final value = - enumValueMapFromType(element.thisType, nullWithNoAnnotation: true); + final value = enumValueMapFromType( + element.thisType, + nullWithNoAnnotation: true, + ); - return [ - if (value != null) value, - ]; + return [?value]; } } diff --git a/json_serializable/lib/src/json_key_utils.dart b/json_serializable/lib/src/json_key_utils.dart index addccaae8..a17e45666 100644 --- a/json_serializable/lib/src/json_key_utils.dart +++ b/json_serializable/lib/src/json_key_utils.dart @@ -18,8 +18,10 @@ import 'utils.dart'; final _jsonKeyExpando = Expando>(); KeyConfig jsonKeyForField(FieldElement field, ClassConfig classAnnotation) => - (_jsonKeyExpando[field] ??= Map.identity())[classAnnotation] ??= - _from(field, classAnnotation); + (_jsonKeyExpando[field] ??= Map.identity())[classAnnotation] ??= _from( + field, + classAnnotation, + ); KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { // If an annotation exists on `element` the source is a 'real' field. @@ -82,28 +84,19 @@ KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { if (reader.isList) { return [ for (var e in reader.listValue) - literalForObject(fieldName, e, [ - ...typeInformation, - 'List', - ]) + literalForObject(fieldName, e, [...typeInformation, 'List']), ]; } if (reader.isSet) { return { for (var e in reader.setValue) - literalForObject(fieldName, e, [ - ...typeInformation, - 'Set', - ]) + literalForObject(fieldName, e, [...typeInformation, 'Set']), }; } if (reader.isMap) { - final mapTypeInformation = [ - ...typeInformation, - 'Map', - ]; + final mapTypeInformation = [...typeInformation, 'Map']; return reader.mapValue.map( (k, v) => MapEntry( literalForObject(fieldName, k!, mapTypeInformation), @@ -147,8 +140,8 @@ KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { final invokeConst = functionValue is ConstructorElement && functionValue.isConst - ? 'const ' - : ''; + ? 'const ' + : ''; return '$invokeConst${functionValue.qualifiedName}()'; } @@ -191,11 +184,15 @@ KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { ); } - final enumValueNames = - enumFields.map((p) => p.name).toList(growable: false); + final enumValueNames = enumFields + .map((p) => p.name) + .toList(growable: false); - final enumValueName = - enumValueForDartObject(objectValue, enumValueNames, (n) => n); + final enumValueName = enumValueForDartObject( + objectValue, + enumValueNames, + (n) => n, + ); return '${annotationType.element!.name}.$enumValueName'; } else { @@ -233,8 +230,9 @@ KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { String? readValueFunctionName; final readValue = obj.read('readValue'); if (!readValue.isNull) { - readValueFunctionName = - readValue.objectValue.toFunctionValue()!.qualifiedName; + readValueFunctionName = readValue.objectValue + .toFunctionValue()! + .qualifiedName; } final ignore = obj.read('ignore').literalValue as bool?; @@ -269,8 +267,10 @@ KeyConfig _from(FieldElement element, ClassConfig classAnnotation) { name: obj.read('name').literalValue as String?, readValueFunctionName: readValueFunctionName, required: obj.read('required').literalValue as bool?, - unknownEnumValue: - createAnnotationValue('unknownEnumValue', mustBeEnum: true), + unknownEnumValue: createAnnotationValue( + 'unknownEnumValue', + mustBeEnum: true, + ), includeToJson: includeToJson, includeFromJson: includeFromJson, ); @@ -292,9 +292,10 @@ KeyConfig _populateJsonKey( if (disallowNullValue == true) { if (includeIfNull == true) { throwUnsupported( - element, - 'Cannot set both `disallowNullValue` and `includeIfNull` to `true`. ' - 'This leads to incompatible `toJson` and `fromJson` behavior.'); + element, + 'Cannot set both `disallowNullValue` and `includeIfNull` to `true`. ' + 'This leads to incompatible `toJson` and `fromJson` behavior.', + ); } } @@ -302,7 +303,10 @@ KeyConfig _populateJsonKey( defaultValue: defaultValue, disallowNullValue: disallowNullValue ?? false, includeIfNull: _includeIfNull( - includeIfNull, disallowNullValue, classAnnotation.includeIfNull), + includeIfNull, + disallowNullValue, + classAnnotation.includeIfNull, + ), name: name ?? encodedFieldName(classAnnotation.fieldRename, element.name), readValueFunctionName: readValueFunctionName, required: required ?? false, @@ -335,5 +339,6 @@ bool _interfaceTypesEqual(DartType a, DartType b) { const jsonKeyNullForUndefinedEnumValueFieldName = 'JsonKey.nullForUndefinedEnumValue'; -final _nullAsUnknownChecker = - TypeChecker.fromRuntime(JsonKey.nullForUndefinedEnumValue.runtimeType); +final _nullAsUnknownChecker = TypeChecker.fromRuntime( + JsonKey.nullForUndefinedEnumValue.runtimeType, +); diff --git a/json_serializable/lib/src/json_literal_generator.dart b/json_serializable/lib/src/json_literal_generator.dart index dd6189fa2..87f0acc08 100644 --- a/json_serializable/lib/src/json_literal_generator.dart +++ b/json_serializable/lib/src/json_literal_generator.dart @@ -23,12 +23,15 @@ class JsonLiteralGenerator extends GeneratorForAnnotation { ) async { if (p.isAbsolute(annotation.read('path').stringValue)) { throw ArgumentError( - '`annotation.path` must be relative path to the source file.'); + '`annotation.path` must be relative path to the source file.', + ); } final sourcePathDir = p.dirname(buildStep.inputId.path); - final fileId = AssetId(buildStep.inputId.package, - p.join(sourcePathDir, annotation.read('path').stringValue)); + final fileId = AssetId( + buildStep.inputId.package, + p.join(sourcePathDir, annotation.read('path').stringValue), + ); final content = json.decode(await buildStep.readAsString(fileId)); final asConst = annotation.read('asConst').boolValue; diff --git a/json_serializable/lib/src/json_part_builder.dart b/json_serializable/lib/src/json_part_builder.dart index a5013f8d6..53ad3f039 100644 --- a/json_serializable/lib/src/json_part_builder.dart +++ b/json_serializable/lib/src/json_part_builder.dart @@ -57,12 +57,16 @@ class _UnifiedGenerator extends Generator { final values = {}; for (var generator in _generators) { - for (var annotatedElement - in library.annotatedWith(generator.typeChecker)) { + for (var annotatedElement in library.annotatedWith( + generator.typeChecker, + )) { await pubspecHasRightVersion(buildStep); final generatedValue = generator.generateForAnnotatedElement( - annotatedElement.element, annotatedElement.annotation, buildStep); + annotatedElement.element, + annotatedElement.annotation, + buildStep, + ); for (var value in _normalizeGeneratorOutput(generatedValue)) { assert(value.length == value.trim().length); values.add(value); @@ -86,21 +90,25 @@ Iterable _normalizeGeneratorOutput(Object? value) { } if (value is Iterable) { - return value.where((e) => e != null).map((e) { - if (e is String) { - return e.trim(); - } - - throw _argError(e as Object); - }).where((e) => e.isNotEmpty); + return value + .where((e) => e != null) + .map((e) { + if (e is String) { + return e.trim(); + } + + throw _argError(e as Object); + }) + .where((e) => e.isNotEmpty); } throw _argError(value); } // Borrowed from `package:source_gen` ArgumentError _argError(Object value) => ArgumentError( - 'Must be a String or be an Iterable containing String values. ' - 'Found `${Error.safeToString(value)}` (${value.runtimeType}).'); + 'Must be a String or be an Iterable containing String values. ' + 'Found `${Error.safeToString(value)}` (${value.runtimeType}).', +); String defaultFormatOutput(String code, Version languageVersion) => DartFormatter(languageVersion: languageVersion).format(code); diff --git a/json_serializable/lib/src/json_serializable_generator.dart b/json_serializable/lib/src/json_serializable_generator.dart index 2ff7b6dbf..c69e86796 100644 --- a/json_serializable/lib/src/json_serializable_generator.dart +++ b/json_serializable/lib/src/json_serializable_generator.dart @@ -32,11 +32,9 @@ class JsonSerializableGenerator factory JsonSerializableGenerator({ JsonSerializable? config, List? typeHelpers, - }) => - JsonSerializableGenerator.fromSettings(Settings( - config: config, - typeHelpers: typeHelpers, - )); + }) => JsonSerializableGenerator.fromSettings( + Settings(config: config, typeHelpers: typeHelpers), + ); /// Creates an instance of [JsonSerializableGenerator]. /// @@ -47,13 +45,12 @@ class JsonSerializableGenerator factory JsonSerializableGenerator.withDefaultHelpers( Iterable typeHelpers, { JsonSerializable? config, - }) => - JsonSerializableGenerator( - config: config, - typeHelpers: List.unmodifiable( - typeHelpers.followedBy(Settings.defaultHelpers), - ), - ); + }) => JsonSerializableGenerator( + config: config, + typeHelpers: List.unmodifiable( + typeHelpers.followedBy(Settings.defaultHelpers), + ), + ); @override Iterable generateForAnnotatedElement( diff --git a/json_serializable/lib/src/lambda_result.dart b/json_serializable/lib/src/lambda_result.dart index c5aa510ff..9cc95e998 100644 --- a/json_serializable/lib/src/lambda_result.dart +++ b/json_serializable/lib/src/lambda_result.dart @@ -30,8 +30,8 @@ class LambdaResult { static String process(Object subField) => (subField is LambdaResult && closureArg == subField._fullExpression) - ? subField.lambda - : '($closureArg) => $subField'; + ? subField.lambda + : '($closureArg) => $subField'; } String _cast(String expression, DartType targetType) { diff --git a/json_serializable/lib/src/settings.dart b/json_serializable/lib/src/settings.dart index 62d35a93c..e996f99a3 100644 --- a/json_serializable/lib/src/settings.dart +++ b/json_serializable/lib/src/settings.dart @@ -40,10 +40,10 @@ class Settings { final List _typeHelpers; Iterable get allHelpers => const [ - ConvertHelper(), - JsonConverterHelper(), - GenericFactoryHelper(), - ].followedBy(_typeHelpers).followedBy(_coreHelpers); + ConvertHelper(), + JsonConverterHelper(), + GenericFactoryHelper(), + ].followedBy(_typeHelpers).followedBy(_coreHelpers); final ClassConfig config; @@ -52,13 +52,11 @@ class Settings { /// If [typeHelpers] is not provided, the built-in helpers are used: /// [BigIntHelper], [DateTimeHelper], [DurationHelper], [JsonHelper], and /// [UriHelper]. - Settings({ - JsonSerializable? config, - List? typeHelpers, - }) : config = config != null - ? ClassConfig.fromJsonSerializable(config) - : ClassConfig.defaults, - _typeHelpers = typeHelpers ?? defaultHelpers; + Settings({JsonSerializable? config, List? typeHelpers}) + : config = config != null + ? ClassConfig.fromJsonSerializable(config) + : ClassConfig.defaults, + _typeHelpers = typeHelpers ?? defaultHelpers; /// Creates an instance of [Settings]. /// @@ -69,9 +67,8 @@ class Settings { factory Settings.withDefaultHelpers( Iterable typeHelpers, { JsonSerializable? config, - }) => - Settings( - config: config, - typeHelpers: List.unmodifiable(typeHelpers.followedBy(defaultHelpers)), - ); + }) => Settings( + config: config, + typeHelpers: List.unmodifiable(typeHelpers.followedBy(defaultHelpers)), + ); } diff --git a/json_serializable/lib/src/shared_checkers.dart b/json_serializable/lib/src/shared_checkers.dart index d2da8dbe8..0ac8b8d79 100644 --- a/json_serializable/lib/src/shared_checkers.dart +++ b/json_serializable/lib/src/shared_checkers.dart @@ -23,5 +23,5 @@ DartType coreIterableGenericType(DartType type) => const simpleJsonTypeChecker = TypeChecker.any([ coreStringTypeChecker, TypeChecker.fromUrl('dart:core#bool'), - TypeChecker.fromUrl('dart:core#num') + TypeChecker.fromUrl('dart:core#num'), ]); diff --git a/json_serializable/lib/src/type_helper_ctx.dart b/json_serializable/lib/src/type_helper_ctx.dart index b49008504..f6d355b15 100644 --- a/json_serializable/lib/src/type_helper_ctx.dart +++ b/json_serializable/lib/src/type_helper_ctx.dart @@ -18,8 +18,7 @@ import 'utils.dart'; TypeHelperCtx typeHelperContext( HelperCore helperCore, FieldElement fieldElement, -) => - TypeHelperCtx._(helperCore, fieldElement); +) => TypeHelperCtx._(helperCore, fieldElement); class TypeHelperCtx implements TypeHelperContextWithConfig, TypeHelperContextWithConvert { @@ -51,10 +50,10 @@ class TypeHelperCtx @override Object? serialize(DartType targetType, String expression) => _run( - targetType, - expression, - (TypeHelper th) => th.serialize(targetType, expression, this), - ); + targetType, + expression, + (TypeHelper th) => th.serialize(targetType, expression, this), + ); @override Object deserialize( @@ -65,12 +64,8 @@ class TypeHelperCtx final value = _run( targetType, expression, - (TypeHelper th) => th.deserialize( - targetType, - expression, - this, - defaultValue != null, - ), + (TypeHelper th) => + th.deserialize(targetType, expression, this, defaultValue != null), ); return DefaultContainer.deserialize( @@ -85,10 +80,14 @@ class TypeHelperCtx String expression, Object? Function(TypeHelper) invoke, ) => - _helperCore.allTypeHelpers.map(invoke).firstWhere( - (r) => r != null, - orElse: () => throw UnsupportedTypeError(targetType, expression), - ) as Object; + _helperCore.allTypeHelpers + .map(invoke) + .firstWhere( + (r) => r != null, + orElse: () => + throw UnsupportedTypeError(targetType, expression), + ) + as Object; } class _ConvertPair { @@ -130,16 +129,18 @@ ConvertData? _convertData(DartObject obj, FieldElement element, bool isFrom) { executableElement.parameters.first.isNamed || executableElement.parameters.where((pe) => !pe.isOptional).length > 1) { throwUnsupported( - element, - 'The `$paramName` function `${executableElement.name}` must have one ' - 'positional parameter.'); + element, + 'The `$paramName` function `${executableElement.name}` must have one ' + 'positional parameter.', + ); } final returnType = executableElement.returnType; final argType = executableElement.parameters.first.type; if (isFrom) { - final hasDefaultValue = - !jsonKeyAnnotation(element).read('defaultValue').isNull; + final hasDefaultValue = !jsonKeyAnnotation( + element, + ).read('defaultValue').isNull; if (returnType is TypeParameterType) { // We keep things simple in this case. We rely on inferred type arguments @@ -153,10 +154,11 @@ ConvertData? _convertData(DartObject obj, FieldElement element, bool isFrom) { final returnTypeCode = typeToCode(returnType); final elementTypeCode = typeToCode(element.type); throwUnsupported( - element, - 'The `$paramName` function `${executableElement.name}` return type ' - '`$returnTypeCode` is not compatible with field type ' - '`$elementTypeCode`.'); + element, + 'The `$paramName` function `${executableElement.name}` return type ' + '`$returnTypeCode` is not compatible with field type ' + '`$elementTypeCode`.', + ); } } } else { @@ -168,10 +170,11 @@ ConvertData? _convertData(DartObject obj, FieldElement element, bool isFrom) { final argTypeCode = typeToCode(argType); final elementTypeCode = typeToCode(element.type); throwUnsupported( - element, - 'The `$paramName` function `${executableElement.name}` argument type ' - '`$argTypeCode` is not compatible with field type' - ' `$elementTypeCode`.'); + element, + 'The `$paramName` function `${executableElement.name}` argument type ' + '`$argTypeCode` is not compatible with field type' + ' `$elementTypeCode`.', + ); } } diff --git a/json_serializable/lib/src/type_helpers/big_int_helper.dart b/json_serializable/lib/src/type_helpers/big_int_helper.dart index 3c5c4316d..b2634730f 100644 --- a/json_serializable/lib/src/type_helpers/big_int_helper.dart +++ b/json_serializable/lib/src/type_helpers/big_int_helper.dart @@ -18,11 +18,7 @@ class BigIntHelper extends TypeHelper { String expression, TypeHelperContext context, ) => - bigIntString.serialize( - targetType, - expression, - targetType.isNullableType, - ); + bigIntString.serialize(targetType, expression, targetType.isNullableType); @override DefaultContainer? deserialize( @@ -30,11 +26,10 @@ class BigIntHelper extends TypeHelper { String expression, TypeHelperContext context, bool defaultProvided, - ) => - bigIntString.deserialize( - targetType, - expression, - targetType.isNullableType, - false, - ); + ) => bigIntString.deserialize( + targetType, + expression, + targetType.isNullableType, + false, + ); } diff --git a/json_serializable/lib/src/type_helpers/config_types.dart b/json_serializable/lib/src/type_helpers/config_types.dart index 227f1890b..80d258589 100644 --- a/json_serializable/lib/src/type_helpers/config_types.dart +++ b/json_serializable/lib/src/type_helpers/config_types.dart @@ -89,7 +89,8 @@ class ClassConfig { config.createFieldMap ?? ClassConfig.defaults.createFieldMap, createJsonKeys: config.createJsonKeys ?? ClassConfig.defaults.createJsonKeys, - createPerFieldToJson: config.createPerFieldToJson ?? + createPerFieldToJson: + config.createPerFieldToJson ?? ClassConfig.defaults.createPerFieldToJson, createFactory: config.createFactory ?? ClassConfig.defaults.createFactory, @@ -100,10 +101,12 @@ class ClassConfig { config.explicitToJson ?? ClassConfig.defaults.explicitToJson, includeIfNull: config.includeIfNull ?? ClassConfig.defaults.includeIfNull, - genericArgumentFactories: config.genericArgumentFactories ?? + genericArgumentFactories: + config.genericArgumentFactories ?? ClassConfig.defaults.genericArgumentFactories, fieldRename: config.fieldRename ?? ClassConfig.defaults.fieldRename, - disallowUnrecognizedKeys: config.disallowUnrecognizedKeys ?? + disallowUnrecognizedKeys: + config.disallowUnrecognizedKeys ?? ClassConfig.defaults.disallowUnrecognizedKeys, // TODO typeConverters = [] ); @@ -128,20 +131,20 @@ class ClassConfig { ); JsonSerializable toJsonSerializable() => JsonSerializable( - checked: checked, - anyMap: anyMap, - constructor: constructor, - createFactory: createFactory, - createToJson: createToJson, - createFieldMap: createFieldMap, - createJsonKeys: createJsonKeys, - createPerFieldToJson: createPerFieldToJson, - ignoreUnannotated: ignoreUnannotated, - explicitToJson: explicitToJson, - includeIfNull: includeIfNull, - genericArgumentFactories: genericArgumentFactories, - fieldRename: fieldRename, - disallowUnrecognizedKeys: disallowUnrecognizedKeys, - // TODO typeConverters = [] - ); + checked: checked, + anyMap: anyMap, + constructor: constructor, + createFactory: createFactory, + createToJson: createToJson, + createFieldMap: createFieldMap, + createJsonKeys: createJsonKeys, + createPerFieldToJson: createPerFieldToJson, + ignoreUnannotated: ignoreUnannotated, + explicitToJson: explicitToJson, + includeIfNull: includeIfNull, + genericArgumentFactories: genericArgumentFactories, + fieldRename: fieldRename, + disallowUnrecognizedKeys: disallowUnrecognizedKeys, + // TODO typeConverters = [] + ); } diff --git a/json_serializable/lib/src/type_helpers/convert_helper.dart b/json_serializable/lib/src/type_helpers/convert_helper.dart index 6657a9e60..45e969431 100644 --- a/json_serializable/lib/src/type_helpers/convert_helper.dart +++ b/json_serializable/lib/src/type_helpers/convert_helper.dart @@ -39,8 +39,10 @@ class ConvertHelper extends TypeHelper { return null; } - assert(toJsonData.paramType is TypeParameterType || - targetType.isAssignableTo(toJsonData.paramType)); + assert( + toJsonData.paramType is TypeParameterType || + targetType.isAssignableTo(toJsonData.paramType), + ); return LambdaResult(expression, toJsonData.name); } diff --git a/json_serializable/lib/src/type_helpers/date_time_helper.dart b/json_serializable/lib/src/type_helpers/date_time_helper.dart index 89a526013..64c582057 100644 --- a/json_serializable/lib/src/type_helpers/date_time_helper.dart +++ b/json_serializable/lib/src/type_helpers/date_time_helper.dart @@ -17,12 +17,11 @@ class DateTimeHelper extends TypeHelper { DartType targetType, String expression, TypeHelperContext context, - ) => - dateTimeString.serialize( - targetType, - expression, - targetType.isNullableType, - ); + ) => dateTimeString.serialize( + targetType, + expression, + targetType.isNullableType, + ); @override DefaultContainer? deserialize( @@ -30,11 +29,10 @@ class DateTimeHelper extends TypeHelper { String expression, TypeHelperContext context, bool defaultProvided, - ) => - dateTimeString.deserialize( - targetType, - expression, - targetType.isNullableType, - false, - ); + ) => dateTimeString.deserialize( + targetType, + expression, + targetType.isNullableType, + false, + ); } diff --git a/json_serializable/lib/src/type_helpers/generic_factory_helper.dart b/json_serializable/lib/src/type_helpers/generic_factory_helper.dart index 6a005f4c6..5d2900998 100644 --- a/json_serializable/lib/src/type_helpers/generic_factory_helper.dart +++ b/json_serializable/lib/src/type_helpers/generic_factory_helper.dart @@ -57,7 +57,8 @@ class GenericFactoryHelper extends TypeHelper { const _fromJsonHelperName = r'_$nullableGenericFromJson'; -const _fromJsonHelper = ''' +const _fromJsonHelper = + ''' T? $_fromJsonHelperName( Object? input, T Function(Object? json) fromJson, @@ -67,7 +68,8 @@ T? $_fromJsonHelperName( const _toJsonHelperName = r'_$nullableGenericToJson'; -const _toJsonHelper = ''' +const _toJsonHelper = + ''' Object? $_toJsonHelperName( T? input, Object? Function(T value) toJson, diff --git a/json_serializable/lib/src/type_helpers/json_converter_helper.dart b/json_serializable/lib/src/type_helpers/json_converter_helper.dart index 20ec0fc25..778ffeeae 100644 --- a/json_serializable/lib/src/type_helpers/json_converter_helper.dart +++ b/json_serializable/lib/src/type_helpers/json_converter_helper.dart @@ -116,8 +116,8 @@ class _JsonConvertData { String accessor, this.jsonType, this.fieldType, - ) : accessString = 'const $className${_withAccessor(accessor)}()', - isGeneric = false; + ) : accessString = 'const $className${_withAccessor(accessor)}()', + isGeneric = false; _JsonConvertData.genericClass( String className, @@ -125,9 +125,8 @@ class _JsonConvertData { String accessor, this.jsonType, this.fieldType, - ) : accessString = - '$className<$genericTypeArg>${_withAccessor(accessor)}()', - isGeneric = true; + ) : accessString = '$className<$genericTypeArg>${_withAccessor(accessor)}()', + isGeneric = true; _JsonConvertData.propertyAccess( this.accessString, @@ -175,8 +174,9 @@ _JsonConvertData? _typeConverter( var matchingAnnotations = converterMatches(ctx.fieldElement.metadata); if (matchingAnnotations.isEmpty) { - matchingAnnotations = - converterMatches(ctx.fieldElement.getter?.metadata ?? []); + matchingAnnotations = converterMatches( + ctx.fieldElement.getter?.metadata ?? [], + ); if (matchingAnnotations.isEmpty) { matchingAnnotations = converterMatches(ctx.classElement.metadata); @@ -280,9 +280,7 @@ _ConverterMatch? _compatibleMatch( final converterClassElement = constantValue.type!.element as ClassElement; final jsonConverterSuper = converterClassElement.allSupertypes - .where( - (e) => _jsonConverterChecker.isExactly(e.element), - ) + .where((e) => _jsonConverterChecker.isExactly(e.element)) .singleOrNull; if (jsonConverterSuper == null) { @@ -310,10 +308,11 @@ _ConverterMatch? _compatibleMatch( assert(converterClassElement.typeParameters.isNotEmpty); if (converterClassElement.typeParameters.length > 1) { throw InvalidGenerationSourceError( - '`JsonConverter` implementations can have no more than one type ' - 'argument. `${converterClassElement.name}` has ' - '${converterClassElement.typeParameters.length}.', - element: converterClassElement); + '`JsonConverter` implementations can have no more than one type ' + 'argument. `${converterClassElement.name}` has ' + '${converterClassElement.typeParameters.length}.', + element: converterClassElement, + ); } return _ConverterMatch( diff --git a/json_serializable/lib/src/type_helpers/json_helper.dart b/json_serializable/lib/src/type_helpers/json_helper.dart index d66ab772e..c2121ac80 100644 --- a/json_serializable/lib/src/type_helpers/json_helper.dart +++ b/json_serializable/lib/src/type_helpers/json_helper.dart @@ -154,8 +154,9 @@ List _helperParams( final args = []; for (var helperArg in rest) { - final typeParamIndex = - type.element.typeParameters.indexOf(helperArg.element); + final typeParamIndex = type.element.typeParameters.indexOf( + helperArg.element, + ); // TODO: throw here if `typeParamIndex` is -1 ? final typeArg = type.typeArguments[typeParamIndex]; @@ -166,10 +167,7 @@ List _helperParams( return args; } -TypeParameterType _decodeHelper( - ParameterElement param, - Element targetElement, -) { +TypeParameterType _decodeHelper(ParameterElement param, Element targetElement) { final type = param.type; if (type is FunctionType && @@ -197,10 +195,7 @@ TypeParameterType _decodeHelper( ); } -TypeParameterType _encodeHelper( - ParameterElement param, - Element targetElement, -) { +TypeParameterType _encodeHelper(ParameterElement param, Element targetElement) { final type = param.type; if (type is FunctionType && @@ -249,8 +244,9 @@ InterfaceType? _instantiate( ) { final argTypes = ctorParamType.typeArguments.map((arg) { final typeParamIndex = classType.element.typeParameters.indexWhere( - // TODO: not 100% sure `nullabilitySuffix` is right - (e) => e.instantiate(nullabilitySuffix: arg.nullabilitySuffix) == arg); + // TODO: not 100% sure `nullabilitySuffix` is right + (e) => e.instantiate(nullabilitySuffix: arg.nullabilitySuffix) == arg, + ); if (typeParamIndex >= 0) { return classType.typeArguments[typeParamIndex]; } else { @@ -274,9 +270,9 @@ ClassConfig? _annotation(ClassConfig config, InterfaceType source) { if (source.isEnum) { return null; } - final annotations = const TypeChecker.fromRuntime(JsonSerializable) - .annotationsOfExact(source.element, throwOnUnresolved: false) - .toList(); + final annotations = const TypeChecker.fromRuntime( + JsonSerializable, + ).annotationsOfExact(source.element, throwOnUnresolved: false).toList(); if (annotations.isEmpty) { return null; diff --git a/json_serializable/lib/src/type_helpers/map_helper.dart b/json_serializable/lib/src/type_helpers/map_helper.dart index e0c6ef560..9792faed0 100644 --- a/json_serializable/lib/src/type_helpers/map_helper.dart +++ b/json_serializable/lib/src/type_helpers/map_helper.dart @@ -36,7 +36,7 @@ class MapHelper extends TypeHelper { final subFieldValue = context.serialize(valueType, closureArg); final subKeyValue = _forType(keyType)?.serialize(keyType, _keyParam, false) ?? - context.serialize(keyType, _keyParam); + context.serialize(keyType, _keyParam); if (closureArg == subFieldValue && _keyParam == subKeyValue) { return expression; @@ -67,7 +67,8 @@ class MapHelper extends TypeHelper { _checkSafeKeyType(expression, keyArg); - final valueArgIsAny = valueArg is DynamicType || + final valueArgIsAny = + valueArg is DynamicType || (valueArg.isDartCoreObject && valueArg.isNullableType); final isKeyStringable = _isKeyStringable(keyArg); @@ -125,8 +126,9 @@ class MapHelper extends TypeHelper { final toFromString = _forType(keyArg); if (toFromString != null) { - keyUsage = - toFromString.deserialize(keyArg, keyUsage, false, true).toString(); + keyUsage = toFromString + .deserialize(keyArg, keyUsage, false, true) + .toString(); } return '($expression $mapCast)$optionalQuestion.map( ' @@ -138,12 +140,7 @@ final _intString = ToFromStringHelper('int.parse', 'toString()', 'int'); /// [ToFromStringHelper] instances representing non-String types that can /// be used as [Map] keys. -final _instances = [ - bigIntString, - dateTimeString, - _intString, - uriString, -]; +final _instances = [bigIntString, dateTimeString, _intString, uriString]; ToFromStringHelper? _forType(DartType type) => _instances.where((i) => i.matches(type)).singleOrNull; @@ -176,12 +173,12 @@ void _checkSafeKeyType(String expression, DartType keyArg) { /// Used in [_checkSafeKeyType] to provide a helpful error with unsupported /// types. List get allowedMapKeyTypes => [ - 'Object', - 'dynamic', - 'enum', - 'String', - ..._instances.map((i) => i.coreTypeName) - ]; + 'Object', + 'dynamic', + 'enum', + 'String', + ..._instances.map((i) => i.coreTypeName), +]; extension on DartType { bool get isSimpleJsonTypeNotDouble => diff --git a/json_serializable/lib/src/type_helpers/record_helper.dart b/json_serializable/lib/src/type_helpers/record_helper.dart index 42b13025e..8d0fab4df 100644 --- a/json_serializable/lib/src/type_helpers/record_helper.dart +++ b/json_serializable/lib/src/type_helpers/record_helper.dart @@ -23,9 +23,7 @@ class RecordHelper extends TypeHelper { var index = 1; for (var field in targetType.positionalFields) { final indexer = escapeDartString('\$$index'); - items.add( - context.deserialize(field.type, '$paramName[$indexer]')!, - ); + items.add(context.deserialize(field.type, '$paramName[$indexer]')!); index++; } for (var field in targetType.namedFields) { @@ -42,7 +40,9 @@ class RecordHelper extends TypeHelper { context.addMember( _recordConvertImpl( - nullable: targetType.isNullableType, anyMap: context.config.anyMap), + nullable: targetType.isNullableType, + anyMap: context.config.anyMap, + ), ); final recordLiteral = '(${items.map((e) => '$e,').join()})'; @@ -82,22 +82,17 @@ $helperName( } for (var field in targetType.namedFields) { final indexer = escapeDartString(field.name); - items.add( - '$indexer:${context.serialize( - field.type, - '$expression$maybeBang.${field.name}', - )!}', - ); + final key = context.serialize( + field.type, + '$expression$maybeBang.${field.name}', + )!; + items.add('$indexer:$key'); } final mapValue = '{${items.map((e) => '$e,').join()}}'; return targetType.isNullableType - ? ifNullOrElse( - expression, - 'null', - mapValue, - ) + ? ifNullOrElse(expression, 'null', mapValue) : mapValue; } } diff --git a/json_serializable/lib/src/type_helpers/to_from_string.dart b/json_serializable/lib/src/type_helpers/to_from_string.dart index 5c6174ad0..cb9a30d71 100644 --- a/json_serializable/lib/src/type_helpers/to_from_string.dart +++ b/json_serializable/lib/src/type_helpers/to_from_string.dart @@ -7,11 +7,7 @@ import 'package:source_gen/source_gen.dart'; import '../default_container.dart'; -final bigIntString = ToFromStringHelper( - 'BigInt.parse', - 'toString()', - 'BigInt', -); +final bigIntString = ToFromStringHelper('BigInt.parse', 'toString()', 'BigInt'); final dateTimeString = ToFromStringHelper( 'DateTime.parse', @@ -19,11 +15,7 @@ final dateTimeString = ToFromStringHelper( 'DateTime', ); -final uriString = ToFromStringHelper( - 'Uri.parse', - 'toString()', - 'Uri', -); +final uriString = ToFromStringHelper('Uri.parse', 'toString()', 'Uri'); /// Package-internal helper that unifies implementations of [Type]s that convert /// trivially to-from [String]. @@ -44,15 +36,11 @@ class ToFromStringHelper { final TypeChecker _checker; ToFromStringHelper(this._parse, this._toString, this.coreTypeName) - : _checker = TypeChecker.fromUrl('dart:core#$coreTypeName'); + : _checker = TypeChecker.fromUrl('dart:core#$coreTypeName'); bool matches(DartType type) => _checker.isExactlyType(type); - String? serialize( - DartType type, - String expression, - bool nullable, - ) { + String? serialize(DartType type, String expression, bool nullable) { if (!matches(type)) { return null; } @@ -78,9 +66,6 @@ class ToFromStringHelper { final output = '$_parse($parseParam)'; - return DefaultContainer( - expression, - output, - ); + return DefaultContainer(expression, output); } } diff --git a/json_serializable/lib/src/type_helpers/uri_helper.dart b/json_serializable/lib/src/type_helpers/uri_helper.dart index 49dea856a..6c482f21e 100644 --- a/json_serializable/lib/src/type_helpers/uri_helper.dart +++ b/json_serializable/lib/src/type_helpers/uri_helper.dart @@ -17,12 +17,7 @@ class UriHelper extends TypeHelper { DartType targetType, String expression, TypeHelperContext context, - ) => - uriString.serialize( - targetType, - expression, - targetType.isNullableType, - ); + ) => uriString.serialize(targetType, expression, targetType.isNullableType); @override DefaultContainer? deserialize( @@ -30,7 +25,10 @@ class UriHelper extends TypeHelper { String expression, TypeHelperContext context, bool defaultProvided, - ) => - uriString.deserialize( - targetType, expression, targetType.isNullableType, false); + ) => uriString.deserialize( + targetType, + expression, + targetType.isNullableType, + false, + ); } diff --git a/json_serializable/lib/src/type_helpers/value_helper.dart b/json_serializable/lib/src/type_helpers/value_helper.dart index d9f8411db..0ed4d1923 100644 --- a/json_serializable/lib/src/type_helpers/value_helper.dart +++ b/json_serializable/lib/src/type_helpers/value_helper.dart @@ -34,7 +34,9 @@ class ValueHelper extends TypeHelper { String expression, TypeHelperContext context, bool defaultProvided, - ) => - defaultDecodeLogic(targetType, expression, - defaultProvided: defaultProvided); + ) => defaultDecodeLogic( + targetType, + expression, + defaultProvided: defaultProvided, + ); } diff --git a/json_serializable/lib/src/utils.dart b/json_serializable/lib/src/utils.dart index 4d346b41e..9f1d34bc7 100644 --- a/json_serializable/lib/src/utils.dart +++ b/json_serializable/lib/src/utils.dart @@ -35,42 +35,37 @@ Never throwUnsupported(FieldElement element, String message) => T? readEnum(ConstantReader reader, List values) => reader.isNull - ? null - : enumValueForDartObject( - reader.objectValue, - values, - (f) => f.name, - ); + ? null + : enumValueForDartObject(reader.objectValue, values, (f) => f.name); T enumValueForDartObject( DartObject source, List items, String Function(T) name, -) => - items[source.getField('index')!.toIntValue()!]; +) => items[source.getField('index')!.toIntValue()!]; /// Return an instance of [JsonSerializable] corresponding to the provided /// [reader]. // #CHANGE WHEN UPDATING json_annotation JsonSerializable _valueForAnnotation(ConstantReader reader) => JsonSerializable( - anyMap: reader.read('anyMap').literalValue as bool?, - checked: reader.read('checked').literalValue as bool?, - constructor: reader.read('constructor').literalValue as String?, - createFactory: reader.read('createFactory').literalValue as bool?, - createToJson: reader.read('createToJson').literalValue as bool?, - createFieldMap: reader.read('createFieldMap').literalValue as bool?, - createJsonKeys: reader.read('createJsonKeys').literalValue as bool?, - createPerFieldToJson: - reader.read('createPerFieldToJson').literalValue as bool?, - disallowUnrecognizedKeys: - reader.read('disallowUnrecognizedKeys').literalValue as bool?, - explicitToJson: reader.read('explicitToJson').literalValue as bool?, - fieldRename: readEnum(reader.read('fieldRename'), FieldRename.values), - genericArgumentFactories: - reader.read('genericArgumentFactories').literalValue as bool?, - ignoreUnannotated: reader.read('ignoreUnannotated').literalValue as bool?, - includeIfNull: reader.read('includeIfNull').literalValue as bool?, - ); + anyMap: reader.read('anyMap').literalValue as bool?, + checked: reader.read('checked').literalValue as bool?, + constructor: reader.read('constructor').literalValue as String?, + createFactory: reader.read('createFactory').literalValue as bool?, + createToJson: reader.read('createToJson').literalValue as bool?, + createFieldMap: reader.read('createFieldMap').literalValue as bool?, + createJsonKeys: reader.read('createJsonKeys').literalValue as bool?, + createPerFieldToJson: + reader.read('createPerFieldToJson').literalValue as bool?, + disallowUnrecognizedKeys: + reader.read('disallowUnrecognizedKeys').literalValue as bool?, + explicitToJson: reader.read('explicitToJson').literalValue as bool?, + fieldRename: readEnum(reader.read('fieldRename'), FieldRename.values), + genericArgumentFactories: + reader.read('genericArgumentFactories').literalValue as bool?, + ignoreUnannotated: reader.read('ignoreUnannotated').literalValue as bool?, + includeIfNull: reader.read('includeIfNull').literalValue as bool?, +); /// Returns a [ClassConfig] with values from the [JsonSerializable] /// instance represented by [reader]. @@ -90,14 +85,18 @@ ClassConfig mergeConfig( assert(config.ctorParamDefaults.isEmpty); final constructor = annotation.constructor ?? config.constructor; - final constructorInstance = - _constructorByNameOrNull(classElement, constructor); + final constructorInstance = _constructorByNameOrNull( + classElement, + constructor, + ); final paramDefaultValueMap = constructorInstance == null ? {} - : Map.fromEntries(constructorInstance.parameters - .where((element) => element.hasDefaultValue) - .map((e) => MapEntry(e.name, e.defaultValueCode!))); + : Map.fromEntries( + constructorInstance.parameters + .where((element) => element.hasDefaultValue) + .map((e) => MapEntry(e.name, e.defaultValueCode!)), + ); final converters = reader.read('converters'); @@ -115,7 +114,8 @@ ClassConfig mergeConfig( annotation.disallowUnrecognizedKeys ?? config.disallowUnrecognizedKeys, explicitToJson: annotation.explicitToJson ?? config.explicitToJson, fieldRename: annotation.fieldRename ?? config.fieldRename, - genericArgumentFactories: annotation.genericArgumentFactories ?? + genericArgumentFactories: + annotation.genericArgumentFactories ?? (classElement.typeParameters.isNotEmpty && config.genericArgumentFactories), ignoreUnannotated: annotation.ignoreUnannotated ?? config.ignoreUnannotated, @@ -187,16 +187,13 @@ extension DartTypeExtension on DartType { String ifNullOrElse(String test, String ifNull, String ifNotNull) => '$test == null ? $ifNull : $ifNotNull'; -String encodedFieldName( - FieldRename fieldRename, - String declaredName, -) => +String encodedFieldName(FieldRename fieldRename, String declaredName) => switch (fieldRename) { FieldRename.none => declaredName, FieldRename.snake => declaredName.snake, FieldRename.screamingSnake => declaredName.snake.toUpperCase(), FieldRename.kebab => declaredName.kebab, - FieldRename.pascal => declaredName.pascal + FieldRename.pascal => declaredName.pascal, }; /// Return the Dart code presentation for the given [type]. @@ -205,10 +202,7 @@ String encodedFieldName( /// types and locations of these files in code. Specifically, it supports /// only [InterfaceType]s, with optional type arguments that are also should /// be [InterfaceType]s. -String typeToCode( - DartType type, { - bool forceNullable = false, -}) { +String typeToCode(DartType type, {bool forceNullable = false}) { if (type is DynamicType) { return 'dynamic'; } else if (type is InterfaceType) { @@ -273,8 +267,6 @@ extension ExecutableElementExtension on ExecutableElement { return '${enclosingElement3.name}.$name'; } - throw UnsupportedError( - 'Not sure how to support typeof $runtimeType', - ); + throw UnsupportedError('Not sure how to support typeof $runtimeType'); } } diff --git a/json_serializable/pubspec.yaml b/json_serializable/pubspec.yaml index 10e7ec8aa..ec6022f17 100644 --- a/json_serializable/pubspec.yaml +++ b/json_serializable/pubspec.yaml @@ -5,7 +5,7 @@ description: >- Dart classes. repository: https://github.com/google/json_serializable.dart/tree/master/json_serializable environment: - sdk: ^3.6.0 + sdk: ^3.8.0 topics: - json - build-runner diff --git a/json_serializable/test/annotation_version_test.dart b/json_serializable/test/annotation_version_test.dart index 607634ee1..7084abd28 100644 --- a/json_serializable/test/annotation_version_test.dart +++ b/json_serializable/test/annotation_version_test.dart @@ -36,7 +36,8 @@ void main() { await _structurePackage( environment: const {'sdk': '^$sdkLowerBound'}, dependencies: {'json_annotation': _annotationLowerBound}, - message: ''' + message: + ''' The language version ($sdkLowerBound) of this package ($_testPkgName) does not match the required range `$supportedLanguageConstraint`. Edit pubspec.yaml to include an SDK constraint of at least $supportedLanguageConstraint. @@ -58,9 +59,7 @@ environment: test( 'missing dependency in production code', - () => _structurePackage( - message: _missingProductionDep, - ), + () => _structurePackage(message: _missingProductionDep), ); test( @@ -126,7 +125,7 @@ String _fixPath(String path) { final _jsonSerialPathDependencyOverrides = { for (var entry in _jsonSerialPubspec.dependencyOverrides.entries) if (entry.value is PathDependency) - entry.key: {'path': _fixPath((entry.value as PathDependency).path)} + entry.key: {'path': _fixPath((entry.value as PathDependency).path)}, }; final _annotationLowerBound = requiredJsonAnnotationMinVersion.toString(); @@ -145,53 +144,42 @@ Future _structurePackage({ Map dependencies = const {}, Map devDependencies = const {}, }) async { - final pubspec = loudEncode( - { - 'name': _testPkgName, - 'environment': environment, - 'dependencies': dependencies, - 'dev_dependencies': { - ...devDependencies, - 'build_runner': 'any', - 'json_serializable': {'path': p.current}, - }, - 'dependency_overrides': _jsonSerialPathDependencyOverrides, + final pubspec = loudEncode({ + 'name': _testPkgName, + 'environment': environment, + 'dependencies': dependencies, + 'dev_dependencies': { + ...devDependencies, + 'build_runner': 'any', + 'json_serializable': {'path': p.current}, }, - ); + 'dependency_overrides': _jsonSerialPathDependencyOverrides, + }); await d.file('pubspec.yaml', pubspec).create(); /// A file in the lib directory without JsonSerializable should do nothing! - await d.dir( - 'lib', - [ - d.file('no_op.dart', ''' + await d.dir('lib', [ + d.file('no_op.dart', ''' class NoOp {} -''') - ], - ).create(); - - await d.dir( - sourceDirectory, - [ - d.file( - 'sample.dart', - ''' +'''), + ]).create(); + + await d.dir(sourceDirectory, [ + d.file('sample.dart', ''' import 'package:json_annotation/json_annotation.dart'; part 'sample.g.dart'; @JsonSerializable() class SomeClass{} -''', - ) - ], - ).create(); - final proc = await TestProcess.start( - Platform.resolvedExecutable, - ['run', 'build_runner', 'build'], - workingDirectory: d.sandbox, - ); +'''), + ]).create(); + final proc = await TestProcess.start(Platform.resolvedExecutable, [ + 'run', + 'build_runner', + 'build', + ], workingDirectory: d.sandbox); final lines = StringBuffer(); await for (var line in proc.stdoutStream()) { @@ -211,9 +199,12 @@ class SomeClass{} ); if (message != null) { - expect(output, contains(''' + expect( + output, + contains(''' [WARNING] json_serializable on $sourceDirectory/sample.dart: -$message''')); +$message'''), + ); } await proc.shouldExit(0); diff --git a/json_serializable/test/config_test.dart b/json_serializable/test/config_test.dart index 318697f54..b29ffac12 100644 --- a/json_serializable/test/config_test.dart +++ b/json_serializable/test/config_test.dart @@ -18,8 +18,10 @@ import 'shared_config.dart'; void main() { test('fields in JsonSerializable are sorted', () { - expect(generatorConfigDefaultJson.keys, - orderedEquals(generatorConfigDefaultJson.keys.toList()..sort())); + expect( + generatorConfigDefaultJson.keys, + orderedEquals(generatorConfigDefaultJson.keys.toList()..sort()), + ); }); test('empty', () async { @@ -28,29 +30,36 @@ void main() { }); test('valid default config', () async { - final builder = - jsonSerializable(BuilderOptions(generatorConfigDefaultJson)); + final builder = jsonSerializable( + BuilderOptions(generatorConfigDefaultJson), + ); expect(builder, isNotNull); }); test('valid, non-default config', () { - expect(generatorConfigNonDefaultJson.keys, - unorderedEquals(generatorConfigDefaultJson.keys)); + expect( + generatorConfigNonDefaultJson.keys, + unorderedEquals(generatorConfigDefaultJson.keys), + ); for (var entry in generatorConfigDefaultJson.entries) { - expect(generatorConfigNonDefaultJson, - containsPair(entry.key, isNot(entry.value)), - reason: 'should have values that are different than the defaults'); + expect( + generatorConfigNonDefaultJson, + containsPair(entry.key, isNot(entry.value)), + reason: 'should have values that are different than the defaults', + ); } - final builder = - jsonSerializable(BuilderOptions(generatorConfigNonDefaultJson)); + final builder = jsonSerializable( + BuilderOptions(generatorConfigNonDefaultJson), + ); expect(builder, isNotNull); }); test('config is null-protected when passed to JsonSerializableGenerator', () { final nullValueMap = Map.fromEntries( - generatorConfigDefaultJson.entries.map((e) => MapEntry(e.key, null))); + generatorConfigDefaultJson.entries.map((e) => MapEntry(e.key, null)), + ); final config = JsonSerializable.fromJson(nullValueMap); final generator = JsonSerializableGenerator(config: config); expect(generator.config.toJson(), generatorConfigDefaultJson); @@ -71,7 +80,7 @@ void main() { r'$default', 'builders', 'json_serializable', - 'options' + 'options', ]) { yaml = yaml[key] as YamlMap; } @@ -81,7 +90,8 @@ void main() { expect( configMap.keys, unorderedEquals(generatorConfigDefaultJson.keys), - reason: 'All supported keys are documented. ' + reason: + 'All supported keys are documented. ' 'Did you forget to change README.md?', ); @@ -104,8 +114,9 @@ void main() { ); expect( - () => jsonSerializable(const BuilderOptions({'unsupported': 'config'})), - throwsA(matcher)); + () => jsonSerializable(const BuilderOptions({'unsupported': 'config'})), + throwsA(matcher), + ); }); group('invalid config', () { @@ -128,7 +139,7 @@ void main() { 'create_to_json' => "type 'int' is not a subtype of type 'bool?' in type " 'cast', - _ => "type 'int' is not a subtype of type 'bool?' in type cast" + _ => "type 'int' is not a subtype of type 'bool?' in type cast", }; final matcher = isA().having( @@ -140,7 +151,9 @@ There is a problem with "${entry.key}". $lastLine''', ); expect( - () => jsonSerializable(BuilderOptions(config)), throwsA(matcher)); + () => jsonSerializable(BuilderOptions(config)), + throwsA(matcher), + ); }); } }); diff --git a/json_serializable/test/custom_configuration_test.dart b/json_serializable/test/custom_configuration_test.dart index 1c96f0925..4b70d8c9a 100644 --- a/json_serializable/test/custom_configuration_test.dart +++ b/json_serializable/test/custom_configuration_test.dart @@ -39,12 +39,17 @@ Future main() async { group('configuration', () { Future runWithConfigAndLogger( - JsonSerializable? config, String className) async { + JsonSerializable? config, + String className, + ) async { await generateForElement( - JsonSerializableGenerator( - config: config, typeHelpers: const [_ConfigLogger()]), - _libraryReader, - className); + JsonSerializableGenerator( + config: config, + typeHelpers: const [_ConfigLogger()], + ), + _libraryReader, + className, + ); } setUp(_ConfigLogger.configurations.clear); @@ -60,46 +65,59 @@ Future main() async { test(testDescription, () async { await runWithConfigAndLogger( - nullConfig ? null : const JsonSerializable(), className); + nullConfig ? null : const JsonSerializable(), + className, + ); expect(_ConfigLogger.configurations, hasLength(2)); expect( _ConfigLogger.configurations.first.toJson(), _ConfigLogger.configurations.last.toJson(), ); - expect(_ConfigLogger.configurations.first.toJson(), - generatorConfigDefaultJson); + expect( + _ConfigLogger.configurations.first.toJson(), + generatorConfigDefaultJson, + ); }); } } }); test( - 'values in config override unconfigured (default) values in annotation', - () async { - await runWithConfigAndLogger( + 'values in config override unconfigured (default) values in annotation', + () async { + await runWithConfigAndLogger( JsonSerializable.fromJson(generatorConfigNonDefaultJson), - 'ConfigurationImplicitDefaults'); + 'ConfigurationImplicitDefaults', + ); - expect(_ConfigLogger.configurations, isEmpty, - reason: 'all generation is disabled'); + expect( + _ConfigLogger.configurations, + isEmpty, + reason: 'all generation is disabled', + ); - // Create a configuration with just `create_to_json` set to true so we - // can validate the configuration that is run with - final configMap = - Map.from(generatorConfigNonDefaultJson); - configMap['create_to_json'] = true; + // Create a configuration with just `create_to_json` set to true so we + // can validate the configuration that is run with + final configMap = Map.from( + generatorConfigNonDefaultJson, + ); + configMap['create_to_json'] = true; - await runWithConfigAndLogger(JsonSerializable.fromJson(configMap), - 'ConfigurationImplicitDefaults'); - }); + await runWithConfigAndLogger( + JsonSerializable.fromJson(configMap), + 'ConfigurationImplicitDefaults', + ); + }, + ); test( 'explicit values in annotation override corresponding settings in config', () async { await runWithConfigAndLogger( - JsonSerializable.fromJson(generatorConfigNonDefaultJson), - 'ConfigurationExplicitDefaults'); + JsonSerializable.fromJson(generatorConfigNonDefaultJson), + 'ConfigurationExplicitDefaults', + ); expect(_ConfigLogger.configurations, hasLength(2)); expect( @@ -110,8 +128,9 @@ Future main() async { // The effective configuration should be non-Default configuration, but // with all fields set from JsonSerializable as the defaults - final expected = - Map.from(generatorConfigNonDefaultJson); + final expected = Map.from( + generatorConfigNonDefaultJson, + ); for (var jsonSerialKey in jsonSerializableFields) { expected[jsonSerialKey] = generatorConfigDefaultJson[jsonSerialKey]; } @@ -138,7 +157,9 @@ void _registerTests(JsonSerializable generator) { group('explicit toJson', () { test('nullable', () async { final output = await _runForElementNamed( - const JsonSerializable(), 'TrivialNestedNullable'); + const JsonSerializable(), + 'TrivialNestedNullable', + ); const expected = r''' Map _$TrivialNestedNullableToJson( @@ -153,7 +174,9 @@ Map _$TrivialNestedNullableToJson( }); test('non-nullable', () async { final output = await _runForElementNamed( - const JsonSerializable(), 'TrivialNestedNonNullable'); + const JsonSerializable(), + 'TrivialNestedNonNullable', + ); const expected = r''' Map _$TrivialNestedNonNullableToJson( @@ -169,25 +192,32 @@ Map _$TrivialNestedNonNullableToJson( }); group('valid inputs', () { - test('class with fromJson() constructor with optional parameters', - () async { - final output = await runForElementNamed('FromJsonOptionalParameters'); + test( + 'class with fromJson() constructor with optional parameters', + () async { + final output = await runForElementNamed('FromJsonOptionalParameters'); - expect(output, contains('ChildWithFromJson.fromJson')); - }); + expect(output, contains('ChildWithFromJson.fromJson')); + }, + ); test('class with child json-able object', () async { final output = await runForElementNamed('ParentObject'); expect( - output, - contains("ChildObject.fromJson(json['child'] " - 'as Map)')); + output, + contains( + "ChildObject.fromJson(json['child'] " + 'as Map)', + ), + ); }); test('class with child json-able object - anyMap', () async { final output = await _runForElementNamed( - const JsonSerializable(anyMap: true), 'ParentObject'); + const JsonSerializable(anyMap: true), + 'ParentObject', + ); expect(output, contains("ChildObject.fromJson(json['child'] as Map)")); }); @@ -200,8 +230,9 @@ Map _$TrivialNestedNonNullableToJson( }); test('class with child list of dynamic objects is left alone', () async { - final output = - await runForElementNamed('ParentObjectWithDynamicChildren'); + final output = await runForElementNamed( + 'ParentObjectWithDynamicChildren', + ); expect( output, @@ -235,8 +266,11 @@ class _ConfigLogger implements TypeHelper { } @override - Object? serialize(DartType targetType, String expression, - TypeHelperContextWithConfig context) { + Object? serialize( + DartType targetType, + String expression, + TypeHelperContextWithConfig context, + ) { configurations.add(context.config.toJsonSerializable()); return null; } diff --git a/json_serializable/test/default_value/default_value.dart b/json_serializable/test/default_value/default_value.dart index 0894af857..3fff09ab0 100644 --- a/json_serializable/test/default_value/default_value.dart +++ b/json_serializable/test/default_value/default_value.dart @@ -55,9 +55,11 @@ class DefaultValue implements dvi.DefaultValue { @JsonKey(defaultValue: {'answer': 42}) Map fieldMapSimple; - @JsonKey(defaultValue: { - 'root': ['child'] - }) + @JsonKey( + defaultValue: { + 'root': ['child'], + }, + ) Map> fieldMapListString; Duration durationField; diff --git a/json_serializable/test/default_value/default_value.g.dart b/json_serializable/test/default_value/default_value.g.dart index 6bc4525d5..af6395178 100644 --- a/json_serializable/test/default_value/default_value.g.dart +++ b/json_serializable/test/default_value/default_value.g.dart @@ -9,62 +9,62 @@ part of 'default_value.dart'; // ************************************************************************** DefaultValue _$DefaultValueFromJson(Map json) => DefaultValue( - json['fieldBool'] as bool? ?? true, - json['fieldString'] as String? ?? 'string', - (json['fieldInt'] as num?)?.toInt() ?? 42, - (json['fieldDouble'] as num?)?.toDouble() ?? 3.14, - json['fieldListEmpty'] as List? ?? [], - (json['fieldSetEmpty'] as List?)?.toSet() ?? {}, - json['fieldMapEmpty'] as Map? ?? {}, - (json['fieldListSimple'] as List?) - ?.map((e) => (e as num).toInt()) - .toList() ?? - [1, 2, 3], - (json['fieldSetSimple'] as List?) - ?.map((e) => e as String) - .toSet() ?? - {'entry1', 'entry2'}, - (json['fieldMapSimple'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ) ?? - {'answer': 42}, - (json['fieldMapListString'] as Map?)?.map( - (k, e) => MapEntry( - k, (e as List).map((e) => e as String).toList()), - ) ?? - { - 'root': ['child'] - }, - $enumDecodeNullable(_$GreekEnumMap, json['fieldEnum']) ?? Greek.beta, - durationField: json['durationField'] == null - ? Duration.zero - : Duration(microseconds: (json['durationField'] as num).toInt()), - constClass: json['constClass'] == null - ? const ConstClass('value') - : ConstClass.fromJson(json['constClass'] as Map), - valueFromConverter: json['valueFromConverter'] == null - ? const ConstClass('value') - : const ConstClassConverter() - .fromJson(json['valueFromConverter'] as String), - valueFromFunction: json['valueFromFunction'] == null - ? const ConstClass('value') - : constClassFromJson(json['valueFromFunction'] as String), - intDefaultValueFromFunction: - (json['intDefaultValueFromFunction'] as num?)?.toInt() ?? - intDefaultValueFunction(), - valueFromDefaultValueDefaultConstructor: - json['valueFromDefaultValueDefaultConstructor'] == null - ? const ConstClass() - : ConstClass.fromJson( - json['valueFromDefaultValueDefaultConstructor'] - as Map), - valueFromDefaultValueNamedConstructor: - json['valueFromDefaultValueNamedConstructor'] == null - ? ConstClass.easy() - : ConstClass.fromJson( - json['valueFromDefaultValueNamedConstructor'] - as Map), - ); + json['fieldBool'] as bool? ?? true, + json['fieldString'] as String? ?? 'string', + (json['fieldInt'] as num?)?.toInt() ?? 42, + (json['fieldDouble'] as num?)?.toDouble() ?? 3.14, + json['fieldListEmpty'] as List? ?? [], + (json['fieldSetEmpty'] as List?)?.toSet() ?? {}, + json['fieldMapEmpty'] as Map? ?? {}, + (json['fieldListSimple'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [1, 2, 3], + (json['fieldSetSimple'] as List?)?.map((e) => e as String).toSet() ?? + {'entry1', 'entry2'}, + (json['fieldMapSimple'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ) ?? + {'answer': 42}, + (json['fieldMapListString'] as Map?)?.map( + (k, e) => + MapEntry(k, (e as List).map((e) => e as String).toList()), + ) ?? + { + 'root': ['child'], + }, + $enumDecodeNullable(_$GreekEnumMap, json['fieldEnum']) ?? Greek.beta, + durationField: json['durationField'] == null + ? Duration.zero + : Duration(microseconds: (json['durationField'] as num).toInt()), + constClass: json['constClass'] == null + ? const ConstClass('value') + : ConstClass.fromJson(json['constClass'] as Map), + valueFromConverter: json['valueFromConverter'] == null + ? const ConstClass('value') + : const ConstClassConverter().fromJson( + json['valueFromConverter'] as String, + ), + valueFromFunction: json['valueFromFunction'] == null + ? const ConstClass('value') + : constClassFromJson(json['valueFromFunction'] as String), + intDefaultValueFromFunction: + (json['intDefaultValueFromFunction'] as num?)?.toInt() ?? + intDefaultValueFunction(), + valueFromDefaultValueDefaultConstructor: + json['valueFromDefaultValueDefaultConstructor'] == null + ? const ConstClass() + : ConstClass.fromJson( + json['valueFromDefaultValueDefaultConstructor'] + as Map, + ), + valueFromDefaultValueNamedConstructor: + json['valueFromDefaultValueNamedConstructor'] == null + ? ConstClass.easy() + : ConstClass.fromJson( + json['valueFromDefaultValueNamedConstructor'] as Map, + ), +); Map _$DefaultValueToJson(DefaultValue instance) => { @@ -82,8 +82,9 @@ Map _$DefaultValueToJson(DefaultValue instance) => 'durationField': instance.durationField.inMicroseconds, 'fieldEnum': _$GreekEnumMap[instance.fieldEnum]!, 'constClass': instance.constClass, - 'valueFromConverter': - const ConstClassConverter().toJson(instance.valueFromConverter), + 'valueFromConverter': const ConstClassConverter().toJson( + instance.valueFromConverter, + ), 'valueFromFunction': constClassToJson(instance.valueFromFunction), 'intDefaultValueFromFunction': instance.intDefaultValueFromFunction, 'valueFromDefaultValueDefaultConstructor': diff --git a/json_serializable/test/default_value/default_value.g_any_map__checked.dart b/json_serializable/test/default_value/default_value.g_any_map__checked.dart index be46b0133..40e559936 100644 --- a/json_serializable/test/default_value/default_value.g_any_map__checked.dart +++ b/json_serializable/test/default_value/default_value.g_any_map__checked.dart @@ -23,10 +23,7 @@ const _intValue = 42; dvi.DefaultValue fromJson(Map json) => _$DefaultValueFromJson(json); -@JsonSerializable( - checked: true, - anyMap: true, -) +@JsonSerializable(checked: true, anyMap: true) class DefaultValue implements dvi.DefaultValue { @JsonKey(defaultValue: true) bool fieldBool; @@ -58,9 +55,11 @@ class DefaultValue implements dvi.DefaultValue { @JsonKey(defaultValue: {'answer': 42}) Map fieldMapSimple; - @JsonKey(defaultValue: { - 'root': ['child'] - }) + @JsonKey( + defaultValue: { + 'root': ['child'], + }, + ) Map> fieldMapListString; Duration durationField; diff --git a/json_serializable/test/default_value/default_value.g_any_map__checked.g.dart b/json_serializable/test/default_value/default_value.g_any_map__checked.g.dart index 9ce12321f..0462bd167 100644 --- a/json_serializable/test/default_value/default_value.g_any_map__checked.g.dart +++ b/json_serializable/test/default_value/default_value.g_any_map__checked.g.dart @@ -8,88 +8,99 @@ part of 'default_value.g_any_map__checked.dart'; // JsonSerializableGenerator // ************************************************************************** -DefaultValue _$DefaultValueFromJson(Map json) => $checkedCreate( - 'DefaultValue', - json, - ($checkedConvert) { - final val = DefaultValue( - $checkedConvert('fieldBool', (v) => v as bool? ?? true), - $checkedConvert('fieldString', (v) => v as String? ?? 'string'), - $checkedConvert('fieldInt', (v) => (v as num?)?.toInt() ?? 42), - $checkedConvert( - 'fieldDouble', (v) => (v as num?)?.toDouble() ?? 3.14), - $checkedConvert('fieldListEmpty', (v) => v as List? ?? []), - $checkedConvert( - 'fieldSetEmpty', (v) => (v as List?)?.toSet() ?? {}), - $checkedConvert('fieldMapEmpty', (v) => v as Map? ?? {}), - $checkedConvert( - 'fieldListSimple', - (v) => - (v as List?) - ?.map((e) => (e as num).toInt()) - .toList() ?? - [1, 2, 3]), - $checkedConvert( - 'fieldSetSimple', - (v) => - (v as List?)?.map((e) => e as String).toSet() ?? - {'entry1', 'entry2'}), - $checkedConvert( - 'fieldMapSimple', - (v) => - (v as Map?)?.map( - (k, e) => MapEntry(k as String, (e as num).toInt()), - ) ?? - {'answer': 42}), - $checkedConvert( - 'fieldMapListString', - (v) => - (v as Map?)?.map( - (k, e) => MapEntry(k as String, - (e as List).map((e) => e as String).toList()), - ) ?? - { - 'root': ['child'] - }), - $checkedConvert('fieldEnum', - (v) => $enumDecodeNullable(_$GreekEnumMap, v) ?? Greek.beta), - durationField: $checkedConvert( - 'durationField', - (v) => v == null - ? Duration.zero - : Duration(microseconds: (v as num).toInt())), - constClass: $checkedConvert( - 'constClass', - (v) => v == null - ? const ConstClass('value') - : ConstClass.fromJson(Map.from(v as Map))), - valueFromConverter: $checkedConvert( - 'valueFromConverter', - (v) => v == null - ? const ConstClass('value') - : const ConstClassConverter().fromJson(v as String)), - valueFromFunction: $checkedConvert( - 'valueFromFunction', - (v) => v == null - ? const ConstClass('value') - : constClassFromJson(v as String)), - intDefaultValueFromFunction: $checkedConvert( - 'intDefaultValueFromFunction', - (v) => (v as num?)?.toInt() ?? intDefaultValueFunction()), - valueFromDefaultValueDefaultConstructor: $checkedConvert( - 'valueFromDefaultValueDefaultConstructor', - (v) => v == null - ? const ConstClass() - : ConstClass.fromJson(Map.from(v as Map))), - valueFromDefaultValueNamedConstructor: $checkedConvert( - 'valueFromDefaultValueNamedConstructor', - (v) => v == null - ? ConstClass.easy() - : ConstClass.fromJson(Map.from(v as Map))), - ); - return val; - }, - ); +DefaultValue _$DefaultValueFromJson(Map json) => + $checkedCreate('DefaultValue', json, ($checkedConvert) { + final val = DefaultValue( + $checkedConvert('fieldBool', (v) => v as bool? ?? true), + $checkedConvert('fieldString', (v) => v as String? ?? 'string'), + $checkedConvert('fieldInt', (v) => (v as num?)?.toInt() ?? 42), + $checkedConvert('fieldDouble', (v) => (v as num?)?.toDouble() ?? 3.14), + $checkedConvert('fieldListEmpty', (v) => v as List? ?? []), + $checkedConvert( + 'fieldSetEmpty', + (v) => (v as List?)?.toSet() ?? {}, + ), + $checkedConvert('fieldMapEmpty', (v) => v as Map? ?? {}), + $checkedConvert( + 'fieldListSimple', + (v) => + (v as List?)?.map((e) => (e as num).toInt()).toList() ?? + [1, 2, 3], + ), + $checkedConvert( + 'fieldSetSimple', + (v) => + (v as List?)?.map((e) => e as String).toSet() ?? + {'entry1', 'entry2'}, + ), + $checkedConvert( + 'fieldMapSimple', + (v) => + (v as Map?)?.map( + (k, e) => MapEntry(k as String, (e as num).toInt()), + ) ?? + {'answer': 42}, + ), + $checkedConvert( + 'fieldMapListString', + (v) => + (v as Map?)?.map( + (k, e) => MapEntry( + k as String, + (e as List).map((e) => e as String).toList(), + ), + ) ?? + { + 'root': ['child'], + }, + ), + $checkedConvert( + 'fieldEnum', + (v) => $enumDecodeNullable(_$GreekEnumMap, v) ?? Greek.beta, + ), + durationField: $checkedConvert( + 'durationField', + (v) => v == null + ? Duration.zero + : Duration(microseconds: (v as num).toInt()), + ), + constClass: $checkedConvert( + 'constClass', + (v) => v == null + ? const ConstClass('value') + : ConstClass.fromJson(Map.from(v as Map)), + ), + valueFromConverter: $checkedConvert( + 'valueFromConverter', + (v) => v == null + ? const ConstClass('value') + : const ConstClassConverter().fromJson(v as String), + ), + valueFromFunction: $checkedConvert( + 'valueFromFunction', + (v) => v == null + ? const ConstClass('value') + : constClassFromJson(v as String), + ), + intDefaultValueFromFunction: $checkedConvert( + 'intDefaultValueFromFunction', + (v) => (v as num?)?.toInt() ?? intDefaultValueFunction(), + ), + valueFromDefaultValueDefaultConstructor: $checkedConvert( + 'valueFromDefaultValueDefaultConstructor', + (v) => v == null + ? const ConstClass() + : ConstClass.fromJson(Map.from(v as Map)), + ), + valueFromDefaultValueNamedConstructor: $checkedConvert( + 'valueFromDefaultValueNamedConstructor', + (v) => v == null + ? ConstClass.easy() + : ConstClass.fromJson(Map.from(v as Map)), + ), + ); + return val; + }); Map _$DefaultValueToJson(DefaultValue instance) => { @@ -107,8 +118,9 @@ Map _$DefaultValueToJson(DefaultValue instance) => 'durationField': instance.durationField.inMicroseconds, 'fieldEnum': _$GreekEnumMap[instance.fieldEnum]!, 'constClass': instance.constClass, - 'valueFromConverter': - const ConstClassConverter().toJson(instance.valueFromConverter), + 'valueFromConverter': const ConstClassConverter().toJson( + instance.valueFromConverter, + ), 'valueFromFunction': constClassToJson(instance.valueFromFunction), 'intDefaultValueFromFunction': instance.intDefaultValueFromFunction, 'valueFromDefaultValueDefaultConstructor': diff --git a/json_serializable/test/default_value/default_value_interface.dart b/json_serializable/test/default_value/default_value_interface.dart index 2a2cb1cbc..3fa93ed24 100644 --- a/json_serializable/test/default_value/default_value_interface.dart +++ b/json_serializable/test/default_value/default_value_interface.dart @@ -54,13 +54,10 @@ class ConstClass { ConstClass.easy() : field = 'easy'; - factory ConstClass.fromJson(Map json) => ConstClass( - json['field'] as String, - ); + factory ConstClass.fromJson(Map json) => + ConstClass(json['field'] as String); - Map toJson() => { - 'field': field, - }; + Map toJson() => {'field': field}; } ConstClass constClassFromJson(String json) => ConstClass(json); diff --git a/json_serializable/test/default_value/default_value_test.dart b/json_serializable/test/default_value/default_value_test.dart index d2d057c28..d53a4fb47 100644 --- a/json_serializable/test/default_value/default_value_test.dart +++ b/json_serializable/test/default_value/default_value_test.dart @@ -22,7 +22,7 @@ const _defaultInstance = { 'fieldSetSimple': ['entry1', 'entry2'], 'fieldMapSimple': {'answer': 42}, 'fieldMapListString': { - 'root': ['child'] + 'root': ['child'], }, 'durationField': 0, 'fieldEnum': 'beta', @@ -46,7 +46,7 @@ const _otherValues = { 'fieldSetSimple': ['entry3'], 'fieldMapSimple': {}, 'fieldMapListString': { - 'root2': ['alpha'] + 'root2': ['alpha'], }, 'durationField': 1, 'fieldEnum': 'delta', diff --git a/json_serializable/test/default_value/implicit_default_value.dart b/json_serializable/test/default_value/implicit_default_value.dart index 49bf57999..8b7d3def5 100644 --- a/json_serializable/test/default_value/implicit_default_value.dart +++ b/json_serializable/test/default_value/implicit_default_value.dart @@ -64,7 +64,7 @@ class DefaultValueImplicit implements dvi.DefaultValue { this.fieldSetSimple = const {'entry1', 'entry2'}, this.fieldMapSimple = const {'answer': 42}, this.fieldMapListString = const { - 'root': ['child'] + 'root': ['child'], }, this.fieldEnum = Greek.beta, this.durationField = const Duration(), diff --git a/json_serializable/test/default_value/implicit_default_value.g.dart b/json_serializable/test/default_value/implicit_default_value.g.dart index 408c1f0b2..06cb4a462 100644 --- a/json_serializable/test/default_value/implicit_default_value.g.dart +++ b/json_serializable/test/default_value/implicit_default_value.g.dart @@ -9,93 +9,98 @@ part of 'implicit_default_value.dart'; // ************************************************************************** DefaultValueImplicit _$DefaultValueImplicitFromJson( - Map json) => - DefaultValueImplicit( - fieldBool: json['fieldBool'] as bool? ?? true, - fieldString: json['fieldString'] as String? ?? 'string', - fieldInt: (json['fieldInt'] as num?)?.toInt() ?? 42, - fieldDouble: (json['fieldDouble'] as num?)?.toDouble() ?? 3.14, - fieldListEmpty: json['fieldListEmpty'] as List? ?? const [], - fieldSetEmpty: - (json['fieldSetEmpty'] as List?)?.toSet() ?? const {}, - fieldMapEmpty: json['fieldMapEmpty'] as Map? ?? const {}, - fieldListSimple: (json['fieldListSimple'] as List?) - ?.map((e) => (e as num).toInt()) - .toList() ?? - const [1, 2, 3], - fieldSetSimple: (json['fieldSetSimple'] as List?) - ?.map((e) => e as String) - .toSet() ?? - const {'entry1', 'entry2'}, - fieldMapSimple: (json['fieldMapSimple'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ) ?? - const {'answer': 42}, - fieldMapListString: - (json['fieldMapListString'] as Map?)?.map( - (k, e) => MapEntry( - k, (e as List).map((e) => e as String).toList()), - ) ?? - const { - 'root': ['child'] - }, - fieldEnum: - $enumDecodeNullable(_$GreekEnumMap, json['fieldEnum']) ?? Greek.beta, - durationField: json['durationField'] == null - ? const Duration() - : Duration(microseconds: (json['durationField'] as num).toInt()), - constClass: json['constClass'] == null - ? const ConstClass('value') - : ConstClass.fromJson(json['constClass'] as Map), - valueFromConverter: json['valueFromConverter'] == null - ? const ConstClass('value') - : const ConstClassConverter() - .fromJson(json['valueFromConverter'] as String), - valueFromFunction: json['valueFromFunction'] == null - ? const ConstClass('value') - : constClassFromJson(json['valueFromFunction'] as String), - intDefaultValueFromFunction: - (json['intDefaultValueFromFunction'] as num?)?.toInt() ?? 43, - valueFromDefaultValueDefaultConstructor: - json['valueFromDefaultValueDefaultConstructor'] == null - ? const ConstClass() - : ConstClass.fromJson( - json['valueFromDefaultValueDefaultConstructor'] - as Map), - valueFromDefaultValueNamedConstructor: - json['valueFromDefaultValueNamedConstructor'] == null - ? const ConstClass('easy') - : ConstClass.fromJson( - json['valueFromDefaultValueNamedConstructor'] - as Map), - ); + Map json, +) => DefaultValueImplicit( + fieldBool: json['fieldBool'] as bool? ?? true, + fieldString: json['fieldString'] as String? ?? 'string', + fieldInt: (json['fieldInt'] as num?)?.toInt() ?? 42, + fieldDouble: (json['fieldDouble'] as num?)?.toDouble() ?? 3.14, + fieldListEmpty: json['fieldListEmpty'] as List? ?? const [], + fieldSetEmpty: (json['fieldSetEmpty'] as List?)?.toSet() ?? const {}, + fieldMapEmpty: json['fieldMapEmpty'] as Map? ?? const {}, + fieldListSimple: + (json['fieldListSimple'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + const [1, 2, 3], + fieldSetSimple: + (json['fieldSetSimple'] as List?) + ?.map((e) => e as String) + .toSet() ?? + const {'entry1', 'entry2'}, + fieldMapSimple: + (json['fieldMapSimple'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ) ?? + const {'answer': 42}, + fieldMapListString: + (json['fieldMapListString'] as Map?)?.map( + (k, e) => + MapEntry(k, (e as List).map((e) => e as String).toList()), + ) ?? + const { + 'root': ['child'], + }, + fieldEnum: + $enumDecodeNullable(_$GreekEnumMap, json['fieldEnum']) ?? Greek.beta, + durationField: json['durationField'] == null + ? const Duration() + : Duration(microseconds: (json['durationField'] as num).toInt()), + constClass: json['constClass'] == null + ? const ConstClass('value') + : ConstClass.fromJson(json['constClass'] as Map), + valueFromConverter: json['valueFromConverter'] == null + ? const ConstClass('value') + : const ConstClassConverter().fromJson( + json['valueFromConverter'] as String, + ), + valueFromFunction: json['valueFromFunction'] == null + ? const ConstClass('value') + : constClassFromJson(json['valueFromFunction'] as String), + intDefaultValueFromFunction: + (json['intDefaultValueFromFunction'] as num?)?.toInt() ?? 43, + valueFromDefaultValueDefaultConstructor: + json['valueFromDefaultValueDefaultConstructor'] == null + ? const ConstClass() + : ConstClass.fromJson( + json['valueFromDefaultValueDefaultConstructor'] + as Map, + ), + valueFromDefaultValueNamedConstructor: + json['valueFromDefaultValueNamedConstructor'] == null + ? const ConstClass('easy') + : ConstClass.fromJson( + json['valueFromDefaultValueNamedConstructor'] as Map, + ), +); Map _$DefaultValueImplicitToJson( - DefaultValueImplicit instance) => - { - 'fieldBool': instance.fieldBool, - 'fieldString': instance.fieldString, - 'fieldInt': instance.fieldInt, - 'fieldDouble': instance.fieldDouble, - 'fieldListEmpty': instance.fieldListEmpty, - 'fieldSetEmpty': instance.fieldSetEmpty.toList(), - 'fieldMapEmpty': instance.fieldMapEmpty, - 'fieldListSimple': instance.fieldListSimple, - 'fieldSetSimple': instance.fieldSetSimple.toList(), - 'fieldMapSimple': instance.fieldMapSimple, - 'fieldMapListString': instance.fieldMapListString, - 'durationField': instance.durationField.inMicroseconds, - 'fieldEnum': _$GreekEnumMap[instance.fieldEnum]!, - 'constClass': instance.constClass, - 'valueFromConverter': - const ConstClassConverter().toJson(instance.valueFromConverter), - 'valueFromFunction': constClassToJson(instance.valueFromFunction), - 'intDefaultValueFromFunction': instance.intDefaultValueFromFunction, - 'valueFromDefaultValueDefaultConstructor': - instance.valueFromDefaultValueDefaultConstructor, - 'valueFromDefaultValueNamedConstructor': - instance.valueFromDefaultValueNamedConstructor, - }; + DefaultValueImplicit instance, +) => { + 'fieldBool': instance.fieldBool, + 'fieldString': instance.fieldString, + 'fieldInt': instance.fieldInt, + 'fieldDouble': instance.fieldDouble, + 'fieldListEmpty': instance.fieldListEmpty, + 'fieldSetEmpty': instance.fieldSetEmpty.toList(), + 'fieldMapEmpty': instance.fieldMapEmpty, + 'fieldListSimple': instance.fieldListSimple, + 'fieldSetSimple': instance.fieldSetSimple.toList(), + 'fieldMapSimple': instance.fieldMapSimple, + 'fieldMapListString': instance.fieldMapListString, + 'durationField': instance.durationField.inMicroseconds, + 'fieldEnum': _$GreekEnumMap[instance.fieldEnum]!, + 'constClass': instance.constClass, + 'valueFromConverter': const ConstClassConverter().toJson( + instance.valueFromConverter, + ), + 'valueFromFunction': constClassToJson(instance.valueFromFunction), + 'intDefaultValueFromFunction': instance.intDefaultValueFromFunction, + 'valueFromDefaultValueDefaultConstructor': + instance.valueFromDefaultValueDefaultConstructor, + 'valueFromDefaultValueNamedConstructor': + instance.valueFromDefaultValueNamedConstructor, +}; const _$GreekEnumMap = { Greek.alpha: 'alpha', diff --git a/json_serializable/test/enum_helper_test.dart b/json_serializable/test/enum_helper_test.dart index 280ff9e28..2355b0aa4 100644 --- a/json_serializable/test/enum_helper_test.dart +++ b/json_serializable/test/enum_helper_test.dart @@ -16,7 +16,7 @@ void main() { 'HELLO', 'hi_to', '_private', - 'weird_' + 'weird_', ]) { test(expression, () { expect(simpleExpression.hasMatch(expression), isTrue); diff --git a/json_serializable/test/field_matrix_test.dart b/json_serializable/test/field_matrix_test.dart index 8f1abff1a..dd4c68251 100644 --- a/json_serializable/test/field_matrix_test.dart +++ b/json_serializable/test/field_matrix_test.dart @@ -6,13 +6,15 @@ import 'field_matrix_test.field_matrix.dart'; void main() { test('test', () { - final result = Map.fromEntries(fromJsonFactories.map((e) { - final instance = e({'field': 42}); - return MapEntry(instance.toString(), { - 'with': instance, - 'without': e({}), - }); - })); + final result = Map.fromEntries( + fromJsonFactories.map((e) { + final instance = e({'field': 42}); + return MapEntry(instance.toString(), { + 'with': instance, + 'without': e({}), + }); + }), + ); expect(jsonDecode(jsonEncode(result)), _expectedResult); }); @@ -21,74 +23,74 @@ void main() { const _expectedResult = { 'ToJsonNullFromJsonNullPublic: field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonNullFromJsonTruePublic: field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonNullFromJsonFalsePublic: field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonTrueFromJsonNullPublic: field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonTrueFromJsonTruePublic: field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonTrueFromJsonFalsePublic: field: null': { 'with': {'aField': null, 'field': null, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonFalseFromJsonNullPublic: field: 42': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonFalseFromJsonTruePublic: field: 42': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonFalseFromJsonFalsePublic: field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonNullFromJsonNullPrivate: _field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonNullFromJsonTruePrivate: _field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonNullFromJsonFalsePrivate: _field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonTrueFromJsonNullPrivate: _field: null': { 'with': {'aField': null, 'field': null, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonTrueFromJsonTruePrivate: _field: 42': { 'with': {'aField': null, 'field': 42, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonTrueFromJsonFalsePrivate: _field: null': { 'with': {'aField': null, 'field': null, 'zField': null}, - 'without': {'aField': null, 'field': null, 'zField': null} + 'without': {'aField': null, 'field': null, 'zField': null}, }, 'ToJsonFalseFromJsonNullPrivate: _field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonFalseFromJsonTruePrivate: _field: 42': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} + 'without': {'aField': null, 'zField': null}, }, 'ToJsonFalseFromJsonFalsePrivate: _field: null': { 'with': {'aField': null, 'zField': null}, - 'without': {'aField': null, 'zField': null} - } + 'without': {'aField': null, 'zField': null}, + }, }; diff --git a/json_serializable/test/field_matrix_test.field_matrix.dart b/json_serializable/test/field_matrix_test.field_matrix.dart index fd1c52b5f..8515129ff 100644 --- a/json_serializable/test/field_matrix_test.field_matrix.dart +++ b/json_serializable/test/field_matrix_test.field_matrix.dart @@ -27,9 +27,7 @@ class ToJsonNullFromJsonTruePublic { int? aField; - @JsonKey( - includeFromJson: true, - ) + @JsonKey(includeFromJson: true) int? field; int? zField; @@ -49,9 +47,7 @@ class ToJsonNullFromJsonFalsePublic { int? aField; - @JsonKey( - includeFromJson: false, - ) + @JsonKey(includeFromJson: false) int? field; int? zField; @@ -71,9 +67,7 @@ class ToJsonTrueFromJsonNullPublic { int? aField; - @JsonKey( - includeToJson: true, - ) + @JsonKey(includeToJson: true) int? field; int? zField; @@ -93,10 +87,7 @@ class ToJsonTrueFromJsonTruePublic { int? aField; - @JsonKey( - includeFromJson: true, - includeToJson: true, - ) + @JsonKey(includeFromJson: true, includeToJson: true) int? field; int? zField; @@ -116,10 +107,7 @@ class ToJsonTrueFromJsonFalsePublic { int? aField; - @JsonKey( - includeFromJson: false, - includeToJson: true, - ) + @JsonKey(includeFromJson: false, includeToJson: true) int? field; int? zField; @@ -139,9 +127,7 @@ class ToJsonFalseFromJsonNullPublic { int? aField; - @JsonKey( - includeToJson: false, - ) + @JsonKey(includeToJson: false) int? field; int? zField; @@ -161,10 +147,7 @@ class ToJsonFalseFromJsonTruePublic { int? aField; - @JsonKey( - includeFromJson: true, - includeToJson: false, - ) + @JsonKey(includeFromJson: true, includeToJson: false) int? field; int? zField; @@ -184,10 +167,7 @@ class ToJsonFalseFromJsonFalsePublic { int? aField; - @JsonKey( - includeFromJson: false, - includeToJson: false, - ) + @JsonKey(includeFromJson: false, includeToJson: false) int? field; int? zField; diff --git a/json_serializable/test/field_matrix_test.field_matrix.g.dart b/json_serializable/test/field_matrix_test.field_matrix.g.dart index aa18728ba..d61a2566d 100644 --- a/json_serializable/test/field_matrix_test.field_matrix.g.dart +++ b/json_serializable/test/field_matrix_test.field_matrix.g.dart @@ -9,253 +9,226 @@ part of 'field_matrix_test.field_matrix.dart'; // ************************************************************************** ToJsonNullFromJsonNullPublic _$ToJsonNullFromJsonNullPublicFromJson( - Map json) => - ToJsonNullFromJsonNullPublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonNullPublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonNullPublicToJson( - ToJsonNullFromJsonNullPublic instance) => - { - 'aField': instance.aField, - 'field': instance.field, - 'zField': instance.zField, - }; + ToJsonNullFromJsonNullPublic instance, +) => { + 'aField': instance.aField, + 'field': instance.field, + 'zField': instance.zField, +}; ToJsonNullFromJsonTruePublic _$ToJsonNullFromJsonTruePublicFromJson( - Map json) => - ToJsonNullFromJsonTruePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonTruePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonTruePublicToJson( - ToJsonNullFromJsonTruePublic instance) => - { - 'aField': instance.aField, - 'field': instance.field, - 'zField': instance.zField, - }; + ToJsonNullFromJsonTruePublic instance, +) => { + 'aField': instance.aField, + 'field': instance.field, + 'zField': instance.zField, +}; ToJsonNullFromJsonFalsePublic _$ToJsonNullFromJsonFalsePublicFromJson( - Map json) => - ToJsonNullFromJsonFalsePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonFalsePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonFalsePublicToJson( - ToJsonNullFromJsonFalsePublic instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonNullFromJsonFalsePublic instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonTrueFromJsonNullPublic _$ToJsonTrueFromJsonNullPublicFromJson( - Map json) => - ToJsonTrueFromJsonNullPublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonNullPublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonNullPublicToJson( - ToJsonTrueFromJsonNullPublic instance) => - { - 'aField': instance.aField, - 'field': instance.field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonNullPublic instance, +) => { + 'aField': instance.aField, + 'field': instance.field, + 'zField': instance.zField, +}; ToJsonTrueFromJsonTruePublic _$ToJsonTrueFromJsonTruePublicFromJson( - Map json) => - ToJsonTrueFromJsonTruePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonTruePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonTruePublicToJson( - ToJsonTrueFromJsonTruePublic instance) => - { - 'aField': instance.aField, - 'field': instance.field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonTruePublic instance, +) => { + 'aField': instance.aField, + 'field': instance.field, + 'zField': instance.zField, +}; ToJsonTrueFromJsonFalsePublic _$ToJsonTrueFromJsonFalsePublicFromJson( - Map json) => - ToJsonTrueFromJsonFalsePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonFalsePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonFalsePublicToJson( - ToJsonTrueFromJsonFalsePublic instance) => - { - 'aField': instance.aField, - 'field': instance.field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonFalsePublic instance, +) => { + 'aField': instance.aField, + 'field': instance.field, + 'zField': instance.zField, +}; ToJsonFalseFromJsonNullPublic _$ToJsonFalseFromJsonNullPublicFromJson( - Map json) => - ToJsonFalseFromJsonNullPublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonNullPublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonNullPublicToJson( - ToJsonFalseFromJsonNullPublic instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonNullPublic instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonFalseFromJsonTruePublic _$ToJsonFalseFromJsonTruePublicFromJson( - Map json) => - ToJsonFalseFromJsonTruePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonTruePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonTruePublicToJson( - ToJsonFalseFromJsonTruePublic instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonTruePublic instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonFalseFromJsonFalsePublic _$ToJsonFalseFromJsonFalsePublicFromJson( - Map json) => - ToJsonFalseFromJsonFalsePublic() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonFalsePublic() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonFalsePublicToJson( - ToJsonFalseFromJsonFalsePublic instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonFalsePublic instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonNullFromJsonNullPrivate _$ToJsonNullFromJsonNullPrivateFromJson( - Map json) => - ToJsonNullFromJsonNullPrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonNullPrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonNullPrivateToJson( - ToJsonNullFromJsonNullPrivate instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonNullFromJsonNullPrivate instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonNullFromJsonTruePrivate _$ToJsonNullFromJsonTruePrivateFromJson( - Map json) => - ToJsonNullFromJsonTruePrivate() - ..aField = (json['aField'] as num?)?.toInt() - .._field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonTruePrivate() + ..aField = (json['aField'] as num?)?.toInt() + .._field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonTruePrivateToJson( - ToJsonNullFromJsonTruePrivate instance) => - { - 'aField': instance.aField, - 'field': instance._field, - 'zField': instance.zField, - }; + ToJsonNullFromJsonTruePrivate instance, +) => { + 'aField': instance.aField, + 'field': instance._field, + 'zField': instance.zField, +}; ToJsonNullFromJsonFalsePrivate _$ToJsonNullFromJsonFalsePrivateFromJson( - Map json) => - ToJsonNullFromJsonFalsePrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonNullFromJsonFalsePrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonNullFromJsonFalsePrivateToJson( - ToJsonNullFromJsonFalsePrivate instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonNullFromJsonFalsePrivate instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonTrueFromJsonNullPrivate _$ToJsonTrueFromJsonNullPrivateFromJson( - Map json) => - ToJsonTrueFromJsonNullPrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonNullPrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonNullPrivateToJson( - ToJsonTrueFromJsonNullPrivate instance) => - { - 'aField': instance.aField, - 'field': instance._field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonNullPrivate instance, +) => { + 'aField': instance.aField, + 'field': instance._field, + 'zField': instance.zField, +}; ToJsonTrueFromJsonTruePrivate _$ToJsonTrueFromJsonTruePrivateFromJson( - Map json) => - ToJsonTrueFromJsonTruePrivate() - ..aField = (json['aField'] as num?)?.toInt() - .._field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonTruePrivate() + ..aField = (json['aField'] as num?)?.toInt() + .._field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonTruePrivateToJson( - ToJsonTrueFromJsonTruePrivate instance) => - { - 'aField': instance.aField, - 'field': instance._field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonTruePrivate instance, +) => { + 'aField': instance.aField, + 'field': instance._field, + 'zField': instance.zField, +}; ToJsonTrueFromJsonFalsePrivate _$ToJsonTrueFromJsonFalsePrivateFromJson( - Map json) => - ToJsonTrueFromJsonFalsePrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonTrueFromJsonFalsePrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonTrueFromJsonFalsePrivateToJson( - ToJsonTrueFromJsonFalsePrivate instance) => - { - 'aField': instance.aField, - 'field': instance._field, - 'zField': instance.zField, - }; + ToJsonTrueFromJsonFalsePrivate instance, +) => { + 'aField': instance.aField, + 'field': instance._field, + 'zField': instance.zField, +}; ToJsonFalseFromJsonNullPrivate _$ToJsonFalseFromJsonNullPrivateFromJson( - Map json) => - ToJsonFalseFromJsonNullPrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonNullPrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonNullPrivateToJson( - ToJsonFalseFromJsonNullPrivate instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonNullPrivate instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonFalseFromJsonTruePrivate _$ToJsonFalseFromJsonTruePrivateFromJson( - Map json) => - ToJsonFalseFromJsonTruePrivate() - ..aField = (json['aField'] as num?)?.toInt() - .._field = (json['field'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonTruePrivate() + ..aField = (json['aField'] as num?)?.toInt() + .._field = (json['field'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonTruePrivateToJson( - ToJsonFalseFromJsonTruePrivate instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonTruePrivate instance, +) => {'aField': instance.aField, 'zField': instance.zField}; ToJsonFalseFromJsonFalsePrivate _$ToJsonFalseFromJsonFalsePrivateFromJson( - Map json) => - ToJsonFalseFromJsonFalsePrivate() - ..aField = (json['aField'] as num?)?.toInt() - ..zField = (json['zField'] as num?)?.toInt(); + Map json, +) => ToJsonFalseFromJsonFalsePrivate() + ..aField = (json['aField'] as num?)?.toInt() + ..zField = (json['zField'] as num?)?.toInt(); Map _$ToJsonFalseFromJsonFalsePrivateToJson( - ToJsonFalseFromJsonFalsePrivate instance) => - { - 'aField': instance.aField, - 'zField': instance.zField, - }; + ToJsonFalseFromJsonFalsePrivate instance, +) => {'aField': instance.aField, 'zField': instance.zField}; diff --git a/json_serializable/test/generic_files/generic_argument_factories.dart b/json_serializable/test/generic_files/generic_argument_factories.dart index 0ebb09d69..b87154632 100644 --- a/json_serializable/test/generic_files/generic_argument_factories.dart +++ b/json_serializable/test/generic_files/generic_argument_factories.dart @@ -14,24 +14,18 @@ class GenericClassWithHelpers { final Set someSet; - GenericClassWithHelpers( - this.value, - this.list, - this.someSet, - ); + GenericClassWithHelpers(this.value, this.list, this.someSet); factory GenericClassWithHelpers.fromJson( Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, - ) => - _$GenericClassWithHelpersFromJson(json, fromJsonT, fromJsonS); + ) => _$GenericClassWithHelpersFromJson(json, fromJsonT, fromJsonS); Map toJson( Object? Function(T value) toJsonT, Object? Function(S value) toJsonS, - ) => - _$GenericClassWithHelpersToJson(this, toJsonT, toJsonS); + ) => _$GenericClassWithHelpersToJson(this, toJsonT, toJsonS); } @JsonSerializable() diff --git a/json_serializable/test/generic_files/generic_argument_factories.g.dart b/json_serializable/test/generic_files/generic_argument_factories.g.dart index 3ae8ac8e1..a4d098d52 100644 --- a/json_serializable/test/generic_files/generic_argument_factories.g.dart +++ b/json_serializable/test/generic_files/generic_argument_factories.g.dart @@ -12,46 +12,44 @@ GenericClassWithHelpers _$GenericClassWithHelpersFromJson( Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, -) => - GenericClassWithHelpers( - fromJsonT(json['value']), - (json['list'] as List).map(fromJsonT).toList(), - (json['someSet'] as List).map(fromJsonS).toSet(), - ); +) => GenericClassWithHelpers( + fromJsonT(json['value']), + (json['list'] as List).map(fromJsonT).toList(), + (json['someSet'] as List).map(fromJsonS).toSet(), +); Map _$GenericClassWithHelpersToJson( GenericClassWithHelpers instance, Object? Function(T value) toJsonT, Object? Function(S value) toJsonS, -) => - { - 'value': toJsonT(instance.value), - 'list': instance.list.map(toJsonT).toList(), - 'someSet': instance.someSet.map(toJsonS).toList(), - }; +) => { + 'value': toJsonT(instance.value), + 'list': instance.list.map(toJsonT).toList(), + 'someSet': instance.someSet.map(toJsonS).toList(), +}; ConcreteClass _$ConcreteClassFromJson(Map json) => ConcreteClass( GenericClassWithHelpers.fromJson( - json['value'] as Map, - (value) => (value as num).toInt(), - (value) => value as String), + json['value'] as Map, + (value) => (value as num).toInt(), + (value) => value as String, + ), GenericClassWithHelpers.fromJson( - json['value2'] as Map, - (value) => (value as num).toDouble(), - (value) => BigInt.parse(value as String)), + json['value2'] as Map, + (value) => (value as num).toDouble(), + (value) => BigInt.parse(value as String), + ), GenericClassWithHelpers.fromJson( - json['value3'] as Map, - (value) => (value as num?)?.toDouble(), - (value) => value == null ? null : BigInt.parse(value as String)), + json['value3'] as Map, + (value) => (value as num?)?.toDouble(), + (value) => value == null ? null : BigInt.parse(value as String), + ), ); Map _$ConcreteClassToJson(ConcreteClass instance) => { - 'value': instance.value.toJson( - (value) => value, - (value) => value, - ), + 'value': instance.value.toJson((value) => value, (value) => value), 'value2': instance.value2.toJson( (value) => value, (value) => value.toString(), diff --git a/json_serializable/test/generic_files/generic_argument_factories_nullable.dart b/json_serializable/test/generic_files/generic_argument_factories_nullable.dart index 882ad4de5..f883c140f 100644 --- a/json_serializable/test/generic_files/generic_argument_factories_nullable.dart +++ b/json_serializable/test/generic_files/generic_argument_factories_nullable.dart @@ -14,24 +14,18 @@ class GenericClassWithHelpersNullable { final Set? someSet; - GenericClassWithHelpersNullable({ - this.value, - this.list, - this.someSet, - }); + GenericClassWithHelpersNullable({this.value, this.list, this.someSet}); factory GenericClassWithHelpersNullable.fromJson( Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, - ) => - _$GenericClassWithHelpersNullableFromJson(json, fromJsonT, fromJsonS); + ) => _$GenericClassWithHelpersNullableFromJson(json, fromJsonT, fromJsonS); Map toJson( Object? Function(T value) toJsonT, Object? Function(S value) toJsonS, - ) => - _$GenericClassWithHelpersNullableToJson(this, toJsonT, toJsonS); + ) => _$GenericClassWithHelpersNullableToJson(this, toJsonT, toJsonS); } @JsonSerializable() diff --git a/json_serializable/test/generic_files/generic_argument_factories_nullable.g.dart b/json_serializable/test/generic_files/generic_argument_factories_nullable.g.dart index 626fa171a..556ec9de1 100644 --- a/json_serializable/test/generic_files/generic_argument_factories_nullable.g.dart +++ b/json_serializable/test/generic_files/generic_argument_factories_nullable.g.dart @@ -9,78 +9,74 @@ part of 'generic_argument_factories_nullable.dart'; // ************************************************************************** GenericClassWithHelpersNullable - _$GenericClassWithHelpersNullableFromJson( +_$GenericClassWithHelpersNullableFromJson( Map json, T Function(Object? json) fromJsonT, S Function(Object? json) fromJsonS, -) => - GenericClassWithHelpersNullable( - value: _$nullableGenericFromJson(json['value'], fromJsonT), - list: (json['list'] as List?) - ?.map((e) => _$nullableGenericFromJson(e, fromJsonT)) - .toList(), - someSet: (json['someSet'] as List?) - ?.map((e) => _$nullableGenericFromJson(e, fromJsonS)) - .toSet(), - ); +) => GenericClassWithHelpersNullable( + value: _$nullableGenericFromJson(json['value'], fromJsonT), + list: (json['list'] as List?) + ?.map((e) => _$nullableGenericFromJson(e, fromJsonT)) + .toList(), + someSet: (json['someSet'] as List?) + ?.map((e) => _$nullableGenericFromJson(e, fromJsonS)) + .toSet(), +); Map _$GenericClassWithHelpersNullableToJson( GenericClassWithHelpersNullable instance, Object? Function(T value) toJsonT, Object? Function(S value) toJsonS, -) => - { - 'value': _$nullableGenericToJson(instance.value, toJsonT), - 'list': instance.list - ?.map((e) => _$nullableGenericToJson(e, toJsonT)) - .toList(), - 'someSet': instance.someSet - ?.map((e) => _$nullableGenericToJson(e, toJsonS)) - .toList(), - }; +) => { + 'value': _$nullableGenericToJson(instance.value, toJsonT), + 'list': instance.list + ?.map((e) => _$nullableGenericToJson(e, toJsonT)) + .toList(), + 'someSet': instance.someSet + ?.map((e) => _$nullableGenericToJson(e, toJsonS)) + .toList(), +}; T? _$nullableGenericFromJson( Object? input, T Function(Object? json) fromJson, -) => - input == null ? null : fromJson(input); +) => input == null ? null : fromJson(input); Object? _$nullableGenericToJson( T? input, Object? Function(T value) toJson, -) => - input == null ? null : toJson(input); +) => input == null ? null : toJson(input); ConcreteClassNullable _$ConcreteClassNullableFromJson( - Map json) => - ConcreteClassNullable( - GenericClassWithHelpersNullable.fromJson( - json['value'] as Map, - (value) => (value as num).toInt(), - (value) => value as String), - GenericClassWithHelpersNullable.fromJson( - json['value2'] as Map, - (value) => (value as num).toDouble(), - (value) => BigInt.parse(value as String)), - GenericClassWithHelpersNullable.fromJson( - json['value3'] as Map, - (value) => (value as num?)?.toDouble(), - (value) => value == null ? null : BigInt.parse(value as String)), - ); + Map json, +) => ConcreteClassNullable( + GenericClassWithHelpersNullable.fromJson( + json['value'] as Map, + (value) => (value as num).toInt(), + (value) => value as String, + ), + GenericClassWithHelpersNullable.fromJson( + json['value2'] as Map, + (value) => (value as num).toDouble(), + (value) => BigInt.parse(value as String), + ), + GenericClassWithHelpersNullable.fromJson( + json['value3'] as Map, + (value) => (value as num?)?.toDouble(), + (value) => value == null ? null : BigInt.parse(value as String), + ), +); Map _$ConcreteClassNullableToJson( - ConcreteClassNullable instance) => - { - 'value': instance.value.toJson( - (value) => value, - (value) => value, - ), - 'value2': instance.value2.toJson( - (value) => value, - (value) => value.toString(), - ), - 'value3': instance.value3.toJson( - (value) => value, - (value) => value?.toString(), - ), - }; + ConcreteClassNullable instance, +) => { + 'value': instance.value.toJson((value) => value, (value) => value), + 'value2': instance.value2.toJson( + (value) => value, + (value) => value.toString(), + ), + 'value3': instance.value3.toJson( + (value) => value, + (value) => value?.toString(), + ), +}; diff --git a/json_serializable/test/generic_files/generic_class.dart b/json_serializable/test/generic_files/generic_class.dart index 8c8b8d715..196bfeaca 100644 --- a/json_serializable/test/generic_files/generic_class.dart +++ b/json_serializable/test/generic_files/generic_class.dart @@ -34,13 +34,17 @@ class GenericClass { Map toJson() => _$GenericClassToJson(this); - static T _dataFromJson(Map input, - [S? other1, U? other2]) => - input['value'] as T; - - static Map _dataToJson(T input, - [S? other1, U? other2]) => - {'value': input}; + static T _dataFromJson( + Map input, [ + S? other1, + U? other2, + ]) => input['value'] as T; + + static Map _dataToJson( + T input, [ + S? other1, + U? other2, + ]) => {'value': input}; } @JsonSerializable() @@ -153,8 +157,9 @@ class Issue1047ParentClass { Issue1047ParentClass({required this.edges}); factory Issue1047ParentClass.fromJson( - Map json, T Function(Object? json) fromJsonT) => - _$Issue1047ParentClassFromJson(json, fromJsonT); + Map json, + T Function(Object? json) fromJsonT, + ) => _$Issue1047ParentClassFromJson(json, fromJsonT); final List> edges; @@ -164,15 +169,12 @@ class Issue1047ParentClass { @JsonSerializable(genericArgumentFactories: true) class Issue1047Class { - Issue1047Class({ - required this.node, - }); + Issue1047Class({required this.node}); factory Issue1047Class.fromJson( Map json, T Function(Object? json) fromJsonT, - ) => - _$Issue1047ClassFromJson(json, fromJsonT); + ) => _$Issue1047ClassFromJson(json, fromJsonT); final T node; diff --git a/json_serializable/test/generic_files/generic_class.g.dart b/json_serializable/test/generic_files/generic_class.g.dart index 104eec1d6..4b260a766 100644 --- a/json_serializable/test/generic_files/generic_class.g.dart +++ b/json_serializable/test/generic_files/generic_class.g.dart @@ -9,122 +9,127 @@ part of 'generic_class.dart'; // ************************************************************************** GenericClass _$GenericClassFromJson( - Map json) => - GenericClass() - ..fieldObject = GenericClass._dataFromJson( - json['fieldObject'] as Map) - ..fieldDynamic = GenericClass._dataFromJson( - json['fieldDynamic'] as Map) - ..fieldInt = - GenericClass._dataFromJson(json['fieldInt'] as Map) - ..fieldT = - GenericClass._dataFromJson(json['fieldT'] as Map) - ..fieldS = - GenericClass._dataFromJson(json['fieldS'] as Map); + Map json, +) => GenericClass() + ..fieldObject = GenericClass._dataFromJson( + json['fieldObject'] as Map, + ) + ..fieldDynamic = GenericClass._dataFromJson( + json['fieldDynamic'] as Map, + ) + ..fieldInt = GenericClass._dataFromJson( + json['fieldInt'] as Map, + ) + ..fieldT = GenericClass._dataFromJson(json['fieldT'] as Map) + ..fieldS = GenericClass._dataFromJson(json['fieldS'] as Map); Map _$GenericClassToJson( - GenericClass instance) => - { - 'fieldObject': GenericClass._dataToJson(instance.fieldObject), - 'fieldDynamic': GenericClass._dataToJson(instance.fieldDynamic), - 'fieldInt': GenericClass._dataToJson(instance.fieldInt), - 'fieldT': GenericClass._dataToJson(instance.fieldT), - 'fieldS': GenericClass._dataToJson(instance.fieldS), - }; + GenericClass instance, +) => { + 'fieldObject': GenericClass._dataToJson(instance.fieldObject), + 'fieldDynamic': GenericClass._dataToJson(instance.fieldDynamic), + 'fieldInt': GenericClass._dataToJson(instance.fieldInt), + 'fieldT': GenericClass._dataToJson(instance.fieldT), + 'fieldS': GenericClass._dataToJson(instance.fieldS), +}; -GenericClassWithConverter - _$GenericClassWithConverterFromJson( - Map json) => - GenericClassWithConverter() - ..fieldObject = json['fieldObject'] - ..fieldDynamic = json['fieldDynamic'] - ..fieldInt = (json['fieldInt'] as num?)?.toInt() - ..fieldT = _$JsonConverterFromJson, T>( - json['fieldT'], _SimpleConverter().fromJson) - ..fieldS = _$JsonConverterFromJson, S>( - json['fieldS'], _SimpleConverter().fromJson) - ..duration = const _DurationMillisecondConverter.named() - .fromJson((json['duration'] as num?)?.toInt()) - ..listDuration = const _DurationListMillisecondConverter() - .fromJson((json['listDuration'] as num?)?.toInt()); +GenericClassWithConverter _$GenericClassWithConverterFromJson< + T extends num, + S +>(Map json) => GenericClassWithConverter() + ..fieldObject = json['fieldObject'] + ..fieldDynamic = json['fieldDynamic'] + ..fieldInt = (json['fieldInt'] as num?)?.toInt() + ..fieldT = _$JsonConverterFromJson, T>( + json['fieldT'], + _SimpleConverter().fromJson, + ) + ..fieldS = _$JsonConverterFromJson, S>( + json['fieldS'], + _SimpleConverter().fromJson, + ) + ..duration = const _DurationMillisecondConverter.named().fromJson( + (json['duration'] as num?)?.toInt(), + ) + ..listDuration = const _DurationListMillisecondConverter().fromJson( + (json['listDuration'] as num?)?.toInt(), + ); Map _$GenericClassWithConverterToJson( - GenericClassWithConverter instance) => - { - 'fieldObject': instance.fieldObject, - 'fieldDynamic': instance.fieldDynamic, - 'fieldInt': instance.fieldInt, - 'fieldT': _$JsonConverterToJson, T>( - instance.fieldT, _SimpleConverter().toJson), - 'fieldS': _$JsonConverterToJson, S>( - instance.fieldS, _SimpleConverter().toJson), - 'duration': - const _DurationMillisecondConverter.named().toJson(instance.duration), - 'listDuration': const _DurationListMillisecondConverter() - .toJson(instance.listDuration), - }; + GenericClassWithConverter instance, +) => { + 'fieldObject': instance.fieldObject, + 'fieldDynamic': instance.fieldDynamic, + 'fieldInt': instance.fieldInt, + 'fieldT': _$JsonConverterToJson, T>( + instance.fieldT, + _SimpleConverter().toJson, + ), + 'fieldS': _$JsonConverterToJson, S>( + instance.fieldS, + _SimpleConverter().toJson, + ), + 'duration': const _DurationMillisecondConverter.named().toJson( + instance.duration, + ), + 'listDuration': const _DurationListMillisecondConverter().toJson( + instance.listDuration, + ), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); Issue980ParentClass _$Issue980ParentClassFromJson(Map json) => Issue980ParentClass( (json['list'] as List) - .map((e) => - Issue980GenericClass.fromJson(e as Map)) + .map( + (e) => + Issue980GenericClass.fromJson(e as Map), + ) .toList(), ); Map _$Issue980ParentClassToJson( - Issue980ParentClass instance) => - { - 'list': instance.list, - }; + Issue980ParentClass instance, +) => {'list': instance.list}; Issue1047ParentClass _$Issue1047ParentClassFromJson( Map json, T Function(Object? json) fromJsonT, -) => - Issue1047ParentClass( - edges: (json['edges'] as List) - .map((e) => Issue1047Class.fromJson( - e as Map, (value) => fromJsonT(value))) - .toList(), - ); +) => Issue1047ParentClass( + edges: (json['edges'] as List) + .map( + (e) => Issue1047Class.fromJson( + e as Map, + (value) => fromJsonT(value), + ), + ) + .toList(), +); Map _$Issue1047ParentClassToJson( Issue1047ParentClass instance, Object? Function(T value) toJsonT, -) => - { - 'edges': instance.edges - .map((e) => e.toJson( - (value) => toJsonT(value), - )) - .toList(), - }; +) => { + 'edges': instance.edges + .map((e) => e.toJson((value) => toJsonT(value))) + .toList(), +}; Issue1047Class _$Issue1047ClassFromJson( Map json, T Function(Object? json) fromJsonT, -) => - Issue1047Class( - node: fromJsonT(json['node']), - ); +) => Issue1047Class(node: fromJsonT(json['node'])); Map _$Issue1047ClassToJson( Issue1047Class instance, Object? Function(T value) toJsonT, -) => - { - 'node': toJsonT(instance.node), - }; +) => {'node': toJsonT(instance.node)}; diff --git a/json_serializable/test/generic_files/generic_test.dart b/json_serializable/test/generic_files/generic_test.dart index ea509a471..9cdc7daa5 100644 --- a/json_serializable/test/generic_files/generic_test.dart +++ b/json_serializable/test/generic_files/generic_test.dart @@ -14,36 +14,43 @@ import 'generic_class.dart'; void main() { group('generic', () { GenericClass roundTripGenericClass( - GenericClass p) { + GenericClass p, + ) { final outputJson = loudEncode(p); final p2 = GenericClass.fromJson( - jsonDecode(outputJson) as Map); + jsonDecode(outputJson) as Map, + ); final outputJson2 = loudEncode(p2); expect(outputJson2, outputJson); return p2; } test('no type args', () { - // ignore: inference_failure_on_instance_creation - roundTripGenericClass(GenericClass() - ..fieldDynamic = 1 - ..fieldInt = 2 - ..fieldObject = 3 - ..fieldT = 5 - ..fieldS = 'six'); + roundTripGenericClass( + // ignore: inference_failure_on_instance_creation + GenericClass() + ..fieldDynamic = 1 + ..fieldInt = 2 + ..fieldObject = 3 + ..fieldT = 5 + ..fieldS = 'six', + ); }); test('with type arguments', () { - roundTripGenericClass(GenericClass() - ..fieldDynamic = 1 - ..fieldInt = 2 - ..fieldObject = 3 - ..fieldT = 5.0 - ..fieldS = 'six'); + roundTripGenericClass( + GenericClass() + ..fieldDynamic = 1 + ..fieldInt = 2 + ..fieldObject = 3 + ..fieldT = 5.0 + ..fieldS = 'six', + ); }); test('with bad arguments', () { expect( - () => GenericClass() - ..fieldT = (true as dynamic) as double, + () => + GenericClass() + ..fieldT = (true as dynamic) as double, throwsTypeError, ); }); @@ -179,7 +186,7 @@ void main() { ], someSet: { const Duration(milliseconds: 3), - const Duration(milliseconds: 4) + const Duration(milliseconds: 4), }, ); @@ -192,10 +199,10 @@ void main() { final decoded = GenericClassWithHelpersNullable.fromJson( - jsonDecode(encodedJson) as Map, - (value) => DateTime.parse(value as String), - (value) => Duration(milliseconds: (value as num).toInt()), - ); + jsonDecode(encodedJson) as Map, + (value) => DateTime.parse(value as String), + (value) => Duration(milliseconds: (value as num).toInt()), + ); final encodedJson2 = loudEncode( decoded.toJson(encodeDateTime, encodeDuration), @@ -207,10 +214,7 @@ void main() { test('basic round-trip with null values', () { final instance = GenericClassWithHelpersNullable( //value: null, // value is null by omission - list: [ - null, - DateTime.fromMillisecondsSinceEpoch(2).toUtc(), - ], + list: [null, DateTime.fromMillisecondsSinceEpoch(2).toUtc()], someSet: {null, const Duration(milliseconds: 4)}, ); @@ -223,10 +227,10 @@ void main() { final decoded = GenericClassWithHelpersNullable.fromJson( - jsonDecode(encodedJson) as Map, - (value) => DateTime.parse(value as String), - (value) => Duration(milliseconds: (value as num).toInt()), - ); + jsonDecode(encodedJson) as Map, + (value) => DateTime.parse(value as String), + (value) => Duration(milliseconds: (value as num).toInt()), + ); final encodedJson2 = loudEncode( decoded.toJson(encodeDateTime, encodeDuration), @@ -320,10 +324,7 @@ void main() { test('issue 980 regression test', () { roundTripObject( - Issue980ParentClass([ - Issue980GenericClass(45), - Issue980GenericClass(42), - ]), + Issue980ParentClass([Issue980GenericClass(45), Issue980GenericClass(42)]), Issue980ParentClass.fromJson, ); }); @@ -332,8 +333,8 @@ void main() { _roundTrip( sourceJson: { 'edges': [ - {'node': '42'} - ] + {'node': '42'}, + ], }, genericEncode: (o) => o.toString(), genericDecode: (o) => int.parse(o as String), diff --git a/json_serializable/test/integration/converter_examples.dart b/json_serializable/test/integration/converter_examples.dart index 9641b966b..73be3828f 100644 --- a/json_serializable/test/integration/converter_examples.dart +++ b/json_serializable/test/integration/converter_examples.dart @@ -110,9 +110,7 @@ class Regression1229 { @JsonKey(includeIfNull: false) final DateTime? date; - Regression1229({ - this.date, - }); + Regression1229({this.date}); factory Regression1229.fromJson(Map json) => _$Regression1229FromJson(json); diff --git a/json_serializable/test/integration/converter_examples.g.dart b/json_serializable/test/integration/converter_examples.g.dart index f19c8fc2e..d91d76d93 100644 --- a/json_serializable/test/integration/converter_examples.g.dart +++ b/json_serializable/test/integration/converter_examples.g.dart @@ -9,43 +9,45 @@ part of 'converter_examples.dart'; // ************************************************************************** Issue1202RegressionClass _$Issue1202RegressionClassFromJson( - Map json) => - Issue1202RegressionClass( - value: $enumDecode(_$Issue1202RegressionEnumEnumMap, json['value']), - normalNullableValue: (json['normalNullableValue'] as num?)?.toInt(), - notNullableValueWithNullableConverter: - const _Issue1202RegressionConverter().fromJson( - json['notNullableValueWithNullableConverter'] as String?), - notNullableValueWithConverter: - const _Issue1202RegressionNotNullConverter() - .fromJson(json['notNullableValueWithConverter'] as String), - valueWithFunctions: Issue1202RegressionClass._fromJson( - json['valueWithFunctions'] as String), - valueWithNullableFunctions: Issue1202RegressionClass._fromJsonNullable( - json['valueWithNullableFunctions'] as String?), - ); + Map json, +) => Issue1202RegressionClass( + value: $enumDecode(_$Issue1202RegressionEnumEnumMap, json['value']), + normalNullableValue: (json['normalNullableValue'] as num?)?.toInt(), + notNullableValueWithNullableConverter: const _Issue1202RegressionConverter() + .fromJson(json['notNullableValueWithNullableConverter'] as String?), + notNullableValueWithConverter: const _Issue1202RegressionNotNullConverter() + .fromJson(json['notNullableValueWithConverter'] as String), + valueWithFunctions: Issue1202RegressionClass._fromJson( + json['valueWithFunctions'] as String, + ), + valueWithNullableFunctions: Issue1202RegressionClass._fromJsonNullable( + json['valueWithNullableFunctions'] as String?, + ), +); Map _$Issue1202RegressionClassToJson( - Issue1202RegressionClass instance) => - { - 'valueWithFunctions': - Issue1202RegressionClass._toJson(instance.valueWithFunctions), - 'notNullableValueWithConverter': - const _Issue1202RegressionNotNullConverter() - .toJson(instance.notNullableValueWithConverter), - if (_$Issue1202RegressionEnumEnumMap[instance.value] case final value?) - 'value': value, - if (instance.normalNullableValue case final value?) - 'normalNullableValue': value, - if (const _Issue1202RegressionConverter() - .toJson(instance.notNullableValueWithNullableConverter) - case final value?) - 'notNullableValueWithNullableConverter': value, - if (Issue1202RegressionClass._toJsonNullable( - instance.valueWithNullableFunctions) - case final value?) - 'valueWithNullableFunctions': value, - }; + Issue1202RegressionClass instance, +) => { + 'valueWithFunctions': Issue1202RegressionClass._toJson( + instance.valueWithFunctions, + ), + 'notNullableValueWithConverter': const _Issue1202RegressionNotNullConverter() + .toJson(instance.notNullableValueWithConverter), + if (_$Issue1202RegressionEnumEnumMap[instance.value] case final value?) + 'value': value, + if (instance.normalNullableValue case final value?) + 'normalNullableValue': value, + if (const _Issue1202RegressionConverter().toJson( + instance.notNullableValueWithNullableConverter, + ) + case final value?) + 'notNullableValueWithNullableConverter': value, + if (Issue1202RegressionClass._toJsonNullable( + instance.valueWithNullableFunctions, + ) + case final value?) + 'valueWithNullableFunctions': value, +}; const _$Issue1202RegressionEnumEnumMap = { Issue1202RegressionEnum.normalValue: 42, @@ -55,13 +57,17 @@ const _$Issue1202RegressionEnumEnumMap = { Regression1229 _$Regression1229FromJson(Map json) => Regression1229( date: _$JsonConverterFromJson( - json['date'], const DateTimeConverter().fromJson), + json['date'], + const DateTimeConverter().fromJson, + ), ); Map _$Regression1229ToJson(Regression1229 instance) => { if (_$JsonConverterToJson( - instance.date, const DateTimeConverter().toJson) + instance.date, + const DateTimeConverter().toJson, + ) case final value?) 'date': value, }; @@ -69,11 +75,9 @@ Map _$Regression1229ToJson(Regression1229 instance) => Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); diff --git a/json_serializable/test/integration/create_per_field_to_json_example.dart b/json_serializable/test/integration/create_per_field_to_json_example.dart index 8eb3f5e9e..d086253f3 100644 --- a/json_serializable/test/integration/create_per_field_to_json_example.dart +++ b/json_serializable/test/integration/create_per_field_to_json_example.dart @@ -2,10 +2,7 @@ import 'package:json_annotation/json_annotation.dart'; part 'create_per_field_to_json_example.g.dart'; -@JsonSerializable( - createPerFieldToJson: true, - explicitToJson: true, -) +@JsonSerializable(createPerFieldToJson: true, explicitToJson: true) class Model { Model({ required this.firstName, @@ -56,21 +53,14 @@ class Nested { Map toJson() => _$NestedToJson(this); } -@JsonSerializable( - createPerFieldToJson: true, - genericArgumentFactories: true, -) +@JsonSerializable(createPerFieldToJson: true, genericArgumentFactories: true) class GenericFactory { - GenericFactory( - this.value, - this.map, - ); + GenericFactory(this.value, this.map); factory GenericFactory.fromJson( Map json, T Function(Object? json) fromJsonT, - ) => - _$GenericFactoryFromJson(json, fromJsonT); + ) => _$GenericFactoryFromJson(json, fromJsonT); final T value; final Map map; diff --git a/json_serializable/test/integration/create_per_field_to_json_example.g.dart b/json_serializable/test/integration/create_per_field_to_json_example.g.dart index 28f3443a5..14d7d9f0f 100644 --- a/json_serializable/test/integration/create_per_field_to_json_example.g.dart +++ b/json_serializable/test/integration/create_per_field_to_json_example.g.dart @@ -9,22 +9,22 @@ part of 'create_per_field_to_json_example.dart'; // ************************************************************************** Model _$ModelFromJson(Map json) => Model( - firstName: json['firstName'] as String, - lastName: json['lastName'] as String, - enumValue: $enumDecodeNullable(_$EnumValueEnumMap, json['enumValue']), - nested: json['nested'] == null - ? null - : Nested.fromJson(json['nested'] as Map), - nestedExcludeIfNull: json['nestedExcludeIfNull'] == null - ? null - : Nested.fromJson( - json['nestedExcludeIfNull'] as Map), - nestedGeneric: json['nestedGeneric'] == null - ? null - : GenericFactory.fromJson( - json['nestedGeneric'] as Map, - (value) => (value as num).toInt()), - ); + firstName: json['firstName'] as String, + lastName: json['lastName'] as String, + enumValue: $enumDecodeNullable(_$EnumValueEnumMap, json['enumValue']), + nested: json['nested'] == null + ? null + : Nested.fromJson(json['nested'] as Map), + nestedExcludeIfNull: json['nestedExcludeIfNull'] == null + ? null + : Nested.fromJson(json['nestedExcludeIfNull'] as Map), + nestedGeneric: json['nestedGeneric'] == null + ? null + : GenericFactory.fromJson( + json['nestedGeneric'] as Map, + (value) => (value as num).toInt(), + ), +); // ignore: unused_element abstract class _$ModelPerFieldToJson { @@ -38,73 +38,59 @@ abstract class _$ModelPerFieldToJson { static Object? nested(Nested? instance) => instance?.toJson(); // ignore: unused_element static Object? nestedGeneric(GenericFactory? instance) => - instance?.toJson( - (value) => value, - ); + instance?.toJson((value) => value); // ignore: unused_element static Object? nestedExcludeIfNull(Nested? instance) => instance?.toJson(); } Map _$ModelToJson(Model instance) => { - 'firstName': instance.firstName, - 'lastName': instance.lastName, - 'enumValue': _$EnumValueEnumMap[instance.enumValue], - 'nested': instance.nested?.toJson(), - 'nestedGeneric': instance.nestedGeneric?.toJson( - (value) => value, - ), - if (instance.nestedExcludeIfNull?.toJson() case final value?) - 'nestedExcludeIfNull': value, - }; - -const _$EnumValueEnumMap = { - EnumValue.first: '1', - EnumValue.second: 'second', + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'enumValue': _$EnumValueEnumMap[instance.enumValue], + 'nested': instance.nested?.toJson(), + 'nestedGeneric': instance.nestedGeneric?.toJson((value) => value), + if (instance.nestedExcludeIfNull?.toJson() case final value?) + 'nestedExcludeIfNull': value, }; -Nested _$NestedFromJson(Map json) => Nested( - json['value'] as String, - ); +const _$EnumValueEnumMap = {EnumValue.first: '1', EnumValue.second: 'second'}; + +Nested _$NestedFromJson(Map json) => + Nested(json['value'] as String); Map _$NestedToJson(Nested instance) => { - 'value': instance.value, - }; + 'value': instance.value, +}; GenericFactory _$GenericFactoryFromJson( Map json, T Function(Object? json) fromJsonT, -) => - GenericFactory( - fromJsonT(json['value']), - (json['map'] as Map).map( - (k, e) => MapEntry(k, fromJsonT(e)), - ), - ); +) => GenericFactory( + fromJsonT(json['value']), + (json['map'] as Map).map( + (k, e) => MapEntry(k, fromJsonT(e)), + ), +); // ignore: unused_element abstract class _$GenericFactoryPerFieldToJson { // ignore: unused_element - static Object? value( - T instance, - Object? Function(T value) toJsonT, - ) => + static Object? value(T instance, Object? Function(T value) toJsonT) => toJsonT(instance); // ignore: unused_element static Object? map( Map instance, Object? Function(T value) toJsonT, - ) => - instance.map((k, e) => MapEntry(k, toJsonT(e))); + ) => instance.map((k, e) => MapEntry(k, toJsonT(e))); } Map _$GenericFactoryToJson( GenericFactory instance, Object? Function(T value) toJsonT, -) => - { - 'value': toJsonT(instance.value), - 'map': instance.map.map((k, e) => MapEntry(k, toJsonT(e))), - }; +) => { + 'value': toJsonT(instance.value), + 'map': instance.map.map((k, e) => MapEntry(k, toJsonT(e))), +}; // ignore: unused_element abstract class _$PrivateModelPerFieldToJson { @@ -113,6 +99,4 @@ abstract class _$PrivateModelPerFieldToJson { } Map _$PrivateModelToJson(_PrivateModel instance) => - { - 'full-name': instance.fullName, - }; + {'full-name': instance.fullName}; diff --git a/json_serializable/test/integration/field_map_example.dart b/json_serializable/test/integration/field_map_example.dart index a9dba2475..3eef44693 100644 --- a/json_serializable/test/integration/field_map_example.dart +++ b/json_serializable/test/integration/field_map_example.dart @@ -4,11 +4,7 @@ part 'field_map_example.g.dart'; @JsonSerializable(createFieldMap: true, fieldRename: FieldRename.kebab) class Model { - Model({ - required this.firstName, - required this.lastName, - this.ignoredName, - }); + Model({required this.firstName, required this.lastName, this.ignoredName}); factory Model.fromJson(Map json) => _$ModelFromJson(json); diff --git a/json_serializable/test/integration/field_map_example.g.dart b/json_serializable/test/integration/field_map_example.g.dart index d47e01793..fcf6cb864 100644 --- a/json_serializable/test/integration/field_map_example.g.dart +++ b/json_serializable/test/integration/field_map_example.g.dart @@ -9,9 +9,9 @@ part of 'field_map_example.dart'; // ************************************************************************** Model _$ModelFromJson(Map json) => Model( - firstName: json['first-name'] as String, - lastName: json['LAST_NAME'] as String, - ); + firstName: json['first-name'] as String, + lastName: json['LAST_NAME'] as String, +); const _$ModelFieldMap = { 'firstName': 'first-name', @@ -19,15 +19,11 @@ const _$ModelFieldMap = { }; Map _$ModelToJson(Model instance) => { - 'first-name': instance.firstName, - 'LAST_NAME': instance.lastName, - }; - -const _$PrivateModelFieldMap = { - 'fullName': 'full-name', + 'first-name': instance.firstName, + 'LAST_NAME': instance.lastName, }; +const _$PrivateModelFieldMap = {'fullName': 'full-name'}; + Map _$PrivateModelToJson(_PrivateModel instance) => - { - 'full-name': instance.fullName, - }; + {'full-name': instance.fullName}; diff --git a/json_serializable/test/integration/integration_test.dart b/json_serializable/test/integration/integration_test.dart index 6aef150f2..9cc5d0948 100644 --- a/json_serializable/test/integration/integration_test.dart +++ b/json_serializable/test/integration/integration_test.dart @@ -24,13 +24,27 @@ void main() { } test('now', () { - roundTripPerson(Person('a', 'b', Category.charmed, - middleName: 'c', dateOfBirth: DateTime.now())); + roundTripPerson( + Person( + 'a', + 'b', + Category.charmed, + middleName: 'c', + dateOfBirth: DateTime.now(), + ), + ); }); test('now toUtc', () { - roundTripPerson(Person('a', 'b', Category.bottom, - middleName: 'c', dateOfBirth: DateTime.now().toUtc())); + roundTripPerson( + Person( + 'a', + 'b', + Category.bottom, + middleName: 'c', + dateOfBirth: DateTime.now().toUtc(), + ), + ); }); test('empty json', () { @@ -59,25 +73,30 @@ void main() { test('null', () { roundTripOrder( - Order.custom(Category.charmed)..statusCode = StatusCode.success); + Order.custom(Category.charmed)..statusCode = StatusCode.success, + ); }); test('empty', () { - roundTripOrder(Order.custom(Category.strange, const []) - ..statusCode = StatusCode.success - ..count = 0 - ..isRushed = false); + roundTripOrder( + Order.custom(Category.strange, const []) + ..statusCode = StatusCode.success + ..count = 0 + ..isRushed = false, + ); }); test('simple', () { - roundTripOrder(Order.custom(Category.top, [ - Item(24) - ..itemNumber = 42 - ..saleDates = [DateTime.now()] - ]) - ..statusCode = StatusCode.success - ..count = 42 - ..isRushed = true); + roundTripOrder( + Order.custom(Category.top, [ + Item(24) + ..itemNumber = 42 + ..saleDates = [DateTime.now()], + ]) + ..statusCode = StatusCode.success + ..count = 42 + ..isRushed = true, + ); }); test('almost empty json', () { @@ -94,29 +113,29 @@ void main() { test('required, but missing enum value fails', () { expect( - () => Person.fromJson({ - 'firstName': 'a', - 'lastName': 'b', - }), - _throwsArgumentError('A value must be provided. Supported values: ' - 'top, bottom, strange, charmed, up, down, not_discovered_yet')); + () => Person.fromJson({'firstName': 'a', 'lastName': 'b'}), + _throwsArgumentError( + 'A value must be provided. Supported values: ' + 'top, bottom, strange, charmed, up, down, not_discovered_yet', + ), + ); }); test('mismatched enum value fails', () { expect( - () => Order.fromJson({'category': 'weird'}), - _throwsArgumentError('`weird` is not one of the supported values: ' - 'top, bottom, strange, charmed, up, down, not_discovered_yet')); + () => Order.fromJson({'category': 'weird'}), + _throwsArgumentError( + '`weird` is not one of the supported values: ' + 'top, bottom, strange, charmed, up, down, not_discovered_yet', + ), + ); }); test('platform', () { final order = Order.custom(Category.charmed) ..statusCode = StatusCode.success ..platform = Platform.undefined - ..altPlatforms = { - 'u': Platform.undefined, - 'f': Platform.foo, - }; + ..altPlatforms = {'u': Platform.undefined, 'f': Platform.foo}; roundTripOrder(order); }); @@ -125,35 +144,35 @@ void main() { final order = Order.custom(Category.charmed) ..platform = Platform.undefined ..statusCode = StatusCode.success - ..altPlatforms = { - 'u': Platform.undefined, - 'f': Platform.foo, - } + ..altPlatforms = {'u': Platform.undefined, 'f': Platform.foo} ..homepage = Uri.parse('https://dart.dev'); roundTripOrder(order); }); test('statusCode', () { - final order = Order.fromJson( - {'category': 'not_discovered_yet', 'status_code': 404}, - ); + final order = Order.fromJson({ + 'category': 'not_discovered_yet', + 'status_code': 404, + }); expect(order.statusCode, StatusCode.notFound); roundTripOrder(order); }); test('statusCode "500" - weird', () { - final order = Order.fromJson( - {'category': 'not_discovered_yet', 'status_code': '500'}, - ); + final order = Order.fromJson({ + 'category': 'not_discovered_yet', + 'status_code': '500', + }); expect(order.statusCode, StatusCode.weird); roundTripOrder(order); }); test('statusCode `500` - unknown', () { - final order = Order.fromJson( - {'category': 'not_discovered_yet', 'status_code': 500}, - ); + final order = Order.fromJson({ + 'category': 'not_discovered_yet', + 'status_code': 500, + }); expect(order.statusCode, StatusCode.unknown); roundTripOrder(order); }); @@ -179,15 +198,18 @@ void main() { 'duration': 190473023012, }); expect( - order.duration, - equals(const Duration( + order.duration, + equals( + const Duration( days: 2, hours: 4, minutes: 54, seconds: 33, milliseconds: 23, microseconds: 12, - ))); + ), + ), + ); roundTripOrder(order); }); }); @@ -204,12 +226,7 @@ void main() { expect( item.toJson().keys, - orderedEquals([ - 'price', - 'saleDates', - 'rates', - 'geoPoint', - ]), + orderedEquals(['price', 'saleDates', 'rates', 'geoPoint']), reason: 'Omits null `itemNumber`', ); }); @@ -239,13 +256,15 @@ void main() { } test('simple', () { - roundTripNumber(Numbers() - ..nums = [0, 0.0] - ..doubles = [0.0] - ..nnDoubles = [0.0] - ..ints = [0] - ..duration = const Duration(seconds: 1) - ..date = DateTime.now()); + roundTripNumber( + Numbers() + ..nums = [0, 0.0] + ..doubles = [0.0] + ..nnDoubles = [0.0] + ..ints = [0] + ..duration = const Duration(seconds: 1) + ..date = DateTime.now(), + ); }); test('custom DateTime', () { @@ -313,17 +332,16 @@ void main() { expect(dayTypeEnumValues, ['no-good', 'rotten', 'very-bad']); }); - test( - 'serializing a non-nullable enum as a key in a map should produce a ' + test('serializing a non-nullable enum as a key in a map should produce a ' 'non-nullable string key', () { - final cls = - Issue1145RegressionA(status: {Issue1145RegressionEnum.gamma: true}); + final cls = Issue1145RegressionA( + status: {Issue1145RegressionEnum.gamma: true}, + ); // Due to issue 1145 this resulted in Map expect(cls.toJson()['status'], const TypeMatcher>()); }); - test( - 'serializing a nullable enum in a list should produce a list with' + test('serializing a nullable enum in a list should produce a list with' ' nullable entries', () { final cls = Issue1145RegressionB(status: [Issue1145RegressionEnum.gamma]); // Issue 1145 should not have affected nullable enums @@ -343,29 +361,19 @@ void main() { Issue559Regression.fromJson({'status': 'gamma'}).status, Issue559RegressionEnum.gamma, ); - expect( - Issue559Regression.fromJson({'status': 'bob'}).status, - isNull, - ); + expect(Issue559Regression.fromJson({'status': 'bob'}).status, isNull); }); test(r'_$ModelFieldMap', () { - expect( - modelFieldMap, - { - 'firstName': 'first-name', - 'lastName': 'LAST_NAME', - }, - ); + expect(modelFieldMap, {'firstName': 'first-name', 'lastName': 'LAST_NAME'}); }); - test(r'Generates _$PrivateModelFieldMap instead of __$PrivateModelFieldMap', - () { - expect( - privateModelFieldMap, - {'fullName': 'full-name'}, - ); - }); + test( + r'Generates _$PrivateModelFieldMap instead of __$PrivateModelFieldMap', + () { + expect(privateModelFieldMap, {'fullName': 'full-name'}); + }, + ); test(r'_$ModelPerFieldToJson', () { expect(ModelPerFieldToJson.firstName('foo'), 'foo'); @@ -375,18 +383,14 @@ void main() { expect(ModelPerFieldToJson.nested(Nested('foo')), {'value': 'foo'}); expect(ModelPerFieldToJson.nested(null), null); - expect( - ModelPerFieldToJson.nestedExcludeIfNull(Nested('foo')), - {'value': 'foo'}, - ); + expect(ModelPerFieldToJson.nestedExcludeIfNull(Nested('foo')), { + 'value': 'foo', + }); expect(ModelPerFieldToJson.nestedExcludeIfNull(null), null); - expect( - ModelPerFieldToJson.nestedGeneric(GenericFactory(42, {'key': 21})), - { - 'value': 42, - 'map': {'key': 21}, - }, - ); + expect(ModelPerFieldToJson.nestedGeneric(GenericFactory(42, {'key': 21})), { + 'value': 42, + 'map': {'key': 21}, + }); }); test(r'_$GenericFactoryPerFieldToJson', () { @@ -394,10 +398,7 @@ void main() { GenericFactoryPerFieldToJson.value(42, (value) => '$value'), '42', ); - expect( - GenericFactoryPerFieldToJson.value('42', int.tryParse), - 42, - ); + expect(GenericFactoryPerFieldToJson.value('42', int.tryParse), 42); expect( GenericFactoryPerFieldToJson.map({'foo': 21}, (value) => '$value'), diff --git a/json_serializable/test/integration/json_enum_example.dart b/json_serializable/test/integration/json_enum_example.dart index 9f8cee0a8..f36159cc1 100644 --- a/json_serializable/test/integration/json_enum_example.dart +++ b/json_serializable/test/integration/json_enum_example.dart @@ -17,11 +17,7 @@ enum StandAloneEnum { Iterable get standAloneEnumValues => _$StandAloneEnumEnumMap.values; @JsonEnum(alwaysCreate: true, fieldRename: FieldRename.kebab) -enum DayType { - noGood, - rotten, - veryBad, -} +enum DayType { noGood, rotten, veryBad } Iterable get dayTypeEnumValues => _$DayTypeEnumMap.values; @@ -55,13 +51,9 @@ enum EnumValueFieldIndex { Iterable get enumValueFieldIndexValues => _$EnumValueFieldIndexEnumMap.values; -@JsonSerializable( - createToJson: false, -) +@JsonSerializable(createToJson: false) class Issue559Regression { - Issue559Regression({ - required this.status, - }); + Issue559Regression({required this.status}); factory Issue559Regression.fromJson(Map json) => _$Issue559RegressionFromJson(json); @@ -74,34 +66,20 @@ class Issue559Regression { final Issue559RegressionEnum? status; } -enum Issue559RegressionEnum { - alpha, - beta, - gamma, -} +enum Issue559RegressionEnum { alpha, beta, gamma } -enum Issue1145RegressionEnum { - alpha, - beta, - gamma, -} +enum Issue1145RegressionEnum { alpha, beta, gamma } -@JsonSerializable( - createFactory: false, -) +@JsonSerializable(createFactory: false) class Issue1145RegressionA { - Issue1145RegressionA({ - required this.status, - }); + Issue1145RegressionA({required this.status}); Map toJson() => _$Issue1145RegressionAToJson(this); final Map status; } -@JsonSerializable( - createFactory: false, -) +@JsonSerializable(createFactory: false) class Issue1145RegressionB { Issue1145RegressionB({required this.status}); diff --git a/json_serializable/test/integration/json_enum_example.g.dart b/json_serializable/test/integration/json_enum_example.g.dart index 95ae41b17..3558c1a75 100644 --- a/json_serializable/test/integration/json_enum_example.g.dart +++ b/json_serializable/test/integration/json_enum_example.g.dart @@ -15,8 +15,11 @@ Issue559Regression _$Issue559RegressionFromJson(Map json) { disallowNullValues: const ['status'], ); return Issue559Regression( - status: $enumDecodeNullable(_$Issue559RegressionEnumEnumMap, json['status'], - unknownValue: JsonKey.nullForUndefinedEnumValue), + status: $enumDecodeNullable( + _$Issue559RegressionEnumEnumMap, + json['status'], + unknownValue: JsonKey.nullForUndefinedEnumValue, + ), ); } @@ -27,11 +30,12 @@ const _$Issue559RegressionEnumEnumMap = { }; Map _$Issue1145RegressionAToJson( - Issue1145RegressionA instance) => - { - 'status': instance.status - .map((k, e) => MapEntry(_$Issue1145RegressionEnumEnumMap[k]!, e)), - }; + Issue1145RegressionA instance, +) => { + 'status': instance.status.map( + (k, e) => MapEntry(_$Issue1145RegressionEnumEnumMap[k]!, e), + ), +}; const _$Issue1145RegressionEnumEnumMap = { Issue1145RegressionEnum.alpha: 'alpha', @@ -40,26 +44,27 @@ const _$Issue1145RegressionEnumEnumMap = { }; Map _$Issue1145RegressionBToJson( - Issue1145RegressionB instance) => - { - 'status': instance.status - .map((e) => _$Issue1145RegressionEnumEnumMap[e]) - .toList(), - }; + Issue1145RegressionB instance, +) => { + 'status': instance.status + .map((e) => _$Issue1145RegressionEnumEnumMap[e]) + .toList(), +}; Issue1226Regression _$Issue1226RegressionFromJson(Map json) => Issue1226Regression( durationType: $enumDecodeNullable( - _$Issue1145RegressionEnumEnumMap, json['durationType']), + _$Issue1145RegressionEnumEnumMap, + json['durationType'], + ), ); Map _$Issue1226RegressionToJson( - Issue1226Regression instance) => - { - if (_$Issue1145RegressionEnumEnumMap[instance.durationType] - case final value?) - 'durationType': value, - }; + Issue1226Regression instance, +) => { + if (_$Issue1145RegressionEnumEnumMap[instance.durationType] case final value?) + 'durationType': value, +}; const _$StandAloneEnumEnumMap = { StandAloneEnum.alpha: 'a', diff --git a/json_serializable/test/integration/json_keys_example.dart b/json_serializable/test/integration/json_keys_example.dart index e8a6895a2..985979d28 100644 --- a/json_serializable/test/integration/json_keys_example.dart +++ b/json_serializable/test/integration/json_keys_example.dart @@ -4,11 +4,7 @@ part 'json_keys_example.g.dart'; @JsonSerializable(createJsonKeys: true, fieldRename: FieldRename.kebab) class Model { - Model({ - required this.firstName, - required this.lastName, - this.ignoredName, - }); + Model({required this.firstName, required this.lastName, this.ignoredName}); factory Model.fromJson(Map json) => _$ModelFromJson(json); diff --git a/json_serializable/test/integration/json_keys_example.g.dart b/json_serializable/test/integration/json_keys_example.g.dart index f68ca8d09..fc9429301 100644 --- a/json_serializable/test/integration/json_keys_example.g.dart +++ b/json_serializable/test/integration/json_keys_example.g.dart @@ -9,9 +9,9 @@ part of 'json_keys_example.dart'; // ************************************************************************** Model _$ModelFromJson(Map json) => Model( - firstName: json['first-name'] as String, - lastName: json['LAST_NAME'] as String, - ); + firstName: json['first-name'] as String, + lastName: json['LAST_NAME'] as String, +); abstract final class _$ModelJsonKeys { static const String firstName = 'first-name'; @@ -19,6 +19,6 @@ abstract final class _$ModelJsonKeys { } Map _$ModelToJson(Model instance) => { - 'first-name': instance.firstName, - 'LAST_NAME': instance.lastName, - }; + 'first-name': instance.firstName, + 'LAST_NAME': instance.lastName, +}; diff --git a/json_serializable/test/integration/json_test_common.dart b/json_serializable/test/integration/json_test_common.dart index 27415fb81..95372161e 100644 --- a/json_serializable/test/integration/json_test_common.dart +++ b/json_serializable/test/integration/json_test_common.dart @@ -16,7 +16,7 @@ enum Category { down, // NOTE: this should override the kebab bits below! @JsonValue('not_discovered_yet') - notDiscoveredYet + notDiscoveredYet, } enum StatusCode { @@ -57,10 +57,10 @@ class Platform { const Platform._(this.description); factory Platform.fromJson(String value) => switch (value) { - 'foo' => foo, - 'undefined' => undefined, - _ => throw ArgumentError.value(value, 'value', 'Not a supported value.') - }; + 'foo' => foo, + 'undefined' => undefined, + _ => throw ArgumentError.value(value, 'value', 'Not a supported value.'), + }; String toJson() => description; } diff --git a/json_serializable/test/integration/json_test_example.dart b/json_serializable/test/integration/json_test_example.dart index 7f3482935..963cdc27e 100644 --- a/json_serializable/test/integration/json_test_example.dart +++ b/json_serializable/test/integration/json_test_example.dart @@ -27,8 +27,13 @@ class Person { Map? houseMap; Map? categoryCounts; - Person(this.firstName, this.lastName, this.house, - {this.middleName, this.dateOfBirth}); + Person( + this.firstName, + this.lastName, + this.house, { + this.middleName, + this.dateOfBirth, + }); factory Person.fromJson(Map json) => _$PersonFromJson(json); @@ -82,8 +87,9 @@ class Order { bool? shouldBeCached; Order.custom(this.category, [Iterable? items]) - : items = UnmodifiableListView( - List.unmodifiable(items ?? const [])); + : items = UnmodifiableListView( + List.unmodifiable(items ?? const []), + ); factory Order.fromJson(Map json) => _$OrderFromJson(json); diff --git a/json_serializable/test/integration/json_test_example.g.dart b/json_serializable/test/integration/json_test_example.g.dart index bf56859ed..cd32ac924 100644 --- a/json_serializable/test/integration/json_test_example.g.dart +++ b/json_serializable/test/integration/json_test_example.g.dart @@ -8,23 +8,26 @@ part of 'json_test_example.dart'; // JsonSerializableGenerator // ************************************************************************** -Person _$PersonFromJson(Map json) => Person( - json['firstName'] as String, - json['lastName'] as String, - $enumDecode(_$CategoryEnumMap, json[r'$house']), - middleName: json['middleName'] as String?, - dateOfBirth: json['dateOfBirth'] == null - ? null - : DateTime.parse(json['dateOfBirth'] as String), - ) +Person _$PersonFromJson(Map json) => + Person( + json['firstName'] as String, + json['lastName'] as String, + $enumDecode(_$CategoryEnumMap, json[r'$house']), + middleName: json['middleName'] as String?, + dateOfBirth: json['dateOfBirth'] == null + ? null + : DateTime.parse(json['dateOfBirth'] as String), + ) ..order = json['order'] == null ? null : Order.fromJson(json['order'] as Map) ..customOrders = json['customOrders'] == null ? null - : MyList.fromJson((json['customOrders'] as List) - .map((e) => Order.fromJson(e as Map)) - .toList()) + : MyList.fromJson( + (json['customOrders'] as List) + .map((e) => Order.fromJson(e as Map)) + .toList(), + ) ..houseMap = (json['houseMap'] as Map?)?.map( (k, e) => MapEntry(k, $enumDecode(_$CategoryEnumMap, e)), ) @@ -34,18 +37,20 @@ Person _$PersonFromJson(Map json) => Person( ); Map _$PersonToJson(Person instance) => { - 'firstName': instance.firstName, - 'lastName': instance.lastName, - 'middleName': instance.middleName, - 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), - r'$house': _$CategoryEnumMap[instance.house]!, - 'order': instance.order, - 'customOrders': instance.customOrders, - 'houseMap': - instance.houseMap?.map((k, e) => MapEntry(k, _$CategoryEnumMap[e]!)), - 'categoryCounts': instance.categoryCounts - ?.map((k, e) => MapEntry(_$CategoryEnumMap[k]!, e)), - }; + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'middleName': instance.middleName, + 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), + r'$house': _$CategoryEnumMap[instance.house]!, + 'order': instance.order, + 'customOrders': instance.customOrders, + 'houseMap': instance.houseMap?.map( + (k, e) => MapEntry(k, _$CategoryEnumMap[e]!), + ), + 'categoryCounts': instance.categoryCounts?.map( + (k, e) => MapEntry(_$CategoryEnumMap[k]!, e), + ), +}; const _$CategoryEnumMap = { Category.top: 'top', @@ -58,15 +63,13 @@ const _$CategoryEnumMap = { }; Order _$OrderFromJson(Map json) { - $checkKeys( - json, - disallowNullValues: const ['count'], - ); + $checkKeys(json, disallowNullValues: const ['count']); return Order.custom( - $enumDecodeNullable(_$CategoryEnumMap, json['category']), - (json['items'] as List?) - ?.map((e) => Item.fromJson(e as Map)), - ) + $enumDecodeNullable(_$CategoryEnumMap, json['category']), + (json['items'] as List?)?.map( + (e) => Item.fromJson(e as Map), + ), + ) ..count = (json['count'] as num?)?.toInt() ..isRushed = json['isRushed'] as bool? ..duration = json['duration'] == null @@ -78,24 +81,29 @@ Order _$OrderFromJson(Map json) { ..altPlatforms = (json['altPlatforms'] as Map?)?.map( (k, e) => MapEntry(k, Platform.fromJson(e as String)), ) - ..homepage = - json['homepage'] == null ? null : Uri.parse(json['homepage'] as String) - ..statusCode = $enumDecodeNullable(_$StatusCodeEnumMap, json['status_code'], - unknownValue: StatusCode.unknown) ?? + ..homepage = json['homepage'] == null + ? null + : Uri.parse(json['homepage'] as String) + ..statusCode = + $enumDecodeNullable( + _$StatusCodeEnumMap, + json['status_code'], + unknownValue: StatusCode.unknown, + ) ?? StatusCode.success; } Map _$OrderToJson(Order instance) => { - if (instance.count case final value?) 'count': value, - 'isRushed': instance.isRushed, - 'duration': instance.duration?.inMicroseconds, - 'category': _$CategoryEnumMap[instance.category], - 'items': instance.items, - 'platform': instance.platform, - 'altPlatforms': instance.altPlatforms, - 'homepage': instance.homepage?.toString(), - 'status_code': _$StatusCodeEnumMap[instance.statusCode], - }; + if (instance.count case final value?) 'count': value, + 'isRushed': instance.isRushed, + 'duration': instance.duration?.inMicroseconds, + 'category': _$CategoryEnumMap[instance.category], + 'items': instance.items, + 'platform': instance.platform, + 'altPlatforms': instance.altPlatforms, + 'homepage': instance.homepage?.toString(), + 'status_code': _$StatusCodeEnumMap[instance.statusCode], +}; const _$StatusCodeEnumMap = { StatusCode.success: 200, @@ -104,9 +112,8 @@ const _$StatusCodeEnumMap = { StatusCode.unknown: 'unknown', }; -Item _$ItemFromJson(Map json) => Item( - (json['price'] as num?)?.toInt(), - ) +Item _$ItemFromJson(Map json) => + Item((json['price'] as num?)?.toInt()) ..itemNumber = (json['item-number'] as num?)?.toInt() ..saleDates = (json['saleDates'] as List?) ?.map((e) => DateTime.parse(e as String)) @@ -117,16 +124,17 @@ Item _$ItemFromJson(Map json) => Item( ..geoPoint = _fromJsonGeoPoint(json['geoPoint'] as Map?); Map _$ItemToJson(Item instance) => { - 'price': instance.price, - if (instance.itemNumber case final value?) 'item-number': value, - 'saleDates': instance.saleDates?.map((e) => e.toIso8601String()).toList(), - 'rates': instance.rates, - 'geoPoint': _toJsonGeoPoint(instance.geoPoint), - }; + 'price': instance.price, + if (instance.itemNumber case final value?) 'item-number': value, + 'saleDates': instance.saleDates?.map((e) => e.toIso8601String()).toList(), + 'rates': instance.rates, + 'geoPoint': _toJsonGeoPoint(instance.geoPoint), +}; Numbers _$NumbersFromJson(Map json) => Numbers() - ..ints = - (json['ints'] as List?)?.map((e) => (e as num).toInt()).toList() + ..ints = (json['ints'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ..nums = (json['nums'] as List?)?.map((e) => e as num).toList() ..doubles = (json['doubles'] as List?) ?.map((e) => (e as num).toDouble()) @@ -135,19 +143,20 @@ Numbers _$NumbersFromJson(Map json) => Numbers() ?.map((e) => (e as num).toDouble()) .toList() ..duration = durationFromInt((json['duration'] as num?)?.toInt()) - ..doubleAsString = - stringFromDouble((json['doubleAsString'] as num?)?.toDouble()) + ..doubleAsString = stringFromDouble( + (json['doubleAsString'] as num?)?.toDouble(), + ) ..date = dateTimeFromEpochUs((json['date'] as num?)?.toInt()); Map _$NumbersToJson(Numbers instance) => { - 'ints': instance.ints, - 'nums': instance.nums, - 'doubles': instance.doubles, - 'nnDoubles': instance.nnDoubles, - 'duration': durationToInt(instance.duration), - 'doubleAsString': stringToDouble(instance.doubleAsString), - 'date': dateTimeToEpochUs(instance.date), - }; + 'ints': instance.ints, + 'nums': instance.nums, + 'doubles': instance.doubles, + 'nnDoubles': instance.nnDoubles, + 'duration': durationToInt(instance.duration), + 'doubleAsString': stringToDouble(instance.doubleAsString), + 'date': dateTimeToEpochUs(instance.date), +}; MapKeyVariety _$MapKeyVarietyFromJson(Map json) => MapKeyVariety() @@ -168,47 +177,55 @@ Map _$MapKeyVarietyToJson(MapKeyVariety instance) => { 'intIntMap': instance.intIntMap?.map((k, e) => MapEntry(k.toString(), e)), 'uriIntMap': instance.uriIntMap?.map((k, e) => MapEntry(k.toString(), e)), - 'dateTimeIntMap': instance.dateTimeIntMap - ?.map((k, e) => MapEntry(k.toIso8601String(), e)), + 'dateTimeIntMap': instance.dateTimeIntMap?.map( + (k, e) => MapEntry(k.toIso8601String(), e), + ), 'bigIntMap': instance.bigIntMap?.map((k, e) => MapEntry(k.toString(), e)), }; UnknownEnumValue _$UnknownEnumValueFromJson(Map json) => UnknownEnumValue() - ..enumValue = $enumDecode(_$CategoryEnumMap, json['enumValue'], - unknownValue: Category.notDiscoveredYet) - ..enumIterable = (json['enumIterable'] as List).map((e) => - $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + ..enumValue = $enumDecode( + _$CategoryEnumMap, + json['enumValue'], + unknownValue: Category.notDiscoveredYet, + ) + ..enumIterable = (json['enumIterable'] as List).map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) ..enumList = (json['enumList'] as List) - .map((e) => $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + .map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) .toList() ..enumSet = (json['enumSet'] as List) - .map((e) => $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + .map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) .toSet(); PrivateConstructor _$PrivateConstructorFromJson(Map json) => - PrivateConstructor._( - (json['id'] as num).toInt(), - json['value'] as String, - ); + PrivateConstructor._((json['id'] as num).toInt(), json['value'] as String); Map _$PrivateConstructorToJson(PrivateConstructor instance) => - { - 'id': instance.id, - 'value': instance.value, - }; + {'id': instance.id, 'value': instance.value}; RegressionTestIssue1210 _$RegressionTestIssue1210FromJson( - Map json) => - RegressionTestIssue1210( - json['field'] as String, - ); + Map json, +) => RegressionTestIssue1210(json['field'] as String); Map _$RegressionTestIssue1210ToJson( - RegressionTestIssue1210 instance) => - { - 'field': instance.field, - }; + RegressionTestIssue1210 instance, +) => {'field': instance.field}; diff --git a/json_serializable/test/integration/json_test_example.g_any_map.dart b/json_serializable/test/integration/json_test_example.g_any_map.dart index b4789725d..f499eb13d 100644 --- a/json_serializable/test/integration/json_test_example.g_any_map.dart +++ b/json_serializable/test/integration/json_test_example.g_any_map.dart @@ -12,9 +12,7 @@ import 'json_test_common.dart'; part 'json_test_example.g_any_map.g.dart'; -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class Person { final String firstName, lastName; final String? middleName; @@ -29,8 +27,13 @@ class Person { Map? houseMap; Map? categoryCounts; - Person(this.firstName, this.lastName, this.house, - {this.middleName, this.dateOfBirth}); + Person( + this.firstName, + this.lastName, + this.house, { + this.middleName, + this.dateOfBirth, + }); factory Person.fromJson(Map json) => _$PersonFromJson(json); @@ -84,8 +87,9 @@ class Order { bool? shouldBeCached; Order.custom(this.category, [Iterable? items]) - : items = UnmodifiableListView( - List.unmodifiable(items ?? const [])); + : items = UnmodifiableListView( + List.unmodifiable(items ?? const []), + ); factory Order.fromJson(Map json) => _$OrderFromJson(json); @@ -100,9 +104,7 @@ class Order { deepEquals(altPlatforms, other.altPlatforms); } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class Item extends ItemCore { @JsonKey(includeIfNull: false, name: 'item-number') int? itemNumber; @@ -148,9 +150,7 @@ class GeoPoint { GeoPoint(this.latitude, this.longitude); } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class Numbers { List? ints; List? nums; @@ -185,9 +185,7 @@ class Numbers { deepEquals(date, other.date); } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class MapKeyVariety { Map? intIntMap; Map? uriIntMap; @@ -258,9 +256,7 @@ mixin RegressionTestIssue1210Mixin { int get hashCode => identityHashCode(this); } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class RegressionTestIssue1210 with RegressionTestIssue1210Mixin { const RegressionTestIssue1210(this.field); diff --git a/json_serializable/test/integration/json_test_example.g_any_map.g.dart b/json_serializable/test/integration/json_test_example.g_any_map.g.dart index ef2ad4f95..f277591ba 100644 --- a/json_serializable/test/integration/json_test_example.g_any_map.g.dart +++ b/json_serializable/test/integration/json_test_example.g_any_map.g.dart @@ -8,23 +8,28 @@ part of 'json_test_example.g_any_map.dart'; // JsonSerializableGenerator // ************************************************************************** -Person _$PersonFromJson(Map json) => Person( - json['firstName'] as String, - json['lastName'] as String, - $enumDecode(_$CategoryEnumMap, json[r'$house']), - middleName: json['middleName'] as String?, - dateOfBirth: json['dateOfBirth'] == null - ? null - : DateTime.parse(json['dateOfBirth'] as String), - ) +Person _$PersonFromJson(Map json) => + Person( + json['firstName'] as String, + json['lastName'] as String, + $enumDecode(_$CategoryEnumMap, json[r'$house']), + middleName: json['middleName'] as String?, + dateOfBirth: json['dateOfBirth'] == null + ? null + : DateTime.parse(json['dateOfBirth'] as String), + ) ..order = json['order'] == null ? null : Order.fromJson(Map.from(json['order'] as Map)) ..customOrders = json['customOrders'] == null ? null - : MyList.fromJson((json['customOrders'] as List) - .map((e) => Order.fromJson(Map.from(e as Map))) - .toList()) + : MyList.fromJson( + (json['customOrders'] as List) + .map( + (e) => Order.fromJson(Map.from(e as Map)), + ) + .toList(), + ) ..houseMap = (json['houseMap'] as Map?)?.map( (k, e) => MapEntry(k as String, $enumDecode(_$CategoryEnumMap, e)), ) @@ -34,18 +39,20 @@ Person _$PersonFromJson(Map json) => Person( ); Map _$PersonToJson(Person instance) => { - 'firstName': instance.firstName, - 'lastName': instance.lastName, - 'middleName': instance.middleName, - 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), - r'$house': _$CategoryEnumMap[instance.house]!, - 'order': instance.order, - 'customOrders': instance.customOrders, - 'houseMap': - instance.houseMap?.map((k, e) => MapEntry(k, _$CategoryEnumMap[e]!)), - 'categoryCounts': instance.categoryCounts - ?.map((k, e) => MapEntry(_$CategoryEnumMap[k]!, e)), - }; + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'middleName': instance.middleName, + 'dateOfBirth': instance.dateOfBirth?.toIso8601String(), + r'$house': _$CategoryEnumMap[instance.house]!, + 'order': instance.order, + 'customOrders': instance.customOrders, + 'houseMap': instance.houseMap?.map( + (k, e) => MapEntry(k, _$CategoryEnumMap[e]!), + ), + 'categoryCounts': instance.categoryCounts?.map( + (k, e) => MapEntry(_$CategoryEnumMap[k]!, e), + ), +}; const _$CategoryEnumMap = { Category.top: 'top', @@ -58,15 +65,13 @@ const _$CategoryEnumMap = { }; Order _$OrderFromJson(Map json) { - $checkKeys( - json, - disallowNullValues: const ['count'], - ); + $checkKeys(json, disallowNullValues: const ['count']); return Order.custom( - $enumDecodeNullable(_$CategoryEnumMap, json['category']), - (json['items'] as List?) - ?.map((e) => Item.fromJson(Map.from(e as Map))), - ) + $enumDecodeNullable(_$CategoryEnumMap, json['category']), + (json['items'] as List?)?.map( + (e) => Item.fromJson(Map.from(e as Map)), + ), + ) ..count = (json['count'] as num?)?.toInt() ..isRushed = json['isRushed'] as bool? ..duration = json['duration'] == null @@ -78,24 +83,29 @@ Order _$OrderFromJson(Map json) { ..altPlatforms = (json['altPlatforms'] as Map?)?.map( (k, e) => MapEntry(k as String, Platform.fromJson(e as String)), ) - ..homepage = - json['homepage'] == null ? null : Uri.parse(json['homepage'] as String) - ..statusCode = $enumDecodeNullable(_$StatusCodeEnumMap, json['status_code'], - unknownValue: StatusCode.unknown) ?? + ..homepage = json['homepage'] == null + ? null + : Uri.parse(json['homepage'] as String) + ..statusCode = + $enumDecodeNullable( + _$StatusCodeEnumMap, + json['status_code'], + unknownValue: StatusCode.unknown, + ) ?? StatusCode.success; } Map _$OrderToJson(Order instance) => { - if (instance.count case final value?) 'count': value, - 'isRushed': instance.isRushed, - 'duration': instance.duration?.inMicroseconds, - 'category': _$CategoryEnumMap[instance.category], - 'items': instance.items, - 'platform': instance.platform, - 'altPlatforms': instance.altPlatforms, - 'homepage': instance.homepage?.toString(), - 'status_code': _$StatusCodeEnumMap[instance.statusCode], - }; + if (instance.count case final value?) 'count': value, + 'isRushed': instance.isRushed, + 'duration': instance.duration?.inMicroseconds, + 'category': _$CategoryEnumMap[instance.category], + 'items': instance.items, + 'platform': instance.platform, + 'altPlatforms': instance.altPlatforms, + 'homepage': instance.homepage?.toString(), + 'status_code': _$StatusCodeEnumMap[instance.statusCode], +}; const _$StatusCodeEnumMap = { StatusCode.success: 200, @@ -104,29 +114,28 @@ const _$StatusCodeEnumMap = { StatusCode.unknown: 'unknown', }; -Item _$ItemFromJson(Map json) => Item( - (json['price'] as num?)?.toInt(), - ) - ..itemNumber = (json['item-number'] as num?)?.toInt() - ..saleDates = (json['saleDates'] as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList() - ..rates = (json['rates'] as List?) - ?.map((e) => (e as num).toInt()) - .toList() - ..geoPoint = _fromJsonGeoPoint(json['geoPoint'] as Map?); +Item _$ItemFromJson(Map json) => Item((json['price'] as num?)?.toInt()) + ..itemNumber = (json['item-number'] as num?)?.toInt() + ..saleDates = (json['saleDates'] as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList() + ..rates = (json['rates'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() + ..geoPoint = _fromJsonGeoPoint(json['geoPoint'] as Map?); Map _$ItemToJson(Item instance) => { - 'price': instance.price, - if (instance.itemNumber case final value?) 'item-number': value, - 'saleDates': instance.saleDates?.map((e) => e.toIso8601String()).toList(), - 'rates': instance.rates, - 'geoPoint': _toJsonGeoPoint(instance.geoPoint), - }; + 'price': instance.price, + if (instance.itemNumber case final value?) 'item-number': value, + 'saleDates': instance.saleDates?.map((e) => e.toIso8601String()).toList(), + 'rates': instance.rates, + 'geoPoint': _toJsonGeoPoint(instance.geoPoint), +}; Numbers _$NumbersFromJson(Map json) => Numbers() - ..ints = - (json['ints'] as List?)?.map((e) => (e as num).toInt()).toList() + ..ints = (json['ints'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ..nums = (json['nums'] as List?)?.map((e) => e as num).toList() ..doubles = (json['doubles'] as List?) ?.map((e) => (e as num).toDouble()) @@ -135,19 +144,20 @@ Numbers _$NumbersFromJson(Map json) => Numbers() ?.map((e) => (e as num).toDouble()) .toList() ..duration = durationFromInt((json['duration'] as num?)?.toInt()) - ..doubleAsString = - stringFromDouble((json['doubleAsString'] as num?)?.toDouble()) + ..doubleAsString = stringFromDouble( + (json['doubleAsString'] as num?)?.toDouble(), + ) ..date = dateTimeFromEpochUs((json['date'] as num?)?.toInt()); Map _$NumbersToJson(Numbers instance) => { - 'ints': instance.ints, - 'nums': instance.nums, - 'doubles': instance.doubles, - 'nnDoubles': instance.nnDoubles, - 'duration': durationToInt(instance.duration), - 'doubleAsString': stringToDouble(instance.doubleAsString), - 'date': dateTimeToEpochUs(instance.date), - }; + 'ints': instance.ints, + 'nums': instance.nums, + 'doubles': instance.doubles, + 'nnDoubles': instance.nnDoubles, + 'duration': durationToInt(instance.duration), + 'doubleAsString': stringToDouble(instance.doubleAsString), + 'date': dateTimeToEpochUs(instance.date), +}; MapKeyVariety _$MapKeyVarietyFromJson(Map json) => MapKeyVariety() ..intIntMap = (json['intIntMap'] as Map?)?.map( @@ -167,45 +177,53 @@ Map _$MapKeyVarietyToJson(MapKeyVariety instance) => { 'intIntMap': instance.intIntMap?.map((k, e) => MapEntry(k.toString(), e)), 'uriIntMap': instance.uriIntMap?.map((k, e) => MapEntry(k.toString(), e)), - 'dateTimeIntMap': instance.dateTimeIntMap - ?.map((k, e) => MapEntry(k.toIso8601String(), e)), + 'dateTimeIntMap': instance.dateTimeIntMap?.map( + (k, e) => MapEntry(k.toIso8601String(), e), + ), 'bigIntMap': instance.bigIntMap?.map((k, e) => MapEntry(k.toString(), e)), }; UnknownEnumValue _$UnknownEnumValueFromJson(Map json) => UnknownEnumValue() - ..enumValue = $enumDecode(_$CategoryEnumMap, json['enumValue'], - unknownValue: Category.notDiscoveredYet) - ..enumIterable = (json['enumIterable'] as List).map((e) => - $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + ..enumValue = $enumDecode( + _$CategoryEnumMap, + json['enumValue'], + unknownValue: Category.notDiscoveredYet, + ) + ..enumIterable = (json['enumIterable'] as List).map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) ..enumList = (json['enumList'] as List) - .map((e) => $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + .map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) .toList() ..enumSet = (json['enumSet'] as List) - .map((e) => $enumDecode(_$CategoryEnumMap, e, - unknownValue: Category.notDiscoveredYet)) + .map( + (e) => $enumDecode( + _$CategoryEnumMap, + e, + unknownValue: Category.notDiscoveredYet, + ), + ) .toSet(); PrivateConstructor _$PrivateConstructorFromJson(Map json) => - PrivateConstructor._( - (json['id'] as num).toInt(), - json['value'] as String, - ); + PrivateConstructor._((json['id'] as num).toInt(), json['value'] as String); Map _$PrivateConstructorToJson(PrivateConstructor instance) => - { - 'id': instance.id, - 'value': instance.value, - }; + {'id': instance.id, 'value': instance.value}; RegressionTestIssue1210 _$RegressionTestIssue1210FromJson(Map json) => - RegressionTestIssue1210( - json['field'] as String, - ); + RegressionTestIssue1210(json['field'] as String); Map _$RegressionTestIssue1210ToJson( - RegressionTestIssue1210 instance) => - { - 'field': instance.field, - }; + RegressionTestIssue1210 instance, +) => {'field': instance.field}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.dart b/json_serializable/test/kitchen_sink/kitchen_sink.dart index 86525d9c8..d9a304478 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.dart @@ -48,33 +48,32 @@ class _Factory implements k.KitchenSinkFactory { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) => - KitchenSink( - ctorValidatedNo42: ctorValidatedNo42, - iterable: iterable, - dynamicIterable: dynamicIterable, - objectIterable: objectIterable, - intIterable: intIterable, - dateTimeIterable: dateTimeIterable, - ); + }) => KitchenSink( + ctorValidatedNo42: ctorValidatedNo42, + iterable: iterable, + dynamicIterable: dynamicIterable, + objectIterable: objectIterable, + intIterable: intIterable, + dateTimeIterable: dateTimeIterable, + ); k.KitchenSink fromJson(Map json) => KitchenSink.fromJson(json); k.JsonConverterTestClass jsonConverterCtor() => JsonConverterTestClass( - const Duration(), - [], - BigInt.zero, - {}, - BigInt.zero, - {}, - TrivialNumber(0), - {}, - DateTime.fromMillisecondsSinceEpoch(0), - TrivialString(''), - TrivialNumber(0), - {}, - ); + const Duration(), + [], + BigInt.zero, + {}, + BigInt.zero, + {}, + TrivialNumber(0), + {}, + DateTime.fromMillisecondsSinceEpoch(0), + TrivialString(''), + TrivialNumber(0), + {}, + ); k.JsonConverterTestClass jsonConverterFromJson(Map json) => JsonConverterTestClass.fromJson(json); @@ -108,14 +107,17 @@ class KitchenSink implements k.KitchenSink { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) : _iterable = iterable?.toList(), - _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), - _objectIterable = objectIterable?.toList() ?? _defaultList(), - _intIterable = intIterable?.toList() ?? _defaultList(), - _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { + }) : _iterable = iterable?.toList(), + _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), + _objectIterable = objectIterable?.toList() ?? _defaultList(), + _intIterable = intIterable?.toList() ?? _defaultList(), + _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { if (ctorValidatedNo42 == 42) { throw ArgumentError.value( - 42, 'ctorValidatedNo42', 'The value `42` is not allowed.'); + 42, + 'ctorValidatedNo42', + 'The value `42` is not allowed.', + ); } } @@ -197,12 +199,14 @@ class KitchenSink implements k.KitchenSink { } } -@JsonSerializable(converters: [ - // referencing a top-level field should work - durationConverter, - // referencing via a const constructor should work - BigIntStringConverter(), -]) +@JsonSerializable( + converters: [ + // referencing a top-level field should work + durationConverter, + // referencing via a const constructor should work + BigIntStringConverter(), + ], +) // referencing a top-level field should work @trivialStringConverter @TrivialNumberConverter.instance @@ -256,11 +260,7 @@ class JsonConverterGeneric { List itemList; Map itemMap; - JsonConverterGeneric( - this.item, - this.itemList, - this.itemMap, - ); + JsonConverterGeneric(this.item, this.itemList, this.itemMap); factory JsonConverterGeneric.fromJson(Map json) => _$JsonConverterGenericFromJson(json); diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g.dart index 6d376fdfe..0e2d4e93b 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g.dart @@ -8,26 +8,32 @@ part of 'kitchen_sink.dart'; // JsonSerializableGenerator // ************************************************************************** -KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( - ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), - iterable: _valueAccessor(json, 'iterable') as List?, - dynamicIterable: json['dynamicIterable'] as List?, - objectIterable: - (json['objectIterable'] as List?)?.map((e) => e as Object), - intIterable: (json['intIterable'] as List?) - ?.map((e) => (e as num).toInt()), - dateTimeIterable: (json['datetime-iterable'] as List?) - ?.map((e) => DateTime.parse(e as String)), - ) +KitchenSink _$KitchenSinkFromJson(Map json) => + KitchenSink( + ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), + iterable: _valueAccessor(json, 'iterable') as List?, + dynamicIterable: json['dynamicIterable'] as List?, + objectIterable: (json['objectIterable'] as List?)?.map( + (e) => e as Object, + ), + intIterable: (json['intIterable'] as List?)?.map( + (e) => (e as num).toInt(), + ), + dateTimeIterable: (json['datetime-iterable'] as List?)?.map( + (e) => DateTime.parse(e as String), + ), + ) ..dateTime = json['dateTime'] == null ? null : DateTime.parse(json['dateTime'] as String) - ..bigInt = - json['bigInt'] == null ? null : BigInt.parse(json['bigInt'] as String) + ..bigInt = json['bigInt'] == null + ? null + : BigInt.parse(json['bigInt'] as String) ..set = (json['set'] as List).toSet() ..dynamicSet = (json['dynamicSet'] as List).toSet() - ..objectSet = - (json['objectSet'] as List).map((e) => e as Object).toSet() + ..objectSet = (json['objectSet'] as List) + .map((e) => e as Object) + .toSet() ..intSet = (json['intSet'] as List) .map((e) => (e as num).toInt()) .toSet() @@ -36,8 +42,9 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toSet() ..list = json['list'] as List ..dynamicList = json['dynamicList'] as List - ..objectList = - (json['objectList'] as List).map((e) => e as Object).toList() + ..objectList = (json['objectList'] as List) + .map((e) => e as Object) + .toList() ..intList = (json['intList'] as List) .map((e) => (e as num).toInt()) .toList() @@ -46,48 +53,58 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toList() ..nullableSimpleObjectList = (json['nullableSimpleObjectList'] as List) - .map((e) => e == null - ? null - : SimpleObject.fromJson(e as Map)) + .map( + (e) => e == null + ? null + : SimpleObject.fromJson(e as Map), + ) .toList() ..map = json['map'] as Map - ..stringStringMap = - Map.from(json['stringStringMap'] as Map) - ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) - ..objectDateTimeMap = - (json['objectDateTimeMap'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), + ..stringStringMap = Map.from( + json['stringStringMap'] as Map, ) + ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) + ..objectDateTimeMap = (json['objectDateTimeMap'] as Map) + .map((k, e) => MapEntry(k, DateTime.parse(e as String))) ..nullableSimpleObjectMap = (json['nullableSimpleObjectMap'] as Map).map( - (k, e) => MapEntry( - k, - e == null - ? null - : SimpleObject.fromJson(e as Map)), - ) + (k, e) => MapEntry( + k, + e == null + ? null + : SimpleObject.fromJson(e as Map), + ), + ) ..crazyComplex = (json['crazyComplex'] as List) - .map((e) => (e as Map?)?.map( - (k, e) => MapEntry( + .map( + (e) => (e as Map?)?.map( + (k, e) => MapEntry( + k, + (e as Map?)?.map( + (k, e) => MapEntry( k, - (e as Map?)?.map( - (k, e) => MapEntry( - k, - (e as List?) - ?.map((e) => (e as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList()) - .toList()), - )), - )) + (e as List?) + ?.map( + (e) => (e as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), + ) + .toList(), + ), + ), + ), + ), + ) .toList() ..val = Map.from(json['val'] as Map) ..writeNotNull = json['writeNotNull'] as bool? ..string = KitchenSink._trickyValueAccessor(json, r'$string') as String? - ..simpleObject = - SimpleObject.fromJson(json['simpleObject'] as Map) + ..simpleObject = SimpleObject.fromJson( + json['simpleObject'] as Map, + ) ..strictKeysObject = StrictKeysObject.fromJson( - json['strictKeysObject'] as Map) + json['strictKeysObject'] as Map, + ) ..validatedPropertyNo42 = (json['validatedPropertyNo42'] as num?)?.toInt() ..recordField = _$recordConvertNullable( json['recordField'], @@ -98,167 +115,198 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( ), ); -Map _$KitchenSinkToJson(KitchenSink instance) => - { - 'no-42': instance.ctorValidatedNo42, - 'dateTime': instance.dateTime?.toIso8601String(), - 'bigInt': instance.bigInt?.toString(), - 'iterable': instance.iterable?.toList(), - 'dynamicIterable': instance.dynamicIterable.toList(), - 'objectIterable': instance.objectIterable.toList(), - 'intIterable': instance.intIterable.toList(), - 'set': instance.set.toList(), - 'dynamicSet': instance.dynamicSet.toList(), - 'objectSet': instance.objectSet.toList(), - 'intSet': instance.intSet.toList(), - 'dateTimeSet': - instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), - 'datetime-iterable': - instance.dateTimeIterable.map((e) => e.toIso8601String()).toList(), - 'list': instance.list, - 'dynamicList': instance.dynamicList, - 'objectList': instance.objectList, - 'intList': instance.intList, - 'dateTimeList': - instance.dateTimeList.map((e) => e.toIso8601String()).toList(), - 'nullableSimpleObjectList': instance.nullableSimpleObjectList, - 'map': instance.map, - 'stringStringMap': instance.stringStringMap, - 'dynamicIntMap': instance.dynamicIntMap, - 'objectDateTimeMap': instance.objectDateTimeMap - .map((k, e) => MapEntry(k, e.toIso8601String())), - 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, - 'crazyComplex': instance.crazyComplex - .map((e) => e?.map((k, e) => MapEntry( - k, - e?.map((k, e) => MapEntry( - k, - e - ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) - .toList()))))) - .toList(), - 'val': instance.val, - 'writeNotNull': instance.writeNotNull, - r'$string': instance.string, - 'simpleObject': instance.simpleObject, - 'strictKeysObject': instance.strictKeysObject, - 'validatedPropertyNo42': instance.validatedPropertyNo42, - 'recordField': instance.recordField == null - ? null - : { - r'$1': instance.recordField!.$1, - r'$2': instance.recordField!.$2, - 'truth': instance.recordField!.truth, - }, - }; +Map _$KitchenSinkToJson( + KitchenSink instance, +) => { + 'no-42': instance.ctorValidatedNo42, + 'dateTime': instance.dateTime?.toIso8601String(), + 'bigInt': instance.bigInt?.toString(), + 'iterable': instance.iterable?.toList(), + 'dynamicIterable': instance.dynamicIterable.toList(), + 'objectIterable': instance.objectIterable.toList(), + 'intIterable': instance.intIterable.toList(), + 'set': instance.set.toList(), + 'dynamicSet': instance.dynamicSet.toList(), + 'objectSet': instance.objectSet.toList(), + 'intSet': instance.intSet.toList(), + 'dateTimeSet': instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), + 'datetime-iterable': instance.dateTimeIterable + .map((e) => e.toIso8601String()) + .toList(), + 'list': instance.list, + 'dynamicList': instance.dynamicList, + 'objectList': instance.objectList, + 'intList': instance.intList, + 'dateTimeList': instance.dateTimeList + .map((e) => e.toIso8601String()) + .toList(), + 'nullableSimpleObjectList': instance.nullableSimpleObjectList, + 'map': instance.map, + 'stringStringMap': instance.stringStringMap, + 'dynamicIntMap': instance.dynamicIntMap, + 'objectDateTimeMap': instance.objectDateTimeMap.map( + (k, e) => MapEntry(k, e.toIso8601String()), + ), + 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, + 'crazyComplex': instance.crazyComplex + .map( + (e) => e?.map( + (k, e) => MapEntry( + k, + e?.map( + (k, e) => MapEntry( + k, + e + ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) + .toList(), + ), + ), + ), + ), + ) + .toList(), + 'val': instance.val, + 'writeNotNull': instance.writeNotNull, + r'$string': instance.string, + 'simpleObject': instance.simpleObject, + 'strictKeysObject': instance.strictKeysObject, + 'validatedPropertyNo42': instance.validatedPropertyNo42, + 'recordField': instance.recordField == null + ? null + : { + r'$1': instance.recordField!.$1, + r'$2': instance.recordField!.$2, + 'truth': instance.recordField!.truth, + }, +}; $Rec? _$recordConvertNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); JsonConverterTestClass _$JsonConverterTestClassFromJson( - Map json) => - JsonConverterTestClass( - const DurationMillisecondConverter() - .fromJson((json['duration'] as num?)?.toInt()), - (json['durationList'] as List) - .map((e) => const DurationMillisecondConverter() - .fromJson((e as num?)?.toInt())) - .toList(), - const BigIntStringConverter().fromJson(json['bigInt'] as String), - (json['bigIntMap'] as Map).map( - (k, e) => - MapEntry(k, const BigIntStringConverter().fromJson(e as String)), - ), + Map json, +) => JsonConverterTestClass( + const DurationMillisecondConverter().fromJson( + (json['duration'] as num?)?.toInt(), + ), + (json['durationList'] as List) + .map( + (e) => + const DurationMillisecondConverter().fromJson((e as num?)?.toInt()), + ) + .toList(), + const BigIntStringConverter().fromJson(json['bigInt'] as String), + (json['bigIntMap'] as Map).map( + (k, e) => MapEntry(k, const BigIntStringConverter().fromJson(e as String)), + ), + _$JsonConverterFromJson( + json['nullableBigInt'], + const BigIntStringConverter().fromJson, + ), + (json['nullableBigIntMap'] as Map).map( + (k, e) => MapEntry( + k, _$JsonConverterFromJson( - json['nullableBigInt'], const BigIntStringConverter().fromJson), - (json['nullableBigIntMap'] as Map).map( - (k, e) => MapEntry( - k, - _$JsonConverterFromJson( - e, const BigIntStringConverter().fromJson)), + e, + const BigIntStringConverter().fromJson, ), - TrivialNumberConverter.instance - .fromJson((json['numberSilly'] as num?)?.toInt()), - (json['numberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - const EpochDateTimeConverter() - .fromJson((json['dateTime'] as num?)?.toInt()), - trivialStringConverter.fromJson(json['trivialString'] as String?), - TrivialNumberConverter.instance - .fromJson((json['nullableNumberSilly'] as num?)?.toInt()), - (json['nullableNumberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - ); + ), + ), + TrivialNumberConverter.instance.fromJson( + (json['numberSilly'] as num?)?.toInt(), + ), + (json['numberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + const EpochDateTimeConverter().fromJson((json['dateTime'] as num?)?.toInt()), + trivialStringConverter.fromJson(json['trivialString'] as String?), + TrivialNumberConverter.instance.fromJson( + (json['nullableNumberSilly'] as num?)?.toInt(), + ), + (json['nullableNumberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), +); Map _$JsonConverterTestClassToJson( - JsonConverterTestClass instance) => - { - 'duration': - const DurationMillisecondConverter().toJson(instance.duration), - 'durationList': instance.durationList - .map(const DurationMillisecondConverter().toJson) - .toList(), - 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), - 'bigIntMap': instance.bigIntMap - .map((k, e) => MapEntry(k, const BigIntStringConverter().toJson(e))), - 'nullableBigInt': _$JsonConverterToJson( - instance.nullableBigInt, const BigIntStringConverter().toJson), - 'nullableBigIntMap': instance.nullableBigIntMap.map((k, e) => MapEntry( - k, - _$JsonConverterToJson( - e, const BigIntStringConverter().toJson))), - 'numberSilly': - TrivialNumberConverter.instance.toJson(instance.numberSilly), - 'numberSillySet': instance.numberSillySet - .map(TrivialNumberConverter.instance.toJson) - .toList(), - 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), - 'trivialString': trivialStringConverter.toJson(instance.trivialString), - 'nullableNumberSilly': _$JsonConverterToJson( - instance.nullableNumberSilly, TrivialNumberConverter.instance.toJson), - 'nullableNumberSillySet': instance.nullableNumberSillySet - .map((e) => _$JsonConverterToJson( - e, TrivialNumberConverter.instance.toJson)) - .toList(), - }; + JsonConverterTestClass instance, +) => { + 'duration': const DurationMillisecondConverter().toJson(instance.duration), + 'durationList': instance.durationList + .map(const DurationMillisecondConverter().toJson) + .toList(), + 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), + 'bigIntMap': instance.bigIntMap.map( + (k, e) => MapEntry(k, const BigIntStringConverter().toJson(e)), + ), + 'nullableBigInt': _$JsonConverterToJson( + instance.nullableBigInt, + const BigIntStringConverter().toJson, + ), + 'nullableBigIntMap': instance.nullableBigIntMap.map( + (k, e) => MapEntry( + k, + _$JsonConverterToJson( + e, + const BigIntStringConverter().toJson, + ), + ), + ), + 'numberSilly': TrivialNumberConverter.instance.toJson(instance.numberSilly), + 'numberSillySet': instance.numberSillySet + .map(TrivialNumberConverter.instance.toJson) + .toList(), + 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), + 'trivialString': trivialStringConverter.toJson(instance.trivialString), + 'nullableNumberSilly': _$JsonConverterToJson( + instance.nullableNumberSilly, + TrivialNumberConverter.instance.toJson, + ), + 'nullableNumberSillySet': instance.nullableNumberSillySet + .map( + (e) => _$JsonConverterToJson( + e, + TrivialNumberConverter.instance.toJson, + ), + ) + .toList(), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); JsonConverterGeneric _$JsonConverterGenericFromJson( - Map json) => - JsonConverterGeneric( - GenericConverter().fromJson(json['item'] as Map), - (json['itemList'] as List) - .map((e) => GenericConverter().fromJson(e as Map)) - .toList(), - (json['itemMap'] as Map).map( - (k, e) => MapEntry( - k, GenericConverter().fromJson(e as Map)), - ), - ); + Map json, +) => JsonConverterGeneric( + GenericConverter().fromJson(json['item'] as Map), + (json['itemList'] as List) + .map((e) => GenericConverter().fromJson(e as Map)) + .toList(), + (json['itemMap'] as Map).map( + (k, e) => + MapEntry(k, GenericConverter().fromJson(e as Map)), + ), +); Map _$JsonConverterGenericToJson( - JsonConverterGeneric instance) => - { - 'item': GenericConverter().toJson(instance.item), - 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), - 'itemMap': instance.itemMap - .map((k, e) => MapEntry(k, GenericConverter().toJson(e))), - }; + JsonConverterGeneric instance, +) => { + 'item': GenericConverter().toJson(instance.item), + 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), + 'itemMap': instance.itemMap.map( + (k, e) => MapEntry(k, GenericConverter().toJson(e)), + ), +}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.dart index f00f38ebc..39efca774 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.dart @@ -48,32 +48,31 @@ class _Factory implements k.KitchenSinkFactory { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) => - KitchenSink( - ctorValidatedNo42: ctorValidatedNo42, - iterable: iterable, - dynamicIterable: dynamicIterable, - objectIterable: objectIterable, - intIterable: intIterable, - dateTimeIterable: dateTimeIterable, - ); + }) => KitchenSink( + ctorValidatedNo42: ctorValidatedNo42, + iterable: iterable, + dynamicIterable: dynamicIterable, + objectIterable: objectIterable, + intIterable: intIterable, + dateTimeIterable: dateTimeIterable, + ); k.KitchenSink fromJson(Map json) => KitchenSink.fromJson(json); k.JsonConverterTestClass jsonConverterCtor() => JsonConverterTestClass( - const Duration(), - [], - BigInt.zero, - {}, - BigInt.zero, - {}, - TrivialNumber(0), - {}, - DateTime.fromMillisecondsSinceEpoch(0), - TrivialString(''), - TrivialNumber(0), - {}, - ); + const Duration(), + [], + BigInt.zero, + {}, + BigInt.zero, + {}, + TrivialNumber(0), + {}, + DateTime.fromMillisecondsSinceEpoch(0), + TrivialString(''), + TrivialNumber(0), + {}, + ); k.JsonConverterTestClass jsonConverterFromJson(Map json) => JsonConverterTestClass.fromJson(json); @@ -87,9 +86,7 @@ Object? _valueAccessor(Map json, String key) { return json[key]; } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) class KitchenSink implements k.KitchenSink { // NOTE: exposing these as Iterable, but storing the values as List // to make the equality test work trivially. @@ -109,14 +106,17 @@ class KitchenSink implements k.KitchenSink { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) : _iterable = iterable?.toList(), - _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), - _objectIterable = objectIterable?.toList() ?? _defaultList(), - _intIterable = intIterable?.toList() ?? _defaultList(), - _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { + }) : _iterable = iterable?.toList(), + _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), + _objectIterable = objectIterable?.toList() ?? _defaultList(), + _intIterable = intIterable?.toList() ?? _defaultList(), + _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { if (ctorValidatedNo42 == 42) { throw ArgumentError.value( - 42, 'ctorValidatedNo42', 'The value `42` is not allowed.'); + 42, + 'ctorValidatedNo42', + 'The value `42` is not allowed.', + ); } } @@ -197,12 +197,15 @@ class KitchenSink implements k.KitchenSink { } } -@JsonSerializable(anyMap: true, converters: [ - // referencing a top-level field should work - durationConverter, - // referencing via a const constructor should work - BigIntStringConverter(), -]) +@JsonSerializable( + anyMap: true, + converters: [ + // referencing a top-level field should work + durationConverter, + // referencing via a const constructor should work + BigIntStringConverter(), + ], +) // referencing a top-level field should work @trivialStringConverter @TrivialNumberConverter.instance @@ -248,9 +251,7 @@ class JsonConverterTestClass implements k.JsonConverterTestClass { Set nullableNumberSillySet; } -@JsonSerializable( - anyMap: true, -) +@JsonSerializable(anyMap: true) // ignore: inference_failure_on_instance_creation @GenericConverter() class JsonConverterGeneric { @@ -258,11 +259,7 @@ class JsonConverterGeneric { List itemList; Map itemMap; - JsonConverterGeneric( - this.item, - this.itemList, - this.itemMap, - ); + JsonConverterGeneric(this.item, this.itemList, this.itemMap); factory JsonConverterGeneric.fromJson(Map json) => _$JsonConverterGenericFromJson(json); diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.g.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.g.dart index 69301303d..326f7e80e 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.g.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map.g.dart @@ -8,26 +8,32 @@ part of 'kitchen_sink.g_any_map.dart'; // JsonSerializableGenerator // ************************************************************************** -KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( - ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), - iterable: _valueAccessor(json, 'iterable') as List?, - dynamicIterable: json['dynamicIterable'] as List?, - objectIterable: - (json['objectIterable'] as List?)?.map((e) => e as Object), - intIterable: (json['intIterable'] as List?) - ?.map((e) => (e as num).toInt()), - dateTimeIterable: (json['datetime-iterable'] as List?) - ?.map((e) => DateTime.parse(e as String)), - ) +KitchenSink _$KitchenSinkFromJson(Map json) => + KitchenSink( + ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), + iterable: _valueAccessor(json, 'iterable') as List?, + dynamicIterable: json['dynamicIterable'] as List?, + objectIterable: (json['objectIterable'] as List?)?.map( + (e) => e as Object, + ), + intIterable: (json['intIterable'] as List?)?.map( + (e) => (e as num).toInt(), + ), + dateTimeIterable: (json['datetime-iterable'] as List?)?.map( + (e) => DateTime.parse(e as String), + ), + ) ..dateTime = json['dateTime'] == null ? null : DateTime.parse(json['dateTime'] as String) - ..bigInt = - json['bigInt'] == null ? null : BigInt.parse(json['bigInt'] as String) + ..bigInt = json['bigInt'] == null + ? null + : BigInt.parse(json['bigInt'] as String) ..set = (json['set'] as List).toSet() ..dynamicSet = (json['dynamicSet'] as List).toSet() - ..objectSet = - (json['objectSet'] as List).map((e) => e as Object).toSet() + ..objectSet = (json['objectSet'] as List) + .map((e) => e as Object) + .toSet() ..intSet = (json['intSet'] as List) .map((e) => (e as num).toInt()) .toSet() @@ -36,8 +42,9 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toSet() ..list = json['list'] as List ..dynamicList = json['dynamicList'] as List - ..objectList = - (json['objectList'] as List).map((e) => e as Object).toList() + ..objectList = (json['objectList'] as List) + .map((e) => e as Object) + .toList() ..intList = (json['intList'] as List) .map((e) => (e as num).toInt()) .toList() @@ -49,37 +56,47 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .map((e) => e == null ? null : SimpleObject.fromJson(e as Map)) .toList() ..map = json['map'] as Map - ..stringStringMap = - Map.from(json['stringStringMap'] as Map) + ..stringStringMap = Map.from( + json['stringStringMap'] as Map, + ) ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) ..objectDateTimeMap = (json['objectDateTimeMap'] as Map).map( (k, e) => MapEntry(k as Object, DateTime.parse(e as String)), ) ..nullableSimpleObjectMap = (json['nullableSimpleObjectMap'] as Map).map( (k, e) => MapEntry( - k as String, e == null ? null : SimpleObject.fromJson(e as Map)), + k as String, + e == null ? null : SimpleObject.fromJson(e as Map), + ), ) ..crazyComplex = (json['crazyComplex'] as List) - .map((e) => (e as Map?)?.map( - (k, e) => MapEntry( + .map( + (e) => (e as Map?)?.map( + (k, e) => MapEntry( + k as String, + (e as Map?)?.map( + (k, e) => MapEntry( k as String, - (e as Map?)?.map( - (k, e) => MapEntry( - k as String, - (e as List?) - ?.map((e) => (e as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList()) - .toList()), - )), - )) + (e as List?) + ?.map( + (e) => (e as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), + ) + .toList(), + ), + ), + ), + ), + ) .toList() ..val = Map.from(json['val'] as Map) ..writeNotNull = json['writeNotNull'] as bool? ..string = KitchenSink._trickyValueAccessor(json, r'$string') as String? ..simpleObject = SimpleObject.fromJson(json['simpleObject'] as Map) - ..strictKeysObject = - StrictKeysObject.fromJson(json['strictKeysObject'] as Map) + ..strictKeysObject = StrictKeysObject.fromJson( + json['strictKeysObject'] as Map, + ) ..validatedPropertyNo42 = (json['validatedPropertyNo42'] as num?)?.toInt() ..recordField = _$recordConvertAnyNullable( json['recordField'], @@ -90,166 +107,203 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( ), ); -Map _$KitchenSinkToJson(KitchenSink instance) => - { - 'no-42': instance.ctorValidatedNo42, - 'dateTime': instance.dateTime?.toIso8601String(), - 'bigInt': instance.bigInt?.toString(), - 'iterable': instance.iterable?.toList(), - 'dynamicIterable': instance.dynamicIterable.toList(), - 'objectIterable': instance.objectIterable.toList(), - 'intIterable': instance.intIterable.toList(), - 'set': instance.set.toList(), - 'dynamicSet': instance.dynamicSet.toList(), - 'objectSet': instance.objectSet.toList(), - 'intSet': instance.intSet.toList(), - 'dateTimeSet': - instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), - 'datetime-iterable': - instance.dateTimeIterable.map((e) => e.toIso8601String()).toList(), - 'list': instance.list, - 'dynamicList': instance.dynamicList, - 'objectList': instance.objectList, - 'intList': instance.intList, - 'dateTimeList': - instance.dateTimeList.map((e) => e.toIso8601String()).toList(), - 'nullableSimpleObjectList': instance.nullableSimpleObjectList, - 'map': instance.map, - 'stringStringMap': instance.stringStringMap, - 'dynamicIntMap': instance.dynamicIntMap, - 'objectDateTimeMap': instance.objectDateTimeMap - .map((k, e) => MapEntry(k, e.toIso8601String())), - 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, - 'crazyComplex': instance.crazyComplex - .map((e) => e?.map((k, e) => MapEntry( - k, - e?.map((k, e) => MapEntry( - k, - e - ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) - .toList()))))) - .toList(), - 'val': instance.val, - 'writeNotNull': instance.writeNotNull, - r'$string': instance.string, - 'simpleObject': instance.simpleObject, - 'strictKeysObject': instance.strictKeysObject, - 'validatedPropertyNo42': instance.validatedPropertyNo42, - 'recordField': instance.recordField == null - ? null - : { - r'$1': instance.recordField!.$1, - r'$2': instance.recordField!.$2, - 'truth': instance.recordField!.truth, - }, - }; +Map _$KitchenSinkToJson( + KitchenSink instance, +) => { + 'no-42': instance.ctorValidatedNo42, + 'dateTime': instance.dateTime?.toIso8601String(), + 'bigInt': instance.bigInt?.toString(), + 'iterable': instance.iterable?.toList(), + 'dynamicIterable': instance.dynamicIterable.toList(), + 'objectIterable': instance.objectIterable.toList(), + 'intIterable': instance.intIterable.toList(), + 'set': instance.set.toList(), + 'dynamicSet': instance.dynamicSet.toList(), + 'objectSet': instance.objectSet.toList(), + 'intSet': instance.intSet.toList(), + 'dateTimeSet': instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), + 'datetime-iterable': instance.dateTimeIterable + .map((e) => e.toIso8601String()) + .toList(), + 'list': instance.list, + 'dynamicList': instance.dynamicList, + 'objectList': instance.objectList, + 'intList': instance.intList, + 'dateTimeList': instance.dateTimeList + .map((e) => e.toIso8601String()) + .toList(), + 'nullableSimpleObjectList': instance.nullableSimpleObjectList, + 'map': instance.map, + 'stringStringMap': instance.stringStringMap, + 'dynamicIntMap': instance.dynamicIntMap, + 'objectDateTimeMap': instance.objectDateTimeMap.map( + (k, e) => MapEntry(k, e.toIso8601String()), + ), + 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, + 'crazyComplex': instance.crazyComplex + .map( + (e) => e?.map( + (k, e) => MapEntry( + k, + e?.map( + (k, e) => MapEntry( + k, + e + ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) + .toList(), + ), + ), + ), + ), + ) + .toList(), + 'val': instance.val, + 'writeNotNull': instance.writeNotNull, + r'$string': instance.string, + 'simpleObject': instance.simpleObject, + 'strictKeysObject': instance.strictKeysObject, + 'validatedPropertyNo42': instance.validatedPropertyNo42, + 'recordField': instance.recordField == null + ? null + : { + r'$1': instance.recordField!.$1, + r'$2': instance.recordField!.$2, + 'truth': instance.recordField!.truth, + }, +}; $Rec? _$recordConvertAnyNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); -JsonConverterTestClass _$JsonConverterTestClassFromJson(Map json) => - JsonConverterTestClass( - const DurationMillisecondConverter() - .fromJson((json['duration'] as num?)?.toInt()), - (json['durationList'] as List) - .map((e) => const DurationMillisecondConverter() - .fromJson((e as num?)?.toInt())) - .toList(), - const BigIntStringConverter().fromJson(json['bigInt'] as String), - (json['bigIntMap'] as Map).map( - (k, e) => MapEntry( - k as String, const BigIntStringConverter().fromJson(e as String)), - ), +JsonConverterTestClass _$JsonConverterTestClassFromJson( + Map json, +) => JsonConverterTestClass( + const DurationMillisecondConverter().fromJson( + (json['duration'] as num?)?.toInt(), + ), + (json['durationList'] as List) + .map( + (e) => + const DurationMillisecondConverter().fromJson((e as num?)?.toInt()), + ) + .toList(), + const BigIntStringConverter().fromJson(json['bigInt'] as String), + (json['bigIntMap'] as Map).map( + (k, e) => MapEntry( + k as String, + const BigIntStringConverter().fromJson(e as String), + ), + ), + _$JsonConverterFromJson( + json['nullableBigInt'], + const BigIntStringConverter().fromJson, + ), + (json['nullableBigIntMap'] as Map).map( + (k, e) => MapEntry( + k as String, _$JsonConverterFromJson( - json['nullableBigInt'], const BigIntStringConverter().fromJson), - (json['nullableBigIntMap'] as Map).map( - (k, e) => MapEntry( - k as String, - _$JsonConverterFromJson( - e, const BigIntStringConverter().fromJson)), + e, + const BigIntStringConverter().fromJson, ), - TrivialNumberConverter.instance - .fromJson((json['numberSilly'] as num?)?.toInt()), - (json['numberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - const EpochDateTimeConverter() - .fromJson((json['dateTime'] as num?)?.toInt()), - trivialStringConverter.fromJson(json['trivialString'] as String?), - TrivialNumberConverter.instance - .fromJson((json['nullableNumberSilly'] as num?)?.toInt()), - (json['nullableNumberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - ); + ), + ), + TrivialNumberConverter.instance.fromJson( + (json['numberSilly'] as num?)?.toInt(), + ), + (json['numberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + const EpochDateTimeConverter().fromJson((json['dateTime'] as num?)?.toInt()), + trivialStringConverter.fromJson(json['trivialString'] as String?), + TrivialNumberConverter.instance.fromJson( + (json['nullableNumberSilly'] as num?)?.toInt(), + ), + (json['nullableNumberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), +); Map _$JsonConverterTestClassToJson( - JsonConverterTestClass instance) => - { - 'duration': - const DurationMillisecondConverter().toJson(instance.duration), - 'durationList': instance.durationList - .map(const DurationMillisecondConverter().toJson) - .toList(), - 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), - 'bigIntMap': instance.bigIntMap - .map((k, e) => MapEntry(k, const BigIntStringConverter().toJson(e))), - 'nullableBigInt': _$JsonConverterToJson( - instance.nullableBigInt, const BigIntStringConverter().toJson), - 'nullableBigIntMap': instance.nullableBigIntMap.map((k, e) => MapEntry( - k, - _$JsonConverterToJson( - e, const BigIntStringConverter().toJson))), - 'numberSilly': - TrivialNumberConverter.instance.toJson(instance.numberSilly), - 'numberSillySet': instance.numberSillySet - .map(TrivialNumberConverter.instance.toJson) - .toList(), - 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), - 'trivialString': trivialStringConverter.toJson(instance.trivialString), - 'nullableNumberSilly': _$JsonConverterToJson( - instance.nullableNumberSilly, TrivialNumberConverter.instance.toJson), - 'nullableNumberSillySet': instance.nullableNumberSillySet - .map((e) => _$JsonConverterToJson( - e, TrivialNumberConverter.instance.toJson)) - .toList(), - }; + JsonConverterTestClass instance, +) => { + 'duration': const DurationMillisecondConverter().toJson(instance.duration), + 'durationList': instance.durationList + .map(const DurationMillisecondConverter().toJson) + .toList(), + 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), + 'bigIntMap': instance.bigIntMap.map( + (k, e) => MapEntry(k, const BigIntStringConverter().toJson(e)), + ), + 'nullableBigInt': _$JsonConverterToJson( + instance.nullableBigInt, + const BigIntStringConverter().toJson, + ), + 'nullableBigIntMap': instance.nullableBigIntMap.map( + (k, e) => MapEntry( + k, + _$JsonConverterToJson( + e, + const BigIntStringConverter().toJson, + ), + ), + ), + 'numberSilly': TrivialNumberConverter.instance.toJson(instance.numberSilly), + 'numberSillySet': instance.numberSillySet + .map(TrivialNumberConverter.instance.toJson) + .toList(), + 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), + 'trivialString': trivialStringConverter.toJson(instance.trivialString), + 'nullableNumberSilly': _$JsonConverterToJson( + instance.nullableNumberSilly, + TrivialNumberConverter.instance.toJson, + ), + 'nullableNumberSillySet': instance.nullableNumberSillySet + .map( + (e) => _$JsonConverterToJson( + e, + TrivialNumberConverter.instance.toJson, + ), + ) + .toList(), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); JsonConverterGeneric _$JsonConverterGenericFromJson( - Map json) => - JsonConverterGeneric( - GenericConverter().fromJson(json['item'] as Map), - (json['itemList'] as List) - .map((e) => GenericConverter().fromJson(e as Map)) - .toList(), - (json['itemMap'] as Map).map( - (k, e) => MapEntry(k as String, - GenericConverter().fromJson(e as Map)), - ), - ); + Map json, +) => JsonConverterGeneric( + GenericConverter().fromJson(json['item'] as Map), + (json['itemList'] as List) + .map((e) => GenericConverter().fromJson(e as Map)) + .toList(), + (json['itemMap'] as Map).map( + (k, e) => MapEntry( + k as String, + GenericConverter().fromJson(e as Map), + ), + ), +); Map _$JsonConverterGenericToJson( - JsonConverterGeneric instance) => - { - 'item': GenericConverter().toJson(instance.item), - 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), - 'itemMap': instance.itemMap - .map((k, e) => MapEntry(k, GenericConverter().toJson(e))), - }; + JsonConverterGeneric instance, +) => { + 'item': GenericConverter().toJson(instance.item), + 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), + 'itemMap': instance.itemMap.map( + (k, e) => MapEntry(k, GenericConverter().toJson(e)), + ), +}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.dart index 0d9dc1144..05f287f39 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.dart @@ -48,32 +48,31 @@ class _Factory implements k.KitchenSinkFactory { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) => - KitchenSink( - ctorValidatedNo42: ctorValidatedNo42, - iterable: iterable, - dynamicIterable: dynamicIterable, - objectIterable: objectIterable, - intIterable: intIterable, - dateTimeIterable: dateTimeIterable, - ); + }) => KitchenSink( + ctorValidatedNo42: ctorValidatedNo42, + iterable: iterable, + dynamicIterable: dynamicIterable, + objectIterable: objectIterable, + intIterable: intIterable, + dateTimeIterable: dateTimeIterable, + ); k.KitchenSink fromJson(Map json) => KitchenSink.fromJson(json); k.JsonConverterTestClass jsonConverterCtor() => JsonConverterTestClass( - const Duration(), - [], - BigInt.zero, - {}, - BigInt.zero, - {}, - TrivialNumber(0), - {}, - DateTime.fromMillisecondsSinceEpoch(0), - TrivialString(''), - TrivialNumber(0), - {}, - ); + const Duration(), + [], + BigInt.zero, + {}, + BigInt.zero, + {}, + TrivialNumber(0), + {}, + DateTime.fromMillisecondsSinceEpoch(0), + TrivialString(''), + TrivialNumber(0), + {}, + ); k.JsonConverterTestClass jsonConverterFromJson(Map json) => JsonConverterTestClass.fromJson(json); @@ -87,10 +86,7 @@ Object? _valueAccessor(Map json, String key) { return json[key]; } -@JsonSerializable( - checked: true, - anyMap: true, -) +@JsonSerializable(checked: true, anyMap: true) class KitchenSink implements k.KitchenSink { // NOTE: exposing these as Iterable, but storing the values as List // to make the equality test work trivially. @@ -110,14 +106,17 @@ class KitchenSink implements k.KitchenSink { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) : _iterable = iterable?.toList(), - _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), - _objectIterable = objectIterable?.toList() ?? _defaultList(), - _intIterable = intIterable?.toList() ?? _defaultList(), - _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { + }) : _iterable = iterable?.toList(), + _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), + _objectIterable = objectIterable?.toList() ?? _defaultList(), + _intIterable = intIterable?.toList() ?? _defaultList(), + _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { if (ctorValidatedNo42 == 42) { throw ArgumentError.value( - 42, 'ctorValidatedNo42', 'The value `42` is not allowed.'); + 42, + 'ctorValidatedNo42', + 'The value `42` is not allowed.', + ); } } @@ -198,12 +197,16 @@ class KitchenSink implements k.KitchenSink { } } -@JsonSerializable(checked: true, anyMap: true, converters: [ - // referencing a top-level field should work - durationConverter, - // referencing via a const constructor should work - BigIntStringConverter(), -]) +@JsonSerializable( + checked: true, + anyMap: true, + converters: [ + // referencing a top-level field should work + durationConverter, + // referencing via a const constructor should work + BigIntStringConverter(), + ], +) // referencing a top-level field should work @trivialStringConverter @TrivialNumberConverter.instance @@ -249,10 +252,7 @@ class JsonConverterTestClass implements k.JsonConverterTestClass { Set nullableNumberSillySet; } -@JsonSerializable( - checked: true, - anyMap: true, -) +@JsonSerializable(checked: true, anyMap: true) // ignore: inference_failure_on_instance_creation @GenericConverter() class JsonConverterGeneric { @@ -260,11 +260,7 @@ class JsonConverterGeneric { List itemList; Map itemMap; - JsonConverterGeneric( - this.item, - this.itemList, - this.itemMap, - ); + JsonConverterGeneric(this.item, this.itemList, this.itemMap); factory JsonConverterGeneric.fromJson(Map json) => _$JsonConverterGenericFromJson(json); diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.g.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.g.dart index c004dcc74..25cfabf1c 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.g.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_any_map__checked.g.dart @@ -9,342 +9,422 @@ part of 'kitchen_sink.g_any_map__checked.dart'; // ************************************************************************** KitchenSink _$KitchenSinkFromJson(Map json) => $checkedCreate( - 'KitchenSink', - json, - ($checkedConvert) { - final val = KitchenSink( - ctorValidatedNo42: - $checkedConvert('no-42', (v) => (v as num?)?.toInt()), - iterable: $checkedConvert( - 'iterable', - (v) => v as List?, - readValue: _valueAccessor, - ), - dynamicIterable: - $checkedConvert('dynamicIterable', (v) => v as List?), - objectIterable: $checkedConvert('objectIterable', - (v) => (v as List?)?.map((e) => e as Object)), - intIterable: $checkedConvert('intIterable', - (v) => (v as List?)?.map((e) => (e as num).toInt())), - dateTimeIterable: $checkedConvert( - 'datetime-iterable', - (v) => (v as List?) - ?.map((e) => DateTime.parse(e as String))), - ); - $checkedConvert( - 'dateTime', - (v) => - val.dateTime = v == null ? null : DateTime.parse(v as String)); - $checkedConvert('bigInt', - (v) => val.bigInt = v == null ? null : BigInt.parse(v as String)); - $checkedConvert('set', (v) => val.set = (v as List).toSet()); - $checkedConvert( - 'dynamicSet', (v) => val.dynamicSet = (v as List).toSet()); - $checkedConvert( - 'objectSet', - (v) => val.objectSet = - (v as List).map((e) => e as Object).toSet()); - $checkedConvert( - 'intSet', - (v) => val.intSet = - (v as List).map((e) => (e as num).toInt()).toSet()); - $checkedConvert( - 'dateTimeSet', - (v) => val.dateTimeSet = (v as List) - .map((e) => DateTime.parse(e as String)) - .toSet()); - $checkedConvert('list', (v) => val.list = v as List); - $checkedConvert( - 'dynamicList', (v) => val.dynamicList = v as List); - $checkedConvert( - 'objectList', - (v) => val.objectList = - (v as List).map((e) => e as Object).toList()); - $checkedConvert( - 'intList', - (v) => val.intList = - (v as List).map((e) => (e as num).toInt()).toList()); - $checkedConvert( - 'dateTimeList', - (v) => val.dateTimeList = (v as List) - .map((e) => DateTime.parse(e as String)) - .toList()); - $checkedConvert( - 'nullableSimpleObjectList', - (v) => val.nullableSimpleObjectList = (v as List) - .map((e) => e == null ? null : SimpleObject.fromJson(e as Map)) - .toList()); - $checkedConvert('map', (v) => val.map = v as Map); - $checkedConvert('stringStringMap', - (v) => val.stringStringMap = Map.from(v as Map)); - $checkedConvert('dynamicIntMap', - (v) => val.dynamicIntMap = Map.from(v as Map)); - $checkedConvert( - 'objectDateTimeMap', - (v) => val.objectDateTimeMap = (v as Map).map( - (k, e) => MapEntry(k as Object, DateTime.parse(e as String)), - )); - $checkedConvert( - 'nullableSimpleObjectMap', - (v) => val.nullableSimpleObjectMap = (v as Map).map( - (k, e) => MapEntry(k as String, - e == null ? null : SimpleObject.fromJson(e as Map)), - )); - $checkedConvert( - 'crazyComplex', - (v) => val.crazyComplex = (v as List) - .map((e) => (e as Map?)?.map( - (k, e) => MapEntry( - k as String, - (e as Map?)?.map( - (k, e) => MapEntry( - k as String, - (e as List?) - ?.map((e) => (e as List?) - ?.map( - (e) => DateTime.parse(e as String)) - .toList()) - .toList()), - )), - )) - .toList()); - $checkedConvert( - 'val', (v) => val.val = Map.from(v as Map)); - $checkedConvert('writeNotNull', (v) => val.writeNotNull = v as bool?); - $checkedConvert( - r'$string', - (v) => val.string = v as String?, - readValue: KitchenSink._trickyValueAccessor, - ); - $checkedConvert('simpleObject', - (v) => val.simpleObject = SimpleObject.fromJson(v as Map)); - $checkedConvert('strictKeysObject', - (v) => val.strictKeysObject = StrictKeysObject.fromJson(v as Map)); - $checkedConvert('validatedPropertyNo42', - (v) => val.validatedPropertyNo42 = (v as num?)?.toInt()); - $checkedConvert( - 'recordField', - (v) => val.recordField = _$recordConvertAnyNullable( - v, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, + 'KitchenSink', + json, + ($checkedConvert) { + final val = KitchenSink( + ctorValidatedNo42: $checkedConvert('no-42', (v) => (v as num?)?.toInt()), + iterable: $checkedConvert( + 'iterable', + (v) => v as List?, + readValue: _valueAccessor, + ), + dynamicIterable: $checkedConvert( + 'dynamicIterable', + (v) => v as List?, + ), + objectIterable: $checkedConvert( + 'objectIterable', + (v) => (v as List?)?.map((e) => e as Object), + ), + intIterable: $checkedConvert( + 'intIterable', + (v) => (v as List?)?.map((e) => (e as num).toInt()), + ), + dateTimeIterable: $checkedConvert( + 'datetime-iterable', + (v) => (v as List?)?.map((e) => DateTime.parse(e as String)), + ), + ); + $checkedConvert( + 'dateTime', + (v) => val.dateTime = v == null ? null : DateTime.parse(v as String), + ); + $checkedConvert( + 'bigInt', + (v) => val.bigInt = v == null ? null : BigInt.parse(v as String), + ); + $checkedConvert('set', (v) => val.set = (v as List).toSet()); + $checkedConvert( + 'dynamicSet', + (v) => val.dynamicSet = (v as List).toSet(), + ); + $checkedConvert( + 'objectSet', + (v) => + val.objectSet = (v as List).map((e) => e as Object).toSet(), + ); + $checkedConvert( + 'intSet', + (v) => val.intSet = (v as List) + .map((e) => (e as num).toInt()) + .toSet(), + ); + $checkedConvert( + 'dateTimeSet', + (v) => val.dateTimeSet = (v as List) + .map((e) => DateTime.parse(e as String)) + .toSet(), + ); + $checkedConvert('list', (v) => val.list = v as List); + $checkedConvert('dynamicList', (v) => val.dynamicList = v as List); + $checkedConvert( + 'objectList', + (v) => val.objectList = (v as List) + .map((e) => e as Object) + .toList(), + ); + $checkedConvert( + 'intList', + (v) => val.intList = (v as List) + .map((e) => (e as num).toInt()) + .toList(), + ); + $checkedConvert( + 'dateTimeList', + (v) => val.dateTimeList = (v as List) + .map((e) => DateTime.parse(e as String)) + .toList(), + ); + $checkedConvert( + 'nullableSimpleObjectList', + (v) => val.nullableSimpleObjectList = (v as List) + .map((e) => e == null ? null : SimpleObject.fromJson(e as Map)) + .toList(), + ); + $checkedConvert('map', (v) => val.map = v as Map); + $checkedConvert( + 'stringStringMap', + (v) => val.stringStringMap = Map.from(v as Map), + ); + $checkedConvert( + 'dynamicIntMap', + (v) => val.dynamicIntMap = Map.from(v as Map), + ); + $checkedConvert( + 'objectDateTimeMap', + (v) => val.objectDateTimeMap = (v as Map).map( + (k, e) => MapEntry(k as Object, DateTime.parse(e as String)), + ), + ); + $checkedConvert( + 'nullableSimpleObjectMap', + (v) => val.nullableSimpleObjectMap = (v as Map).map( + (k, e) => MapEntry( + k as String, + e == null ? null : SimpleObject.fromJson(e as Map), + ), + ), + ); + $checkedConvert( + 'crazyComplex', + (v) => val.crazyComplex = (v as List) + .map( + (e) => (e as Map?)?.map( + (k, e) => MapEntry( + k as String, + (e as Map?)?.map( + (k, e) => MapEntry( + k as String, + (e as List?) + ?.map( + (e) => (e as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), + ) + .toList(), ), - )); - return val; - }, - fieldKeyMap: const { - 'ctorValidatedNo42': 'no-42', - 'dateTimeIterable': 'datetime-iterable', - 'string': r'$string' - }, + ), + ), + ), + ) + .toList(), + ); + $checkedConvert('val', (v) => val.val = Map.from(v as Map)); + $checkedConvert('writeNotNull', (v) => val.writeNotNull = v as bool?); + $checkedConvert( + r'$string', + (v) => val.string = v as String?, + readValue: KitchenSink._trickyValueAccessor, + ); + $checkedConvert( + 'simpleObject', + (v) => val.simpleObject = SimpleObject.fromJson(v as Map), ); + $checkedConvert( + 'strictKeysObject', + (v) => val.strictKeysObject = StrictKeysObject.fromJson(v as Map), + ); + $checkedConvert( + 'validatedPropertyNo42', + (v) => val.validatedPropertyNo42 = (v as num?)?.toInt(), + ); + $checkedConvert( + 'recordField', + (v) => val.recordField = _$recordConvertAnyNullable( + v, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ); + return val; + }, + fieldKeyMap: const { + 'ctorValidatedNo42': 'no-42', + 'dateTimeIterable': 'datetime-iterable', + 'string': r'$string', + }, +); -Map _$KitchenSinkToJson(KitchenSink instance) => - { - 'no-42': instance.ctorValidatedNo42, - 'dateTime': instance.dateTime?.toIso8601String(), - 'bigInt': instance.bigInt?.toString(), - 'iterable': instance.iterable?.toList(), - 'dynamicIterable': instance.dynamicIterable.toList(), - 'objectIterable': instance.objectIterable.toList(), - 'intIterable': instance.intIterable.toList(), - 'set': instance.set.toList(), - 'dynamicSet': instance.dynamicSet.toList(), - 'objectSet': instance.objectSet.toList(), - 'intSet': instance.intSet.toList(), - 'dateTimeSet': - instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), - 'datetime-iterable': - instance.dateTimeIterable.map((e) => e.toIso8601String()).toList(), - 'list': instance.list, - 'dynamicList': instance.dynamicList, - 'objectList': instance.objectList, - 'intList': instance.intList, - 'dateTimeList': - instance.dateTimeList.map((e) => e.toIso8601String()).toList(), - 'nullableSimpleObjectList': instance.nullableSimpleObjectList, - 'map': instance.map, - 'stringStringMap': instance.stringStringMap, - 'dynamicIntMap': instance.dynamicIntMap, - 'objectDateTimeMap': instance.objectDateTimeMap - .map((k, e) => MapEntry(k, e.toIso8601String())), - 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, - 'crazyComplex': instance.crazyComplex - .map((e) => e?.map((k, e) => MapEntry( - k, - e?.map((k, e) => MapEntry( - k, - e - ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) - .toList()))))) - .toList(), - 'val': instance.val, - 'writeNotNull': instance.writeNotNull, - r'$string': instance.string, - 'simpleObject': instance.simpleObject, - 'strictKeysObject': instance.strictKeysObject, - 'validatedPropertyNo42': instance.validatedPropertyNo42, - 'recordField': instance.recordField == null - ? null - : { - r'$1': instance.recordField!.$1, - r'$2': instance.recordField!.$2, - 'truth': instance.recordField!.truth, - }, - }; +Map _$KitchenSinkToJson( + KitchenSink instance, +) => { + 'no-42': instance.ctorValidatedNo42, + 'dateTime': instance.dateTime?.toIso8601String(), + 'bigInt': instance.bigInt?.toString(), + 'iterable': instance.iterable?.toList(), + 'dynamicIterable': instance.dynamicIterable.toList(), + 'objectIterable': instance.objectIterable.toList(), + 'intIterable': instance.intIterable.toList(), + 'set': instance.set.toList(), + 'dynamicSet': instance.dynamicSet.toList(), + 'objectSet': instance.objectSet.toList(), + 'intSet': instance.intSet.toList(), + 'dateTimeSet': instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), + 'datetime-iterable': instance.dateTimeIterable + .map((e) => e.toIso8601String()) + .toList(), + 'list': instance.list, + 'dynamicList': instance.dynamicList, + 'objectList': instance.objectList, + 'intList': instance.intList, + 'dateTimeList': instance.dateTimeList + .map((e) => e.toIso8601String()) + .toList(), + 'nullableSimpleObjectList': instance.nullableSimpleObjectList, + 'map': instance.map, + 'stringStringMap': instance.stringStringMap, + 'dynamicIntMap': instance.dynamicIntMap, + 'objectDateTimeMap': instance.objectDateTimeMap.map( + (k, e) => MapEntry(k, e.toIso8601String()), + ), + 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, + 'crazyComplex': instance.crazyComplex + .map( + (e) => e?.map( + (k, e) => MapEntry( + k, + e?.map( + (k, e) => MapEntry( + k, + e + ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) + .toList(), + ), + ), + ), + ), + ) + .toList(), + 'val': instance.val, + 'writeNotNull': instance.writeNotNull, + r'$string': instance.string, + 'simpleObject': instance.simpleObject, + 'strictKeysObject': instance.strictKeysObject, + 'validatedPropertyNo42': instance.validatedPropertyNo42, + 'recordField': instance.recordField == null + ? null + : { + r'$1': instance.recordField!.$1, + r'$2': instance.recordField!.$2, + 'truth': instance.recordField!.truth, + }, +}; $Rec? _$recordConvertAnyNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); -JsonConverterTestClass _$JsonConverterTestClassFromJson(Map json) => - $checkedCreate( - 'JsonConverterTestClass', - json, - ($checkedConvert) { - final val = JsonConverterTestClass( - $checkedConvert( - 'duration', - (v) => const DurationMillisecondConverter() - .fromJson((v as num?)?.toInt())), - $checkedConvert( - 'durationList', - (v) => (v as List) - .map((e) => const DurationMillisecondConverter() - .fromJson((e as num?)?.toInt())) - .toList()), - $checkedConvert('bigInt', - (v) => const BigIntStringConverter().fromJson(v as String)), - $checkedConvert( - 'bigIntMap', - (v) => (v as Map).map( - (k, e) => MapEntry(k as String, - const BigIntStringConverter().fromJson(e as String)), - )), - $checkedConvert( - 'nullableBigInt', - (v) => _$JsonConverterFromJson( - v, const BigIntStringConverter().fromJson)), - $checkedConvert( - 'nullableBigIntMap', - (v) => (v as Map).map( - (k, e) => MapEntry( - k as String, - _$JsonConverterFromJson( - e, const BigIntStringConverter().fromJson)), - )), - $checkedConvert( - 'numberSilly', - (v) => TrivialNumberConverter.instance - .fromJson((v as num?)?.toInt())), - $checkedConvert( - 'numberSillySet', - (v) => (v as List) - .map((e) => TrivialNumberConverter.instance - .fromJson((e as num?)?.toInt())) - .toSet()), - $checkedConvert( - 'dateTime', - (v) => const EpochDateTimeConverter() - .fromJson((v as num?)?.toInt())), - $checkedConvert('trivialString', - (v) => trivialStringConverter.fromJson(v as String?)), - $checkedConvert( - 'nullableNumberSilly', - (v) => TrivialNumberConverter.instance - .fromJson((v as num?)?.toInt())), - $checkedConvert( - 'nullableNumberSillySet', - (v) => (v as List) - .map((e) => TrivialNumberConverter.instance - .fromJson((e as num?)?.toInt())) - .toSet()), - ); - return val; - }, - ); +JsonConverterTestClass _$JsonConverterTestClassFromJson( + Map json, +) => $checkedCreate('JsonConverterTestClass', json, ($checkedConvert) { + final val = JsonConverterTestClass( + $checkedConvert( + 'duration', + (v) => + const DurationMillisecondConverter().fromJson((v as num?)?.toInt()), + ), + $checkedConvert( + 'durationList', + (v) => (v as List) + .map( + (e) => const DurationMillisecondConverter().fromJson( + (e as num?)?.toInt(), + ), + ) + .toList(), + ), + $checkedConvert( + 'bigInt', + (v) => const BigIntStringConverter().fromJson(v as String), + ), + $checkedConvert( + 'bigIntMap', + (v) => (v as Map).map( + (k, e) => MapEntry( + k as String, + const BigIntStringConverter().fromJson(e as String), + ), + ), + ), + $checkedConvert( + 'nullableBigInt', + (v) => _$JsonConverterFromJson( + v, + const BigIntStringConverter().fromJson, + ), + ), + $checkedConvert( + 'nullableBigIntMap', + (v) => (v as Map).map( + (k, e) => MapEntry( + k as String, + _$JsonConverterFromJson( + e, + const BigIntStringConverter().fromJson, + ), + ), + ), + ), + $checkedConvert( + 'numberSilly', + (v) => TrivialNumberConverter.instance.fromJson((v as num?)?.toInt()), + ), + $checkedConvert( + 'numberSillySet', + (v) => (v as List) + .map( + (e) => + TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + ), + $checkedConvert( + 'dateTime', + (v) => const EpochDateTimeConverter().fromJson((v as num?)?.toInt()), + ), + $checkedConvert( + 'trivialString', + (v) => trivialStringConverter.fromJson(v as String?), + ), + $checkedConvert( + 'nullableNumberSilly', + (v) => TrivialNumberConverter.instance.fromJson((v as num?)?.toInt()), + ), + $checkedConvert( + 'nullableNumberSillySet', + (v) => (v as List) + .map( + (e) => + TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + ), + ); + return val; +}); Map _$JsonConverterTestClassToJson( - JsonConverterTestClass instance) => - { - 'duration': - const DurationMillisecondConverter().toJson(instance.duration), - 'durationList': instance.durationList - .map(const DurationMillisecondConverter().toJson) - .toList(), - 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), - 'bigIntMap': instance.bigIntMap - .map((k, e) => MapEntry(k, const BigIntStringConverter().toJson(e))), - 'nullableBigInt': _$JsonConverterToJson( - instance.nullableBigInt, const BigIntStringConverter().toJson), - 'nullableBigIntMap': instance.nullableBigIntMap.map((k, e) => MapEntry( - k, - _$JsonConverterToJson( - e, const BigIntStringConverter().toJson))), - 'numberSilly': - TrivialNumberConverter.instance.toJson(instance.numberSilly), - 'numberSillySet': instance.numberSillySet - .map(TrivialNumberConverter.instance.toJson) - .toList(), - 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), - 'trivialString': trivialStringConverter.toJson(instance.trivialString), - 'nullableNumberSilly': _$JsonConverterToJson( - instance.nullableNumberSilly, TrivialNumberConverter.instance.toJson), - 'nullableNumberSillySet': instance.nullableNumberSillySet - .map((e) => _$JsonConverterToJson( - e, TrivialNumberConverter.instance.toJson)) - .toList(), - }; + JsonConverterTestClass instance, +) => { + 'duration': const DurationMillisecondConverter().toJson(instance.duration), + 'durationList': instance.durationList + .map(const DurationMillisecondConverter().toJson) + .toList(), + 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), + 'bigIntMap': instance.bigIntMap.map( + (k, e) => MapEntry(k, const BigIntStringConverter().toJson(e)), + ), + 'nullableBigInt': _$JsonConverterToJson( + instance.nullableBigInt, + const BigIntStringConverter().toJson, + ), + 'nullableBigIntMap': instance.nullableBigIntMap.map( + (k, e) => MapEntry( + k, + _$JsonConverterToJson( + e, + const BigIntStringConverter().toJson, + ), + ), + ), + 'numberSilly': TrivialNumberConverter.instance.toJson(instance.numberSilly), + 'numberSillySet': instance.numberSillySet + .map(TrivialNumberConverter.instance.toJson) + .toList(), + 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), + 'trivialString': trivialStringConverter.toJson(instance.trivialString), + 'nullableNumberSilly': _$JsonConverterToJson( + instance.nullableNumberSilly, + TrivialNumberConverter.instance.toJson, + ), + 'nullableNumberSillySet': instance.nullableNumberSillySet + .map( + (e) => _$JsonConverterToJson( + e, + TrivialNumberConverter.instance.toJson, + ), + ) + .toList(), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); JsonConverterGeneric _$JsonConverterGenericFromJson( - Map json) => - $checkedCreate( - 'JsonConverterGeneric', - json, - ($checkedConvert) { - final val = JsonConverterGeneric( - $checkedConvert('item', - (v) => GenericConverter().fromJson(v as Map)), - $checkedConvert( - 'itemList', - (v) => (v as List) - .map((e) => - GenericConverter().fromJson(e as Map)) - .toList()), - $checkedConvert( - 'itemMap', - (v) => (v as Map).map( - (k, e) => MapEntry( - k as String, - GenericConverter() - .fromJson(e as Map)), - )), - ); - return val; - }, - ); + Map json, +) => $checkedCreate('JsonConverterGeneric', json, ($checkedConvert) { + final val = JsonConverterGeneric( + $checkedConvert( + 'item', + (v) => GenericConverter().fromJson(v as Map), + ), + $checkedConvert( + 'itemList', + (v) => (v as List) + .map((e) => GenericConverter().fromJson(e as Map)) + .toList(), + ), + $checkedConvert( + 'itemMap', + (v) => (v as Map).map( + (k, e) => MapEntry( + k as String, + GenericConverter().fromJson(e as Map), + ), + ), + ), + ); + return val; +}); Map _$JsonConverterGenericToJson( - JsonConverterGeneric instance) => - { - 'item': GenericConverter().toJson(instance.item), - 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), - 'itemMap': instance.itemMap - .map((k, e) => MapEntry(k, GenericConverter().toJson(e))), - }; + JsonConverterGeneric instance, +) => { + 'item': GenericConverter().toJson(instance.item), + 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), + 'itemMap': instance.itemMap.map( + (k, e) => MapEntry(k, GenericConverter().toJson(e)), + ), +}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.dart index 5dda14726..a5b701cd7 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.dart @@ -48,33 +48,32 @@ class _Factory implements k.KitchenSinkFactory { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) => - KitchenSink( - ctorValidatedNo42: ctorValidatedNo42, - iterable: iterable, - dynamicIterable: dynamicIterable, - objectIterable: objectIterable, - intIterable: intIterable, - dateTimeIterable: dateTimeIterable, - ); + }) => KitchenSink( + ctorValidatedNo42: ctorValidatedNo42, + iterable: iterable, + dynamicIterable: dynamicIterable, + objectIterable: objectIterable, + intIterable: intIterable, + dateTimeIterable: dateTimeIterable, + ); k.KitchenSink fromJson(Map json) => KitchenSink.fromJson(json); k.JsonConverterTestClass jsonConverterCtor() => JsonConverterTestClass( - const Duration(), - [], - BigInt.zero, - {}, - BigInt.zero, - {}, - TrivialNumber(0), - {}, - DateTime.fromMillisecondsSinceEpoch(0), - TrivialString(''), - TrivialNumber(0), - {}, - ); + const Duration(), + [], + BigInt.zero, + {}, + BigInt.zero, + {}, + TrivialNumber(0), + {}, + DateTime.fromMillisecondsSinceEpoch(0), + TrivialString(''), + TrivialNumber(0), + {}, + ); k.JsonConverterTestClass jsonConverterFromJson(Map json) => JsonConverterTestClass.fromJson(json); @@ -88,9 +87,7 @@ Object? _valueAccessor(Map json, String key) { return json[key]; } -@JsonSerializable( - includeIfNull: false, -) +@JsonSerializable(includeIfNull: false) class KitchenSink implements k.KitchenSink { // NOTE: exposing these as Iterable, but storing the values as List // to make the equality test work trivially. @@ -110,14 +107,17 @@ class KitchenSink implements k.KitchenSink { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) : _iterable = iterable?.toList(), - _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), - _objectIterable = objectIterable?.toList() ?? _defaultList(), - _intIterable = intIterable?.toList() ?? _defaultList(), - _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { + }) : _iterable = iterable?.toList(), + _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), + _objectIterable = objectIterable?.toList() ?? _defaultList(), + _intIterable = intIterable?.toList() ?? _defaultList(), + _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { if (ctorValidatedNo42 == 42) { throw ArgumentError.value( - 42, 'ctorValidatedNo42', 'The value `42` is not allowed.'); + 42, + 'ctorValidatedNo42', + 'The value `42` is not allowed.', + ); } } @@ -199,12 +199,15 @@ class KitchenSink implements k.KitchenSink { } } -@JsonSerializable(includeIfNull: false, converters: [ - // referencing a top-level field should work - durationConverter, - // referencing via a const constructor should work - BigIntStringConverter(), -]) +@JsonSerializable( + includeIfNull: false, + converters: [ + // referencing a top-level field should work + durationConverter, + // referencing via a const constructor should work + BigIntStringConverter(), + ], +) // referencing a top-level field should work @trivialStringConverter @TrivialNumberConverter.instance @@ -250,9 +253,7 @@ class JsonConverterTestClass implements k.JsonConverterTestClass { Set nullableNumberSillySet; } -@JsonSerializable( - includeIfNull: false, -) +@JsonSerializable(includeIfNull: false) // ignore: inference_failure_on_instance_creation @GenericConverter() class JsonConverterGeneric { @@ -260,11 +261,7 @@ class JsonConverterGeneric { List itemList; Map itemMap; - JsonConverterGeneric( - this.item, - this.itemList, - this.itemMap, - ); + JsonConverterGeneric(this.item, this.itemList, this.itemMap); factory JsonConverterGeneric.fromJson(Map json) => _$JsonConverterGenericFromJson(json); diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.g.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.g.dart index 39b0eb184..3ea352ae7 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.g.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_exclude_null.g.dart @@ -8,26 +8,32 @@ part of 'kitchen_sink.g_exclude_null.dart'; // JsonSerializableGenerator // ************************************************************************** -KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( - ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), - iterable: _valueAccessor(json, 'iterable') as List?, - dynamicIterable: json['dynamicIterable'] as List?, - objectIterable: - (json['objectIterable'] as List?)?.map((e) => e as Object), - intIterable: (json['intIterable'] as List?) - ?.map((e) => (e as num).toInt()), - dateTimeIterable: (json['datetime-iterable'] as List?) - ?.map((e) => DateTime.parse(e as String)), - ) +KitchenSink _$KitchenSinkFromJson(Map json) => + KitchenSink( + ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), + iterable: _valueAccessor(json, 'iterable') as List?, + dynamicIterable: json['dynamicIterable'] as List?, + objectIterable: (json['objectIterable'] as List?)?.map( + (e) => e as Object, + ), + intIterable: (json['intIterable'] as List?)?.map( + (e) => (e as num).toInt(), + ), + dateTimeIterable: (json['datetime-iterable'] as List?)?.map( + (e) => DateTime.parse(e as String), + ), + ) ..dateTime = json['dateTime'] == null ? null : DateTime.parse(json['dateTime'] as String) - ..bigInt = - json['bigInt'] == null ? null : BigInt.parse(json['bigInt'] as String) + ..bigInt = json['bigInt'] == null + ? null + : BigInt.parse(json['bigInt'] as String) ..set = (json['set'] as List).toSet() ..dynamicSet = (json['dynamicSet'] as List).toSet() - ..objectSet = - (json['objectSet'] as List).map((e) => e as Object).toSet() + ..objectSet = (json['objectSet'] as List) + .map((e) => e as Object) + .toSet() ..intSet = (json['intSet'] as List) .map((e) => (e as num).toInt()) .toSet() @@ -36,8 +42,9 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toSet() ..list = json['list'] as List ..dynamicList = json['dynamicList'] as List - ..objectList = - (json['objectList'] as List).map((e) => e as Object).toList() + ..objectList = (json['objectList'] as List) + .map((e) => e as Object) + .toList() ..intList = (json['intList'] as List) .map((e) => (e as num).toInt()) .toList() @@ -46,48 +53,58 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toList() ..nullableSimpleObjectList = (json['nullableSimpleObjectList'] as List) - .map((e) => e == null - ? null - : SimpleObject.fromJson(e as Map)) + .map( + (e) => e == null + ? null + : SimpleObject.fromJson(e as Map), + ) .toList() ..map = json['map'] as Map - ..stringStringMap = - Map.from(json['stringStringMap'] as Map) - ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) - ..objectDateTimeMap = - (json['objectDateTimeMap'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), + ..stringStringMap = Map.from( + json['stringStringMap'] as Map, ) + ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) + ..objectDateTimeMap = (json['objectDateTimeMap'] as Map) + .map((k, e) => MapEntry(k, DateTime.parse(e as String))) ..nullableSimpleObjectMap = (json['nullableSimpleObjectMap'] as Map).map( - (k, e) => MapEntry( - k, - e == null - ? null - : SimpleObject.fromJson(e as Map)), - ) + (k, e) => MapEntry( + k, + e == null + ? null + : SimpleObject.fromJson(e as Map), + ), + ) ..crazyComplex = (json['crazyComplex'] as List) - .map((e) => (e as Map?)?.map( - (k, e) => MapEntry( + .map( + (e) => (e as Map?)?.map( + (k, e) => MapEntry( + k, + (e as Map?)?.map( + (k, e) => MapEntry( k, - (e as Map?)?.map( - (k, e) => MapEntry( - k, - (e as List?) - ?.map((e) => (e as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList()) - .toList()), - )), - )) + (e as List?) + ?.map( + (e) => (e as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), + ) + .toList(), + ), + ), + ), + ), + ) .toList() ..val = Map.from(json['val'] as Map) ..writeNotNull = json['writeNotNull'] as bool? ..string = KitchenSink._trickyValueAccessor(json, r'$string') as String? - ..simpleObject = - SimpleObject.fromJson(json['simpleObject'] as Map) + ..simpleObject = SimpleObject.fromJson( + json['simpleObject'] as Map, + ) ..strictKeysObject = StrictKeysObject.fromJson( - json['strictKeysObject'] as Map) + json['strictKeysObject'] as Map, + ) ..validatedPropertyNo42 = (json['validatedPropertyNo42'] as num?)?.toInt() ..recordField = _$recordConvertNullable( json['recordField'], @@ -98,182 +115,212 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( ), ); -Map _$KitchenSinkToJson(KitchenSink instance) => - { - if (instance.ctorValidatedNo42 case final value?) 'no-42': value, - if (instance.dateTime?.toIso8601String() case final value?) - 'dateTime': value, - if (instance.bigInt?.toString() case final value?) 'bigInt': value, - if (instance.iterable?.toList() case final value?) 'iterable': value, - 'dynamicIterable': instance.dynamicIterable.toList(), - 'objectIterable': instance.objectIterable.toList(), - 'intIterable': instance.intIterable.toList(), - 'set': instance.set.toList(), - 'dynamicSet': instance.dynamicSet.toList(), - 'objectSet': instance.objectSet.toList(), - 'intSet': instance.intSet.toList(), - 'dateTimeSet': - instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), - 'datetime-iterable': - instance.dateTimeIterable.map((e) => e.toIso8601String()).toList(), - 'list': instance.list, - 'dynamicList': instance.dynamicList, - 'objectList': instance.objectList, - 'intList': instance.intList, - 'dateTimeList': - instance.dateTimeList.map((e) => e.toIso8601String()).toList(), - 'nullableSimpleObjectList': instance.nullableSimpleObjectList, - 'map': instance.map, - 'stringStringMap': instance.stringStringMap, - 'dynamicIntMap': instance.dynamicIntMap, - 'objectDateTimeMap': instance.objectDateTimeMap - .map((k, e) => MapEntry(k, e.toIso8601String())), - 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, - 'crazyComplex': instance.crazyComplex - .map((e) => e?.map((k, e) => MapEntry( - k, - e?.map((k, e) => MapEntry( - k, - e - ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) - .toList()))))) - .toList(), - 'val': instance.val, - if (instance.writeNotNull case final value?) 'writeNotNull': value, - if (instance.string case final value?) r'$string': value, - 'simpleObject': instance.simpleObject, - 'strictKeysObject': instance.strictKeysObject, - if (instance.validatedPropertyNo42 case final value?) - 'validatedPropertyNo42': value, - if (instance.recordField == null - ? null - : { - r'$1': instance.recordField!.$1, - r'$2': instance.recordField!.$2, - 'truth': instance.recordField!.truth, - } - case final value?) - 'recordField': value, - }; +Map _$KitchenSinkToJson( + KitchenSink instance, +) => { + if (instance.ctorValidatedNo42 case final value?) 'no-42': value, + if (instance.dateTime?.toIso8601String() case final value?) 'dateTime': value, + if (instance.bigInt?.toString() case final value?) 'bigInt': value, + if (instance.iterable?.toList() case final value?) 'iterable': value, + 'dynamicIterable': instance.dynamicIterable.toList(), + 'objectIterable': instance.objectIterable.toList(), + 'intIterable': instance.intIterable.toList(), + 'set': instance.set.toList(), + 'dynamicSet': instance.dynamicSet.toList(), + 'objectSet': instance.objectSet.toList(), + 'intSet': instance.intSet.toList(), + 'dateTimeSet': instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), + 'datetime-iterable': instance.dateTimeIterable + .map((e) => e.toIso8601String()) + .toList(), + 'list': instance.list, + 'dynamicList': instance.dynamicList, + 'objectList': instance.objectList, + 'intList': instance.intList, + 'dateTimeList': instance.dateTimeList + .map((e) => e.toIso8601String()) + .toList(), + 'nullableSimpleObjectList': instance.nullableSimpleObjectList, + 'map': instance.map, + 'stringStringMap': instance.stringStringMap, + 'dynamicIntMap': instance.dynamicIntMap, + 'objectDateTimeMap': instance.objectDateTimeMap.map( + (k, e) => MapEntry(k, e.toIso8601String()), + ), + 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap, + 'crazyComplex': instance.crazyComplex + .map( + (e) => e?.map( + (k, e) => MapEntry( + k, + e?.map( + (k, e) => MapEntry( + k, + e + ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) + .toList(), + ), + ), + ), + ), + ) + .toList(), + 'val': instance.val, + if (instance.writeNotNull case final value?) 'writeNotNull': value, + if (instance.string case final value?) r'$string': value, + 'simpleObject': instance.simpleObject, + 'strictKeysObject': instance.strictKeysObject, + if (instance.validatedPropertyNo42 case final value?) + 'validatedPropertyNo42': value, + if (instance.recordField == null + ? null + : { + r'$1': instance.recordField!.$1, + r'$2': instance.recordField!.$2, + 'truth': instance.recordField!.truth, + } + case final value?) + 'recordField': value, +}; $Rec? _$recordConvertNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); JsonConverterTestClass _$JsonConverterTestClassFromJson( - Map json) => - JsonConverterTestClass( - const DurationMillisecondConverter() - .fromJson((json['duration'] as num?)?.toInt()), - (json['durationList'] as List) - .map((e) => const DurationMillisecondConverter() - .fromJson((e as num?)?.toInt())) - .toList(), - const BigIntStringConverter().fromJson(json['bigInt'] as String), - (json['bigIntMap'] as Map).map( - (k, e) => - MapEntry(k, const BigIntStringConverter().fromJson(e as String)), - ), + Map json, +) => JsonConverterTestClass( + const DurationMillisecondConverter().fromJson( + (json['duration'] as num?)?.toInt(), + ), + (json['durationList'] as List) + .map( + (e) => + const DurationMillisecondConverter().fromJson((e as num?)?.toInt()), + ) + .toList(), + const BigIntStringConverter().fromJson(json['bigInt'] as String), + (json['bigIntMap'] as Map).map( + (k, e) => MapEntry(k, const BigIntStringConverter().fromJson(e as String)), + ), + _$JsonConverterFromJson( + json['nullableBigInt'], + const BigIntStringConverter().fromJson, + ), + (json['nullableBigIntMap'] as Map).map( + (k, e) => MapEntry( + k, _$JsonConverterFromJson( - json['nullableBigInt'], const BigIntStringConverter().fromJson), - (json['nullableBigIntMap'] as Map).map( - (k, e) => MapEntry( - k, - _$JsonConverterFromJson( - e, const BigIntStringConverter().fromJson)), + e, + const BigIntStringConverter().fromJson, ), - TrivialNumberConverter.instance - .fromJson((json['numberSilly'] as num?)?.toInt()), - (json['numberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - const EpochDateTimeConverter() - .fromJson((json['dateTime'] as num?)?.toInt()), - trivialStringConverter.fromJson(json['trivialString'] as String?), - TrivialNumberConverter.instance - .fromJson((json['nullableNumberSilly'] as num?)?.toInt()), - (json['nullableNumberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - ); + ), + ), + TrivialNumberConverter.instance.fromJson( + (json['numberSilly'] as num?)?.toInt(), + ), + (json['numberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + const EpochDateTimeConverter().fromJson((json['dateTime'] as num?)?.toInt()), + trivialStringConverter.fromJson(json['trivialString'] as String?), + TrivialNumberConverter.instance.fromJson( + (json['nullableNumberSilly'] as num?)?.toInt(), + ), + (json['nullableNumberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), +); Map _$JsonConverterTestClassToJson( - JsonConverterTestClass instance) => - { - if (const DurationMillisecondConverter().toJson(instance.duration) - case final value?) - 'duration': value, - 'durationList': instance.durationList - .map(const DurationMillisecondConverter().toJson) - .toList(), - 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), - 'bigIntMap': instance.bigIntMap - .map((k, e) => MapEntry(k, const BigIntStringConverter().toJson(e))), - if (_$JsonConverterToJson( - instance.nullableBigInt, const BigIntStringConverter().toJson) - case final value?) - 'nullableBigInt': value, - 'nullableBigIntMap': instance.nullableBigIntMap.map((k, e) => MapEntry( - k, - _$JsonConverterToJson( - e, const BigIntStringConverter().toJson))), - if (TrivialNumberConverter.instance.toJson(instance.numberSilly) - case final value?) - 'numberSilly': value, - 'numberSillySet': instance.numberSillySet - .map(TrivialNumberConverter.instance.toJson) - .toList(), - if (const EpochDateTimeConverter().toJson(instance.dateTime) - case final value?) - 'dateTime': value, - if (trivialStringConverter.toJson(instance.trivialString) - case final value?) - 'trivialString': value, - if (_$JsonConverterToJson( - instance.nullableNumberSilly, - TrivialNumberConverter.instance.toJson) - case final value?) - 'nullableNumberSilly': value, - 'nullableNumberSillySet': instance.nullableNumberSillySet - .map((e) => _$JsonConverterToJson( - e, TrivialNumberConverter.instance.toJson)) - .toList(), - }; + JsonConverterTestClass instance, +) => { + if (const DurationMillisecondConverter().toJson(instance.duration) + case final value?) + 'duration': value, + 'durationList': instance.durationList + .map(const DurationMillisecondConverter().toJson) + .toList(), + 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), + 'bigIntMap': instance.bigIntMap.map( + (k, e) => MapEntry(k, const BigIntStringConverter().toJson(e)), + ), + if (_$JsonConverterToJson( + instance.nullableBigInt, + const BigIntStringConverter().toJson, + ) + case final value?) + 'nullableBigInt': value, + 'nullableBigIntMap': instance.nullableBigIntMap.map( + (k, e) => MapEntry( + k, + _$JsonConverterToJson( + e, + const BigIntStringConverter().toJson, + ), + ), + ), + if (TrivialNumberConverter.instance.toJson(instance.numberSilly) + case final value?) + 'numberSilly': value, + 'numberSillySet': instance.numberSillySet + .map(TrivialNumberConverter.instance.toJson) + .toList(), + if (const EpochDateTimeConverter().toJson(instance.dateTime) + case final value?) + 'dateTime': value, + if (trivialStringConverter.toJson(instance.trivialString) case final value?) + 'trivialString': value, + if (_$JsonConverterToJson( + instance.nullableNumberSilly, + TrivialNumberConverter.instance.toJson, + ) + case final value?) + 'nullableNumberSilly': value, + 'nullableNumberSillySet': instance.nullableNumberSillySet + .map( + (e) => _$JsonConverterToJson( + e, + TrivialNumberConverter.instance.toJson, + ), + ) + .toList(), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); JsonConverterGeneric _$JsonConverterGenericFromJson( - Map json) => - JsonConverterGeneric( - GenericConverter().fromJson(json['item'] as Map), - (json['itemList'] as List) - .map((e) => GenericConverter().fromJson(e as Map)) - .toList(), - (json['itemMap'] as Map).map( - (k, e) => MapEntry( - k, GenericConverter().fromJson(e as Map)), - ), - ); + Map json, +) => JsonConverterGeneric( + GenericConverter().fromJson(json['item'] as Map), + (json['itemList'] as List) + .map((e) => GenericConverter().fromJson(e as Map)) + .toList(), + (json['itemMap'] as Map).map( + (k, e) => + MapEntry(k, GenericConverter().fromJson(e as Map)), + ), +); Map _$JsonConverterGenericToJson( - JsonConverterGeneric instance) => - { - 'item': GenericConverter().toJson(instance.item), - 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), - 'itemMap': instance.itemMap - .map((k, e) => MapEntry(k, GenericConverter().toJson(e))), - }; + JsonConverterGeneric instance, +) => { + 'item': GenericConverter().toJson(instance.item), + 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), + 'itemMap': instance.itemMap.map( + (k, e) => MapEntry(k, GenericConverter().toJson(e)), + ), +}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.dart index efccc8f08..bebc9da38 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.dart @@ -48,33 +48,32 @@ class _Factory implements k.KitchenSinkFactory { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) => - KitchenSink( - ctorValidatedNo42: ctorValidatedNo42, - iterable: iterable, - dynamicIterable: dynamicIterable, - objectIterable: objectIterable, - intIterable: intIterable, - dateTimeIterable: dateTimeIterable, - ); + }) => KitchenSink( + ctorValidatedNo42: ctorValidatedNo42, + iterable: iterable, + dynamicIterable: dynamicIterable, + objectIterable: objectIterable, + intIterable: intIterable, + dateTimeIterable: dateTimeIterable, + ); k.KitchenSink fromJson(Map json) => KitchenSink.fromJson(json); k.JsonConverterTestClass jsonConverterCtor() => JsonConverterTestClass( - const Duration(), - [], - BigInt.zero, - {}, - BigInt.zero, - {}, - TrivialNumber(0), - {}, - DateTime.fromMillisecondsSinceEpoch(0), - TrivialString(''), - TrivialNumber(0), - {}, - ); + const Duration(), + [], + BigInt.zero, + {}, + BigInt.zero, + {}, + TrivialNumber(0), + {}, + DateTime.fromMillisecondsSinceEpoch(0), + TrivialString(''), + TrivialNumber(0), + {}, + ); k.JsonConverterTestClass jsonConverterFromJson(Map json) => JsonConverterTestClass.fromJson(json); @@ -88,9 +87,7 @@ Object? _valueAccessor(Map json, String key) { return json[key]; } -@JsonSerializable( - explicitToJson: true, -) +@JsonSerializable(explicitToJson: true) class KitchenSink implements k.KitchenSink { // NOTE: exposing these as Iterable, but storing the values as List // to make the equality test work trivially. @@ -110,14 +107,17 @@ class KitchenSink implements k.KitchenSink { Iterable? objectIterable, Iterable? intIterable, Iterable? dateTimeIterable, - }) : _iterable = iterable?.toList(), - _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), - _objectIterable = objectIterable?.toList() ?? _defaultList(), - _intIterable = intIterable?.toList() ?? _defaultList(), - _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { + }) : _iterable = iterable?.toList(), + _dynamicIterable = dynamicIterable?.toList() ?? _defaultList(), + _objectIterable = objectIterable?.toList() ?? _defaultList(), + _intIterable = intIterable?.toList() ?? _defaultList(), + _dateTimeIterable = dateTimeIterable?.toList() ?? _defaultList() { if (ctorValidatedNo42 == 42) { throw ArgumentError.value( - 42, 'ctorValidatedNo42', 'The value `42` is not allowed.'); + 42, + 'ctorValidatedNo42', + 'The value `42` is not allowed.', + ); } } @@ -199,12 +199,15 @@ class KitchenSink implements k.KitchenSink { } } -@JsonSerializable(explicitToJson: true, converters: [ - // referencing a top-level field should work - durationConverter, - // referencing via a const constructor should work - BigIntStringConverter(), -]) +@JsonSerializable( + explicitToJson: true, + converters: [ + // referencing a top-level field should work + durationConverter, + // referencing via a const constructor should work + BigIntStringConverter(), + ], +) // referencing a top-level field should work @trivialStringConverter @TrivialNumberConverter.instance @@ -250,9 +253,7 @@ class JsonConverterTestClass implements k.JsonConverterTestClass { Set nullableNumberSillySet; } -@JsonSerializable( - explicitToJson: true, -) +@JsonSerializable(explicitToJson: true) // ignore: inference_failure_on_instance_creation @GenericConverter() class JsonConverterGeneric { @@ -260,11 +261,7 @@ class JsonConverterGeneric { List itemList; Map itemMap; - JsonConverterGeneric( - this.item, - this.itemList, - this.itemMap, - ); + JsonConverterGeneric(this.item, this.itemList, this.itemMap); factory JsonConverterGeneric.fromJson(Map json) => _$JsonConverterGenericFromJson(json); diff --git a/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.g.dart b/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.g.dart index 0115b3fff..366035c7c 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.g.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink.g_explicit_to_json.g.dart @@ -8,26 +8,32 @@ part of 'kitchen_sink.g_explicit_to_json.dart'; // JsonSerializableGenerator // ************************************************************************** -KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( - ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), - iterable: _valueAccessor(json, 'iterable') as List?, - dynamicIterable: json['dynamicIterable'] as List?, - objectIterable: - (json['objectIterable'] as List?)?.map((e) => e as Object), - intIterable: (json['intIterable'] as List?) - ?.map((e) => (e as num).toInt()), - dateTimeIterable: (json['datetime-iterable'] as List?) - ?.map((e) => DateTime.parse(e as String)), - ) +KitchenSink _$KitchenSinkFromJson(Map json) => + KitchenSink( + ctorValidatedNo42: (json['no-42'] as num?)?.toInt(), + iterable: _valueAccessor(json, 'iterable') as List?, + dynamicIterable: json['dynamicIterable'] as List?, + objectIterable: (json['objectIterable'] as List?)?.map( + (e) => e as Object, + ), + intIterable: (json['intIterable'] as List?)?.map( + (e) => (e as num).toInt(), + ), + dateTimeIterable: (json['datetime-iterable'] as List?)?.map( + (e) => DateTime.parse(e as String), + ), + ) ..dateTime = json['dateTime'] == null ? null : DateTime.parse(json['dateTime'] as String) - ..bigInt = - json['bigInt'] == null ? null : BigInt.parse(json['bigInt'] as String) + ..bigInt = json['bigInt'] == null + ? null + : BigInt.parse(json['bigInt'] as String) ..set = (json['set'] as List).toSet() ..dynamicSet = (json['dynamicSet'] as List).toSet() - ..objectSet = - (json['objectSet'] as List).map((e) => e as Object).toSet() + ..objectSet = (json['objectSet'] as List) + .map((e) => e as Object) + .toSet() ..intSet = (json['intSet'] as List) .map((e) => (e as num).toInt()) .toSet() @@ -36,8 +42,9 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toSet() ..list = json['list'] as List ..dynamicList = json['dynamicList'] as List - ..objectList = - (json['objectList'] as List).map((e) => e as Object).toList() + ..objectList = (json['objectList'] as List) + .map((e) => e as Object) + .toList() ..intList = (json['intList'] as List) .map((e) => (e as num).toInt()) .toList() @@ -46,48 +53,58 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( .toList() ..nullableSimpleObjectList = (json['nullableSimpleObjectList'] as List) - .map((e) => e == null - ? null - : SimpleObject.fromJson(e as Map)) + .map( + (e) => e == null + ? null + : SimpleObject.fromJson(e as Map), + ) .toList() ..map = json['map'] as Map - ..stringStringMap = - Map.from(json['stringStringMap'] as Map) - ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) - ..objectDateTimeMap = - (json['objectDateTimeMap'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), + ..stringStringMap = Map.from( + json['stringStringMap'] as Map, ) + ..dynamicIntMap = Map.from(json['dynamicIntMap'] as Map) + ..objectDateTimeMap = (json['objectDateTimeMap'] as Map) + .map((k, e) => MapEntry(k, DateTime.parse(e as String))) ..nullableSimpleObjectMap = (json['nullableSimpleObjectMap'] as Map).map( - (k, e) => MapEntry( - k, - e == null - ? null - : SimpleObject.fromJson(e as Map)), - ) + (k, e) => MapEntry( + k, + e == null + ? null + : SimpleObject.fromJson(e as Map), + ), + ) ..crazyComplex = (json['crazyComplex'] as List) - .map((e) => (e as Map?)?.map( - (k, e) => MapEntry( + .map( + (e) => (e as Map?)?.map( + (k, e) => MapEntry( + k, + (e as Map?)?.map( + (k, e) => MapEntry( k, - (e as Map?)?.map( - (k, e) => MapEntry( - k, - (e as List?) - ?.map((e) => (e as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList()) - .toList()), - )), - )) + (e as List?) + ?.map( + (e) => (e as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), + ) + .toList(), + ), + ), + ), + ), + ) .toList() ..val = Map.from(json['val'] as Map) ..writeNotNull = json['writeNotNull'] as bool? ..string = KitchenSink._trickyValueAccessor(json, r'$string') as String? - ..simpleObject = - SimpleObject.fromJson(json['simpleObject'] as Map) + ..simpleObject = SimpleObject.fromJson( + json['simpleObject'] as Map, + ) ..strictKeysObject = StrictKeysObject.fromJson( - json['strictKeysObject'] as Map) + json['strictKeysObject'] as Map, + ) ..validatedPropertyNo42 = (json['validatedPropertyNo42'] as num?)?.toInt() ..recordField = _$recordConvertNullable( json['recordField'], @@ -98,169 +115,202 @@ KitchenSink _$KitchenSinkFromJson(Map json) => KitchenSink( ), ); -Map _$KitchenSinkToJson(KitchenSink instance) => - { - 'no-42': instance.ctorValidatedNo42, - 'dateTime': instance.dateTime?.toIso8601String(), - 'bigInt': instance.bigInt?.toString(), - 'iterable': instance.iterable?.toList(), - 'dynamicIterable': instance.dynamicIterable.toList(), - 'objectIterable': instance.objectIterable.toList(), - 'intIterable': instance.intIterable.toList(), - 'set': instance.set.toList(), - 'dynamicSet': instance.dynamicSet.toList(), - 'objectSet': instance.objectSet.toList(), - 'intSet': instance.intSet.toList(), - 'dateTimeSet': - instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), - 'datetime-iterable': - instance.dateTimeIterable.map((e) => e.toIso8601String()).toList(), - 'list': instance.list, - 'dynamicList': instance.dynamicList, - 'objectList': instance.objectList, - 'intList': instance.intList, - 'dateTimeList': - instance.dateTimeList.map((e) => e.toIso8601String()).toList(), - 'nullableSimpleObjectList': - instance.nullableSimpleObjectList.map((e) => e?.toJson()).toList(), - 'map': instance.map, - 'stringStringMap': instance.stringStringMap, - 'dynamicIntMap': instance.dynamicIntMap, - 'objectDateTimeMap': instance.objectDateTimeMap - .map((k, e) => MapEntry(k, e.toIso8601String())), - 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap - .map((k, e) => MapEntry(k, e?.toJson())), - 'crazyComplex': instance.crazyComplex - .map((e) => e?.map((k, e) => MapEntry( - k, - e?.map((k, e) => MapEntry( - k, - e - ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) - .toList()))))) - .toList(), - 'val': instance.val, - 'writeNotNull': instance.writeNotNull, - r'$string': instance.string, - 'simpleObject': instance.simpleObject.toJson(), - 'strictKeysObject': instance.strictKeysObject.toJson(), - 'validatedPropertyNo42': instance.validatedPropertyNo42, - 'recordField': instance.recordField == null - ? null - : { - r'$1': instance.recordField!.$1, - r'$2': instance.recordField!.$2, - 'truth': instance.recordField!.truth, - }, - }; +Map _$KitchenSinkToJson( + KitchenSink instance, +) => { + 'no-42': instance.ctorValidatedNo42, + 'dateTime': instance.dateTime?.toIso8601String(), + 'bigInt': instance.bigInt?.toString(), + 'iterable': instance.iterable?.toList(), + 'dynamicIterable': instance.dynamicIterable.toList(), + 'objectIterable': instance.objectIterable.toList(), + 'intIterable': instance.intIterable.toList(), + 'set': instance.set.toList(), + 'dynamicSet': instance.dynamicSet.toList(), + 'objectSet': instance.objectSet.toList(), + 'intSet': instance.intSet.toList(), + 'dateTimeSet': instance.dateTimeSet.map((e) => e.toIso8601String()).toList(), + 'datetime-iterable': instance.dateTimeIterable + .map((e) => e.toIso8601String()) + .toList(), + 'list': instance.list, + 'dynamicList': instance.dynamicList, + 'objectList': instance.objectList, + 'intList': instance.intList, + 'dateTimeList': instance.dateTimeList + .map((e) => e.toIso8601String()) + .toList(), + 'nullableSimpleObjectList': instance.nullableSimpleObjectList + .map((e) => e?.toJson()) + .toList(), + 'map': instance.map, + 'stringStringMap': instance.stringStringMap, + 'dynamicIntMap': instance.dynamicIntMap, + 'objectDateTimeMap': instance.objectDateTimeMap.map( + (k, e) => MapEntry(k, e.toIso8601String()), + ), + 'nullableSimpleObjectMap': instance.nullableSimpleObjectMap.map( + (k, e) => MapEntry(k, e?.toJson()), + ), + 'crazyComplex': instance.crazyComplex + .map( + (e) => e?.map( + (k, e) => MapEntry( + k, + e?.map( + (k, e) => MapEntry( + k, + e + ?.map((e) => e?.map((e) => e.toIso8601String()).toList()) + .toList(), + ), + ), + ), + ), + ) + .toList(), + 'val': instance.val, + 'writeNotNull': instance.writeNotNull, + r'$string': instance.string, + 'simpleObject': instance.simpleObject.toJson(), + 'strictKeysObject': instance.strictKeysObject.toJson(), + 'validatedPropertyNo42': instance.validatedPropertyNo42, + 'recordField': instance.recordField == null + ? null + : { + r'$1': instance.recordField!.$1, + r'$2': instance.recordField!.$2, + 'truth': instance.recordField!.truth, + }, +}; $Rec? _$recordConvertNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); JsonConverterTestClass _$JsonConverterTestClassFromJson( - Map json) => - JsonConverterTestClass( - const DurationMillisecondConverter() - .fromJson((json['duration'] as num?)?.toInt()), - (json['durationList'] as List) - .map((e) => const DurationMillisecondConverter() - .fromJson((e as num?)?.toInt())) - .toList(), - const BigIntStringConverter().fromJson(json['bigInt'] as String), - (json['bigIntMap'] as Map).map( - (k, e) => - MapEntry(k, const BigIntStringConverter().fromJson(e as String)), - ), + Map json, +) => JsonConverterTestClass( + const DurationMillisecondConverter().fromJson( + (json['duration'] as num?)?.toInt(), + ), + (json['durationList'] as List) + .map( + (e) => + const DurationMillisecondConverter().fromJson((e as num?)?.toInt()), + ) + .toList(), + const BigIntStringConverter().fromJson(json['bigInt'] as String), + (json['bigIntMap'] as Map).map( + (k, e) => MapEntry(k, const BigIntStringConverter().fromJson(e as String)), + ), + _$JsonConverterFromJson( + json['nullableBigInt'], + const BigIntStringConverter().fromJson, + ), + (json['nullableBigIntMap'] as Map).map( + (k, e) => MapEntry( + k, _$JsonConverterFromJson( - json['nullableBigInt'], const BigIntStringConverter().fromJson), - (json['nullableBigIntMap'] as Map).map( - (k, e) => MapEntry( - k, - _$JsonConverterFromJson( - e, const BigIntStringConverter().fromJson)), + e, + const BigIntStringConverter().fromJson, ), - TrivialNumberConverter.instance - .fromJson((json['numberSilly'] as num?)?.toInt()), - (json['numberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - const EpochDateTimeConverter() - .fromJson((json['dateTime'] as num?)?.toInt()), - trivialStringConverter.fromJson(json['trivialString'] as String?), - TrivialNumberConverter.instance - .fromJson((json['nullableNumberSilly'] as num?)?.toInt()), - (json['nullableNumberSillySet'] as List) - .map((e) => - TrivialNumberConverter.instance.fromJson((e as num?)?.toInt())) - .toSet(), - ); + ), + ), + TrivialNumberConverter.instance.fromJson( + (json['numberSilly'] as num?)?.toInt(), + ), + (json['numberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), + const EpochDateTimeConverter().fromJson((json['dateTime'] as num?)?.toInt()), + trivialStringConverter.fromJson(json['trivialString'] as String?), + TrivialNumberConverter.instance.fromJson( + (json['nullableNumberSilly'] as num?)?.toInt(), + ), + (json['nullableNumberSillySet'] as List) + .map( + (e) => TrivialNumberConverter.instance.fromJson((e as num?)?.toInt()), + ) + .toSet(), +); Map _$JsonConverterTestClassToJson( - JsonConverterTestClass instance) => - { - 'duration': - const DurationMillisecondConverter().toJson(instance.duration), - 'durationList': instance.durationList - .map(const DurationMillisecondConverter().toJson) - .toList(), - 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), - 'bigIntMap': instance.bigIntMap - .map((k, e) => MapEntry(k, const BigIntStringConverter().toJson(e))), - 'nullableBigInt': _$JsonConverterToJson( - instance.nullableBigInt, const BigIntStringConverter().toJson), - 'nullableBigIntMap': instance.nullableBigIntMap.map((k, e) => MapEntry( - k, - _$JsonConverterToJson( - e, const BigIntStringConverter().toJson))), - 'numberSilly': - TrivialNumberConverter.instance.toJson(instance.numberSilly), - 'numberSillySet': instance.numberSillySet - .map(TrivialNumberConverter.instance.toJson) - .toList(), - 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), - 'trivialString': trivialStringConverter.toJson(instance.trivialString), - 'nullableNumberSilly': _$JsonConverterToJson( - instance.nullableNumberSilly, TrivialNumberConverter.instance.toJson), - 'nullableNumberSillySet': instance.nullableNumberSillySet - .map((e) => _$JsonConverterToJson( - e, TrivialNumberConverter.instance.toJson)) - .toList(), - }; + JsonConverterTestClass instance, +) => { + 'duration': const DurationMillisecondConverter().toJson(instance.duration), + 'durationList': instance.durationList + .map(const DurationMillisecondConverter().toJson) + .toList(), + 'bigInt': const BigIntStringConverter().toJson(instance.bigInt), + 'bigIntMap': instance.bigIntMap.map( + (k, e) => MapEntry(k, const BigIntStringConverter().toJson(e)), + ), + 'nullableBigInt': _$JsonConverterToJson( + instance.nullableBigInt, + const BigIntStringConverter().toJson, + ), + 'nullableBigIntMap': instance.nullableBigIntMap.map( + (k, e) => MapEntry( + k, + _$JsonConverterToJson( + e, + const BigIntStringConverter().toJson, + ), + ), + ), + 'numberSilly': TrivialNumberConverter.instance.toJson(instance.numberSilly), + 'numberSillySet': instance.numberSillySet + .map(TrivialNumberConverter.instance.toJson) + .toList(), + 'dateTime': const EpochDateTimeConverter().toJson(instance.dateTime), + 'trivialString': trivialStringConverter.toJson(instance.trivialString), + 'nullableNumberSilly': _$JsonConverterToJson( + instance.nullableNumberSilly, + TrivialNumberConverter.instance.toJson, + ), + 'nullableNumberSillySet': instance.nullableNumberSillySet + .map( + (e) => _$JsonConverterToJson( + e, + TrivialNumberConverter.instance.toJson, + ), + ) + .toList(), +}; Value? _$JsonConverterFromJson( Object? json, Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +) => json == null ? null : fromJson(json as Json); Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +) => value == null ? null : toJson(value); JsonConverterGeneric _$JsonConverterGenericFromJson( - Map json) => - JsonConverterGeneric( - GenericConverter().fromJson(json['item'] as Map), - (json['itemList'] as List) - .map((e) => GenericConverter().fromJson(e as Map)) - .toList(), - (json['itemMap'] as Map).map( - (k, e) => MapEntry( - k, GenericConverter().fromJson(e as Map)), - ), - ); + Map json, +) => JsonConverterGeneric( + GenericConverter().fromJson(json['item'] as Map), + (json['itemList'] as List) + .map((e) => GenericConverter().fromJson(e as Map)) + .toList(), + (json['itemMap'] as Map).map( + (k, e) => + MapEntry(k, GenericConverter().fromJson(e as Map)), + ), +); Map _$JsonConverterGenericToJson( - JsonConverterGeneric instance) => - { - 'item': GenericConverter().toJson(instance.item), - 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), - 'itemMap': instance.itemMap - .map((k, e) => MapEntry(k, GenericConverter().toJson(e))), - }; + JsonConverterGeneric instance, +) => { + 'item': GenericConverter().toJson(instance.item), + 'itemList': instance.itemList.map(GenericConverter().toJson).toList(), + 'itemMap': instance.itemMap.map( + (k, e) => MapEntry(k, GenericConverter().toJson(e)), + ), +}; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink_interface.dart b/json_serializable/test/kitchen_sink/kitchen_sink_interface.dart index 57673b70f..e862c9708 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink_interface.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink_interface.dart @@ -125,11 +125,7 @@ abstract class KitchenSink { Map toJson(); } -typedef RecordSample = ( - int, - String, { - bool truth, -}); +typedef RecordSample = (int, String, {bool truth}); // TODO: finish this... bool sinkEquals(KitchenSink a, Object other) => diff --git a/json_serializable/test/kitchen_sink/kitchen_sink_test.dart b/json_serializable/test/kitchen_sink/kitchen_sink_test.dart index 3cd0c399f..e3c43efdd 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink_test.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink_test.dart @@ -13,8 +13,11 @@ import 'kitchen_sink_test_shared.dart'; import 'strict_keys_object.dart'; Matcher _isMissingKeyException(String expectedMessage) => - isA() - .having((e) => e.message, 'message', expectedMessage); + isA().having( + (e) => e.message, + 'message', + expectedMessage, + ); void main() { test('valid values covers all keys', () { @@ -34,9 +37,13 @@ void main() { test('required keys', () { expect( - () => StrictKeysObject.fromJson({}), - throwsA(_isMissingKeyException( - 'Required keys are missing: value, custom_field.'))); + () => StrictKeysObject.fromJson({}), + throwsA( + _isMissingKeyException( + 'Required keys are missing: value, custom_field.', + ), + ), + ); }); for (var factory in factories) { @@ -163,10 +170,10 @@ void _nullableTests(KitchenSinkFactory factory) { 'items': [ null, [], - [DateTime.now()] - ] - } - } + [DateTime.now()], + ], + }, + }, ]; roundTripSink(item); }); @@ -178,10 +185,10 @@ void _sharedTests(KitchenSinkFactory factory) { final aliasName = factory.fromJson( { - ...validValues, - 'theIterable': validValues['iterable'], - 'STRING': validValues[trickyKeyName] - } + ...validValues, + 'theIterable': validValues['iterable'], + 'STRING': validValues[trickyKeyName], + } ..remove('iterable') ..remove(trickyKeyName), ); @@ -225,27 +232,29 @@ void _sharedTests(KitchenSinkFactory factory) { 'empty': [], 'items': [ [], - [DateTime.now()] - ] - } - } + [DateTime.now()], + ], + }, + }, ]; roundTripObject(item, factory.fromJson); }); test('round trip valid, empty values', () { - final values = Map.fromEntries(validValues.entries.map((e) { - var value = e.value; - if (_iterableMapKeys.contains(e.key)) { - if (value is List) { - value = []; - } else { - assert(value is Map); - value = {}; + final values = Map.fromEntries( + validValues.entries.map((e) { + var value = e.value; + if (_iterableMapKeys.contains(e.key)) { + if (value is List) { + value = []; + } else { + assert(value is Map); + value = {}; + } } - } - return MapEntry(e.key, value); - })); + return MapEntry(e.key, value); + }), + ); final validInstance = factory.fromJson(values); @@ -290,16 +299,12 @@ const _nonNullableFields = { 'nullableSimpleObjectMap', 'crazyComplex', 'val', - 'simpleObject', - 'strictKeysObject' -}; - -const _encodedAsMapKeys = { 'simpleObject', 'strictKeysObject', - 'recordField', }; +const _encodedAsMapKeys = {'simpleObject', 'strictKeysObject', 'recordField'}; + const _iterableMapKeys = { 'bigIntMap', 'crazyComplex', diff --git a/json_serializable/test/kitchen_sink/kitchen_sink_test_shared.dart b/json_serializable/test/kitchen_sink/kitchen_sink_test_shared.dart index fc235bc05..9ded8bccf 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink_test_shared.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink_test_shared.dart @@ -24,7 +24,7 @@ const validValues = { 'dateTimeList': ['2018-05-10T14:20:58.927'], 'nullableSimpleObjectList': [ {'value': 42}, - null + null, ], 'map': {'key': true}, 'stringStringMap': {'key': 'vaule'}, @@ -41,11 +41,7 @@ const validValues = { 'simpleObject': {'value': 42}, 'strictKeysObject': {'value': 10, 'custom_field': 'cool'}, 'validatedPropertyNo42': 0, - 'recordField': { - '\$1': 0, - '\$2': 'string', - 'truth': true, - }, + 'recordField': {'\$1': 0, '\$2': 'string', 'truth': true}, }; const invalidValueTypes = { @@ -78,10 +74,7 @@ const invalidValueTypes = { _toJsonMapHelperName: 42, trickyKeyName: true, 'simpleObject': 42, - 'strictKeysObject': { - 'value': 10, - 'invalid_key': true, - }, + 'strictKeysObject': {'value': 10, 'invalid_key': true}, 'validatedPropertyNo42': true, 'recordField': true, }; diff --git a/json_serializable/test/kitchen_sink/kitchen_sink_yaml_test.dart b/json_serializable/test/kitchen_sink/kitchen_sink_yaml_test.dart index 951a90df7..19c7fd3c4 100644 --- a/json_serializable/test/kitchen_sink/kitchen_sink_yaml_test.dart +++ b/json_serializable/test/kitchen_sink/kitchen_sink_yaml_test.dart @@ -35,22 +35,28 @@ void _anyMapTests(KitchenSinkFactory factory) { }); } -void _testBadValue(String key, Object? badValue, KitchenSinkFactory factory, - bool checkedAssignment) { +void _testBadValue( + String key, + Object? badValue, + KitchenSinkFactory factory, + bool checkedAssignment, +) { final matcher = _getMatcher(factory.checked, key, checkedAssignment); for (final isJson in [true, false]) { - test('`$key` fails with value `$badValue`- ${isJson ? 'json' : 'yaml'}', - () { - var copy = Map.of(validValues); - copy[key] = badValue; + test( + '`$key` fails with value `$badValue`- ${isJson ? 'json' : 'yaml'}', + () { + var copy = Map.of(validValues); + copy[key] = badValue; - if (!isJson) { - copy = loadYaml(loudEncode(copy)) as YamlMap; - } + if (!isJson) { + copy = loadYaml(loudEncode(copy)) as YamlMap; + } - expect(() => factory.fromJson(copy), matcher); - }); + expect(() => factory.fromJson(copy), matcher); + }, + ); } } @@ -80,7 +86,7 @@ Matcher _getMatcher(bool checked, String? expectedKey, bool checkedAssignment) { 'strictKeysObject' => _isAUnrecognizedKeysException('bob'), 'intIterable' => isTypeError, 'datetime-iterable' => isTypeError, - _ => throw StateError('Not expected! - $expectedKey') + _ => throw StateError('Not expected! - $expectedKey'), }; } } @@ -89,8 +95,11 @@ Matcher _getMatcher(bool checked, String? expectedKey, bool checkedAssignment) { } Matcher _isAUnrecognizedKeysException(String expectedMessage) => - isA() - .having((e) => e.message, 'message', expectedMessage); + isA().having( + (e) => e.message, + 'message', + expectedMessage, + ); /// Invalid values that are found after the property set or ctor call const _invalidCheckedValues = { diff --git a/json_serializable/test/kitchen_sink/simple_object.g.dart b/json_serializable/test/kitchen_sink/simple_object.g.dart index 53442bc1b..ebb31411a 100644 --- a/json_serializable/test/kitchen_sink/simple_object.g.dart +++ b/json_serializable/test/kitchen_sink/simple_object.g.dart @@ -8,11 +8,8 @@ part of 'simple_object.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleObject _$SimpleObjectFromJson(Map json) => SimpleObject( - (json['value'] as num).toInt(), - ); +SimpleObject _$SimpleObjectFromJson(Map json) => + SimpleObject((json['value'] as num).toInt()); Map _$SimpleObjectToJson(SimpleObject instance) => - { - 'value': instance.value, - }; + {'value': instance.value}; diff --git a/json_serializable/test/literal/json_literal.g.dart b/json_serializable/test/literal/json_literal.g.dart index 9e0993dde..8449ee4c8 100644 --- a/json_serializable/test/literal/json_literal.g.dart +++ b/json_serializable/test/literal/json_literal.g.dart @@ -16,7 +16,7 @@ final _$dataJsonLiteral = [ 'vertical tab': '\v', 'form feed': '\r', 'carriage return': '\r', - 'delete': '\x7F' + 'delete': '\x7F', }, 'simple string', "'string with single quotes'", @@ -47,8 +47,8 @@ final _$dataJsonLiteral = [ 'double': 42.0, 'string': 'string', 'list': [], - 'bool': true - } + 'bool': true, + }, ]; const _$asConstJsonLiteral = [ @@ -59,7 +59,7 @@ const _$asConstJsonLiteral = [ 'vertical tab': '\v', 'form feed': '\r', 'carriage return': '\r', - 'delete': '\x7F' + 'delete': '\x7F', }, 'simple string', "'string with single quotes'", @@ -90,8 +90,8 @@ const _$asConstJsonLiteral = [ 'double': 42.0, 'string': 'string', 'list': [], - 'bool': true - } + 'bool': true, + }, ]; const _$naughtyStringsJsonLiteral = [ @@ -601,5 +601,5 @@ const _$naughtyStringsJsonLiteral = [ 'Roses are \x1B[0;31mred\x1B[0m, violets are \x1B[0;34mblue. Hope you enjoy terminal hue', 'But now...\x1B[20Cfor my greatest trick...\x1B[8m', 'The quic\b\b\b\b\b\bk brown fo\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07x... [Beeeep]', - 'Powerلُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ冗' + 'Powerلُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ冗', ]; diff --git a/json_serializable/test/literal/json_literal_test.dart b/json_serializable/test/literal/json_literal_test.dart index a3f66f836..afc2d18b8 100644 --- a/json_serializable/test/literal/json_literal_test.dart +++ b/json_serializable/test/literal/json_literal_test.dart @@ -29,8 +29,11 @@ void main() { }); test('naughty strings', () { - final dataFilePath = - p.join('test', 'literal', 'big-list-of-naughty-strings.json'); + final dataFilePath = p.join( + 'test', + 'literal', + 'big-list-of-naughty-strings.json', + ); final dataFile = File(dataFilePath); final dataString = loudEncode(json.decode(dataFile.readAsStringSync())); diff --git a/json_serializable/test/shared_config.dart b/json_serializable/test/shared_config.dart index fcae4282e..510250175 100644 --- a/json_serializable/test/shared_config.dart +++ b/json_serializable/test/shared_config.dart @@ -12,20 +12,21 @@ final generatorConfigDefaultJson = Map.unmodifiable( ); // #CHANGE WHEN UPDATING json_annotation -final generatorConfigNonDefaultJson = - Map.unmodifiable(const JsonSerializable( - anyMap: true, - checked: true, - constructor: 'something', - createFactory: false, - createToJson: false, - createFieldMap: true, - createJsonKeys: true, - createPerFieldToJson: true, - disallowUnrecognizedKeys: true, - explicitToJson: true, - fieldRename: FieldRename.kebab, - ignoreUnannotated: true, - includeIfNull: false, - genericArgumentFactories: true, -).toJson()); +final generatorConfigNonDefaultJson = Map.unmodifiable( + const JsonSerializable( + anyMap: true, + checked: true, + constructor: 'something', + createFactory: false, + createToJson: false, + createFieldMap: true, + createJsonKeys: true, + createPerFieldToJson: true, + disallowUnrecognizedKeys: true, + explicitToJson: true, + fieldRename: FieldRename.kebab, + ignoreUnannotated: true, + includeIfNull: false, + genericArgumentFactories: true, + ).toJson(), +); diff --git a/json_serializable/test/src/_json_serializable_test_input.dart b/json_serializable/test/src/_json_serializable_test_input.dart index bdd061d00..c7fbd5088 100644 --- a/json_serializable/test/src/_json_serializable_test_input.dart +++ b/json_serializable/test/src/_json_serializable_test_input.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 import 'dart:collection'; @@ -34,15 +34,13 @@ enum UnsupportedEnum { not, valid } @JsonSerializable() // ignore: invalid_annotation_target Object annotatedMethod() => throw UnimplementedError(); -@ShouldGenerate( - r''' +@ShouldGenerate(r''' OnlyStaticMembers _$OnlyStaticMembersFromJson(Map json) => OnlyStaticMembers(); Map _$OnlyStaticMembersToJson(OnlyStaticMembers instance) => {}; -''', -) +''') @JsonSerializable() class OnlyStaticMembers { // To ensure static members are not considered for serialization. @@ -113,20 +111,16 @@ class GeneralTestClass2 { late DateTime dateOfBirth; GeneralTestClass2(this.height, String firstName, [this.lastName]) - : - // ignore: prefer_initializing_formals - firstName = firstName; + // ignore: prefer_initializing_formals + : firstName = firstName; } @ShouldGenerate(r''' -FinalFields _$FinalFieldsFromJson(Map json) => FinalFields( - (json['a'] as num).toInt(), - ); +FinalFields _$FinalFieldsFromJson(Map json) => + FinalFields((json['a'] as num).toInt()); Map _$FinalFieldsToJson(FinalFields instance) => - { - 'a': instance.a, - }; + {'a': instance.a}; ''') @JsonSerializable() class FinalFields { @@ -137,17 +131,15 @@ class FinalFields { FinalFields(this.a); } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' FinalFieldsNotSetInCtor _$FinalFieldsNotSetInCtorFromJson( - Map json) => - FinalFieldsNotSetInCtor(); + Map json, +) => FinalFieldsNotSetInCtor(); Map _$FinalFieldsNotSetInCtorToJson( - FinalFieldsNotSetInCtor instance) => - {}; -''', -) + FinalFieldsNotSetInCtor instance, +) => {}; +''') @JsonSerializable() class FinalFieldsNotSetInCtor { final int a = 1; @@ -157,13 +149,11 @@ class FinalFieldsNotSetInCtor { @ShouldGenerate(r''' SetSupport _$SetSupportFromJson(Map json) => SetSupport( - (json['values'] as List).map((e) => (e as num).toInt()).toSet(), - ); + (json['values'] as List).map((e) => (e as num).toInt()).toSet(), +); Map _$SetSupportToJson(SetSupport instance) => - { - 'values': instance.values.toList(), - }; + {'values': instance.values.toList()}; ''') @JsonSerializable() class SetSupport { @@ -172,58 +162,48 @@ class SetSupport { SetSupport(this.values); } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `toJson` code for `watch`. To support the type `Stopwatch` you can: -$converterOrKeyInstructions''', -) +$converterOrKeyInstructions''') @JsonSerializable(createFactory: false) class NoSerializeFieldType { Stopwatch? watch; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `watch`. To support the type `Stopwatch` you can: -$converterOrKeyInstructions''', -) +$converterOrKeyInstructions''') @JsonSerializable(createToJson: false) class NoDeserializeFieldType { Stopwatch? watch; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `toJson` code for `durationDateTimeMap` because of type `Duration`. -Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''', -) +Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''') @JsonSerializable(createFactory: false) class NoSerializeBadKey { late Map durationDateTimeMap; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `durationDateTimeMap` because of type `Duration`. -Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''', -) +Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''') @JsonSerializable(createToJson: false) class NoDeserializeBadKey { late Map durationDateTimeMap; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' Map _$IncludeIfNullOverrideToJson( - IncludeIfNullOverride instance) => - { - 'number': instance.number, - if (instance.str case final value?) 'str': value, - }; -''', -) + IncludeIfNullOverride instance, +) => { + 'number': instance.number, + if (instance.str case final value?) 'str': value, +}; +''') @JsonSerializable(createFactory: false, includeIfNull: false) class IncludeIfNullOverride { @JsonKey(includeIfNull: true) @@ -232,9 +212,7 @@ class IncludeIfNullOverride { } // https://github.com/google/json_serializable.dart/issues/7 regression -@ShouldThrow( - 'The class `NoCtorClass` has no default constructor.', -) +@ShouldThrow('The class `NoCtorClass` has no default constructor.') @JsonSerializable() class NoCtorClass { late final int member; @@ -373,7 +351,7 @@ class JsonValueWithBool { enum BadEnum { @JsonValue(true) - value + value, } @ShouldGenerate(r'''const _$GoodEnumEnumMap = { @@ -398,19 +376,20 @@ enum GoodEnum { @JsonValue(42) intValue, @JsonValue(null) - nullValue + nullValue, } @ShouldGenerate(r''' FieldWithFromJsonCtorAndTypeParams _$FieldWithFromJsonCtorAndTypeParamsFromJson( - Map json) => - FieldWithFromJsonCtorAndTypeParams() - ..customOrders = json['customOrders'] == null - ? null - : MyList.fromJson((json['customOrders'] - as List) + Map json, +) => FieldWithFromJsonCtorAndTypeParams() + ..customOrders = json['customOrders'] == null + ? null + : MyList.fromJson( + (json['customOrders'] as List) .map((e) => GeneralTestClass2.fromJson(e as Map)) - .toList()); + .toList(), + ); ''') @JsonSerializable(createToJson: false) class FieldWithFromJsonCtorAndTypeParams { @@ -447,17 +426,17 @@ mixin _PropInMixinI448RegressionMixin { @ShouldGenerate(r''' PropInMixinI448Regression _$PropInMixinI448RegressionFromJson( - Map json) => - PropInMixinI448Regression() - ..nullable = (json['nullable'] as num).toInt() - ..notNullable = (json['notNullable'] as num).toInt(); + Map json, +) => PropInMixinI448Regression() + ..nullable = (json['nullable'] as num).toInt() + ..notNullable = (json['notNullable'] as num).toInt(); Map _$PropInMixinI448RegressionToJson( - PropInMixinI448Regression instance) => - { - 'nullable': instance.nullable, - 'notNullable': instance.notNullable, - }; + PropInMixinI448Regression instance, +) => { + 'nullable': instance.nullable, + 'notNullable': instance.notNullable, +}; ''') @JsonSerializable() class PropInMixinI448Regression with _PropInMixinI448RegressionMixin { @@ -465,17 +444,13 @@ class PropInMixinI448Regression with _PropInMixinI448RegressionMixin { late int notNullable; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' IgnoreUnannotated _$IgnoreUnannotatedFromJson(Map json) => IgnoreUnannotated()..annotated = (json['annotated'] as num).toInt(); Map _$IgnoreUnannotatedToJson(IgnoreUnannotated instance) => - { - 'annotated': instance.annotated, - }; -''', -) + {'annotated': instance.annotated}; +''') @JsonSerializable(ignoreUnannotated: true) class IgnoreUnannotated { @JsonKey() @@ -484,17 +459,13 @@ class IgnoreUnannotated { late int unannotated; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' SubclassedJsonKey _$SubclassedJsonKeyFromJson(Map json) => SubclassedJsonKey()..annotatedWithSubclass = (json['bob'] as num).toInt(); Map _$SubclassedJsonKeyToJson(SubclassedJsonKey instance) => - { - 'bob': instance.annotatedWithSubclass, - }; -''', -) + {'bob': instance.annotatedWithSubclass}; +''') @JsonSerializable(ignoreUnannotated: true) class SubclassedJsonKey { @MyJsonKey() @@ -505,19 +476,15 @@ class MyJsonKey extends JsonKey { const MyJsonKey() : super(name: 'bob'); } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' OverrideGetterExampleI613 _$OverrideGetterExampleI613FromJson( - Map json) => - OverrideGetterExampleI613()..id = json['id'] as String; + Map json, +) => OverrideGetterExampleI613()..id = json['id'] as String; Map _$OverrideGetterExampleI613ToJson( - OverrideGetterExampleI613 instance) => - { - 'id': instance.id, - }; -''', -) + OverrideGetterExampleI613 instance, +) => {'id': instance.id}; +''') @JsonSerializable() class OverrideGetterExampleI613 extends OverrideGetterExampleI613Super { @override @@ -584,11 +551,8 @@ class ExtraParamToJson { @ShouldGenerate(r''' Map _$Issue1038RegressionTestToJson( - Issue1038RegressionTest instance) => - { - 'id': instance.id, - 'ean': instance.ean, - }; + Issue1038RegressionTest instance, +) => {'id': instance.id, 'ean': instance.ean}; ''') @JsonSerializable(createFactory: false) class Issue1038RegressionTest { @@ -600,16 +564,14 @@ class Issue1038RegressionTest { Issue1038RegressionTest.ean(this.ean) : id = null; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' TearOffFromJsonClass _$TearOffFromJsonClassFromJson( - Map json) => - TearOffFromJsonClass( - TearOffValueClass(json['value'] as String), - TearOffValueClass.fromJson(json['factoryValue'] as String), - ); -''', -) + Map json, +) => TearOffFromJsonClass( + TearOffValueClass(json['value'] as String), + TearOffValueClass.fromJson(json['factoryValue'] as String), +); +''') @JsonSerializable(createToJson: false) class TearOffFromJsonClass { TearOffFromJsonClass(this.value, this.factoryValue); diff --git a/json_serializable/test/src/checked_test_input.dart b/json_serializable/test/src/checked_test_input.dart index 167b7039f..f37360139 100644 --- a/json_serializable/test/src/checked_test_input.dart +++ b/json_serializable/test/src/checked_test_input.dart @@ -1,27 +1,25 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @ShouldGenerate(r''' WithANonCtorGetterChecked _$WithANonCtorGetterCheckedFromJson( - Map json) => - $checkedCreate( - 'WithANonCtorGetterChecked', - json, - ($checkedConvert) { - $checkKeys( - json, - allowedKeys: const ['items'], - requiredKeys: const ['items'], - disallowNullValues: const ['items'], - ); - final val = WithANonCtorGetterChecked( - $checkedConvert('items', - (v) => (v as List).map((e) => e as String).toList()), - ); - return val; - }, - ); + Map json, +) => $checkedCreate('WithANonCtorGetterChecked', json, ($checkedConvert) { + $checkKeys( + json, + allowedKeys: const ['items'], + requiredKeys: const ['items'], + disallowNullValues: const ['items'], + ); + final val = WithANonCtorGetterChecked( + $checkedConvert( + 'items', + (v) => (v as List).map((e) => e as String).toList(), + ), + ); + return val; +}); ''') @JsonSerializable( disallowUnrecognizedKeys: true, diff --git a/json_serializable/test/src/constants_copy.dart b/json_serializable/test/src/constants_copy.dart index fa1c485bb..3229cbaba 100644 --- a/json_serializable/test/src/constants_copy.dart +++ b/json_serializable/test/src/constants_copy.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; diff --git a/json_serializable/test/src/core_subclass_type_input.dart b/json_serializable/test/src/core_subclass_type_input.dart index b764b9fe8..1d45aca3d 100644 --- a/json_serializable/test/src/core_subclass_type_input.dart +++ b/json_serializable/test/src/core_subclass_type_input.dart @@ -1,38 +1,29 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `mapView`. To support the type `MapView` you can: -$converterOrKeyInstructions''', - element: 'mapView', -) +$converterOrKeyInstructions''', element: 'mapView') @JsonSerializable(createToJson: false) class UnsupportedMapField { late MapView mapView; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `listView`. To support the type `UnmodifiableListView` you can: -$converterOrKeyInstructions''', - element: 'listView', -) +$converterOrKeyInstructions''', element: 'listView') @JsonSerializable(createToJson: false) class UnsupportedListField { late UnmodifiableListView listView; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `customSet`. To support the type `CustomSet` you can: -$converterOrKeyInstructions''', - element: 'customSet', -) +$converterOrKeyInstructions''', element: 'customSet') @JsonSerializable(createToJson: false) class UnsupportedSetField { late CustomSet customSet; @@ -40,13 +31,10 @@ class UnsupportedSetField { abstract class CustomSet implements Set {} -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `customDuration`. To support the type `CustomDuration` you can: -$converterOrKeyInstructions''', - element: 'customDuration', -) +$converterOrKeyInstructions''', element: 'customDuration') @JsonSerializable(createToJson: false) class UnsupportedDurationField { late CustomDuration customDuration; @@ -54,13 +42,10 @@ class UnsupportedDurationField { abstract class CustomDuration implements Duration {} -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `customUri`. To support the type `CustomUri` you can: -$converterOrKeyInstructions''', - element: 'customUri', -) +$converterOrKeyInstructions''', element: 'customUri') @JsonSerializable(createToJson: false) class UnsupportedUriField { CustomUri? customUri; @@ -68,13 +53,10 @@ class UnsupportedUriField { abstract class CustomUri implements Uri {} -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `customDateTime`. To support the type `CustomDateTime` you can: -$converterOrKeyInstructions''', - element: 'customDateTime', -) +$converterOrKeyInstructions''', element: 'customDateTime') @JsonSerializable(createToJson: false) class UnsupportedDateTimeField { late CustomDateTime customDateTime; diff --git a/json_serializable/test/src/default_value_input.dart b/json_serializable/test/src/default_value_input.dart index 6636f085f..aa9ac4f0b 100644 --- a/json_serializable/test/src/default_value_input.dart +++ b/json_serializable/test/src/default_value_input.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @@ -21,18 +21,14 @@ class DefaultWithSymbol { int _function() => 42; -@ShouldGenerate( - r''' +@ShouldGenerate(r''' DefaultWithFunction _$DefaultWithFunctionFromJson(Map json) => DefaultWithFunction()..field = json['field'] ?? _function(); Map _$DefaultWithFunctionToJson( - DefaultWithFunction instance) => - { - 'field': instance.field, - }; -''', -) + DefaultWithFunction instance, +) => {'field': instance.field}; +''') @JsonSerializable() class DefaultWithFunction { @JsonKey(defaultValue: _function) @@ -108,17 +104,16 @@ class BadEnumDefaultValue { BadEnumDefaultValue(); } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' DefaultWithToJsonClass _$DefaultWithToJsonClassFromJson( - Map json) => - DefaultWithToJsonClass() - ..fieldDefaultValueToJson = json['fieldDefaultValueToJson'] == null - ? 7 - : DefaultWithToJsonClass._fromJson( - json['fieldDefaultValueToJson'] as String); -''', -) + Map json, +) => DefaultWithToJsonClass() + ..fieldDefaultValueToJson = json['fieldDefaultValueToJson'] == null + ? 7 + : DefaultWithToJsonClass._fromJson( + json['fieldDefaultValueToJson'] as String, + ); +''') @JsonSerializable(createToJson: false) class DefaultWithToJsonClass { @JsonKey(defaultValue: 7, fromJson: _fromJson) @@ -132,7 +127,7 @@ class DefaultWithToJsonClass { @ShouldGenerate( r''' DefaultWithDisallowNullRequiredClass - _$DefaultWithDisallowNullRequiredClassFromJson(Map json) { +_$DefaultWithDisallowNullRequiredClassFromJson(Map json) { $checkKeys( json, requiredKeys: const ['theField'], @@ -158,11 +153,10 @@ class DefaultWithDisallowNullRequiredClass { @ShouldGenerate( r''' CtorDefaultValueAndJsonKeyDefaultValue - _$CtorDefaultValueAndJsonKeyDefaultValueFromJson( - Map json) => - CtorDefaultValueAndJsonKeyDefaultValue( - (json['theField'] as num?)?.toInt() ?? 7, - ); +_$CtorDefaultValueAndJsonKeyDefaultValueFromJson(Map json) => + CtorDefaultValueAndJsonKeyDefaultValue( + (json['theField'] as num?)?.toInt() ?? 7, + ); ''', expectedLogItems: [ 'The constructor parameter for `theField` has a default value `6`, but the ' @@ -181,10 +175,8 @@ class CtorDefaultValueAndJsonKeyDefaultValue { @ShouldGenerate( r''' SameCtorAndJsonKeyDefaultValue _$SameCtorAndJsonKeyDefaultValueFromJson( - Map json) => - SameCtorAndJsonKeyDefaultValue( - (json['theField'] as num?)?.toInt() ?? 3, - ); + Map json, +) => SameCtorAndJsonKeyDefaultValue((json['theField'] as num?)?.toInt() ?? 3); ''', expectedLogItems: [ 'The default value `3` for `theField` is defined twice ' @@ -201,18 +193,18 @@ class SameCtorAndJsonKeyDefaultValue { @ShouldGenerate(r''' DefaultDoubleConstants _$DefaultDoubleConstantsFromJson( - Map json) => - DefaultDoubleConstants() - ..defaultNan = (json['defaultNan'] as num?)?.toDouble() ?? double.nan - ..defaultNegativeInfinity = - (json['defaultNegativeInfinity'] as num?)?.toDouble() ?? - double.negativeInfinity - ..defaultInfinity = - (json['defaultInfinity'] as num?)?.toDouble() ?? double.infinity - ..defaultMinPositive = - (json['defaultMinPositive'] as num?)?.toDouble() ?? 5e-324 - ..defaultMaxFinite = (json['defaultMaxFinite'] as num?)?.toDouble() ?? - 1.7976931348623157e+308; + Map json, +) => DefaultDoubleConstants() + ..defaultNan = (json['defaultNan'] as num?)?.toDouble() ?? double.nan + ..defaultNegativeInfinity = + (json['defaultNegativeInfinity'] as num?)?.toDouble() ?? + double.negativeInfinity + ..defaultInfinity = + (json['defaultInfinity'] as num?)?.toDouble() ?? double.infinity + ..defaultMinPositive = + (json['defaultMinPositive'] as num?)?.toDouble() ?? 5e-324 + ..defaultMaxFinite = + (json['defaultMaxFinite'] as num?)?.toDouble() ?? 1.7976931348623157e+308; ''') @JsonSerializable(createToJson: false) class DefaultDoubleConstants { diff --git a/json_serializable/test/src/field_namer_input.dart b/json_serializable/test/src/field_namer_input.dart index ac9e1363c..6541857e5 100644 --- a/json_serializable/test/src/field_namer_input.dart +++ b/json_serializable/test/src/field_namer_input.dart @@ -1,4 +1,4 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @@ -64,11 +64,11 @@ class FieldNamerSnake { @ShouldGenerate(r''' Map _$FieldNamerScreamingSnakeToJson( - FieldNamerScreamingSnake instance) => - { - 'THE_FIELD': instance.theField, - 'nameOverride': instance.nameOverride, - }; + FieldNamerScreamingSnake instance, +) => { + 'THE_FIELD': instance.theField, + 'nameOverride': instance.nameOverride, +}; ''') @JsonSerializable(fieldRename: FieldRename.screamingSnake, createFactory: false) class FieldNamerScreamingSnake { diff --git a/json_serializable/test/src/generic_test_input.dart b/json_serializable/test/src/generic_test_input.dart index f7b4ec45e..810c5a674 100644 --- a/json_serializable/test/src/generic_test_input.dart +++ b/json_serializable/test/src/generic_test_input.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @@ -22,23 +22,23 @@ class Issue713 { @ShouldGenerate(r''' GenericClass _$GenericClassFromJson( - Map json) => - GenericClass() - ..fieldObject = _dataFromJson(json['fieldObject']) - ..fieldDynamic = _dataFromJson(json['fieldDynamic']) - ..fieldInt = _dataFromJson(json['fieldInt']) - ..fieldT = _dataFromJson(json['fieldT']) - ..fieldS = _dataFromJson(json['fieldS']); + Map json, +) => GenericClass() + ..fieldObject = _dataFromJson(json['fieldObject']) + ..fieldDynamic = _dataFromJson(json['fieldDynamic']) + ..fieldInt = _dataFromJson(json['fieldInt']) + ..fieldT = _dataFromJson(json['fieldT']) + ..fieldS = _dataFromJson(json['fieldS']); Map _$GenericClassToJson( - GenericClass instance) => - { - 'fieldObject': _dataToJson(instance.fieldObject), - 'fieldDynamic': _dataToJson(instance.fieldDynamic), - 'fieldInt': _dataToJson(instance.fieldInt), - 'fieldT': _dataToJson(instance.fieldT), - 'fieldS': _dataToJson(instance.fieldS), - }; + GenericClass instance, +) => { + 'fieldObject': _dataToJson(instance.fieldObject), + 'fieldDynamic': _dataToJson(instance.fieldDynamic), + 'fieldInt': _dataToJson(instance.fieldInt), + 'fieldT': _dataToJson(instance.fieldT), + 'fieldS': _dataToJson(instance.fieldS), +}; ''') @JsonSerializable() class GenericClass { @@ -67,13 +67,13 @@ Object _dataToJson(T input) => throw UnimplementedError(); @ShouldGenerate( r''' GenericArgumentFactoriesFlagWithoutGenericType - _$GenericArgumentFactoriesFlagWithoutGenericTypeFromJson( - Map json) => - GenericArgumentFactoriesFlagWithoutGenericType(); +_$GenericArgumentFactoriesFlagWithoutGenericTypeFromJson( + Map json, +) => GenericArgumentFactoriesFlagWithoutGenericType(); Map _$GenericArgumentFactoriesFlagWithoutGenericTypeToJson( - GenericArgumentFactoriesFlagWithoutGenericType instance) => - {}; + GenericArgumentFactoriesFlagWithoutGenericType instance, +) => {}; ''', expectedLogItems: [ 'The class `GenericArgumentFactoriesFlagWithoutGenericType` is annotated ' diff --git a/json_serializable/test/src/inheritance_test_input.dart b/json_serializable/test/src/inheritance_test_input.dart index 86c43c420..76caaed23 100644 --- a/json_serializable/test/src/inheritance_test_input.dart +++ b/json_serializable/test/src/inheritance_test_input.dart @@ -1,22 +1,23 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @ShouldGenerate(r''' -SubType _$SubTypeFromJson(Map json) => SubType( - (json['subTypeViaCtor'] as num).toInt(), - (json['super-final-field'] as num).toInt(), - ) +SubType _$SubTypeFromJson(Map json) => + SubType( + (json['subTypeViaCtor'] as num).toInt(), + (json['super-final-field'] as num).toInt(), + ) ..superReadWriteField = (json['superReadWriteField'] as num?)?.toInt() ..subTypeReadWrite = (json['subTypeReadWrite'] as num).toInt(); Map _$SubTypeToJson(SubType instance) => { - 'super-final-field': instance.superFinalField, - if (instance.superReadWriteField case final value?) - 'superReadWriteField': value, - 'subTypeViaCtor': instance.subTypeViaCtor, - 'subTypeReadWrite': instance.subTypeReadWrite, - }; + 'super-final-field': instance.superFinalField, + if (instance.superReadWriteField case final value?) + 'superReadWriteField': value, + 'subTypeViaCtor': instance.subTypeViaCtor, + 'subTypeReadWrite': instance.subTypeReadWrite, +}; ''') @JsonSerializable() class SubType extends SuperType { @@ -47,13 +48,13 @@ class SuperType { @ShouldGenerate(r''' Map _$SubTypeWithAnnotatedFieldOverrideExtendsToJson( - SubTypeWithAnnotatedFieldOverrideExtends instance) => - { - 'super-final-field': instance.superFinalField, - if (instance.superReadWriteField case final value?) - 'superReadWriteField': value, - 'priceHalf': instance.priceHalf, - }; + SubTypeWithAnnotatedFieldOverrideExtends instance, +) => { + 'super-final-field': instance.superFinalField, + if (instance.superReadWriteField case final value?) + 'superReadWriteField': value, + 'priceHalf': instance.priceHalf, +}; ''') @JsonSerializable(createFactory: false) class SubTypeWithAnnotatedFieldOverrideExtends extends SuperType { @@ -62,18 +63,19 @@ class SubTypeWithAnnotatedFieldOverrideExtends extends SuperType { @ShouldGenerate(r''' Map - _$SubTypeWithAnnotatedFieldOverrideExtendsWithOverridesToJson( - SubTypeWithAnnotatedFieldOverrideExtendsWithOverrides instance) => - { - 'priceHalf': instance.priceHalf, - 'superReadWriteField': instance.superReadWriteField, - 'super-final-field': instance.superFinalField, - }; +_$SubTypeWithAnnotatedFieldOverrideExtendsWithOverridesToJson( + SubTypeWithAnnotatedFieldOverrideExtendsWithOverrides instance, +) => { + 'priceHalf': instance.priceHalf, + 'superReadWriteField': instance.superReadWriteField, + 'super-final-field': instance.superFinalField, +}; ''') @JsonSerializable(createFactory: false) class SubTypeWithAnnotatedFieldOverrideExtendsWithOverrides extends SuperType { SubTypeWithAnnotatedFieldOverrideExtendsWithOverrides( - int super.superTypeViaCtor); + int super.superTypeViaCtor, + ); /// The annotation applied here overrides the annotation in [SuperType]. @JsonKey(includeIfNull: true) @@ -93,11 +95,11 @@ class SubTypeWithAnnotatedFieldOverrideExtendsWithOverrides extends SuperType { @ShouldGenerate(r''' Map _$SubTypeWithAnnotatedFieldOverrideImplementsToJson( - SubTypeWithAnnotatedFieldOverrideImplements instance) => - { - 'superReadWriteField': instance.superReadWriteField, - 'superFinalField': instance.superFinalField, - }; + SubTypeWithAnnotatedFieldOverrideImplements instance, +) => { + 'superReadWriteField': instance.superReadWriteField, + 'superFinalField': instance.superFinalField, +}; ''') @JsonSerializable(createFactory: false) class SubTypeWithAnnotatedFieldOverrideImplements implements SuperType { diff --git a/json_serializable/test/src/json_converter_test_input.dart b/json_serializable/test/src/json_converter_test_input.dart index 6e40125fe..c06cc3fd2 100644 --- a/json_serializable/test/src/json_converter_test_input.dart +++ b/json_serializable/test/src/json_converter_test_input.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 // ignore_for_file: inference_failure_on_instance_creation @@ -10,25 +10,27 @@ part of '_json_serializable_test_input.dart'; @ShouldGenerate(r''' JsonConverterNamedCtor _$JsonConverterNamedCtorFromJson( - Map json) => - JsonConverterNamedCtor() - ..value = const _DurationMillisecondConverter.named() - .fromJson((json['value'] as num).toInt()) - ..genericValue = _GenericConverter.named() - .fromJson((json['genericValue'] as num).toInt()) - ..keyAnnotationFirst = JsonConverterNamedCtor._fromJson( - (json['keyAnnotationFirst'] as num).toInt()); + Map json, +) => JsonConverterNamedCtor() + ..value = const _DurationMillisecondConverter.named().fromJson( + (json['value'] as num).toInt(), + ) + ..genericValue = _GenericConverter.named().fromJson( + (json['genericValue'] as num).toInt(), + ) + ..keyAnnotationFirst = JsonConverterNamedCtor._fromJson( + (json['keyAnnotationFirst'] as num).toInt(), + ); Map _$JsonConverterNamedCtorToJson( - JsonConverterNamedCtor instance) => - { - 'value': - const _DurationMillisecondConverter.named().toJson(instance.value), - 'genericValue': - _GenericConverter.named().toJson(instance.genericValue), - 'keyAnnotationFirst': - JsonConverterNamedCtor._toJson(instance.keyAnnotationFirst), - }; + JsonConverterNamedCtor instance, +) => { + 'value': const _DurationMillisecondConverter.named().toJson(instance.value), + 'genericValue': _GenericConverter.named().toJson(instance.genericValue), + 'keyAnnotationFirst': JsonConverterNamedCtor._toJson( + instance.keyAnnotationFirst, + ), +}; ''') @JsonSerializable() @_DurationMillisecondConverter.named() @@ -48,28 +50,34 @@ class JsonConverterNamedCtor { @ShouldGenerate(r''' JsonConvertOnField _$JsonConvertOnFieldFromJson( - Map json) => - JsonConvertOnField() - ..annotatedField = const _DurationMillisecondConverter() - .fromJson((json['annotatedField'] as num).toInt()) - ..annotatedWithNamedCtor = const _DurationMillisecondConverter.named() - .fromJson((json['annotatedWithNamedCtor'] as num).toInt()) - ..classAnnotatedWithField = _durationConverter - .fromJson((json['classAnnotatedWithField'] as num).toInt()) - ..genericValue = _GenericConverter() - .fromJson((json['genericValue'] as num).toInt()); + Map json, +) => JsonConvertOnField() + ..annotatedField = const _DurationMillisecondConverter().fromJson( + (json['annotatedField'] as num).toInt(), + ) + ..annotatedWithNamedCtor = const _DurationMillisecondConverter.named() + .fromJson((json['annotatedWithNamedCtor'] as num).toInt()) + ..classAnnotatedWithField = _durationConverter.fromJson( + (json['classAnnotatedWithField'] as num).toInt(), + ) + ..genericValue = _GenericConverter().fromJson( + (json['genericValue'] as num).toInt(), + ); Map _$JsonConvertOnFieldToJson( - JsonConvertOnField instance) => - { - 'annotatedField': - const _DurationMillisecondConverter().toJson(instance.annotatedField), - 'annotatedWithNamedCtor': const _DurationMillisecondConverter.named() - .toJson(instance.annotatedWithNamedCtor), - 'classAnnotatedWithField': - _durationConverter.toJson(instance.classAnnotatedWithField), - 'genericValue': _GenericConverter().toJson(instance.genericValue), - }; + JsonConvertOnField instance, +) => { + 'annotatedField': const _DurationMillisecondConverter().toJson( + instance.annotatedField, + ), + 'annotatedWithNamedCtor': const _DurationMillisecondConverter.named().toJson( + instance.annotatedWithNamedCtor, + ), + 'classAnnotatedWithField': _durationConverter.toJson( + instance.classAnnotatedWithField, + ), + 'genericValue': _GenericConverter().toJson(instance.genericValue), +}; ''') @JsonSerializable() @_durationConverter @@ -168,11 +176,12 @@ class _ConverterWithCtorParams implements JsonConverter { @ShouldGenerate(r''' Map _$JsonConverterOnGetterToJson( - JsonConverterOnGetter instance) => - { - 'annotatedGetter': - const _NeedsConversionConverter().toJson(instance.annotatedGetter), - }; + JsonConverterOnGetter instance, +) => { + 'annotatedGetter': const _NeedsConversionConverter().toJson( + instance.annotatedGetter, + ), +}; ''') @JsonSerializable(createFactory: false) class JsonConverterOnGetter { @@ -193,12 +202,10 @@ class _NeedsConversionConverter implements JsonConverter { int toJson(NeedsConversion object) => 0; } -@ShouldThrow( - ''' +@ShouldThrow(''' Could not generate `fromJson` code for `value`. To support the type `NeedsConversion` you can: -$converterOrKeyInstructions''', -) +$converterOrKeyInstructions''') @_NullableConverter() @JsonSerializable() class JsonConverterNullableToNonNullable { diff --git a/json_serializable/test/src/map_key_variety_test_input.dart b/json_serializable/test/src/map_key_variety_test_input.dart index 9d55e3bcf..d81b0bca0 100644 --- a/json_serializable/test/src/map_key_variety_test_input.dart +++ b/json_serializable/test/src/map_key_variety_test_input.dart @@ -1,4 +1,4 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @@ -19,21 +19,17 @@ class MapKeyVariety { late Map intIntMap; } -@ShouldThrow( - r''' +@ShouldThrow(r''' Could not generate `fromJson` code for `value` because of type `Object?`. -Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''', -) +Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''') @JsonSerializable() class MapKeyNoNullableObject { late Map value; } -@ShouldThrow( - r''' +@ShouldThrow(r''' Could not generate `fromJson` code for `value` because of type `String?`. -Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''', -) +Map keys must be one of: Object, dynamic, enum, String, BigInt, DateTime, int, Uri.''') @JsonSerializable() class MapKeyNoNullableString { late Map value; diff --git a/json_serializable/test/src/setter_test_input.dart b/json_serializable/test/src/setter_test_input.dart index 81db156bc..678a5419d 100644 --- a/json_serializable/test/src/setter_test_input.dart +++ b/json_serializable/test/src/setter_test_input.dart @@ -1,4 +1,4 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; @@ -31,8 +31,8 @@ class JustSetterNoToJson { @ShouldGenerate( r''' Map _$JustSetterNoFromJsonToJson( - JustSetterNoFromJson instance) => - {}; + JustSetterNoFromJson instance, +) => {}; ''', expectedLogItems: ['Setters are ignored: JustSetterNoFromJson.someSetter'], ) diff --git a/json_serializable/test/src/to_from_json_test_input.dart b/json_serializable/test/src/to_from_json_test_input.dart index d352e3027..d93db4188 100644 --- a/json_serializable/test/src/to_from_json_test_input.dart +++ b/json_serializable/test/src/to_from_json_test_input.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=3.6 +// @dart=3.8 // ignore_for_file: strict_top_level_inference @@ -40,20 +40,19 @@ class InvalidFromFunc2Args { late String field; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' ValidToFromFuncClassStatic _$ValidToFromFuncClassStaticFromJson( - Map json) => + Map json, +) => ValidToFromFuncClassStatic() ..field = ValidToFromFuncClassStatic._staticFunc(json['field'] as String); Map _$ValidToFromFuncClassStaticToJson( - ValidToFromFuncClassStatic instance) => - { - 'field': ValidToFromFuncClassStatic._staticFunc(instance.field), - }; -''', -) + ValidToFromFuncClassStatic instance, +) => { + 'field': ValidToFromFuncClassStatic._staticFunc(instance.field), +}; +''') @JsonSerializable() class ValidToFromFuncClassStatic { static String _staticFunc(String param) => throw UnimplementedError(); @@ -88,26 +87,23 @@ class Reproduce869NullableGenericType { late final List values; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' Reproduce869NullableGenericTypeWithDefault - _$Reproduce869NullableGenericTypeWithDefaultFromJson( - Map json) => - Reproduce869NullableGenericTypeWithDefault() - ..values = - json['values'] == null ? [] : _fromList(json['values'] as List?) - ..valuesNullable = json['valuesNullable'] == null - ? [] - : _fromList(json['valuesNullable'] as List?); +_$Reproduce869NullableGenericTypeWithDefaultFromJson( + Map json, +) => Reproduce869NullableGenericTypeWithDefault() + ..values = json['values'] == null ? [] : _fromList(json['values'] as List?) + ..valuesNullable = json['valuesNullable'] == null + ? [] + : _fromList(json['valuesNullable'] as List?); Map _$Reproduce869NullableGenericTypeWithDefaultToJson( - Reproduce869NullableGenericTypeWithDefault instance) => - { - 'values': _toList(instance.values), - 'valuesNullable': _toList(instance.valuesNullable), - }; -''', -) + Reproduce869NullableGenericTypeWithDefault instance, +) => { + 'values': _toList(instance.values), + 'valuesNullable': _toList(instance.valuesNullable), +}; +''') @JsonSerializable() class Reproduce869NullableGenericTypeWithDefault { @JsonKey( @@ -142,20 +138,14 @@ class InvalidToFunc2Args { late String field; } -@ShouldGenerate( - "_toStringFromObject(json['field'])", - contains: true, -) +@ShouldGenerate("_toStringFromObject(json['field'])", contains: true) @JsonSerializable() class ObjectConvertMethods { @JsonKey(fromJson: _toStringFromObject, toJson: _toObject) late String field; } -@ShouldGenerate( - "_toDynamic(json['field'])", - contains: true, -) +@ShouldGenerate("_toDynamic(json['field'])", contains: true) @JsonSerializable() class DynamicConvertMethods { @JsonKey(fromJson: _toDynamic, toJson: _toDynamic) @@ -164,10 +154,7 @@ class DynamicConvertMethods { String _toString(String input) => 'null'; -@ShouldGenerate( - "_toString(json['field'] as String)", - contains: true, -) +@ShouldGenerate("_toString(json['field'] as String)", contains: true) @JsonSerializable() class TypedConvertMethods { @JsonKey(fromJson: _toString, toJson: _toString) @@ -176,16 +163,13 @@ class TypedConvertMethods { String? _toStringNullOnEmpty(String input) => input.isEmpty ? null : input; -@ShouldGenerate( - r''' +@ShouldGenerate(r''' Map _$ToJsonNullableFalseIncludeIfNullFalseToJson( - ToJsonNullableFalseIncludeIfNullFalse instance) => - { - if (_toStringNullOnEmpty(instance.field) case final value?) - 'field': value, - }; -''', -) + ToJsonNullableFalseIncludeIfNullFalse instance, +) => { + if (_toStringNullOnEmpty(instance.field) case final value?) 'field': value, +}; +''') @JsonSerializable(createFactory: false) class ToJsonNullableFalseIncludeIfNullFalse { @JsonKey(toJson: _toStringNullOnEmpty, includeIfNull: false) @@ -198,16 +182,14 @@ String _fromDynamicList(List input) => 'null'; String _fromDynamicIterable(Iterable input) => 'null'; -@ShouldGenerate( - r''' +@ShouldGenerate(r''' FromDynamicCollection _$FromDynamicCollectionFromJson( - Map json) => - FromDynamicCollection() - ..mapField = _fromDynamicMap(json['mapField'] as Map) - ..listField = _fromDynamicList(json['listField'] as List) - ..iterableField = _fromDynamicIterable(json['iterableField'] as List); -''', -) + Map json, +) => FromDynamicCollection() + ..mapField = _fromDynamicMap(json['mapField'] as Map) + ..listField = _fromDynamicList(json['listField'] as List) + ..iterableField = _fromDynamicIterable(json['iterableField'] as List); +''') @JsonSerializable(createToJson: false) class FromDynamicCollection { @JsonKey(fromJson: _fromDynamicMap) @@ -224,17 +206,16 @@ String _fromNullableDynamicList(List? input) => 'null'; String _fromNullableDynamicIterable(Iterable? input) => 'null'; -@ShouldGenerate( - r''' +@ShouldGenerate(r''' FromNullableDynamicCollection _$FromNullableDynamicCollectionFromJson( - Map json) => - FromNullableDynamicCollection() - ..mapField = _fromNullableDynamicMap(json['mapField'] as Map?) - ..listField = _fromNullableDynamicList(json['listField'] as List?) - ..iterableField = - _fromNullableDynamicIterable(json['iterableField'] as List?); -''', -) + Map json, +) => FromNullableDynamicCollection() + ..mapField = _fromNullableDynamicMap(json['mapField'] as Map?) + ..listField = _fromNullableDynamicList(json['listField'] as List?) + ..iterableField = _fromNullableDynamicIterable( + json['iterableField'] as List?, + ); +''') @JsonSerializable(createToJson: false) class FromNullableDynamicCollection { @JsonKey(fromJson: _fromNullableDynamicMap) @@ -311,19 +292,13 @@ class OkayOnlyOptionalPositional { String? field; } -@ShouldGenerate( - r''' +@ShouldGenerate(r''' _BetterPrivateNames _$BetterPrivateNamesFromJson(Map json) => - _BetterPrivateNames( - name: json['name'] as String, - ); + _BetterPrivateNames(name: json['name'] as String); Map _$BetterPrivateNamesToJson(_BetterPrivateNames instance) => - { - 'name': instance.name, - }; -''', -) + {'name': instance.name}; +''') @JsonSerializable(createFactory: true, createToJson: true) // ignore: unused_element class _BetterPrivateNames { diff --git a/json_serializable/test/src/unknown_enum_value_test_input.dart b/json_serializable/test/src/unknown_enum_value_test_input.dart index 7dec6feaa..3e9bd27c8 100644 --- a/json_serializable/test/src/unknown_enum_value_test_input.dart +++ b/json_serializable/test/src/unknown_enum_value_test_input.dart @@ -1,14 +1,16 @@ -// @dart=3.6 +// @dart=3.8 part of '_json_serializable_test_input.dart'; -@ShouldGenerate( - r''' +@ShouldGenerate(r''' UnknownEnumValue _$UnknownEnumValueFromJson(Map json) => UnknownEnumValue() - ..value = $enumDecodeNullable( - _$UnknownEnumValueItemsEnumMap, json['value'], - unknownValue: UnknownEnumValueItems.vUnknown) ?? + ..value = + $enumDecodeNullable( + _$UnknownEnumValueItemsEnumMap, + json['value'], + unknownValue: UnknownEnumValueItems.vUnknown, + ) ?? UnknownEnumValueItems.vNull; const _$UnknownEnumValueItemsEnumMap = { @@ -18,11 +20,8 @@ const _$UnknownEnumValueItemsEnumMap = { UnknownEnumValueItems.vUnknown: 'vUnknown', UnknownEnumValueItems.vNull: 'vNull', }; -''', -) -@JsonSerializable( - createToJson: false, -) +''') +@JsonSerializable(createToJson: false) class UnknownEnumValue { @JsonKey( defaultValue: UnknownEnumValueItems.vNull, diff --git a/json_serializable/test/supported_types/extra_map_test.dart b/json_serializable/test/supported_types/extra_map_test.dart index c5ad878b2..922b57730 100644 --- a/json_serializable/test/supported_types/extra_map_test.dart +++ b/json_serializable/test/supported_types/extra_map_test.dart @@ -16,11 +16,11 @@ void main() { for (var input in const >{ {'value': {}}, { - 'value': {'key': 'value'} + 'value': {'key': 'value'}, }, { // Regression case for https://github.com/google/json_serializable.dart/issues/864 - 'value': {'key': null} + 'value': {'key': null}, }, }) { test(input, () { diff --git a/json_serializable/test/supported_types/input.dart b/json_serializable/test/supported_types/input.dart index 8a43e9fcc..be9300aee 100644 --- a/json_serializable/test/supported_types/input.dart +++ b/json_serializable/test/supported_types/input.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 42) dynamic withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); diff --git a/json_serializable/test/supported_types/input.g.dart b/json_serializable/test/supported_types/input.g.dart index 4c7e8053d..5657db18b 100644 --- a/json_serializable/test/supported_types/input.g.dart +++ b/json_serializable/test/supported_types/input.g.dart @@ -8,10 +8,8 @@ part of 'input.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'], - json['withDefault'] ?? 42, - ); +SimpleClass _$SimpleClassFromJson(Map json) => + SimpleClass(json['value'], json['withDefault'] ?? 42); Map _$SimpleClassToJson(SimpleClass instance) => { diff --git a/json_serializable/test/supported_types/input.type_bigint.dart b/json_serializable/test/supported_types/input.type_bigint.dart index f376da7a1..d965e2925 100644 --- a/json_serializable/test/supported_types/input.type_bigint.dart +++ b/json_serializable/test/supported_types/input.type_bigint.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: _defaultValueFunc) BigInt withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: _defaultValueFunc) BigInt? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_bigint.g.dart b/json_serializable/test/supported_types/input.type_bigint.g.dart index 379bdbd50..fd9be38b5 100644 --- a/json_serializable/test/supported_types/input.type_bigint.g.dart +++ b/json_serializable/test/supported_types/input.type_bigint.g.dart @@ -9,11 +9,11 @@ part of 'input.type_bigint.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - BigInt.parse(json['value'] as String), - json['withDefault'] == null - ? _defaultValueFunc() - : BigInt.parse(json['withDefault'] as String), - ); + BigInt.parse(json['value'] as String), + json['withDefault'] == null + ? _defaultValueFunc() + : BigInt.parse(json['withDefault'] as String), +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -30,8 +30,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.toString(), - 'withDefault': instance.withDefault?.toString(), - }; + SimpleClassNullable instance, +) => { + 'value': instance.value?.toString(), + 'withDefault': instance.withDefault?.toString(), +}; diff --git a/json_serializable/test/supported_types/input.type_bool.dart b/json_serializable/test/supported_types/input.type_bool.dart index e3fd6078c..f90c87aa4 100644 --- a/json_serializable/test/supported_types/input.type_bool.dart +++ b/json_serializable/test/supported_types/input.type_bool.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: true) bool withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: true) bool? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_bool.g.dart b/json_serializable/test/supported_types/input.type_bool.g.dart index 4077ce108..90b889703 100644 --- a/json_serializable/test/supported_types/input.type_bool.g.dart +++ b/json_serializable/test/supported_types/input.type_bool.g.dart @@ -8,10 +8,8 @@ part of 'input.type_bool.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as bool, - json['withDefault'] as bool? ?? true, - ); +SimpleClass _$SimpleClassFromJson(Map json) => + SimpleClass(json['value'] as bool, json['withDefault'] as bool? ?? true); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,8 +24,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_datetime.dart b/json_serializable/test/supported_types/input.type_datetime.dart index 08d2dd797..24b91514f 100644 --- a/json_serializable/test/supported_types/input.type_datetime.dart +++ b/json_serializable/test/supported_types/input.type_datetime.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: _defaultValueFunc) DateTime withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: _defaultValueFunc) DateTime? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_datetime.g.dart b/json_serializable/test/supported_types/input.type_datetime.g.dart index 461e30ebb..fdc0aff3f 100644 --- a/json_serializable/test/supported_types/input.type_datetime.g.dart +++ b/json_serializable/test/supported_types/input.type_datetime.g.dart @@ -9,11 +9,11 @@ part of 'input.type_datetime.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - DateTime.parse(json['value'] as String), - json['withDefault'] == null - ? _defaultValueFunc() - : DateTime.parse(json['withDefault'] as String), - ); + DateTime.parse(json['value'] as String), + json['withDefault'] == null + ? _defaultValueFunc() + : DateTime.parse(json['withDefault'] as String), +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -30,8 +30,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.toIso8601String(), - 'withDefault': instance.withDefault?.toIso8601String(), - }; + SimpleClassNullable instance, +) => { + 'value': instance.value?.toIso8601String(), + 'withDefault': instance.withDefault?.toIso8601String(), +}; diff --git a/json_serializable/test/supported_types/input.type_double.dart b/json_serializable/test/supported_types/input.type_double.dart index c51a0e35b..4ea8dafb0 100644 --- a/json_serializable/test/supported_types/input.type_double.dart +++ b/json_serializable/test/supported_types/input.type_double.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 3.14) double withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: 3.14) double? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_double.g.dart b/json_serializable/test/supported_types/input.type_double.g.dart index 163485d5a..3261dce7f 100644 --- a/json_serializable/test/supported_types/input.type_double.g.dart +++ b/json_serializable/test/supported_types/input.type_double.g.dart @@ -9,9 +9,9 @@ part of 'input.type_double.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - (json['value'] as num).toDouble(), - (json['withDefault'] as num?)?.toDouble() ?? 3.14, - ); + (json['value'] as num).toDouble(), + (json['withDefault'] as num?)?.toDouble() ?? 3.14, +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,8 +26,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_duration.dart b/json_serializable/test/supported_types/input.type_duration.dart index 7ecdef825..c040b4b6e 100644 --- a/json_serializable/test/supported_types/input.type_duration.dart +++ b/json_serializable/test/supported_types/input.type_duration.dart @@ -10,9 +10,7 @@ part 'input.type_duration.g.dart'; class SimpleClass { final Duration value; - SimpleClass( - this.value, - ); + SimpleClass(this.value); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -24,9 +22,7 @@ class SimpleClass { class SimpleClassNullable { final Duration? value; - SimpleClassNullable( - this.value, - ); + SimpleClassNullable(this.value); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_duration.g.dart b/json_serializable/test/supported_types/input.type_duration.g.dart index 9d57d843c..bcb4bc291 100644 --- a/json_serializable/test/supported_types/input.type_duration.g.dart +++ b/json_serializable/test/supported_types/input.type_duration.g.dart @@ -8,14 +8,11 @@ part of 'input.type_duration.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - Duration(microseconds: (json['value'] as num).toInt()), - ); +SimpleClass _$SimpleClassFromJson(Map json) => + SimpleClass(Duration(microseconds: (json['value'] as num).toInt())); Map _$SimpleClassToJson(SimpleClass instance) => - { - 'value': instance.value.inMicroseconds, - }; + {'value': instance.value.inMicroseconds}; SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => SimpleClassNullable( @@ -25,7 +22,5 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.inMicroseconds, - }; + SimpleClassNullable instance, +) => {'value': instance.value?.inMicroseconds}; diff --git a/json_serializable/test/supported_types/input.type_enumtype.dart b/json_serializable/test/supported_types/input.type_enumtype.dart index 9225db715..117e9a6f7 100644 --- a/json_serializable/test/supported_types/input.type_enumtype.dart +++ b/json_serializable/test/supported_types/input.type_enumtype.dart @@ -14,10 +14,7 @@ class SimpleClass { @JsonKey(defaultValue: EnumType.alpha) EnumType withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -32,10 +29,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: EnumType.alpha) EnumType? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_enumtype.g.dart b/json_serializable/test/supported_types/input.type_enumtype.g.dart index 77d67e064..3e25a0194 100644 --- a/json_serializable/test/supported_types/input.type_enumtype.g.dart +++ b/json_serializable/test/supported_types/input.type_enumtype.g.dart @@ -9,10 +9,9 @@ part of 'input.type_enumtype.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - $enumDecode(_$EnumTypeEnumMap, json['value']), - $enumDecodeNullable(_$EnumTypeEnumMap, json['withDefault']) ?? - EnumType.alpha, - ); + $enumDecode(_$EnumTypeEnumMap, json['value']), + $enumDecodeNullable(_$EnumTypeEnumMap, json['withDefault']) ?? EnumType.alpha, +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -35,8 +34,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': _$EnumTypeEnumMap[instance.value], - 'withDefault': _$EnumTypeEnumMap[instance.withDefault], - }; + SimpleClassNullable instance, +) => { + 'value': _$EnumTypeEnumMap[instance.value], + 'withDefault': _$EnumTypeEnumMap[instance.withDefault], +}; diff --git a/json_serializable/test/supported_types/input.type_int.dart b/json_serializable/test/supported_types/input.type_int.dart index 6d80dc79c..62b5a882e 100644 --- a/json_serializable/test/supported_types/input.type_int.dart +++ b/json_serializable/test/supported_types/input.type_int.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 42) int withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: 42) int? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_int.g.dart b/json_serializable/test/supported_types/input.type_int.g.dart index 2f248b74a..00fd9ba1b 100644 --- a/json_serializable/test/supported_types/input.type_int.g.dart +++ b/json_serializable/test/supported_types/input.type_int.g.dart @@ -9,9 +9,9 @@ part of 'input.type_int.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - (json['value'] as num).toInt(), - (json['withDefault'] as num?)?.toInt() ?? 42, - ); + (json['value'] as num).toInt(), + (json['withDefault'] as num?)?.toInt() ?? 42, +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,8 +26,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_iterable.dart b/json_serializable/test/supported_types/input.type_iterable.dart index d01b49a20..b1b39e080 100644 --- a/json_serializable/test/supported_types/input.type_iterable.dart +++ b/json_serializable/test/supported_types/input.type_iterable.dart @@ -14,10 +14,7 @@ class SimpleClass { @JsonKey(defaultValue: [42, true, false, null]) Iterable withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -32,10 +29,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: [42, true, false, null]) Iterable? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); @@ -47,9 +41,7 @@ class SimpleClassNullable { class SimpleClassOfBigInt { final Iterable value; - SimpleClassOfBigInt( - this.value, - ); + SimpleClassOfBigInt(this.value); factory SimpleClassOfBigInt.fromJson(Map json) => _$SimpleClassOfBigIntFromJson(json); @@ -61,9 +53,7 @@ class SimpleClassOfBigInt { class SimpleClassNullableOfBigInt { final Iterable? value; - SimpleClassNullableOfBigInt( - this.value, - ); + SimpleClassNullableOfBigInt(this.value); factory SimpleClassNullableOfBigInt.fromJson(Map json) => _$SimpleClassNullableOfBigIntFromJson(json); @@ -75,9 +65,7 @@ class SimpleClassNullableOfBigInt { class SimpleClassOfBigIntNullable { final Iterable value; - SimpleClassOfBigIntNullable( - this.value, - ); + SimpleClassOfBigIntNullable(this.value); factory SimpleClassOfBigIntNullable.fromJson(Map json) => _$SimpleClassOfBigIntNullableFromJson(json); @@ -89,13 +77,11 @@ class SimpleClassOfBigIntNullable { class SimpleClassNullableOfBigIntNullable { final Iterable? value; - SimpleClassNullableOfBigIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntNullable(this.value); factory SimpleClassNullableOfBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntNullableToJson(this); @@ -105,9 +91,7 @@ class SimpleClassNullableOfBigIntNullable { class SimpleClassOfBool { final Iterable value; - SimpleClassOfBool( - this.value, - ); + SimpleClassOfBool(this.value); factory SimpleClassOfBool.fromJson(Map json) => _$SimpleClassOfBoolFromJson(json); @@ -119,9 +103,7 @@ class SimpleClassOfBool { class SimpleClassNullableOfBool { final Iterable? value; - SimpleClassNullableOfBool( - this.value, - ); + SimpleClassNullableOfBool(this.value); factory SimpleClassNullableOfBool.fromJson(Map json) => _$SimpleClassNullableOfBoolFromJson(json); @@ -133,9 +115,7 @@ class SimpleClassNullableOfBool { class SimpleClassOfBoolNullable { final Iterable value; - SimpleClassOfBoolNullable( - this.value, - ); + SimpleClassOfBoolNullable(this.value); factory SimpleClassOfBoolNullable.fromJson(Map json) => _$SimpleClassOfBoolNullableFromJson(json); @@ -147,13 +127,11 @@ class SimpleClassOfBoolNullable { class SimpleClassNullableOfBoolNullable { final Iterable? value; - SimpleClassNullableOfBoolNullable( - this.value, - ); + SimpleClassNullableOfBoolNullable(this.value); factory SimpleClassNullableOfBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBoolNullableToJson(this); @@ -163,9 +141,7 @@ class SimpleClassNullableOfBoolNullable { class SimpleClassOfDateTime { final Iterable value; - SimpleClassOfDateTime( - this.value, - ); + SimpleClassOfDateTime(this.value); factory SimpleClassOfDateTime.fromJson(Map json) => _$SimpleClassOfDateTimeFromJson(json); @@ -177,9 +153,7 @@ class SimpleClassOfDateTime { class SimpleClassNullableOfDateTime { final Iterable? value; - SimpleClassNullableOfDateTime( - this.value, - ); + SimpleClassNullableOfDateTime(this.value); factory SimpleClassNullableOfDateTime.fromJson(Map json) => _$SimpleClassNullableOfDateTimeFromJson(json); @@ -191,9 +165,7 @@ class SimpleClassNullableOfDateTime { class SimpleClassOfDateTimeNullable { final Iterable value; - SimpleClassOfDateTimeNullable( - this.value, - ); + SimpleClassOfDateTimeNullable(this.value); factory SimpleClassOfDateTimeNullable.fromJson(Map json) => _$SimpleClassOfDateTimeNullableFromJson(json); @@ -205,13 +177,11 @@ class SimpleClassOfDateTimeNullable { class SimpleClassNullableOfDateTimeNullable { final Iterable? value; - SimpleClassNullableOfDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeNullable(this.value); factory SimpleClassNullableOfDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeNullableToJson(this); @@ -221,9 +191,7 @@ class SimpleClassNullableOfDateTimeNullable { class SimpleClassOfDouble { final Iterable value; - SimpleClassOfDouble( - this.value, - ); + SimpleClassOfDouble(this.value); factory SimpleClassOfDouble.fromJson(Map json) => _$SimpleClassOfDoubleFromJson(json); @@ -235,9 +203,7 @@ class SimpleClassOfDouble { class SimpleClassNullableOfDouble { final Iterable? value; - SimpleClassNullableOfDouble( - this.value, - ); + SimpleClassNullableOfDouble(this.value); factory SimpleClassNullableOfDouble.fromJson(Map json) => _$SimpleClassNullableOfDoubleFromJson(json); @@ -249,9 +215,7 @@ class SimpleClassNullableOfDouble { class SimpleClassOfDoubleNullable { final Iterable value; - SimpleClassOfDoubleNullable( - this.value, - ); + SimpleClassOfDoubleNullable(this.value); factory SimpleClassOfDoubleNullable.fromJson(Map json) => _$SimpleClassOfDoubleNullableFromJson(json); @@ -263,13 +227,11 @@ class SimpleClassOfDoubleNullable { class SimpleClassNullableOfDoubleNullable { final Iterable? value; - SimpleClassNullableOfDoubleNullable( - this.value, - ); + SimpleClassNullableOfDoubleNullable(this.value); factory SimpleClassNullableOfDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDoubleNullableToJson(this); @@ -279,9 +241,7 @@ class SimpleClassNullableOfDoubleNullable { class SimpleClassOfDuration { final Iterable value; - SimpleClassOfDuration( - this.value, - ); + SimpleClassOfDuration(this.value); factory SimpleClassOfDuration.fromJson(Map json) => _$SimpleClassOfDurationFromJson(json); @@ -293,9 +253,7 @@ class SimpleClassOfDuration { class SimpleClassNullableOfDuration { final Iterable? value; - SimpleClassNullableOfDuration( - this.value, - ); + SimpleClassNullableOfDuration(this.value); factory SimpleClassNullableOfDuration.fromJson(Map json) => _$SimpleClassNullableOfDurationFromJson(json); @@ -307,9 +265,7 @@ class SimpleClassNullableOfDuration { class SimpleClassOfDurationNullable { final Iterable value; - SimpleClassOfDurationNullable( - this.value, - ); + SimpleClassOfDurationNullable(this.value); factory SimpleClassOfDurationNullable.fromJson(Map json) => _$SimpleClassOfDurationNullableFromJson(json); @@ -321,13 +277,11 @@ class SimpleClassOfDurationNullable { class SimpleClassNullableOfDurationNullable { final Iterable? value; - SimpleClassNullableOfDurationNullable( - this.value, - ); + SimpleClassNullableOfDurationNullable(this.value); factory SimpleClassNullableOfDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDurationNullableToJson(this); @@ -337,9 +291,7 @@ class SimpleClassNullableOfDurationNullable { class SimpleClassOfDynamic { final Iterable value; - SimpleClassOfDynamic( - this.value, - ); + SimpleClassOfDynamic(this.value); factory SimpleClassOfDynamic.fromJson(Map json) => _$SimpleClassOfDynamicFromJson(json); @@ -351,9 +303,7 @@ class SimpleClassOfDynamic { class SimpleClassNullableOfDynamic { final Iterable? value; - SimpleClassNullableOfDynamic( - this.value, - ); + SimpleClassNullableOfDynamic(this.value); factory SimpleClassNullableOfDynamic.fromJson(Map json) => _$SimpleClassNullableOfDynamicFromJson(json); @@ -365,9 +315,7 @@ class SimpleClassNullableOfDynamic { class SimpleClassOfEnumType { final Iterable value; - SimpleClassOfEnumType( - this.value, - ); + SimpleClassOfEnumType(this.value); factory SimpleClassOfEnumType.fromJson(Map json) => _$SimpleClassOfEnumTypeFromJson(json); @@ -379,9 +327,7 @@ class SimpleClassOfEnumType { class SimpleClassNullableOfEnumType { final Iterable? value; - SimpleClassNullableOfEnumType( - this.value, - ); + SimpleClassNullableOfEnumType(this.value); factory SimpleClassNullableOfEnumType.fromJson(Map json) => _$SimpleClassNullableOfEnumTypeFromJson(json); @@ -393,9 +339,7 @@ class SimpleClassNullableOfEnumType { class SimpleClassOfEnumTypeNullable { final Iterable value; - SimpleClassOfEnumTypeNullable( - this.value, - ); + SimpleClassOfEnumTypeNullable(this.value); factory SimpleClassOfEnumTypeNullable.fromJson(Map json) => _$SimpleClassOfEnumTypeNullableFromJson(json); @@ -407,13 +351,11 @@ class SimpleClassOfEnumTypeNullable { class SimpleClassNullableOfEnumTypeNullable { final Iterable? value; - SimpleClassNullableOfEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeNullable(this.value); factory SimpleClassNullableOfEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeNullableToJson(this); @@ -423,13 +365,11 @@ class SimpleClassNullableOfEnumTypeNullable { class SimpleClassOfFromJsonDynamicParam { final Iterable value; - SimpleClassOfFromJsonDynamicParam( - this.value, - ); + SimpleClassOfFromJsonDynamicParam(this.value); factory SimpleClassOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonDynamicParamToJson(this); @@ -439,13 +379,11 @@ class SimpleClassOfFromJsonDynamicParam { class SimpleClassNullableOfFromJsonDynamicParam { final Iterable? value; - SimpleClassNullableOfFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfFromJsonDynamicParam(this.value); factory SimpleClassNullableOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonDynamicParamToJson(this); @@ -455,13 +393,11 @@ class SimpleClassNullableOfFromJsonDynamicParam { class SimpleClassOfFromJsonNullableObjectParam { final Iterable value; - SimpleClassOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfFromJsonNullableObjectParam(this.value); factory SimpleClassOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonNullableObjectParamToJson(this); @@ -471,13 +407,11 @@ class SimpleClassOfFromJsonNullableObjectParam { class SimpleClassNullableOfFromJsonNullableObjectParam { final Iterable? value; - SimpleClassNullableOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonNullableObjectParamToJson(this); @@ -487,13 +421,11 @@ class SimpleClassNullableOfFromJsonNullableObjectParam { class SimpleClassOfFromJsonObjectParam { final Iterable value; - SimpleClassOfFromJsonObjectParam( - this.value, - ); + SimpleClassOfFromJsonObjectParam(this.value); factory SimpleClassOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonObjectParamToJson(this); @@ -503,13 +435,11 @@ class SimpleClassOfFromJsonObjectParam { class SimpleClassNullableOfFromJsonObjectParam { final Iterable? value; - SimpleClassNullableOfFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonObjectParam(this.value); factory SimpleClassNullableOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonObjectParamToJson(this); @@ -519,9 +449,7 @@ class SimpleClassNullableOfFromJsonObjectParam { class SimpleClassOfInt { final Iterable value; - SimpleClassOfInt( - this.value, - ); + SimpleClassOfInt(this.value); factory SimpleClassOfInt.fromJson(Map json) => _$SimpleClassOfIntFromJson(json); @@ -533,9 +461,7 @@ class SimpleClassOfInt { class SimpleClassNullableOfInt { final Iterable? value; - SimpleClassNullableOfInt( - this.value, - ); + SimpleClassNullableOfInt(this.value); factory SimpleClassNullableOfInt.fromJson(Map json) => _$SimpleClassNullableOfIntFromJson(json); @@ -547,9 +473,7 @@ class SimpleClassNullableOfInt { class SimpleClassOfIntNullable { final Iterable value; - SimpleClassOfIntNullable( - this.value, - ); + SimpleClassOfIntNullable(this.value); factory SimpleClassOfIntNullable.fromJson(Map json) => _$SimpleClassOfIntNullableFromJson(json); @@ -561,13 +485,11 @@ class SimpleClassOfIntNullable { class SimpleClassNullableOfIntNullable { final Iterable? value; - SimpleClassNullableOfIntNullable( - this.value, - ); + SimpleClassNullableOfIntNullable(this.value); factory SimpleClassNullableOfIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntNullableToJson(this); @@ -577,9 +499,7 @@ class SimpleClassNullableOfIntNullable { class SimpleClassOfNum { final Iterable value; - SimpleClassOfNum( - this.value, - ); + SimpleClassOfNum(this.value); factory SimpleClassOfNum.fromJson(Map json) => _$SimpleClassOfNumFromJson(json); @@ -591,9 +511,7 @@ class SimpleClassOfNum { class SimpleClassNullableOfNum { final Iterable? value; - SimpleClassNullableOfNum( - this.value, - ); + SimpleClassNullableOfNum(this.value); factory SimpleClassNullableOfNum.fromJson(Map json) => _$SimpleClassNullableOfNumFromJson(json); @@ -605,9 +523,7 @@ class SimpleClassNullableOfNum { class SimpleClassOfNumNullable { final Iterable value; - SimpleClassOfNumNullable( - this.value, - ); + SimpleClassOfNumNullable(this.value); factory SimpleClassOfNumNullable.fromJson(Map json) => _$SimpleClassOfNumNullableFromJson(json); @@ -619,13 +535,11 @@ class SimpleClassOfNumNullable { class SimpleClassNullableOfNumNullable { final Iterable? value; - SimpleClassNullableOfNumNullable( - this.value, - ); + SimpleClassNullableOfNumNullable(this.value); factory SimpleClassNullableOfNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfNumNullableToJson(this); @@ -635,9 +549,7 @@ class SimpleClassNullableOfNumNullable { class SimpleClassOfObject { final Iterable value; - SimpleClassOfObject( - this.value, - ); + SimpleClassOfObject(this.value); factory SimpleClassOfObject.fromJson(Map json) => _$SimpleClassOfObjectFromJson(json); @@ -649,9 +561,7 @@ class SimpleClassOfObject { class SimpleClassNullableOfObject { final Iterable? value; - SimpleClassNullableOfObject( - this.value, - ); + SimpleClassNullableOfObject(this.value); factory SimpleClassNullableOfObject.fromJson(Map json) => _$SimpleClassNullableOfObjectFromJson(json); @@ -663,9 +573,7 @@ class SimpleClassNullableOfObject { class SimpleClassOfObjectNullable { final Iterable value; - SimpleClassOfObjectNullable( - this.value, - ); + SimpleClassOfObjectNullable(this.value); factory SimpleClassOfObjectNullable.fromJson(Map json) => _$SimpleClassOfObjectNullableFromJson(json); @@ -677,13 +585,11 @@ class SimpleClassOfObjectNullable { class SimpleClassNullableOfObjectNullable { final Iterable? value; - SimpleClassNullableOfObjectNullable( - this.value, - ); + SimpleClassNullableOfObjectNullable(this.value); factory SimpleClassNullableOfObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectNullableToJson(this); @@ -693,9 +599,7 @@ class SimpleClassNullableOfObjectNullable { class SimpleClassOfRecord { final Iterable<(int, String, {bool truth})> value; - SimpleClassOfRecord( - this.value, - ); + SimpleClassOfRecord(this.value); factory SimpleClassOfRecord.fromJson(Map json) => _$SimpleClassOfRecordFromJson(json); @@ -707,9 +611,7 @@ class SimpleClassOfRecord { class SimpleClassNullableOfRecord { final Iterable<(int, String, {bool truth})>? value; - SimpleClassNullableOfRecord( - this.value, - ); + SimpleClassNullableOfRecord(this.value); factory SimpleClassNullableOfRecord.fromJson(Map json) => _$SimpleClassNullableOfRecordFromJson(json); @@ -721,9 +623,7 @@ class SimpleClassNullableOfRecord { class SimpleClassOfString { final Iterable value; - SimpleClassOfString( - this.value, - ); + SimpleClassOfString(this.value); factory SimpleClassOfString.fromJson(Map json) => _$SimpleClassOfStringFromJson(json); @@ -735,9 +635,7 @@ class SimpleClassOfString { class SimpleClassNullableOfString { final Iterable? value; - SimpleClassNullableOfString( - this.value, - ); + SimpleClassNullableOfString(this.value); factory SimpleClassNullableOfString.fromJson(Map json) => _$SimpleClassNullableOfStringFromJson(json); @@ -749,9 +647,7 @@ class SimpleClassNullableOfString { class SimpleClassOfStringNullable { final Iterable value; - SimpleClassOfStringNullable( - this.value, - ); + SimpleClassOfStringNullable(this.value); factory SimpleClassOfStringNullable.fromJson(Map json) => _$SimpleClassOfStringNullableFromJson(json); @@ -763,13 +659,11 @@ class SimpleClassOfStringNullable { class SimpleClassNullableOfStringNullable { final Iterable? value; - SimpleClassNullableOfStringNullable( - this.value, - ); + SimpleClassNullableOfStringNullable(this.value); factory SimpleClassNullableOfStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringNullableToJson(this); @@ -779,9 +673,7 @@ class SimpleClassNullableOfStringNullable { class SimpleClassOfUri { final Iterable value; - SimpleClassOfUri( - this.value, - ); + SimpleClassOfUri(this.value); factory SimpleClassOfUri.fromJson(Map json) => _$SimpleClassOfUriFromJson(json); @@ -793,9 +685,7 @@ class SimpleClassOfUri { class SimpleClassNullableOfUri { final Iterable? value; - SimpleClassNullableOfUri( - this.value, - ); + SimpleClassNullableOfUri(this.value); factory SimpleClassNullableOfUri.fromJson(Map json) => _$SimpleClassNullableOfUriFromJson(json); @@ -807,9 +697,7 @@ class SimpleClassNullableOfUri { class SimpleClassOfUriNullable { final Iterable value; - SimpleClassOfUriNullable( - this.value, - ); + SimpleClassOfUriNullable(this.value); factory SimpleClassOfUriNullable.fromJson(Map json) => _$SimpleClassOfUriNullableFromJson(json); @@ -821,13 +709,11 @@ class SimpleClassOfUriNullable { class SimpleClassNullableOfUriNullable { final Iterable? value; - SimpleClassNullableOfUriNullable( - this.value, - ); + SimpleClassNullableOfUriNullable(this.value); factory SimpleClassNullableOfUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriNullableToJson(this); diff --git a/json_serializable/test/supported_types/input.type_iterable.g.dart b/json_serializable/test/supported_types/input.type_iterable.g.dart index a9264f393..6f2df94a4 100644 --- a/json_serializable/test/supported_types/input.type_iterable.g.dart +++ b/json_serializable/test/supported_types/input.type_iterable.g.dart @@ -9,9 +9,9 @@ part of 'input.type_iterable.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as List, - json['withDefault'] as List? ?? [42, true, false, null], - ); + json['value'] as List, + json['withDefault'] as List? ?? [42, true, false, null], +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,11 +26,11 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.toList(), - 'withDefault': instance.withDefault?.toList(), - }; + SimpleClassNullable instance, +) => { + 'value': instance.value?.toList(), + 'withDefault': instance.withDefault?.toList(), +}; SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => SimpleClassOfBigInt( @@ -38,146 +38,138 @@ SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => ); Map _$SimpleClassOfBigIntToJson( - SimpleClassOfBigInt instance) => - { - 'value': instance.value.map((e) => e.toString()).toList(), - }; + SimpleClassOfBigInt instance, +) => { + 'value': instance.value.map((e) => e.toString()).toList(), +}; SimpleClassNullableOfBigInt _$SimpleClassNullableOfBigIntFromJson( - Map json) => - SimpleClassNullableOfBigInt( - (json['value'] as List?)?.map((e) => BigInt.parse(e as String)), - ); + Map json, +) => SimpleClassNullableOfBigInt( + (json['value'] as List?)?.map((e) => BigInt.parse(e as String)), +); Map _$SimpleClassNullableOfBigIntToJson( - SimpleClassNullableOfBigInt instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfBigInt instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfBigIntNullable _$SimpleClassOfBigIntNullableFromJson( - Map json) => - SimpleClassOfBigIntNullable( - (json['value'] as List) - .map((e) => e == null ? null : BigInt.parse(e as String)), - ); + Map json, +) => SimpleClassOfBigIntNullable( + (json['value'] as List).map( + (e) => e == null ? null : BigInt.parse(e as String), + ), +); Map _$SimpleClassOfBigIntNullableToJson( - SimpleClassOfBigIntNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfBigIntNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfBigIntNullable - _$SimpleClassNullableOfBigIntNullableFromJson(Map json) => - SimpleClassNullableOfBigIntNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : BigInt.parse(e as String)), - ); +_$SimpleClassNullableOfBigIntNullableFromJson(Map json) => + SimpleClassNullableOfBigIntNullable( + (json['value'] as List?)?.map( + (e) => e == null ? null : BigInt.parse(e as String), + ), + ); Map _$SimpleClassNullableOfBigIntNullableToJson( - SimpleClassNullableOfBigIntNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfBigIntNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => - SimpleClassOfBool( - (json['value'] as List).map((e) => e as bool), - ); + SimpleClassOfBool((json['value'] as List).map((e) => e as bool)); Map _$SimpleClassOfBoolToJson(SimpleClassOfBool instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfBool _$SimpleClassNullableOfBoolFromJson( - Map json) => - SimpleClassNullableOfBool( - (json['value'] as List?)?.map((e) => e as bool), - ); + Map json, +) => SimpleClassNullableOfBool( + (json['value'] as List?)?.map((e) => e as bool), +); Map _$SimpleClassNullableOfBoolToJson( - SimpleClassNullableOfBool instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfBool instance, +) => {'value': instance.value?.toList()}; SimpleClassOfBoolNullable _$SimpleClassOfBoolNullableFromJson( - Map json) => - SimpleClassOfBoolNullable( - (json['value'] as List).map((e) => e as bool?), - ); + Map json, +) => SimpleClassOfBoolNullable( + (json['value'] as List).map((e) => e as bool?), +); Map _$SimpleClassOfBoolNullableToJson( - SimpleClassOfBoolNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfBoolNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfBoolNullable _$SimpleClassNullableOfBoolNullableFromJson( - Map json) => - SimpleClassNullableOfBoolNullable( - (json['value'] as List?)?.map((e) => e as bool?), - ); + Map json, +) => SimpleClassNullableOfBoolNullable( + (json['value'] as List?)?.map((e) => e as bool?), +); Map _$SimpleClassNullableOfBoolNullableToJson( - SimpleClassNullableOfBoolNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfBoolNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDateTime _$SimpleClassOfDateTimeFromJson( - Map json) => - SimpleClassOfDateTime( - (json['value'] as List).map((e) => DateTime.parse(e as String)), - ); + Map json, +) => SimpleClassOfDateTime( + (json['value'] as List).map((e) => DateTime.parse(e as String)), +); Map _$SimpleClassOfDateTimeToJson( - SimpleClassOfDateTime instance) => - { - 'value': instance.value.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassOfDateTime instance, +) => { + 'value': instance.value.map((e) => e.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTime _$SimpleClassNullableOfDateTimeFromJson( - Map json) => - SimpleClassNullableOfDateTime( - (json['value'] as List?) - ?.map((e) => DateTime.parse(e as String)), - ); + Map json, +) => SimpleClassNullableOfDateTime( + (json['value'] as List?)?.map((e) => DateTime.parse(e as String)), +); Map _$SimpleClassNullableOfDateTimeToJson( - SimpleClassNullableOfDateTime instance) => - { - 'value': instance.value?.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTime instance, +) => { + 'value': instance.value?.map((e) => e.toIso8601String()).toList(), +}; SimpleClassOfDateTimeNullable _$SimpleClassOfDateTimeNullableFromJson( - Map json) => - SimpleClassOfDateTimeNullable( - (json['value'] as List) - .map((e) => e == null ? null : DateTime.parse(e as String)), - ); + Map json, +) => SimpleClassOfDateTimeNullable( + (json['value'] as List).map( + (e) => e == null ? null : DateTime.parse(e as String), + ), +); Map _$SimpleClassOfDateTimeNullableToJson( - SimpleClassOfDateTimeNullable instance) => - { - 'value': instance.value.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassOfDateTimeNullable instance, +) => { + 'value': instance.value.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTimeNullable - _$SimpleClassNullableOfDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : DateTime.parse(e as String)), - ); +_$SimpleClassNullableOfDateTimeNullableFromJson(Map json) => + SimpleClassNullableOfDateTimeNullable( + (json['value'] as List?)?.map( + (e) => e == null ? null : DateTime.parse(e as String), + ), + ); Map _$SimpleClassNullableOfDateTimeNullableToJson( - SimpleClassNullableOfDateTimeNullable instance) => - { - 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTimeNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => SimpleClassOfDouble( @@ -185,137 +177,124 @@ SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => ); Map _$SimpleClassOfDoubleToJson( - SimpleClassOfDouble instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDouble instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDouble _$SimpleClassNullableOfDoubleFromJson( - Map json) => - SimpleClassNullableOfDouble( - (json['value'] as List?)?.map((e) => (e as num).toDouble()), - ); + Map json, +) => SimpleClassNullableOfDouble( + (json['value'] as List?)?.map((e) => (e as num).toDouble()), +); Map _$SimpleClassNullableOfDoubleToJson( - SimpleClassNullableOfDouble instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDouble instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDoubleNullable _$SimpleClassOfDoubleNullableFromJson( - Map json) => - SimpleClassOfDoubleNullable( - (json['value'] as List).map((e) => (e as num?)?.toDouble()), - ); + Map json, +) => SimpleClassOfDoubleNullable( + (json['value'] as List).map((e) => (e as num?)?.toDouble()), +); Map _$SimpleClassOfDoubleNullableToJson( - SimpleClassOfDoubleNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDoubleNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDoubleNullable - _$SimpleClassNullableOfDoubleNullableFromJson(Map json) => - SimpleClassNullableOfDoubleNullable( - (json['value'] as List?) - ?.map((e) => (e as num?)?.toDouble()), - ); +_$SimpleClassNullableOfDoubleNullableFromJson(Map json) => + SimpleClassNullableOfDoubleNullable( + (json['value'] as List?)?.map((e) => (e as num?)?.toDouble()), + ); Map _$SimpleClassNullableOfDoubleNullableToJson( - SimpleClassNullableOfDoubleNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDoubleNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDuration _$SimpleClassOfDurationFromJson( - Map json) => - SimpleClassOfDuration( - (json['value'] as List) - .map((e) => Duration(microseconds: (e as num).toInt())), - ); + Map json, +) => SimpleClassOfDuration( + (json['value'] as List).map( + (e) => Duration(microseconds: (e as num).toInt()), + ), +); Map _$SimpleClassOfDurationToJson( - SimpleClassOfDuration instance) => - { - 'value': instance.value.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassOfDuration instance, +) => { + 'value': instance.value.map((e) => e.inMicroseconds).toList(), +}; SimpleClassNullableOfDuration _$SimpleClassNullableOfDurationFromJson( - Map json) => - SimpleClassNullableOfDuration( - (json['value'] as List?) - ?.map((e) => Duration(microseconds: (e as num).toInt())), - ); + Map json, +) => SimpleClassNullableOfDuration( + (json['value'] as List?)?.map( + (e) => Duration(microseconds: (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfDurationToJson( - SimpleClassNullableOfDuration instance) => - { - 'value': instance.value?.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassNullableOfDuration instance, +) => { + 'value': instance.value?.map((e) => e.inMicroseconds).toList(), +}; SimpleClassOfDurationNullable _$SimpleClassOfDurationNullableFromJson( - Map json) => - SimpleClassOfDurationNullable( - (json['value'] as List).map( - (e) => e == null ? null : Duration(microseconds: (e as num).toInt())), - ); + Map json, +) => SimpleClassOfDurationNullable( + (json['value'] as List).map( + (e) => e == null ? null : Duration(microseconds: (e as num).toInt()), + ), +); Map _$SimpleClassOfDurationNullableToJson( - SimpleClassOfDurationNullable instance) => - { - 'value': instance.value.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassOfDurationNullable instance, +) => { + 'value': instance.value.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassNullableOfDurationNullable - _$SimpleClassNullableOfDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDurationNullable( - (json['value'] as List?)?.map((e) => - e == null ? null : Duration(microseconds: (e as num).toInt())), - ); +_$SimpleClassNullableOfDurationNullableFromJson(Map json) => + SimpleClassNullableOfDurationNullable( + (json['value'] as List?)?.map( + (e) => e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ); Map _$SimpleClassNullableOfDurationNullableToJson( - SimpleClassNullableOfDurationNullable instance) => - { - 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassNullableOfDurationNullable instance, +) => { + 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassOfDynamic _$SimpleClassOfDynamicFromJson( - Map json) => - SimpleClassOfDynamic( - json['value'] as List, - ); + Map json, +) => SimpleClassOfDynamic(json['value'] as List); Map _$SimpleClassOfDynamicToJson( - SimpleClassOfDynamic instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDynamic instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDynamic _$SimpleClassNullableOfDynamicFromJson( - Map json) => - SimpleClassNullableOfDynamic( - json['value'] as List?, - ); + Map json, +) => SimpleClassNullableOfDynamic(json['value'] as List?); Map _$SimpleClassNullableOfDynamicToJson( - SimpleClassNullableOfDynamic instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDynamic instance, +) => {'value': instance.value?.toList()}; SimpleClassOfEnumType _$SimpleClassOfEnumTypeFromJson( - Map json) => - SimpleClassOfEnumType( - (json['value'] as List) - .map((e) => $enumDecode(_$EnumTypeEnumMap, e)), - ); + Map json, +) => SimpleClassOfEnumType( + (json['value'] as List).map( + (e) => $enumDecode(_$EnumTypeEnumMap, e), + ), +); Map _$SimpleClassOfEnumTypeToJson( - SimpleClassOfEnumType instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassOfEnumType instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; const _$EnumTypeEnumMap = { EnumType.alpha: 'alpha', @@ -325,124 +304,114 @@ const _$EnumTypeEnumMap = { }; SimpleClassNullableOfEnumType _$SimpleClassNullableOfEnumTypeFromJson( - Map json) => - SimpleClassNullableOfEnumType( - (json['value'] as List?) - ?.map((e) => $enumDecode(_$EnumTypeEnumMap, e)), - ); + Map json, +) => SimpleClassNullableOfEnumType( + (json['value'] as List?)?.map( + (e) => $enumDecode(_$EnumTypeEnumMap, e), + ), +); Map _$SimpleClassNullableOfEnumTypeToJson( - SimpleClassNullableOfEnumType instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassNullableOfEnumType instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; SimpleClassOfEnumTypeNullable _$SimpleClassOfEnumTypeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeNullable( - (json['value'] as List) - .map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ); + Map json, +) => SimpleClassOfEnumTypeNullable( + (json['value'] as List).map( + (e) => $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), +); Map _$SimpleClassOfEnumTypeNullableToJson( - SimpleClassOfEnumTypeNullable instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassOfEnumTypeNullable instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassNullableOfEnumTypeNullable - _$SimpleClassNullableOfEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeNullable( - (json['value'] as List?) - ?.map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ); +_$SimpleClassNullableOfEnumTypeNullableFromJson(Map json) => + SimpleClassNullableOfEnumTypeNullable( + (json['value'] as List?)?.map( + (e) => $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), + ); Map _$SimpleClassNullableOfEnumTypeNullableToJson( - SimpleClassNullableOfEnumTypeNullable instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassNullableOfEnumTypeNullable instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassOfFromJsonDynamicParam _$SimpleClassOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfFromJsonDynamicParam( - (json['value'] as List).map(FromJsonDynamicParam.fromJson), - ); + Map json, +) => SimpleClassOfFromJsonDynamicParam( + (json['value'] as List).map(FromJsonDynamicParam.fromJson), +); Map _$SimpleClassOfFromJsonDynamicParamToJson( - SimpleClassOfFromJsonDynamicParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonDynamicParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonDynamicParam - _$SimpleClassNullableOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonDynamicParam( - (json['value'] as List?)?.map(FromJsonDynamicParam.fromJson), - ); +_$SimpleClassNullableOfFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonDynamicParam( + (json['value'] as List?)?.map(FromJsonDynamicParam.fromJson), +); Map _$SimpleClassNullableOfFromJsonDynamicParamToJson( - SimpleClassNullableOfFromJsonDynamicParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonDynamicParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfFromJsonNullableObjectParam - _$SimpleClassOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonNullableObjectParam( - (json['value'] as List) - .map(FromJsonNullableObjectParam.fromJson), - ); +_$SimpleClassOfFromJsonNullableObjectParamFromJson(Map json) => + SimpleClassOfFromJsonNullableObjectParam( + (json['value'] as List).map( + FromJsonNullableObjectParam.fromJson, + ), + ); Map _$SimpleClassOfFromJsonNullableObjectParamToJson( - SimpleClassOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonNullableObjectParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonNullableObjectParam - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonNullableObjectParam( - (json['value'] as List?) - ?.map(FromJsonNullableObjectParam.fromJson), - ); +_$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonNullableObjectParam( + (json['value'] as List?)?.map(FromJsonNullableObjectParam.fromJson), +); Map _$SimpleClassNullableOfFromJsonNullableObjectParamToJson( - SimpleClassNullableOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonNullableObjectParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfFromJsonObjectParam _$SimpleClassOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonObjectParam( - (json['value'] as List) - .map((e) => FromJsonObjectParam.fromJson(e as Object)), - ); + Map json, +) => SimpleClassOfFromJsonObjectParam( + (json['value'] as List).map( + (e) => FromJsonObjectParam.fromJson(e as Object), + ), +); Map _$SimpleClassOfFromJsonObjectParamToJson( - SimpleClassOfFromJsonObjectParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonObjectParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonObjectParam - _$SimpleClassNullableOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonObjectParam( - (json['value'] as List?) - ?.map((e) => FromJsonObjectParam.fromJson(e as Object)), - ); +_$SimpleClassNullableOfFromJsonObjectParamFromJson(Map json) => + SimpleClassNullableOfFromJsonObjectParam( + (json['value'] as List?)?.map( + (e) => FromJsonObjectParam.fromJson(e as Object), + ), + ); Map _$SimpleClassNullableOfFromJsonObjectParamToJson( - SimpleClassNullableOfFromJsonObjectParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonObjectParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => SimpleClassOfInt( @@ -450,91 +419,73 @@ SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => ); Map _$SimpleClassOfIntToJson(SimpleClassOfInt instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfInt _$SimpleClassNullableOfIntFromJson( - Map json) => - SimpleClassNullableOfInt( - (json['value'] as List?)?.map((e) => (e as num).toInt()), - ); + Map json, +) => SimpleClassNullableOfInt( + (json['value'] as List?)?.map((e) => (e as num).toInt()), +); Map _$SimpleClassNullableOfIntToJson( - SimpleClassNullableOfInt instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfInt instance, +) => {'value': instance.value?.toList()}; SimpleClassOfIntNullable _$SimpleClassOfIntNullableFromJson( - Map json) => - SimpleClassOfIntNullable( - (json['value'] as List).map((e) => (e as num?)?.toInt()), - ); + Map json, +) => SimpleClassOfIntNullable( + (json['value'] as List).map((e) => (e as num?)?.toInt()), +); Map _$SimpleClassOfIntNullableToJson( - SimpleClassOfIntNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfIntNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfIntNullable _$SimpleClassNullableOfIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntNullable( - (json['value'] as List?)?.map((e) => (e as num?)?.toInt()), - ); + Map json, +) => SimpleClassNullableOfIntNullable( + (json['value'] as List?)?.map((e) => (e as num?)?.toInt()), +); Map _$SimpleClassNullableOfIntNullableToJson( - SimpleClassNullableOfIntNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfIntNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => - SimpleClassOfNum( - (json['value'] as List).map((e) => e as num), - ); + SimpleClassOfNum((json['value'] as List).map((e) => e as num)); Map _$SimpleClassOfNumToJson(SimpleClassOfNum instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfNum _$SimpleClassNullableOfNumFromJson( - Map json) => - SimpleClassNullableOfNum( - (json['value'] as List?)?.map((e) => e as num), - ); + Map json, +) => SimpleClassNullableOfNum( + (json['value'] as List?)?.map((e) => e as num), +); Map _$SimpleClassNullableOfNumToJson( - SimpleClassNullableOfNum instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfNum instance, +) => {'value': instance.value?.toList()}; SimpleClassOfNumNullable _$SimpleClassOfNumNullableFromJson( - Map json) => - SimpleClassOfNumNullable( - (json['value'] as List).map((e) => e as num?), - ); + Map json, +) => SimpleClassOfNumNullable( + (json['value'] as List).map((e) => e as num?), +); Map _$SimpleClassOfNumNullableToJson( - SimpleClassOfNumNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfNumNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfNumNullable _$SimpleClassNullableOfNumNullableFromJson( - Map json) => - SimpleClassNullableOfNumNullable( - (json['value'] as List?)?.map((e) => e as num?), - ); + Map json, +) => SimpleClassNullableOfNumNullable( + (json['value'] as List?)?.map((e) => e as num?), +); Map _$SimpleClassNullableOfNumNullableToJson( - SimpleClassNullableOfNumNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfNumNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => SimpleClassOfObject( @@ -542,101 +493,84 @@ SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => ); Map _$SimpleClassOfObjectToJson( - SimpleClassOfObject instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfObject instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfObject _$SimpleClassNullableOfObjectFromJson( - Map json) => - SimpleClassNullableOfObject( - (json['value'] as List?)?.map((e) => e as Object), - ); + Map json, +) => SimpleClassNullableOfObject( + (json['value'] as List?)?.map((e) => e as Object), +); Map _$SimpleClassNullableOfObjectToJson( - SimpleClassNullableOfObject instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfObject instance, +) => {'value': instance.value?.toList()}; SimpleClassOfObjectNullable _$SimpleClassOfObjectNullableFromJson( - Map json) => - SimpleClassOfObjectNullable( - json['value'] as List, - ); + Map json, +) => SimpleClassOfObjectNullable(json['value'] as List); Map _$SimpleClassOfObjectNullableToJson( - SimpleClassOfObjectNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfObjectNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfObjectNullable - _$SimpleClassNullableOfObjectNullableFromJson(Map json) => - SimpleClassNullableOfObjectNullable( - json['value'] as List?, - ); +_$SimpleClassNullableOfObjectNullableFromJson(Map json) => + SimpleClassNullableOfObjectNullable(json['value'] as List?); Map _$SimpleClassNullableOfObjectNullableToJson( - SimpleClassNullableOfObjectNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfObjectNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfRecord _$SimpleClassOfRecordFromJson(Map json) => SimpleClassOfRecord( - (json['value'] as List).map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), + (json['value'] as List).map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), ); Map _$SimpleClassOfRecordToJson( - SimpleClassOfRecord instance) => - { - 'value': instance.value - .map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassOfRecord instance, +) => { + 'value': instance.value + .map((e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}) + .toList(), +}; -$Rec _$recordConvert<$Rec>( - Object? value, - $Rec Function(Map) convert, -) => +$Rec _$recordConvert<$Rec>(Object? value, $Rec Function(Map) convert) => convert(value as Map); SimpleClassNullableOfRecord _$SimpleClassNullableOfRecordFromJson( - Map json) => - SimpleClassNullableOfRecord( - (json['value'] as List?)?.map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ); + Map json, +) => SimpleClassNullableOfRecord( + (json['value'] as List?)?.map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), +); Map _$SimpleClassNullableOfRecordToJson( - SimpleClassNullableOfRecord instance) => - { - 'value': instance.value - ?.map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassNullableOfRecord instance, +) => { + 'value': instance.value + ?.map( + (e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}, + ) + .toList(), +}; SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => SimpleClassOfString( @@ -644,46 +578,38 @@ SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => ); Map _$SimpleClassOfStringToJson( - SimpleClassOfString instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfString instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfString _$SimpleClassNullableOfStringFromJson( - Map json) => - SimpleClassNullableOfString( - (json['value'] as List?)?.map((e) => e as String), - ); + Map json, +) => SimpleClassNullableOfString( + (json['value'] as List?)?.map((e) => e as String), +); Map _$SimpleClassNullableOfStringToJson( - SimpleClassNullableOfString instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfString instance, +) => {'value': instance.value?.toList()}; SimpleClassOfStringNullable _$SimpleClassOfStringNullableFromJson( - Map json) => - SimpleClassOfStringNullable( - (json['value'] as List).map((e) => e as String?), - ); + Map json, +) => SimpleClassOfStringNullable( + (json['value'] as List).map((e) => e as String?), +); Map _$SimpleClassOfStringNullableToJson( - SimpleClassOfStringNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfStringNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfStringNullable - _$SimpleClassNullableOfStringNullableFromJson(Map json) => - SimpleClassNullableOfStringNullable( - (json['value'] as List?)?.map((e) => e as String?), - ); +_$SimpleClassNullableOfStringNullableFromJson(Map json) => + SimpleClassNullableOfStringNullable( + (json['value'] as List?)?.map((e) => e as String?), + ); Map _$SimpleClassNullableOfStringNullableToJson( - SimpleClassNullableOfStringNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfStringNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfUri _$SimpleClassOfUriFromJson(Map json) => SimpleClassOfUri( @@ -696,39 +622,41 @@ Map _$SimpleClassOfUriToJson(SimpleClassOfUri instance) => }; SimpleClassNullableOfUri _$SimpleClassNullableOfUriFromJson( - Map json) => - SimpleClassNullableOfUri( - (json['value'] as List?)?.map((e) => Uri.parse(e as String)), - ); + Map json, +) => SimpleClassNullableOfUri( + (json['value'] as List?)?.map((e) => Uri.parse(e as String)), +); Map _$SimpleClassNullableOfUriToJson( - SimpleClassNullableOfUri instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfUri instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfUriNullable _$SimpleClassOfUriNullableFromJson( - Map json) => - SimpleClassOfUriNullable( - (json['value'] as List) - .map((e) => e == null ? null : Uri.parse(e as String)), - ); + Map json, +) => SimpleClassOfUriNullable( + (json['value'] as List).map( + (e) => e == null ? null : Uri.parse(e as String), + ), +); Map _$SimpleClassOfUriNullableToJson( - SimpleClassOfUriNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfUriNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfUriNullable _$SimpleClassNullableOfUriNullableFromJson( - Map json) => - SimpleClassNullableOfUriNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : Uri.parse(e as String)), - ); + Map json, +) => SimpleClassNullableOfUriNullable( + (json['value'] as List?)?.map( + (e) => e == null ? null : Uri.parse(e as String), + ), +); Map _$SimpleClassNullableOfUriNullableToJson( - SimpleClassNullableOfUriNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfUriNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; diff --git a/json_serializable/test/supported_types/input.type_list.dart b/json_serializable/test/supported_types/input.type_list.dart index 205e97195..dd23ca6dc 100644 --- a/json_serializable/test/supported_types/input.type_list.dart +++ b/json_serializable/test/supported_types/input.type_list.dart @@ -14,10 +14,7 @@ class SimpleClass { @JsonKey(defaultValue: [42, true, false, null]) List withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -32,10 +29,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: [42, true, false, null]) List? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); @@ -47,9 +41,7 @@ class SimpleClassNullable { class SimpleClassOfBigInt { final List value; - SimpleClassOfBigInt( - this.value, - ); + SimpleClassOfBigInt(this.value); factory SimpleClassOfBigInt.fromJson(Map json) => _$SimpleClassOfBigIntFromJson(json); @@ -61,9 +53,7 @@ class SimpleClassOfBigInt { class SimpleClassNullableOfBigInt { final List? value; - SimpleClassNullableOfBigInt( - this.value, - ); + SimpleClassNullableOfBigInt(this.value); factory SimpleClassNullableOfBigInt.fromJson(Map json) => _$SimpleClassNullableOfBigIntFromJson(json); @@ -75,9 +65,7 @@ class SimpleClassNullableOfBigInt { class SimpleClassOfBigIntNullable { final List value; - SimpleClassOfBigIntNullable( - this.value, - ); + SimpleClassOfBigIntNullable(this.value); factory SimpleClassOfBigIntNullable.fromJson(Map json) => _$SimpleClassOfBigIntNullableFromJson(json); @@ -89,13 +77,11 @@ class SimpleClassOfBigIntNullable { class SimpleClassNullableOfBigIntNullable { final List? value; - SimpleClassNullableOfBigIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntNullable(this.value); factory SimpleClassNullableOfBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntNullableToJson(this); @@ -105,9 +91,7 @@ class SimpleClassNullableOfBigIntNullable { class SimpleClassOfBool { final List value; - SimpleClassOfBool( - this.value, - ); + SimpleClassOfBool(this.value); factory SimpleClassOfBool.fromJson(Map json) => _$SimpleClassOfBoolFromJson(json); @@ -119,9 +103,7 @@ class SimpleClassOfBool { class SimpleClassNullableOfBool { final List? value; - SimpleClassNullableOfBool( - this.value, - ); + SimpleClassNullableOfBool(this.value); factory SimpleClassNullableOfBool.fromJson(Map json) => _$SimpleClassNullableOfBoolFromJson(json); @@ -133,9 +115,7 @@ class SimpleClassNullableOfBool { class SimpleClassOfBoolNullable { final List value; - SimpleClassOfBoolNullable( - this.value, - ); + SimpleClassOfBoolNullable(this.value); factory SimpleClassOfBoolNullable.fromJson(Map json) => _$SimpleClassOfBoolNullableFromJson(json); @@ -147,13 +127,11 @@ class SimpleClassOfBoolNullable { class SimpleClassNullableOfBoolNullable { final List? value; - SimpleClassNullableOfBoolNullable( - this.value, - ); + SimpleClassNullableOfBoolNullable(this.value); factory SimpleClassNullableOfBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBoolNullableToJson(this); @@ -163,9 +141,7 @@ class SimpleClassNullableOfBoolNullable { class SimpleClassOfDateTime { final List value; - SimpleClassOfDateTime( - this.value, - ); + SimpleClassOfDateTime(this.value); factory SimpleClassOfDateTime.fromJson(Map json) => _$SimpleClassOfDateTimeFromJson(json); @@ -177,9 +153,7 @@ class SimpleClassOfDateTime { class SimpleClassNullableOfDateTime { final List? value; - SimpleClassNullableOfDateTime( - this.value, - ); + SimpleClassNullableOfDateTime(this.value); factory SimpleClassNullableOfDateTime.fromJson(Map json) => _$SimpleClassNullableOfDateTimeFromJson(json); @@ -191,9 +165,7 @@ class SimpleClassNullableOfDateTime { class SimpleClassOfDateTimeNullable { final List value; - SimpleClassOfDateTimeNullable( - this.value, - ); + SimpleClassOfDateTimeNullable(this.value); factory SimpleClassOfDateTimeNullable.fromJson(Map json) => _$SimpleClassOfDateTimeNullableFromJson(json); @@ -205,13 +177,11 @@ class SimpleClassOfDateTimeNullable { class SimpleClassNullableOfDateTimeNullable { final List? value; - SimpleClassNullableOfDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeNullable(this.value); factory SimpleClassNullableOfDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeNullableToJson(this); @@ -221,9 +191,7 @@ class SimpleClassNullableOfDateTimeNullable { class SimpleClassOfDouble { final List value; - SimpleClassOfDouble( - this.value, - ); + SimpleClassOfDouble(this.value); factory SimpleClassOfDouble.fromJson(Map json) => _$SimpleClassOfDoubleFromJson(json); @@ -235,9 +203,7 @@ class SimpleClassOfDouble { class SimpleClassNullableOfDouble { final List? value; - SimpleClassNullableOfDouble( - this.value, - ); + SimpleClassNullableOfDouble(this.value); factory SimpleClassNullableOfDouble.fromJson(Map json) => _$SimpleClassNullableOfDoubleFromJson(json); @@ -249,9 +215,7 @@ class SimpleClassNullableOfDouble { class SimpleClassOfDoubleNullable { final List value; - SimpleClassOfDoubleNullable( - this.value, - ); + SimpleClassOfDoubleNullable(this.value); factory SimpleClassOfDoubleNullable.fromJson(Map json) => _$SimpleClassOfDoubleNullableFromJson(json); @@ -263,13 +227,11 @@ class SimpleClassOfDoubleNullable { class SimpleClassNullableOfDoubleNullable { final List? value; - SimpleClassNullableOfDoubleNullable( - this.value, - ); + SimpleClassNullableOfDoubleNullable(this.value); factory SimpleClassNullableOfDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDoubleNullableToJson(this); @@ -279,9 +241,7 @@ class SimpleClassNullableOfDoubleNullable { class SimpleClassOfDuration { final List value; - SimpleClassOfDuration( - this.value, - ); + SimpleClassOfDuration(this.value); factory SimpleClassOfDuration.fromJson(Map json) => _$SimpleClassOfDurationFromJson(json); @@ -293,9 +253,7 @@ class SimpleClassOfDuration { class SimpleClassNullableOfDuration { final List? value; - SimpleClassNullableOfDuration( - this.value, - ); + SimpleClassNullableOfDuration(this.value); factory SimpleClassNullableOfDuration.fromJson(Map json) => _$SimpleClassNullableOfDurationFromJson(json); @@ -307,9 +265,7 @@ class SimpleClassNullableOfDuration { class SimpleClassOfDurationNullable { final List value; - SimpleClassOfDurationNullable( - this.value, - ); + SimpleClassOfDurationNullable(this.value); factory SimpleClassOfDurationNullable.fromJson(Map json) => _$SimpleClassOfDurationNullableFromJson(json); @@ -321,13 +277,11 @@ class SimpleClassOfDurationNullable { class SimpleClassNullableOfDurationNullable { final List? value; - SimpleClassNullableOfDurationNullable( - this.value, - ); + SimpleClassNullableOfDurationNullable(this.value); factory SimpleClassNullableOfDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDurationNullableToJson(this); @@ -337,9 +291,7 @@ class SimpleClassNullableOfDurationNullable { class SimpleClassOfDynamic { final List value; - SimpleClassOfDynamic( - this.value, - ); + SimpleClassOfDynamic(this.value); factory SimpleClassOfDynamic.fromJson(Map json) => _$SimpleClassOfDynamicFromJson(json); @@ -351,9 +303,7 @@ class SimpleClassOfDynamic { class SimpleClassNullableOfDynamic { final List? value; - SimpleClassNullableOfDynamic( - this.value, - ); + SimpleClassNullableOfDynamic(this.value); factory SimpleClassNullableOfDynamic.fromJson(Map json) => _$SimpleClassNullableOfDynamicFromJson(json); @@ -365,9 +315,7 @@ class SimpleClassNullableOfDynamic { class SimpleClassOfEnumType { final List value; - SimpleClassOfEnumType( - this.value, - ); + SimpleClassOfEnumType(this.value); factory SimpleClassOfEnumType.fromJson(Map json) => _$SimpleClassOfEnumTypeFromJson(json); @@ -379,9 +327,7 @@ class SimpleClassOfEnumType { class SimpleClassNullableOfEnumType { final List? value; - SimpleClassNullableOfEnumType( - this.value, - ); + SimpleClassNullableOfEnumType(this.value); factory SimpleClassNullableOfEnumType.fromJson(Map json) => _$SimpleClassNullableOfEnumTypeFromJson(json); @@ -393,9 +339,7 @@ class SimpleClassNullableOfEnumType { class SimpleClassOfEnumTypeNullable { final List value; - SimpleClassOfEnumTypeNullable( - this.value, - ); + SimpleClassOfEnumTypeNullable(this.value); factory SimpleClassOfEnumTypeNullable.fromJson(Map json) => _$SimpleClassOfEnumTypeNullableFromJson(json); @@ -407,13 +351,11 @@ class SimpleClassOfEnumTypeNullable { class SimpleClassNullableOfEnumTypeNullable { final List? value; - SimpleClassNullableOfEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeNullable(this.value); factory SimpleClassNullableOfEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeNullableToJson(this); @@ -423,13 +365,11 @@ class SimpleClassNullableOfEnumTypeNullable { class SimpleClassOfFromJsonDynamicParam { final List value; - SimpleClassOfFromJsonDynamicParam( - this.value, - ); + SimpleClassOfFromJsonDynamicParam(this.value); factory SimpleClassOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonDynamicParamToJson(this); @@ -439,13 +379,11 @@ class SimpleClassOfFromJsonDynamicParam { class SimpleClassNullableOfFromJsonDynamicParam { final List? value; - SimpleClassNullableOfFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfFromJsonDynamicParam(this.value); factory SimpleClassNullableOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonDynamicParamToJson(this); @@ -455,13 +393,11 @@ class SimpleClassNullableOfFromJsonDynamicParam { class SimpleClassOfFromJsonNullableObjectParam { final List value; - SimpleClassOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfFromJsonNullableObjectParam(this.value); factory SimpleClassOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonNullableObjectParamToJson(this); @@ -471,13 +407,11 @@ class SimpleClassOfFromJsonNullableObjectParam { class SimpleClassNullableOfFromJsonNullableObjectParam { final List? value; - SimpleClassNullableOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonNullableObjectParamToJson(this); @@ -487,13 +421,11 @@ class SimpleClassNullableOfFromJsonNullableObjectParam { class SimpleClassOfFromJsonObjectParam { final List value; - SimpleClassOfFromJsonObjectParam( - this.value, - ); + SimpleClassOfFromJsonObjectParam(this.value); factory SimpleClassOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonObjectParamToJson(this); @@ -503,13 +435,11 @@ class SimpleClassOfFromJsonObjectParam { class SimpleClassNullableOfFromJsonObjectParam { final List? value; - SimpleClassNullableOfFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonObjectParam(this.value); factory SimpleClassNullableOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonObjectParamToJson(this); @@ -519,9 +449,7 @@ class SimpleClassNullableOfFromJsonObjectParam { class SimpleClassOfInt { final List value; - SimpleClassOfInt( - this.value, - ); + SimpleClassOfInt(this.value); factory SimpleClassOfInt.fromJson(Map json) => _$SimpleClassOfIntFromJson(json); @@ -533,9 +461,7 @@ class SimpleClassOfInt { class SimpleClassNullableOfInt { final List? value; - SimpleClassNullableOfInt( - this.value, - ); + SimpleClassNullableOfInt(this.value); factory SimpleClassNullableOfInt.fromJson(Map json) => _$SimpleClassNullableOfIntFromJson(json); @@ -547,9 +473,7 @@ class SimpleClassNullableOfInt { class SimpleClassOfIntNullable { final List value; - SimpleClassOfIntNullable( - this.value, - ); + SimpleClassOfIntNullable(this.value); factory SimpleClassOfIntNullable.fromJson(Map json) => _$SimpleClassOfIntNullableFromJson(json); @@ -561,13 +485,11 @@ class SimpleClassOfIntNullable { class SimpleClassNullableOfIntNullable { final List? value; - SimpleClassNullableOfIntNullable( - this.value, - ); + SimpleClassNullableOfIntNullable(this.value); factory SimpleClassNullableOfIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntNullableToJson(this); @@ -577,9 +499,7 @@ class SimpleClassNullableOfIntNullable { class SimpleClassOfNum { final List value; - SimpleClassOfNum( - this.value, - ); + SimpleClassOfNum(this.value); factory SimpleClassOfNum.fromJson(Map json) => _$SimpleClassOfNumFromJson(json); @@ -591,9 +511,7 @@ class SimpleClassOfNum { class SimpleClassNullableOfNum { final List? value; - SimpleClassNullableOfNum( - this.value, - ); + SimpleClassNullableOfNum(this.value); factory SimpleClassNullableOfNum.fromJson(Map json) => _$SimpleClassNullableOfNumFromJson(json); @@ -605,9 +523,7 @@ class SimpleClassNullableOfNum { class SimpleClassOfNumNullable { final List value; - SimpleClassOfNumNullable( - this.value, - ); + SimpleClassOfNumNullable(this.value); factory SimpleClassOfNumNullable.fromJson(Map json) => _$SimpleClassOfNumNullableFromJson(json); @@ -619,13 +535,11 @@ class SimpleClassOfNumNullable { class SimpleClassNullableOfNumNullable { final List? value; - SimpleClassNullableOfNumNullable( - this.value, - ); + SimpleClassNullableOfNumNullable(this.value); factory SimpleClassNullableOfNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfNumNullableToJson(this); @@ -635,9 +549,7 @@ class SimpleClassNullableOfNumNullable { class SimpleClassOfObject { final List value; - SimpleClassOfObject( - this.value, - ); + SimpleClassOfObject(this.value); factory SimpleClassOfObject.fromJson(Map json) => _$SimpleClassOfObjectFromJson(json); @@ -649,9 +561,7 @@ class SimpleClassOfObject { class SimpleClassNullableOfObject { final List? value; - SimpleClassNullableOfObject( - this.value, - ); + SimpleClassNullableOfObject(this.value); factory SimpleClassNullableOfObject.fromJson(Map json) => _$SimpleClassNullableOfObjectFromJson(json); @@ -663,9 +573,7 @@ class SimpleClassNullableOfObject { class SimpleClassOfObjectNullable { final List value; - SimpleClassOfObjectNullable( - this.value, - ); + SimpleClassOfObjectNullable(this.value); factory SimpleClassOfObjectNullable.fromJson(Map json) => _$SimpleClassOfObjectNullableFromJson(json); @@ -677,13 +585,11 @@ class SimpleClassOfObjectNullable { class SimpleClassNullableOfObjectNullable { final List? value; - SimpleClassNullableOfObjectNullable( - this.value, - ); + SimpleClassNullableOfObjectNullable(this.value); factory SimpleClassNullableOfObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectNullableToJson(this); @@ -693,9 +599,7 @@ class SimpleClassNullableOfObjectNullable { class SimpleClassOfRecord { final List<(int, String, {bool truth})> value; - SimpleClassOfRecord( - this.value, - ); + SimpleClassOfRecord(this.value); factory SimpleClassOfRecord.fromJson(Map json) => _$SimpleClassOfRecordFromJson(json); @@ -707,9 +611,7 @@ class SimpleClassOfRecord { class SimpleClassNullableOfRecord { final List<(int, String, {bool truth})>? value; - SimpleClassNullableOfRecord( - this.value, - ); + SimpleClassNullableOfRecord(this.value); factory SimpleClassNullableOfRecord.fromJson(Map json) => _$SimpleClassNullableOfRecordFromJson(json); @@ -721,9 +623,7 @@ class SimpleClassNullableOfRecord { class SimpleClassOfString { final List value; - SimpleClassOfString( - this.value, - ); + SimpleClassOfString(this.value); factory SimpleClassOfString.fromJson(Map json) => _$SimpleClassOfStringFromJson(json); @@ -735,9 +635,7 @@ class SimpleClassOfString { class SimpleClassNullableOfString { final List? value; - SimpleClassNullableOfString( - this.value, - ); + SimpleClassNullableOfString(this.value); factory SimpleClassNullableOfString.fromJson(Map json) => _$SimpleClassNullableOfStringFromJson(json); @@ -749,9 +647,7 @@ class SimpleClassNullableOfString { class SimpleClassOfStringNullable { final List value; - SimpleClassOfStringNullable( - this.value, - ); + SimpleClassOfStringNullable(this.value); factory SimpleClassOfStringNullable.fromJson(Map json) => _$SimpleClassOfStringNullableFromJson(json); @@ -763,13 +659,11 @@ class SimpleClassOfStringNullable { class SimpleClassNullableOfStringNullable { final List? value; - SimpleClassNullableOfStringNullable( - this.value, - ); + SimpleClassNullableOfStringNullable(this.value); factory SimpleClassNullableOfStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringNullableToJson(this); @@ -779,9 +673,7 @@ class SimpleClassNullableOfStringNullable { class SimpleClassOfUri { final List value; - SimpleClassOfUri( - this.value, - ); + SimpleClassOfUri(this.value); factory SimpleClassOfUri.fromJson(Map json) => _$SimpleClassOfUriFromJson(json); @@ -793,9 +685,7 @@ class SimpleClassOfUri { class SimpleClassNullableOfUri { final List? value; - SimpleClassNullableOfUri( - this.value, - ); + SimpleClassNullableOfUri(this.value); factory SimpleClassNullableOfUri.fromJson(Map json) => _$SimpleClassNullableOfUriFromJson(json); @@ -807,9 +697,7 @@ class SimpleClassNullableOfUri { class SimpleClassOfUriNullable { final List value; - SimpleClassOfUriNullable( - this.value, - ); + SimpleClassOfUriNullable(this.value); factory SimpleClassOfUriNullable.fromJson(Map json) => _$SimpleClassOfUriNullableFromJson(json); @@ -821,13 +709,11 @@ class SimpleClassOfUriNullable { class SimpleClassNullableOfUriNullable { final List? value; - SimpleClassNullableOfUriNullable( - this.value, - ); + SimpleClassNullableOfUriNullable(this.value); factory SimpleClassNullableOfUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriNullableToJson(this); diff --git a/json_serializable/test/supported_types/input.type_list.g.dart b/json_serializable/test/supported_types/input.type_list.g.dart index f86a6d00c..c89d184e0 100644 --- a/json_serializable/test/supported_types/input.type_list.g.dart +++ b/json_serializable/test/supported_types/input.type_list.g.dart @@ -9,9 +9,9 @@ part of 'input.type_list.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as List, - json['withDefault'] as List? ?? [42, true, false, null], - ); + json['value'] as List, + json['withDefault'] as List? ?? [42, true, false, null], +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,11 +26,11 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => SimpleClassOfBigInt( @@ -40,52 +40,52 @@ SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => ); Map _$SimpleClassOfBigIntToJson( - SimpleClassOfBigInt instance) => - { - 'value': instance.value.map((e) => e.toString()).toList(), - }; + SimpleClassOfBigInt instance, +) => { + 'value': instance.value.map((e) => e.toString()).toList(), +}; SimpleClassNullableOfBigInt _$SimpleClassNullableOfBigIntFromJson( - Map json) => - SimpleClassNullableOfBigInt( - (json['value'] as List?) - ?.map((e) => BigInt.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassNullableOfBigInt( + (json['value'] as List?) + ?.map((e) => BigInt.parse(e as String)) + .toList(), +); Map _$SimpleClassNullableOfBigIntToJson( - SimpleClassNullableOfBigInt instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfBigInt instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfBigIntNullable _$SimpleClassOfBigIntNullableFromJson( - Map json) => - SimpleClassOfBigIntNullable( - (json['value'] as List) - .map((e) => e == null ? null : BigInt.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassOfBigIntNullable( + (json['value'] as List) + .map((e) => e == null ? null : BigInt.parse(e as String)) + .toList(), +); Map _$SimpleClassOfBigIntNullableToJson( - SimpleClassOfBigIntNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfBigIntNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfBigIntNullable - _$SimpleClassNullableOfBigIntNullableFromJson(Map json) => - SimpleClassNullableOfBigIntNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : BigInt.parse(e as String)) - .toList(), - ); +_$SimpleClassNullableOfBigIntNullableFromJson(Map json) => + SimpleClassNullableOfBigIntNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : BigInt.parse(e as String)) + .toList(), + ); Map _$SimpleClassNullableOfBigIntNullableToJson( - SimpleClassNullableOfBigIntNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfBigIntNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => SimpleClassOfBool( @@ -93,102 +93,93 @@ SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => ); Map _$SimpleClassOfBoolToJson(SimpleClassOfBool instance) => - { - 'value': instance.value, - }; + {'value': instance.value}; SimpleClassNullableOfBool _$SimpleClassNullableOfBoolFromJson( - Map json) => - SimpleClassNullableOfBool( - (json['value'] as List?)?.map((e) => e as bool).toList(), - ); + Map json, +) => SimpleClassNullableOfBool( + (json['value'] as List?)?.map((e) => e as bool).toList(), +); Map _$SimpleClassNullableOfBoolToJson( - SimpleClassNullableOfBool instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfBool instance, +) => {'value': instance.value}; SimpleClassOfBoolNullable _$SimpleClassOfBoolNullableFromJson( - Map json) => - SimpleClassOfBoolNullable( - (json['value'] as List).map((e) => e as bool?).toList(), - ); + Map json, +) => SimpleClassOfBoolNullable( + (json['value'] as List).map((e) => e as bool?).toList(), +); Map _$SimpleClassOfBoolNullableToJson( - SimpleClassOfBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfBoolNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfBoolNullable _$SimpleClassNullableOfBoolNullableFromJson( - Map json) => - SimpleClassNullableOfBoolNullable( - (json['value'] as List?)?.map((e) => e as bool?).toList(), - ); + Map json, +) => SimpleClassNullableOfBoolNullable( + (json['value'] as List?)?.map((e) => e as bool?).toList(), +); Map _$SimpleClassNullableOfBoolNullableToJson( - SimpleClassNullableOfBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfBoolNullable instance, +) => {'value': instance.value}; SimpleClassOfDateTime _$SimpleClassOfDateTimeFromJson( - Map json) => - SimpleClassOfDateTime( - (json['value'] as List) - .map((e) => DateTime.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassOfDateTime( + (json['value'] as List) + .map((e) => DateTime.parse(e as String)) + .toList(), +); Map _$SimpleClassOfDateTimeToJson( - SimpleClassOfDateTime instance) => - { - 'value': instance.value.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassOfDateTime instance, +) => { + 'value': instance.value.map((e) => e.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTime _$SimpleClassNullableOfDateTimeFromJson( - Map json) => - SimpleClassNullableOfDateTime( - (json['value'] as List?) - ?.map((e) => DateTime.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassNullableOfDateTime( + (json['value'] as List?) + ?.map((e) => DateTime.parse(e as String)) + .toList(), +); Map _$SimpleClassNullableOfDateTimeToJson( - SimpleClassNullableOfDateTime instance) => - { - 'value': instance.value?.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTime instance, +) => { + 'value': instance.value?.map((e) => e.toIso8601String()).toList(), +}; SimpleClassOfDateTimeNullable _$SimpleClassOfDateTimeNullableFromJson( - Map json) => - SimpleClassOfDateTimeNullable( - (json['value'] as List) - .map((e) => e == null ? null : DateTime.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassOfDateTimeNullable( + (json['value'] as List) + .map((e) => e == null ? null : DateTime.parse(e as String)) + .toList(), +); Map _$SimpleClassOfDateTimeNullableToJson( - SimpleClassOfDateTimeNullable instance) => - { - 'value': instance.value.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassOfDateTimeNullable instance, +) => { + 'value': instance.value.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTimeNullable - _$SimpleClassNullableOfDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : DateTime.parse(e as String)) - .toList(), - ); +_$SimpleClassNullableOfDateTimeNullableFromJson(Map json) => + SimpleClassNullableOfDateTimeNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : DateTime.parse(e as String)) + .toList(), + ); Map _$SimpleClassNullableOfDateTimeNullableToJson( - SimpleClassNullableOfDateTimeNullable instance) => - { - 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTimeNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => SimpleClassOfDouble( @@ -198,149 +189,129 @@ SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => ); Map _$SimpleClassOfDoubleToJson( - SimpleClassOfDouble instance) => - { - 'value': instance.value, - }; + SimpleClassOfDouble instance, +) => {'value': instance.value}; SimpleClassNullableOfDouble _$SimpleClassNullableOfDoubleFromJson( - Map json) => - SimpleClassNullableOfDouble( - (json['value'] as List?) - ?.map((e) => (e as num).toDouble()) - .toList(), - ); + Map json, +) => SimpleClassNullableOfDouble( + (json['value'] as List?)?.map((e) => (e as num).toDouble()).toList(), +); Map _$SimpleClassNullableOfDoubleToJson( - SimpleClassNullableOfDouble instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDouble instance, +) => {'value': instance.value}; SimpleClassOfDoubleNullable _$SimpleClassOfDoubleNullableFromJson( - Map json) => - SimpleClassOfDoubleNullable( - (json['value'] as List) - .map((e) => (e as num?)?.toDouble()) - .toList(), - ); + Map json, +) => SimpleClassOfDoubleNullable( + (json['value'] as List).map((e) => (e as num?)?.toDouble()).toList(), +); Map _$SimpleClassOfDoubleNullableToJson( - SimpleClassOfDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDoubleNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDoubleNullable - _$SimpleClassNullableOfDoubleNullableFromJson(Map json) => - SimpleClassNullableOfDoubleNullable( - (json['value'] as List?) - ?.map((e) => (e as num?)?.toDouble()) - .toList(), - ); +_$SimpleClassNullableOfDoubleNullableFromJson(Map json) => + SimpleClassNullableOfDoubleNullable( + (json['value'] as List?) + ?.map((e) => (e as num?)?.toDouble()) + .toList(), + ); Map _$SimpleClassNullableOfDoubleNullableToJson( - SimpleClassNullableOfDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDoubleNullable instance, +) => {'value': instance.value}; SimpleClassOfDuration _$SimpleClassOfDurationFromJson( - Map json) => - SimpleClassOfDuration( - (json['value'] as List) - .map((e) => Duration(microseconds: (e as num).toInt())) - .toList(), - ); + Map json, +) => SimpleClassOfDuration( + (json['value'] as List) + .map((e) => Duration(microseconds: (e as num).toInt())) + .toList(), +); Map _$SimpleClassOfDurationToJson( - SimpleClassOfDuration instance) => - { - 'value': instance.value.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassOfDuration instance, +) => { + 'value': instance.value.map((e) => e.inMicroseconds).toList(), +}; SimpleClassNullableOfDuration _$SimpleClassNullableOfDurationFromJson( - Map json) => - SimpleClassNullableOfDuration( - (json['value'] as List?) - ?.map((e) => Duration(microseconds: (e as num).toInt())) - .toList(), - ); + Map json, +) => SimpleClassNullableOfDuration( + (json['value'] as List?) + ?.map((e) => Duration(microseconds: (e as num).toInt())) + .toList(), +); Map _$SimpleClassNullableOfDurationToJson( - SimpleClassNullableOfDuration instance) => - { - 'value': instance.value?.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassNullableOfDuration instance, +) => { + 'value': instance.value?.map((e) => e.inMicroseconds).toList(), +}; SimpleClassOfDurationNullable _$SimpleClassOfDurationNullableFromJson( - Map json) => - SimpleClassOfDurationNullable( - (json['value'] as List) - .map((e) => - e == null ? null : Duration(microseconds: (e as num).toInt())) - .toList(), - ); + Map json, +) => SimpleClassOfDurationNullable( + (json['value'] as List) + .map((e) => e == null ? null : Duration(microseconds: (e as num).toInt())) + .toList(), +); Map _$SimpleClassOfDurationNullableToJson( - SimpleClassOfDurationNullable instance) => - { - 'value': instance.value.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassOfDurationNullable instance, +) => { + 'value': instance.value.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassNullableOfDurationNullable - _$SimpleClassNullableOfDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDurationNullable( - (json['value'] as List?) - ?.map((e) => - e == null ? null : Duration(microseconds: (e as num).toInt())) - .toList(), - ); +_$SimpleClassNullableOfDurationNullableFromJson(Map json) => + SimpleClassNullableOfDurationNullable( + (json['value'] as List?) + ?.map( + (e) => + e == null ? null : Duration(microseconds: (e as num).toInt()), + ) + .toList(), + ); Map _$SimpleClassNullableOfDurationNullableToJson( - SimpleClassNullableOfDurationNullable instance) => - { - 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassNullableOfDurationNullable instance, +) => { + 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassOfDynamic _$SimpleClassOfDynamicFromJson( - Map json) => - SimpleClassOfDynamic( - json['value'] as List, - ); + Map json, +) => SimpleClassOfDynamic(json['value'] as List); Map _$SimpleClassOfDynamicToJson( - SimpleClassOfDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamic instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamic _$SimpleClassNullableOfDynamicFromJson( - Map json) => - SimpleClassNullableOfDynamic( - json['value'] as List?, - ); + Map json, +) => SimpleClassNullableOfDynamic(json['value'] as List?); Map _$SimpleClassNullableOfDynamicToJson( - SimpleClassNullableOfDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamic instance, +) => {'value': instance.value}; SimpleClassOfEnumType _$SimpleClassOfEnumTypeFromJson( - Map json) => - SimpleClassOfEnumType( - (json['value'] as List) - .map((e) => $enumDecode(_$EnumTypeEnumMap, e)) - .toList(), - ); + Map json, +) => SimpleClassOfEnumType( + (json['value'] as List) + .map((e) => $enumDecode(_$EnumTypeEnumMap, e)) + .toList(), +); Map _$SimpleClassOfEnumTypeToJson( - SimpleClassOfEnumType instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassOfEnumType instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; const _$EnumTypeEnumMap = { EnumType.alpha: 'alpha', @@ -350,135 +321,118 @@ const _$EnumTypeEnumMap = { }; SimpleClassNullableOfEnumType _$SimpleClassNullableOfEnumTypeFromJson( - Map json) => - SimpleClassNullableOfEnumType( - (json['value'] as List?) - ?.map((e) => $enumDecode(_$EnumTypeEnumMap, e)) - .toList(), - ); + Map json, +) => SimpleClassNullableOfEnumType( + (json['value'] as List?) + ?.map((e) => $enumDecode(_$EnumTypeEnumMap, e)) + .toList(), +); Map _$SimpleClassNullableOfEnumTypeToJson( - SimpleClassNullableOfEnumType instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassNullableOfEnumType instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; SimpleClassOfEnumTypeNullable _$SimpleClassOfEnumTypeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeNullable( - (json['value'] as List) - .map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) - .toList(), - ); + Map json, +) => SimpleClassOfEnumTypeNullable( + (json['value'] as List) + .map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) + .toList(), +); Map _$SimpleClassOfEnumTypeNullableToJson( - SimpleClassOfEnumTypeNullable instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassOfEnumTypeNullable instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassNullableOfEnumTypeNullable - _$SimpleClassNullableOfEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeNullable( - (json['value'] as List?) - ?.map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) - .toList(), - ); +_$SimpleClassNullableOfEnumTypeNullableFromJson(Map json) => + SimpleClassNullableOfEnumTypeNullable( + (json['value'] as List?) + ?.map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) + .toList(), + ); Map _$SimpleClassNullableOfEnumTypeNullableToJson( - SimpleClassNullableOfEnumTypeNullable instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassNullableOfEnumTypeNullable instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassOfFromJsonDynamicParam _$SimpleClassOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfFromJsonDynamicParam( - (json['value'] as List) - .map(FromJsonDynamicParam.fromJson) - .toList(), - ); + Map json, +) => SimpleClassOfFromJsonDynamicParam( + (json['value'] as List).map(FromJsonDynamicParam.fromJson).toList(), +); Map _$SimpleClassOfFromJsonDynamicParamToJson( - SimpleClassOfFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassNullableOfFromJsonDynamicParam - _$SimpleClassNullableOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonDynamicParam( - (json['value'] as List?) - ?.map(FromJsonDynamicParam.fromJson) - .toList(), - ); +_$SimpleClassNullableOfFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonDynamicParam( + (json['value'] as List?) + ?.map(FromJsonDynamicParam.fromJson) + .toList(), +); Map _$SimpleClassNullableOfFromJsonDynamicParamToJson( - SimpleClassNullableOfFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassOfFromJsonNullableObjectParam - _$SimpleClassOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonNullableObjectParam( - (json['value'] as List) - .map(FromJsonNullableObjectParam.fromJson) - .toList(), - ); +_$SimpleClassOfFromJsonNullableObjectParamFromJson(Map json) => + SimpleClassOfFromJsonNullableObjectParam( + (json['value'] as List) + .map(FromJsonNullableObjectParam.fromJson) + .toList(), + ); Map _$SimpleClassOfFromJsonNullableObjectParamToJson( - SimpleClassOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfFromJsonNullableObjectParam - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonNullableObjectParam( - (json['value'] as List?) - ?.map(FromJsonNullableObjectParam.fromJson) - .toList(), - ); +_$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonNullableObjectParam( + (json['value'] as List?) + ?.map(FromJsonNullableObjectParam.fromJson) + .toList(), +); Map _$SimpleClassNullableOfFromJsonNullableObjectParamToJson( - SimpleClassNullableOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassOfFromJsonObjectParam _$SimpleClassOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonObjectParam( - (json['value'] as List) - .map((e) => FromJsonObjectParam.fromJson(e as Object)) - .toList(), - ); + Map json, +) => SimpleClassOfFromJsonObjectParam( + (json['value'] as List) + .map((e) => FromJsonObjectParam.fromJson(e as Object)) + .toList(), +); Map _$SimpleClassOfFromJsonObjectParamToJson( - SimpleClassOfFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfFromJsonObjectParam - _$SimpleClassNullableOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonObjectParam( - (json['value'] as List?) - ?.map((e) => FromJsonObjectParam.fromJson(e as Object)) - .toList(), - ); +_$SimpleClassNullableOfFromJsonObjectParamFromJson(Map json) => + SimpleClassNullableOfFromJsonObjectParam( + (json['value'] as List?) + ?.map((e) => FromJsonObjectParam.fromJson(e as Object)) + .toList(), + ); Map _$SimpleClassNullableOfFromJsonObjectParamToJson( - SimpleClassNullableOfFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => SimpleClassOfInt( @@ -486,51 +440,37 @@ SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => ); Map _$SimpleClassOfIntToJson(SimpleClassOfInt instance) => - { - 'value': instance.value, - }; + {'value': instance.value}; SimpleClassNullableOfInt _$SimpleClassNullableOfIntFromJson( - Map json) => - SimpleClassNullableOfInt( - (json['value'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - ); + Map json, +) => SimpleClassNullableOfInt( + (json['value'] as List?)?.map((e) => (e as num).toInt()).toList(), +); Map _$SimpleClassNullableOfIntToJson( - SimpleClassNullableOfInt instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfInt instance, +) => {'value': instance.value}; SimpleClassOfIntNullable _$SimpleClassOfIntNullableFromJson( - Map json) => - SimpleClassOfIntNullable( - (json['value'] as List) - .map((e) => (e as num?)?.toInt()) - .toList(), - ); + Map json, +) => SimpleClassOfIntNullable( + (json['value'] as List).map((e) => (e as num?)?.toInt()).toList(), +); Map _$SimpleClassOfIntNullableToJson( - SimpleClassOfIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfIntNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfIntNullable _$SimpleClassNullableOfIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntNullable( - (json['value'] as List?) - ?.map((e) => (e as num?)?.toInt()) - .toList(), - ); + Map json, +) => SimpleClassNullableOfIntNullable( + (json['value'] as List?)?.map((e) => (e as num?)?.toInt()).toList(), +); Map _$SimpleClassNullableOfIntNullableToJson( - SimpleClassNullableOfIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfIntNullable instance, +) => {'value': instance.value}; SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => SimpleClassOfNum( @@ -538,45 +478,37 @@ SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => ); Map _$SimpleClassOfNumToJson(SimpleClassOfNum instance) => - { - 'value': instance.value, - }; + {'value': instance.value}; SimpleClassNullableOfNum _$SimpleClassNullableOfNumFromJson( - Map json) => - SimpleClassNullableOfNum( - (json['value'] as List?)?.map((e) => e as num).toList(), - ); + Map json, +) => SimpleClassNullableOfNum( + (json['value'] as List?)?.map((e) => e as num).toList(), +); Map _$SimpleClassNullableOfNumToJson( - SimpleClassNullableOfNum instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfNum instance, +) => {'value': instance.value}; SimpleClassOfNumNullable _$SimpleClassOfNumNullableFromJson( - Map json) => - SimpleClassOfNumNullable( - (json['value'] as List).map((e) => e as num?).toList(), - ); + Map json, +) => SimpleClassOfNumNullable( + (json['value'] as List).map((e) => e as num?).toList(), +); Map _$SimpleClassOfNumNullableToJson( - SimpleClassOfNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfNumNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfNumNullable _$SimpleClassNullableOfNumNullableFromJson( - Map json) => - SimpleClassNullableOfNumNullable( - (json['value'] as List?)?.map((e) => e as num?).toList(), - ); + Map json, +) => SimpleClassNullableOfNumNullable( + (json['value'] as List?)?.map((e) => e as num?).toList(), +); Map _$SimpleClassNullableOfNumNullableToJson( - SimpleClassNullableOfNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfNumNullable instance, +) => {'value': instance.value}; SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => SimpleClassOfObject( @@ -584,105 +516,88 @@ SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => ); Map _$SimpleClassOfObjectToJson( - SimpleClassOfObject instance) => - { - 'value': instance.value, - }; + SimpleClassOfObject instance, +) => {'value': instance.value}; SimpleClassNullableOfObject _$SimpleClassNullableOfObjectFromJson( - Map json) => - SimpleClassNullableOfObject( - (json['value'] as List?)?.map((e) => e as Object).toList(), - ); + Map json, +) => SimpleClassNullableOfObject( + (json['value'] as List?)?.map((e) => e as Object).toList(), +); Map _$SimpleClassNullableOfObjectToJson( - SimpleClassNullableOfObject instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObject instance, +) => {'value': instance.value}; SimpleClassOfObjectNullable _$SimpleClassOfObjectNullableFromJson( - Map json) => - SimpleClassOfObjectNullable( - json['value'] as List, - ); + Map json, +) => SimpleClassOfObjectNullable(json['value'] as List); Map _$SimpleClassOfObjectNullableToJson( - SimpleClassOfObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectNullable - _$SimpleClassNullableOfObjectNullableFromJson(Map json) => - SimpleClassNullableOfObjectNullable( - json['value'] as List?, - ); +_$SimpleClassNullableOfObjectNullableFromJson(Map json) => + SimpleClassNullableOfObjectNullable(json['value'] as List?); Map _$SimpleClassNullableOfObjectNullableToJson( - SimpleClassNullableOfObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectNullable instance, +) => {'value': instance.value}; SimpleClassOfRecord _$SimpleClassOfRecordFromJson(Map json) => SimpleClassOfRecord( (json['value'] as List) - .map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )) + .map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ) .toList(), ); Map _$SimpleClassOfRecordToJson( - SimpleClassOfRecord instance) => - { - 'value': instance.value - .map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassOfRecord instance, +) => { + 'value': instance.value + .map((e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}) + .toList(), +}; -$Rec _$recordConvert<$Rec>( - Object? value, - $Rec Function(Map) convert, -) => +$Rec _$recordConvert<$Rec>(Object? value, $Rec Function(Map) convert) => convert(value as Map); SimpleClassNullableOfRecord _$SimpleClassNullableOfRecordFromJson( - Map json) => - SimpleClassNullableOfRecord( - (json['value'] as List?) - ?.map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )) - .toList(), - ); + Map json, +) => SimpleClassNullableOfRecord( + (json['value'] as List?) + ?.map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ) + .toList(), +); Map _$SimpleClassNullableOfRecordToJson( - SimpleClassNullableOfRecord instance) => - { - 'value': instance.value - ?.map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassNullableOfRecord instance, +) => { + 'value': instance.value + ?.map( + (e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}, + ) + .toList(), +}; SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => SimpleClassOfString( @@ -690,46 +605,38 @@ SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => ); Map _$SimpleClassOfStringToJson( - SimpleClassOfString instance) => - { - 'value': instance.value, - }; + SimpleClassOfString instance, +) => {'value': instance.value}; SimpleClassNullableOfString _$SimpleClassNullableOfStringFromJson( - Map json) => - SimpleClassNullableOfString( - (json['value'] as List?)?.map((e) => e as String).toList(), - ); + Map json, +) => SimpleClassNullableOfString( + (json['value'] as List?)?.map((e) => e as String).toList(), +); Map _$SimpleClassNullableOfStringToJson( - SimpleClassNullableOfString instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfString instance, +) => {'value': instance.value}; SimpleClassOfStringNullable _$SimpleClassOfStringNullableFromJson( - Map json) => - SimpleClassOfStringNullable( - (json['value'] as List).map((e) => e as String?).toList(), - ); + Map json, +) => SimpleClassOfStringNullable( + (json['value'] as List).map((e) => e as String?).toList(), +); Map _$SimpleClassOfStringNullableToJson( - SimpleClassOfStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringNullable - _$SimpleClassNullableOfStringNullableFromJson(Map json) => - SimpleClassNullableOfStringNullable( - (json['value'] as List?)?.map((e) => e as String?).toList(), - ); +_$SimpleClassNullableOfStringNullableFromJson(Map json) => + SimpleClassNullableOfStringNullable( + (json['value'] as List?)?.map((e) => e as String?).toList(), + ); Map _$SimpleClassNullableOfStringNullableToJson( - SimpleClassNullableOfStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringNullable instance, +) => {'value': instance.value}; SimpleClassOfUri _$SimpleClassOfUriFromJson(Map json) => SimpleClassOfUri( @@ -744,43 +651,43 @@ Map _$SimpleClassOfUriToJson(SimpleClassOfUri instance) => }; SimpleClassNullableOfUri _$SimpleClassNullableOfUriFromJson( - Map json) => - SimpleClassNullableOfUri( - (json['value'] as List?) - ?.map((e) => Uri.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassNullableOfUri( + (json['value'] as List?) + ?.map((e) => Uri.parse(e as String)) + .toList(), +); Map _$SimpleClassNullableOfUriToJson( - SimpleClassNullableOfUri instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfUri instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfUriNullable _$SimpleClassOfUriNullableFromJson( - Map json) => - SimpleClassOfUriNullable( - (json['value'] as List) - .map((e) => e == null ? null : Uri.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassOfUriNullable( + (json['value'] as List) + .map((e) => e == null ? null : Uri.parse(e as String)) + .toList(), +); Map _$SimpleClassOfUriNullableToJson( - SimpleClassOfUriNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfUriNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfUriNullable _$SimpleClassNullableOfUriNullableFromJson( - Map json) => - SimpleClassNullableOfUriNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : Uri.parse(e as String)) - .toList(), - ); + Map json, +) => SimpleClassNullableOfUriNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : Uri.parse(e as String)) + .toList(), +); Map _$SimpleClassNullableOfUriNullableToJson( - SimpleClassNullableOfUriNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfUriNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; diff --git a/json_serializable/test/supported_types/input.type_map.dart b/json_serializable/test/supported_types/input.type_map.dart index 985dbe125..59d1a21d0 100644 --- a/json_serializable/test/supported_types/input.type_map.dart +++ b/json_serializable/test/supported_types/input.type_map.dart @@ -14,10 +14,7 @@ class SimpleClass { @JsonKey(defaultValue: {'a': 1}) Map withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -32,10 +29,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: {'a': 1}) Map? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); @@ -47,9 +41,7 @@ class SimpleClassNullable { class SimpleClassOfBigIntToBigInt { final Map value; - SimpleClassOfBigIntToBigInt( - this.value, - ); + SimpleClassOfBigIntToBigInt(this.value); factory SimpleClassOfBigIntToBigInt.fromJson(Map json) => _$SimpleClassOfBigIntToBigIntFromJson(json); @@ -61,13 +53,11 @@ class SimpleClassOfBigIntToBigInt { class SimpleClassNullableOfBigIntToBigInt { final Map? value; - SimpleClassNullableOfBigIntToBigInt( - this.value, - ); + SimpleClassNullableOfBigIntToBigInt(this.value); factory SimpleClassNullableOfBigIntToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToBigIntToJson(this); @@ -77,9 +67,7 @@ class SimpleClassNullableOfBigIntToBigInt { class SimpleClassOfDateTimeToBigInt { final Map value; - SimpleClassOfDateTimeToBigInt( - this.value, - ); + SimpleClassOfDateTimeToBigInt(this.value); factory SimpleClassOfDateTimeToBigInt.fromJson(Map json) => _$SimpleClassOfDateTimeToBigIntFromJson(json); @@ -91,13 +79,11 @@ class SimpleClassOfDateTimeToBigInt { class SimpleClassNullableOfDateTimeToBigInt { final Map? value; - SimpleClassNullableOfDateTimeToBigInt( - this.value, - ); + SimpleClassNullableOfDateTimeToBigInt(this.value); factory SimpleClassNullableOfDateTimeToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToBigIntToJson(this); @@ -107,9 +93,7 @@ class SimpleClassNullableOfDateTimeToBigInt { class SimpleClassOfDynamicToBigInt { final Map value; - SimpleClassOfDynamicToBigInt( - this.value, - ); + SimpleClassOfDynamicToBigInt(this.value); factory SimpleClassOfDynamicToBigInt.fromJson(Map json) => _$SimpleClassOfDynamicToBigIntFromJson(json); @@ -121,13 +105,11 @@ class SimpleClassOfDynamicToBigInt { class SimpleClassNullableOfDynamicToBigInt { final Map? value; - SimpleClassNullableOfDynamicToBigInt( - this.value, - ); + SimpleClassNullableOfDynamicToBigInt(this.value); factory SimpleClassNullableOfDynamicToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToBigIntToJson(this); @@ -137,9 +119,7 @@ class SimpleClassNullableOfDynamicToBigInt { class SimpleClassOfEnumTypeToBigInt { final Map value; - SimpleClassOfEnumTypeToBigInt( - this.value, - ); + SimpleClassOfEnumTypeToBigInt(this.value); factory SimpleClassOfEnumTypeToBigInt.fromJson(Map json) => _$SimpleClassOfEnumTypeToBigIntFromJson(json); @@ -151,13 +131,11 @@ class SimpleClassOfEnumTypeToBigInt { class SimpleClassNullableOfEnumTypeToBigInt { final Map? value; - SimpleClassNullableOfEnumTypeToBigInt( - this.value, - ); + SimpleClassNullableOfEnumTypeToBigInt(this.value); factory SimpleClassNullableOfEnumTypeToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToBigIntToJson(this); @@ -167,9 +145,7 @@ class SimpleClassNullableOfEnumTypeToBigInt { class SimpleClassOfIntToBigInt { final Map value; - SimpleClassOfIntToBigInt( - this.value, - ); + SimpleClassOfIntToBigInt(this.value); factory SimpleClassOfIntToBigInt.fromJson(Map json) => _$SimpleClassOfIntToBigIntFromJson(json); @@ -181,13 +157,11 @@ class SimpleClassOfIntToBigInt { class SimpleClassNullableOfIntToBigInt { final Map? value; - SimpleClassNullableOfIntToBigInt( - this.value, - ); + SimpleClassNullableOfIntToBigInt(this.value); factory SimpleClassNullableOfIntToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfIntToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToBigIntToJson(this); @@ -197,9 +171,7 @@ class SimpleClassNullableOfIntToBigInt { class SimpleClassOfObjectToBigInt { final Map value; - SimpleClassOfObjectToBigInt( - this.value, - ); + SimpleClassOfObjectToBigInt(this.value); factory SimpleClassOfObjectToBigInt.fromJson(Map json) => _$SimpleClassOfObjectToBigIntFromJson(json); @@ -211,13 +183,11 @@ class SimpleClassOfObjectToBigInt { class SimpleClassNullableOfObjectToBigInt { final Map? value; - SimpleClassNullableOfObjectToBigInt( - this.value, - ); + SimpleClassNullableOfObjectToBigInt(this.value); factory SimpleClassNullableOfObjectToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToBigIntToJson(this); @@ -227,9 +197,7 @@ class SimpleClassNullableOfObjectToBigInt { class SimpleClassOfStringToBigInt { final Map value; - SimpleClassOfStringToBigInt( - this.value, - ); + SimpleClassOfStringToBigInt(this.value); factory SimpleClassOfStringToBigInt.fromJson(Map json) => _$SimpleClassOfStringToBigIntFromJson(json); @@ -241,13 +209,11 @@ class SimpleClassOfStringToBigInt { class SimpleClassNullableOfStringToBigInt { final Map? value; - SimpleClassNullableOfStringToBigInt( - this.value, - ); + SimpleClassNullableOfStringToBigInt(this.value); factory SimpleClassNullableOfStringToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfStringToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToBigIntToJson(this); @@ -257,9 +223,7 @@ class SimpleClassNullableOfStringToBigInt { class SimpleClassOfUriToBigInt { final Map value; - SimpleClassOfUriToBigInt( - this.value, - ); + SimpleClassOfUriToBigInt(this.value); factory SimpleClassOfUriToBigInt.fromJson(Map json) => _$SimpleClassOfUriToBigIntFromJson(json); @@ -271,13 +235,11 @@ class SimpleClassOfUriToBigInt { class SimpleClassNullableOfUriToBigInt { final Map? value; - SimpleClassNullableOfUriToBigInt( - this.value, - ); + SimpleClassNullableOfUriToBigInt(this.value); factory SimpleClassNullableOfUriToBigInt.fromJson( - Map json) => - _$SimpleClassNullableOfUriToBigIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToBigIntFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToBigIntToJson(this); @@ -287,13 +249,11 @@ class SimpleClassNullableOfUriToBigInt { class SimpleClassOfBigIntToBigIntNullable { final Map value; - SimpleClassOfBigIntToBigIntNullable( - this.value, - ); + SimpleClassOfBigIntToBigIntNullable(this.value); factory SimpleClassOfBigIntToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToBigIntNullableToJson(this); @@ -303,13 +263,11 @@ class SimpleClassOfBigIntToBigIntNullable { class SimpleClassNullableOfBigIntToBigIntNullable { final Map? value; - SimpleClassNullableOfBigIntToBigIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntToBigIntNullable(this.value); factory SimpleClassNullableOfBigIntToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToBigIntNullableToJson(this); @@ -319,13 +277,11 @@ class SimpleClassNullableOfBigIntToBigIntNullable { class SimpleClassOfDateTimeToBigIntNullable { final Map value; - SimpleClassOfDateTimeToBigIntNullable( - this.value, - ); + SimpleClassOfDateTimeToBigIntNullable(this.value); factory SimpleClassOfDateTimeToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToBigIntNullableToJson(this); @@ -335,13 +291,11 @@ class SimpleClassOfDateTimeToBigIntNullable { class SimpleClassNullableOfDateTimeToBigIntNullable { final Map? value; - SimpleClassNullableOfDateTimeToBigIntNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToBigIntNullable(this.value); factory SimpleClassNullableOfDateTimeToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToBigIntNullableToJson(this); @@ -351,13 +305,11 @@ class SimpleClassNullableOfDateTimeToBigIntNullable { class SimpleClassOfDynamicToBigIntNullable { final Map value; - SimpleClassOfDynamicToBigIntNullable( - this.value, - ); + SimpleClassOfDynamicToBigIntNullable(this.value); factory SimpleClassOfDynamicToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToBigIntNullableToJson(this); @@ -367,13 +319,11 @@ class SimpleClassOfDynamicToBigIntNullable { class SimpleClassNullableOfDynamicToBigIntNullable { final Map? value; - SimpleClassNullableOfDynamicToBigIntNullable( - this.value, - ); + SimpleClassNullableOfDynamicToBigIntNullable(this.value); factory SimpleClassNullableOfDynamicToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToBigIntNullableToJson(this); @@ -383,13 +333,11 @@ class SimpleClassNullableOfDynamicToBigIntNullable { class SimpleClassOfEnumTypeToBigIntNullable { final Map value; - SimpleClassOfEnumTypeToBigIntNullable( - this.value, - ); + SimpleClassOfEnumTypeToBigIntNullable(this.value); factory SimpleClassOfEnumTypeToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToBigIntNullableToJson(this); @@ -399,13 +347,11 @@ class SimpleClassOfEnumTypeToBigIntNullable { class SimpleClassNullableOfEnumTypeToBigIntNullable { final Map? value; - SimpleClassNullableOfEnumTypeToBigIntNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToBigIntNullable(this.value); factory SimpleClassNullableOfEnumTypeToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToBigIntNullableToJson(this); @@ -415,13 +361,11 @@ class SimpleClassNullableOfEnumTypeToBigIntNullable { class SimpleClassOfIntToBigIntNullable { final Map value; - SimpleClassOfIntToBigIntNullable( - this.value, - ); + SimpleClassOfIntToBigIntNullable(this.value); factory SimpleClassOfIntToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfIntToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToBigIntNullableToJson(this); @@ -431,13 +375,11 @@ class SimpleClassOfIntToBigIntNullable { class SimpleClassNullableOfIntToBigIntNullable { final Map? value; - SimpleClassNullableOfIntToBigIntNullable( - this.value, - ); + SimpleClassNullableOfIntToBigIntNullable(this.value); factory SimpleClassNullableOfIntToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToBigIntNullableToJson(this); @@ -447,13 +389,11 @@ class SimpleClassNullableOfIntToBigIntNullable { class SimpleClassOfObjectToBigIntNullable { final Map value; - SimpleClassOfObjectToBigIntNullable( - this.value, - ); + SimpleClassOfObjectToBigIntNullable(this.value); factory SimpleClassOfObjectToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToBigIntNullableToJson(this); @@ -463,13 +403,11 @@ class SimpleClassOfObjectToBigIntNullable { class SimpleClassNullableOfObjectToBigIntNullable { final Map? value; - SimpleClassNullableOfObjectToBigIntNullable( - this.value, - ); + SimpleClassNullableOfObjectToBigIntNullable(this.value); factory SimpleClassNullableOfObjectToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToBigIntNullableToJson(this); @@ -479,13 +417,11 @@ class SimpleClassNullableOfObjectToBigIntNullable { class SimpleClassOfStringToBigIntNullable { final Map value; - SimpleClassOfStringToBigIntNullable( - this.value, - ); + SimpleClassOfStringToBigIntNullable(this.value); factory SimpleClassOfStringToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfStringToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToBigIntNullableToJson(this); @@ -495,13 +431,11 @@ class SimpleClassOfStringToBigIntNullable { class SimpleClassNullableOfStringToBigIntNullable { final Map? value; - SimpleClassNullableOfStringToBigIntNullable( - this.value, - ); + SimpleClassNullableOfStringToBigIntNullable(this.value); factory SimpleClassNullableOfStringToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToBigIntNullableToJson(this); @@ -511,13 +445,11 @@ class SimpleClassNullableOfStringToBigIntNullable { class SimpleClassOfUriToBigIntNullable { final Map value; - SimpleClassOfUriToBigIntNullable( - this.value, - ); + SimpleClassOfUriToBigIntNullable(this.value); factory SimpleClassOfUriToBigIntNullable.fromJson( - Map json) => - _$SimpleClassOfUriToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToBigIntNullableToJson(this); @@ -527,13 +459,11 @@ class SimpleClassOfUriToBigIntNullable { class SimpleClassNullableOfUriToBigIntNullable { final Map? value; - SimpleClassNullableOfUriToBigIntNullable( - this.value, - ); + SimpleClassNullableOfUriToBigIntNullable(this.value); factory SimpleClassNullableOfUriToBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToBigIntNullableToJson(this); @@ -543,9 +473,7 @@ class SimpleClassNullableOfUriToBigIntNullable { class SimpleClassOfBigIntToBool { final Map value; - SimpleClassOfBigIntToBool( - this.value, - ); + SimpleClassOfBigIntToBool(this.value); factory SimpleClassOfBigIntToBool.fromJson(Map json) => _$SimpleClassOfBigIntToBoolFromJson(json); @@ -557,13 +485,11 @@ class SimpleClassOfBigIntToBool { class SimpleClassNullableOfBigIntToBool { final Map? value; - SimpleClassNullableOfBigIntToBool( - this.value, - ); + SimpleClassNullableOfBigIntToBool(this.value); factory SimpleClassNullableOfBigIntToBool.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToBoolToJson(this); @@ -573,9 +499,7 @@ class SimpleClassNullableOfBigIntToBool { class SimpleClassOfDateTimeToBool { final Map value; - SimpleClassOfDateTimeToBool( - this.value, - ); + SimpleClassOfDateTimeToBool(this.value); factory SimpleClassOfDateTimeToBool.fromJson(Map json) => _$SimpleClassOfDateTimeToBoolFromJson(json); @@ -587,13 +511,11 @@ class SimpleClassOfDateTimeToBool { class SimpleClassNullableOfDateTimeToBool { final Map? value; - SimpleClassNullableOfDateTimeToBool( - this.value, - ); + SimpleClassNullableOfDateTimeToBool(this.value); factory SimpleClassNullableOfDateTimeToBool.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToBoolToJson(this); @@ -603,9 +525,7 @@ class SimpleClassNullableOfDateTimeToBool { class SimpleClassOfDynamicToBool { final Map value; - SimpleClassOfDynamicToBool( - this.value, - ); + SimpleClassOfDynamicToBool(this.value); factory SimpleClassOfDynamicToBool.fromJson(Map json) => _$SimpleClassOfDynamicToBoolFromJson(json); @@ -617,13 +537,11 @@ class SimpleClassOfDynamicToBool { class SimpleClassNullableOfDynamicToBool { final Map? value; - SimpleClassNullableOfDynamicToBool( - this.value, - ); + SimpleClassNullableOfDynamicToBool(this.value); factory SimpleClassNullableOfDynamicToBool.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToBoolToJson(this); @@ -633,9 +551,7 @@ class SimpleClassNullableOfDynamicToBool { class SimpleClassOfEnumTypeToBool { final Map value; - SimpleClassOfEnumTypeToBool( - this.value, - ); + SimpleClassOfEnumTypeToBool(this.value); factory SimpleClassOfEnumTypeToBool.fromJson(Map json) => _$SimpleClassOfEnumTypeToBoolFromJson(json); @@ -647,13 +563,11 @@ class SimpleClassOfEnumTypeToBool { class SimpleClassNullableOfEnumTypeToBool { final Map? value; - SimpleClassNullableOfEnumTypeToBool( - this.value, - ); + SimpleClassNullableOfEnumTypeToBool(this.value); factory SimpleClassNullableOfEnumTypeToBool.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToBoolToJson(this); @@ -663,9 +577,7 @@ class SimpleClassNullableOfEnumTypeToBool { class SimpleClassOfIntToBool { final Map value; - SimpleClassOfIntToBool( - this.value, - ); + SimpleClassOfIntToBool(this.value); factory SimpleClassOfIntToBool.fromJson(Map json) => _$SimpleClassOfIntToBoolFromJson(json); @@ -677,9 +589,7 @@ class SimpleClassOfIntToBool { class SimpleClassNullableOfIntToBool { final Map? value; - SimpleClassNullableOfIntToBool( - this.value, - ); + SimpleClassNullableOfIntToBool(this.value); factory SimpleClassNullableOfIntToBool.fromJson(Map json) => _$SimpleClassNullableOfIntToBoolFromJson(json); @@ -691,9 +601,7 @@ class SimpleClassNullableOfIntToBool { class SimpleClassOfObjectToBool { final Map value; - SimpleClassOfObjectToBool( - this.value, - ); + SimpleClassOfObjectToBool(this.value); factory SimpleClassOfObjectToBool.fromJson(Map json) => _$SimpleClassOfObjectToBoolFromJson(json); @@ -705,13 +613,11 @@ class SimpleClassOfObjectToBool { class SimpleClassNullableOfObjectToBool { final Map? value; - SimpleClassNullableOfObjectToBool( - this.value, - ); + SimpleClassNullableOfObjectToBool(this.value); factory SimpleClassNullableOfObjectToBool.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToBoolToJson(this); @@ -721,9 +627,7 @@ class SimpleClassNullableOfObjectToBool { class SimpleClassOfStringToBool { final Map value; - SimpleClassOfStringToBool( - this.value, - ); + SimpleClassOfStringToBool(this.value); factory SimpleClassOfStringToBool.fromJson(Map json) => _$SimpleClassOfStringToBoolFromJson(json); @@ -735,13 +639,11 @@ class SimpleClassOfStringToBool { class SimpleClassNullableOfStringToBool { final Map? value; - SimpleClassNullableOfStringToBool( - this.value, - ); + SimpleClassNullableOfStringToBool(this.value); factory SimpleClassNullableOfStringToBool.fromJson( - Map json) => - _$SimpleClassNullableOfStringToBoolFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToBoolFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToBoolToJson(this); @@ -751,9 +653,7 @@ class SimpleClassNullableOfStringToBool { class SimpleClassOfUriToBool { final Map value; - SimpleClassOfUriToBool( - this.value, - ); + SimpleClassOfUriToBool(this.value); factory SimpleClassOfUriToBool.fromJson(Map json) => _$SimpleClassOfUriToBoolFromJson(json); @@ -765,9 +665,7 @@ class SimpleClassOfUriToBool { class SimpleClassNullableOfUriToBool { final Map? value; - SimpleClassNullableOfUriToBool( - this.value, - ); + SimpleClassNullableOfUriToBool(this.value); factory SimpleClassNullableOfUriToBool.fromJson(Map json) => _$SimpleClassNullableOfUriToBoolFromJson(json); @@ -779,13 +677,11 @@ class SimpleClassNullableOfUriToBool { class SimpleClassOfBigIntToBoolNullable { final Map value; - SimpleClassOfBigIntToBoolNullable( - this.value, - ); + SimpleClassOfBigIntToBoolNullable(this.value); factory SimpleClassOfBigIntToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToBoolNullableToJson(this); @@ -795,13 +691,11 @@ class SimpleClassOfBigIntToBoolNullable { class SimpleClassNullableOfBigIntToBoolNullable { final Map? value; - SimpleClassNullableOfBigIntToBoolNullable( - this.value, - ); + SimpleClassNullableOfBigIntToBoolNullable(this.value); factory SimpleClassNullableOfBigIntToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToBoolNullableToJson(this); @@ -811,13 +705,11 @@ class SimpleClassNullableOfBigIntToBoolNullable { class SimpleClassOfDateTimeToBoolNullable { final Map value; - SimpleClassOfDateTimeToBoolNullable( - this.value, - ); + SimpleClassOfDateTimeToBoolNullable(this.value); factory SimpleClassOfDateTimeToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToBoolNullableToJson(this); @@ -827,13 +719,11 @@ class SimpleClassOfDateTimeToBoolNullable { class SimpleClassNullableOfDateTimeToBoolNullable { final Map? value; - SimpleClassNullableOfDateTimeToBoolNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToBoolNullable(this.value); factory SimpleClassNullableOfDateTimeToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToBoolNullableToJson(this); @@ -843,13 +733,11 @@ class SimpleClassNullableOfDateTimeToBoolNullable { class SimpleClassOfDynamicToBoolNullable { final Map value; - SimpleClassOfDynamicToBoolNullable( - this.value, - ); + SimpleClassOfDynamicToBoolNullable(this.value); factory SimpleClassOfDynamicToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToBoolNullableToJson(this); @@ -859,13 +747,11 @@ class SimpleClassOfDynamicToBoolNullable { class SimpleClassNullableOfDynamicToBoolNullable { final Map? value; - SimpleClassNullableOfDynamicToBoolNullable( - this.value, - ); + SimpleClassNullableOfDynamicToBoolNullable(this.value); factory SimpleClassNullableOfDynamicToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToBoolNullableToJson(this); @@ -875,13 +761,11 @@ class SimpleClassNullableOfDynamicToBoolNullable { class SimpleClassOfEnumTypeToBoolNullable { final Map value; - SimpleClassOfEnumTypeToBoolNullable( - this.value, - ); + SimpleClassOfEnumTypeToBoolNullable(this.value); factory SimpleClassOfEnumTypeToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToBoolNullableToJson(this); @@ -891,13 +775,11 @@ class SimpleClassOfEnumTypeToBoolNullable { class SimpleClassNullableOfEnumTypeToBoolNullable { final Map? value; - SimpleClassNullableOfEnumTypeToBoolNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToBoolNullable(this.value); factory SimpleClassNullableOfEnumTypeToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToBoolNullableToJson(this); @@ -907,9 +789,7 @@ class SimpleClassNullableOfEnumTypeToBoolNullable { class SimpleClassOfIntToBoolNullable { final Map value; - SimpleClassOfIntToBoolNullable( - this.value, - ); + SimpleClassOfIntToBoolNullable(this.value); factory SimpleClassOfIntToBoolNullable.fromJson(Map json) => _$SimpleClassOfIntToBoolNullableFromJson(json); @@ -921,13 +801,11 @@ class SimpleClassOfIntToBoolNullable { class SimpleClassNullableOfIntToBoolNullable { final Map? value; - SimpleClassNullableOfIntToBoolNullable( - this.value, - ); + SimpleClassNullableOfIntToBoolNullable(this.value); factory SimpleClassNullableOfIntToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToBoolNullableToJson(this); @@ -937,13 +815,11 @@ class SimpleClassNullableOfIntToBoolNullable { class SimpleClassOfObjectToBoolNullable { final Map value; - SimpleClassOfObjectToBoolNullable( - this.value, - ); + SimpleClassOfObjectToBoolNullable(this.value); factory SimpleClassOfObjectToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToBoolNullableToJson(this); @@ -953,13 +829,11 @@ class SimpleClassOfObjectToBoolNullable { class SimpleClassNullableOfObjectToBoolNullable { final Map? value; - SimpleClassNullableOfObjectToBoolNullable( - this.value, - ); + SimpleClassNullableOfObjectToBoolNullable(this.value); factory SimpleClassNullableOfObjectToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToBoolNullableToJson(this); @@ -969,13 +843,11 @@ class SimpleClassNullableOfObjectToBoolNullable { class SimpleClassOfStringToBoolNullable { final Map value; - SimpleClassOfStringToBoolNullable( - this.value, - ); + SimpleClassOfStringToBoolNullable(this.value); factory SimpleClassOfStringToBoolNullable.fromJson( - Map json) => - _$SimpleClassOfStringToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToBoolNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToBoolNullableToJson(this); @@ -985,13 +857,11 @@ class SimpleClassOfStringToBoolNullable { class SimpleClassNullableOfStringToBoolNullable { final Map? value; - SimpleClassNullableOfStringToBoolNullable( - this.value, - ); + SimpleClassNullableOfStringToBoolNullable(this.value); factory SimpleClassNullableOfStringToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToBoolNullableToJson(this); @@ -1001,9 +871,7 @@ class SimpleClassNullableOfStringToBoolNullable { class SimpleClassOfUriToBoolNullable { final Map value; - SimpleClassOfUriToBoolNullable( - this.value, - ); + SimpleClassOfUriToBoolNullable(this.value); factory SimpleClassOfUriToBoolNullable.fromJson(Map json) => _$SimpleClassOfUriToBoolNullableFromJson(json); @@ -1015,13 +883,11 @@ class SimpleClassOfUriToBoolNullable { class SimpleClassNullableOfUriToBoolNullable { final Map? value; - SimpleClassNullableOfUriToBoolNullable( - this.value, - ); + SimpleClassNullableOfUriToBoolNullable(this.value); factory SimpleClassNullableOfUriToBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToBoolNullableToJson(this); @@ -1031,9 +897,7 @@ class SimpleClassNullableOfUriToBoolNullable { class SimpleClassOfBigIntToDateTime { final Map value; - SimpleClassOfBigIntToDateTime( - this.value, - ); + SimpleClassOfBigIntToDateTime(this.value); factory SimpleClassOfBigIntToDateTime.fromJson(Map json) => _$SimpleClassOfBigIntToDateTimeFromJson(json); @@ -1045,13 +909,11 @@ class SimpleClassOfBigIntToDateTime { class SimpleClassNullableOfBigIntToDateTime { final Map? value; - SimpleClassNullableOfBigIntToDateTime( - this.value, - ); + SimpleClassNullableOfBigIntToDateTime(this.value); factory SimpleClassNullableOfBigIntToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDateTimeToJson(this); @@ -1061,9 +923,7 @@ class SimpleClassNullableOfBigIntToDateTime { class SimpleClassOfDateTimeToDateTime { final Map value; - SimpleClassOfDateTimeToDateTime( - this.value, - ); + SimpleClassOfDateTimeToDateTime(this.value); factory SimpleClassOfDateTimeToDateTime.fromJson(Map json) => _$SimpleClassOfDateTimeToDateTimeFromJson(json); @@ -1076,13 +936,11 @@ class SimpleClassOfDateTimeToDateTime { class SimpleClassNullableOfDateTimeToDateTime { final Map? value; - SimpleClassNullableOfDateTimeToDateTime( - this.value, - ); + SimpleClassNullableOfDateTimeToDateTime(this.value); factory SimpleClassNullableOfDateTimeToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDateTimeToJson(this); @@ -1092,9 +950,7 @@ class SimpleClassNullableOfDateTimeToDateTime { class SimpleClassOfDynamicToDateTime { final Map value; - SimpleClassOfDynamicToDateTime( - this.value, - ); + SimpleClassOfDynamicToDateTime(this.value); factory SimpleClassOfDynamicToDateTime.fromJson(Map json) => _$SimpleClassOfDynamicToDateTimeFromJson(json); @@ -1106,13 +962,11 @@ class SimpleClassOfDynamicToDateTime { class SimpleClassNullableOfDynamicToDateTime { final Map? value; - SimpleClassNullableOfDynamicToDateTime( - this.value, - ); + SimpleClassNullableOfDynamicToDateTime(this.value); factory SimpleClassNullableOfDynamicToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDateTimeToJson(this); @@ -1122,9 +976,7 @@ class SimpleClassNullableOfDynamicToDateTime { class SimpleClassOfEnumTypeToDateTime { final Map value; - SimpleClassOfEnumTypeToDateTime( - this.value, - ); + SimpleClassOfEnumTypeToDateTime(this.value); factory SimpleClassOfEnumTypeToDateTime.fromJson(Map json) => _$SimpleClassOfEnumTypeToDateTimeFromJson(json); @@ -1137,13 +989,11 @@ class SimpleClassOfEnumTypeToDateTime { class SimpleClassNullableOfEnumTypeToDateTime { final Map? value; - SimpleClassNullableOfEnumTypeToDateTime( - this.value, - ); + SimpleClassNullableOfEnumTypeToDateTime(this.value); factory SimpleClassNullableOfEnumTypeToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDateTimeToJson(this); @@ -1153,9 +1003,7 @@ class SimpleClassNullableOfEnumTypeToDateTime { class SimpleClassOfIntToDateTime { final Map value; - SimpleClassOfIntToDateTime( - this.value, - ); + SimpleClassOfIntToDateTime(this.value); factory SimpleClassOfIntToDateTime.fromJson(Map json) => _$SimpleClassOfIntToDateTimeFromJson(json); @@ -1167,13 +1015,11 @@ class SimpleClassOfIntToDateTime { class SimpleClassNullableOfIntToDateTime { final Map? value; - SimpleClassNullableOfIntToDateTime( - this.value, - ); + SimpleClassNullableOfIntToDateTime(this.value); factory SimpleClassNullableOfIntToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDateTimeToJson(this); @@ -1183,9 +1029,7 @@ class SimpleClassNullableOfIntToDateTime { class SimpleClassOfObjectToDateTime { final Map value; - SimpleClassOfObjectToDateTime( - this.value, - ); + SimpleClassOfObjectToDateTime(this.value); factory SimpleClassOfObjectToDateTime.fromJson(Map json) => _$SimpleClassOfObjectToDateTimeFromJson(json); @@ -1197,13 +1041,11 @@ class SimpleClassOfObjectToDateTime { class SimpleClassNullableOfObjectToDateTime { final Map? value; - SimpleClassNullableOfObjectToDateTime( - this.value, - ); + SimpleClassNullableOfObjectToDateTime(this.value); factory SimpleClassNullableOfObjectToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDateTimeToJson(this); @@ -1213,9 +1055,7 @@ class SimpleClassNullableOfObjectToDateTime { class SimpleClassOfStringToDateTime { final Map value; - SimpleClassOfStringToDateTime( - this.value, - ); + SimpleClassOfStringToDateTime(this.value); factory SimpleClassOfStringToDateTime.fromJson(Map json) => _$SimpleClassOfStringToDateTimeFromJson(json); @@ -1227,13 +1067,11 @@ class SimpleClassOfStringToDateTime { class SimpleClassNullableOfStringToDateTime { final Map? value; - SimpleClassNullableOfStringToDateTime( - this.value, - ); + SimpleClassNullableOfStringToDateTime(this.value); factory SimpleClassNullableOfStringToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDateTimeToJson(this); @@ -1243,9 +1081,7 @@ class SimpleClassNullableOfStringToDateTime { class SimpleClassOfUriToDateTime { final Map value; - SimpleClassOfUriToDateTime( - this.value, - ); + SimpleClassOfUriToDateTime(this.value); factory SimpleClassOfUriToDateTime.fromJson(Map json) => _$SimpleClassOfUriToDateTimeFromJson(json); @@ -1257,13 +1093,11 @@ class SimpleClassOfUriToDateTime { class SimpleClassNullableOfUriToDateTime { final Map? value; - SimpleClassNullableOfUriToDateTime( - this.value, - ); + SimpleClassNullableOfUriToDateTime(this.value); factory SimpleClassNullableOfUriToDateTime.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDateTimeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDateTimeFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDateTimeToJson(this); @@ -1273,13 +1107,11 @@ class SimpleClassNullableOfUriToDateTime { class SimpleClassOfBigIntToDateTimeNullable { final Map value; - SimpleClassOfBigIntToDateTimeNullable( - this.value, - ); + SimpleClassOfBigIntToDateTimeNullable(this.value); factory SimpleClassOfBigIntToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToDateTimeNullableToJson(this); @@ -1289,13 +1121,11 @@ class SimpleClassOfBigIntToDateTimeNullable { class SimpleClassNullableOfBigIntToDateTimeNullable { final Map? value; - SimpleClassNullableOfBigIntToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfBigIntToDateTimeNullable(this.value); factory SimpleClassNullableOfBigIntToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDateTimeNullableToJson(this); @@ -1305,13 +1135,11 @@ class SimpleClassNullableOfBigIntToDateTimeNullable { class SimpleClassOfDateTimeToDateTimeNullable { final Map value; - SimpleClassOfDateTimeToDateTimeNullable( - this.value, - ); + SimpleClassOfDateTimeToDateTimeNullable(this.value); factory SimpleClassOfDateTimeToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToDateTimeNullableToJson(this); @@ -1321,13 +1149,11 @@ class SimpleClassOfDateTimeToDateTimeNullable { class SimpleClassNullableOfDateTimeToDateTimeNullable { final Map? value; - SimpleClassNullableOfDateTimeToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToDateTimeNullable(this.value); factory SimpleClassNullableOfDateTimeToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDateTimeNullableToJson(this); @@ -1337,13 +1163,11 @@ class SimpleClassNullableOfDateTimeToDateTimeNullable { class SimpleClassOfDynamicToDateTimeNullable { final Map value; - SimpleClassOfDynamicToDateTimeNullable( - this.value, - ); + SimpleClassOfDynamicToDateTimeNullable(this.value); factory SimpleClassOfDynamicToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToDateTimeNullableToJson(this); @@ -1353,13 +1177,11 @@ class SimpleClassOfDynamicToDateTimeNullable { class SimpleClassNullableOfDynamicToDateTimeNullable { final Map? value; - SimpleClassNullableOfDynamicToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDynamicToDateTimeNullable(this.value); factory SimpleClassNullableOfDynamicToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDateTimeNullableToJson(this); @@ -1369,13 +1191,11 @@ class SimpleClassNullableOfDynamicToDateTimeNullable { class SimpleClassOfEnumTypeToDateTimeNullable { final Map value; - SimpleClassOfEnumTypeToDateTimeNullable( - this.value, - ); + SimpleClassOfEnumTypeToDateTimeNullable(this.value); factory SimpleClassOfEnumTypeToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToDateTimeNullableToJson(this); @@ -1385,13 +1205,11 @@ class SimpleClassOfEnumTypeToDateTimeNullable { class SimpleClassNullableOfEnumTypeToDateTimeNullable { final Map? value; - SimpleClassNullableOfEnumTypeToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToDateTimeNullable(this.value); factory SimpleClassNullableOfEnumTypeToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDateTimeNullableToJson(this); @@ -1401,13 +1219,11 @@ class SimpleClassNullableOfEnumTypeToDateTimeNullable { class SimpleClassOfIntToDateTimeNullable { final Map value; - SimpleClassOfIntToDateTimeNullable( - this.value, - ); + SimpleClassOfIntToDateTimeNullable(this.value); factory SimpleClassOfIntToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfIntToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToDateTimeNullableToJson(this); @@ -1417,13 +1233,11 @@ class SimpleClassOfIntToDateTimeNullable { class SimpleClassNullableOfIntToDateTimeNullable { final Map? value; - SimpleClassNullableOfIntToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfIntToDateTimeNullable(this.value); factory SimpleClassNullableOfIntToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDateTimeNullableToJson(this); @@ -1433,13 +1247,11 @@ class SimpleClassNullableOfIntToDateTimeNullable { class SimpleClassOfObjectToDateTimeNullable { final Map value; - SimpleClassOfObjectToDateTimeNullable( - this.value, - ); + SimpleClassOfObjectToDateTimeNullable(this.value); factory SimpleClassOfObjectToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToDateTimeNullableToJson(this); @@ -1449,13 +1261,11 @@ class SimpleClassOfObjectToDateTimeNullable { class SimpleClassNullableOfObjectToDateTimeNullable { final Map? value; - SimpleClassNullableOfObjectToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfObjectToDateTimeNullable(this.value); factory SimpleClassNullableOfObjectToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDateTimeNullableToJson(this); @@ -1465,13 +1275,11 @@ class SimpleClassNullableOfObjectToDateTimeNullable { class SimpleClassOfStringToDateTimeNullable { final Map value; - SimpleClassOfStringToDateTimeNullable( - this.value, - ); + SimpleClassOfStringToDateTimeNullable(this.value); factory SimpleClassOfStringToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfStringToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToDateTimeNullableToJson(this); @@ -1481,13 +1289,11 @@ class SimpleClassOfStringToDateTimeNullable { class SimpleClassNullableOfStringToDateTimeNullable { final Map? value; - SimpleClassNullableOfStringToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfStringToDateTimeNullable(this.value); factory SimpleClassNullableOfStringToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDateTimeNullableToJson(this); @@ -1497,13 +1303,11 @@ class SimpleClassNullableOfStringToDateTimeNullable { class SimpleClassOfUriToDateTimeNullable { final Map value; - SimpleClassOfUriToDateTimeNullable( - this.value, - ); + SimpleClassOfUriToDateTimeNullable(this.value); factory SimpleClassOfUriToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassOfUriToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToDateTimeNullableToJson(this); @@ -1513,13 +1317,11 @@ class SimpleClassOfUriToDateTimeNullable { class SimpleClassNullableOfUriToDateTimeNullable { final Map? value; - SimpleClassNullableOfUriToDateTimeNullable( - this.value, - ); + SimpleClassNullableOfUriToDateTimeNullable(this.value); factory SimpleClassNullableOfUriToDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDateTimeNullableToJson(this); @@ -1529,9 +1331,7 @@ class SimpleClassNullableOfUriToDateTimeNullable { class SimpleClassOfBigIntToDouble { final Map value; - SimpleClassOfBigIntToDouble( - this.value, - ); + SimpleClassOfBigIntToDouble(this.value); factory SimpleClassOfBigIntToDouble.fromJson(Map json) => _$SimpleClassOfBigIntToDoubleFromJson(json); @@ -1543,13 +1343,11 @@ class SimpleClassOfBigIntToDouble { class SimpleClassNullableOfBigIntToDouble { final Map? value; - SimpleClassNullableOfBigIntToDouble( - this.value, - ); + SimpleClassNullableOfBigIntToDouble(this.value); factory SimpleClassNullableOfBigIntToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDoubleToJson(this); @@ -1559,9 +1357,7 @@ class SimpleClassNullableOfBigIntToDouble { class SimpleClassOfDateTimeToDouble { final Map value; - SimpleClassOfDateTimeToDouble( - this.value, - ); + SimpleClassOfDateTimeToDouble(this.value); factory SimpleClassOfDateTimeToDouble.fromJson(Map json) => _$SimpleClassOfDateTimeToDoubleFromJson(json); @@ -1573,13 +1369,11 @@ class SimpleClassOfDateTimeToDouble { class SimpleClassNullableOfDateTimeToDouble { final Map? value; - SimpleClassNullableOfDateTimeToDouble( - this.value, - ); + SimpleClassNullableOfDateTimeToDouble(this.value); factory SimpleClassNullableOfDateTimeToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDoubleToJson(this); @@ -1589,9 +1383,7 @@ class SimpleClassNullableOfDateTimeToDouble { class SimpleClassOfDynamicToDouble { final Map value; - SimpleClassOfDynamicToDouble( - this.value, - ); + SimpleClassOfDynamicToDouble(this.value); factory SimpleClassOfDynamicToDouble.fromJson(Map json) => _$SimpleClassOfDynamicToDoubleFromJson(json); @@ -1603,13 +1395,11 @@ class SimpleClassOfDynamicToDouble { class SimpleClassNullableOfDynamicToDouble { final Map? value; - SimpleClassNullableOfDynamicToDouble( - this.value, - ); + SimpleClassNullableOfDynamicToDouble(this.value); factory SimpleClassNullableOfDynamicToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDoubleToJson(this); @@ -1619,9 +1409,7 @@ class SimpleClassNullableOfDynamicToDouble { class SimpleClassOfEnumTypeToDouble { final Map value; - SimpleClassOfEnumTypeToDouble( - this.value, - ); + SimpleClassOfEnumTypeToDouble(this.value); factory SimpleClassOfEnumTypeToDouble.fromJson(Map json) => _$SimpleClassOfEnumTypeToDoubleFromJson(json); @@ -1633,13 +1421,11 @@ class SimpleClassOfEnumTypeToDouble { class SimpleClassNullableOfEnumTypeToDouble { final Map? value; - SimpleClassNullableOfEnumTypeToDouble( - this.value, - ); + SimpleClassNullableOfEnumTypeToDouble(this.value); factory SimpleClassNullableOfEnumTypeToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDoubleToJson(this); @@ -1649,9 +1435,7 @@ class SimpleClassNullableOfEnumTypeToDouble { class SimpleClassOfIntToDouble { final Map value; - SimpleClassOfIntToDouble( - this.value, - ); + SimpleClassOfIntToDouble(this.value); factory SimpleClassOfIntToDouble.fromJson(Map json) => _$SimpleClassOfIntToDoubleFromJson(json); @@ -1663,13 +1447,11 @@ class SimpleClassOfIntToDouble { class SimpleClassNullableOfIntToDouble { final Map? value; - SimpleClassNullableOfIntToDouble( - this.value, - ); + SimpleClassNullableOfIntToDouble(this.value); factory SimpleClassNullableOfIntToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDoubleToJson(this); @@ -1679,9 +1461,7 @@ class SimpleClassNullableOfIntToDouble { class SimpleClassOfObjectToDouble { final Map value; - SimpleClassOfObjectToDouble( - this.value, - ); + SimpleClassOfObjectToDouble(this.value); factory SimpleClassOfObjectToDouble.fromJson(Map json) => _$SimpleClassOfObjectToDoubleFromJson(json); @@ -1693,13 +1473,11 @@ class SimpleClassOfObjectToDouble { class SimpleClassNullableOfObjectToDouble { final Map? value; - SimpleClassNullableOfObjectToDouble( - this.value, - ); + SimpleClassNullableOfObjectToDouble(this.value); factory SimpleClassNullableOfObjectToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDoubleToJson(this); @@ -1709,9 +1487,7 @@ class SimpleClassNullableOfObjectToDouble { class SimpleClassOfStringToDouble { final Map value; - SimpleClassOfStringToDouble( - this.value, - ); + SimpleClassOfStringToDouble(this.value); factory SimpleClassOfStringToDouble.fromJson(Map json) => _$SimpleClassOfStringToDoubleFromJson(json); @@ -1723,13 +1499,11 @@ class SimpleClassOfStringToDouble { class SimpleClassNullableOfStringToDouble { final Map? value; - SimpleClassNullableOfStringToDouble( - this.value, - ); + SimpleClassNullableOfStringToDouble(this.value); factory SimpleClassNullableOfStringToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDoubleToJson(this); @@ -1739,9 +1513,7 @@ class SimpleClassNullableOfStringToDouble { class SimpleClassOfUriToDouble { final Map value; - SimpleClassOfUriToDouble( - this.value, - ); + SimpleClassOfUriToDouble(this.value); factory SimpleClassOfUriToDouble.fromJson(Map json) => _$SimpleClassOfUriToDoubleFromJson(json); @@ -1753,13 +1525,11 @@ class SimpleClassOfUriToDouble { class SimpleClassNullableOfUriToDouble { final Map? value; - SimpleClassNullableOfUriToDouble( - this.value, - ); + SimpleClassNullableOfUriToDouble(this.value); factory SimpleClassNullableOfUriToDouble.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDoubleFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDoubleFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDoubleToJson(this); @@ -1769,13 +1539,11 @@ class SimpleClassNullableOfUriToDouble { class SimpleClassOfBigIntToDoubleNullable { final Map value; - SimpleClassOfBigIntToDoubleNullable( - this.value, - ); + SimpleClassOfBigIntToDoubleNullable(this.value); factory SimpleClassOfBigIntToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToDoubleNullableToJson(this); @@ -1785,13 +1553,11 @@ class SimpleClassOfBigIntToDoubleNullable { class SimpleClassNullableOfBigIntToDoubleNullable { final Map? value; - SimpleClassNullableOfBigIntToDoubleNullable( - this.value, - ); + SimpleClassNullableOfBigIntToDoubleNullable(this.value); factory SimpleClassNullableOfBigIntToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDoubleNullableToJson(this); @@ -1801,13 +1567,11 @@ class SimpleClassNullableOfBigIntToDoubleNullable { class SimpleClassOfDateTimeToDoubleNullable { final Map value; - SimpleClassOfDateTimeToDoubleNullable( - this.value, - ); + SimpleClassOfDateTimeToDoubleNullable(this.value); factory SimpleClassOfDateTimeToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToDoubleNullableToJson(this); @@ -1817,13 +1581,11 @@ class SimpleClassOfDateTimeToDoubleNullable { class SimpleClassNullableOfDateTimeToDoubleNullable { final Map? value; - SimpleClassNullableOfDateTimeToDoubleNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToDoubleNullable(this.value); factory SimpleClassNullableOfDateTimeToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDoubleNullableToJson(this); @@ -1833,13 +1595,11 @@ class SimpleClassNullableOfDateTimeToDoubleNullable { class SimpleClassOfDynamicToDoubleNullable { final Map value; - SimpleClassOfDynamicToDoubleNullable( - this.value, - ); + SimpleClassOfDynamicToDoubleNullable(this.value); factory SimpleClassOfDynamicToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToDoubleNullableToJson(this); @@ -1849,13 +1609,11 @@ class SimpleClassOfDynamicToDoubleNullable { class SimpleClassNullableOfDynamicToDoubleNullable { final Map? value; - SimpleClassNullableOfDynamicToDoubleNullable( - this.value, - ); + SimpleClassNullableOfDynamicToDoubleNullable(this.value); factory SimpleClassNullableOfDynamicToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDoubleNullableToJson(this); @@ -1865,13 +1623,11 @@ class SimpleClassNullableOfDynamicToDoubleNullable { class SimpleClassOfEnumTypeToDoubleNullable { final Map value; - SimpleClassOfEnumTypeToDoubleNullable( - this.value, - ); + SimpleClassOfEnumTypeToDoubleNullable(this.value); factory SimpleClassOfEnumTypeToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToDoubleNullableToJson(this); @@ -1881,13 +1637,11 @@ class SimpleClassOfEnumTypeToDoubleNullable { class SimpleClassNullableOfEnumTypeToDoubleNullable { final Map? value; - SimpleClassNullableOfEnumTypeToDoubleNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToDoubleNullable(this.value); factory SimpleClassNullableOfEnumTypeToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDoubleNullableToJson(this); @@ -1897,13 +1651,11 @@ class SimpleClassNullableOfEnumTypeToDoubleNullable { class SimpleClassOfIntToDoubleNullable { final Map value; - SimpleClassOfIntToDoubleNullable( - this.value, - ); + SimpleClassOfIntToDoubleNullable(this.value); factory SimpleClassOfIntToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfIntToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToDoubleNullableToJson(this); @@ -1913,13 +1665,11 @@ class SimpleClassOfIntToDoubleNullable { class SimpleClassNullableOfIntToDoubleNullable { final Map? value; - SimpleClassNullableOfIntToDoubleNullable( - this.value, - ); + SimpleClassNullableOfIntToDoubleNullable(this.value); factory SimpleClassNullableOfIntToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDoubleNullableToJson(this); @@ -1929,13 +1679,11 @@ class SimpleClassNullableOfIntToDoubleNullable { class SimpleClassOfObjectToDoubleNullable { final Map value; - SimpleClassOfObjectToDoubleNullable( - this.value, - ); + SimpleClassOfObjectToDoubleNullable(this.value); factory SimpleClassOfObjectToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToDoubleNullableToJson(this); @@ -1945,13 +1693,11 @@ class SimpleClassOfObjectToDoubleNullable { class SimpleClassNullableOfObjectToDoubleNullable { final Map? value; - SimpleClassNullableOfObjectToDoubleNullable( - this.value, - ); + SimpleClassNullableOfObjectToDoubleNullable(this.value); factory SimpleClassNullableOfObjectToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDoubleNullableToJson(this); @@ -1961,13 +1707,11 @@ class SimpleClassNullableOfObjectToDoubleNullable { class SimpleClassOfStringToDoubleNullable { final Map value; - SimpleClassOfStringToDoubleNullable( - this.value, - ); + SimpleClassOfStringToDoubleNullable(this.value); factory SimpleClassOfStringToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfStringToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToDoubleNullableToJson(this); @@ -1977,13 +1721,11 @@ class SimpleClassOfStringToDoubleNullable { class SimpleClassNullableOfStringToDoubleNullable { final Map? value; - SimpleClassNullableOfStringToDoubleNullable( - this.value, - ); + SimpleClassNullableOfStringToDoubleNullable(this.value); factory SimpleClassNullableOfStringToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDoubleNullableToJson(this); @@ -1993,13 +1735,11 @@ class SimpleClassNullableOfStringToDoubleNullable { class SimpleClassOfUriToDoubleNullable { final Map value; - SimpleClassOfUriToDoubleNullable( - this.value, - ); + SimpleClassOfUriToDoubleNullable(this.value); factory SimpleClassOfUriToDoubleNullable.fromJson( - Map json) => - _$SimpleClassOfUriToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToDoubleNullableToJson(this); @@ -2009,13 +1749,11 @@ class SimpleClassOfUriToDoubleNullable { class SimpleClassNullableOfUriToDoubleNullable { final Map? value; - SimpleClassNullableOfUriToDoubleNullable( - this.value, - ); + SimpleClassNullableOfUriToDoubleNullable(this.value); factory SimpleClassNullableOfUriToDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDoubleNullableToJson(this); @@ -2025,9 +1763,7 @@ class SimpleClassNullableOfUriToDoubleNullable { class SimpleClassOfBigIntToDuration { final Map value; - SimpleClassOfBigIntToDuration( - this.value, - ); + SimpleClassOfBigIntToDuration(this.value); factory SimpleClassOfBigIntToDuration.fromJson(Map json) => _$SimpleClassOfBigIntToDurationFromJson(json); @@ -2039,13 +1775,11 @@ class SimpleClassOfBigIntToDuration { class SimpleClassNullableOfBigIntToDuration { final Map? value; - SimpleClassNullableOfBigIntToDuration( - this.value, - ); + SimpleClassNullableOfBigIntToDuration(this.value); factory SimpleClassNullableOfBigIntToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDurationToJson(this); @@ -2055,9 +1789,7 @@ class SimpleClassNullableOfBigIntToDuration { class SimpleClassOfDateTimeToDuration { final Map value; - SimpleClassOfDateTimeToDuration( - this.value, - ); + SimpleClassOfDateTimeToDuration(this.value); factory SimpleClassOfDateTimeToDuration.fromJson(Map json) => _$SimpleClassOfDateTimeToDurationFromJson(json); @@ -2070,13 +1802,11 @@ class SimpleClassOfDateTimeToDuration { class SimpleClassNullableOfDateTimeToDuration { final Map? value; - SimpleClassNullableOfDateTimeToDuration( - this.value, - ); + SimpleClassNullableOfDateTimeToDuration(this.value); factory SimpleClassNullableOfDateTimeToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDurationToJson(this); @@ -2086,9 +1816,7 @@ class SimpleClassNullableOfDateTimeToDuration { class SimpleClassOfDynamicToDuration { final Map value; - SimpleClassOfDynamicToDuration( - this.value, - ); + SimpleClassOfDynamicToDuration(this.value); factory SimpleClassOfDynamicToDuration.fromJson(Map json) => _$SimpleClassOfDynamicToDurationFromJson(json); @@ -2100,13 +1828,11 @@ class SimpleClassOfDynamicToDuration { class SimpleClassNullableOfDynamicToDuration { final Map? value; - SimpleClassNullableOfDynamicToDuration( - this.value, - ); + SimpleClassNullableOfDynamicToDuration(this.value); factory SimpleClassNullableOfDynamicToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDurationToJson(this); @@ -2116,9 +1842,7 @@ class SimpleClassNullableOfDynamicToDuration { class SimpleClassOfEnumTypeToDuration { final Map value; - SimpleClassOfEnumTypeToDuration( - this.value, - ); + SimpleClassOfEnumTypeToDuration(this.value); factory SimpleClassOfEnumTypeToDuration.fromJson(Map json) => _$SimpleClassOfEnumTypeToDurationFromJson(json); @@ -2131,13 +1855,11 @@ class SimpleClassOfEnumTypeToDuration { class SimpleClassNullableOfEnumTypeToDuration { final Map? value; - SimpleClassNullableOfEnumTypeToDuration( - this.value, - ); + SimpleClassNullableOfEnumTypeToDuration(this.value); factory SimpleClassNullableOfEnumTypeToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDurationToJson(this); @@ -2147,9 +1869,7 @@ class SimpleClassNullableOfEnumTypeToDuration { class SimpleClassOfIntToDuration { final Map value; - SimpleClassOfIntToDuration( - this.value, - ); + SimpleClassOfIntToDuration(this.value); factory SimpleClassOfIntToDuration.fromJson(Map json) => _$SimpleClassOfIntToDurationFromJson(json); @@ -2161,13 +1881,11 @@ class SimpleClassOfIntToDuration { class SimpleClassNullableOfIntToDuration { final Map? value; - SimpleClassNullableOfIntToDuration( - this.value, - ); + SimpleClassNullableOfIntToDuration(this.value); factory SimpleClassNullableOfIntToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDurationToJson(this); @@ -2177,9 +1895,7 @@ class SimpleClassNullableOfIntToDuration { class SimpleClassOfObjectToDuration { final Map value; - SimpleClassOfObjectToDuration( - this.value, - ); + SimpleClassOfObjectToDuration(this.value); factory SimpleClassOfObjectToDuration.fromJson(Map json) => _$SimpleClassOfObjectToDurationFromJson(json); @@ -2191,13 +1907,11 @@ class SimpleClassOfObjectToDuration { class SimpleClassNullableOfObjectToDuration { final Map? value; - SimpleClassNullableOfObjectToDuration( - this.value, - ); + SimpleClassNullableOfObjectToDuration(this.value); factory SimpleClassNullableOfObjectToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDurationToJson(this); @@ -2207,9 +1921,7 @@ class SimpleClassNullableOfObjectToDuration { class SimpleClassOfStringToDuration { final Map value; - SimpleClassOfStringToDuration( - this.value, - ); + SimpleClassOfStringToDuration(this.value); factory SimpleClassOfStringToDuration.fromJson(Map json) => _$SimpleClassOfStringToDurationFromJson(json); @@ -2221,13 +1933,11 @@ class SimpleClassOfStringToDuration { class SimpleClassNullableOfStringToDuration { final Map? value; - SimpleClassNullableOfStringToDuration( - this.value, - ); + SimpleClassNullableOfStringToDuration(this.value); factory SimpleClassNullableOfStringToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDurationToJson(this); @@ -2237,9 +1947,7 @@ class SimpleClassNullableOfStringToDuration { class SimpleClassOfUriToDuration { final Map value; - SimpleClassOfUriToDuration( - this.value, - ); + SimpleClassOfUriToDuration(this.value); factory SimpleClassOfUriToDuration.fromJson(Map json) => _$SimpleClassOfUriToDurationFromJson(json); @@ -2251,13 +1959,11 @@ class SimpleClassOfUriToDuration { class SimpleClassNullableOfUriToDuration { final Map? value; - SimpleClassNullableOfUriToDuration( - this.value, - ); + SimpleClassNullableOfUriToDuration(this.value); factory SimpleClassNullableOfUriToDuration.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDurationFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDurationFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDurationToJson(this); @@ -2267,13 +1973,11 @@ class SimpleClassNullableOfUriToDuration { class SimpleClassOfBigIntToDurationNullable { final Map value; - SimpleClassOfBigIntToDurationNullable( - this.value, - ); + SimpleClassOfBigIntToDurationNullable(this.value); factory SimpleClassOfBigIntToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToDurationNullableToJson(this); @@ -2283,13 +1987,11 @@ class SimpleClassOfBigIntToDurationNullable { class SimpleClassNullableOfBigIntToDurationNullable { final Map? value; - SimpleClassNullableOfBigIntToDurationNullable( - this.value, - ); + SimpleClassNullableOfBigIntToDurationNullable(this.value); factory SimpleClassNullableOfBigIntToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDurationNullableToJson(this); @@ -2299,13 +2001,11 @@ class SimpleClassNullableOfBigIntToDurationNullable { class SimpleClassOfDateTimeToDurationNullable { final Map value; - SimpleClassOfDateTimeToDurationNullable( - this.value, - ); + SimpleClassOfDateTimeToDurationNullable(this.value); factory SimpleClassOfDateTimeToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToDurationNullableToJson(this); @@ -2315,13 +2015,11 @@ class SimpleClassOfDateTimeToDurationNullable { class SimpleClassNullableOfDateTimeToDurationNullable { final Map? value; - SimpleClassNullableOfDateTimeToDurationNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToDurationNullable(this.value); factory SimpleClassNullableOfDateTimeToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDurationNullableToJson(this); @@ -2331,13 +2029,11 @@ class SimpleClassNullableOfDateTimeToDurationNullable { class SimpleClassOfDynamicToDurationNullable { final Map value; - SimpleClassOfDynamicToDurationNullable( - this.value, - ); + SimpleClassOfDynamicToDurationNullable(this.value); factory SimpleClassOfDynamicToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToDurationNullableToJson(this); @@ -2347,13 +2043,11 @@ class SimpleClassOfDynamicToDurationNullable { class SimpleClassNullableOfDynamicToDurationNullable { final Map? value; - SimpleClassNullableOfDynamicToDurationNullable( - this.value, - ); + SimpleClassNullableOfDynamicToDurationNullable(this.value); factory SimpleClassNullableOfDynamicToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDurationNullableToJson(this); @@ -2363,13 +2057,11 @@ class SimpleClassNullableOfDynamicToDurationNullable { class SimpleClassOfEnumTypeToDurationNullable { final Map value; - SimpleClassOfEnumTypeToDurationNullable( - this.value, - ); + SimpleClassOfEnumTypeToDurationNullable(this.value); factory SimpleClassOfEnumTypeToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToDurationNullableToJson(this); @@ -2379,13 +2071,11 @@ class SimpleClassOfEnumTypeToDurationNullable { class SimpleClassNullableOfEnumTypeToDurationNullable { final Map? value; - SimpleClassNullableOfEnumTypeToDurationNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToDurationNullable(this.value); factory SimpleClassNullableOfEnumTypeToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDurationNullableToJson(this); @@ -2395,13 +2085,11 @@ class SimpleClassNullableOfEnumTypeToDurationNullable { class SimpleClassOfIntToDurationNullable { final Map value; - SimpleClassOfIntToDurationNullable( - this.value, - ); + SimpleClassOfIntToDurationNullable(this.value); factory SimpleClassOfIntToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfIntToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToDurationNullableToJson(this); @@ -2411,13 +2099,11 @@ class SimpleClassOfIntToDurationNullable { class SimpleClassNullableOfIntToDurationNullable { final Map? value; - SimpleClassNullableOfIntToDurationNullable( - this.value, - ); + SimpleClassNullableOfIntToDurationNullable(this.value); factory SimpleClassNullableOfIntToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDurationNullableToJson(this); @@ -2427,13 +2113,11 @@ class SimpleClassNullableOfIntToDurationNullable { class SimpleClassOfObjectToDurationNullable { final Map value; - SimpleClassOfObjectToDurationNullable( - this.value, - ); + SimpleClassOfObjectToDurationNullable(this.value); factory SimpleClassOfObjectToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToDurationNullableToJson(this); @@ -2443,13 +2127,11 @@ class SimpleClassOfObjectToDurationNullable { class SimpleClassNullableOfObjectToDurationNullable { final Map? value; - SimpleClassNullableOfObjectToDurationNullable( - this.value, - ); + SimpleClassNullableOfObjectToDurationNullable(this.value); factory SimpleClassNullableOfObjectToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDurationNullableToJson(this); @@ -2459,13 +2141,11 @@ class SimpleClassNullableOfObjectToDurationNullable { class SimpleClassOfStringToDurationNullable { final Map value; - SimpleClassOfStringToDurationNullable( - this.value, - ); + SimpleClassOfStringToDurationNullable(this.value); factory SimpleClassOfStringToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfStringToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToDurationNullableToJson(this); @@ -2475,13 +2155,11 @@ class SimpleClassOfStringToDurationNullable { class SimpleClassNullableOfStringToDurationNullable { final Map? value; - SimpleClassNullableOfStringToDurationNullable( - this.value, - ); + SimpleClassNullableOfStringToDurationNullable(this.value); factory SimpleClassNullableOfStringToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDurationNullableToJson(this); @@ -2491,13 +2169,11 @@ class SimpleClassNullableOfStringToDurationNullable { class SimpleClassOfUriToDurationNullable { final Map value; - SimpleClassOfUriToDurationNullable( - this.value, - ); + SimpleClassOfUriToDurationNullable(this.value); factory SimpleClassOfUriToDurationNullable.fromJson( - Map json) => - _$SimpleClassOfUriToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToDurationNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToDurationNullableToJson(this); @@ -2507,13 +2183,11 @@ class SimpleClassOfUriToDurationNullable { class SimpleClassNullableOfUriToDurationNullable { final Map? value; - SimpleClassNullableOfUriToDurationNullable( - this.value, - ); + SimpleClassNullableOfUriToDurationNullable(this.value); factory SimpleClassNullableOfUriToDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDurationNullableToJson(this); @@ -2523,9 +2197,7 @@ class SimpleClassNullableOfUriToDurationNullable { class SimpleClassOfBigIntToDynamic { final Map value; - SimpleClassOfBigIntToDynamic( - this.value, - ); + SimpleClassOfBigIntToDynamic(this.value); factory SimpleClassOfBigIntToDynamic.fromJson(Map json) => _$SimpleClassOfBigIntToDynamicFromJson(json); @@ -2537,13 +2209,11 @@ class SimpleClassOfBigIntToDynamic { class SimpleClassNullableOfBigIntToDynamic { final Map? value; - SimpleClassNullableOfBigIntToDynamic( - this.value, - ); + SimpleClassNullableOfBigIntToDynamic(this.value); factory SimpleClassNullableOfBigIntToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToDynamicToJson(this); @@ -2553,9 +2223,7 @@ class SimpleClassNullableOfBigIntToDynamic { class SimpleClassOfDateTimeToDynamic { final Map value; - SimpleClassOfDateTimeToDynamic( - this.value, - ); + SimpleClassOfDateTimeToDynamic(this.value); factory SimpleClassOfDateTimeToDynamic.fromJson(Map json) => _$SimpleClassOfDateTimeToDynamicFromJson(json); @@ -2567,13 +2235,11 @@ class SimpleClassOfDateTimeToDynamic { class SimpleClassNullableOfDateTimeToDynamic { final Map? value; - SimpleClassNullableOfDateTimeToDynamic( - this.value, - ); + SimpleClassNullableOfDateTimeToDynamic(this.value); factory SimpleClassNullableOfDateTimeToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToDynamicToJson(this); @@ -2583,9 +2249,7 @@ class SimpleClassNullableOfDateTimeToDynamic { class SimpleClassOfDynamicToDynamic { final Map value; - SimpleClassOfDynamicToDynamic( - this.value, - ); + SimpleClassOfDynamicToDynamic(this.value); factory SimpleClassOfDynamicToDynamic.fromJson(Map json) => _$SimpleClassOfDynamicToDynamicFromJson(json); @@ -2597,13 +2261,11 @@ class SimpleClassOfDynamicToDynamic { class SimpleClassNullableOfDynamicToDynamic { final Map? value; - SimpleClassNullableOfDynamicToDynamic( - this.value, - ); + SimpleClassNullableOfDynamicToDynamic(this.value); factory SimpleClassNullableOfDynamicToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToDynamicToJson(this); @@ -2613,9 +2275,7 @@ class SimpleClassNullableOfDynamicToDynamic { class SimpleClassOfEnumTypeToDynamic { final Map value; - SimpleClassOfEnumTypeToDynamic( - this.value, - ); + SimpleClassOfEnumTypeToDynamic(this.value); factory SimpleClassOfEnumTypeToDynamic.fromJson(Map json) => _$SimpleClassOfEnumTypeToDynamicFromJson(json); @@ -2627,13 +2287,11 @@ class SimpleClassOfEnumTypeToDynamic { class SimpleClassNullableOfEnumTypeToDynamic { final Map? value; - SimpleClassNullableOfEnumTypeToDynamic( - this.value, - ); + SimpleClassNullableOfEnumTypeToDynamic(this.value); factory SimpleClassNullableOfEnumTypeToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToDynamicToJson(this); @@ -2643,9 +2301,7 @@ class SimpleClassNullableOfEnumTypeToDynamic { class SimpleClassOfIntToDynamic { final Map value; - SimpleClassOfIntToDynamic( - this.value, - ); + SimpleClassOfIntToDynamic(this.value); factory SimpleClassOfIntToDynamic.fromJson(Map json) => _$SimpleClassOfIntToDynamicFromJson(json); @@ -2657,13 +2313,11 @@ class SimpleClassOfIntToDynamic { class SimpleClassNullableOfIntToDynamic { final Map? value; - SimpleClassNullableOfIntToDynamic( - this.value, - ); + SimpleClassNullableOfIntToDynamic(this.value); factory SimpleClassNullableOfIntToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfIntToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToDynamicToJson(this); @@ -2673,9 +2327,7 @@ class SimpleClassNullableOfIntToDynamic { class SimpleClassOfObjectToDynamic { final Map value; - SimpleClassOfObjectToDynamic( - this.value, - ); + SimpleClassOfObjectToDynamic(this.value); factory SimpleClassOfObjectToDynamic.fromJson(Map json) => _$SimpleClassOfObjectToDynamicFromJson(json); @@ -2687,13 +2339,11 @@ class SimpleClassOfObjectToDynamic { class SimpleClassNullableOfObjectToDynamic { final Map? value; - SimpleClassNullableOfObjectToDynamic( - this.value, - ); + SimpleClassNullableOfObjectToDynamic(this.value); factory SimpleClassNullableOfObjectToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToDynamicToJson(this); @@ -2703,9 +2353,7 @@ class SimpleClassNullableOfObjectToDynamic { class SimpleClassOfStringToDynamic { final Map value; - SimpleClassOfStringToDynamic( - this.value, - ); + SimpleClassOfStringToDynamic(this.value); factory SimpleClassOfStringToDynamic.fromJson(Map json) => _$SimpleClassOfStringToDynamicFromJson(json); @@ -2717,13 +2365,11 @@ class SimpleClassOfStringToDynamic { class SimpleClassNullableOfStringToDynamic { final Map? value; - SimpleClassNullableOfStringToDynamic( - this.value, - ); + SimpleClassNullableOfStringToDynamic(this.value); factory SimpleClassNullableOfStringToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfStringToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToDynamicToJson(this); @@ -2733,9 +2379,7 @@ class SimpleClassNullableOfStringToDynamic { class SimpleClassOfUriToDynamic { final Map value; - SimpleClassOfUriToDynamic( - this.value, - ); + SimpleClassOfUriToDynamic(this.value); factory SimpleClassOfUriToDynamic.fromJson(Map json) => _$SimpleClassOfUriToDynamicFromJson(json); @@ -2747,13 +2391,11 @@ class SimpleClassOfUriToDynamic { class SimpleClassNullableOfUriToDynamic { final Map? value; - SimpleClassNullableOfUriToDynamic( - this.value, - ); + SimpleClassNullableOfUriToDynamic(this.value); factory SimpleClassNullableOfUriToDynamic.fromJson( - Map json) => - _$SimpleClassNullableOfUriToDynamicFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToDynamicFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToDynamicToJson(this); @@ -2763,9 +2405,7 @@ class SimpleClassNullableOfUriToDynamic { class SimpleClassOfBigIntToEnumType { final Map value; - SimpleClassOfBigIntToEnumType( - this.value, - ); + SimpleClassOfBigIntToEnumType(this.value); factory SimpleClassOfBigIntToEnumType.fromJson(Map json) => _$SimpleClassOfBigIntToEnumTypeFromJson(json); @@ -2777,13 +2417,11 @@ class SimpleClassOfBigIntToEnumType { class SimpleClassNullableOfBigIntToEnumType { final Map? value; - SimpleClassNullableOfBigIntToEnumType( - this.value, - ); + SimpleClassNullableOfBigIntToEnumType(this.value); factory SimpleClassNullableOfBigIntToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToEnumTypeToJson(this); @@ -2793,9 +2431,7 @@ class SimpleClassNullableOfBigIntToEnumType { class SimpleClassOfDateTimeToEnumType { final Map value; - SimpleClassOfDateTimeToEnumType( - this.value, - ); + SimpleClassOfDateTimeToEnumType(this.value); factory SimpleClassOfDateTimeToEnumType.fromJson(Map json) => _$SimpleClassOfDateTimeToEnumTypeFromJson(json); @@ -2808,13 +2444,11 @@ class SimpleClassOfDateTimeToEnumType { class SimpleClassNullableOfDateTimeToEnumType { final Map? value; - SimpleClassNullableOfDateTimeToEnumType( - this.value, - ); + SimpleClassNullableOfDateTimeToEnumType(this.value); factory SimpleClassNullableOfDateTimeToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToEnumTypeToJson(this); @@ -2824,9 +2458,7 @@ class SimpleClassNullableOfDateTimeToEnumType { class SimpleClassOfDynamicToEnumType { final Map value; - SimpleClassOfDynamicToEnumType( - this.value, - ); + SimpleClassOfDynamicToEnumType(this.value); factory SimpleClassOfDynamicToEnumType.fromJson(Map json) => _$SimpleClassOfDynamicToEnumTypeFromJson(json); @@ -2838,13 +2470,11 @@ class SimpleClassOfDynamicToEnumType { class SimpleClassNullableOfDynamicToEnumType { final Map? value; - SimpleClassNullableOfDynamicToEnumType( - this.value, - ); + SimpleClassNullableOfDynamicToEnumType(this.value); factory SimpleClassNullableOfDynamicToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToEnumTypeToJson(this); @@ -2854,9 +2484,7 @@ class SimpleClassNullableOfDynamicToEnumType { class SimpleClassOfEnumTypeToEnumType { final Map value; - SimpleClassOfEnumTypeToEnumType( - this.value, - ); + SimpleClassOfEnumTypeToEnumType(this.value); factory SimpleClassOfEnumTypeToEnumType.fromJson(Map json) => _$SimpleClassOfEnumTypeToEnumTypeFromJson(json); @@ -2869,13 +2497,11 @@ class SimpleClassOfEnumTypeToEnumType { class SimpleClassNullableOfEnumTypeToEnumType { final Map? value; - SimpleClassNullableOfEnumTypeToEnumType( - this.value, - ); + SimpleClassNullableOfEnumTypeToEnumType(this.value); factory SimpleClassNullableOfEnumTypeToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToEnumTypeToJson(this); @@ -2885,9 +2511,7 @@ class SimpleClassNullableOfEnumTypeToEnumType { class SimpleClassOfIntToEnumType { final Map value; - SimpleClassOfIntToEnumType( - this.value, - ); + SimpleClassOfIntToEnumType(this.value); factory SimpleClassOfIntToEnumType.fromJson(Map json) => _$SimpleClassOfIntToEnumTypeFromJson(json); @@ -2899,13 +2523,11 @@ class SimpleClassOfIntToEnumType { class SimpleClassNullableOfIntToEnumType { final Map? value; - SimpleClassNullableOfIntToEnumType( - this.value, - ); + SimpleClassNullableOfIntToEnumType(this.value); factory SimpleClassNullableOfIntToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfIntToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToEnumTypeToJson(this); @@ -2915,9 +2537,7 @@ class SimpleClassNullableOfIntToEnumType { class SimpleClassOfObjectToEnumType { final Map value; - SimpleClassOfObjectToEnumType( - this.value, - ); + SimpleClassOfObjectToEnumType(this.value); factory SimpleClassOfObjectToEnumType.fromJson(Map json) => _$SimpleClassOfObjectToEnumTypeFromJson(json); @@ -2929,13 +2549,11 @@ class SimpleClassOfObjectToEnumType { class SimpleClassNullableOfObjectToEnumType { final Map? value; - SimpleClassNullableOfObjectToEnumType( - this.value, - ); + SimpleClassNullableOfObjectToEnumType(this.value); factory SimpleClassNullableOfObjectToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToEnumTypeToJson(this); @@ -2945,9 +2563,7 @@ class SimpleClassNullableOfObjectToEnumType { class SimpleClassOfStringToEnumType { final Map value; - SimpleClassOfStringToEnumType( - this.value, - ); + SimpleClassOfStringToEnumType(this.value); factory SimpleClassOfStringToEnumType.fromJson(Map json) => _$SimpleClassOfStringToEnumTypeFromJson(json); @@ -2959,13 +2575,11 @@ class SimpleClassOfStringToEnumType { class SimpleClassNullableOfStringToEnumType { final Map? value; - SimpleClassNullableOfStringToEnumType( - this.value, - ); + SimpleClassNullableOfStringToEnumType(this.value); factory SimpleClassNullableOfStringToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfStringToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToEnumTypeToJson(this); @@ -2975,9 +2589,7 @@ class SimpleClassNullableOfStringToEnumType { class SimpleClassOfUriToEnumType { final Map value; - SimpleClassOfUriToEnumType( - this.value, - ); + SimpleClassOfUriToEnumType(this.value); factory SimpleClassOfUriToEnumType.fromJson(Map json) => _$SimpleClassOfUriToEnumTypeFromJson(json); @@ -2989,13 +2601,11 @@ class SimpleClassOfUriToEnumType { class SimpleClassNullableOfUriToEnumType { final Map? value; - SimpleClassNullableOfUriToEnumType( - this.value, - ); + SimpleClassNullableOfUriToEnumType(this.value); factory SimpleClassNullableOfUriToEnumType.fromJson( - Map json) => - _$SimpleClassNullableOfUriToEnumTypeFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToEnumTypeFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToEnumTypeToJson(this); @@ -3005,13 +2615,11 @@ class SimpleClassNullableOfUriToEnumType { class SimpleClassOfBigIntToEnumTypeNullable { final Map value; - SimpleClassOfBigIntToEnumTypeNullable( - this.value, - ); + SimpleClassOfBigIntToEnumTypeNullable(this.value); factory SimpleClassOfBigIntToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToEnumTypeNullableToJson(this); @@ -3021,13 +2629,11 @@ class SimpleClassOfBigIntToEnumTypeNullable { class SimpleClassNullableOfBigIntToEnumTypeNullable { final Map? value; - SimpleClassNullableOfBigIntToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfBigIntToEnumTypeNullable(this.value); factory SimpleClassNullableOfBigIntToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToEnumTypeNullableToJson(this); @@ -3037,13 +2643,11 @@ class SimpleClassNullableOfBigIntToEnumTypeNullable { class SimpleClassOfDateTimeToEnumTypeNullable { final Map value; - SimpleClassOfDateTimeToEnumTypeNullable( - this.value, - ); + SimpleClassOfDateTimeToEnumTypeNullable(this.value); factory SimpleClassOfDateTimeToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToEnumTypeNullableToJson(this); @@ -3053,13 +2657,11 @@ class SimpleClassOfDateTimeToEnumTypeNullable { class SimpleClassNullableOfDateTimeToEnumTypeNullable { final Map? value; - SimpleClassNullableOfDateTimeToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToEnumTypeNullable(this.value); factory SimpleClassNullableOfDateTimeToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToEnumTypeNullableToJson(this); @@ -3069,13 +2671,11 @@ class SimpleClassNullableOfDateTimeToEnumTypeNullable { class SimpleClassOfDynamicToEnumTypeNullable { final Map value; - SimpleClassOfDynamicToEnumTypeNullable( - this.value, - ); + SimpleClassOfDynamicToEnumTypeNullable(this.value); factory SimpleClassOfDynamicToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToEnumTypeNullableToJson(this); @@ -3085,13 +2685,11 @@ class SimpleClassOfDynamicToEnumTypeNullable { class SimpleClassNullableOfDynamicToEnumTypeNullable { final Map? value; - SimpleClassNullableOfDynamicToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfDynamicToEnumTypeNullable(this.value); factory SimpleClassNullableOfDynamicToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToEnumTypeNullableToJson(this); @@ -3101,13 +2699,11 @@ class SimpleClassNullableOfDynamicToEnumTypeNullable { class SimpleClassOfEnumTypeToEnumTypeNullable { final Map value; - SimpleClassOfEnumTypeToEnumTypeNullable( - this.value, - ); + SimpleClassOfEnumTypeToEnumTypeNullable(this.value); factory SimpleClassOfEnumTypeToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToEnumTypeNullableToJson(this); @@ -3117,13 +2713,11 @@ class SimpleClassOfEnumTypeToEnumTypeNullable { class SimpleClassNullableOfEnumTypeToEnumTypeNullable { final Map? value; - SimpleClassNullableOfEnumTypeToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToEnumTypeNullable(this.value); factory SimpleClassNullableOfEnumTypeToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToEnumTypeNullableToJson(this); @@ -3133,13 +2727,11 @@ class SimpleClassNullableOfEnumTypeToEnumTypeNullable { class SimpleClassOfIntToEnumTypeNullable { final Map value; - SimpleClassOfIntToEnumTypeNullable( - this.value, - ); + SimpleClassOfIntToEnumTypeNullable(this.value); factory SimpleClassOfIntToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfIntToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToEnumTypeNullableToJson(this); @@ -3149,13 +2741,11 @@ class SimpleClassOfIntToEnumTypeNullable { class SimpleClassNullableOfIntToEnumTypeNullable { final Map? value; - SimpleClassNullableOfIntToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfIntToEnumTypeNullable(this.value); factory SimpleClassNullableOfIntToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToEnumTypeNullableToJson(this); @@ -3165,13 +2755,11 @@ class SimpleClassNullableOfIntToEnumTypeNullable { class SimpleClassOfObjectToEnumTypeNullable { final Map value; - SimpleClassOfObjectToEnumTypeNullable( - this.value, - ); + SimpleClassOfObjectToEnumTypeNullable(this.value); factory SimpleClassOfObjectToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToEnumTypeNullableToJson(this); @@ -3181,13 +2769,11 @@ class SimpleClassOfObjectToEnumTypeNullable { class SimpleClassNullableOfObjectToEnumTypeNullable { final Map? value; - SimpleClassNullableOfObjectToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfObjectToEnumTypeNullable(this.value); factory SimpleClassNullableOfObjectToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToEnumTypeNullableToJson(this); @@ -3197,13 +2783,11 @@ class SimpleClassNullableOfObjectToEnumTypeNullable { class SimpleClassOfStringToEnumTypeNullable { final Map value; - SimpleClassOfStringToEnumTypeNullable( - this.value, - ); + SimpleClassOfStringToEnumTypeNullable(this.value); factory SimpleClassOfStringToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfStringToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToEnumTypeNullableToJson(this); @@ -3213,13 +2797,11 @@ class SimpleClassOfStringToEnumTypeNullable { class SimpleClassNullableOfStringToEnumTypeNullable { final Map? value; - SimpleClassNullableOfStringToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfStringToEnumTypeNullable(this.value); factory SimpleClassNullableOfStringToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToEnumTypeNullableToJson(this); @@ -3229,13 +2811,11 @@ class SimpleClassNullableOfStringToEnumTypeNullable { class SimpleClassOfUriToEnumTypeNullable { final Map value; - SimpleClassOfUriToEnumTypeNullable( - this.value, - ); + SimpleClassOfUriToEnumTypeNullable(this.value); factory SimpleClassOfUriToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassOfUriToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToEnumTypeNullableToJson(this); @@ -3245,13 +2825,11 @@ class SimpleClassOfUriToEnumTypeNullable { class SimpleClassNullableOfUriToEnumTypeNullable { final Map? value; - SimpleClassNullableOfUriToEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfUriToEnumTypeNullable(this.value); factory SimpleClassNullableOfUriToEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToEnumTypeNullableToJson(this); @@ -3261,13 +2839,11 @@ class SimpleClassNullableOfUriToEnumTypeNullable { class SimpleClassOfBigIntToFromJsonDynamicParam { final Map value; - SimpleClassOfBigIntToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfBigIntToFromJsonDynamicParam(this.value); factory SimpleClassOfBigIntToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfBigIntToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfBigIntToFromJsonDynamicParamToJson(this); @@ -3277,13 +2853,11 @@ class SimpleClassOfBigIntToFromJsonDynamicParam { class SimpleClassNullableOfBigIntToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfBigIntToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfBigIntToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfBigIntToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToFromJsonDynamicParamToJson(this); @@ -3293,13 +2867,11 @@ class SimpleClassNullableOfBigIntToFromJsonDynamicParam { class SimpleClassOfDateTimeToFromJsonDynamicParam { final Map value; - SimpleClassOfDateTimeToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfDateTimeToFromJsonDynamicParam(this.value); factory SimpleClassOfDateTimeToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfDateTimeToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToFromJsonDynamicParamToJson(this); @@ -3309,13 +2881,11 @@ class SimpleClassOfDateTimeToFromJsonDynamicParam { class SimpleClassNullableOfDateTimeToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfDateTimeToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfDateTimeToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfDateTimeToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToFromJsonDynamicParamToJson(this); @@ -3325,13 +2895,11 @@ class SimpleClassNullableOfDateTimeToFromJsonDynamicParam { class SimpleClassOfDynamicToFromJsonDynamicParam { final Map value; - SimpleClassOfDynamicToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfDynamicToFromJsonDynamicParam(this.value); factory SimpleClassOfDynamicToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfDynamicToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfDynamicToFromJsonDynamicParamToJson(this); @@ -3341,13 +2909,11 @@ class SimpleClassOfDynamicToFromJsonDynamicParam { class SimpleClassNullableOfDynamicToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfDynamicToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfDynamicToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfDynamicToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToFromJsonDynamicParamToJson(this); @@ -3357,13 +2923,11 @@ class SimpleClassNullableOfDynamicToFromJsonDynamicParam { class SimpleClassOfEnumTypeToFromJsonDynamicParam { final Map value; - SimpleClassOfEnumTypeToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfEnumTypeToFromJsonDynamicParam(this.value); factory SimpleClassOfEnumTypeToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToFromJsonDynamicParamToJson(this); @@ -3373,13 +2937,11 @@ class SimpleClassOfEnumTypeToFromJsonDynamicParam { class SimpleClassNullableOfEnumTypeToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfEnumTypeToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfEnumTypeToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfEnumTypeToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamToJson(this); @@ -3389,13 +2951,11 @@ class SimpleClassNullableOfEnumTypeToFromJsonDynamicParam { class SimpleClassOfIntToFromJsonDynamicParam { final Map value; - SimpleClassOfIntToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfIntToFromJsonDynamicParam(this.value); factory SimpleClassOfIntToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfIntToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfIntToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfIntToFromJsonDynamicParamToJson(this); @@ -3405,13 +2965,11 @@ class SimpleClassOfIntToFromJsonDynamicParam { class SimpleClassNullableOfIntToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfIntToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfIntToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfIntToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfIntToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToFromJsonDynamicParamToJson(this); @@ -3421,13 +2979,11 @@ class SimpleClassNullableOfIntToFromJsonDynamicParam { class SimpleClassOfObjectToFromJsonDynamicParam { final Map value; - SimpleClassOfObjectToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfObjectToFromJsonDynamicParam(this.value); factory SimpleClassOfObjectToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfObjectToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfObjectToFromJsonDynamicParamToJson(this); @@ -3437,13 +2993,11 @@ class SimpleClassOfObjectToFromJsonDynamicParam { class SimpleClassNullableOfObjectToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfObjectToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfObjectToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfObjectToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToFromJsonDynamicParamToJson(this); @@ -3453,13 +3007,11 @@ class SimpleClassNullableOfObjectToFromJsonDynamicParam { class SimpleClassOfStringToFromJsonDynamicParam { final Map value; - SimpleClassOfStringToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfStringToFromJsonDynamicParam(this.value); factory SimpleClassOfStringToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfStringToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfStringToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfStringToFromJsonDynamicParamToJson(this); @@ -3469,13 +3021,11 @@ class SimpleClassOfStringToFromJsonDynamicParam { class SimpleClassNullableOfStringToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfStringToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfStringToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfStringToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfStringToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToFromJsonDynamicParamToJson(this); @@ -3485,13 +3035,11 @@ class SimpleClassNullableOfStringToFromJsonDynamicParam { class SimpleClassOfUriToFromJsonDynamicParam { final Map value; - SimpleClassOfUriToFromJsonDynamicParam( - this.value, - ); + SimpleClassOfUriToFromJsonDynamicParam(this.value); factory SimpleClassOfUriToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfUriToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfUriToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfUriToFromJsonDynamicParamToJson(this); @@ -3501,13 +3049,11 @@ class SimpleClassOfUriToFromJsonDynamicParam { class SimpleClassNullableOfUriToFromJsonDynamicParam { final Map? value; - SimpleClassNullableOfUriToFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfUriToFromJsonDynamicParam(this.value); factory SimpleClassNullableOfUriToFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfUriToFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToFromJsonDynamicParamToJson(this); @@ -3517,13 +3063,11 @@ class SimpleClassNullableOfUriToFromJsonDynamicParam { class SimpleClassOfBigIntToFromJsonNullableObjectParam { final Map value; - SimpleClassOfBigIntToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfBigIntToFromJsonNullableObjectParam(this.value); factory SimpleClassOfBigIntToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfBigIntToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfBigIntToFromJsonNullableObjectParamToJson(this); @@ -3533,13 +3077,11 @@ class SimpleClassOfBigIntToFromJsonNullableObjectParam { class SimpleClassNullableOfBigIntToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfBigIntToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfBigIntToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfBigIntToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamToJson(this); @@ -3549,13 +3091,11 @@ class SimpleClassNullableOfBigIntToFromJsonNullableObjectParam { class SimpleClassOfDateTimeToFromJsonNullableObjectParam { final Map value; - SimpleClassOfDateTimeToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfDateTimeToFromJsonNullableObjectParam(this.value); factory SimpleClassOfDateTimeToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfDateTimeToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToFromJsonNullableObjectParamToJson(this); @@ -3565,14 +3105,13 @@ class SimpleClassOfDateTimeToFromJsonNullableObjectParam { class SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamFromJson( - json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamFromJson( + json, + ); Map toJson() => _$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamToJson(this); @@ -3582,13 +3121,11 @@ class SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam { class SimpleClassOfDynamicToFromJsonNullableObjectParam { final Map value; - SimpleClassOfDynamicToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfDynamicToFromJsonNullableObjectParam(this.value); factory SimpleClassOfDynamicToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfDynamicToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfDynamicToFromJsonNullableObjectParamToJson(this); @@ -3598,12 +3135,11 @@ class SimpleClassOfDynamicToFromJsonNullableObjectParam { class SimpleClassNullableOfDynamicToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfDynamicToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfDynamicToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfDynamicToFromJsonNullableObjectParam.fromJson( - Map json) => + Map json, + ) => _$SimpleClassNullableOfDynamicToFromJsonNullableObjectParamFromJson(json); Map toJson() => @@ -3614,13 +3150,11 @@ class SimpleClassNullableOfDynamicToFromJsonNullableObjectParam { class SimpleClassOfEnumTypeToFromJsonNullableObjectParam { final Map value; - SimpleClassOfEnumTypeToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfEnumTypeToFromJsonNullableObjectParam(this.value); factory SimpleClassOfEnumTypeToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToFromJsonNullableObjectParamToJson(this); @@ -3630,14 +3164,13 @@ class SimpleClassOfEnumTypeToFromJsonNullableObjectParam { class SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamFromJson( - json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamFromJson( + json, + ); Map toJson() => _$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamToJson(this); @@ -3647,13 +3180,11 @@ class SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam { class SimpleClassOfIntToFromJsonNullableObjectParam { final Map value; - SimpleClassOfIntToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfIntToFromJsonNullableObjectParam(this.value); factory SimpleClassOfIntToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfIntToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfIntToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfIntToFromJsonNullableObjectParamToJson(this); @@ -3663,13 +3194,11 @@ class SimpleClassOfIntToFromJsonNullableObjectParam { class SimpleClassNullableOfIntToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfIntToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfIntToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfIntToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfIntToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToFromJsonNullableObjectParamToJson(this); @@ -3679,13 +3208,11 @@ class SimpleClassNullableOfIntToFromJsonNullableObjectParam { class SimpleClassOfObjectToFromJsonNullableObjectParam { final Map value; - SimpleClassOfObjectToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfObjectToFromJsonNullableObjectParam(this.value); factory SimpleClassOfObjectToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfObjectToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfObjectToFromJsonNullableObjectParamToJson(this); @@ -3695,13 +3222,11 @@ class SimpleClassOfObjectToFromJsonNullableObjectParam { class SimpleClassNullableOfObjectToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfObjectToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfObjectToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfObjectToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToFromJsonNullableObjectParamToJson(this); @@ -3711,13 +3236,11 @@ class SimpleClassNullableOfObjectToFromJsonNullableObjectParam { class SimpleClassOfStringToFromJsonNullableObjectParam { final Map value; - SimpleClassOfStringToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfStringToFromJsonNullableObjectParam(this.value); factory SimpleClassOfStringToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfStringToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfStringToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfStringToFromJsonNullableObjectParamToJson(this); @@ -3727,13 +3250,11 @@ class SimpleClassOfStringToFromJsonNullableObjectParam { class SimpleClassNullableOfStringToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfStringToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfStringToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfStringToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfStringToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToFromJsonNullableObjectParamToJson(this); @@ -3743,13 +3264,11 @@ class SimpleClassNullableOfStringToFromJsonNullableObjectParam { class SimpleClassOfUriToFromJsonNullableObjectParam { final Map value; - SimpleClassOfUriToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfUriToFromJsonNullableObjectParam(this.value); factory SimpleClassOfUriToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfUriToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfUriToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfUriToFromJsonNullableObjectParamToJson(this); @@ -3759,13 +3278,11 @@ class SimpleClassOfUriToFromJsonNullableObjectParam { class SimpleClassNullableOfUriToFromJsonNullableObjectParam { final Map? value; - SimpleClassNullableOfUriToFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfUriToFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfUriToFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfUriToFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToFromJsonNullableObjectParamToJson(this); @@ -3775,13 +3292,11 @@ class SimpleClassNullableOfUriToFromJsonNullableObjectParam { class SimpleClassOfBigIntToFromJsonObjectParam { final Map value; - SimpleClassOfBigIntToFromJsonObjectParam( - this.value, - ); + SimpleClassOfBigIntToFromJsonObjectParam(this.value); factory SimpleClassOfBigIntToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfBigIntToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfBigIntToFromJsonObjectParamToJson(this); @@ -3791,13 +3306,11 @@ class SimpleClassOfBigIntToFromJsonObjectParam { class SimpleClassNullableOfBigIntToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfBigIntToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfBigIntToFromJsonObjectParam(this.value); factory SimpleClassNullableOfBigIntToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToFromJsonObjectParamToJson(this); @@ -3807,13 +3320,11 @@ class SimpleClassNullableOfBigIntToFromJsonObjectParam { class SimpleClassOfDateTimeToFromJsonObjectParam { final Map value; - SimpleClassOfDateTimeToFromJsonObjectParam( - this.value, - ); + SimpleClassOfDateTimeToFromJsonObjectParam(this.value); factory SimpleClassOfDateTimeToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfDateTimeToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToFromJsonObjectParamToJson(this); @@ -3823,13 +3334,11 @@ class SimpleClassOfDateTimeToFromJsonObjectParam { class SimpleClassNullableOfDateTimeToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfDateTimeToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfDateTimeToFromJsonObjectParam(this.value); factory SimpleClassNullableOfDateTimeToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToFromJsonObjectParamToJson(this); @@ -3839,13 +3348,11 @@ class SimpleClassNullableOfDateTimeToFromJsonObjectParam { class SimpleClassOfDynamicToFromJsonObjectParam { final Map value; - SimpleClassOfDynamicToFromJsonObjectParam( - this.value, - ); + SimpleClassOfDynamicToFromJsonObjectParam(this.value); factory SimpleClassOfDynamicToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfDynamicToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfDynamicToFromJsonObjectParamToJson(this); @@ -3855,13 +3362,11 @@ class SimpleClassOfDynamicToFromJsonObjectParam { class SimpleClassNullableOfDynamicToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfDynamicToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfDynamicToFromJsonObjectParam(this.value); factory SimpleClassNullableOfDynamicToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToFromJsonObjectParamToJson(this); @@ -3871,13 +3376,11 @@ class SimpleClassNullableOfDynamicToFromJsonObjectParam { class SimpleClassOfEnumTypeToFromJsonObjectParam { final Map value; - SimpleClassOfEnumTypeToFromJsonObjectParam( - this.value, - ); + SimpleClassOfEnumTypeToFromJsonObjectParam(this.value); factory SimpleClassOfEnumTypeToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToFromJsonObjectParamToJson(this); @@ -3887,13 +3390,11 @@ class SimpleClassOfEnumTypeToFromJsonObjectParam { class SimpleClassNullableOfEnumTypeToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfEnumTypeToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfEnumTypeToFromJsonObjectParam(this.value); factory SimpleClassNullableOfEnumTypeToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToFromJsonObjectParamToJson(this); @@ -3903,13 +3404,11 @@ class SimpleClassNullableOfEnumTypeToFromJsonObjectParam { class SimpleClassOfIntToFromJsonObjectParam { final Map value; - SimpleClassOfIntToFromJsonObjectParam( - this.value, - ); + SimpleClassOfIntToFromJsonObjectParam(this.value); factory SimpleClassOfIntToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfIntToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfIntToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfIntToFromJsonObjectParamToJson(this); @@ -3919,13 +3418,11 @@ class SimpleClassOfIntToFromJsonObjectParam { class SimpleClassNullableOfIntToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfIntToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfIntToFromJsonObjectParam(this.value); factory SimpleClassNullableOfIntToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfIntToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToFromJsonObjectParamToJson(this); @@ -3935,13 +3432,11 @@ class SimpleClassNullableOfIntToFromJsonObjectParam { class SimpleClassOfObjectToFromJsonObjectParam { final Map value; - SimpleClassOfObjectToFromJsonObjectParam( - this.value, - ); + SimpleClassOfObjectToFromJsonObjectParam(this.value); factory SimpleClassOfObjectToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfObjectToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfObjectToFromJsonObjectParamToJson(this); @@ -3951,13 +3446,11 @@ class SimpleClassOfObjectToFromJsonObjectParam { class SimpleClassNullableOfObjectToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfObjectToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfObjectToFromJsonObjectParam(this.value); factory SimpleClassNullableOfObjectToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToFromJsonObjectParamToJson(this); @@ -3967,13 +3460,11 @@ class SimpleClassNullableOfObjectToFromJsonObjectParam { class SimpleClassOfStringToFromJsonObjectParam { final Map value; - SimpleClassOfStringToFromJsonObjectParam( - this.value, - ); + SimpleClassOfStringToFromJsonObjectParam(this.value); factory SimpleClassOfStringToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfStringToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfStringToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfStringToFromJsonObjectParamToJson(this); @@ -3983,13 +3474,11 @@ class SimpleClassOfStringToFromJsonObjectParam { class SimpleClassNullableOfStringToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfStringToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfStringToFromJsonObjectParam(this.value); factory SimpleClassNullableOfStringToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfStringToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToFromJsonObjectParamToJson(this); @@ -3999,13 +3488,11 @@ class SimpleClassNullableOfStringToFromJsonObjectParam { class SimpleClassOfUriToFromJsonObjectParam { final Map value; - SimpleClassOfUriToFromJsonObjectParam( - this.value, - ); + SimpleClassOfUriToFromJsonObjectParam(this.value); factory SimpleClassOfUriToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfUriToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfUriToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfUriToFromJsonObjectParamToJson(this); @@ -4015,13 +3502,11 @@ class SimpleClassOfUriToFromJsonObjectParam { class SimpleClassNullableOfUriToFromJsonObjectParam { final Map? value; - SimpleClassNullableOfUriToFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfUriToFromJsonObjectParam(this.value); factory SimpleClassNullableOfUriToFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfUriToFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToFromJsonObjectParamToJson(this); @@ -4031,9 +3516,7 @@ class SimpleClassNullableOfUriToFromJsonObjectParam { class SimpleClassOfBigIntToInt { final Map value; - SimpleClassOfBigIntToInt( - this.value, - ); + SimpleClassOfBigIntToInt(this.value); factory SimpleClassOfBigIntToInt.fromJson(Map json) => _$SimpleClassOfBigIntToIntFromJson(json); @@ -4045,13 +3528,11 @@ class SimpleClassOfBigIntToInt { class SimpleClassNullableOfBigIntToInt { final Map? value; - SimpleClassNullableOfBigIntToInt( - this.value, - ); + SimpleClassNullableOfBigIntToInt(this.value); factory SimpleClassNullableOfBigIntToInt.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToIntToJson(this); @@ -4061,9 +3542,7 @@ class SimpleClassNullableOfBigIntToInt { class SimpleClassOfDateTimeToInt { final Map value; - SimpleClassOfDateTimeToInt( - this.value, - ); + SimpleClassOfDateTimeToInt(this.value); factory SimpleClassOfDateTimeToInt.fromJson(Map json) => _$SimpleClassOfDateTimeToIntFromJson(json); @@ -4075,13 +3554,11 @@ class SimpleClassOfDateTimeToInt { class SimpleClassNullableOfDateTimeToInt { final Map? value; - SimpleClassNullableOfDateTimeToInt( - this.value, - ); + SimpleClassNullableOfDateTimeToInt(this.value); factory SimpleClassNullableOfDateTimeToInt.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToIntToJson(this); @@ -4091,9 +3568,7 @@ class SimpleClassNullableOfDateTimeToInt { class SimpleClassOfDynamicToInt { final Map value; - SimpleClassOfDynamicToInt( - this.value, - ); + SimpleClassOfDynamicToInt(this.value); factory SimpleClassOfDynamicToInt.fromJson(Map json) => _$SimpleClassOfDynamicToIntFromJson(json); @@ -4105,13 +3580,11 @@ class SimpleClassOfDynamicToInt { class SimpleClassNullableOfDynamicToInt { final Map? value; - SimpleClassNullableOfDynamicToInt( - this.value, - ); + SimpleClassNullableOfDynamicToInt(this.value); factory SimpleClassNullableOfDynamicToInt.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToIntToJson(this); @@ -4121,9 +3594,7 @@ class SimpleClassNullableOfDynamicToInt { class SimpleClassOfEnumTypeToInt { final Map value; - SimpleClassOfEnumTypeToInt( - this.value, - ); + SimpleClassOfEnumTypeToInt(this.value); factory SimpleClassOfEnumTypeToInt.fromJson(Map json) => _$SimpleClassOfEnumTypeToIntFromJson(json); @@ -4135,13 +3606,11 @@ class SimpleClassOfEnumTypeToInt { class SimpleClassNullableOfEnumTypeToInt { final Map? value; - SimpleClassNullableOfEnumTypeToInt( - this.value, - ); + SimpleClassNullableOfEnumTypeToInt(this.value); factory SimpleClassNullableOfEnumTypeToInt.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToIntToJson(this); @@ -4151,9 +3620,7 @@ class SimpleClassNullableOfEnumTypeToInt { class SimpleClassOfIntToInt { final Map value; - SimpleClassOfIntToInt( - this.value, - ); + SimpleClassOfIntToInt(this.value); factory SimpleClassOfIntToInt.fromJson(Map json) => _$SimpleClassOfIntToIntFromJson(json); @@ -4165,9 +3632,7 @@ class SimpleClassOfIntToInt { class SimpleClassNullableOfIntToInt { final Map? value; - SimpleClassNullableOfIntToInt( - this.value, - ); + SimpleClassNullableOfIntToInt(this.value); factory SimpleClassNullableOfIntToInt.fromJson(Map json) => _$SimpleClassNullableOfIntToIntFromJson(json); @@ -4179,9 +3644,7 @@ class SimpleClassNullableOfIntToInt { class SimpleClassOfObjectToInt { final Map value; - SimpleClassOfObjectToInt( - this.value, - ); + SimpleClassOfObjectToInt(this.value); factory SimpleClassOfObjectToInt.fromJson(Map json) => _$SimpleClassOfObjectToIntFromJson(json); @@ -4193,13 +3656,11 @@ class SimpleClassOfObjectToInt { class SimpleClassNullableOfObjectToInt { final Map? value; - SimpleClassNullableOfObjectToInt( - this.value, - ); + SimpleClassNullableOfObjectToInt(this.value); factory SimpleClassNullableOfObjectToInt.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToIntToJson(this); @@ -4209,9 +3670,7 @@ class SimpleClassNullableOfObjectToInt { class SimpleClassOfStringToInt { final Map value; - SimpleClassOfStringToInt( - this.value, - ); + SimpleClassOfStringToInt(this.value); factory SimpleClassOfStringToInt.fromJson(Map json) => _$SimpleClassOfStringToIntFromJson(json); @@ -4223,13 +3682,11 @@ class SimpleClassOfStringToInt { class SimpleClassNullableOfStringToInt { final Map? value; - SimpleClassNullableOfStringToInt( - this.value, - ); + SimpleClassNullableOfStringToInt(this.value); factory SimpleClassNullableOfStringToInt.fromJson( - Map json) => - _$SimpleClassNullableOfStringToIntFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToIntFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToIntToJson(this); @@ -4239,9 +3696,7 @@ class SimpleClassNullableOfStringToInt { class SimpleClassOfUriToInt { final Map value; - SimpleClassOfUriToInt( - this.value, - ); + SimpleClassOfUriToInt(this.value); factory SimpleClassOfUriToInt.fromJson(Map json) => _$SimpleClassOfUriToIntFromJson(json); @@ -4253,9 +3708,7 @@ class SimpleClassOfUriToInt { class SimpleClassNullableOfUriToInt { final Map? value; - SimpleClassNullableOfUriToInt( - this.value, - ); + SimpleClassNullableOfUriToInt(this.value); factory SimpleClassNullableOfUriToInt.fromJson(Map json) => _$SimpleClassNullableOfUriToIntFromJson(json); @@ -4267,13 +3720,11 @@ class SimpleClassNullableOfUriToInt { class SimpleClassOfBigIntToIntNullable { final Map value; - SimpleClassOfBigIntToIntNullable( - this.value, - ); + SimpleClassOfBigIntToIntNullable(this.value); factory SimpleClassOfBigIntToIntNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToIntNullableToJson(this); @@ -4283,13 +3734,11 @@ class SimpleClassOfBigIntToIntNullable { class SimpleClassNullableOfBigIntToIntNullable { final Map? value; - SimpleClassNullableOfBigIntToIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntToIntNullable(this.value); factory SimpleClassNullableOfBigIntToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToIntNullableToJson(this); @@ -4299,13 +3748,11 @@ class SimpleClassNullableOfBigIntToIntNullable { class SimpleClassOfDateTimeToIntNullable { final Map value; - SimpleClassOfDateTimeToIntNullable( - this.value, - ); + SimpleClassOfDateTimeToIntNullable(this.value); factory SimpleClassOfDateTimeToIntNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToIntNullableToJson(this); @@ -4315,13 +3762,11 @@ class SimpleClassOfDateTimeToIntNullable { class SimpleClassNullableOfDateTimeToIntNullable { final Map? value; - SimpleClassNullableOfDateTimeToIntNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToIntNullable(this.value); factory SimpleClassNullableOfDateTimeToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToIntNullableToJson(this); @@ -4331,13 +3776,11 @@ class SimpleClassNullableOfDateTimeToIntNullable { class SimpleClassOfDynamicToIntNullable { final Map value; - SimpleClassOfDynamicToIntNullable( - this.value, - ); + SimpleClassOfDynamicToIntNullable(this.value); factory SimpleClassOfDynamicToIntNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToIntNullableToJson(this); @@ -4347,13 +3790,11 @@ class SimpleClassOfDynamicToIntNullable { class SimpleClassNullableOfDynamicToIntNullable { final Map? value; - SimpleClassNullableOfDynamicToIntNullable( - this.value, - ); + SimpleClassNullableOfDynamicToIntNullable(this.value); factory SimpleClassNullableOfDynamicToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToIntNullableToJson(this); @@ -4363,13 +3804,11 @@ class SimpleClassNullableOfDynamicToIntNullable { class SimpleClassOfEnumTypeToIntNullable { final Map value; - SimpleClassOfEnumTypeToIntNullable( - this.value, - ); + SimpleClassOfEnumTypeToIntNullable(this.value); factory SimpleClassOfEnumTypeToIntNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToIntNullableToJson(this); @@ -4379,13 +3818,11 @@ class SimpleClassOfEnumTypeToIntNullable { class SimpleClassNullableOfEnumTypeToIntNullable { final Map? value; - SimpleClassNullableOfEnumTypeToIntNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToIntNullable(this.value); factory SimpleClassNullableOfEnumTypeToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToIntNullableToJson(this); @@ -4395,9 +3832,7 @@ class SimpleClassNullableOfEnumTypeToIntNullable { class SimpleClassOfIntToIntNullable { final Map value; - SimpleClassOfIntToIntNullable( - this.value, - ); + SimpleClassOfIntToIntNullable(this.value); factory SimpleClassOfIntToIntNullable.fromJson(Map json) => _$SimpleClassOfIntToIntNullableFromJson(json); @@ -4409,13 +3844,11 @@ class SimpleClassOfIntToIntNullable { class SimpleClassNullableOfIntToIntNullable { final Map? value; - SimpleClassNullableOfIntToIntNullable( - this.value, - ); + SimpleClassNullableOfIntToIntNullable(this.value); factory SimpleClassNullableOfIntToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToIntNullableToJson(this); @@ -4425,13 +3858,11 @@ class SimpleClassNullableOfIntToIntNullable { class SimpleClassOfObjectToIntNullable { final Map value; - SimpleClassOfObjectToIntNullable( - this.value, - ); + SimpleClassOfObjectToIntNullable(this.value); factory SimpleClassOfObjectToIntNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToIntNullableToJson(this); @@ -4441,13 +3872,11 @@ class SimpleClassOfObjectToIntNullable { class SimpleClassNullableOfObjectToIntNullable { final Map? value; - SimpleClassNullableOfObjectToIntNullable( - this.value, - ); + SimpleClassNullableOfObjectToIntNullable(this.value); factory SimpleClassNullableOfObjectToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToIntNullableToJson(this); @@ -4457,13 +3886,11 @@ class SimpleClassNullableOfObjectToIntNullable { class SimpleClassOfStringToIntNullable { final Map value; - SimpleClassOfStringToIntNullable( - this.value, - ); + SimpleClassOfStringToIntNullable(this.value); factory SimpleClassOfStringToIntNullable.fromJson( - Map json) => - _$SimpleClassOfStringToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToIntNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToIntNullableToJson(this); @@ -4473,13 +3900,11 @@ class SimpleClassOfStringToIntNullable { class SimpleClassNullableOfStringToIntNullable { final Map? value; - SimpleClassNullableOfStringToIntNullable( - this.value, - ); + SimpleClassNullableOfStringToIntNullable(this.value); factory SimpleClassNullableOfStringToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToIntNullableToJson(this); @@ -4489,9 +3914,7 @@ class SimpleClassNullableOfStringToIntNullable { class SimpleClassOfUriToIntNullable { final Map value; - SimpleClassOfUriToIntNullable( - this.value, - ); + SimpleClassOfUriToIntNullable(this.value); factory SimpleClassOfUriToIntNullable.fromJson(Map json) => _$SimpleClassOfUriToIntNullableFromJson(json); @@ -4503,13 +3926,11 @@ class SimpleClassOfUriToIntNullable { class SimpleClassNullableOfUriToIntNullable { final Map? value; - SimpleClassNullableOfUriToIntNullable( - this.value, - ); + SimpleClassNullableOfUriToIntNullable(this.value); factory SimpleClassNullableOfUriToIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToIntNullableToJson(this); @@ -4519,9 +3940,7 @@ class SimpleClassNullableOfUriToIntNullable { class SimpleClassOfBigIntToNum { final Map value; - SimpleClassOfBigIntToNum( - this.value, - ); + SimpleClassOfBigIntToNum(this.value); factory SimpleClassOfBigIntToNum.fromJson(Map json) => _$SimpleClassOfBigIntToNumFromJson(json); @@ -4533,13 +3952,11 @@ class SimpleClassOfBigIntToNum { class SimpleClassNullableOfBigIntToNum { final Map? value; - SimpleClassNullableOfBigIntToNum( - this.value, - ); + SimpleClassNullableOfBigIntToNum(this.value); factory SimpleClassNullableOfBigIntToNum.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToNumToJson(this); @@ -4549,9 +3966,7 @@ class SimpleClassNullableOfBigIntToNum { class SimpleClassOfDateTimeToNum { final Map value; - SimpleClassOfDateTimeToNum( - this.value, - ); + SimpleClassOfDateTimeToNum(this.value); factory SimpleClassOfDateTimeToNum.fromJson(Map json) => _$SimpleClassOfDateTimeToNumFromJson(json); @@ -4563,13 +3978,11 @@ class SimpleClassOfDateTimeToNum { class SimpleClassNullableOfDateTimeToNum { final Map? value; - SimpleClassNullableOfDateTimeToNum( - this.value, - ); + SimpleClassNullableOfDateTimeToNum(this.value); factory SimpleClassNullableOfDateTimeToNum.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToNumToJson(this); @@ -4579,9 +3992,7 @@ class SimpleClassNullableOfDateTimeToNum { class SimpleClassOfDynamicToNum { final Map value; - SimpleClassOfDynamicToNum( - this.value, - ); + SimpleClassOfDynamicToNum(this.value); factory SimpleClassOfDynamicToNum.fromJson(Map json) => _$SimpleClassOfDynamicToNumFromJson(json); @@ -4593,13 +4004,11 @@ class SimpleClassOfDynamicToNum { class SimpleClassNullableOfDynamicToNum { final Map? value; - SimpleClassNullableOfDynamicToNum( - this.value, - ); + SimpleClassNullableOfDynamicToNum(this.value); factory SimpleClassNullableOfDynamicToNum.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToNumToJson(this); @@ -4609,9 +4018,7 @@ class SimpleClassNullableOfDynamicToNum { class SimpleClassOfEnumTypeToNum { final Map value; - SimpleClassOfEnumTypeToNum( - this.value, - ); + SimpleClassOfEnumTypeToNum(this.value); factory SimpleClassOfEnumTypeToNum.fromJson(Map json) => _$SimpleClassOfEnumTypeToNumFromJson(json); @@ -4623,13 +4030,11 @@ class SimpleClassOfEnumTypeToNum { class SimpleClassNullableOfEnumTypeToNum { final Map? value; - SimpleClassNullableOfEnumTypeToNum( - this.value, - ); + SimpleClassNullableOfEnumTypeToNum(this.value); factory SimpleClassNullableOfEnumTypeToNum.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToNumToJson(this); @@ -4639,9 +4044,7 @@ class SimpleClassNullableOfEnumTypeToNum { class SimpleClassOfIntToNum { final Map value; - SimpleClassOfIntToNum( - this.value, - ); + SimpleClassOfIntToNum(this.value); factory SimpleClassOfIntToNum.fromJson(Map json) => _$SimpleClassOfIntToNumFromJson(json); @@ -4653,9 +4056,7 @@ class SimpleClassOfIntToNum { class SimpleClassNullableOfIntToNum { final Map? value; - SimpleClassNullableOfIntToNum( - this.value, - ); + SimpleClassNullableOfIntToNum(this.value); factory SimpleClassNullableOfIntToNum.fromJson(Map json) => _$SimpleClassNullableOfIntToNumFromJson(json); @@ -4667,9 +4068,7 @@ class SimpleClassNullableOfIntToNum { class SimpleClassOfObjectToNum { final Map value; - SimpleClassOfObjectToNum( - this.value, - ); + SimpleClassOfObjectToNum(this.value); factory SimpleClassOfObjectToNum.fromJson(Map json) => _$SimpleClassOfObjectToNumFromJson(json); @@ -4681,13 +4080,11 @@ class SimpleClassOfObjectToNum { class SimpleClassNullableOfObjectToNum { final Map? value; - SimpleClassNullableOfObjectToNum( - this.value, - ); + SimpleClassNullableOfObjectToNum(this.value); factory SimpleClassNullableOfObjectToNum.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToNumToJson(this); @@ -4697,9 +4094,7 @@ class SimpleClassNullableOfObjectToNum { class SimpleClassOfStringToNum { final Map value; - SimpleClassOfStringToNum( - this.value, - ); + SimpleClassOfStringToNum(this.value); factory SimpleClassOfStringToNum.fromJson(Map json) => _$SimpleClassOfStringToNumFromJson(json); @@ -4711,13 +4106,11 @@ class SimpleClassOfStringToNum { class SimpleClassNullableOfStringToNum { final Map? value; - SimpleClassNullableOfStringToNum( - this.value, - ); + SimpleClassNullableOfStringToNum(this.value); factory SimpleClassNullableOfStringToNum.fromJson( - Map json) => - _$SimpleClassNullableOfStringToNumFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToNumFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToNumToJson(this); @@ -4727,9 +4120,7 @@ class SimpleClassNullableOfStringToNum { class SimpleClassOfUriToNum { final Map value; - SimpleClassOfUriToNum( - this.value, - ); + SimpleClassOfUriToNum(this.value); factory SimpleClassOfUriToNum.fromJson(Map json) => _$SimpleClassOfUriToNumFromJson(json); @@ -4741,9 +4132,7 @@ class SimpleClassOfUriToNum { class SimpleClassNullableOfUriToNum { final Map? value; - SimpleClassNullableOfUriToNum( - this.value, - ); + SimpleClassNullableOfUriToNum(this.value); factory SimpleClassNullableOfUriToNum.fromJson(Map json) => _$SimpleClassNullableOfUriToNumFromJson(json); @@ -4755,13 +4144,11 @@ class SimpleClassNullableOfUriToNum { class SimpleClassOfBigIntToNumNullable { final Map value; - SimpleClassOfBigIntToNumNullable( - this.value, - ); + SimpleClassOfBigIntToNumNullable(this.value); factory SimpleClassOfBigIntToNumNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToNumNullableToJson(this); @@ -4771,13 +4158,11 @@ class SimpleClassOfBigIntToNumNullable { class SimpleClassNullableOfBigIntToNumNullable { final Map? value; - SimpleClassNullableOfBigIntToNumNullable( - this.value, - ); + SimpleClassNullableOfBigIntToNumNullable(this.value); factory SimpleClassNullableOfBigIntToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToNumNullableToJson(this); @@ -4787,13 +4172,11 @@ class SimpleClassNullableOfBigIntToNumNullable { class SimpleClassOfDateTimeToNumNullable { final Map value; - SimpleClassOfDateTimeToNumNullable( - this.value, - ); + SimpleClassOfDateTimeToNumNullable(this.value); factory SimpleClassOfDateTimeToNumNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToNumNullableToJson(this); @@ -4803,13 +4186,11 @@ class SimpleClassOfDateTimeToNumNullable { class SimpleClassNullableOfDateTimeToNumNullable { final Map? value; - SimpleClassNullableOfDateTimeToNumNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToNumNullable(this.value); factory SimpleClassNullableOfDateTimeToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToNumNullableToJson(this); @@ -4819,13 +4200,11 @@ class SimpleClassNullableOfDateTimeToNumNullable { class SimpleClassOfDynamicToNumNullable { final Map value; - SimpleClassOfDynamicToNumNullable( - this.value, - ); + SimpleClassOfDynamicToNumNullable(this.value); factory SimpleClassOfDynamicToNumNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToNumNullableToJson(this); @@ -4835,13 +4214,11 @@ class SimpleClassOfDynamicToNumNullable { class SimpleClassNullableOfDynamicToNumNullable { final Map? value; - SimpleClassNullableOfDynamicToNumNullable( - this.value, - ); + SimpleClassNullableOfDynamicToNumNullable(this.value); factory SimpleClassNullableOfDynamicToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToNumNullableToJson(this); @@ -4851,13 +4228,11 @@ class SimpleClassNullableOfDynamicToNumNullable { class SimpleClassOfEnumTypeToNumNullable { final Map value; - SimpleClassOfEnumTypeToNumNullable( - this.value, - ); + SimpleClassOfEnumTypeToNumNullable(this.value); factory SimpleClassOfEnumTypeToNumNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToNumNullableToJson(this); @@ -4867,13 +4242,11 @@ class SimpleClassOfEnumTypeToNumNullable { class SimpleClassNullableOfEnumTypeToNumNullable { final Map? value; - SimpleClassNullableOfEnumTypeToNumNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToNumNullable(this.value); factory SimpleClassNullableOfEnumTypeToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToNumNullableToJson(this); @@ -4883,9 +4256,7 @@ class SimpleClassNullableOfEnumTypeToNumNullable { class SimpleClassOfIntToNumNullable { final Map value; - SimpleClassOfIntToNumNullable( - this.value, - ); + SimpleClassOfIntToNumNullable(this.value); factory SimpleClassOfIntToNumNullable.fromJson(Map json) => _$SimpleClassOfIntToNumNullableFromJson(json); @@ -4897,13 +4268,11 @@ class SimpleClassOfIntToNumNullable { class SimpleClassNullableOfIntToNumNullable { final Map? value; - SimpleClassNullableOfIntToNumNullable( - this.value, - ); + SimpleClassNullableOfIntToNumNullable(this.value); factory SimpleClassNullableOfIntToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToNumNullableToJson(this); @@ -4913,13 +4282,11 @@ class SimpleClassNullableOfIntToNumNullable { class SimpleClassOfObjectToNumNullable { final Map value; - SimpleClassOfObjectToNumNullable( - this.value, - ); + SimpleClassOfObjectToNumNullable(this.value); factory SimpleClassOfObjectToNumNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToNumNullableToJson(this); @@ -4929,13 +4296,11 @@ class SimpleClassOfObjectToNumNullable { class SimpleClassNullableOfObjectToNumNullable { final Map? value; - SimpleClassNullableOfObjectToNumNullable( - this.value, - ); + SimpleClassNullableOfObjectToNumNullable(this.value); factory SimpleClassNullableOfObjectToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToNumNullableToJson(this); @@ -4945,13 +4310,11 @@ class SimpleClassNullableOfObjectToNumNullable { class SimpleClassOfStringToNumNullable { final Map value; - SimpleClassOfStringToNumNullable( - this.value, - ); + SimpleClassOfStringToNumNullable(this.value); factory SimpleClassOfStringToNumNullable.fromJson( - Map json) => - _$SimpleClassOfStringToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToNumNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToNumNullableToJson(this); @@ -4961,13 +4324,11 @@ class SimpleClassOfStringToNumNullable { class SimpleClassNullableOfStringToNumNullable { final Map? value; - SimpleClassNullableOfStringToNumNullable( - this.value, - ); + SimpleClassNullableOfStringToNumNullable(this.value); factory SimpleClassNullableOfStringToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToNumNullableToJson(this); @@ -4977,9 +4338,7 @@ class SimpleClassNullableOfStringToNumNullable { class SimpleClassOfUriToNumNullable { final Map value; - SimpleClassOfUriToNumNullable( - this.value, - ); + SimpleClassOfUriToNumNullable(this.value); factory SimpleClassOfUriToNumNullable.fromJson(Map json) => _$SimpleClassOfUriToNumNullableFromJson(json); @@ -4991,13 +4350,11 @@ class SimpleClassOfUriToNumNullable { class SimpleClassNullableOfUriToNumNullable { final Map? value; - SimpleClassNullableOfUriToNumNullable( - this.value, - ); + SimpleClassNullableOfUriToNumNullable(this.value); factory SimpleClassNullableOfUriToNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToNumNullableToJson(this); @@ -5007,9 +4364,7 @@ class SimpleClassNullableOfUriToNumNullable { class SimpleClassOfBigIntToObject { final Map value; - SimpleClassOfBigIntToObject( - this.value, - ); + SimpleClassOfBigIntToObject(this.value); factory SimpleClassOfBigIntToObject.fromJson(Map json) => _$SimpleClassOfBigIntToObjectFromJson(json); @@ -5021,13 +4376,11 @@ class SimpleClassOfBigIntToObject { class SimpleClassNullableOfBigIntToObject { final Map? value; - SimpleClassNullableOfBigIntToObject( - this.value, - ); + SimpleClassNullableOfBigIntToObject(this.value); factory SimpleClassNullableOfBigIntToObject.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToObjectToJson(this); @@ -5037,9 +4390,7 @@ class SimpleClassNullableOfBigIntToObject { class SimpleClassOfDateTimeToObject { final Map value; - SimpleClassOfDateTimeToObject( - this.value, - ); + SimpleClassOfDateTimeToObject(this.value); factory SimpleClassOfDateTimeToObject.fromJson(Map json) => _$SimpleClassOfDateTimeToObjectFromJson(json); @@ -5051,13 +4402,11 @@ class SimpleClassOfDateTimeToObject { class SimpleClassNullableOfDateTimeToObject { final Map? value; - SimpleClassNullableOfDateTimeToObject( - this.value, - ); + SimpleClassNullableOfDateTimeToObject(this.value); factory SimpleClassNullableOfDateTimeToObject.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToObjectToJson(this); @@ -5067,9 +4416,7 @@ class SimpleClassNullableOfDateTimeToObject { class SimpleClassOfDynamicToObject { final Map value; - SimpleClassOfDynamicToObject( - this.value, - ); + SimpleClassOfDynamicToObject(this.value); factory SimpleClassOfDynamicToObject.fromJson(Map json) => _$SimpleClassOfDynamicToObjectFromJson(json); @@ -5081,13 +4428,11 @@ class SimpleClassOfDynamicToObject { class SimpleClassNullableOfDynamicToObject { final Map? value; - SimpleClassNullableOfDynamicToObject( - this.value, - ); + SimpleClassNullableOfDynamicToObject(this.value); factory SimpleClassNullableOfDynamicToObject.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToObjectToJson(this); @@ -5097,9 +4442,7 @@ class SimpleClassNullableOfDynamicToObject { class SimpleClassOfEnumTypeToObject { final Map value; - SimpleClassOfEnumTypeToObject( - this.value, - ); + SimpleClassOfEnumTypeToObject(this.value); factory SimpleClassOfEnumTypeToObject.fromJson(Map json) => _$SimpleClassOfEnumTypeToObjectFromJson(json); @@ -5111,13 +4454,11 @@ class SimpleClassOfEnumTypeToObject { class SimpleClassNullableOfEnumTypeToObject { final Map? value; - SimpleClassNullableOfEnumTypeToObject( - this.value, - ); + SimpleClassNullableOfEnumTypeToObject(this.value); factory SimpleClassNullableOfEnumTypeToObject.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToObjectToJson(this); @@ -5127,9 +4468,7 @@ class SimpleClassNullableOfEnumTypeToObject { class SimpleClassOfIntToObject { final Map value; - SimpleClassOfIntToObject( - this.value, - ); + SimpleClassOfIntToObject(this.value); factory SimpleClassOfIntToObject.fromJson(Map json) => _$SimpleClassOfIntToObjectFromJson(json); @@ -5141,13 +4480,11 @@ class SimpleClassOfIntToObject { class SimpleClassNullableOfIntToObject { final Map? value; - SimpleClassNullableOfIntToObject( - this.value, - ); + SimpleClassNullableOfIntToObject(this.value); factory SimpleClassNullableOfIntToObject.fromJson( - Map json) => - _$SimpleClassNullableOfIntToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToObjectToJson(this); @@ -5157,9 +4494,7 @@ class SimpleClassNullableOfIntToObject { class SimpleClassOfObjectToObject { final Map value; - SimpleClassOfObjectToObject( - this.value, - ); + SimpleClassOfObjectToObject(this.value); factory SimpleClassOfObjectToObject.fromJson(Map json) => _$SimpleClassOfObjectToObjectFromJson(json); @@ -5171,13 +4506,11 @@ class SimpleClassOfObjectToObject { class SimpleClassNullableOfObjectToObject { final Map? value; - SimpleClassNullableOfObjectToObject( - this.value, - ); + SimpleClassNullableOfObjectToObject(this.value); factory SimpleClassNullableOfObjectToObject.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToObjectToJson(this); @@ -5187,9 +4520,7 @@ class SimpleClassNullableOfObjectToObject { class SimpleClassOfStringToObject { final Map value; - SimpleClassOfStringToObject( - this.value, - ); + SimpleClassOfStringToObject(this.value); factory SimpleClassOfStringToObject.fromJson(Map json) => _$SimpleClassOfStringToObjectFromJson(json); @@ -5201,13 +4532,11 @@ class SimpleClassOfStringToObject { class SimpleClassNullableOfStringToObject { final Map? value; - SimpleClassNullableOfStringToObject( - this.value, - ); + SimpleClassNullableOfStringToObject(this.value); factory SimpleClassNullableOfStringToObject.fromJson( - Map json) => - _$SimpleClassNullableOfStringToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToObjectToJson(this); @@ -5217,9 +4546,7 @@ class SimpleClassNullableOfStringToObject { class SimpleClassOfUriToObject { final Map value; - SimpleClassOfUriToObject( - this.value, - ); + SimpleClassOfUriToObject(this.value); factory SimpleClassOfUriToObject.fromJson(Map json) => _$SimpleClassOfUriToObjectFromJson(json); @@ -5231,13 +4558,11 @@ class SimpleClassOfUriToObject { class SimpleClassNullableOfUriToObject { final Map? value; - SimpleClassNullableOfUriToObject( - this.value, - ); + SimpleClassNullableOfUriToObject(this.value); factory SimpleClassNullableOfUriToObject.fromJson( - Map json) => - _$SimpleClassNullableOfUriToObjectFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToObjectFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToObjectToJson(this); @@ -5247,13 +4572,11 @@ class SimpleClassNullableOfUriToObject { class SimpleClassOfBigIntToObjectNullable { final Map value; - SimpleClassOfBigIntToObjectNullable( - this.value, - ); + SimpleClassOfBigIntToObjectNullable(this.value); factory SimpleClassOfBigIntToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToObjectNullableToJson(this); @@ -5263,13 +4586,11 @@ class SimpleClassOfBigIntToObjectNullable { class SimpleClassNullableOfBigIntToObjectNullable { final Map? value; - SimpleClassNullableOfBigIntToObjectNullable( - this.value, - ); + SimpleClassNullableOfBigIntToObjectNullable(this.value); factory SimpleClassNullableOfBigIntToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToObjectNullableToJson(this); @@ -5279,13 +4600,11 @@ class SimpleClassNullableOfBigIntToObjectNullable { class SimpleClassOfDateTimeToObjectNullable { final Map value; - SimpleClassOfDateTimeToObjectNullable( - this.value, - ); + SimpleClassOfDateTimeToObjectNullable(this.value); factory SimpleClassOfDateTimeToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToObjectNullableToJson(this); @@ -5295,13 +4614,11 @@ class SimpleClassOfDateTimeToObjectNullable { class SimpleClassNullableOfDateTimeToObjectNullable { final Map? value; - SimpleClassNullableOfDateTimeToObjectNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToObjectNullable(this.value); factory SimpleClassNullableOfDateTimeToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToObjectNullableToJson(this); @@ -5311,13 +4628,11 @@ class SimpleClassNullableOfDateTimeToObjectNullable { class SimpleClassOfDynamicToObjectNullable { final Map value; - SimpleClassOfDynamicToObjectNullable( - this.value, - ); + SimpleClassOfDynamicToObjectNullable(this.value); factory SimpleClassOfDynamicToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToObjectNullableToJson(this); @@ -5327,13 +4642,11 @@ class SimpleClassOfDynamicToObjectNullable { class SimpleClassNullableOfDynamicToObjectNullable { final Map? value; - SimpleClassNullableOfDynamicToObjectNullable( - this.value, - ); + SimpleClassNullableOfDynamicToObjectNullable(this.value); factory SimpleClassNullableOfDynamicToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToObjectNullableToJson(this); @@ -5343,13 +4656,11 @@ class SimpleClassNullableOfDynamicToObjectNullable { class SimpleClassOfEnumTypeToObjectNullable { final Map value; - SimpleClassOfEnumTypeToObjectNullable( - this.value, - ); + SimpleClassOfEnumTypeToObjectNullable(this.value); factory SimpleClassOfEnumTypeToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToObjectNullableToJson(this); @@ -5359,13 +4670,11 @@ class SimpleClassOfEnumTypeToObjectNullable { class SimpleClassNullableOfEnumTypeToObjectNullable { final Map? value; - SimpleClassNullableOfEnumTypeToObjectNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToObjectNullable(this.value); factory SimpleClassNullableOfEnumTypeToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToObjectNullableToJson(this); @@ -5375,13 +4684,11 @@ class SimpleClassNullableOfEnumTypeToObjectNullable { class SimpleClassOfIntToObjectNullable { final Map value; - SimpleClassOfIntToObjectNullable( - this.value, - ); + SimpleClassOfIntToObjectNullable(this.value); factory SimpleClassOfIntToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfIntToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToObjectNullableToJson(this); @@ -5391,13 +4698,11 @@ class SimpleClassOfIntToObjectNullable { class SimpleClassNullableOfIntToObjectNullable { final Map? value; - SimpleClassNullableOfIntToObjectNullable( - this.value, - ); + SimpleClassNullableOfIntToObjectNullable(this.value); factory SimpleClassNullableOfIntToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToObjectNullableToJson(this); @@ -5407,13 +4712,11 @@ class SimpleClassNullableOfIntToObjectNullable { class SimpleClassOfObjectToObjectNullable { final Map value; - SimpleClassOfObjectToObjectNullable( - this.value, - ); + SimpleClassOfObjectToObjectNullable(this.value); factory SimpleClassOfObjectToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToObjectNullableToJson(this); @@ -5423,13 +4726,11 @@ class SimpleClassOfObjectToObjectNullable { class SimpleClassNullableOfObjectToObjectNullable { final Map? value; - SimpleClassNullableOfObjectToObjectNullable( - this.value, - ); + SimpleClassNullableOfObjectToObjectNullable(this.value); factory SimpleClassNullableOfObjectToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToObjectNullableToJson(this); @@ -5439,13 +4740,11 @@ class SimpleClassNullableOfObjectToObjectNullable { class SimpleClassOfStringToObjectNullable { final Map value; - SimpleClassOfStringToObjectNullable( - this.value, - ); + SimpleClassOfStringToObjectNullable(this.value); factory SimpleClassOfStringToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfStringToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToObjectNullableToJson(this); @@ -5455,13 +4754,11 @@ class SimpleClassOfStringToObjectNullable { class SimpleClassNullableOfStringToObjectNullable { final Map? value; - SimpleClassNullableOfStringToObjectNullable( - this.value, - ); + SimpleClassNullableOfStringToObjectNullable(this.value); factory SimpleClassNullableOfStringToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToObjectNullableToJson(this); @@ -5471,13 +4768,11 @@ class SimpleClassNullableOfStringToObjectNullable { class SimpleClassOfUriToObjectNullable { final Map value; - SimpleClassOfUriToObjectNullable( - this.value, - ); + SimpleClassOfUriToObjectNullable(this.value); factory SimpleClassOfUriToObjectNullable.fromJson( - Map json) => - _$SimpleClassOfUriToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToObjectNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToObjectNullableToJson(this); @@ -5487,13 +4782,11 @@ class SimpleClassOfUriToObjectNullable { class SimpleClassNullableOfUriToObjectNullable { final Map? value; - SimpleClassNullableOfUriToObjectNullable( - this.value, - ); + SimpleClassNullableOfUriToObjectNullable(this.value); factory SimpleClassNullableOfUriToObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToObjectNullableToJson(this); @@ -5503,9 +4796,7 @@ class SimpleClassNullableOfUriToObjectNullable { class SimpleClassOfBigIntToRecord { final Map value; - SimpleClassOfBigIntToRecord( - this.value, - ); + SimpleClassOfBigIntToRecord(this.value); factory SimpleClassOfBigIntToRecord.fromJson(Map json) => _$SimpleClassOfBigIntToRecordFromJson(json); @@ -5517,13 +4808,11 @@ class SimpleClassOfBigIntToRecord { class SimpleClassNullableOfBigIntToRecord { final Map? value; - SimpleClassNullableOfBigIntToRecord( - this.value, - ); + SimpleClassNullableOfBigIntToRecord(this.value); factory SimpleClassNullableOfBigIntToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToRecordToJson(this); @@ -5533,9 +4822,7 @@ class SimpleClassNullableOfBigIntToRecord { class SimpleClassOfDateTimeToRecord { final Map value; - SimpleClassOfDateTimeToRecord( - this.value, - ); + SimpleClassOfDateTimeToRecord(this.value); factory SimpleClassOfDateTimeToRecord.fromJson(Map json) => _$SimpleClassOfDateTimeToRecordFromJson(json); @@ -5547,13 +4834,11 @@ class SimpleClassOfDateTimeToRecord { class SimpleClassNullableOfDateTimeToRecord { final Map? value; - SimpleClassNullableOfDateTimeToRecord( - this.value, - ); + SimpleClassNullableOfDateTimeToRecord(this.value); factory SimpleClassNullableOfDateTimeToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToRecordToJson(this); @@ -5563,9 +4848,7 @@ class SimpleClassNullableOfDateTimeToRecord { class SimpleClassOfDynamicToRecord { final Map value; - SimpleClassOfDynamicToRecord( - this.value, - ); + SimpleClassOfDynamicToRecord(this.value); factory SimpleClassOfDynamicToRecord.fromJson(Map json) => _$SimpleClassOfDynamicToRecordFromJson(json); @@ -5577,13 +4860,11 @@ class SimpleClassOfDynamicToRecord { class SimpleClassNullableOfDynamicToRecord { final Map? value; - SimpleClassNullableOfDynamicToRecord( - this.value, - ); + SimpleClassNullableOfDynamicToRecord(this.value); factory SimpleClassNullableOfDynamicToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToRecordToJson(this); @@ -5593,9 +4874,7 @@ class SimpleClassNullableOfDynamicToRecord { class SimpleClassOfEnumTypeToRecord { final Map value; - SimpleClassOfEnumTypeToRecord( - this.value, - ); + SimpleClassOfEnumTypeToRecord(this.value); factory SimpleClassOfEnumTypeToRecord.fromJson(Map json) => _$SimpleClassOfEnumTypeToRecordFromJson(json); @@ -5607,13 +4886,11 @@ class SimpleClassOfEnumTypeToRecord { class SimpleClassNullableOfEnumTypeToRecord { final Map? value; - SimpleClassNullableOfEnumTypeToRecord( - this.value, - ); + SimpleClassNullableOfEnumTypeToRecord(this.value); factory SimpleClassNullableOfEnumTypeToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToRecordToJson(this); @@ -5623,9 +4900,7 @@ class SimpleClassNullableOfEnumTypeToRecord { class SimpleClassOfIntToRecord { final Map value; - SimpleClassOfIntToRecord( - this.value, - ); + SimpleClassOfIntToRecord(this.value); factory SimpleClassOfIntToRecord.fromJson(Map json) => _$SimpleClassOfIntToRecordFromJson(json); @@ -5637,13 +4912,11 @@ class SimpleClassOfIntToRecord { class SimpleClassNullableOfIntToRecord { final Map? value; - SimpleClassNullableOfIntToRecord( - this.value, - ); + SimpleClassNullableOfIntToRecord(this.value); factory SimpleClassNullableOfIntToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfIntToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToRecordToJson(this); @@ -5653,9 +4926,7 @@ class SimpleClassNullableOfIntToRecord { class SimpleClassOfObjectToRecord { final Map value; - SimpleClassOfObjectToRecord( - this.value, - ); + SimpleClassOfObjectToRecord(this.value); factory SimpleClassOfObjectToRecord.fromJson(Map json) => _$SimpleClassOfObjectToRecordFromJson(json); @@ -5667,13 +4938,11 @@ class SimpleClassOfObjectToRecord { class SimpleClassNullableOfObjectToRecord { final Map? value; - SimpleClassNullableOfObjectToRecord( - this.value, - ); + SimpleClassNullableOfObjectToRecord(this.value); factory SimpleClassNullableOfObjectToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToRecordToJson(this); @@ -5683,9 +4952,7 @@ class SimpleClassNullableOfObjectToRecord { class SimpleClassOfStringToRecord { final Map value; - SimpleClassOfStringToRecord( - this.value, - ); + SimpleClassOfStringToRecord(this.value); factory SimpleClassOfStringToRecord.fromJson(Map json) => _$SimpleClassOfStringToRecordFromJson(json); @@ -5697,13 +4964,11 @@ class SimpleClassOfStringToRecord { class SimpleClassNullableOfStringToRecord { final Map? value; - SimpleClassNullableOfStringToRecord( - this.value, - ); + SimpleClassNullableOfStringToRecord(this.value); factory SimpleClassNullableOfStringToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfStringToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToRecordToJson(this); @@ -5713,9 +4978,7 @@ class SimpleClassNullableOfStringToRecord { class SimpleClassOfUriToRecord { final Map value; - SimpleClassOfUriToRecord( - this.value, - ); + SimpleClassOfUriToRecord(this.value); factory SimpleClassOfUriToRecord.fromJson(Map json) => _$SimpleClassOfUriToRecordFromJson(json); @@ -5727,13 +4990,11 @@ class SimpleClassOfUriToRecord { class SimpleClassNullableOfUriToRecord { final Map? value; - SimpleClassNullableOfUriToRecord( - this.value, - ); + SimpleClassNullableOfUriToRecord(this.value); factory SimpleClassNullableOfUriToRecord.fromJson( - Map json) => - _$SimpleClassNullableOfUriToRecordFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToRecordFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToRecordToJson(this); @@ -5743,9 +5004,7 @@ class SimpleClassNullableOfUriToRecord { class SimpleClassOfBigIntToString { final Map value; - SimpleClassOfBigIntToString( - this.value, - ); + SimpleClassOfBigIntToString(this.value); factory SimpleClassOfBigIntToString.fromJson(Map json) => _$SimpleClassOfBigIntToStringFromJson(json); @@ -5757,13 +5016,11 @@ class SimpleClassOfBigIntToString { class SimpleClassNullableOfBigIntToString { final Map? value; - SimpleClassNullableOfBigIntToString( - this.value, - ); + SimpleClassNullableOfBigIntToString(this.value); factory SimpleClassNullableOfBigIntToString.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToStringToJson(this); @@ -5773,9 +5030,7 @@ class SimpleClassNullableOfBigIntToString { class SimpleClassOfDateTimeToString { final Map value; - SimpleClassOfDateTimeToString( - this.value, - ); + SimpleClassOfDateTimeToString(this.value); factory SimpleClassOfDateTimeToString.fromJson(Map json) => _$SimpleClassOfDateTimeToStringFromJson(json); @@ -5787,13 +5042,11 @@ class SimpleClassOfDateTimeToString { class SimpleClassNullableOfDateTimeToString { final Map? value; - SimpleClassNullableOfDateTimeToString( - this.value, - ); + SimpleClassNullableOfDateTimeToString(this.value); factory SimpleClassNullableOfDateTimeToString.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToStringToJson(this); @@ -5803,9 +5056,7 @@ class SimpleClassNullableOfDateTimeToString { class SimpleClassOfDynamicToString { final Map value; - SimpleClassOfDynamicToString( - this.value, - ); + SimpleClassOfDynamicToString(this.value); factory SimpleClassOfDynamicToString.fromJson(Map json) => _$SimpleClassOfDynamicToStringFromJson(json); @@ -5817,13 +5068,11 @@ class SimpleClassOfDynamicToString { class SimpleClassNullableOfDynamicToString { final Map? value; - SimpleClassNullableOfDynamicToString( - this.value, - ); + SimpleClassNullableOfDynamicToString(this.value); factory SimpleClassNullableOfDynamicToString.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToStringToJson(this); @@ -5833,9 +5082,7 @@ class SimpleClassNullableOfDynamicToString { class SimpleClassOfEnumTypeToString { final Map value; - SimpleClassOfEnumTypeToString( - this.value, - ); + SimpleClassOfEnumTypeToString(this.value); factory SimpleClassOfEnumTypeToString.fromJson(Map json) => _$SimpleClassOfEnumTypeToStringFromJson(json); @@ -5847,13 +5094,11 @@ class SimpleClassOfEnumTypeToString { class SimpleClassNullableOfEnumTypeToString { final Map? value; - SimpleClassNullableOfEnumTypeToString( - this.value, - ); + SimpleClassNullableOfEnumTypeToString(this.value); factory SimpleClassNullableOfEnumTypeToString.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToStringToJson(this); @@ -5863,9 +5108,7 @@ class SimpleClassNullableOfEnumTypeToString { class SimpleClassOfIntToString { final Map value; - SimpleClassOfIntToString( - this.value, - ); + SimpleClassOfIntToString(this.value); factory SimpleClassOfIntToString.fromJson(Map json) => _$SimpleClassOfIntToStringFromJson(json); @@ -5877,13 +5120,11 @@ class SimpleClassOfIntToString { class SimpleClassNullableOfIntToString { final Map? value; - SimpleClassNullableOfIntToString( - this.value, - ); + SimpleClassNullableOfIntToString(this.value); factory SimpleClassNullableOfIntToString.fromJson( - Map json) => - _$SimpleClassNullableOfIntToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToStringToJson(this); @@ -5893,9 +5134,7 @@ class SimpleClassNullableOfIntToString { class SimpleClassOfObjectToString { final Map value; - SimpleClassOfObjectToString( - this.value, - ); + SimpleClassOfObjectToString(this.value); factory SimpleClassOfObjectToString.fromJson(Map json) => _$SimpleClassOfObjectToStringFromJson(json); @@ -5907,13 +5146,11 @@ class SimpleClassOfObjectToString { class SimpleClassNullableOfObjectToString { final Map? value; - SimpleClassNullableOfObjectToString( - this.value, - ); + SimpleClassNullableOfObjectToString(this.value); factory SimpleClassNullableOfObjectToString.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToStringToJson(this); @@ -5923,9 +5160,7 @@ class SimpleClassNullableOfObjectToString { class SimpleClassOfStringToString { final Map value; - SimpleClassOfStringToString( - this.value, - ); + SimpleClassOfStringToString(this.value); factory SimpleClassOfStringToString.fromJson(Map json) => _$SimpleClassOfStringToStringFromJson(json); @@ -5937,13 +5172,11 @@ class SimpleClassOfStringToString { class SimpleClassNullableOfStringToString { final Map? value; - SimpleClassNullableOfStringToString( - this.value, - ); + SimpleClassNullableOfStringToString(this.value); factory SimpleClassNullableOfStringToString.fromJson( - Map json) => - _$SimpleClassNullableOfStringToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToStringToJson(this); @@ -5953,9 +5186,7 @@ class SimpleClassNullableOfStringToString { class SimpleClassOfUriToString { final Map value; - SimpleClassOfUriToString( - this.value, - ); + SimpleClassOfUriToString(this.value); factory SimpleClassOfUriToString.fromJson(Map json) => _$SimpleClassOfUriToStringFromJson(json); @@ -5967,13 +5198,11 @@ class SimpleClassOfUriToString { class SimpleClassNullableOfUriToString { final Map? value; - SimpleClassNullableOfUriToString( - this.value, - ); + SimpleClassNullableOfUriToString(this.value); factory SimpleClassNullableOfUriToString.fromJson( - Map json) => - _$SimpleClassNullableOfUriToStringFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToStringFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToStringToJson(this); @@ -5983,13 +5212,11 @@ class SimpleClassNullableOfUriToString { class SimpleClassOfBigIntToStringNullable { final Map value; - SimpleClassOfBigIntToStringNullable( - this.value, - ); + SimpleClassOfBigIntToStringNullable(this.value); factory SimpleClassOfBigIntToStringNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToStringNullableToJson(this); @@ -5999,13 +5226,11 @@ class SimpleClassOfBigIntToStringNullable { class SimpleClassNullableOfBigIntToStringNullable { final Map? value; - SimpleClassNullableOfBigIntToStringNullable( - this.value, - ); + SimpleClassNullableOfBigIntToStringNullable(this.value); factory SimpleClassNullableOfBigIntToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToStringNullableToJson(this); @@ -6015,13 +5240,11 @@ class SimpleClassNullableOfBigIntToStringNullable { class SimpleClassOfDateTimeToStringNullable { final Map value; - SimpleClassOfDateTimeToStringNullable( - this.value, - ); + SimpleClassOfDateTimeToStringNullable(this.value); factory SimpleClassOfDateTimeToStringNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToStringNullableToJson(this); @@ -6031,13 +5254,11 @@ class SimpleClassOfDateTimeToStringNullable { class SimpleClassNullableOfDateTimeToStringNullable { final Map? value; - SimpleClassNullableOfDateTimeToStringNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToStringNullable(this.value); factory SimpleClassNullableOfDateTimeToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToStringNullableToJson(this); @@ -6047,13 +5268,11 @@ class SimpleClassNullableOfDateTimeToStringNullable { class SimpleClassOfDynamicToStringNullable { final Map value; - SimpleClassOfDynamicToStringNullable( - this.value, - ); + SimpleClassOfDynamicToStringNullable(this.value); factory SimpleClassOfDynamicToStringNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToStringNullableToJson(this); @@ -6063,13 +5282,11 @@ class SimpleClassOfDynamicToStringNullable { class SimpleClassNullableOfDynamicToStringNullable { final Map? value; - SimpleClassNullableOfDynamicToStringNullable( - this.value, - ); + SimpleClassNullableOfDynamicToStringNullable(this.value); factory SimpleClassNullableOfDynamicToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToStringNullableToJson(this); @@ -6079,13 +5296,11 @@ class SimpleClassNullableOfDynamicToStringNullable { class SimpleClassOfEnumTypeToStringNullable { final Map value; - SimpleClassOfEnumTypeToStringNullable( - this.value, - ); + SimpleClassOfEnumTypeToStringNullable(this.value); factory SimpleClassOfEnumTypeToStringNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToStringNullableToJson(this); @@ -6095,13 +5310,11 @@ class SimpleClassOfEnumTypeToStringNullable { class SimpleClassNullableOfEnumTypeToStringNullable { final Map? value; - SimpleClassNullableOfEnumTypeToStringNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToStringNullable(this.value); factory SimpleClassNullableOfEnumTypeToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToStringNullableToJson(this); @@ -6111,13 +5324,11 @@ class SimpleClassNullableOfEnumTypeToStringNullable { class SimpleClassOfIntToStringNullable { final Map value; - SimpleClassOfIntToStringNullable( - this.value, - ); + SimpleClassOfIntToStringNullable(this.value); factory SimpleClassOfIntToStringNullable.fromJson( - Map json) => - _$SimpleClassOfIntToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfIntToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfIntToStringNullableToJson(this); @@ -6127,13 +5338,11 @@ class SimpleClassOfIntToStringNullable { class SimpleClassNullableOfIntToStringNullable { final Map? value; - SimpleClassNullableOfIntToStringNullable( - this.value, - ); + SimpleClassNullableOfIntToStringNullable(this.value); factory SimpleClassNullableOfIntToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToStringNullableToJson(this); @@ -6143,13 +5352,11 @@ class SimpleClassNullableOfIntToStringNullable { class SimpleClassOfObjectToStringNullable { final Map value; - SimpleClassOfObjectToStringNullable( - this.value, - ); + SimpleClassOfObjectToStringNullable(this.value); factory SimpleClassOfObjectToStringNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToStringNullableToJson(this); @@ -6159,13 +5366,11 @@ class SimpleClassOfObjectToStringNullable { class SimpleClassNullableOfObjectToStringNullable { final Map? value; - SimpleClassNullableOfObjectToStringNullable( - this.value, - ); + SimpleClassNullableOfObjectToStringNullable(this.value); factory SimpleClassNullableOfObjectToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToStringNullableToJson(this); @@ -6175,13 +5380,11 @@ class SimpleClassNullableOfObjectToStringNullable { class SimpleClassOfStringToStringNullable { final Map value; - SimpleClassOfStringToStringNullable( - this.value, - ); + SimpleClassOfStringToStringNullable(this.value); factory SimpleClassOfStringToStringNullable.fromJson( - Map json) => - _$SimpleClassOfStringToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToStringNullableToJson(this); @@ -6191,13 +5394,11 @@ class SimpleClassOfStringToStringNullable { class SimpleClassNullableOfStringToStringNullable { final Map? value; - SimpleClassNullableOfStringToStringNullable( - this.value, - ); + SimpleClassNullableOfStringToStringNullable(this.value); factory SimpleClassNullableOfStringToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToStringNullableToJson(this); @@ -6207,13 +5408,11 @@ class SimpleClassNullableOfStringToStringNullable { class SimpleClassOfUriToStringNullable { final Map value; - SimpleClassOfUriToStringNullable( - this.value, - ); + SimpleClassOfUriToStringNullable(this.value); factory SimpleClassOfUriToStringNullable.fromJson( - Map json) => - _$SimpleClassOfUriToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassOfUriToStringNullableFromJson(json); Map toJson() => _$SimpleClassOfUriToStringNullableToJson(this); @@ -6223,13 +5422,11 @@ class SimpleClassOfUriToStringNullable { class SimpleClassNullableOfUriToStringNullable { final Map? value; - SimpleClassNullableOfUriToStringNullable( - this.value, - ); + SimpleClassNullableOfUriToStringNullable(this.value); factory SimpleClassNullableOfUriToStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToStringNullableToJson(this); @@ -6239,9 +5436,7 @@ class SimpleClassNullableOfUriToStringNullable { class SimpleClassOfBigIntToUri { final Map value; - SimpleClassOfBigIntToUri( - this.value, - ); + SimpleClassOfBigIntToUri(this.value); factory SimpleClassOfBigIntToUri.fromJson(Map json) => _$SimpleClassOfBigIntToUriFromJson(json); @@ -6253,13 +5448,11 @@ class SimpleClassOfBigIntToUri { class SimpleClassNullableOfBigIntToUri { final Map? value; - SimpleClassNullableOfBigIntToUri( - this.value, - ); + SimpleClassNullableOfBigIntToUri(this.value); factory SimpleClassNullableOfBigIntToUri.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToUriToJson(this); @@ -6269,9 +5462,7 @@ class SimpleClassNullableOfBigIntToUri { class SimpleClassOfDateTimeToUri { final Map value; - SimpleClassOfDateTimeToUri( - this.value, - ); + SimpleClassOfDateTimeToUri(this.value); factory SimpleClassOfDateTimeToUri.fromJson(Map json) => _$SimpleClassOfDateTimeToUriFromJson(json); @@ -6283,13 +5474,11 @@ class SimpleClassOfDateTimeToUri { class SimpleClassNullableOfDateTimeToUri { final Map? value; - SimpleClassNullableOfDateTimeToUri( - this.value, - ); + SimpleClassNullableOfDateTimeToUri(this.value); factory SimpleClassNullableOfDateTimeToUri.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToUriToJson(this); @@ -6299,9 +5488,7 @@ class SimpleClassNullableOfDateTimeToUri { class SimpleClassOfDynamicToUri { final Map value; - SimpleClassOfDynamicToUri( - this.value, - ); + SimpleClassOfDynamicToUri(this.value); factory SimpleClassOfDynamicToUri.fromJson(Map json) => _$SimpleClassOfDynamicToUriFromJson(json); @@ -6313,13 +5500,11 @@ class SimpleClassOfDynamicToUri { class SimpleClassNullableOfDynamicToUri { final Map? value; - SimpleClassNullableOfDynamicToUri( - this.value, - ); + SimpleClassNullableOfDynamicToUri(this.value); factory SimpleClassNullableOfDynamicToUri.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToUriToJson(this); @@ -6329,9 +5514,7 @@ class SimpleClassNullableOfDynamicToUri { class SimpleClassOfEnumTypeToUri { final Map value; - SimpleClassOfEnumTypeToUri( - this.value, - ); + SimpleClassOfEnumTypeToUri(this.value); factory SimpleClassOfEnumTypeToUri.fromJson(Map json) => _$SimpleClassOfEnumTypeToUriFromJson(json); @@ -6343,13 +5526,11 @@ class SimpleClassOfEnumTypeToUri { class SimpleClassNullableOfEnumTypeToUri { final Map? value; - SimpleClassNullableOfEnumTypeToUri( - this.value, - ); + SimpleClassNullableOfEnumTypeToUri(this.value); factory SimpleClassNullableOfEnumTypeToUri.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToUriToJson(this); @@ -6359,9 +5540,7 @@ class SimpleClassNullableOfEnumTypeToUri { class SimpleClassOfIntToUri { final Map value; - SimpleClassOfIntToUri( - this.value, - ); + SimpleClassOfIntToUri(this.value); factory SimpleClassOfIntToUri.fromJson(Map json) => _$SimpleClassOfIntToUriFromJson(json); @@ -6373,9 +5552,7 @@ class SimpleClassOfIntToUri { class SimpleClassNullableOfIntToUri { final Map? value; - SimpleClassNullableOfIntToUri( - this.value, - ); + SimpleClassNullableOfIntToUri(this.value); factory SimpleClassNullableOfIntToUri.fromJson(Map json) => _$SimpleClassNullableOfIntToUriFromJson(json); @@ -6387,9 +5564,7 @@ class SimpleClassNullableOfIntToUri { class SimpleClassOfObjectToUri { final Map value; - SimpleClassOfObjectToUri( - this.value, - ); + SimpleClassOfObjectToUri(this.value); factory SimpleClassOfObjectToUri.fromJson(Map json) => _$SimpleClassOfObjectToUriFromJson(json); @@ -6401,13 +5576,11 @@ class SimpleClassOfObjectToUri { class SimpleClassNullableOfObjectToUri { final Map? value; - SimpleClassNullableOfObjectToUri( - this.value, - ); + SimpleClassNullableOfObjectToUri(this.value); factory SimpleClassNullableOfObjectToUri.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToUriToJson(this); @@ -6417,9 +5590,7 @@ class SimpleClassNullableOfObjectToUri { class SimpleClassOfStringToUri { final Map value; - SimpleClassOfStringToUri( - this.value, - ); + SimpleClassOfStringToUri(this.value); factory SimpleClassOfStringToUri.fromJson(Map json) => _$SimpleClassOfStringToUriFromJson(json); @@ -6431,13 +5602,11 @@ class SimpleClassOfStringToUri { class SimpleClassNullableOfStringToUri { final Map? value; - SimpleClassNullableOfStringToUri( - this.value, - ); + SimpleClassNullableOfStringToUri(this.value); factory SimpleClassNullableOfStringToUri.fromJson( - Map json) => - _$SimpleClassNullableOfStringToUriFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToUriFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToUriToJson(this); @@ -6447,9 +5616,7 @@ class SimpleClassNullableOfStringToUri { class SimpleClassOfUriToUri { final Map value; - SimpleClassOfUriToUri( - this.value, - ); + SimpleClassOfUriToUri(this.value); factory SimpleClassOfUriToUri.fromJson(Map json) => _$SimpleClassOfUriToUriFromJson(json); @@ -6461,9 +5628,7 @@ class SimpleClassOfUriToUri { class SimpleClassNullableOfUriToUri { final Map? value; - SimpleClassNullableOfUriToUri( - this.value, - ); + SimpleClassNullableOfUriToUri(this.value); factory SimpleClassNullableOfUriToUri.fromJson(Map json) => _$SimpleClassNullableOfUriToUriFromJson(json); @@ -6475,13 +5640,11 @@ class SimpleClassNullableOfUriToUri { class SimpleClassOfBigIntToUriNullable { final Map value; - SimpleClassOfBigIntToUriNullable( - this.value, - ); + SimpleClassOfBigIntToUriNullable(this.value); factory SimpleClassOfBigIntToUriNullable.fromJson( - Map json) => - _$SimpleClassOfBigIntToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfBigIntToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfBigIntToUriNullableToJson(this); @@ -6491,13 +5654,11 @@ class SimpleClassOfBigIntToUriNullable { class SimpleClassNullableOfBigIntToUriNullable { final Map? value; - SimpleClassNullableOfBigIntToUriNullable( - this.value, - ); + SimpleClassNullableOfBigIntToUriNullable(this.value); factory SimpleClassNullableOfBigIntToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntToUriNullableToJson(this); @@ -6507,13 +5668,11 @@ class SimpleClassNullableOfBigIntToUriNullable { class SimpleClassOfDateTimeToUriNullable { final Map value; - SimpleClassOfDateTimeToUriNullable( - this.value, - ); + SimpleClassOfDateTimeToUriNullable(this.value); factory SimpleClassOfDateTimeToUriNullable.fromJson( - Map json) => - _$SimpleClassOfDateTimeToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDateTimeToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfDateTimeToUriNullableToJson(this); @@ -6523,13 +5682,11 @@ class SimpleClassOfDateTimeToUriNullable { class SimpleClassNullableOfDateTimeToUriNullable { final Map? value; - SimpleClassNullableOfDateTimeToUriNullable( - this.value, - ); + SimpleClassNullableOfDateTimeToUriNullable(this.value); factory SimpleClassNullableOfDateTimeToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeToUriNullableToJson(this); @@ -6539,13 +5696,11 @@ class SimpleClassNullableOfDateTimeToUriNullable { class SimpleClassOfDynamicToUriNullable { final Map value; - SimpleClassOfDynamicToUriNullable( - this.value, - ); + SimpleClassOfDynamicToUriNullable(this.value); factory SimpleClassOfDynamicToUriNullable.fromJson( - Map json) => - _$SimpleClassOfDynamicToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfDynamicToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfDynamicToUriNullableToJson(this); @@ -6555,13 +5710,11 @@ class SimpleClassOfDynamicToUriNullable { class SimpleClassNullableOfDynamicToUriNullable { final Map? value; - SimpleClassNullableOfDynamicToUriNullable( - this.value, - ); + SimpleClassNullableOfDynamicToUriNullable(this.value); factory SimpleClassNullableOfDynamicToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDynamicToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDynamicToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDynamicToUriNullableToJson(this); @@ -6571,13 +5724,11 @@ class SimpleClassNullableOfDynamicToUriNullable { class SimpleClassOfEnumTypeToUriNullable { final Map value; - SimpleClassOfEnumTypeToUriNullable( - this.value, - ); + SimpleClassOfEnumTypeToUriNullable(this.value); factory SimpleClassOfEnumTypeToUriNullable.fromJson( - Map json) => - _$SimpleClassOfEnumTypeToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfEnumTypeToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfEnumTypeToUriNullableToJson(this); @@ -6587,13 +5738,11 @@ class SimpleClassOfEnumTypeToUriNullable { class SimpleClassNullableOfEnumTypeToUriNullable { final Map? value; - SimpleClassNullableOfEnumTypeToUriNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeToUriNullable(this.value); factory SimpleClassNullableOfEnumTypeToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeToUriNullableToJson(this); @@ -6603,9 +5752,7 @@ class SimpleClassNullableOfEnumTypeToUriNullable { class SimpleClassOfIntToUriNullable { final Map value; - SimpleClassOfIntToUriNullable( - this.value, - ); + SimpleClassOfIntToUriNullable(this.value); factory SimpleClassOfIntToUriNullable.fromJson(Map json) => _$SimpleClassOfIntToUriNullableFromJson(json); @@ -6617,13 +5764,11 @@ class SimpleClassOfIntToUriNullable { class SimpleClassNullableOfIntToUriNullable { final Map? value; - SimpleClassNullableOfIntToUriNullable( - this.value, - ); + SimpleClassNullableOfIntToUriNullable(this.value); factory SimpleClassNullableOfIntToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntToUriNullableToJson(this); @@ -6633,13 +5778,11 @@ class SimpleClassNullableOfIntToUriNullable { class SimpleClassOfObjectToUriNullable { final Map value; - SimpleClassOfObjectToUriNullable( - this.value, - ); + SimpleClassOfObjectToUriNullable(this.value); factory SimpleClassOfObjectToUriNullable.fromJson( - Map json) => - _$SimpleClassOfObjectToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfObjectToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfObjectToUriNullableToJson(this); @@ -6649,13 +5792,11 @@ class SimpleClassOfObjectToUriNullable { class SimpleClassNullableOfObjectToUriNullable { final Map? value; - SimpleClassNullableOfObjectToUriNullable( - this.value, - ); + SimpleClassNullableOfObjectToUriNullable(this.value); factory SimpleClassNullableOfObjectToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectToUriNullableToJson(this); @@ -6665,13 +5806,11 @@ class SimpleClassNullableOfObjectToUriNullable { class SimpleClassOfStringToUriNullable { final Map value; - SimpleClassOfStringToUriNullable( - this.value, - ); + SimpleClassOfStringToUriNullable(this.value); factory SimpleClassOfStringToUriNullable.fromJson( - Map json) => - _$SimpleClassOfStringToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassOfStringToUriNullableFromJson(json); Map toJson() => _$SimpleClassOfStringToUriNullableToJson(this); @@ -6681,13 +5820,11 @@ class SimpleClassOfStringToUriNullable { class SimpleClassNullableOfStringToUriNullable { final Map? value; - SimpleClassNullableOfStringToUriNullable( - this.value, - ); + SimpleClassNullableOfStringToUriNullable(this.value); factory SimpleClassNullableOfStringToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringToUriNullableToJson(this); @@ -6697,9 +5834,7 @@ class SimpleClassNullableOfStringToUriNullable { class SimpleClassOfUriToUriNullable { final Map value; - SimpleClassOfUriToUriNullable( - this.value, - ); + SimpleClassOfUriToUriNullable(this.value); factory SimpleClassOfUriToUriNullable.fromJson(Map json) => _$SimpleClassOfUriToUriNullableFromJson(json); @@ -6711,13 +5846,11 @@ class SimpleClassOfUriToUriNullable { class SimpleClassNullableOfUriToUriNullable { final Map? value; - SimpleClassNullableOfUriToUriNullable( - this.value, - ); + SimpleClassNullableOfUriToUriNullable(this.value); factory SimpleClassNullableOfUriToUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriToUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriToUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriToUriNullableToJson(this); diff --git a/json_serializable/test/supported_types/input.type_map.g.dart b/json_serializable/test/supported_types/input.type_map.g.dart index 5c8a3ea82..7077797f6 100644 --- a/json_serializable/test/supported_types/input.type_map.g.dart +++ b/json_serializable/test/supported_types/input.type_map.g.dart @@ -9,9 +9,9 @@ part of 'input.type_map.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as Map, - json['withDefault'] as Map? ?? {'a': 1}, - ); + json['value'] as Map, + json['withDefault'] as Map? ?? {'a': 1}, +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,116 +26,116 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; SimpleClassOfBigIntToBigInt _$SimpleClassOfBigIntToBigIntFromJson( - Map json) => - SimpleClassOfBigIntToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfBigIntToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfBigIntToBigIntToJson( - SimpleClassOfBigIntToBigInt instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfBigIntToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfBigIntToBigInt - _$SimpleClassNullableOfBigIntToBigIntFromJson(Map json) => - SimpleClassNullableOfBigIntToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfBigIntToBigIntFromJson(Map json) => + SimpleClassNullableOfBigIntToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), BigInt.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfBigIntToBigIntToJson( - SimpleClassNullableOfBigIntToBigInt instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfBigIntToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfDateTimeToBigInt _$SimpleClassOfDateTimeToBigIntFromJson( - Map json) => - SimpleClassOfDateTimeToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDateTimeToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfDateTimeToBigIntToJson( - SimpleClassOfDateTimeToBigInt instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e.toString())), - }; + SimpleClassOfDateTimeToBigInt instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e.toString()), + ), +}; SimpleClassNullableOfDateTimeToBigInt - _$SimpleClassNullableOfDateTimeToBigIntFromJson( - Map json) => - SimpleClassNullableOfDateTimeToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDateTimeToBigIntFromJson(Map json) => + SimpleClassNullableOfDateTimeToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), BigInt.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfDateTimeToBigIntToJson( - SimpleClassNullableOfDateTimeToBigInt instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e.toString())), - }; + SimpleClassNullableOfDateTimeToBigInt instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e.toString()), + ), +}; SimpleClassOfDynamicToBigInt _$SimpleClassOfDynamicToBigIntFromJson( - Map json) => - SimpleClassOfDynamicToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDynamicToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfDynamicToBigIntToJson( - SimpleClassOfDynamicToBigInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfDynamicToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfDynamicToBigInt - _$SimpleClassNullableOfDynamicToBigIntFromJson(Map json) => - SimpleClassNullableOfDynamicToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDynamicToBigIntFromJson(Map json) => + SimpleClassNullableOfDynamicToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfDynamicToBigIntToJson( - SimpleClassNullableOfDynamicToBigInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfDynamicToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfEnumTypeToBigInt _$SimpleClassOfEnumTypeToBigIntFromJson( - Map json) => - SimpleClassOfEnumTypeToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToBigInt( + (json['value'] as Map).map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfEnumTypeToBigIntToJson( - SimpleClassOfEnumTypeToBigInt instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString())), - }; + SimpleClassOfEnumTypeToBigInt instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString()), + ), +}; const _$EnumTypeEnumMap = { EnumType.alpha: 'alpha', @@ -145,6536 +145,6368 @@ const _$EnumTypeEnumMap = { }; SimpleClassNullableOfEnumTypeToBigInt - _$SimpleClassNullableOfEnumTypeToBigIntFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfEnumTypeToBigIntFromJson(Map json) => + SimpleClassNullableOfEnumTypeToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassNullableOfEnumTypeToBigIntToJson( - SimpleClassNullableOfEnumTypeToBigInt instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString())), - }; + SimpleClassNullableOfEnumTypeToBigInt instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString()), + ), +}; SimpleClassOfIntToBigInt _$SimpleClassOfIntToBigIntFromJson( - Map json) => - SimpleClassOfIntToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfIntToBigIntToJson( - SimpleClassOfIntToBigInt instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfIntToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfIntToBigInt _$SimpleClassNullableOfIntToBigIntFromJson( - Map json) => - SimpleClassNullableOfIntToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfIntToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfIntToBigIntToJson( - SimpleClassNullableOfIntToBigInt instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfIntToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfObjectToBigInt _$SimpleClassOfObjectToBigIntFromJson( - Map json) => - SimpleClassOfObjectToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfObjectToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfObjectToBigIntToJson( - SimpleClassOfObjectToBigInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfObjectToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfObjectToBigInt - _$SimpleClassNullableOfObjectToBigIntFromJson(Map json) => - SimpleClassNullableOfObjectToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfObjectToBigIntFromJson(Map json) => + SimpleClassNullableOfObjectToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfObjectToBigIntToJson( - SimpleClassNullableOfObjectToBigInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfObjectToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfStringToBigInt _$SimpleClassOfStringToBigIntFromJson( - Map json) => - SimpleClassOfStringToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfStringToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfStringToBigIntToJson( - SimpleClassOfStringToBigInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfStringToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfStringToBigInt - _$SimpleClassNullableOfStringToBigIntFromJson(Map json) => - SimpleClassNullableOfStringToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfStringToBigIntFromJson(Map json) => + SimpleClassNullableOfStringToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, BigInt.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfStringToBigIntToJson( - SimpleClassNullableOfStringToBigInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfStringToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfUriToBigInt _$SimpleClassOfUriToBigIntFromJson( - Map json) => - SimpleClassOfUriToBigInt( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToBigInt( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfUriToBigIntToJson( - SimpleClassOfUriToBigInt instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfUriToBigInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfUriToBigInt _$SimpleClassNullableOfUriToBigIntFromJson( - Map json) => - SimpleClassNullableOfUriToBigInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfUriToBigInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfUriToBigIntToJson( - SimpleClassNullableOfUriToBigInt instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfUriToBigInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfBigIntToBigIntNullable - _$SimpleClassOfBigIntToBigIntNullableFromJson(Map json) => - SimpleClassOfBigIntToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfBigIntToBigIntNullableFromJson(Map json) => + SimpleClassOfBigIntToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassOfBigIntToBigIntNullableToJson( - SimpleClassOfBigIntToBigIntNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfBigIntToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfBigIntToBigIntNullable - _$SimpleClassNullableOfBigIntToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfBigIntToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(BigInt.parse(k), e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfBigIntToBigIntNullableToJson( - SimpleClassNullableOfBigIntToBigIntNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfBigIntToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassOfDateTimeToBigIntNullable - _$SimpleClassOfDateTimeToBigIntNullableFromJson( - Map json) => - SimpleClassOfDateTimeToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfDateTimeToBigIntNullableFromJson(Map json) => + SimpleClassOfDateTimeToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassOfDateTimeToBigIntNullableToJson( - SimpleClassOfDateTimeToBigIntNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e?.toString())), - }; + SimpleClassOfDateTimeToBigIntNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toString()), + ), +}; SimpleClassNullableOfDateTimeToBigIntNullable - _$SimpleClassNullableOfDateTimeToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDateTimeToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : BigInt.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfDateTimeToBigIntNullableToJson( - SimpleClassNullableOfDateTimeToBigIntNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e?.toString())), - }; + SimpleClassNullableOfDateTimeToBigIntNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toString()), + ), +}; SimpleClassOfDynamicToBigIntNullable - _$SimpleClassOfDynamicToBigIntNullableFromJson(Map json) => - SimpleClassOfDynamicToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfDynamicToBigIntNullableFromJson(Map json) => + SimpleClassOfDynamicToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), + ); Map _$SimpleClassOfDynamicToBigIntNullableToJson( - SimpleClassOfDynamicToBigIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfDynamicToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfDynamicToBigIntNullable - _$SimpleClassNullableOfDynamicToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDynamicToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDynamicToBigIntNullableToJson( - SimpleClassNullableOfDynamicToBigIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfDynamicToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfEnumTypeToBigIntNullable - _$SimpleClassOfEnumTypeToBigIntNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfEnumTypeToBigIntNullableFromJson(Map json) => + SimpleClassOfEnumTypeToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassOfEnumTypeToBigIntNullableToJson( - SimpleClassOfEnumTypeToBigIntNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString())), - }; + SimpleClassOfEnumTypeToBigIntNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString()), + ), +}; SimpleClassNullableOfEnumTypeToBigIntNullable - _$SimpleClassNullableOfEnumTypeToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfEnumTypeToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : BigInt.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToBigIntNullableToJson( - SimpleClassNullableOfEnumTypeToBigIntNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString())), - }; + SimpleClassNullableOfEnumTypeToBigIntNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString()), + ), +}; SimpleClassOfIntToBigIntNullable _$SimpleClassOfIntToBigIntNullableFromJson( - Map json) => - SimpleClassOfIntToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - int.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToBigIntNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(int.parse(k), e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfIntToBigIntNullableToJson( - SimpleClassOfIntToBigIntNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfIntToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfIntToBigIntNullable - _$SimpleClassNullableOfIntToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfIntToBigIntNullableFromJson(Map json) => + SimpleClassNullableOfIntToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + int.parse(k), + e == null ? null : BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassNullableOfIntToBigIntNullableToJson( - SimpleClassNullableOfIntToBigIntNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfIntToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassOfObjectToBigIntNullable - _$SimpleClassOfObjectToBigIntNullableFromJson(Map json) => - SimpleClassOfObjectToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfObjectToBigIntNullableFromJson(Map json) => + SimpleClassOfObjectToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), + ); Map _$SimpleClassOfObjectToBigIntNullableToJson( - SimpleClassOfObjectToBigIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfObjectToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfObjectToBigIntNullable - _$SimpleClassNullableOfObjectToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfObjectToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfObjectToBigIntNullableToJson( - SimpleClassNullableOfObjectToBigIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfObjectToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfStringToBigIntNullable - _$SimpleClassOfStringToBigIntNullableFromJson(Map json) => - SimpleClassOfStringToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassOfStringToBigIntNullableFromJson(Map json) => + SimpleClassOfStringToBigIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), + ); Map _$SimpleClassOfStringToBigIntNullableToJson( - SimpleClassOfStringToBigIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfStringToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfStringToBigIntNullable - _$SimpleClassNullableOfStringToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfStringToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfStringToBigIntNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassNullableOfStringToBigIntNullableToJson( - SimpleClassNullableOfStringToBigIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfStringToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfUriToBigIntNullable _$SimpleClassOfUriToBigIntNullableFromJson( - Map json) => - SimpleClassOfUriToBigIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - Uri.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToBigIntNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(Uri.parse(k), e == null ? null : BigInt.parse(e as String)), + ), +); Map _$SimpleClassOfUriToBigIntNullableToJson( - SimpleClassOfUriToBigIntNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfUriToBigIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfUriToBigIntNullable - _$SimpleClassNullableOfUriToBigIntNullableFromJson( - Map json) => - SimpleClassNullableOfUriToBigIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), e == null ? null : BigInt.parse(e as String)), - ), - ); +_$SimpleClassNullableOfUriToBigIntNullableFromJson(Map json) => + SimpleClassNullableOfUriToBigIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + Uri.parse(k), + e == null ? null : BigInt.parse(e as String), + ), + ), + ); Map _$SimpleClassNullableOfUriToBigIntNullableToJson( - SimpleClassNullableOfUriToBigIntNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfUriToBigIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassOfBigIntToBool _$SimpleClassOfBigIntToBoolFromJson( - Map json) => - SimpleClassOfBigIntToBool( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassOfBigIntToBool( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as bool), + ), +); Map _$SimpleClassOfBigIntToBoolToJson( - SimpleClassOfBigIntToBool instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToBool instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToBool _$SimpleClassNullableOfBigIntToBoolFromJson( - Map json) => - SimpleClassNullableOfBigIntToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfBigIntToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as bool), + ), +); Map _$SimpleClassNullableOfBigIntToBoolToJson( - SimpleClassNullableOfBigIntToBool instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToBool instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToBool _$SimpleClassOfDateTimeToBoolFromJson( - Map json) => - SimpleClassOfDateTimeToBool( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassOfDateTimeToBool( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as bool), + ), +); Map _$SimpleClassOfDateTimeToBoolToJson( - SimpleClassOfDateTimeToBool instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToBool instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToBool - _$SimpleClassNullableOfDateTimeToBoolFromJson(Map json) => - SimpleClassNullableOfDateTimeToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as bool), - ), - ); +_$SimpleClassNullableOfDateTimeToBoolFromJson(Map json) => + SimpleClassNullableOfDateTimeToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as bool), + ), + ); Map _$SimpleClassNullableOfDateTimeToBoolToJson( - SimpleClassNullableOfDateTimeToBool instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToBool instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToBool _$SimpleClassOfDynamicToBoolFromJson( - Map json) => - SimpleClassOfDynamicToBool( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToBool(Map.from(json['value'] as Map)); Map _$SimpleClassOfDynamicToBoolToJson( - SimpleClassOfDynamicToBool instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToBool instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToBool _$SimpleClassNullableOfDynamicToBoolFromJson( - Map json) => - SimpleClassNullableOfDynamicToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfDynamicToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool), + ), +); Map _$SimpleClassNullableOfDynamicToBoolToJson( - SimpleClassNullableOfDynamicToBool instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToBool instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToBool _$SimpleClassOfEnumTypeToBoolFromJson( - Map json) => - SimpleClassOfEnumTypeToBool( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToBool( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool), + ), +); Map _$SimpleClassOfEnumTypeToBoolToJson( - SimpleClassOfEnumTypeToBool instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToBool instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToBool - _$SimpleClassNullableOfEnumTypeToBoolFromJson(Map json) => - SimpleClassNullableOfEnumTypeToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool), - ), - ); +_$SimpleClassNullableOfEnumTypeToBoolFromJson(Map json) => + SimpleClassNullableOfEnumTypeToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool), + ), + ); Map _$SimpleClassNullableOfEnumTypeToBoolToJson( - SimpleClassNullableOfEnumTypeToBool instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToBool instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToBool _$SimpleClassOfIntToBoolFromJson( - Map json) => - SimpleClassOfIntToBool( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassOfIntToBool( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as bool), + ), +); Map _$SimpleClassOfIntToBoolToJson( - SimpleClassOfIntToBool instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToBool instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToBool _$SimpleClassNullableOfIntToBoolFromJson( - Map json) => - SimpleClassNullableOfIntToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfIntToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as bool), + ), +); Map _$SimpleClassNullableOfIntToBoolToJson( - SimpleClassNullableOfIntToBool instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToBool instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToBool _$SimpleClassOfObjectToBoolFromJson( - Map json) => - SimpleClassOfObjectToBool( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToBool(Map.from(json['value'] as Map)); Map _$SimpleClassOfObjectToBoolToJson( - SimpleClassOfObjectToBool instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToBool instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToBool _$SimpleClassNullableOfObjectToBoolFromJson( - Map json) => - SimpleClassNullableOfObjectToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfObjectToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool), + ), +); Map _$SimpleClassNullableOfObjectToBoolToJson( - SimpleClassNullableOfObjectToBool instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToBool instance, +) => {'value': instance.value}; SimpleClassOfStringToBool _$SimpleClassOfStringToBoolFromJson( - Map json) => - SimpleClassOfStringToBool( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToBool(Map.from(json['value'] as Map)); Map _$SimpleClassOfStringToBoolToJson( - SimpleClassOfStringToBool instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToBool instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToBool _$SimpleClassNullableOfStringToBoolFromJson( - Map json) => - SimpleClassNullableOfStringToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfStringToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool), + ), +); Map _$SimpleClassNullableOfStringToBoolToJson( - SimpleClassNullableOfStringToBool instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToBool instance, +) => {'value': instance.value}; SimpleClassOfUriToBool _$SimpleClassOfUriToBoolFromJson( - Map json) => - SimpleClassOfUriToBool( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassOfUriToBool( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as bool), + ), +); Map _$SimpleClassOfUriToBoolToJson( - SimpleClassOfUriToBool instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToBool instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToBool _$SimpleClassNullableOfUriToBoolFromJson( - Map json) => - SimpleClassNullableOfUriToBool( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as bool), - ), - ); + Map json, +) => SimpleClassNullableOfUriToBool( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as bool), + ), +); Map _$SimpleClassNullableOfUriToBoolToJson( - SimpleClassNullableOfUriToBool instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToBool instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToBoolNullable _$SimpleClassOfBigIntToBoolNullableFromJson( - Map json) => - SimpleClassOfBigIntToBoolNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as bool?), - ), - ); + Map json, +) => SimpleClassOfBigIntToBoolNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as bool?), + ), +); Map _$SimpleClassOfBigIntToBoolNullableToJson( - SimpleClassOfBigIntToBoolNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToBoolNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToBoolNullable - _$SimpleClassNullableOfBigIntToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as bool?), - ), - ); +_$SimpleClassNullableOfBigIntToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as bool?), + ), +); Map _$SimpleClassNullableOfBigIntToBoolNullableToJson( - SimpleClassNullableOfBigIntToBoolNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToBoolNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToBoolNullable - _$SimpleClassOfDateTimeToBoolNullableFromJson(Map json) => - SimpleClassOfDateTimeToBoolNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as bool?), - ), - ); +_$SimpleClassOfDateTimeToBoolNullableFromJson(Map json) => + SimpleClassOfDateTimeToBoolNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as bool?), + ), + ); Map _$SimpleClassOfDateTimeToBoolNullableToJson( - SimpleClassOfDateTimeToBoolNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToBoolNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToBoolNullable - _$SimpleClassNullableOfDateTimeToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as bool?), - ), - ); +_$SimpleClassNullableOfDateTimeToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as bool?), + ), +); Map _$SimpleClassNullableOfDateTimeToBoolNullableToJson( - SimpleClassNullableOfDateTimeToBoolNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToBoolNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToBoolNullable _$SimpleClassOfDynamicToBoolNullableFromJson( - Map json) => - SimpleClassOfDynamicToBoolNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToBoolNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfDynamicToBoolNullableToJson( - SimpleClassOfDynamicToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToBoolNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToBoolNullable - _$SimpleClassNullableOfDynamicToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool?), - ), - ); +_$SimpleClassNullableOfDynamicToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool?), + ), +); Map _$SimpleClassNullableOfDynamicToBoolNullableToJson( - SimpleClassNullableOfDynamicToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToBoolNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToBoolNullable - _$SimpleClassOfEnumTypeToBoolNullableFromJson(Map json) => - SimpleClassOfEnumTypeToBoolNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool?), - ), - ); +_$SimpleClassOfEnumTypeToBoolNullableFromJson(Map json) => + SimpleClassOfEnumTypeToBoolNullable( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool?), + ), + ); Map _$SimpleClassOfEnumTypeToBoolNullableToJson( - SimpleClassOfEnumTypeToBoolNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToBoolNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToBoolNullable - _$SimpleClassNullableOfEnumTypeToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool?), - ), - ); +_$SimpleClassNullableOfEnumTypeToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as bool?), + ), +); Map _$SimpleClassNullableOfEnumTypeToBoolNullableToJson( - SimpleClassNullableOfEnumTypeToBoolNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToBoolNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToBoolNullable _$SimpleClassOfIntToBoolNullableFromJson( - Map json) => - SimpleClassOfIntToBoolNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as bool?), - ), - ); + Map json, +) => SimpleClassOfIntToBoolNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as bool?), + ), +); Map _$SimpleClassOfIntToBoolNullableToJson( - SimpleClassOfIntToBoolNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToBoolNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToBoolNullable - _$SimpleClassNullableOfIntToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfIntToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as bool?), - ), - ); +_$SimpleClassNullableOfIntToBoolNullableFromJson(Map json) => + SimpleClassNullableOfIntToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as bool?), + ), + ); Map _$SimpleClassNullableOfIntToBoolNullableToJson( - SimpleClassNullableOfIntToBoolNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToBoolNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToBoolNullable _$SimpleClassOfObjectToBoolNullableFromJson( - Map json) => - SimpleClassOfObjectToBoolNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToBoolNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfObjectToBoolNullableToJson( - SimpleClassOfObjectToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToBoolNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToBoolNullable - _$SimpleClassNullableOfObjectToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool?), - ), - ); +_$SimpleClassNullableOfObjectToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool?), + ), +); Map _$SimpleClassNullableOfObjectToBoolNullableToJson( - SimpleClassNullableOfObjectToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToBoolNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToBoolNullable _$SimpleClassOfStringToBoolNullableFromJson( - Map json) => - SimpleClassOfStringToBoolNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToBoolNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfStringToBoolNullableToJson( - SimpleClassOfStringToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToBoolNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToBoolNullable - _$SimpleClassNullableOfStringToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfStringToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as bool?), - ), - ); +_$SimpleClassNullableOfStringToBoolNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as bool?), + ), +); Map _$SimpleClassNullableOfStringToBoolNullableToJson( - SimpleClassNullableOfStringToBoolNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToBoolNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToBoolNullable _$SimpleClassOfUriToBoolNullableFromJson( - Map json) => - SimpleClassOfUriToBoolNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as bool?), - ), - ); + Map json, +) => SimpleClassOfUriToBoolNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as bool?), + ), +); Map _$SimpleClassOfUriToBoolNullableToJson( - SimpleClassOfUriToBoolNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToBoolNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToBoolNullable - _$SimpleClassNullableOfUriToBoolNullableFromJson( - Map json) => - SimpleClassNullableOfUriToBoolNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as bool?), - ), - ); +_$SimpleClassNullableOfUriToBoolNullableFromJson(Map json) => + SimpleClassNullableOfUriToBoolNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as bool?), + ), + ); Map _$SimpleClassNullableOfUriToBoolNullableToJson( - SimpleClassNullableOfUriToBoolNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToBoolNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToDateTime _$SimpleClassOfBigIntToDateTimeFromJson( - Map json) => - SimpleClassOfBigIntToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfBigIntToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfBigIntToDateTimeToJson( - SimpleClassOfBigIntToDateTime instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassOfBigIntToDateTime instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassNullableOfBigIntToDateTime - _$SimpleClassNullableOfBigIntToDateTimeFromJson( - Map json) => - SimpleClassNullableOfBigIntToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfBigIntToDateTimeFromJson(Map json) => + SimpleClassNullableOfBigIntToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), DateTime.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfBigIntToDateTimeToJson( - SimpleClassNullableOfBigIntToDateTime instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassNullableOfBigIntToDateTime instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassOfDateTimeToDateTime _$SimpleClassOfDateTimeToDateTimeFromJson( - Map json) => - SimpleClassOfDateTimeToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDateTimeToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfDateTimeToDateTimeToJson( - SimpleClassOfDateTimeToDateTime instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e.toIso8601String())), - }; + SimpleClassOfDateTimeToDateTime instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e.toIso8601String()), + ), +}; SimpleClassNullableOfDateTimeToDateTime - _$SimpleClassNullableOfDateTimeToDateTimeFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDateTimeToDateTimeFromJson(Map json) => + SimpleClassNullableOfDateTimeToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), DateTime.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfDateTimeToDateTimeToJson( - SimpleClassNullableOfDateTimeToDateTime instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e.toIso8601String())), - }; + SimpleClassNullableOfDateTimeToDateTime instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e.toIso8601String()), + ), +}; SimpleClassOfDynamicToDateTime _$SimpleClassOfDynamicToDateTimeFromJson( - Map json) => - SimpleClassOfDynamicToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDynamicToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfDynamicToDateTimeToJson( - SimpleClassOfDynamicToDateTime instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassOfDynamicToDateTime instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassNullableOfDynamicToDateTime - _$SimpleClassNullableOfDynamicToDateTimeFromJson( - Map json) => - SimpleClassNullableOfDynamicToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDynamicToDateTimeFromJson(Map json) => + SimpleClassNullableOfDynamicToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfDynamicToDateTimeToJson( - SimpleClassNullableOfDynamicToDateTime instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassNullableOfDynamicToDateTime instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassOfEnumTypeToDateTime _$SimpleClassOfEnumTypeToDateTimeFromJson( - Map json) => - SimpleClassOfEnumTypeToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + DateTime.parse(e as String), + ), + ), +); Map _$SimpleClassOfEnumTypeToDateTimeToJson( - SimpleClassOfEnumTypeToDateTime instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toIso8601String())), - }; + SimpleClassOfEnumTypeToDateTime instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toIso8601String()), + ), +}; SimpleClassNullableOfEnumTypeToDateTime - _$SimpleClassNullableOfEnumTypeToDateTimeFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfEnumTypeToDateTimeFromJson(Map json) => + SimpleClassNullableOfEnumTypeToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + DateTime.parse(e as String), + ), + ), + ); Map _$SimpleClassNullableOfEnumTypeToDateTimeToJson( - SimpleClassNullableOfEnumTypeToDateTime instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toIso8601String())), - }; + SimpleClassNullableOfEnumTypeToDateTime instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toIso8601String()), + ), +}; SimpleClassOfIntToDateTime _$SimpleClassOfIntToDateTimeFromJson( - Map json) => - SimpleClassOfIntToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfIntToDateTimeToJson( - SimpleClassOfIntToDateTime instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassOfIntToDateTime instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassNullableOfIntToDateTime _$SimpleClassNullableOfIntToDateTimeFromJson( - Map json) => - SimpleClassNullableOfIntToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfIntToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfIntToDateTimeToJson( - SimpleClassNullableOfIntToDateTime instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassNullableOfIntToDateTime instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassOfObjectToDateTime _$SimpleClassOfObjectToDateTimeFromJson( - Map json) => - SimpleClassOfObjectToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfObjectToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfObjectToDateTimeToJson( - SimpleClassOfObjectToDateTime instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassOfObjectToDateTime instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassNullableOfObjectToDateTime - _$SimpleClassNullableOfObjectToDateTimeFromJson( - Map json) => - SimpleClassNullableOfObjectToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfObjectToDateTimeFromJson(Map json) => + SimpleClassNullableOfObjectToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfObjectToDateTimeToJson( - SimpleClassNullableOfObjectToDateTime instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassNullableOfObjectToDateTime instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassOfStringToDateTime _$SimpleClassOfStringToDateTimeFromJson( - Map json) => - SimpleClassOfStringToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfStringToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfStringToDateTimeToJson( - SimpleClassOfStringToDateTime instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassOfStringToDateTime instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassNullableOfStringToDateTime - _$SimpleClassNullableOfStringToDateTimeFromJson( - Map json) => - SimpleClassNullableOfStringToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfStringToDateTimeFromJson(Map json) => + SimpleClassNullableOfStringToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, DateTime.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfStringToDateTimeToJson( - SimpleClassNullableOfStringToDateTime instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), - }; + SimpleClassNullableOfStringToDateTime instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toIso8601String())), +}; SimpleClassOfUriToDateTime _$SimpleClassOfUriToDateTimeFromJson( - Map json) => - SimpleClassOfUriToDateTime( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToDateTime( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfUriToDateTimeToJson( - SimpleClassOfUriToDateTime instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassOfUriToDateTime instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassNullableOfUriToDateTime _$SimpleClassNullableOfUriToDateTimeFromJson( - Map json) => - SimpleClassNullableOfUriToDateTime( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfUriToDateTime( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfUriToDateTimeToJson( - SimpleClassNullableOfUriToDateTime instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.toIso8601String())), - }; + SimpleClassNullableOfUriToDateTime instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.toIso8601String()), + ), +}; SimpleClassOfBigIntToDateTimeNullable - _$SimpleClassOfBigIntToDateTimeNullableFromJson( - Map json) => - SimpleClassOfBigIntToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfBigIntToDateTimeNullableFromJson(Map json) => + SimpleClassOfBigIntToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : DateTime.parse(e as String), + ), + ), + ); Map _$SimpleClassOfBigIntToDateTimeNullableToJson( - SimpleClassOfBigIntToDateTimeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassOfBigIntToDateTimeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassNullableOfBigIntToDateTimeNullable - _$SimpleClassNullableOfBigIntToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfBigIntToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : DateTime.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfBigIntToDateTimeNullableToJson( - SimpleClassNullableOfBigIntToDateTimeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassNullableOfBigIntToDateTimeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassOfDateTimeToDateTimeNullable - _$SimpleClassOfDateTimeToDateTimeNullableFromJson( - Map json) => - SimpleClassOfDateTimeToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfDateTimeToDateTimeNullableFromJson(Map json) => + SimpleClassOfDateTimeToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : DateTime.parse(e as String), + ), + ), + ); Map _$SimpleClassOfDateTimeToDateTimeNullableToJson( - SimpleClassOfDateTimeToDateTimeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e?.toIso8601String())), - }; + SimpleClassOfDateTimeToDateTimeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toIso8601String()), + ), +}; SimpleClassNullableOfDateTimeToDateTimeNullable - _$SimpleClassNullableOfDateTimeToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDateTimeToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : DateTime.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfDateTimeToDateTimeNullableToJson( - SimpleClassNullableOfDateTimeToDateTimeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e?.toIso8601String())), - }; + SimpleClassNullableOfDateTimeToDateTimeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toIso8601String()), + ), +}; SimpleClassOfDynamicToDateTimeNullable - _$SimpleClassOfDynamicToDateTimeNullableFromJson( - Map json) => - SimpleClassOfDynamicToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfDynamicToDateTimeNullableFromJson(Map json) => + SimpleClassOfDynamicToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), + ); Map _$SimpleClassOfDynamicToDateTimeNullableToJson( - SimpleClassOfDynamicToDateTimeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassOfDynamicToDateTimeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassNullableOfDynamicToDateTimeNullable - _$SimpleClassNullableOfDynamicToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDynamicToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDynamicToDateTimeNullableToJson( - SimpleClassNullableOfDynamicToDateTimeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassNullableOfDynamicToDateTimeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassOfEnumTypeToDateTimeNullable - _$SimpleClassOfEnumTypeToDateTimeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfEnumTypeToDateTimeNullableFromJson(Map json) => + SimpleClassOfEnumTypeToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : DateTime.parse(e as String), + ), + ), + ); Map _$SimpleClassOfEnumTypeToDateTimeNullableToJson( - SimpleClassOfEnumTypeToDateTimeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toIso8601String())), - }; + SimpleClassOfEnumTypeToDateTimeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toIso8601String()), + ), +}; SimpleClassNullableOfEnumTypeToDateTimeNullable - _$SimpleClassNullableOfEnumTypeToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfEnumTypeToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : DateTime.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToDateTimeNullableToJson( - SimpleClassNullableOfEnumTypeToDateTimeNullable instance) => - { - 'value': instance.value?.map( - (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toIso8601String())), - }; + SimpleClassNullableOfEnumTypeToDateTimeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toIso8601String()), + ), +}; SimpleClassOfIntToDateTimeNullable _$SimpleClassOfIntToDateTimeNullableFromJson( - Map json) => - SimpleClassOfIntToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - int.parse(k), e == null ? null : DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(int.parse(k), e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfIntToDateTimeNullableToJson( - SimpleClassOfIntToDateTimeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassOfIntToDateTimeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassNullableOfIntToDateTimeNullable - _$SimpleClassNullableOfIntToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfIntToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfIntToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfIntToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(int.parse(k), e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfIntToDateTimeNullableToJson( - SimpleClassNullableOfIntToDateTimeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassNullableOfIntToDateTimeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassOfObjectToDateTimeNullable - _$SimpleClassOfObjectToDateTimeNullableFromJson( - Map json) => - SimpleClassOfObjectToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfObjectToDateTimeNullableFromJson(Map json) => + SimpleClassOfObjectToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), + ); Map _$SimpleClassOfObjectToDateTimeNullableToJson( - SimpleClassOfObjectToDateTimeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassOfObjectToDateTimeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassNullableOfObjectToDateTimeNullable - _$SimpleClassNullableOfObjectToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfObjectToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfObjectToDateTimeNullableToJson( - SimpleClassNullableOfObjectToDateTimeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassNullableOfObjectToDateTimeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassOfStringToDateTimeNullable - _$SimpleClassOfStringToDateTimeNullableFromJson( - Map json) => - SimpleClassOfStringToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassOfStringToDateTimeNullableFromJson(Map json) => + SimpleClassOfStringToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), + ); Map _$SimpleClassOfStringToDateTimeNullableToJson( - SimpleClassOfStringToDateTimeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassOfStringToDateTimeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassNullableOfStringToDateTimeNullable - _$SimpleClassNullableOfStringToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfStringToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(k, e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfStringToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfStringToDateTimeNullableToJson( - SimpleClassNullableOfStringToDateTimeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), - }; + SimpleClassNullableOfStringToDateTimeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toIso8601String())), +}; SimpleClassOfUriToDateTimeNullable _$SimpleClassOfUriToDateTimeNullableFromJson( - Map json) => - SimpleClassOfUriToDateTimeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - Uri.parse(k), e == null ? null : DateTime.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToDateTimeNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(Uri.parse(k), e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassOfUriToDateTimeNullableToJson( - SimpleClassOfUriToDateTimeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassOfUriToDateTimeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassNullableOfUriToDateTimeNullable - _$SimpleClassNullableOfUriToDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfUriToDateTimeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), e == null ? null : DateTime.parse(e as String)), - ), - ); +_$SimpleClassNullableOfUriToDateTimeNullableFromJson( + Map json, +) => SimpleClassNullableOfUriToDateTimeNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(Uri.parse(k), e == null ? null : DateTime.parse(e as String)), + ), +); Map _$SimpleClassNullableOfUriToDateTimeNullableToJson( - SimpleClassNullableOfUriToDateTimeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.toIso8601String())), - }; + SimpleClassNullableOfUriToDateTimeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.toIso8601String()), + ), +}; SimpleClassOfBigIntToDouble _$SimpleClassOfBigIntToDoubleFromJson( - Map json) => - SimpleClassOfBigIntToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfBigIntToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassOfBigIntToDoubleToJson( - SimpleClassOfBigIntToDouble instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToDouble instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToDouble - _$SimpleClassNullableOfBigIntToDoubleFromJson(Map json) => - SimpleClassNullableOfBigIntToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfBigIntToDoubleFromJson(Map json) => + SimpleClassNullableOfBigIntToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfBigIntToDoubleToJson( - SimpleClassNullableOfBigIntToDouble instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToDouble instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToDouble _$SimpleClassOfDateTimeToDoubleFromJson( - Map json) => - SimpleClassOfDateTimeToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfDateTimeToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassOfDateTimeToDoubleToJson( - SimpleClassOfDateTimeToDouble instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToDouble instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToDouble - _$SimpleClassNullableOfDateTimeToDoubleFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfDateTimeToDoubleFromJson(Map json) => + SimpleClassNullableOfDateTimeToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfDateTimeToDoubleToJson( - SimpleClassNullableOfDateTimeToDouble instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToDouble instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToDouble _$SimpleClassOfDynamicToDoubleFromJson( - Map json) => - SimpleClassOfDynamicToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfDynamicToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), +); Map _$SimpleClassOfDynamicToDoubleToJson( - SimpleClassOfDynamicToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToDouble instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToDouble - _$SimpleClassNullableOfDynamicToDoubleFromJson(Map json) => - SimpleClassNullableOfDynamicToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfDynamicToDoubleFromJson(Map json) => + SimpleClassNullableOfDynamicToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfDynamicToDoubleToJson( - SimpleClassNullableOfDynamicToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToDouble instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToDouble _$SimpleClassOfEnumTypeToDoubleFromJson( - Map json) => - SimpleClassOfEnumTypeToDouble( - (json['value'] as Map).map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToDouble( + (json['value'] as Map).map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toDouble()), + ), +); Map _$SimpleClassOfEnumTypeToDoubleToJson( - SimpleClassOfEnumTypeToDouble instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToDouble instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToDouble - _$SimpleClassNullableOfEnumTypeToDoubleFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfEnumTypeToDoubleFromJson(Map json) => + SimpleClassNullableOfEnumTypeToDouble( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfEnumTypeToDoubleToJson( - SimpleClassNullableOfEnumTypeToDouble instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToDouble instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToDouble _$SimpleClassOfIntToDoubleFromJson( - Map json) => - SimpleClassOfIntToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfIntToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassOfIntToDoubleToJson( - SimpleClassOfIntToDouble instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToDouble instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToDouble _$SimpleClassNullableOfIntToDoubleFromJson( - Map json) => - SimpleClassNullableOfIntToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassNullableOfIntToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassNullableOfIntToDoubleToJson( - SimpleClassNullableOfIntToDouble instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToDouble instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToDouble _$SimpleClassOfObjectToDoubleFromJson( - Map json) => - SimpleClassOfObjectToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfObjectToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), +); Map _$SimpleClassOfObjectToDoubleToJson( - SimpleClassOfObjectToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToDouble instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToDouble - _$SimpleClassNullableOfObjectToDoubleFromJson(Map json) => - SimpleClassNullableOfObjectToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfObjectToDoubleFromJson(Map json) => + SimpleClassNullableOfObjectToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfObjectToDoubleToJson( - SimpleClassNullableOfObjectToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToDouble instance, +) => {'value': instance.value}; SimpleClassOfStringToDouble _$SimpleClassOfStringToDoubleFromJson( - Map json) => - SimpleClassOfStringToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfStringToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), +); Map _$SimpleClassOfStringToDoubleToJson( - SimpleClassOfStringToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToDouble instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToDouble - _$SimpleClassNullableOfStringToDoubleFromJson(Map json) => - SimpleClassNullableOfStringToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toDouble()), - ), - ); +_$SimpleClassNullableOfStringToDoubleFromJson(Map json) => + SimpleClassNullableOfStringToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), + ); Map _$SimpleClassNullableOfStringToDoubleToJson( - SimpleClassNullableOfStringToDouble instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToDouble instance, +) => {'value': instance.value}; SimpleClassOfUriToDouble _$SimpleClassOfUriToDoubleFromJson( - Map json) => - SimpleClassOfUriToDouble( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassOfUriToDouble( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassOfUriToDoubleToJson( - SimpleClassOfUriToDouble instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToDouble instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToDouble _$SimpleClassNullableOfUriToDoubleFromJson( - Map json) => - SimpleClassNullableOfUriToDouble( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), (e as num).toDouble()), - ), - ); + Map json, +) => SimpleClassNullableOfUriToDouble( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), (e as num).toDouble()), + ), +); Map _$SimpleClassNullableOfUriToDoubleToJson( - SimpleClassNullableOfUriToDouble instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToDouble instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToDoubleNullable - _$SimpleClassOfBigIntToDoubleNullableFromJson(Map json) => - SimpleClassOfBigIntToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfBigIntToDoubleNullableFromJson(Map json) => + SimpleClassOfBigIntToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassOfBigIntToDoubleNullableToJson( - SimpleClassOfBigIntToDoubleNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToDoubleNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToDoubleNullable - _$SimpleClassNullableOfBigIntToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfBigIntToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfBigIntToDoubleNullableToJson( - SimpleClassNullableOfBigIntToDoubleNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToDoubleNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToDoubleNullable - _$SimpleClassOfDateTimeToDoubleNullableFromJson( - Map json) => - SimpleClassOfDateTimeToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfDateTimeToDoubleNullableFromJson(Map json) => + SimpleClassOfDateTimeToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassOfDateTimeToDoubleNullableToJson( - SimpleClassOfDateTimeToDoubleNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToDoubleNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToDoubleNullable - _$SimpleClassNullableOfDateTimeToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfDateTimeToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfDateTimeToDoubleNullableToJson( - SimpleClassNullableOfDateTimeToDoubleNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToDoubleNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToDoubleNullable - _$SimpleClassOfDynamicToDoubleNullableFromJson(Map json) => - SimpleClassOfDynamicToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfDynamicToDoubleNullableFromJson(Map json) => + SimpleClassOfDynamicToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassOfDynamicToDoubleNullableToJson( - SimpleClassOfDynamicToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToDoubleNullable - _$SimpleClassNullableOfDynamicToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfDynamicToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfDynamicToDoubleNullableToJson( - SimpleClassNullableOfDynamicToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToDoubleNullable - _$SimpleClassOfEnumTypeToDoubleNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfEnumTypeToDoubleNullableFromJson(Map json) => + SimpleClassOfEnumTypeToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + (e as num?)?.toDouble(), + ), + ), + ); Map _$SimpleClassOfEnumTypeToDoubleNullableToJson( - SimpleClassOfEnumTypeToDoubleNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToDoubleNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToDoubleNullable - _$SimpleClassNullableOfEnumTypeToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfEnumTypeToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfEnumTypeToDoubleNullableToJson( - SimpleClassNullableOfEnumTypeToDoubleNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToDoubleNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToDoubleNullable _$SimpleClassOfIntToDoubleNullableFromJson( - Map json) => - SimpleClassOfIntToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), (e as num?)?.toDouble()), - ), - ); + Map json, +) => SimpleClassOfIntToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), (e as num?)?.toDouble()), + ), +); Map _$SimpleClassOfIntToDoubleNullableToJson( - SimpleClassOfIntToDoubleNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToDoubleNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToDoubleNullable - _$SimpleClassNullableOfIntToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfIntToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfIntToDoubleNullableFromJson(Map json) => + SimpleClassNullableOfIntToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassNullableOfIntToDoubleNullableToJson( - SimpleClassNullableOfIntToDoubleNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToDoubleNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToDoubleNullable - _$SimpleClassOfObjectToDoubleNullableFromJson(Map json) => - SimpleClassOfObjectToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfObjectToDoubleNullableFromJson(Map json) => + SimpleClassOfObjectToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassOfObjectToDoubleNullableToJson( - SimpleClassOfObjectToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToDoubleNullable - _$SimpleClassNullableOfObjectToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfObjectToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfObjectToDoubleNullableToJson( - SimpleClassNullableOfObjectToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToDoubleNullable - _$SimpleClassOfStringToDoubleNullableFromJson(Map json) => - SimpleClassOfStringToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassOfStringToDoubleNullableFromJson(Map json) => + SimpleClassOfStringToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassOfStringToDoubleNullableToJson( - SimpleClassOfStringToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToDoubleNullable - _$SimpleClassNullableOfStringToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfStringToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfStringToDoubleNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toDouble()), + ), +); Map _$SimpleClassNullableOfStringToDoubleNullableToJson( - SimpleClassNullableOfStringToDoubleNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToDoubleNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToDoubleNullable _$SimpleClassOfUriToDoubleNullableFromJson( - Map json) => - SimpleClassOfUriToDoubleNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toDouble()), - ), - ); + Map json, +) => SimpleClassOfUriToDoubleNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toDouble()), + ), +); Map _$SimpleClassOfUriToDoubleNullableToJson( - SimpleClassOfUriToDoubleNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToDoubleNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToDoubleNullable - _$SimpleClassNullableOfUriToDoubleNullableFromJson( - Map json) => - SimpleClassNullableOfUriToDoubleNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toDouble()), - ), - ); +_$SimpleClassNullableOfUriToDoubleNullableFromJson(Map json) => + SimpleClassNullableOfUriToDoubleNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toDouble()), + ), + ); Map _$SimpleClassNullableOfUriToDoubleNullableToJson( - SimpleClassNullableOfUriToDoubleNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToDoubleNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToDuration _$SimpleClassOfBigIntToDurationFromJson( - Map json) => - SimpleClassOfBigIntToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfBigIntToDuration( + (json['value'] as Map).map( + (k, e) => + MapEntry(BigInt.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfBigIntToDurationToJson( - SimpleClassOfBigIntToDuration instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassOfBigIntToDuration instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassNullableOfBigIntToDuration - _$SimpleClassNullableOfBigIntToDurationFromJson( - Map json) => - SimpleClassNullableOfBigIntToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfBigIntToDurationFromJson(Map json) => + SimpleClassNullableOfBigIntToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + BigInt.parse(k), + Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassNullableOfBigIntToDurationToJson( - SimpleClassNullableOfBigIntToDuration instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassNullableOfBigIntToDuration instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassOfDateTimeToDuration _$SimpleClassOfDateTimeToDurationFromJson( - Map json) => - SimpleClassOfDateTimeToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfDateTimeToDuration( + (json['value'] as Map).map( + (k, e) => + MapEntry(DateTime.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfDateTimeToDurationToJson( - SimpleClassOfDateTimeToDuration instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e.inMicroseconds)), - }; + SimpleClassOfDateTimeToDuration instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e.inMicroseconds), + ), +}; SimpleClassNullableOfDateTimeToDuration - _$SimpleClassNullableOfDateTimeToDurationFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfDateTimeToDurationFromJson(Map json) => + SimpleClassNullableOfDateTimeToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + DateTime.parse(k), + Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassNullableOfDateTimeToDurationToJson( - SimpleClassNullableOfDateTimeToDuration instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e.inMicroseconds)), - }; + SimpleClassNullableOfDateTimeToDuration instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e.inMicroseconds), + ), +}; SimpleClassOfDynamicToDuration _$SimpleClassOfDynamicToDurationFromJson( - Map json) => - SimpleClassOfDynamicToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfDynamicToDuration( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfDynamicToDurationToJson( - SimpleClassOfDynamicToDuration instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassOfDynamicToDuration instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassNullableOfDynamicToDuration - _$SimpleClassNullableOfDynamicToDurationFromJson( - Map json) => - SimpleClassNullableOfDynamicToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfDynamicToDurationFromJson(Map json) => + SimpleClassNullableOfDynamicToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), + ); Map _$SimpleClassNullableOfDynamicToDurationToJson( - SimpleClassNullableOfDynamicToDuration instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassNullableOfDynamicToDuration instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassOfEnumTypeToDuration _$SimpleClassOfEnumTypeToDurationFromJson( - Map json) => - SimpleClassOfEnumTypeToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToDuration( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassOfEnumTypeToDurationToJson( - SimpleClassOfEnumTypeToDuration instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.inMicroseconds)), - }; + SimpleClassOfEnumTypeToDuration instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.inMicroseconds), + ), +}; SimpleClassNullableOfEnumTypeToDuration - _$SimpleClassNullableOfEnumTypeToDurationFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfEnumTypeToDurationFromJson(Map json) => + SimpleClassNullableOfEnumTypeToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassNullableOfEnumTypeToDurationToJson( - SimpleClassNullableOfEnumTypeToDuration instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.inMicroseconds)), - }; + SimpleClassNullableOfEnumTypeToDuration instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.inMicroseconds), + ), +}; SimpleClassOfIntToDuration _$SimpleClassOfIntToDurationFromJson( - Map json) => - SimpleClassOfIntToDuration( - (json['value'] as Map).map( - (k, e) => - MapEntry(int.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfIntToDuration( + (json['value'] as Map).map( + (k, e) => + MapEntry(int.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfIntToDurationToJson( - SimpleClassOfIntToDuration instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassOfIntToDuration instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassNullableOfIntToDuration _$SimpleClassNullableOfIntToDurationFromJson( - Map json) => - SimpleClassNullableOfIntToDuration( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(int.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassNullableOfIntToDuration( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(int.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassNullableOfIntToDurationToJson( - SimpleClassNullableOfIntToDuration instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassNullableOfIntToDuration instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassOfObjectToDuration _$SimpleClassOfObjectToDurationFromJson( - Map json) => - SimpleClassOfObjectToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfObjectToDuration( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfObjectToDurationToJson( - SimpleClassOfObjectToDuration instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassOfObjectToDuration instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassNullableOfObjectToDuration - _$SimpleClassNullableOfObjectToDurationFromJson( - Map json) => - SimpleClassNullableOfObjectToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfObjectToDurationFromJson(Map json) => + SimpleClassNullableOfObjectToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), + ); Map _$SimpleClassNullableOfObjectToDurationToJson( - SimpleClassNullableOfObjectToDuration instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassNullableOfObjectToDuration instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassOfStringToDuration _$SimpleClassOfStringToDurationFromJson( - Map json) => - SimpleClassOfStringToDuration( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfStringToDuration( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfStringToDurationToJson( - SimpleClassOfStringToDuration instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassOfStringToDuration instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassNullableOfStringToDuration - _$SimpleClassNullableOfStringToDurationFromJson( - Map json) => - SimpleClassNullableOfStringToDuration( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfStringToDurationFromJson(Map json) => + SimpleClassNullableOfStringToDuration( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Duration(microseconds: (e as num).toInt())), + ), + ); Map _$SimpleClassNullableOfStringToDurationToJson( - SimpleClassNullableOfStringToDuration instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), - }; + SimpleClassNullableOfStringToDuration instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.inMicroseconds)), +}; SimpleClassOfUriToDuration _$SimpleClassOfUriToDurationFromJson( - Map json) => - SimpleClassOfUriToDuration( - (json['value'] as Map).map( - (k, e) => - MapEntry(Uri.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfUriToDuration( + (json['value'] as Map).map( + (k, e) => + MapEntry(Uri.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassOfUriToDurationToJson( - SimpleClassOfUriToDuration instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassOfUriToDuration instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassNullableOfUriToDuration _$SimpleClassNullableOfUriToDurationFromJson( - Map json) => - SimpleClassNullableOfUriToDuration( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(Uri.parse(k), Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassNullableOfUriToDuration( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(Uri.parse(k), Duration(microseconds: (e as num).toInt())), + ), +); Map _$SimpleClassNullableOfUriToDurationToJson( - SimpleClassNullableOfUriToDuration instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)), - }; + SimpleClassNullableOfUriToDuration instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e.inMicroseconds), + ), +}; SimpleClassOfBigIntToDurationNullable - _$SimpleClassOfBigIntToDurationNullableFromJson( - Map json) => - SimpleClassOfBigIntToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfBigIntToDurationNullableFromJson(Map json) => + SimpleClassOfBigIntToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfBigIntToDurationNullableToJson( - SimpleClassOfBigIntToDurationNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassOfBigIntToDurationNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassNullableOfBigIntToDurationNullable - _$SimpleClassNullableOfBigIntToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfBigIntToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfBigIntToDurationNullableToJson( - SimpleClassNullableOfBigIntToDurationNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassNullableOfBigIntToDurationNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassOfDateTimeToDurationNullable - _$SimpleClassOfDateTimeToDurationNullableFromJson( - Map json) => - SimpleClassOfDateTimeToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfDateTimeToDurationNullableFromJson(Map json) => + SimpleClassOfDateTimeToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfDateTimeToDurationNullableToJson( - SimpleClassOfDateTimeToDurationNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e?.inMicroseconds)), - }; + SimpleClassOfDateTimeToDurationNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e?.inMicroseconds), + ), +}; SimpleClassNullableOfDateTimeToDurationNullable - _$SimpleClassNullableOfDateTimeToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfDateTimeToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + DateTime.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfDateTimeToDurationNullableToJson( - SimpleClassNullableOfDateTimeToDurationNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e?.inMicroseconds)), - }; + SimpleClassNullableOfDateTimeToDurationNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e?.inMicroseconds), + ), +}; SimpleClassOfDynamicToDurationNullable - _$SimpleClassOfDynamicToDurationNullableFromJson( - Map json) => - SimpleClassOfDynamicToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfDynamicToDurationNullableFromJson(Map json) => + SimpleClassOfDynamicToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfDynamicToDurationNullableToJson( - SimpleClassOfDynamicToDurationNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassOfDynamicToDurationNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassNullableOfDynamicToDurationNullable - _$SimpleClassNullableOfDynamicToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfDynamicToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfDynamicToDurationNullableToJson( - SimpleClassNullableOfDynamicToDurationNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassNullableOfDynamicToDurationNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassOfEnumTypeToDurationNullable - _$SimpleClassOfEnumTypeToDurationNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfEnumTypeToDurationNullableFromJson(Map json) => + SimpleClassOfEnumTypeToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfEnumTypeToDurationNullableToJson( - SimpleClassOfEnumTypeToDurationNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.inMicroseconds)), - }; + SimpleClassOfEnumTypeToDurationNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.inMicroseconds), + ), +}; SimpleClassNullableOfEnumTypeToDurationNullable - _$SimpleClassNullableOfEnumTypeToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfEnumTypeToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToDurationNullableToJson( - SimpleClassNullableOfEnumTypeToDurationNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.inMicroseconds)), - }; + SimpleClassNullableOfEnumTypeToDurationNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.inMicroseconds), + ), +}; SimpleClassOfIntToDurationNullable _$SimpleClassOfIntToDurationNullableFromJson( - Map json) => - SimpleClassOfIntToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfIntToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + int.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassOfIntToDurationNullableToJson( - SimpleClassOfIntToDurationNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassOfIntToDurationNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassNullableOfIntToDurationNullable - _$SimpleClassNullableOfIntToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfIntToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfIntToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfIntToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + int.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfIntToDurationNullableToJson( - SimpleClassNullableOfIntToDurationNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassNullableOfIntToDurationNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassOfObjectToDurationNullable - _$SimpleClassOfObjectToDurationNullableFromJson( - Map json) => - SimpleClassOfObjectToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfObjectToDurationNullableFromJson(Map json) => + SimpleClassOfObjectToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfObjectToDurationNullableToJson( - SimpleClassOfObjectToDurationNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassOfObjectToDurationNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassNullableOfObjectToDurationNullable - _$SimpleClassNullableOfObjectToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfObjectToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfObjectToDurationNullableToJson( - SimpleClassNullableOfObjectToDurationNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassNullableOfObjectToDurationNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassOfStringToDurationNullable - _$SimpleClassOfStringToDurationNullableFromJson( - Map json) => - SimpleClassOfStringToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassOfStringToDurationNullableFromJson(Map json) => + SimpleClassOfStringToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), + ); Map _$SimpleClassOfStringToDurationNullableToJson( - SimpleClassOfStringToDurationNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassOfStringToDurationNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassNullableOfStringToDurationNullable - _$SimpleClassNullableOfStringToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfStringToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfStringToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfStringToDurationNullableToJson( - SimpleClassNullableOfStringToDurationNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), - }; + SimpleClassNullableOfStringToDurationNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.inMicroseconds)), +}; SimpleClassOfUriToDurationNullable _$SimpleClassOfUriToDurationNullableFromJson( - Map json) => - SimpleClassOfUriToDurationNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); + Map json, +) => SimpleClassOfUriToDurationNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + Uri.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassOfUriToDurationNullableToJson( - SimpleClassOfUriToDurationNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassOfUriToDurationNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassNullableOfUriToDurationNullable - _$SimpleClassNullableOfUriToDurationNullableFromJson( - Map json) => - SimpleClassNullableOfUriToDurationNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), - e == null ? null : Duration(microseconds: (e as num).toInt())), - ), - ); +_$SimpleClassNullableOfUriToDurationNullableFromJson( + Map json, +) => SimpleClassNullableOfUriToDurationNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + Uri.parse(k), + e == null ? null : Duration(microseconds: (e as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfUriToDurationNullableToJson( - SimpleClassNullableOfUriToDurationNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), e?.inMicroseconds)), - }; + SimpleClassNullableOfUriToDurationNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), e?.inMicroseconds), + ), +}; SimpleClassOfBigIntToDynamic _$SimpleClassOfBigIntToDynamicFromJson( - Map json) => - SimpleClassOfBigIntToDynamic( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfBigIntToDynamic( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e), + ), +); Map _$SimpleClassOfBigIntToDynamicToJson( - SimpleClassOfBigIntToDynamic instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToDynamic instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToDynamic - _$SimpleClassNullableOfBigIntToDynamicFromJson(Map json) => - SimpleClassNullableOfBigIntToDynamic( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e), - ), - ); +_$SimpleClassNullableOfBigIntToDynamicFromJson(Map json) => + SimpleClassNullableOfBigIntToDynamic( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e), + ), + ); Map _$SimpleClassNullableOfBigIntToDynamicToJson( - SimpleClassNullableOfBigIntToDynamic instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToDynamic instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToDynamic _$SimpleClassOfDateTimeToDynamicFromJson( - Map json) => - SimpleClassOfDateTimeToDynamic( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfDateTimeToDynamic( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e), + ), +); Map _$SimpleClassOfDateTimeToDynamicToJson( - SimpleClassOfDateTimeToDynamic instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToDynamic instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToDynamic - _$SimpleClassNullableOfDateTimeToDynamicFromJson( - Map json) => - SimpleClassNullableOfDateTimeToDynamic( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e), - ), - ); +_$SimpleClassNullableOfDateTimeToDynamicFromJson(Map json) => + SimpleClassNullableOfDateTimeToDynamic( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e), + ), + ); Map _$SimpleClassNullableOfDateTimeToDynamicToJson( - SimpleClassNullableOfDateTimeToDynamic instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToDynamic instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToDynamic _$SimpleClassOfDynamicToDynamicFromJson( - Map json) => - SimpleClassOfDynamicToDynamic( - json['value'] as Map, - ); + Map json, +) => SimpleClassOfDynamicToDynamic(json['value'] as Map); Map _$SimpleClassOfDynamicToDynamicToJson( - SimpleClassOfDynamicToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToDynamic instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToDynamic - _$SimpleClassNullableOfDynamicToDynamicFromJson( - Map json) => - SimpleClassNullableOfDynamicToDynamic( - json['value'] as Map?, - ); +_$SimpleClassNullableOfDynamicToDynamicFromJson(Map json) => + SimpleClassNullableOfDynamicToDynamic( + json['value'] as Map?, + ); Map _$SimpleClassNullableOfDynamicToDynamicToJson( - SimpleClassNullableOfDynamicToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToDynamic instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToDynamic _$SimpleClassOfEnumTypeToDynamicFromJson( - Map json) => - SimpleClassOfEnumTypeToDynamic( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToDynamic( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), + ), +); Map _$SimpleClassOfEnumTypeToDynamicToJson( - SimpleClassOfEnumTypeToDynamic instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToDynamic instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToDynamic - _$SimpleClassNullableOfEnumTypeToDynamicFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToDynamic( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), - ), - ); +_$SimpleClassNullableOfEnumTypeToDynamicFromJson(Map json) => + SimpleClassNullableOfEnumTypeToDynamic( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), + ), + ); Map _$SimpleClassNullableOfEnumTypeToDynamicToJson( - SimpleClassNullableOfEnumTypeToDynamic instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToDynamic instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToDynamic _$SimpleClassOfIntToDynamicFromJson( - Map json) => - SimpleClassOfIntToDynamic( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfIntToDynamic( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e), + ), +); Map _$SimpleClassOfIntToDynamicToJson( - SimpleClassOfIntToDynamic instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToDynamic instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToDynamic _$SimpleClassNullableOfIntToDynamicFromJson( - Map json) => - SimpleClassNullableOfIntToDynamic( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e), - ), - ); + Map json, +) => SimpleClassNullableOfIntToDynamic( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e), + ), +); Map _$SimpleClassNullableOfIntToDynamicToJson( - SimpleClassNullableOfIntToDynamic instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToDynamic instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToDynamic _$SimpleClassOfObjectToDynamicFromJson( - Map json) => - SimpleClassOfObjectToDynamic( - json['value'] as Map, - ); + Map json, +) => SimpleClassOfObjectToDynamic(json['value'] as Map); Map _$SimpleClassOfObjectToDynamicToJson( - SimpleClassOfObjectToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToDynamic instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToDynamic - _$SimpleClassNullableOfObjectToDynamicFromJson(Map json) => - SimpleClassNullableOfObjectToDynamic( - json['value'] as Map?, - ); +_$SimpleClassNullableOfObjectToDynamicFromJson(Map json) => + SimpleClassNullableOfObjectToDynamic( + json['value'] as Map?, + ); Map _$SimpleClassNullableOfObjectToDynamicToJson( - SimpleClassNullableOfObjectToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToDynamic instance, +) => {'value': instance.value}; SimpleClassOfStringToDynamic _$SimpleClassOfStringToDynamicFromJson( - Map json) => - SimpleClassOfStringToDynamic( - json['value'] as Map, - ); + Map json, +) => SimpleClassOfStringToDynamic(json['value'] as Map); Map _$SimpleClassOfStringToDynamicToJson( - SimpleClassOfStringToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToDynamic instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToDynamic - _$SimpleClassNullableOfStringToDynamicFromJson(Map json) => - SimpleClassNullableOfStringToDynamic( - json['value'] as Map?, - ); +_$SimpleClassNullableOfStringToDynamicFromJson(Map json) => + SimpleClassNullableOfStringToDynamic( + json['value'] as Map?, + ); Map _$SimpleClassNullableOfStringToDynamicToJson( - SimpleClassNullableOfStringToDynamic instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToDynamic instance, +) => {'value': instance.value}; SimpleClassOfUriToDynamic _$SimpleClassOfUriToDynamicFromJson( - Map json) => - SimpleClassOfUriToDynamic( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfUriToDynamic( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e), + ), +); Map _$SimpleClassOfUriToDynamicToJson( - SimpleClassOfUriToDynamic instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToDynamic instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToDynamic _$SimpleClassNullableOfUriToDynamicFromJson( - Map json) => - SimpleClassNullableOfUriToDynamic( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e), - ), - ); + Map json, +) => SimpleClassNullableOfUriToDynamic( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e), + ), +); Map _$SimpleClassNullableOfUriToDynamicToJson( - SimpleClassNullableOfUriToDynamic instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToDynamic instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToEnumType _$SimpleClassOfBigIntToEnumTypeFromJson( - Map json) => - SimpleClassOfBigIntToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfBigIntToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfBigIntToEnumTypeToJson( - SimpleClassOfBigIntToEnumType instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfBigIntToEnumType instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassNullableOfBigIntToEnumType - _$SimpleClassNullableOfBigIntToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfBigIntToEnumType( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(BigInt.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfBigIntToEnumTypeFromJson(Map json) => + SimpleClassNullableOfBigIntToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassNullableOfBigIntToEnumTypeToJson( - SimpleClassNullableOfBigIntToEnumType instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfBigIntToEnumType instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassOfDateTimeToEnumType _$SimpleClassOfDateTimeToEnumTypeFromJson( - Map json) => - SimpleClassOfDateTimeToEnumType( - (json['value'] as Map).map( - (k, e) => - MapEntry(DateTime.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfDateTimeToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfDateTimeToEnumTypeToJson( - SimpleClassOfDateTimeToEnumType instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfDateTimeToEnumType instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassNullableOfDateTimeToEnumType - _$SimpleClassNullableOfDateTimeToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfDateTimeToEnumType( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(DateTime.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfDateTimeToEnumTypeFromJson(Map json) => + SimpleClassNullableOfDateTimeToEnumType( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(DateTime.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassNullableOfDateTimeToEnumTypeToJson( - SimpleClassNullableOfDateTimeToEnumType instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfDateTimeToEnumType instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassOfDynamicToEnumType _$SimpleClassOfDynamicToEnumTypeFromJson( - Map json) => - SimpleClassOfDynamicToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfDynamicToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfDynamicToEnumTypeToJson( - SimpleClassOfDynamicToEnumType instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfDynamicToEnumType instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassNullableOfDynamicToEnumType - _$SimpleClassNullableOfDynamicToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfDynamicToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfDynamicToEnumTypeFromJson(Map json) => + SimpleClassNullableOfDynamicToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassNullableOfDynamicToEnumTypeToJson( - SimpleClassNullableOfDynamicToEnumType instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfDynamicToEnumType instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassOfEnumTypeToEnumType _$SimpleClassOfEnumTypeToEnumTypeFromJson( - Map json) => - SimpleClassOfEnumTypeToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + $enumDecode(_$EnumTypeEnumMap, e), + ), + ), +); Map _$SimpleClassOfEnumTypeToEnumTypeToJson( - SimpleClassOfEnumTypeToEnumType instance) => - { - 'value': instance.value.map( - (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfEnumTypeToEnumType instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassNullableOfEnumTypeToEnumType - _$SimpleClassNullableOfEnumTypeToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfEnumTypeToEnumTypeFromJson(Map json) => + SimpleClassNullableOfEnumTypeToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + $enumDecode(_$EnumTypeEnumMap, e), + ), + ), + ); Map _$SimpleClassNullableOfEnumTypeToEnumTypeToJson( - SimpleClassNullableOfEnumTypeToEnumType instance) => - { - 'value': instance.value?.map( - (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfEnumTypeToEnumType instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassOfIntToEnumType _$SimpleClassOfIntToEnumTypeFromJson( - Map json) => - SimpleClassOfIntToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfIntToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfIntToEnumTypeToJson( - SimpleClassOfIntToEnumType instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfIntToEnumType instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassNullableOfIntToEnumType _$SimpleClassNullableOfIntToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfIntToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassNullableOfIntToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfIntToEnumTypeToJson( - SimpleClassNullableOfIntToEnumType instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfIntToEnumType instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassOfObjectToEnumType _$SimpleClassOfObjectToEnumTypeFromJson( - Map json) => - SimpleClassOfObjectToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfObjectToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfObjectToEnumTypeToJson( - SimpleClassOfObjectToEnumType instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfObjectToEnumType instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassNullableOfObjectToEnumType - _$SimpleClassNullableOfObjectToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfObjectToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfObjectToEnumTypeFromJson(Map json) => + SimpleClassNullableOfObjectToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassNullableOfObjectToEnumTypeToJson( - SimpleClassNullableOfObjectToEnumType instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfObjectToEnumType instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassOfStringToEnumType _$SimpleClassOfStringToEnumTypeFromJson( - Map json) => - SimpleClassOfStringToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfStringToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfStringToEnumTypeToJson( - SimpleClassOfStringToEnumType instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfStringToEnumType instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassNullableOfStringToEnumType - _$SimpleClassNullableOfStringToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfStringToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfStringToEnumTypeFromJson(Map json) => + SimpleClassNullableOfStringToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecode(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassNullableOfStringToEnumTypeToJson( - SimpleClassNullableOfStringToEnumType instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfStringToEnumType instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e]!)), +}; SimpleClassOfUriToEnumType _$SimpleClassOfUriToEnumTypeFromJson( - Map json) => - SimpleClassOfUriToEnumType( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfUriToEnumType( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfUriToEnumTypeToJson( - SimpleClassOfUriToEnumType instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassOfUriToEnumType instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassNullableOfUriToEnumType _$SimpleClassNullableOfUriToEnumTypeFromJson( - Map json) => - SimpleClassNullableOfUriToEnumType( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassNullableOfUriToEnumType( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), $enumDecode(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfUriToEnumTypeToJson( - SimpleClassNullableOfUriToEnumType instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!)), - }; + SimpleClassNullableOfUriToEnumType instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]!), + ), +}; SimpleClassOfBigIntToEnumTypeNullable - _$SimpleClassOfBigIntToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfBigIntToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfBigIntToEnumTypeNullableFromJson(Map json) => + SimpleClassOfBigIntToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), + ), + ); Map _$SimpleClassOfBigIntToEnumTypeNullableToJson( - SimpleClassOfBigIntToEnumTypeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassOfBigIntToEnumTypeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassNullableOfBigIntToEnumTypeNullable - _$SimpleClassNullableOfBigIntToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfBigIntToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(BigInt.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfBigIntToEnumTypeNullableToJson( - SimpleClassNullableOfBigIntToEnumTypeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfBigIntToEnumTypeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassOfDateTimeToEnumTypeNullable - _$SimpleClassOfDateTimeToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfDateTimeToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfDateTimeToEnumTypeNullableFromJson(Map json) => + SimpleClassOfDateTimeToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + DateTime.parse(k), + $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), + ), + ); Map _$SimpleClassOfDateTimeToEnumTypeNullableToJson( - SimpleClassOfDateTimeToEnumTypeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e])), - }; + SimpleClassOfDateTimeToEnumTypeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassNullableOfDateTimeToEnumTypeNullable - _$SimpleClassNullableOfDateTimeToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfDateTimeToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(DateTime.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfDateTimeToEnumTypeNullableToJson( - SimpleClassNullableOfDateTimeToEnumTypeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfDateTimeToEnumTypeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassOfDynamicToEnumTypeNullable - _$SimpleClassOfDynamicToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfDynamicToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfDynamicToEnumTypeNullableFromJson(Map json) => + SimpleClassOfDynamicToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassOfDynamicToEnumTypeNullableToJson( - SimpleClassOfDynamicToEnumTypeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassOfDynamicToEnumTypeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassNullableOfDynamicToEnumTypeNullable - _$SimpleClassNullableOfDynamicToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfDynamicToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfDynamicToEnumTypeNullableToJson( - SimpleClassNullableOfDynamicToEnumTypeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfDynamicToEnumTypeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassOfEnumTypeToEnumTypeNullable - _$SimpleClassOfEnumTypeToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfEnumTypeToEnumTypeNullableFromJson(Map json) => + SimpleClassOfEnumTypeToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), + ), + ); Map _$SimpleClassOfEnumTypeToEnumTypeNullableToJson( - SimpleClassOfEnumTypeToEnumTypeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e])), - }; + SimpleClassOfEnumTypeToEnumTypeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]), + ), +}; SimpleClassNullableOfEnumTypeToEnumTypeNullable - _$SimpleClassNullableOfEnumTypeToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfEnumTypeToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + $enumDecodeNullable(_$EnumTypeEnumMap, e), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToEnumTypeNullableToJson( - SimpleClassNullableOfEnumTypeToEnumTypeNullable instance) => - { - 'value': instance.value?.map( - (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfEnumTypeToEnumTypeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, _$EnumTypeEnumMap[e]), + ), +}; SimpleClassOfIntToEnumTypeNullable _$SimpleClassOfIntToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfIntToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(int.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfIntToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfIntToEnumTypeNullableToJson( - SimpleClassOfIntToEnumTypeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassOfIntToEnumTypeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassNullableOfIntToEnumTypeNullable - _$SimpleClassNullableOfIntToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfIntToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfIntToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfIntToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfIntToEnumTypeNullableToJson( - SimpleClassNullableOfIntToEnumTypeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfIntToEnumTypeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassOfObjectToEnumTypeNullable - _$SimpleClassOfObjectToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfObjectToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfObjectToEnumTypeNullableFromJson(Map json) => + SimpleClassOfObjectToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassOfObjectToEnumTypeNullableToJson( - SimpleClassOfObjectToEnumTypeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassOfObjectToEnumTypeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassNullableOfObjectToEnumTypeNullable - _$SimpleClassNullableOfObjectToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfObjectToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfObjectToEnumTypeNullableToJson( - SimpleClassNullableOfObjectToEnumTypeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfObjectToEnumTypeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassOfStringToEnumTypeNullable - _$SimpleClassOfStringToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfStringToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassOfStringToEnumTypeNullableFromJson(Map json) => + SimpleClassOfStringToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), + ); Map _$SimpleClassOfStringToEnumTypeNullableToJson( - SimpleClassOfStringToEnumTypeNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassOfStringToEnumTypeNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassNullableOfStringToEnumTypeNullable - _$SimpleClassNullableOfStringToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfStringToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfStringToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfStringToEnumTypeNullableToJson( - SimpleClassNullableOfStringToEnumTypeNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfStringToEnumTypeNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, _$EnumTypeEnumMap[e])), +}; SimpleClassOfUriToEnumTypeNullable _$SimpleClassOfUriToEnumTypeNullableFromJson( - Map json) => - SimpleClassOfUriToEnumTypeNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(Uri.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); + Map json, +) => SimpleClassOfUriToEnumTypeNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassOfUriToEnumTypeNullableToJson( - SimpleClassOfUriToEnumTypeNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassOfUriToEnumTypeNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassNullableOfUriToEnumTypeNullable - _$SimpleClassNullableOfUriToEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfUriToEnumTypeNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), - ), - ); +_$SimpleClassNullableOfUriToEnumTypeNullableFromJson( + Map json, +) => SimpleClassNullableOfUriToEnumTypeNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), $enumDecodeNullable(_$EnumTypeEnumMap, e)), + ), +); Map _$SimpleClassNullableOfUriToEnumTypeNullableToJson( - SimpleClassNullableOfUriToEnumTypeNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e])), - }; + SimpleClassNullableOfUriToEnumTypeNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), _$EnumTypeEnumMap[e]), + ), +}; SimpleClassOfBigIntToFromJsonDynamicParam - _$SimpleClassOfBigIntToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfBigIntToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => - MapEntry(BigInt.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfBigIntToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfBigIntToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassOfBigIntToFromJsonDynamicParamToJson( - SimpleClassOfBigIntToFromJsonDynamicParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToFromJsonDynamicParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToFromJsonDynamicParam - _$SimpleClassNullableOfBigIntToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfBigIntToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(BigInt.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfBigIntToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfBigIntToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfBigIntToFromJsonDynamicParamToJson( - SimpleClassNullableOfBigIntToFromJsonDynamicParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToFromJsonDynamicParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToFromJsonDynamicParam - _$SimpleClassOfDateTimeToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfDateTimeToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => - MapEntry(DateTime.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfDateTimeToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfDateTimeToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassOfDateTimeToFromJsonDynamicParamToJson( - SimpleClassOfDateTimeToFromJsonDynamicParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToFromJsonDynamicParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToFromJsonDynamicParam - _$SimpleClassNullableOfDateTimeToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfDateTimeToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(DateTime.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfDateTimeToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map - _$SimpleClassNullableOfDateTimeToFromJsonDynamicParamToJson( - SimpleClassNullableOfDateTimeToFromJsonDynamicParam instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; +_$SimpleClassNullableOfDateTimeToFromJsonDynamicParamToJson( + SimpleClassNullableOfDateTimeToFromJsonDynamicParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToFromJsonDynamicParam - _$SimpleClassOfDynamicToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfDynamicToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfDynamicToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfDynamicToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassOfDynamicToFromJsonDynamicParamToJson( - SimpleClassOfDynamicToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToFromJsonDynamicParam - _$SimpleClassNullableOfDynamicToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfDynamicToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfDynamicToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfDynamicToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfDynamicToFromJsonDynamicParamToJson( - SimpleClassNullableOfDynamicToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToFromJsonDynamicParam - _$SimpleClassOfEnumTypeToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfEnumTypeToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfEnumTypeToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfEnumTypeToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonDynamicParam.fromJson(e), + ), + ), +); Map _$SimpleClassOfEnumTypeToFromJsonDynamicParamToJson( - SimpleClassOfEnumTypeToFromJsonDynamicParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToFromJsonDynamicParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToFromJsonDynamicParam - _$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonDynamicParam.fromJson(e), + ), + ), +); Map - _$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamToJson( - SimpleClassNullableOfEnumTypeToFromJsonDynamicParam instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; +_$SimpleClassNullableOfEnumTypeToFromJsonDynamicParamToJson( + SimpleClassNullableOfEnumTypeToFromJsonDynamicParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToFromJsonDynamicParam - _$SimpleClassOfIntToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfIntToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfIntToFromJsonDynamicParamFromJson(Map json) => + SimpleClassOfIntToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), FromJsonDynamicParam.fromJson(e)), + ), + ); Map _$SimpleClassOfIntToFromJsonDynamicParamToJson( - SimpleClassOfIntToFromJsonDynamicParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToFromJsonDynamicParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToFromJsonDynamicParam - _$SimpleClassNullableOfIntToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfIntToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfIntToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfIntToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfIntToFromJsonDynamicParamToJson( - SimpleClassNullableOfIntToFromJsonDynamicParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToFromJsonDynamicParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToFromJsonDynamicParam - _$SimpleClassOfObjectToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfObjectToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfObjectToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfObjectToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassOfObjectToFromJsonDynamicParamToJson( - SimpleClassOfObjectToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToFromJsonDynamicParam - _$SimpleClassNullableOfObjectToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfObjectToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfObjectToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfObjectToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfObjectToFromJsonDynamicParamToJson( - SimpleClassNullableOfObjectToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassOfStringToFromJsonDynamicParam - _$SimpleClassOfStringToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfStringToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfStringToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassOfStringToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassOfStringToFromJsonDynamicParamToJson( - SimpleClassOfStringToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToFromJsonDynamicParam - _$SimpleClassNullableOfStringToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfStringToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfStringToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfStringToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfStringToFromJsonDynamicParamToJson( - SimpleClassNullableOfStringToFromJsonDynamicParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToFromJsonDynamicParam instance, +) => {'value': instance.value}; SimpleClassOfUriToFromJsonDynamicParam - _$SimpleClassOfUriToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfUriToFromJsonDynamicParam( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassOfUriToFromJsonDynamicParamFromJson(Map json) => + SimpleClassOfUriToFromJsonDynamicParam( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), FromJsonDynamicParam.fromJson(e)), + ), + ); Map _$SimpleClassOfUriToFromJsonDynamicParamToJson( - SimpleClassOfUriToFromJsonDynamicParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToFromJsonDynamicParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToFromJsonDynamicParam - _$SimpleClassNullableOfUriToFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfUriToFromJsonDynamicParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), FromJsonDynamicParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfUriToFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfUriToFromJsonDynamicParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), FromJsonDynamicParam.fromJson(e)), + ), +); Map _$SimpleClassNullableOfUriToFromJsonDynamicParamToJson( - SimpleClassNullableOfUriToFromJsonDynamicParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToFromJsonDynamicParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToFromJsonNullableObjectParam - _$SimpleClassOfBigIntToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfBigIntToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfBigIntToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfBigIntToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => + MapEntry(BigInt.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfBigIntToFromJsonNullableObjectParamToJson( - SimpleClassOfBigIntToFromJsonNullableObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToFromJsonNullableObjectParam - _$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfBigIntToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfBigIntToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(BigInt.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); -Map _$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfBigIntToFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; +Map +_$SimpleClassNullableOfBigIntToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfBigIntToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToFromJsonNullableObjectParam - _$SimpleClassOfDateTimeToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfDateTimeToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfDateTimeToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfDateTimeToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => + MapEntry(DateTime.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfDateTimeToFromJsonNullableObjectParamToJson( - SimpleClassOfDateTimeToFromJsonNullableObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam - _$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(DateTime.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); -Map _$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; +Map +_$SimpleClassNullableOfDateTimeToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfDateTimeToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToFromJsonNullableObjectParam - _$SimpleClassOfDynamicToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfDynamicToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfDynamicToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfDynamicToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfDynamicToFromJsonNullableObjectParamToJson( - SimpleClassOfDynamicToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToFromJsonNullableObjectParam - _$SimpleClassNullableOfDynamicToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfDynamicToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfDynamicToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfDynamicToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); -Map _$SimpleClassNullableOfDynamicToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfDynamicToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; +Map +_$SimpleClassNullableOfDynamicToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfDynamicToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToFromJsonNullableObjectParam - _$SimpleClassOfEnumTypeToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfEnumTypeToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfEnumTypeToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfEnumTypeToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonNullableObjectParam.fromJson(e), + ), + ), +); Map _$SimpleClassOfEnumTypeToFromJsonNullableObjectParamToJson( - SimpleClassOfEnumTypeToFromJsonNullableObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam - _$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonNullableObjectParam.fromJson(e), + ), + ), +); -Map _$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; +Map +_$SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfEnumTypeToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToFromJsonNullableObjectParam - _$SimpleClassOfIntToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfIntToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => - MapEntry(int.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfIntToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfIntToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfIntToFromJsonNullableObjectParamToJson( - SimpleClassOfIntToFromJsonNullableObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToFromJsonNullableObjectParam - _$SimpleClassNullableOfIntToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfIntToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(int.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfIntToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfIntToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map - _$SimpleClassNullableOfIntToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfIntToFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; +_$SimpleClassNullableOfIntToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfIntToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToFromJsonNullableObjectParam - _$SimpleClassOfObjectToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfObjectToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfObjectToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfObjectToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfObjectToFromJsonNullableObjectParamToJson( - SimpleClassOfObjectToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToFromJsonNullableObjectParam - _$SimpleClassNullableOfObjectToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfObjectToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfObjectToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfObjectToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); -Map _$SimpleClassNullableOfObjectToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfObjectToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; +Map +_$SimpleClassNullableOfObjectToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfObjectToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassOfStringToFromJsonNullableObjectParam - _$SimpleClassOfStringToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfStringToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfStringToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfStringToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfStringToFromJsonNullableObjectParamToJson( - SimpleClassOfStringToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToFromJsonNullableObjectParam - _$SimpleClassNullableOfStringToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfStringToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfStringToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfStringToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonNullableObjectParam.fromJson(e)), + ), +); -Map _$SimpleClassNullableOfStringToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfStringToFromJsonNullableObjectParam instance) => - { - 'value': instance.value, - }; +Map +_$SimpleClassNullableOfStringToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfStringToFromJsonNullableObjectParam instance, +) => {'value': instance.value}; SimpleClassOfUriToFromJsonNullableObjectParam - _$SimpleClassOfUriToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfUriToFromJsonNullableObjectParam( - (json['value'] as Map).map( - (k, e) => - MapEntry(Uri.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassOfUriToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassOfUriToFromJsonNullableObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map _$SimpleClassOfUriToFromJsonNullableObjectParamToJson( - SimpleClassOfUriToFromJsonNullableObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToFromJsonNullableObjectParam - _$SimpleClassNullableOfUriToFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfUriToFromJsonNullableObjectParam( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry(Uri.parse(k), FromJsonNullableObjectParam.fromJson(e)), - ), - ); +_$SimpleClassNullableOfUriToFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfUriToFromJsonNullableObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), FromJsonNullableObjectParam.fromJson(e)), + ), +); Map - _$SimpleClassNullableOfUriToFromJsonNullableObjectParamToJson( - SimpleClassNullableOfUriToFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; +_$SimpleClassNullableOfUriToFromJsonNullableObjectParamToJson( + SimpleClassNullableOfUriToFromJsonNullableObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToFromJsonObjectParam - _$SimpleClassOfBigIntToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfBigIntToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfBigIntToFromJsonObjectParamFromJson(Map json) => + SimpleClassOfBigIntToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + FromJsonObjectParam.fromJson(e as Object), + ), + ), + ); Map _$SimpleClassOfBigIntToFromJsonObjectParamToJson( - SimpleClassOfBigIntToFromJsonObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToFromJsonObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToFromJsonObjectParam - _$SimpleClassNullableOfBigIntToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfBigIntToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfBigIntToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfBigIntToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(BigInt.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfBigIntToFromJsonObjectParamToJson( - SimpleClassNullableOfBigIntToFromJsonObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToFromJsonObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToFromJsonObjectParam - _$SimpleClassOfDateTimeToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfDateTimeToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfDateTimeToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassOfDateTimeToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => + MapEntry(DateTime.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassOfDateTimeToFromJsonObjectParamToJson( - SimpleClassOfDateTimeToFromJsonObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToFromJsonObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToFromJsonObjectParam - _$SimpleClassNullableOfDateTimeToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfDateTimeToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfDateTimeToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(DateTime.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfDateTimeToFromJsonObjectParamToJson( - SimpleClassNullableOfDateTimeToFromJsonObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToFromJsonObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToFromJsonObjectParam - _$SimpleClassOfDynamicToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfDynamicToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfDynamicToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassOfDynamicToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassOfDynamicToFromJsonObjectParamToJson( - SimpleClassOfDynamicToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToFromJsonObjectParam - _$SimpleClassNullableOfDynamicToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfDynamicToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfDynamicToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfDynamicToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfDynamicToFromJsonObjectParamToJson( - SimpleClassNullableOfDynamicToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToFromJsonObjectParam - _$SimpleClassOfEnumTypeToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfEnumTypeToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfEnumTypeToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassOfEnumTypeToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonObjectParam.fromJson(e as Object), + ), + ), +); Map _$SimpleClassOfEnumTypeToFromJsonObjectParamToJson( - SimpleClassOfEnumTypeToFromJsonObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToFromJsonObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToFromJsonObjectParam - _$SimpleClassNullableOfEnumTypeToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfEnumTypeToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + FromJsonObjectParam.fromJson(e as Object), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToFromJsonObjectParamToJson( - SimpleClassNullableOfEnumTypeToFromJsonObjectParam instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToFromJsonObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToFromJsonObjectParam - _$SimpleClassOfIntToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfIntToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - int.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfIntToFromJsonObjectParamFromJson(Map json) => + SimpleClassOfIntToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => + MapEntry(int.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), + ); Map _$SimpleClassOfIntToFromJsonObjectParamToJson( - SimpleClassOfIntToFromJsonObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToFromJsonObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToFromJsonObjectParam - _$SimpleClassNullableOfIntToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfIntToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfIntToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfIntToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfIntToFromJsonObjectParamToJson( - SimpleClassNullableOfIntToFromJsonObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToFromJsonObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToFromJsonObjectParam - _$SimpleClassOfObjectToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfObjectToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfObjectToFromJsonObjectParamFromJson(Map json) => + SimpleClassOfObjectToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), + ); Map _$SimpleClassOfObjectToFromJsonObjectParamToJson( - SimpleClassOfObjectToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToFromJsonObjectParam - _$SimpleClassNullableOfObjectToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfObjectToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfObjectToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfObjectToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfObjectToFromJsonObjectParamToJson( - SimpleClassNullableOfObjectToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassOfStringToFromJsonObjectParam - _$SimpleClassOfStringToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfStringToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfStringToFromJsonObjectParamFromJson(Map json) => + SimpleClassOfStringToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), + ); Map _$SimpleClassOfStringToFromJsonObjectParamToJson( - SimpleClassOfStringToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToFromJsonObjectParam - _$SimpleClassNullableOfStringToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfStringToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfStringToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfStringToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfStringToFromJsonObjectParamToJson( - SimpleClassNullableOfStringToFromJsonObjectParam instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToFromJsonObjectParam instance, +) => {'value': instance.value}; SimpleClassOfUriToFromJsonObjectParam - _$SimpleClassOfUriToFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfUriToFromJsonObjectParam( - (json['value'] as Map).map( - (k, e) => MapEntry( - Uri.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassOfUriToFromJsonObjectParamFromJson(Map json) => + SimpleClassOfUriToFromJsonObjectParam( + (json['value'] as Map).map( + (k, e) => + MapEntry(Uri.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), + ); Map _$SimpleClassOfUriToFromJsonObjectParamToJson( - SimpleClassOfUriToFromJsonObjectParam instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToFromJsonObjectParam instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToFromJsonObjectParam - _$SimpleClassNullableOfUriToFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfUriToFromJsonObjectParam( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), FromJsonObjectParam.fromJson(e as Object)), - ), - ); +_$SimpleClassNullableOfUriToFromJsonObjectParamFromJson( + Map json, +) => SimpleClassNullableOfUriToFromJsonObjectParam( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), FromJsonObjectParam.fromJson(e as Object)), + ), +); Map _$SimpleClassNullableOfUriToFromJsonObjectParamToJson( - SimpleClassNullableOfUriToFromJsonObjectParam instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToFromJsonObjectParam instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToInt _$SimpleClassOfBigIntToIntFromJson( - Map json) => - SimpleClassOfBigIntToInt( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassOfBigIntToInt( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassOfBigIntToIntToJson( - SimpleClassOfBigIntToInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToInt _$SimpleClassNullableOfBigIntToIntFromJson( - Map json) => - SimpleClassNullableOfBigIntToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfBigIntToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfBigIntToIntToJson( - SimpleClassNullableOfBigIntToInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToInt _$SimpleClassOfDateTimeToIntFromJson( - Map json) => - SimpleClassOfDateTimeToInt( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassOfDateTimeToInt( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassOfDateTimeToIntToJson( - SimpleClassOfDateTimeToInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToInt _$SimpleClassNullableOfDateTimeToIntFromJson( - Map json) => - SimpleClassNullableOfDateTimeToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfDateTimeToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfDateTimeToIntToJson( - SimpleClassNullableOfDateTimeToInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToInt _$SimpleClassOfDynamicToIntFromJson( - Map json) => - SimpleClassOfDynamicToInt( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToInt(Map.from(json['value'] as Map)); Map _$SimpleClassOfDynamicToIntToJson( - SimpleClassOfDynamicToInt instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToInt instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToInt _$SimpleClassNullableOfDynamicToIntFromJson( - Map json) => - SimpleClassNullableOfDynamicToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfDynamicToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfDynamicToIntToJson( - SimpleClassNullableOfDynamicToInt instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToInt instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToInt _$SimpleClassOfEnumTypeToIntFromJson( - Map json) => - SimpleClassOfEnumTypeToInt( - (json['value'] as Map).map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToInt( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toInt()), + ), +); Map _$SimpleClassOfEnumTypeToIntToJson( - SimpleClassOfEnumTypeToInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToInt _$SimpleClassNullableOfEnumTypeToIntFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToInt( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfEnumTypeToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfEnumTypeToIntToJson( - SimpleClassNullableOfEnumTypeToInt instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToInt _$SimpleClassOfIntToIntFromJson( - Map json) => - SimpleClassOfIntToInt( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassOfIntToInt( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassOfIntToIntToJson( - SimpleClassOfIntToInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToInt _$SimpleClassNullableOfIntToIntFromJson( - Map json) => - SimpleClassNullableOfIntToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfIntToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfIntToIntToJson( - SimpleClassNullableOfIntToInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToInt _$SimpleClassOfObjectToIntFromJson( - Map json) => - SimpleClassOfObjectToInt( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToInt(Map.from(json['value'] as Map)); Map _$SimpleClassOfObjectToIntToJson( - SimpleClassOfObjectToInt instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToInt instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToInt _$SimpleClassNullableOfObjectToIntFromJson( - Map json) => - SimpleClassNullableOfObjectToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfObjectToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfObjectToIntToJson( - SimpleClassNullableOfObjectToInt instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToInt instance, +) => {'value': instance.value}; SimpleClassOfStringToInt _$SimpleClassOfStringToIntFromJson( - Map json) => - SimpleClassOfStringToInt( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToInt(Map.from(json['value'] as Map)); Map _$SimpleClassOfStringToIntToJson( - SimpleClassOfStringToInt instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToInt instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToInt _$SimpleClassNullableOfStringToIntFromJson( - Map json) => - SimpleClassNullableOfStringToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfStringToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfStringToIntToJson( - SimpleClassNullableOfStringToInt instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToInt instance, +) => {'value': instance.value}; SimpleClassOfUriToInt _$SimpleClassOfUriToIntFromJson( - Map json) => - SimpleClassOfUriToInt( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassOfUriToInt( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassOfUriToIntToJson( - SimpleClassOfUriToInt instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToInt instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToInt _$SimpleClassNullableOfUriToIntFromJson( - Map json) => - SimpleClassNullableOfUriToInt( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), (e as num).toInt()), - ), - ); + Map json, +) => SimpleClassNullableOfUriToInt( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), (e as num).toInt()), + ), +); Map _$SimpleClassNullableOfUriToIntToJson( - SimpleClassNullableOfUriToInt instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToInt instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToIntNullable _$SimpleClassOfBigIntToIntNullableFromJson( - Map json) => - SimpleClassOfBigIntToIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toInt()), - ), - ); + Map json, +) => SimpleClassOfBigIntToIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassOfBigIntToIntNullableToJson( - SimpleClassOfBigIntToIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToIntNullable - _$SimpleClassNullableOfBigIntToIntNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfBigIntToIntNullableFromJson(Map json) => + SimpleClassNullableOfBigIntToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), (e as num?)?.toInt()), + ), + ); Map _$SimpleClassNullableOfBigIntToIntNullableToJson( - SimpleClassNullableOfBigIntToIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToIntNullable _$SimpleClassOfDateTimeToIntNullableFromJson( - Map json) => - SimpleClassOfDateTimeToIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toInt()), - ), - ); + Map json, +) => SimpleClassOfDateTimeToIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassOfDateTimeToIntNullableToJson( - SimpleClassOfDateTimeToIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToIntNullable - _$SimpleClassNullableOfDateTimeToIntNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfDateTimeToIntNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassNullableOfDateTimeToIntNullableToJson( - SimpleClassNullableOfDateTimeToIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToIntNullable _$SimpleClassOfDynamicToIntNullableFromJson( - Map json) => - SimpleClassOfDynamicToIntNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToIntNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfDynamicToIntNullableToJson( - SimpleClassOfDynamicToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToIntNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToIntNullable - _$SimpleClassNullableOfDynamicToIntNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfDynamicToIntNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toInt()), + ), +); Map _$SimpleClassNullableOfDynamicToIntNullableToJson( - SimpleClassNullableOfDynamicToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToIntNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToIntNullable _$SimpleClassOfEnumTypeToIntNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToIntNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toInt()), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassOfEnumTypeToIntNullableToJson( - SimpleClassOfEnumTypeToIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToIntNullable - _$SimpleClassNullableOfEnumTypeToIntNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfEnumTypeToIntNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassNullableOfEnumTypeToIntNullableToJson( - SimpleClassNullableOfEnumTypeToIntNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToIntNullable _$SimpleClassOfIntToIntNullableFromJson( - Map json) => - SimpleClassOfIntToIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), (e as num?)?.toInt()), - ), - ); + Map json, +) => SimpleClassOfIntToIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassOfIntToIntNullableToJson( - SimpleClassOfIntToIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToIntNullable - _$SimpleClassNullableOfIntToIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfIntToIntNullableFromJson(Map json) => + SimpleClassNullableOfIntToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), (e as num?)?.toInt()), + ), + ); Map _$SimpleClassNullableOfIntToIntNullableToJson( - SimpleClassNullableOfIntToIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToIntNullable _$SimpleClassOfObjectToIntNullableFromJson( - Map json) => - SimpleClassOfObjectToIntNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToIntNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfObjectToIntNullableToJson( - SimpleClassOfObjectToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToIntNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToIntNullable - _$SimpleClassNullableOfObjectToIntNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfObjectToIntNullableFromJson(Map json) => + SimpleClassNullableOfObjectToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toInt()), + ), + ); Map _$SimpleClassNullableOfObjectToIntNullableToJson( - SimpleClassNullableOfObjectToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToIntNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToIntNullable _$SimpleClassOfStringToIntNullableFromJson( - Map json) => - SimpleClassOfStringToIntNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToIntNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfStringToIntNullableToJson( - SimpleClassOfStringToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToIntNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToIntNullable - _$SimpleClassNullableOfStringToIntNullableFromJson( - Map json) => - SimpleClassNullableOfStringToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfStringToIntNullableFromJson(Map json) => + SimpleClassNullableOfStringToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num?)?.toInt()), + ), + ); Map _$SimpleClassNullableOfStringToIntNullableToJson( - SimpleClassNullableOfStringToIntNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToIntNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToIntNullable _$SimpleClassOfUriToIntNullableFromJson( - Map json) => - SimpleClassOfUriToIntNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toInt()), - ), - ); + Map json, +) => SimpleClassOfUriToIntNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toInt()), + ), +); Map _$SimpleClassOfUriToIntNullableToJson( - SimpleClassOfUriToIntNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToIntNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToIntNullable - _$SimpleClassNullableOfUriToIntNullableFromJson( - Map json) => - SimpleClassNullableOfUriToIntNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toInt()), - ), - ); +_$SimpleClassNullableOfUriToIntNullableFromJson(Map json) => + SimpleClassNullableOfUriToIntNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), (e as num?)?.toInt()), + ), + ); Map _$SimpleClassNullableOfUriToIntNullableToJson( - SimpleClassNullableOfUriToIntNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToIntNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToNum _$SimpleClassOfBigIntToNumFromJson( - Map json) => - SimpleClassOfBigIntToNum( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassOfBigIntToNum( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as num), + ), +); Map _$SimpleClassOfBigIntToNumToJson( - SimpleClassOfBigIntToNum instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToNum instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToNum _$SimpleClassNullableOfBigIntToNumFromJson( - Map json) => - SimpleClassNullableOfBigIntToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassNullableOfBigIntToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as num), + ), +); Map _$SimpleClassNullableOfBigIntToNumToJson( - SimpleClassNullableOfBigIntToNum instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToNum instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToNum _$SimpleClassOfDateTimeToNumFromJson( - Map json) => - SimpleClassOfDateTimeToNum( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassOfDateTimeToNum( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as num), + ), +); Map _$SimpleClassOfDateTimeToNumToJson( - SimpleClassOfDateTimeToNum instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToNum instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToNum _$SimpleClassNullableOfDateTimeToNumFromJson( - Map json) => - SimpleClassNullableOfDateTimeToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassNullableOfDateTimeToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as num), + ), +); Map _$SimpleClassNullableOfDateTimeToNumToJson( - SimpleClassNullableOfDateTimeToNum instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToNum instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToNum _$SimpleClassOfDynamicToNumFromJson( - Map json) => - SimpleClassOfDynamicToNum( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToNum(Map.from(json['value'] as Map)); Map _$SimpleClassOfDynamicToNumToJson( - SimpleClassOfDynamicToNum instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToNum instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToNum _$SimpleClassNullableOfDynamicToNumFromJson( - Map json) => - SimpleClassNullableOfDynamicToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num), - ), - ); + Map json, +) => SimpleClassNullableOfDynamicToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num), + ), +); Map _$SimpleClassNullableOfDynamicToNumToJson( - SimpleClassNullableOfDynamicToNum instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToNum instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToNum _$SimpleClassOfEnumTypeToNumFromJson( - Map json) => - SimpleClassOfEnumTypeToNum( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToNum( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num), + ), +); Map _$SimpleClassOfEnumTypeToNumToJson( - SimpleClassOfEnumTypeToNum instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToNum instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToNum _$SimpleClassNullableOfEnumTypeToNumFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num), - ), - ); + Map json, +) => SimpleClassNullableOfEnumTypeToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num), + ), +); Map _$SimpleClassNullableOfEnumTypeToNumToJson( - SimpleClassNullableOfEnumTypeToNum instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToNum instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToNum _$SimpleClassOfIntToNumFromJson( - Map json) => - SimpleClassOfIntToNum( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassOfIntToNum( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as num), + ), +); Map _$SimpleClassOfIntToNumToJson( - SimpleClassOfIntToNum instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToNum instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToNum _$SimpleClassNullableOfIntToNumFromJson( - Map json) => - SimpleClassNullableOfIntToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassNullableOfIntToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as num), + ), +); Map _$SimpleClassNullableOfIntToNumToJson( - SimpleClassNullableOfIntToNum instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToNum instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToNum _$SimpleClassOfObjectToNumFromJson( - Map json) => - SimpleClassOfObjectToNum( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToNum(Map.from(json['value'] as Map)); Map _$SimpleClassOfObjectToNumToJson( - SimpleClassOfObjectToNum instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToNum instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToNum _$SimpleClassNullableOfObjectToNumFromJson( - Map json) => - SimpleClassNullableOfObjectToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num), - ), - ); + Map json, +) => SimpleClassNullableOfObjectToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num), + ), +); Map _$SimpleClassNullableOfObjectToNumToJson( - SimpleClassNullableOfObjectToNum instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToNum instance, +) => {'value': instance.value}; SimpleClassOfStringToNum _$SimpleClassOfStringToNumFromJson( - Map json) => - SimpleClassOfStringToNum( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToNum(Map.from(json['value'] as Map)); Map _$SimpleClassOfStringToNumToJson( - SimpleClassOfStringToNum instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToNum instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToNum _$SimpleClassNullableOfStringToNumFromJson( - Map json) => - SimpleClassNullableOfStringToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num), - ), - ); + Map json, +) => SimpleClassNullableOfStringToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num), + ), +); Map _$SimpleClassNullableOfStringToNumToJson( - SimpleClassNullableOfStringToNum instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToNum instance, +) => {'value': instance.value}; SimpleClassOfUriToNum _$SimpleClassOfUriToNumFromJson( - Map json) => - SimpleClassOfUriToNum( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassOfUriToNum( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as num), + ), +); Map _$SimpleClassOfUriToNumToJson( - SimpleClassOfUriToNum instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToNum instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToNum _$SimpleClassNullableOfUriToNumFromJson( - Map json) => - SimpleClassNullableOfUriToNum( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as num), - ), - ); + Map json, +) => SimpleClassNullableOfUriToNum( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as num), + ), +); Map _$SimpleClassNullableOfUriToNumToJson( - SimpleClassNullableOfUriToNum instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToNum instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToNumNullable _$SimpleClassOfBigIntToNumNullableFromJson( - Map json) => - SimpleClassOfBigIntToNumNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as num?), - ), - ); + Map json, +) => SimpleClassOfBigIntToNumNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as num?), + ), +); Map _$SimpleClassOfBigIntToNumNullableToJson( - SimpleClassOfBigIntToNumNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToNumNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToNumNullable - _$SimpleClassNullableOfBigIntToNumNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as num?), - ), - ); +_$SimpleClassNullableOfBigIntToNumNullableFromJson(Map json) => + SimpleClassNullableOfBigIntToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as num?), + ), + ); Map _$SimpleClassNullableOfBigIntToNumNullableToJson( - SimpleClassNullableOfBigIntToNumNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToNumNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToNumNullable _$SimpleClassOfDateTimeToNumNullableFromJson( - Map json) => - SimpleClassOfDateTimeToNumNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as num?), - ), - ); + Map json, +) => SimpleClassOfDateTimeToNumNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as num?), + ), +); Map _$SimpleClassOfDateTimeToNumNullableToJson( - SimpleClassOfDateTimeToNumNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToNumNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToNumNullable - _$SimpleClassNullableOfDateTimeToNumNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as num?), - ), - ); +_$SimpleClassNullableOfDateTimeToNumNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as num?), + ), +); Map _$SimpleClassNullableOfDateTimeToNumNullableToJson( - SimpleClassNullableOfDateTimeToNumNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToNumNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToNumNullable _$SimpleClassOfDynamicToNumNullableFromJson( - Map json) => - SimpleClassOfDynamicToNumNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToNumNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfDynamicToNumNullableToJson( - SimpleClassOfDynamicToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToNumNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToNumNullable - _$SimpleClassNullableOfDynamicToNumNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num?), - ), - ); +_$SimpleClassNullableOfDynamicToNumNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num?), + ), +); Map _$SimpleClassNullableOfDynamicToNumNullableToJson( - SimpleClassNullableOfDynamicToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToNumNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToNumNullable _$SimpleClassOfEnumTypeToNumNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToNumNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num?), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToNumNullable( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num?), + ), +); Map _$SimpleClassOfEnumTypeToNumNullableToJson( - SimpleClassOfEnumTypeToNumNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToNumNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToNumNullable - _$SimpleClassNullableOfEnumTypeToNumNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num?), - ), - ); +_$SimpleClassNullableOfEnumTypeToNumNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as num?), + ), +); Map _$SimpleClassNullableOfEnumTypeToNumNullableToJson( - SimpleClassNullableOfEnumTypeToNumNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToNumNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToNumNullable _$SimpleClassOfIntToNumNullableFromJson( - Map json) => - SimpleClassOfIntToNumNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as num?), - ), - ); + Map json, +) => SimpleClassOfIntToNumNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as num?), + ), +); Map _$SimpleClassOfIntToNumNullableToJson( - SimpleClassOfIntToNumNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToNumNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToNumNullable - _$SimpleClassNullableOfIntToNumNullableFromJson( - Map json) => - SimpleClassNullableOfIntToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as num?), - ), - ); +_$SimpleClassNullableOfIntToNumNullableFromJson(Map json) => + SimpleClassNullableOfIntToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as num?), + ), + ); Map _$SimpleClassNullableOfIntToNumNullableToJson( - SimpleClassNullableOfIntToNumNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToNumNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToNumNullable _$SimpleClassOfObjectToNumNullableFromJson( - Map json) => - SimpleClassOfObjectToNumNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfObjectToNumNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfObjectToNumNullableToJson( - SimpleClassOfObjectToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToNumNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToNumNullable - _$SimpleClassNullableOfObjectToNumNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num?), - ), - ); +_$SimpleClassNullableOfObjectToNumNullableFromJson(Map json) => + SimpleClassNullableOfObjectToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num?), + ), + ); Map _$SimpleClassNullableOfObjectToNumNullableToJson( - SimpleClassNullableOfObjectToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToNumNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToNumNullable _$SimpleClassOfStringToNumNullableFromJson( - Map json) => - SimpleClassOfStringToNumNullable( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfStringToNumNullable( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfStringToNumNullableToJson( - SimpleClassOfStringToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToNumNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToNumNullable - _$SimpleClassNullableOfStringToNumNullableFromJson( - Map json) => - SimpleClassNullableOfStringToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as num?), - ), - ); +_$SimpleClassNullableOfStringToNumNullableFromJson(Map json) => + SimpleClassNullableOfStringToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as num?), + ), + ); Map _$SimpleClassNullableOfStringToNumNullableToJson( - SimpleClassNullableOfStringToNumNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToNumNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToNumNullable _$SimpleClassOfUriToNumNullableFromJson( - Map json) => - SimpleClassOfUriToNumNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as num?), - ), - ); + Map json, +) => SimpleClassOfUriToNumNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as num?), + ), +); Map _$SimpleClassOfUriToNumNullableToJson( - SimpleClassOfUriToNumNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToNumNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToNumNullable - _$SimpleClassNullableOfUriToNumNullableFromJson( - Map json) => - SimpleClassNullableOfUriToNumNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as num?), - ), - ); +_$SimpleClassNullableOfUriToNumNullableFromJson(Map json) => + SimpleClassNullableOfUriToNumNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as num?), + ), + ); Map _$SimpleClassNullableOfUriToNumNullableToJson( - SimpleClassNullableOfUriToNumNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToNumNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToObject _$SimpleClassOfBigIntToObjectFromJson( - Map json) => - SimpleClassOfBigIntToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassOfBigIntToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as Object), + ), +); Map _$SimpleClassOfBigIntToObjectToJson( - SimpleClassOfBigIntToObject instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToObject instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToObject - _$SimpleClassNullableOfBigIntToObjectFromJson(Map json) => - SimpleClassNullableOfBigIntToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as Object), - ), - ); +_$SimpleClassNullableOfBigIntToObjectFromJson(Map json) => + SimpleClassNullableOfBigIntToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as Object), + ), + ); Map _$SimpleClassNullableOfBigIntToObjectToJson( - SimpleClassNullableOfBigIntToObject instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToObject instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToObject _$SimpleClassOfDateTimeToObjectFromJson( - Map json) => - SimpleClassOfDateTimeToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassOfDateTimeToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as Object), + ), +); Map _$SimpleClassOfDateTimeToObjectToJson( - SimpleClassOfDateTimeToObject instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToObject instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToObject - _$SimpleClassNullableOfDateTimeToObjectFromJson( - Map json) => - SimpleClassNullableOfDateTimeToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as Object), - ), - ); +_$SimpleClassNullableOfDateTimeToObjectFromJson(Map json) => + SimpleClassNullableOfDateTimeToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as Object), + ), + ); Map _$SimpleClassNullableOfDateTimeToObjectToJson( - SimpleClassNullableOfDateTimeToObject instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToObject instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToObject _$SimpleClassOfDynamicToObjectFromJson( - Map json) => - SimpleClassOfDynamicToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e as Object), - ), - ); + Map json, +) => SimpleClassOfDynamicToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e as Object), + ), +); Map _$SimpleClassOfDynamicToObjectToJson( - SimpleClassOfDynamicToObject instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToObject instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToObject - _$SimpleClassNullableOfDynamicToObjectFromJson(Map json) => - SimpleClassNullableOfDynamicToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as Object), - ), - ); +_$SimpleClassNullableOfDynamicToObjectFromJson(Map json) => + SimpleClassNullableOfDynamicToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as Object), + ), + ); Map _$SimpleClassNullableOfDynamicToObjectToJson( - SimpleClassNullableOfDynamicToObject instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToObject instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToObject _$SimpleClassOfEnumTypeToObjectFromJson( - Map json) => - SimpleClassOfEnumTypeToObject( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as Object), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToObject( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as Object), + ), +); Map _$SimpleClassOfEnumTypeToObjectToJson( - SimpleClassOfEnumTypeToObject instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToObject instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToObject - _$SimpleClassNullableOfEnumTypeToObjectFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as Object), - ), - ); +_$SimpleClassNullableOfEnumTypeToObjectFromJson(Map json) => + SimpleClassNullableOfEnumTypeToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as Object), + ), + ); Map _$SimpleClassNullableOfEnumTypeToObjectToJson( - SimpleClassNullableOfEnumTypeToObject instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToObject instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToObject _$SimpleClassOfIntToObjectFromJson( - Map json) => - SimpleClassOfIntToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassOfIntToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as Object), + ), +); Map _$SimpleClassOfIntToObjectToJson( - SimpleClassOfIntToObject instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToObject instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToObject _$SimpleClassNullableOfIntToObjectFromJson( - Map json) => - SimpleClassNullableOfIntToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassNullableOfIntToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as Object), + ), +); Map _$SimpleClassNullableOfIntToObjectToJson( - SimpleClassNullableOfIntToObject instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToObject instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToObject _$SimpleClassOfObjectToObjectFromJson( - Map json) => - SimpleClassOfObjectToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e as Object), - ), - ); + Map json, +) => SimpleClassOfObjectToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e as Object), + ), +); Map _$SimpleClassOfObjectToObjectToJson( - SimpleClassOfObjectToObject instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToObject instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToObject - _$SimpleClassNullableOfObjectToObjectFromJson(Map json) => - SimpleClassNullableOfObjectToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as Object), - ), - ); +_$SimpleClassNullableOfObjectToObjectFromJson(Map json) => + SimpleClassNullableOfObjectToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as Object), + ), + ); Map _$SimpleClassNullableOfObjectToObjectToJson( - SimpleClassNullableOfObjectToObject instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToObject instance, +) => {'value': instance.value}; SimpleClassOfStringToObject _$SimpleClassOfStringToObjectFromJson( - Map json) => - SimpleClassOfStringToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e as Object), - ), - ); + Map json, +) => SimpleClassOfStringToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e as Object), + ), +); Map _$SimpleClassOfStringToObjectToJson( - SimpleClassOfStringToObject instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToObject instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToObject - _$SimpleClassNullableOfStringToObjectFromJson(Map json) => - SimpleClassNullableOfStringToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as Object), - ), - ); +_$SimpleClassNullableOfStringToObjectFromJson(Map json) => + SimpleClassNullableOfStringToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as Object), + ), + ); Map _$SimpleClassNullableOfStringToObjectToJson( - SimpleClassNullableOfStringToObject instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToObject instance, +) => {'value': instance.value}; SimpleClassOfUriToObject _$SimpleClassOfUriToObjectFromJson( - Map json) => - SimpleClassOfUriToObject( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassOfUriToObject( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as Object), + ), +); Map _$SimpleClassOfUriToObjectToJson( - SimpleClassOfUriToObject instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToObject instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToObject _$SimpleClassNullableOfUriToObjectFromJson( - Map json) => - SimpleClassNullableOfUriToObject( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as Object), - ), - ); + Map json, +) => SimpleClassNullableOfUriToObject( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as Object), + ), +); Map _$SimpleClassNullableOfUriToObjectToJson( - SimpleClassNullableOfUriToObject instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToObject instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToObjectNullable - _$SimpleClassOfBigIntToObjectNullableFromJson(Map json) => - SimpleClassOfBigIntToObjectNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e), - ), - ); +_$SimpleClassOfBigIntToObjectNullableFromJson(Map json) => + SimpleClassOfBigIntToObjectNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e), + ), + ); Map _$SimpleClassOfBigIntToObjectNullableToJson( - SimpleClassOfBigIntToObjectNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToObjectNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToObjectNullable - _$SimpleClassNullableOfBigIntToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToObjectNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e), - ), - ); +_$SimpleClassNullableOfBigIntToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToObjectNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e), + ), +); Map _$SimpleClassNullableOfBigIntToObjectNullableToJson( - SimpleClassNullableOfBigIntToObjectNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToObjectNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToObjectNullable - _$SimpleClassOfDateTimeToObjectNullableFromJson( - Map json) => - SimpleClassOfDateTimeToObjectNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e), - ), - ); +_$SimpleClassOfDateTimeToObjectNullableFromJson(Map json) => + SimpleClassOfDateTimeToObjectNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e), + ), + ); Map _$SimpleClassOfDateTimeToObjectNullableToJson( - SimpleClassOfDateTimeToObjectNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToObjectNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToObjectNullable - _$SimpleClassNullableOfDateTimeToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToObjectNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e), - ), - ); +_$SimpleClassNullableOfDateTimeToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToObjectNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e), + ), +); Map _$SimpleClassNullableOfDateTimeToObjectNullableToJson( - SimpleClassNullableOfDateTimeToObjectNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToObjectNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToObjectNullable - _$SimpleClassOfDynamicToObjectNullableFromJson(Map json) => - SimpleClassOfDynamicToObjectNullable( - json['value'] as Map, - ); +_$SimpleClassOfDynamicToObjectNullableFromJson(Map json) => + SimpleClassOfDynamicToObjectNullable(json['value'] as Map); Map _$SimpleClassOfDynamicToObjectNullableToJson( - SimpleClassOfDynamicToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToObjectNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToObjectNullable - _$SimpleClassNullableOfDynamicToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToObjectNullable( - json['value'] as Map?, - ); +_$SimpleClassNullableOfDynamicToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToObjectNullable( + json['value'] as Map?, +); Map _$SimpleClassNullableOfDynamicToObjectNullableToJson( - SimpleClassNullableOfDynamicToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToObjectNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToObjectNullable - _$SimpleClassOfEnumTypeToObjectNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToObjectNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), - ), - ); +_$SimpleClassOfEnumTypeToObjectNullableFromJson(Map json) => + SimpleClassOfEnumTypeToObjectNullable( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), + ), + ); Map _$SimpleClassOfEnumTypeToObjectNullableToJson( - SimpleClassOfEnumTypeToObjectNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToObjectNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToObjectNullable - _$SimpleClassNullableOfEnumTypeToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToObjectNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), - ), - ); +_$SimpleClassNullableOfEnumTypeToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToObjectNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e), + ), +); Map _$SimpleClassNullableOfEnumTypeToObjectNullableToJson( - SimpleClassNullableOfEnumTypeToObjectNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToObjectNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToObjectNullable _$SimpleClassOfIntToObjectNullableFromJson( - Map json) => - SimpleClassOfIntToObjectNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfIntToObjectNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e), + ), +); Map _$SimpleClassOfIntToObjectNullableToJson( - SimpleClassOfIntToObjectNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToObjectNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToObjectNullable - _$SimpleClassNullableOfIntToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfIntToObjectNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e), - ), - ); +_$SimpleClassNullableOfIntToObjectNullableFromJson(Map json) => + SimpleClassNullableOfIntToObjectNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e), + ), + ); Map _$SimpleClassNullableOfIntToObjectNullableToJson( - SimpleClassNullableOfIntToObjectNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToObjectNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToObjectNullable - _$SimpleClassOfObjectToObjectNullableFromJson(Map json) => - SimpleClassOfObjectToObjectNullable( - json['value'] as Map, - ); +_$SimpleClassOfObjectToObjectNullableFromJson(Map json) => + SimpleClassOfObjectToObjectNullable(json['value'] as Map); Map _$SimpleClassOfObjectToObjectNullableToJson( - SimpleClassOfObjectToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToObjectNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToObjectNullable - _$SimpleClassNullableOfObjectToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToObjectNullable( - json['value'] as Map?, - ); +_$SimpleClassNullableOfObjectToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToObjectNullable( + json['value'] as Map?, +); Map _$SimpleClassNullableOfObjectToObjectNullableToJson( - SimpleClassNullableOfObjectToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToObjectNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToObjectNullable - _$SimpleClassOfStringToObjectNullableFromJson(Map json) => - SimpleClassOfStringToObjectNullable( - json['value'] as Map, - ); +_$SimpleClassOfStringToObjectNullableFromJson(Map json) => + SimpleClassOfStringToObjectNullable(json['value'] as Map); Map _$SimpleClassOfStringToObjectNullableToJson( - SimpleClassOfStringToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToObjectNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToObjectNullable - _$SimpleClassNullableOfStringToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfStringToObjectNullable( - json['value'] as Map?, - ); +_$SimpleClassNullableOfStringToObjectNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToObjectNullable( + json['value'] as Map?, +); Map _$SimpleClassNullableOfStringToObjectNullableToJson( - SimpleClassNullableOfStringToObjectNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToObjectNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToObjectNullable _$SimpleClassOfUriToObjectNullableFromJson( - Map json) => - SimpleClassOfUriToObjectNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e), - ), - ); + Map json, +) => SimpleClassOfUriToObjectNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e), + ), +); Map _$SimpleClassOfUriToObjectNullableToJson( - SimpleClassOfUriToObjectNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToObjectNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToObjectNullable - _$SimpleClassNullableOfUriToObjectNullableFromJson( - Map json) => - SimpleClassNullableOfUriToObjectNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e), - ), - ); - -Map _$SimpleClassNullableOfUriToObjectNullableToJson( - SimpleClassNullableOfUriToObjectNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; - -SimpleClassOfBigIntToRecord _$SimpleClassOfBigIntToRecordFromJson( - Map json) => - SimpleClassOfBigIntToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfUriToObjectNullableFromJson(Map json) => + SimpleClassNullableOfUriToObjectNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e), ), ); +Map _$SimpleClassNullableOfUriToObjectNullableToJson( + SimpleClassNullableOfUriToObjectNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; + +SimpleClassOfBigIntToRecord _$SimpleClassOfBigIntToRecordFromJson( + Map json, +) => SimpleClassOfBigIntToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + BigInt.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); + Map _$SimpleClassOfBigIntToRecordToJson( - SimpleClassOfBigIntToRecord instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfBigIntToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; -$Rec _$recordConvert<$Rec>( - Object? value, - $Rec Function(Map) convert, -) => +$Rec _$recordConvert<$Rec>(Object? value, $Rec Function(Map) convert) => convert(value as Map); SimpleClassNullableOfBigIntToRecord - _$SimpleClassNullableOfBigIntToRecordFromJson(Map json) => - SimpleClassNullableOfBigIntToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfBigIntToRecordFromJson(Map json) => + SimpleClassNullableOfBigIntToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + BigInt.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfBigIntToRecordToJson( - SimpleClassNullableOfBigIntToRecord instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfBigIntToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfDateTimeToRecord _$SimpleClassOfDateTimeToRecordFromJson( - Map json) => - SimpleClassOfDateTimeToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfDateTimeToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + DateTime.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfDateTimeToRecordToJson( - SimpleClassOfDateTimeToRecord instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfDateTimeToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfDateTimeToRecord - _$SimpleClassNullableOfDateTimeToRecordFromJson( - Map json) => - SimpleClassNullableOfDateTimeToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfDateTimeToRecordFromJson(Map json) => + SimpleClassNullableOfDateTimeToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + DateTime.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfDateTimeToRecordToJson( - SimpleClassNullableOfDateTimeToRecord instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfDateTimeToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfDynamicToRecord _$SimpleClassOfDynamicToRecordFromJson( - Map json) => - SimpleClassOfDynamicToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfDynamicToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfDynamicToRecordToJson( - SimpleClassOfDynamicToRecord instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfDynamicToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfDynamicToRecord - _$SimpleClassNullableOfDynamicToRecordFromJson(Map json) => - SimpleClassNullableOfDynamicToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfDynamicToRecordFromJson(Map json) => + SimpleClassNullableOfDynamicToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfDynamicToRecordToJson( - SimpleClassNullableOfDynamicToRecord instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfDynamicToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfEnumTypeToRecord _$SimpleClassOfEnumTypeToRecordFromJson( - Map json) => - SimpleClassOfEnumTypeToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfEnumTypeToRecordToJson( - SimpleClassOfEnumTypeToRecord instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfEnumTypeToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfEnumTypeToRecord - _$SimpleClassNullableOfEnumTypeToRecordFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - $enumDecode(_$EnumTypeEnumMap, k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfEnumTypeToRecordFromJson(Map json) => + SimpleClassNullableOfEnumTypeToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfEnumTypeToRecordToJson( - SimpleClassNullableOfEnumTypeToRecord instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfEnumTypeToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfIntToRecord _$SimpleClassOfIntToRecordFromJson( - Map json) => - SimpleClassOfIntToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - int.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfIntToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + int.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfIntToRecordToJson( - SimpleClassOfIntToRecord instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfIntToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfIntToRecord _$SimpleClassNullableOfIntToRecordFromJson( - Map json) => - SimpleClassNullableOfIntToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassNullableOfIntToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + int.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassNullableOfIntToRecordToJson( - SimpleClassNullableOfIntToRecord instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfIntToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfObjectToRecord _$SimpleClassOfObjectToRecordFromJson( - Map json) => - SimpleClassOfObjectToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfObjectToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfObjectToRecordToJson( - SimpleClassOfObjectToRecord instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfObjectToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfObjectToRecord - _$SimpleClassNullableOfObjectToRecordFromJson(Map json) => - SimpleClassNullableOfObjectToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfObjectToRecordFromJson(Map json) => + SimpleClassNullableOfObjectToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfObjectToRecordToJson( - SimpleClassNullableOfObjectToRecord instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfObjectToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfStringToRecord _$SimpleClassOfStringToRecordFromJson( - Map json) => - SimpleClassOfStringToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfStringToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfStringToRecordToJson( - SimpleClassOfStringToRecord instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfStringToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfStringToRecord - _$SimpleClassNullableOfStringToRecordFromJson(Map json) => - SimpleClassNullableOfStringToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - k, - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), +_$SimpleClassNullableOfStringToRecordFromJson(Map json) => + SimpleClassNullableOfStringToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + k, + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), ), - ); + ), + ), + ); Map _$SimpleClassNullableOfStringToRecordToJson( - SimpleClassNullableOfStringToRecord instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfStringToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k, { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfUriToRecord _$SimpleClassOfUriToRecordFromJson( - Map json) => - SimpleClassOfUriToRecord( - (json['value'] as Map).map( - (k, e) => MapEntry( - Uri.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassOfUriToRecord( + (json['value'] as Map).map( + (k, e) => MapEntry( + Uri.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassOfUriToRecordToJson( - SimpleClassOfUriToRecord instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassOfUriToRecord instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassNullableOfUriToRecord _$SimpleClassNullableOfUriToRecordFromJson( - Map json) => - SimpleClassNullableOfUriToRecord( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), - _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )), - ), - ); + Map json, +) => SimpleClassNullableOfUriToRecord( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + Uri.parse(k), + _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassNullableOfUriToRecordToJson( - SimpleClassNullableOfUriToRecord instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toString(), { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - })), - }; + SimpleClassNullableOfUriToRecord instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toString(), { + r'$1': e.$1, + r'$2': e.$2, + 'truth': e.truth, + }), + ), +}; SimpleClassOfBigIntToString _$SimpleClassOfBigIntToStringFromJson( - Map json) => - SimpleClassOfBigIntToString( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassOfBigIntToString( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as String), + ), +); Map _$SimpleClassOfBigIntToStringToJson( - SimpleClassOfBigIntToString instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToString instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToString - _$SimpleClassNullableOfBigIntToStringFromJson(Map json) => - SimpleClassNullableOfBigIntToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as String), - ), - ); +_$SimpleClassNullableOfBigIntToStringFromJson(Map json) => + SimpleClassNullableOfBigIntToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as String), + ), + ); Map _$SimpleClassNullableOfBigIntToStringToJson( - SimpleClassNullableOfBigIntToString instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToString instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToString _$SimpleClassOfDateTimeToStringFromJson( - Map json) => - SimpleClassOfDateTimeToString( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassOfDateTimeToString( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as String), + ), +); Map _$SimpleClassOfDateTimeToStringToJson( - SimpleClassOfDateTimeToString instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToString instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToString - _$SimpleClassNullableOfDateTimeToStringFromJson( - Map json) => - SimpleClassNullableOfDateTimeToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as String), - ), - ); +_$SimpleClassNullableOfDateTimeToStringFromJson(Map json) => + SimpleClassNullableOfDateTimeToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as String), + ), + ); Map _$SimpleClassNullableOfDateTimeToStringToJson( - SimpleClassNullableOfDateTimeToString instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToString instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToString _$SimpleClassOfDynamicToStringFromJson( - Map json) => - SimpleClassOfDynamicToString( - Map.from(json['value'] as Map), - ); + Map json, +) => SimpleClassOfDynamicToString( + Map.from(json['value'] as Map), +); Map _$SimpleClassOfDynamicToStringToJson( - SimpleClassOfDynamicToString instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToString instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToString - _$SimpleClassNullableOfDynamicToStringFromJson(Map json) => - SimpleClassNullableOfDynamicToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String), - ), - ); +_$SimpleClassNullableOfDynamicToStringFromJson(Map json) => + SimpleClassNullableOfDynamicToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String), + ), + ); Map _$SimpleClassNullableOfDynamicToStringToJson( - SimpleClassNullableOfDynamicToString instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToString instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToString _$SimpleClassOfEnumTypeToStringFromJson( - Map json) => - SimpleClassOfEnumTypeToString( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToString( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String), + ), +); Map _$SimpleClassOfEnumTypeToStringToJson( - SimpleClassOfEnumTypeToString instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToString instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToString - _$SimpleClassNullableOfEnumTypeToStringFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String), - ), - ); +_$SimpleClassNullableOfEnumTypeToStringFromJson(Map json) => + SimpleClassNullableOfEnumTypeToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String), + ), + ); Map _$SimpleClassNullableOfEnumTypeToStringToJson( - SimpleClassNullableOfEnumTypeToString instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToString instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToString _$SimpleClassOfIntToStringFromJson( - Map json) => - SimpleClassOfIntToString( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassOfIntToString( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as String), + ), +); Map _$SimpleClassOfIntToStringToJson( - SimpleClassOfIntToString instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToString instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToString _$SimpleClassNullableOfIntToStringFromJson( - Map json) => - SimpleClassNullableOfIntToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassNullableOfIntToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as String), + ), +); Map _$SimpleClassNullableOfIntToStringToJson( - SimpleClassNullableOfIntToString instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToString instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToString _$SimpleClassOfObjectToStringFromJson( - Map json) => - SimpleClassOfObjectToString( - Map.from(json['value'] as Map), - ); + Map json, +) => + SimpleClassOfObjectToString(Map.from(json['value'] as Map)); Map _$SimpleClassOfObjectToStringToJson( - SimpleClassOfObjectToString instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToString instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToString - _$SimpleClassNullableOfObjectToStringFromJson(Map json) => - SimpleClassNullableOfObjectToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String), - ), - ); +_$SimpleClassNullableOfObjectToStringFromJson(Map json) => + SimpleClassNullableOfObjectToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String), + ), + ); Map _$SimpleClassNullableOfObjectToStringToJson( - SimpleClassNullableOfObjectToString instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToString instance, +) => {'value': instance.value}; SimpleClassOfStringToString _$SimpleClassOfStringToStringFromJson( - Map json) => - SimpleClassOfStringToString( - Map.from(json['value'] as Map), - ); + Map json, +) => + SimpleClassOfStringToString(Map.from(json['value'] as Map)); Map _$SimpleClassOfStringToStringToJson( - SimpleClassOfStringToString instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToString instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToString - _$SimpleClassNullableOfStringToStringFromJson(Map json) => - SimpleClassNullableOfStringToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String), - ), - ); +_$SimpleClassNullableOfStringToStringFromJson(Map json) => + SimpleClassNullableOfStringToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String), + ), + ); Map _$SimpleClassNullableOfStringToStringToJson( - SimpleClassNullableOfStringToString instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToString instance, +) => {'value': instance.value}; SimpleClassOfUriToString _$SimpleClassOfUriToStringFromJson( - Map json) => - SimpleClassOfUriToString( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassOfUriToString( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as String), + ), +); Map _$SimpleClassOfUriToStringToJson( - SimpleClassOfUriToString instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToString instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToString _$SimpleClassNullableOfUriToStringFromJson( - Map json) => - SimpleClassNullableOfUriToString( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as String), - ), - ); + Map json, +) => SimpleClassNullableOfUriToString( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as String), + ), +); Map _$SimpleClassNullableOfUriToStringToJson( - SimpleClassNullableOfUriToString instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToString instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToStringNullable - _$SimpleClassOfBigIntToStringNullableFromJson(Map json) => - SimpleClassOfBigIntToStringNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), e as String?), - ), - ); +_$SimpleClassOfBigIntToStringNullableFromJson(Map json) => + SimpleClassOfBigIntToStringNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), e as String?), + ), + ); Map _$SimpleClassOfBigIntToStringNullableToJson( - SimpleClassOfBigIntToStringNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfBigIntToStringNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfBigIntToStringNullable - _$SimpleClassNullableOfBigIntToStringNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), e as String?), - ), - ); +_$SimpleClassNullableOfBigIntToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfBigIntToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), e as String?), + ), +); Map _$SimpleClassNullableOfBigIntToStringNullableToJson( - SimpleClassNullableOfBigIntToStringNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfBigIntToStringNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfDateTimeToStringNullable - _$SimpleClassOfDateTimeToStringNullableFromJson( - Map json) => - SimpleClassOfDateTimeToStringNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), e as String?), - ), - ); +_$SimpleClassOfDateTimeToStringNullableFromJson(Map json) => + SimpleClassOfDateTimeToStringNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), e as String?), + ), + ); Map _$SimpleClassOfDateTimeToStringNullableToJson( - SimpleClassOfDateTimeToStringNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassOfDateTimeToStringNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassNullableOfDateTimeToStringNullable - _$SimpleClassNullableOfDateTimeToStringNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), e as String?), - ), - ); +_$SimpleClassNullableOfDateTimeToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), e as String?), + ), +); Map _$SimpleClassNullableOfDateTimeToStringNullableToJson( - SimpleClassNullableOfDateTimeToStringNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), - }; + SimpleClassNullableOfDateTimeToStringNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toIso8601String(), e)), +}; SimpleClassOfDynamicToStringNullable - _$SimpleClassOfDynamicToStringNullableFromJson(Map json) => - SimpleClassOfDynamicToStringNullable( - Map.from(json['value'] as Map), - ); +_$SimpleClassOfDynamicToStringNullableFromJson(Map json) => + SimpleClassOfDynamicToStringNullable( + Map.from(json['value'] as Map), + ); Map _$SimpleClassOfDynamicToStringNullableToJson( - SimpleClassOfDynamicToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfDynamicToStringNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfDynamicToStringNullable - _$SimpleClassNullableOfDynamicToStringNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String?), - ), - ); +_$SimpleClassNullableOfDynamicToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String?), + ), +); Map _$SimpleClassNullableOfDynamicToStringNullableToJson( - SimpleClassNullableOfDynamicToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfDynamicToStringNullable instance, +) => {'value': instance.value}; SimpleClassOfEnumTypeToStringNullable - _$SimpleClassOfEnumTypeToStringNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToStringNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String?), - ), - ); +_$SimpleClassOfEnumTypeToStringNullableFromJson(Map json) => + SimpleClassOfEnumTypeToStringNullable( + (json['value'] as Map).map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String?), + ), + ); Map _$SimpleClassOfEnumTypeToStringNullableToJson( - SimpleClassOfEnumTypeToStringNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassOfEnumTypeToStringNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassNullableOfEnumTypeToStringNullable - _$SimpleClassNullableOfEnumTypeToStringNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String?), - ), - ); +_$SimpleClassNullableOfEnumTypeToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), e as String?), + ), +); Map _$SimpleClassNullableOfEnumTypeToStringNullableToJson( - SimpleClassNullableOfEnumTypeToStringNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), - }; + SimpleClassNullableOfEnumTypeToStringNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e)), +}; SimpleClassOfIntToStringNullable _$SimpleClassOfIntToStringNullableFromJson( - Map json) => - SimpleClassOfIntToStringNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), e as String?), - ), - ); + Map json, +) => SimpleClassOfIntToStringNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e as String?), + ), +); Map _$SimpleClassOfIntToStringNullableToJson( - SimpleClassOfIntToStringNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfIntToStringNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfIntToStringNullable - _$SimpleClassNullableOfIntToStringNullableFromJson( - Map json) => - SimpleClassNullableOfIntToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), e as String?), - ), - ); +_$SimpleClassNullableOfIntToStringNullableFromJson(Map json) => + SimpleClassNullableOfIntToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), e as String?), + ), + ); Map _$SimpleClassNullableOfIntToStringNullableToJson( - SimpleClassNullableOfIntToStringNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfIntToStringNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfObjectToStringNullable - _$SimpleClassOfObjectToStringNullableFromJson(Map json) => - SimpleClassOfObjectToStringNullable( - Map.from(json['value'] as Map), - ); +_$SimpleClassOfObjectToStringNullableFromJson(Map json) => + SimpleClassOfObjectToStringNullable( + Map.from(json['value'] as Map), + ); Map _$SimpleClassOfObjectToStringNullableToJson( - SimpleClassOfObjectToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfObjectToStringNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfObjectToStringNullable - _$SimpleClassNullableOfObjectToStringNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String?), - ), - ); +_$SimpleClassNullableOfObjectToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfObjectToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String?), + ), +); Map _$SimpleClassNullableOfObjectToStringNullableToJson( - SimpleClassNullableOfObjectToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfObjectToStringNullable instance, +) => {'value': instance.value}; SimpleClassOfStringToStringNullable - _$SimpleClassOfStringToStringNullableFromJson(Map json) => - SimpleClassOfStringToStringNullable( - Map.from(json['value'] as Map), - ); +_$SimpleClassOfStringToStringNullableFromJson(Map json) => + SimpleClassOfStringToStringNullable( + Map.from(json['value'] as Map), + ); Map _$SimpleClassOfStringToStringNullableToJson( - SimpleClassOfStringToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassOfStringToStringNullable instance, +) => {'value': instance.value}; SimpleClassNullableOfStringToStringNullable - _$SimpleClassNullableOfStringToStringNullableFromJson( - Map json) => - SimpleClassNullableOfStringToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e as String?), - ), - ); +_$SimpleClassNullableOfStringToStringNullableFromJson( + Map json, +) => SimpleClassNullableOfStringToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e as String?), + ), +); Map _$SimpleClassNullableOfStringToStringNullableToJson( - SimpleClassNullableOfStringToStringNullable instance) => - { - 'value': instance.value, - }; + SimpleClassNullableOfStringToStringNullable instance, +) => {'value': instance.value}; SimpleClassOfUriToStringNullable _$SimpleClassOfUriToStringNullableFromJson( - Map json) => - SimpleClassOfUriToStringNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), e as String?), - ), - ); + Map json, +) => SimpleClassOfUriToStringNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e as String?), + ), +); Map _$SimpleClassOfUriToStringNullableToJson( - SimpleClassOfUriToStringNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassOfUriToStringNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassNullableOfUriToStringNullable - _$SimpleClassNullableOfUriToStringNullableFromJson( - Map json) => - SimpleClassNullableOfUriToStringNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), e as String?), - ), - ); +_$SimpleClassNullableOfUriToStringNullableFromJson(Map json) => + SimpleClassNullableOfUriToStringNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), e as String?), + ), + ); Map _$SimpleClassNullableOfUriToStringNullableToJson( - SimpleClassNullableOfUriToStringNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), - }; + SimpleClassNullableOfUriToStringNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e)), +}; SimpleClassOfBigIntToUri _$SimpleClassOfBigIntToUriFromJson( - Map json) => - SimpleClassOfBigIntToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(BigInt.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfBigIntToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(BigInt.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassOfBigIntToUriToJson( - SimpleClassOfBigIntToUri instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfBigIntToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfBigIntToUri _$SimpleClassNullableOfBigIntToUriFromJson( - Map json) => - SimpleClassNullableOfBigIntToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(BigInt.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfBigIntToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(BigInt.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfBigIntToUriToJson( - SimpleClassNullableOfBigIntToUri instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfBigIntToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfDateTimeToUri _$SimpleClassOfDateTimeToUriFromJson( - Map json) => - SimpleClassOfDateTimeToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(DateTime.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDateTimeToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(DateTime.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassOfDateTimeToUriToJson( - SimpleClassOfDateTimeToUri instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e.toString())), - }; + SimpleClassOfDateTimeToUri instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e.toString()), + ), +}; SimpleClassNullableOfDateTimeToUri _$SimpleClassNullableOfDateTimeToUriFromJson( - Map json) => - SimpleClassNullableOfDateTimeToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(DateTime.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfDateTimeToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(DateTime.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDateTimeToUriToJson( - SimpleClassNullableOfDateTimeToUri instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e.toString())), - }; + SimpleClassNullableOfDateTimeToUri instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e.toString()), + ), +}; SimpleClassOfDynamicToUri _$SimpleClassOfDynamicToUriFromJson( - Map json) => - SimpleClassOfDynamicToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDynamicToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassOfDynamicToUriToJson( - SimpleClassOfDynamicToUri instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfDynamicToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfDynamicToUri _$SimpleClassNullableOfDynamicToUriFromJson( - Map json) => - SimpleClassNullableOfDynamicToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfDynamicToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDynamicToUriToJson( - SimpleClassNullableOfDynamicToUri instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfDynamicToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfEnumTypeToUri _$SimpleClassOfEnumTypeToUriFromJson( - Map json) => - SimpleClassOfEnumTypeToUri( - (json['value'] as Map).map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToUri( + (json['value'] as Map).map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), Uri.parse(e as String)), + ), +); Map _$SimpleClassOfEnumTypeToUriToJson( - SimpleClassOfEnumTypeToUri instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString())), - }; + SimpleClassOfEnumTypeToUri instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString()), + ), +}; SimpleClassNullableOfEnumTypeToUri _$SimpleClassNullableOfEnumTypeToUriFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToUri( - (json['value'] as Map?)?.map( - (k, e) => - MapEntry($enumDecode(_$EnumTypeEnumMap, k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfEnumTypeToUri( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry($enumDecode(_$EnumTypeEnumMap, k), Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfEnumTypeToUriToJson( - SimpleClassNullableOfEnumTypeToUri instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString())), - }; + SimpleClassNullableOfEnumTypeToUri instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e.toString()), + ), +}; SimpleClassOfIntToUri _$SimpleClassOfIntToUriFromJson( - Map json) => - SimpleClassOfIntToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(int.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassOfIntToUriToJson( - SimpleClassOfIntToUri instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfIntToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfIntToUri _$SimpleClassNullableOfIntToUriFromJson( - Map json) => - SimpleClassNullableOfIntToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(int.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfIntToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(int.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfIntToUriToJson( - SimpleClassNullableOfIntToUri instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfIntToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfObjectToUri _$SimpleClassOfObjectToUriFromJson( - Map json) => - SimpleClassOfObjectToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfObjectToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassOfObjectToUriToJson( - SimpleClassOfObjectToUri instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfObjectToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfObjectToUri _$SimpleClassNullableOfObjectToUriFromJson( - Map json) => - SimpleClassNullableOfObjectToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfObjectToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfObjectToUriToJson( - SimpleClassNullableOfObjectToUri instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfObjectToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfStringToUri _$SimpleClassOfStringToUriFromJson( - Map json) => - SimpleClassOfStringToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfStringToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassOfStringToUriToJson( - SimpleClassOfStringToUri instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassOfStringToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassNullableOfStringToUri _$SimpleClassNullableOfStringToUriFromJson( - Map json) => - SimpleClassNullableOfStringToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfStringToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfStringToUriToJson( - SimpleClassNullableOfStringToUri instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), - }; + SimpleClassNullableOfStringToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e.toString())), +}; SimpleClassOfUriToUri _$SimpleClassOfUriToUriFromJson( - Map json) => - SimpleClassOfUriToUri( - (json['value'] as Map).map( - (k, e) => MapEntry(Uri.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToUri( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassOfUriToUriToJson( - SimpleClassOfUriToUri instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassOfUriToUri instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassNullableOfUriToUri _$SimpleClassNullableOfUriToUriFromJson( - Map json) => - SimpleClassNullableOfUriToUri( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(Uri.parse(k), Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassNullableOfUriToUri( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(Uri.parse(k), Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfUriToUriToJson( - SimpleClassNullableOfUriToUri instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), - }; + SimpleClassNullableOfUriToUri instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e.toString())), +}; SimpleClassOfBigIntToUriNullable _$SimpleClassOfBigIntToUriNullableFromJson( - Map json) => - SimpleClassOfBigIntToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - BigInt.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfBigIntToUriNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(BigInt.parse(k), e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfBigIntToUriNullableToJson( - SimpleClassOfBigIntToUriNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfBigIntToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfBigIntToUriNullable - _$SimpleClassNullableOfBigIntToUriNullableFromJson( - Map json) => - SimpleClassNullableOfBigIntToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - BigInt.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfBigIntToUriNullableFromJson(Map json) => + SimpleClassNullableOfBigIntToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + BigInt.parse(k), + e == null ? null : Uri.parse(e as String), + ), + ), + ); Map _$SimpleClassNullableOfBigIntToUriNullableToJson( - SimpleClassNullableOfBigIntToUriNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfBigIntToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassOfDateTimeToUriNullable _$SimpleClassOfDateTimeToUriNullableFromJson( - Map json) => - SimpleClassOfDateTimeToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry( - DateTime.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDateTimeToUriNullable( + (json['value'] as Map).map( + (k, e) => + MapEntry(DateTime.parse(k), e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfDateTimeToUriNullableToJson( - SimpleClassOfDateTimeToUriNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(k.toIso8601String(), e?.toString())), - }; + SimpleClassOfDateTimeToUriNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toString()), + ), +}; SimpleClassNullableOfDateTimeToUriNullable - _$SimpleClassNullableOfDateTimeToUriNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - DateTime.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDateTimeToUriNullableFromJson( + Map json, +) => SimpleClassNullableOfDateTimeToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(DateTime.parse(k), e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDateTimeToUriNullableToJson( - SimpleClassNullableOfDateTimeToUriNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(k.toIso8601String(), e?.toString())), - }; + SimpleClassNullableOfDateTimeToUriNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(k.toIso8601String(), e?.toString()), + ), +}; SimpleClassOfDynamicToUriNullable _$SimpleClassOfDynamicToUriNullableFromJson( - Map json) => - SimpleClassOfDynamicToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfDynamicToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfDynamicToUriNullableToJson( - SimpleClassOfDynamicToUriNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfDynamicToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfDynamicToUriNullable - _$SimpleClassNullableOfDynamicToUriNullableFromJson( - Map json) => - SimpleClassNullableOfDynamicToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfDynamicToUriNullableFromJson( + Map json, +) => SimpleClassNullableOfDynamicToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassNullableOfDynamicToUriNullableToJson( - SimpleClassNullableOfDynamicToUriNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfDynamicToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfEnumTypeToUriNullable _$SimpleClassOfEnumTypeToUriNullableFromJson( - Map json) => - SimpleClassOfEnumTypeToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfEnumTypeToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : Uri.parse(e as String), + ), + ), +); Map _$SimpleClassOfEnumTypeToUriNullableToJson( - SimpleClassOfEnumTypeToUriNullable instance) => - { - 'value': instance.value - .map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString())), - }; + SimpleClassOfEnumTypeToUriNullable instance, +) => { + 'value': instance.value.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString()), + ), +}; SimpleClassNullableOfEnumTypeToUriNullable - _$SimpleClassNullableOfEnumTypeToUriNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry($enumDecode(_$EnumTypeEnumMap, k), - e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfEnumTypeToUriNullableFromJson( + Map json, +) => SimpleClassNullableOfEnumTypeToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry( + $enumDecode(_$EnumTypeEnumMap, k), + e == null ? null : Uri.parse(e as String), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToUriNullableToJson( - SimpleClassNullableOfEnumTypeToUriNullable instance) => - { - 'value': instance.value - ?.map((k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString())), - }; + SimpleClassNullableOfEnumTypeToUriNullable instance, +) => { + 'value': instance.value?.map( + (k, e) => MapEntry(_$EnumTypeEnumMap[k]!, e?.toString()), + ), +}; SimpleClassOfIntToUriNullable _$SimpleClassOfIntToUriNullableFromJson( - Map json) => - SimpleClassOfIntToUriNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(int.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfIntToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(int.parse(k), e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfIntToUriNullableToJson( - SimpleClassOfIntToUriNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfIntToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfIntToUriNullable - _$SimpleClassNullableOfIntToUriNullableFromJson( - Map json) => - SimpleClassNullableOfIntToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - int.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfIntToUriNullableFromJson(Map json) => + SimpleClassNullableOfIntToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(int.parse(k), e == null ? null : Uri.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfIntToUriNullableToJson( - SimpleClassNullableOfIntToUriNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfIntToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassOfObjectToUriNullable _$SimpleClassOfObjectToUriNullableFromJson( - Map json) => - SimpleClassOfObjectToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfObjectToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfObjectToUriNullableToJson( - SimpleClassOfObjectToUriNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfObjectToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfObjectToUriNullable - _$SimpleClassNullableOfObjectToUriNullableFromJson( - Map json) => - SimpleClassNullableOfObjectToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfObjectToUriNullableFromJson(Map json) => + SimpleClassNullableOfObjectToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfObjectToUriNullableToJson( - SimpleClassNullableOfObjectToUriNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfObjectToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfStringToUriNullable _$SimpleClassOfStringToUriNullableFromJson( - Map json) => - SimpleClassOfStringToUriNullable( - (json['value'] as Map).map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfStringToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfStringToUriNullableToJson( - SimpleClassOfStringToUriNullable instance) => - { - 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassOfStringToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassNullableOfStringToUriNullable - _$SimpleClassNullableOfStringToUriNullableFromJson( - Map json) => - SimpleClassNullableOfStringToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfStringToUriNullableFromJson(Map json) => + SimpleClassNullableOfStringToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => MapEntry(k, e == null ? null : Uri.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfStringToUriNullableToJson( - SimpleClassNullableOfStringToUriNullable instance) => - { - 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), - }; + SimpleClassNullableOfStringToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k, e?.toString())), +}; SimpleClassOfUriToUriNullable _$SimpleClassOfUriToUriNullableFromJson( - Map json) => - SimpleClassOfUriToUriNullable( - (json['value'] as Map).map( - (k, e) => - MapEntry(Uri.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); + Map json, +) => SimpleClassOfUriToUriNullable( + (json['value'] as Map).map( + (k, e) => MapEntry(Uri.parse(k), e == null ? null : Uri.parse(e as String)), + ), +); Map _$SimpleClassOfUriToUriNullableToJson( - SimpleClassOfUriToUriNullable instance) => - { - 'value': - instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassOfUriToUriNullable instance, +) => { + 'value': instance.value.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; SimpleClassNullableOfUriToUriNullable - _$SimpleClassNullableOfUriToUriNullableFromJson( - Map json) => - SimpleClassNullableOfUriToUriNullable( - (json['value'] as Map?)?.map( - (k, e) => MapEntry( - Uri.parse(k), e == null ? null : Uri.parse(e as String)), - ), - ); +_$SimpleClassNullableOfUriToUriNullableFromJson(Map json) => + SimpleClassNullableOfUriToUriNullable( + (json['value'] as Map?)?.map( + (k, e) => + MapEntry(Uri.parse(k), e == null ? null : Uri.parse(e as String)), + ), + ); Map _$SimpleClassNullableOfUriToUriNullableToJson( - SimpleClassNullableOfUriToUriNullable instance) => - { - 'value': - instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), - }; + SimpleClassNullableOfUriToUriNullable instance, +) => { + 'value': instance.value?.map((k, e) => MapEntry(k.toString(), e?.toString())), +}; diff --git a/json_serializable/test/supported_types/input.type_num.dart b/json_serializable/test/supported_types/input.type_num.dart index 57631ce62..e354dd244 100644 --- a/json_serializable/test/supported_types/input.type_num.dart +++ b/json_serializable/test/supported_types/input.type_num.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 88.6) num withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: 88.6) num? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_num.g.dart b/json_serializable/test/supported_types/input.type_num.g.dart index f25274d8f..f84779b51 100644 --- a/json_serializable/test/supported_types/input.type_num.g.dart +++ b/json_serializable/test/supported_types/input.type_num.g.dart @@ -8,10 +8,8 @@ part of 'input.type_num.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as num, - json['withDefault'] as num? ?? 88.6, - ); +SimpleClass _$SimpleClassFromJson(Map json) => + SimpleClass(json['value'] as num, json['withDefault'] as num? ?? 88.6); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,8 +24,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_object.dart b/json_serializable/test/supported_types/input.type_object.dart index 193bd440a..57e8f78e3 100644 --- a/json_serializable/test/supported_types/input.type_object.dart +++ b/json_serializable/test/supported_types/input.type_object.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 'o1') Object withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: 'o1') Object? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_object.g.dart b/json_serializable/test/supported_types/input.type_object.g.dart index b35be59b6..ac5a9aa57 100644 --- a/json_serializable/test/supported_types/input.type_object.g.dart +++ b/json_serializable/test/supported_types/input.type_object.g.dart @@ -9,9 +9,9 @@ part of 'input.type_object.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as Object, - json['withDefault'] as Object? ?? 'o1', - ); + json['value'] as Object, + json['withDefault'] as Object? ?? 'o1', +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -20,14 +20,11 @@ Map _$SimpleClassToJson(SimpleClass instance) => }; SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => - SimpleClassNullable( - json['value'], - json['withDefault'] ?? 'o1', - ); + SimpleClassNullable(json['value'], json['withDefault'] ?? 'o1'); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_record.dart b/json_serializable/test/supported_types/input.type_record.dart index 4f26ab82e..c19ed9532 100644 --- a/json_serializable/test/supported_types/input.type_record.dart +++ b/json_serializable/test/supported_types/input.type_record.dart @@ -13,9 +13,7 @@ typedef RecordTypeDef = (); class SimpleClass { final RecordTypeDef value; - SimpleClass( - this.value, - ); + SimpleClass(this.value); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -27,9 +25,7 @@ class SimpleClass { class SimpleClassNullable { final RecordTypeDef? value; - SimpleClassNullable( - this.value, - ); + SimpleClassNullable(this.value); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); @@ -43,9 +39,7 @@ typedef SimpleClassOfBigIntTypeDef = (BigInt, {BigInt named}); class SimpleClassOfBigInt { final SimpleClassOfBigIntTypeDef value; - SimpleClassOfBigInt( - this.value, - ); + SimpleClassOfBigInt(this.value); factory SimpleClassOfBigInt.fromJson(Map json) => _$SimpleClassOfBigIntFromJson(json); @@ -57,9 +51,7 @@ class SimpleClassOfBigInt { class SimpleClassNullableOfBigInt { final SimpleClassOfBigIntTypeDef? value; - SimpleClassNullableOfBigInt( - this.value, - ); + SimpleClassNullableOfBigInt(this.value); factory SimpleClassNullableOfBigInt.fromJson(Map json) => _$SimpleClassNullableOfBigIntFromJson(json); @@ -73,9 +65,7 @@ typedef SimpleClassOfBigIntNullableTypeDef = (BigInt?, {BigInt? named}); class SimpleClassOfBigIntNullable { final SimpleClassOfBigIntNullableTypeDef value; - SimpleClassOfBigIntNullable( - this.value, - ); + SimpleClassOfBigIntNullable(this.value); factory SimpleClassOfBigIntNullable.fromJson(Map json) => _$SimpleClassOfBigIntNullableFromJson(json); @@ -87,13 +77,11 @@ class SimpleClassOfBigIntNullable { class SimpleClassNullableOfBigIntNullable { final SimpleClassOfBigIntNullableTypeDef? value; - SimpleClassNullableOfBigIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntNullable(this.value); factory SimpleClassNullableOfBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntNullableToJson(this); @@ -105,9 +93,7 @@ typedef SimpleClassOfBoolTypeDef = (bool, {bool named}); class SimpleClassOfBool { final SimpleClassOfBoolTypeDef value; - SimpleClassOfBool( - this.value, - ); + SimpleClassOfBool(this.value); factory SimpleClassOfBool.fromJson(Map json) => _$SimpleClassOfBoolFromJson(json); @@ -119,9 +105,7 @@ class SimpleClassOfBool { class SimpleClassNullableOfBool { final SimpleClassOfBoolTypeDef? value; - SimpleClassNullableOfBool( - this.value, - ); + SimpleClassNullableOfBool(this.value); factory SimpleClassNullableOfBool.fromJson(Map json) => _$SimpleClassNullableOfBoolFromJson(json); @@ -135,9 +119,7 @@ typedef SimpleClassOfBoolNullableTypeDef = (bool?, {bool? named}); class SimpleClassOfBoolNullable { final SimpleClassOfBoolNullableTypeDef value; - SimpleClassOfBoolNullable( - this.value, - ); + SimpleClassOfBoolNullable(this.value); factory SimpleClassOfBoolNullable.fromJson(Map json) => _$SimpleClassOfBoolNullableFromJson(json); @@ -149,13 +131,11 @@ class SimpleClassOfBoolNullable { class SimpleClassNullableOfBoolNullable { final SimpleClassOfBoolNullableTypeDef? value; - SimpleClassNullableOfBoolNullable( - this.value, - ); + SimpleClassNullableOfBoolNullable(this.value); factory SimpleClassNullableOfBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBoolNullableToJson(this); @@ -167,9 +147,7 @@ typedef SimpleClassOfDateTimeTypeDef = (DateTime, {DateTime named}); class SimpleClassOfDateTime { final SimpleClassOfDateTimeTypeDef value; - SimpleClassOfDateTime( - this.value, - ); + SimpleClassOfDateTime(this.value); factory SimpleClassOfDateTime.fromJson(Map json) => _$SimpleClassOfDateTimeFromJson(json); @@ -181,9 +159,7 @@ class SimpleClassOfDateTime { class SimpleClassNullableOfDateTime { final SimpleClassOfDateTimeTypeDef? value; - SimpleClassNullableOfDateTime( - this.value, - ); + SimpleClassNullableOfDateTime(this.value); factory SimpleClassNullableOfDateTime.fromJson(Map json) => _$SimpleClassNullableOfDateTimeFromJson(json); @@ -197,9 +173,7 @@ typedef SimpleClassOfDateTimeNullableTypeDef = (DateTime?, {DateTime? named}); class SimpleClassOfDateTimeNullable { final SimpleClassOfDateTimeNullableTypeDef value; - SimpleClassOfDateTimeNullable( - this.value, - ); + SimpleClassOfDateTimeNullable(this.value); factory SimpleClassOfDateTimeNullable.fromJson(Map json) => _$SimpleClassOfDateTimeNullableFromJson(json); @@ -211,13 +185,11 @@ class SimpleClassOfDateTimeNullable { class SimpleClassNullableOfDateTimeNullable { final SimpleClassOfDateTimeNullableTypeDef? value; - SimpleClassNullableOfDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeNullable(this.value); factory SimpleClassNullableOfDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeNullableToJson(this); @@ -229,9 +201,7 @@ typedef SimpleClassOfDoubleTypeDef = (double, {double named}); class SimpleClassOfDouble { final SimpleClassOfDoubleTypeDef value; - SimpleClassOfDouble( - this.value, - ); + SimpleClassOfDouble(this.value); factory SimpleClassOfDouble.fromJson(Map json) => _$SimpleClassOfDoubleFromJson(json); @@ -243,9 +213,7 @@ class SimpleClassOfDouble { class SimpleClassNullableOfDouble { final SimpleClassOfDoubleTypeDef? value; - SimpleClassNullableOfDouble( - this.value, - ); + SimpleClassNullableOfDouble(this.value); factory SimpleClassNullableOfDouble.fromJson(Map json) => _$SimpleClassNullableOfDoubleFromJson(json); @@ -259,9 +227,7 @@ typedef SimpleClassOfDoubleNullableTypeDef = (double?, {double? named}); class SimpleClassOfDoubleNullable { final SimpleClassOfDoubleNullableTypeDef value; - SimpleClassOfDoubleNullable( - this.value, - ); + SimpleClassOfDoubleNullable(this.value); factory SimpleClassOfDoubleNullable.fromJson(Map json) => _$SimpleClassOfDoubleNullableFromJson(json); @@ -273,13 +239,11 @@ class SimpleClassOfDoubleNullable { class SimpleClassNullableOfDoubleNullable { final SimpleClassOfDoubleNullableTypeDef? value; - SimpleClassNullableOfDoubleNullable( - this.value, - ); + SimpleClassNullableOfDoubleNullable(this.value); factory SimpleClassNullableOfDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDoubleNullableToJson(this); @@ -291,9 +255,7 @@ typedef SimpleClassOfDurationTypeDef = (Duration, {Duration named}); class SimpleClassOfDuration { final SimpleClassOfDurationTypeDef value; - SimpleClassOfDuration( - this.value, - ); + SimpleClassOfDuration(this.value); factory SimpleClassOfDuration.fromJson(Map json) => _$SimpleClassOfDurationFromJson(json); @@ -305,9 +267,7 @@ class SimpleClassOfDuration { class SimpleClassNullableOfDuration { final SimpleClassOfDurationTypeDef? value; - SimpleClassNullableOfDuration( - this.value, - ); + SimpleClassNullableOfDuration(this.value); factory SimpleClassNullableOfDuration.fromJson(Map json) => _$SimpleClassNullableOfDurationFromJson(json); @@ -321,9 +281,7 @@ typedef SimpleClassOfDurationNullableTypeDef = (Duration?, {Duration? named}); class SimpleClassOfDurationNullable { final SimpleClassOfDurationNullableTypeDef value; - SimpleClassOfDurationNullable( - this.value, - ); + SimpleClassOfDurationNullable(this.value); factory SimpleClassOfDurationNullable.fromJson(Map json) => _$SimpleClassOfDurationNullableFromJson(json); @@ -335,13 +293,11 @@ class SimpleClassOfDurationNullable { class SimpleClassNullableOfDurationNullable { final SimpleClassOfDurationNullableTypeDef? value; - SimpleClassNullableOfDurationNullable( - this.value, - ); + SimpleClassNullableOfDurationNullable(this.value); factory SimpleClassNullableOfDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDurationNullableToJson(this); @@ -353,9 +309,7 @@ typedef SimpleClassOfDynamicTypeDef = (dynamic, {dynamic named}); class SimpleClassOfDynamic { final SimpleClassOfDynamicTypeDef value; - SimpleClassOfDynamic( - this.value, - ); + SimpleClassOfDynamic(this.value); factory SimpleClassOfDynamic.fromJson(Map json) => _$SimpleClassOfDynamicFromJson(json); @@ -367,9 +321,7 @@ class SimpleClassOfDynamic { class SimpleClassNullableOfDynamic { final SimpleClassOfDynamicTypeDef? value; - SimpleClassNullableOfDynamic( - this.value, - ); + SimpleClassNullableOfDynamic(this.value); factory SimpleClassNullableOfDynamic.fromJson(Map json) => _$SimpleClassNullableOfDynamicFromJson(json); @@ -383,9 +335,7 @@ typedef SimpleClassOfEnumTypeTypeDef = (EnumType, {EnumType named}); class SimpleClassOfEnumType { final SimpleClassOfEnumTypeTypeDef value; - SimpleClassOfEnumType( - this.value, - ); + SimpleClassOfEnumType(this.value); factory SimpleClassOfEnumType.fromJson(Map json) => _$SimpleClassOfEnumTypeFromJson(json); @@ -397,9 +347,7 @@ class SimpleClassOfEnumType { class SimpleClassNullableOfEnumType { final SimpleClassOfEnumTypeTypeDef? value; - SimpleClassNullableOfEnumType( - this.value, - ); + SimpleClassNullableOfEnumType(this.value); factory SimpleClassNullableOfEnumType.fromJson(Map json) => _$SimpleClassNullableOfEnumTypeFromJson(json); @@ -413,9 +361,7 @@ typedef SimpleClassOfEnumTypeNullableTypeDef = (EnumType?, {EnumType? named}); class SimpleClassOfEnumTypeNullable { final SimpleClassOfEnumTypeNullableTypeDef value; - SimpleClassOfEnumTypeNullable( - this.value, - ); + SimpleClassOfEnumTypeNullable(this.value); factory SimpleClassOfEnumTypeNullable.fromJson(Map json) => _$SimpleClassOfEnumTypeNullableFromJson(json); @@ -427,13 +373,11 @@ class SimpleClassOfEnumTypeNullable { class SimpleClassNullableOfEnumTypeNullable { final SimpleClassOfEnumTypeNullableTypeDef? value; - SimpleClassNullableOfEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeNullable(this.value); factory SimpleClassNullableOfEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeNullableToJson(this); @@ -441,20 +385,18 @@ class SimpleClassNullableOfEnumTypeNullable { typedef SimpleClassOfFromJsonDynamicParamTypeDef = ( FromJsonDynamicParam, { - FromJsonDynamicParam named + FromJsonDynamicParam named, }); @JsonSerializable() class SimpleClassOfFromJsonDynamicParam { final SimpleClassOfFromJsonDynamicParamTypeDef value; - SimpleClassOfFromJsonDynamicParam( - this.value, - ); + SimpleClassOfFromJsonDynamicParam(this.value); factory SimpleClassOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonDynamicParamToJson(this); @@ -464,13 +406,11 @@ class SimpleClassOfFromJsonDynamicParam { class SimpleClassNullableOfFromJsonDynamicParam { final SimpleClassOfFromJsonDynamicParamTypeDef? value; - SimpleClassNullableOfFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfFromJsonDynamicParam(this.value); factory SimpleClassNullableOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonDynamicParamToJson(this); @@ -478,20 +418,18 @@ class SimpleClassNullableOfFromJsonDynamicParam { typedef SimpleClassOfFromJsonNullableObjectParamTypeDef = ( FromJsonNullableObjectParam, { - FromJsonNullableObjectParam named + FromJsonNullableObjectParam named, }); @JsonSerializable() class SimpleClassOfFromJsonNullableObjectParam { final SimpleClassOfFromJsonNullableObjectParamTypeDef value; - SimpleClassOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfFromJsonNullableObjectParam(this.value); factory SimpleClassOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonNullableObjectParamToJson(this); @@ -501,13 +439,11 @@ class SimpleClassOfFromJsonNullableObjectParam { class SimpleClassNullableOfFromJsonNullableObjectParam { final SimpleClassOfFromJsonNullableObjectParamTypeDef? value; - SimpleClassNullableOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonNullableObjectParamToJson(this); @@ -515,20 +451,18 @@ class SimpleClassNullableOfFromJsonNullableObjectParam { typedef SimpleClassOfFromJsonObjectParamTypeDef = ( FromJsonObjectParam, { - FromJsonObjectParam named + FromJsonObjectParam named, }); @JsonSerializable() class SimpleClassOfFromJsonObjectParam { final SimpleClassOfFromJsonObjectParamTypeDef value; - SimpleClassOfFromJsonObjectParam( - this.value, - ); + SimpleClassOfFromJsonObjectParam(this.value); factory SimpleClassOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonObjectParamToJson(this); @@ -538,13 +472,11 @@ class SimpleClassOfFromJsonObjectParam { class SimpleClassNullableOfFromJsonObjectParam { final SimpleClassOfFromJsonObjectParamTypeDef? value; - SimpleClassNullableOfFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonObjectParam(this.value); factory SimpleClassNullableOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonObjectParamToJson(this); @@ -556,9 +488,7 @@ typedef SimpleClassOfIntTypeDef = (int, {int named}); class SimpleClassOfInt { final SimpleClassOfIntTypeDef value; - SimpleClassOfInt( - this.value, - ); + SimpleClassOfInt(this.value); factory SimpleClassOfInt.fromJson(Map json) => _$SimpleClassOfIntFromJson(json); @@ -570,9 +500,7 @@ class SimpleClassOfInt { class SimpleClassNullableOfInt { final SimpleClassOfIntTypeDef? value; - SimpleClassNullableOfInt( - this.value, - ); + SimpleClassNullableOfInt(this.value); factory SimpleClassNullableOfInt.fromJson(Map json) => _$SimpleClassNullableOfIntFromJson(json); @@ -586,9 +514,7 @@ typedef SimpleClassOfIntNullableTypeDef = (int?, {int? named}); class SimpleClassOfIntNullable { final SimpleClassOfIntNullableTypeDef value; - SimpleClassOfIntNullable( - this.value, - ); + SimpleClassOfIntNullable(this.value); factory SimpleClassOfIntNullable.fromJson(Map json) => _$SimpleClassOfIntNullableFromJson(json); @@ -600,13 +526,11 @@ class SimpleClassOfIntNullable { class SimpleClassNullableOfIntNullable { final SimpleClassOfIntNullableTypeDef? value; - SimpleClassNullableOfIntNullable( - this.value, - ); + SimpleClassNullableOfIntNullable(this.value); factory SimpleClassNullableOfIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntNullableToJson(this); @@ -618,9 +542,7 @@ typedef SimpleClassOfNumTypeDef = (num, {num named}); class SimpleClassOfNum { final SimpleClassOfNumTypeDef value; - SimpleClassOfNum( - this.value, - ); + SimpleClassOfNum(this.value); factory SimpleClassOfNum.fromJson(Map json) => _$SimpleClassOfNumFromJson(json); @@ -632,9 +554,7 @@ class SimpleClassOfNum { class SimpleClassNullableOfNum { final SimpleClassOfNumTypeDef? value; - SimpleClassNullableOfNum( - this.value, - ); + SimpleClassNullableOfNum(this.value); factory SimpleClassNullableOfNum.fromJson(Map json) => _$SimpleClassNullableOfNumFromJson(json); @@ -648,9 +568,7 @@ typedef SimpleClassOfNumNullableTypeDef = (num?, {num? named}); class SimpleClassOfNumNullable { final SimpleClassOfNumNullableTypeDef value; - SimpleClassOfNumNullable( - this.value, - ); + SimpleClassOfNumNullable(this.value); factory SimpleClassOfNumNullable.fromJson(Map json) => _$SimpleClassOfNumNullableFromJson(json); @@ -662,13 +580,11 @@ class SimpleClassOfNumNullable { class SimpleClassNullableOfNumNullable { final SimpleClassOfNumNullableTypeDef? value; - SimpleClassNullableOfNumNullable( - this.value, - ); + SimpleClassNullableOfNumNullable(this.value); factory SimpleClassNullableOfNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfNumNullableToJson(this); @@ -680,9 +596,7 @@ typedef SimpleClassOfObjectTypeDef = (Object, {Object named}); class SimpleClassOfObject { final SimpleClassOfObjectTypeDef value; - SimpleClassOfObject( - this.value, - ); + SimpleClassOfObject(this.value); factory SimpleClassOfObject.fromJson(Map json) => _$SimpleClassOfObjectFromJson(json); @@ -694,9 +608,7 @@ class SimpleClassOfObject { class SimpleClassNullableOfObject { final SimpleClassOfObjectTypeDef? value; - SimpleClassNullableOfObject( - this.value, - ); + SimpleClassNullableOfObject(this.value); factory SimpleClassNullableOfObject.fromJson(Map json) => _$SimpleClassNullableOfObjectFromJson(json); @@ -710,9 +622,7 @@ typedef SimpleClassOfObjectNullableTypeDef = (Object?, {Object? named}); class SimpleClassOfObjectNullable { final SimpleClassOfObjectNullableTypeDef value; - SimpleClassOfObjectNullable( - this.value, - ); + SimpleClassOfObjectNullable(this.value); factory SimpleClassOfObjectNullable.fromJson(Map json) => _$SimpleClassOfObjectNullableFromJson(json); @@ -724,13 +634,11 @@ class SimpleClassOfObjectNullable { class SimpleClassNullableOfObjectNullable { final SimpleClassOfObjectNullableTypeDef? value; - SimpleClassNullableOfObjectNullable( - this.value, - ); + SimpleClassNullableOfObjectNullable(this.value); factory SimpleClassNullableOfObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectNullableToJson(this); @@ -738,16 +646,14 @@ class SimpleClassNullableOfObjectNullable { typedef SimpleClassOfRecordTypeDef = ( (int, String, {bool truth}), { - (int, String, {bool truth}) named + (int, String, {bool truth}) named, }); @JsonSerializable() class SimpleClassOfRecord { final SimpleClassOfRecordTypeDef value; - SimpleClassOfRecord( - this.value, - ); + SimpleClassOfRecord(this.value); factory SimpleClassOfRecord.fromJson(Map json) => _$SimpleClassOfRecordFromJson(json); @@ -759,9 +665,7 @@ class SimpleClassOfRecord { class SimpleClassNullableOfRecord { final SimpleClassOfRecordTypeDef? value; - SimpleClassNullableOfRecord( - this.value, - ); + SimpleClassNullableOfRecord(this.value); factory SimpleClassNullableOfRecord.fromJson(Map json) => _$SimpleClassNullableOfRecordFromJson(json); @@ -775,9 +679,7 @@ typedef SimpleClassOfStringTypeDef = (String, {String named}); class SimpleClassOfString { final SimpleClassOfStringTypeDef value; - SimpleClassOfString( - this.value, - ); + SimpleClassOfString(this.value); factory SimpleClassOfString.fromJson(Map json) => _$SimpleClassOfStringFromJson(json); @@ -789,9 +691,7 @@ class SimpleClassOfString { class SimpleClassNullableOfString { final SimpleClassOfStringTypeDef? value; - SimpleClassNullableOfString( - this.value, - ); + SimpleClassNullableOfString(this.value); factory SimpleClassNullableOfString.fromJson(Map json) => _$SimpleClassNullableOfStringFromJson(json); @@ -805,9 +705,7 @@ typedef SimpleClassOfStringNullableTypeDef = (String?, {String? named}); class SimpleClassOfStringNullable { final SimpleClassOfStringNullableTypeDef value; - SimpleClassOfStringNullable( - this.value, - ); + SimpleClassOfStringNullable(this.value); factory SimpleClassOfStringNullable.fromJson(Map json) => _$SimpleClassOfStringNullableFromJson(json); @@ -819,13 +717,11 @@ class SimpleClassOfStringNullable { class SimpleClassNullableOfStringNullable { final SimpleClassOfStringNullableTypeDef? value; - SimpleClassNullableOfStringNullable( - this.value, - ); + SimpleClassNullableOfStringNullable(this.value); factory SimpleClassNullableOfStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringNullableToJson(this); @@ -837,9 +733,7 @@ typedef SimpleClassOfUriTypeDef = (Uri, {Uri named}); class SimpleClassOfUri { final SimpleClassOfUriTypeDef value; - SimpleClassOfUri( - this.value, - ); + SimpleClassOfUri(this.value); factory SimpleClassOfUri.fromJson(Map json) => _$SimpleClassOfUriFromJson(json); @@ -851,9 +745,7 @@ class SimpleClassOfUri { class SimpleClassNullableOfUri { final SimpleClassOfUriTypeDef? value; - SimpleClassNullableOfUri( - this.value, - ); + SimpleClassNullableOfUri(this.value); factory SimpleClassNullableOfUri.fromJson(Map json) => _$SimpleClassNullableOfUriFromJson(json); @@ -867,9 +759,7 @@ typedef SimpleClassOfUriNullableTypeDef = (Uri?, {Uri? named}); class SimpleClassOfUriNullable { final SimpleClassOfUriNullableTypeDef value; - SimpleClassOfUriNullable( - this.value, - ); + SimpleClassOfUriNullable(this.value); factory SimpleClassOfUriNullable.fromJson(Map json) => _$SimpleClassOfUriNullableFromJson(json); @@ -881,13 +771,11 @@ class SimpleClassOfUriNullable { class SimpleClassNullableOfUriNullable { final SimpleClassOfUriNullableTypeDef? value; - SimpleClassNullableOfUriNullable( - this.value, - ); + SimpleClassNullableOfUriNullable(this.value); factory SimpleClassNullableOfUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriNullableToJson(this); diff --git a/json_serializable/test/supported_types/input.type_record.g.dart b/json_serializable/test/supported_types/input.type_record.g.dart index bc37b7cd2..98e183040 100644 --- a/json_serializable/test/supported_types/input.type_record.g.dart +++ b/json_serializable/test/supported_types/input.type_record.g.dart @@ -8,25 +8,19 @@ part of 'input.type_record.dart'; // JsonSerializableGenerator // ************************************************************************** -SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - (), - ); +SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass(()); Map _$SimpleClassToJson(SimpleClass instance) => - { - 'value': {}, - }; + {'value': {}}; SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => - SimpleClassNullable( - (), - ); + SimpleClassNullable(()); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value == null ? null : {}, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value == null ? null : {}, +}; SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => SimpleClassOfBigInt( @@ -40,53 +34,74 @@ SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => ); Map _$SimpleClassOfBigIntToJson( - SimpleClassOfBigInt instance) => - { - 'value': { - r'$1': instance.value.$1.toString(), - 'named': instance.value.named.toString(), - }, - }; + SimpleClassOfBigInt instance, +) => { + 'value': { + r'$1': instance.value.$1.toString(), + 'named': instance.value.named.toString(), + }, +}; -$Rec _$recordConvert<$Rec>( - Object? value, - $Rec Function(Map) convert, -) => +$Rec _$recordConvert<$Rec>(Object? value, $Rec Function(Map) convert) => convert(value as Map); SimpleClassNullableOfBigInt _$SimpleClassNullableOfBigIntFromJson( - Map json) => - SimpleClassNullableOfBigInt( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - BigInt.parse($jsonValue[r'$1'] as String), - named: BigInt.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassNullableOfBigInt( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + BigInt.parse($jsonValue[r'$1'] as String), + named: BigInt.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassNullableOfBigIntToJson( - SimpleClassNullableOfBigInt instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1.toString(), - 'named': instance.value!.named.toString(), - }, - }; + SimpleClassNullableOfBigInt instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1.toString(), + 'named': instance.value!.named.toString(), + }, +}; $Rec? _$recordConvertNullable<$Rec>( Object? value, $Rec Function(Map) convert, -) => - value == null ? null : convert(value as Map); +) => value == null ? null : convert(value as Map); SimpleClassOfBigIntNullable _$SimpleClassOfBigIntNullableFromJson( - Map json) => - SimpleClassOfBigIntNullable( - _$recordConvert( + Map json, +) => SimpleClassOfBigIntNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $jsonValue[r'$1'] == null + ? null + : BigInt.parse($jsonValue[r'$1'] as String), + named: $jsonValue['named'] == null + ? null + : BigInt.parse($jsonValue['named'] as String), + ), + ), +); + +Map _$SimpleClassOfBigIntNullableToJson( + SimpleClassOfBigIntNullable instance, +) => { + 'value': { + r'$1': instance.value.$1?.toString(), + 'named': instance.value.named?.toString(), + }, +}; + +SimpleClassNullableOfBigIntNullable +_$SimpleClassNullableOfBigIntNullableFromJson(Map json) => + SimpleClassNullableOfBigIntNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( $jsonValue[r'$1'] == null @@ -99,50 +114,23 @@ SimpleClassOfBigIntNullable _$SimpleClassOfBigIntNullableFromJson( ), ); -Map _$SimpleClassOfBigIntNullableToJson( - SimpleClassOfBigIntNullable instance) => - { - 'value': { - r'$1': instance.value.$1?.toString(), - 'named': instance.value.named?.toString(), - }, - }; - -SimpleClassNullableOfBigIntNullable - _$SimpleClassNullableOfBigIntNullableFromJson(Map json) => - SimpleClassNullableOfBigIntNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] == null - ? null - : BigInt.parse($jsonValue[r'$1'] as String), - named: $jsonValue['named'] == null - ? null - : BigInt.parse($jsonValue['named'] as String), - ), - ), - ); - Map _$SimpleClassNullableOfBigIntNullableToJson( - SimpleClassNullableOfBigIntNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1?.toString(), - 'named': instance.value!.named?.toString(), - }, - }; + SimpleClassNullableOfBigIntNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1?.toString(), + 'named': instance.value!.named?.toString(), + }, +}; SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => SimpleClassOfBool( _$recordConvert( json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as bool, - named: $jsonValue['named'] as bool, - ), + ($jsonValue) => + ($jsonValue[r'$1'] as bool, named: $jsonValue['named'] as bool), ), ); @@ -155,120 +143,139 @@ Map _$SimpleClassOfBoolToJson(SimpleClassOfBool instance) => }; SimpleClassNullableOfBool _$SimpleClassNullableOfBoolFromJson( - Map json) => - SimpleClassNullableOfBool( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as bool, - named: $jsonValue['named'] as bool, - ), - ), - ); + Map json, +) => SimpleClassNullableOfBool( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as bool, named: $jsonValue['named'] as bool), + ), +); Map _$SimpleClassNullableOfBoolToJson( - SimpleClassNullableOfBool instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfBool instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfBoolNullable _$SimpleClassOfBoolNullableFromJson( - Map json) => - SimpleClassOfBoolNullable( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as bool?, - named: $jsonValue['named'] as bool?, - ), - ), - ); + Map json, +) => SimpleClassOfBoolNullable( + _$recordConvert( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as bool?, named: $jsonValue['named'] as bool?), + ), +); Map _$SimpleClassOfBoolNullableToJson( - SimpleClassOfBoolNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfBoolNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfBoolNullable _$SimpleClassNullableOfBoolNullableFromJson( - Map json) => - SimpleClassNullableOfBoolNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as bool?, - named: $jsonValue['named'] as bool?, - ), - ), - ); + Map json, +) => SimpleClassNullableOfBoolNullable( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as bool?, named: $jsonValue['named'] as bool?), + ), +); Map _$SimpleClassNullableOfBoolNullableToJson( - SimpleClassNullableOfBoolNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfBoolNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfDateTime _$SimpleClassOfDateTimeFromJson( - Map json) => - SimpleClassOfDateTime( - _$recordConvert( - json['value'], - ($jsonValue) => ( - DateTime.parse($jsonValue[r'$1'] as String), - named: DateTime.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassOfDateTime( + _$recordConvert( + json['value'], + ($jsonValue) => ( + DateTime.parse($jsonValue[r'$1'] as String), + named: DateTime.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassOfDateTimeToJson( - SimpleClassOfDateTime instance) => - { - 'value': { - r'$1': instance.value.$1.toIso8601String(), - 'named': instance.value.named.toIso8601String(), - }, - }; + SimpleClassOfDateTime instance, +) => { + 'value': { + r'$1': instance.value.$1.toIso8601String(), + 'named': instance.value.named.toIso8601String(), + }, +}; SimpleClassNullableOfDateTime _$SimpleClassNullableOfDateTimeFromJson( - Map json) => - SimpleClassNullableOfDateTime( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - DateTime.parse($jsonValue[r'$1'] as String), - named: DateTime.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassNullableOfDateTime( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + DateTime.parse($jsonValue[r'$1'] as String), + named: DateTime.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassNullableOfDateTimeToJson( - SimpleClassNullableOfDateTime instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1.toIso8601String(), - 'named': instance.value!.named.toIso8601String(), - }, - }; + SimpleClassNullableOfDateTime instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1.toIso8601String(), + 'named': instance.value!.named.toIso8601String(), + }, +}; SimpleClassOfDateTimeNullable _$SimpleClassOfDateTimeNullableFromJson( - Map json) => - SimpleClassOfDateTimeNullable( - _$recordConvert( + Map json, +) => SimpleClassOfDateTimeNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $jsonValue[r'$1'] == null + ? null + : DateTime.parse($jsonValue[r'$1'] as String), + named: $jsonValue['named'] == null + ? null + : DateTime.parse($jsonValue['named'] as String), + ), + ), +); + +Map _$SimpleClassOfDateTimeNullableToJson( + SimpleClassOfDateTimeNullable instance, +) => { + 'value': { + r'$1': instance.value.$1?.toIso8601String(), + 'named': instance.value.named?.toIso8601String(), + }, +}; + +SimpleClassNullableOfDateTimeNullable +_$SimpleClassNullableOfDateTimeNullableFromJson(Map json) => + SimpleClassNullableOfDateTimeNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( $jsonValue[r'$1'] == null @@ -281,42 +288,16 @@ SimpleClassOfDateTimeNullable _$SimpleClassOfDateTimeNullableFromJson( ), ); -Map _$SimpleClassOfDateTimeNullableToJson( - SimpleClassOfDateTimeNullable instance) => - { - 'value': { - r'$1': instance.value.$1?.toIso8601String(), - 'named': instance.value.named?.toIso8601String(), - }, - }; - -SimpleClassNullableOfDateTimeNullable - _$SimpleClassNullableOfDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] == null - ? null - : DateTime.parse($jsonValue[r'$1'] as String), - named: $jsonValue['named'] == null - ? null - : DateTime.parse($jsonValue['named'] as String), - ), - ), - ); - Map _$SimpleClassNullableOfDateTimeNullableToJson( - SimpleClassNullableOfDateTimeNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1?.toIso8601String(), - 'named': instance.value!.named?.toIso8601String(), - }, - }; + SimpleClassNullableOfDateTimeNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1?.toIso8601String(), + 'named': instance.value!.named?.toIso8601String(), + }, +}; SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => SimpleClassOfDouble( @@ -330,41 +311,62 @@ SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => ); Map _$SimpleClassOfDoubleToJson( - SimpleClassOfDouble instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfDouble instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfDouble _$SimpleClassNullableOfDoubleFromJson( - Map json) => - SimpleClassNullableOfDouble( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toDouble(), - named: ($jsonValue['named'] as num).toDouble(), - ), - ), - ); + Map json, +) => SimpleClassNullableOfDouble( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toDouble(), + named: ($jsonValue['named'] as num).toDouble(), + ), + ), +); Map _$SimpleClassNullableOfDoubleToJson( - SimpleClassNullableOfDouble instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfDouble instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfDoubleNullable _$SimpleClassOfDoubleNullableFromJson( - Map json) => - SimpleClassOfDoubleNullable( - _$recordConvert( + Map json, +) => SimpleClassOfDoubleNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num?)?.toDouble(), + named: ($jsonValue['named'] as num?)?.toDouble(), + ), + ), +); + +Map _$SimpleClassOfDoubleNullableToJson( + SimpleClassOfDoubleNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; + +SimpleClassNullableOfDoubleNullable +_$SimpleClassNullableOfDoubleNullableFromJson(Map json) => + SimpleClassNullableOfDoubleNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( ($jsonValue[r'$1'] as num?)?.toDouble(), @@ -373,86 +375,90 @@ SimpleClassOfDoubleNullable _$SimpleClassOfDoubleNullableFromJson( ), ); -Map _$SimpleClassOfDoubleNullableToJson( - SimpleClassOfDoubleNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; - -SimpleClassNullableOfDoubleNullable - _$SimpleClassNullableOfDoubleNullableFromJson(Map json) => - SimpleClassNullableOfDoubleNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num?)?.toDouble(), - named: ($jsonValue['named'] as num?)?.toDouble(), - ), - ), - ); - Map _$SimpleClassNullableOfDoubleNullableToJson( - SimpleClassNullableOfDoubleNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfDoubleNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfDuration _$SimpleClassOfDurationFromJson( - Map json) => - SimpleClassOfDuration( - _$recordConvert( - json['value'], - ($jsonValue) => ( - Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), - named: Duration(microseconds: ($jsonValue['named'] as num).toInt()), - ), - ), - ); + Map json, +) => SimpleClassOfDuration( + _$recordConvert( + json['value'], + ($jsonValue) => ( + Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), + named: Duration(microseconds: ($jsonValue['named'] as num).toInt()), + ), + ), +); Map _$SimpleClassOfDurationToJson( - SimpleClassOfDuration instance) => - { - 'value': { - r'$1': instance.value.$1.inMicroseconds, - 'named': instance.value.named.inMicroseconds, - }, - }; + SimpleClassOfDuration instance, +) => { + 'value': { + r'$1': instance.value.$1.inMicroseconds, + 'named': instance.value.named.inMicroseconds, + }, +}; SimpleClassNullableOfDuration _$SimpleClassNullableOfDurationFromJson( - Map json) => - SimpleClassNullableOfDuration( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), - named: Duration(microseconds: ($jsonValue['named'] as num).toInt()), - ), - ), - ); + Map json, +) => SimpleClassNullableOfDuration( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), + named: Duration(microseconds: ($jsonValue['named'] as num).toInt()), + ), + ), +); Map _$SimpleClassNullableOfDurationToJson( - SimpleClassNullableOfDuration instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1.inMicroseconds, - 'named': instance.value!.named.inMicroseconds, - }, - }; + SimpleClassNullableOfDuration instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1.inMicroseconds, + 'named': instance.value!.named.inMicroseconds, + }, +}; SimpleClassOfDurationNullable _$SimpleClassOfDurationNullableFromJson( - Map json) => - SimpleClassOfDurationNullable( - _$recordConvert( + Map json, +) => SimpleClassOfDurationNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $jsonValue[r'$1'] == null + ? null + : Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), + named: $jsonValue['named'] == null + ? null + : Duration(microseconds: ($jsonValue['named'] as num).toInt()), + ), + ), +); + +Map _$SimpleClassOfDurationNullableToJson( + SimpleClassOfDurationNullable instance, +) => { + 'value': { + r'$1': instance.value.$1?.inMicroseconds, + 'named': instance.value.named?.inMicroseconds, + }, +}; + +SimpleClassNullableOfDurationNullable +_$SimpleClassNullableOfDurationNullableFromJson(Map json) => + SimpleClassNullableOfDurationNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( $jsonValue[r'$1'] == null @@ -465,108 +471,75 @@ SimpleClassOfDurationNullable _$SimpleClassOfDurationNullableFromJson( ), ); -Map _$SimpleClassOfDurationNullableToJson( - SimpleClassOfDurationNullable instance) => - { - 'value': { - r'$1': instance.value.$1?.inMicroseconds, - 'named': instance.value.named?.inMicroseconds, - }, - }; - -SimpleClassNullableOfDurationNullable - _$SimpleClassNullableOfDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDurationNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] == null - ? null - : Duration(microseconds: ($jsonValue[r'$1'] as num).toInt()), - named: $jsonValue['named'] == null - ? null - : Duration( - microseconds: ($jsonValue['named'] as num).toInt()), - ), - ), - ); - Map _$SimpleClassNullableOfDurationNullableToJson( - SimpleClassNullableOfDurationNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1?.inMicroseconds, - 'named': instance.value!.named?.inMicroseconds, - }, - }; + SimpleClassNullableOfDurationNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1?.inMicroseconds, + 'named': instance.value!.named?.inMicroseconds, + }, +}; SimpleClassOfDynamic _$SimpleClassOfDynamicFromJson( - Map json) => - SimpleClassOfDynamic( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'], - named: $jsonValue['named'], - ), - ), - ); + Map json, +) => SimpleClassOfDynamic( + _$recordConvert( + json['value'], + ($jsonValue) => ($jsonValue[r'$1'], named: $jsonValue['named']), + ), +); Map _$SimpleClassOfDynamicToJson( - SimpleClassOfDynamic instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfDynamic instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfDynamic _$SimpleClassNullableOfDynamicFromJson( - Map json) => - SimpleClassNullableOfDynamic( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'], - named: $jsonValue['named'], - ), - ), - ); + Map json, +) => SimpleClassNullableOfDynamic( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ($jsonValue[r'$1'], named: $jsonValue['named']), + ), +); Map _$SimpleClassNullableOfDynamicToJson( - SimpleClassNullableOfDynamic instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfDynamic instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfEnumType _$SimpleClassOfEnumTypeFromJson( - Map json) => - SimpleClassOfEnumType( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $enumDecode(_$EnumTypeEnumMap, $jsonValue[r'$1']), - named: $enumDecode(_$EnumTypeEnumMap, $jsonValue['named']), - ), - ), - ); + Map json, +) => SimpleClassOfEnumType( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $enumDecode(_$EnumTypeEnumMap, $jsonValue[r'$1']), + named: $enumDecode(_$EnumTypeEnumMap, $jsonValue['named']), + ), + ), +); Map _$SimpleClassOfEnumTypeToJson( - SimpleClassOfEnumType instance) => - { - 'value': { - r'$1': _$EnumTypeEnumMap[instance.value.$1]!, - 'named': _$EnumTypeEnumMap[instance.value.named]!, - }, - }; + SimpleClassOfEnumType instance, +) => { + 'value': { + r'$1': _$EnumTypeEnumMap[instance.value.$1]!, + 'named': _$EnumTypeEnumMap[instance.value.named]!, + }, +}; const _$EnumTypeEnumMap = { EnumType.alpha: 'alpha', @@ -576,32 +549,53 @@ const _$EnumTypeEnumMap = { }; SimpleClassNullableOfEnumType _$SimpleClassNullableOfEnumTypeFromJson( - Map json) => - SimpleClassNullableOfEnumType( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $enumDecode(_$EnumTypeEnumMap, $jsonValue[r'$1']), - named: $enumDecode(_$EnumTypeEnumMap, $jsonValue['named']), - ), - ), - ); + Map json, +) => SimpleClassNullableOfEnumType( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + $enumDecode(_$EnumTypeEnumMap, $jsonValue[r'$1']), + named: $enumDecode(_$EnumTypeEnumMap, $jsonValue['named']), + ), + ), +); Map _$SimpleClassNullableOfEnumTypeToJson( - SimpleClassNullableOfEnumType instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': _$EnumTypeEnumMap[instance.value!.$1]!, - 'named': _$EnumTypeEnumMap[instance.value!.named]!, - }, - }; + SimpleClassNullableOfEnumType instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': _$EnumTypeEnumMap[instance.value!.$1]!, + 'named': _$EnumTypeEnumMap[instance.value!.named]!, + }, +}; SimpleClassOfEnumTypeNullable _$SimpleClassOfEnumTypeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeNullable( - _$recordConvert( + Map json, +) => SimpleClassOfEnumTypeNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $enumDecodeNullable(_$EnumTypeEnumMap, $jsonValue[r'$1']), + named: $enumDecodeNullable(_$EnumTypeEnumMap, $jsonValue['named']), + ), + ), +); + +Map _$SimpleClassOfEnumTypeNullableToJson( + SimpleClassOfEnumTypeNullable instance, +) => { + 'value': { + r'$1': _$EnumTypeEnumMap[instance.value.$1], + 'named': _$EnumTypeEnumMap[instance.value.named], + }, +}; + +SimpleClassNullableOfEnumTypeNullable +_$SimpleClassNullableOfEnumTypeNullableFromJson(Map json) => + SimpleClassNullableOfEnumTypeNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( $enumDecodeNullable(_$EnumTypeEnumMap, $jsonValue[r'$1']), @@ -610,176 +604,150 @@ SimpleClassOfEnumTypeNullable _$SimpleClassOfEnumTypeNullableFromJson( ), ); -Map _$SimpleClassOfEnumTypeNullableToJson( - SimpleClassOfEnumTypeNullable instance) => - { - 'value': { - r'$1': _$EnumTypeEnumMap[instance.value.$1], - 'named': _$EnumTypeEnumMap[instance.value.named], - }, - }; - -SimpleClassNullableOfEnumTypeNullable - _$SimpleClassNullableOfEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $enumDecodeNullable(_$EnumTypeEnumMap, $jsonValue[r'$1']), - named: - $enumDecodeNullable(_$EnumTypeEnumMap, $jsonValue['named']), - ), - ), - ); - Map _$SimpleClassNullableOfEnumTypeNullableToJson( - SimpleClassNullableOfEnumTypeNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': _$EnumTypeEnumMap[instance.value!.$1], - 'named': _$EnumTypeEnumMap[instance.value!.named], - }, - }; + SimpleClassNullableOfEnumTypeNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': _$EnumTypeEnumMap[instance.value!.$1], + 'named': _$EnumTypeEnumMap[instance.value!.named], + }, +}; SimpleClassOfFromJsonDynamicParam _$SimpleClassOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfFromJsonDynamicParam( - _$recordConvert( - json['value'], - ($jsonValue) => ( - FromJsonDynamicParam.fromJson($jsonValue[r'$1']), - named: FromJsonDynamicParam.fromJson($jsonValue['named']), - ), - ), - ); + Map json, +) => SimpleClassOfFromJsonDynamicParam( + _$recordConvert( + json['value'], + ($jsonValue) => ( + FromJsonDynamicParam.fromJson($jsonValue[r'$1']), + named: FromJsonDynamicParam.fromJson($jsonValue['named']), + ), + ), +); Map _$SimpleClassOfFromJsonDynamicParamToJson( - SimpleClassOfFromJsonDynamicParam instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfFromJsonDynamicParam instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfFromJsonDynamicParam - _$SimpleClassNullableOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonDynamicParam( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - FromJsonDynamicParam.fromJson($jsonValue[r'$1']), - named: FromJsonDynamicParam.fromJson($jsonValue['named']), - ), - ), - ); +_$SimpleClassNullableOfFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonDynamicParam( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + FromJsonDynamicParam.fromJson($jsonValue[r'$1']), + named: FromJsonDynamicParam.fromJson($jsonValue['named']), + ), + ), +); Map _$SimpleClassNullableOfFromJsonDynamicParamToJson( - SimpleClassNullableOfFromJsonDynamicParam instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfFromJsonDynamicParam instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfFromJsonNullableObjectParam - _$SimpleClassOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonNullableObjectParam( - _$recordConvert( - json['value'], - ($jsonValue) => ( - FromJsonNullableObjectParam.fromJson($jsonValue[r'$1']), - named: FromJsonNullableObjectParam.fromJson($jsonValue['named']), - ), - ), - ); +_$SimpleClassOfFromJsonNullableObjectParamFromJson(Map json) => + SimpleClassOfFromJsonNullableObjectParam( + _$recordConvert( + json['value'], + ($jsonValue) => ( + FromJsonNullableObjectParam.fromJson($jsonValue[r'$1']), + named: FromJsonNullableObjectParam.fromJson($jsonValue['named']), + ), + ), + ); Map _$SimpleClassOfFromJsonNullableObjectParamToJson( - SimpleClassOfFromJsonNullableObjectParam instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfFromJsonNullableObjectParam instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfFromJsonNullableObjectParam - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonNullableObjectParam( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - FromJsonNullableObjectParam.fromJson($jsonValue[r'$1']), - named: FromJsonNullableObjectParam.fromJson($jsonValue['named']), - ), - ), - ); +_$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonNullableObjectParam( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + FromJsonNullableObjectParam.fromJson($jsonValue[r'$1']), + named: FromJsonNullableObjectParam.fromJson($jsonValue['named']), + ), + ), +); Map _$SimpleClassNullableOfFromJsonNullableObjectParamToJson( - SimpleClassNullableOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfFromJsonNullableObjectParam instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfFromJsonObjectParam _$SimpleClassOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonObjectParam( - _$recordConvert( - json['value'], - ($jsonValue) => ( - FromJsonObjectParam.fromJson($jsonValue[r'$1'] as Object), - named: FromJsonObjectParam.fromJson($jsonValue['named'] as Object), - ), - ), - ); + Map json, +) => SimpleClassOfFromJsonObjectParam( + _$recordConvert( + json['value'], + ($jsonValue) => ( + FromJsonObjectParam.fromJson($jsonValue[r'$1'] as Object), + named: FromJsonObjectParam.fromJson($jsonValue['named'] as Object), + ), + ), +); Map _$SimpleClassOfFromJsonObjectParamToJson( - SimpleClassOfFromJsonObjectParam instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfFromJsonObjectParam instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfFromJsonObjectParam - _$SimpleClassNullableOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonObjectParam( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - FromJsonObjectParam.fromJson($jsonValue[r'$1'] as Object), - named: - FromJsonObjectParam.fromJson($jsonValue['named'] as Object), - ), - ), - ); +_$SimpleClassNullableOfFromJsonObjectParamFromJson(Map json) => + SimpleClassNullableOfFromJsonObjectParam( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + FromJsonObjectParam.fromJson($jsonValue[r'$1'] as Object), + named: FromJsonObjectParam.fromJson($jsonValue['named'] as Object), + ), + ), + ); Map _$SimpleClassNullableOfFromJsonObjectParamToJson( - SimpleClassNullableOfFromJsonObjectParam instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfFromJsonObjectParam instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => SimpleClassOfInt( @@ -801,80 +769,78 @@ Map _$SimpleClassOfIntToJson(SimpleClassOfInt instance) => }; SimpleClassNullableOfInt _$SimpleClassNullableOfIntFromJson( - Map json) => - SimpleClassNullableOfInt( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - named: ($jsonValue['named'] as num).toInt(), - ), - ), - ); + Map json, +) => SimpleClassNullableOfInt( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + named: ($jsonValue['named'] as num).toInt(), + ), + ), +); Map _$SimpleClassNullableOfIntToJson( - SimpleClassNullableOfInt instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfInt instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfIntNullable _$SimpleClassOfIntNullableFromJson( - Map json) => - SimpleClassOfIntNullable( - _$recordConvert( - json['value'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num?)?.toInt(), - named: ($jsonValue['named'] as num?)?.toInt(), - ), - ), - ); + Map json, +) => SimpleClassOfIntNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num?)?.toInt(), + named: ($jsonValue['named'] as num?)?.toInt(), + ), + ), +); Map _$SimpleClassOfIntNullableToJson( - SimpleClassOfIntNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfIntNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfIntNullable _$SimpleClassNullableOfIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num?)?.toInt(), - named: ($jsonValue['named'] as num?)?.toInt(), - ), - ), - ); + Map json, +) => SimpleClassNullableOfIntNullable( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num?)?.toInt(), + named: ($jsonValue['named'] as num?)?.toInt(), + ), + ), +); Map _$SimpleClassNullableOfIntNullableToJson( - SimpleClassNullableOfIntNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfIntNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => SimpleClassOfNum( _$recordConvert( json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as num, - named: $jsonValue['named'] as num, - ), + ($jsonValue) => + ($jsonValue[r'$1'] as num, named: $jsonValue['named'] as num), ), ); @@ -887,158 +853,142 @@ Map _$SimpleClassOfNumToJson(SimpleClassOfNum instance) => }; SimpleClassNullableOfNum _$SimpleClassNullableOfNumFromJson( - Map json) => - SimpleClassNullableOfNum( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as num, - named: $jsonValue['named'] as num, - ), - ), - ); + Map json, +) => SimpleClassNullableOfNum( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as num, named: $jsonValue['named'] as num), + ), +); Map _$SimpleClassNullableOfNumToJson( - SimpleClassNullableOfNum instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfNum instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfNumNullable _$SimpleClassOfNumNullableFromJson( - Map json) => - SimpleClassOfNumNullable( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as num?, - named: $jsonValue['named'] as num?, - ), - ), - ); + Map json, +) => SimpleClassOfNumNullable( + _$recordConvert( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as num?, named: $jsonValue['named'] as num?), + ), +); Map _$SimpleClassOfNumNullableToJson( - SimpleClassOfNumNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfNumNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfNumNullable _$SimpleClassNullableOfNumNullableFromJson( - Map json) => - SimpleClassNullableOfNumNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as num?, - named: $jsonValue['named'] as num?, - ), - ), - ); + Map json, +) => SimpleClassNullableOfNumNullable( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as num?, named: $jsonValue['named'] as num?), + ), +); Map _$SimpleClassNullableOfNumNullableToJson( - SimpleClassNullableOfNumNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfNumNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => SimpleClassOfObject( _$recordConvert( json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as Object, - named: $jsonValue['named'] as Object, - ), + ($jsonValue) => + ($jsonValue[r'$1'] as Object, named: $jsonValue['named'] as Object), ), ); Map _$SimpleClassOfObjectToJson( - SimpleClassOfObject instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfObject instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfObject _$SimpleClassNullableOfObjectFromJson( - Map json) => - SimpleClassNullableOfObject( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as Object, - named: $jsonValue['named'] as Object, - ), - ), - ); + Map json, +) => SimpleClassNullableOfObject( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as Object, named: $jsonValue['named'] as Object), + ), +); Map _$SimpleClassNullableOfObjectToJson( - SimpleClassNullableOfObject instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfObject instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfObjectNullable _$SimpleClassOfObjectNullableFromJson( - Map json) => - SimpleClassOfObjectNullable( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'], - named: $jsonValue['named'], - ), - ), - ); + Map json, +) => SimpleClassOfObjectNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ($jsonValue[r'$1'], named: $jsonValue['named']), + ), +); Map _$SimpleClassOfObjectNullableToJson( - SimpleClassOfObjectNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfObjectNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfObjectNullable - _$SimpleClassNullableOfObjectNullableFromJson(Map json) => - SimpleClassNullableOfObjectNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'], - named: $jsonValue['named'], - ), - ), - ); +_$SimpleClassNullableOfObjectNullableFromJson(Map json) => + SimpleClassNullableOfObjectNullable( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ($jsonValue[r'$1'], named: $jsonValue['named']), + ), + ); Map _$SimpleClassNullableOfObjectNullableToJson( - SimpleClassNullableOfObjectNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfObjectNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfRecord _$SimpleClassOfRecordFromJson(Map json) => SimpleClassOfRecord( @@ -1066,114 +1016,129 @@ SimpleClassOfRecord _$SimpleClassOfRecordFromJson(Map json) => ); Map _$SimpleClassOfRecordToJson( - SimpleClassOfRecord instance) => - { - 'value': { - r'$1': { - r'$1': instance.value.$1.$1, - r'$2': instance.value.$1.$2, - 'truth': instance.value.$1.truth, - }, - 'named': { - r'$1': instance.value.named.$1, - r'$2': instance.value.named.$2, - 'truth': instance.value.named.truth, - }, - }, - }; + SimpleClassOfRecord instance, +) => { + 'value': { + r'$1': { + r'$1': instance.value.$1.$1, + r'$2': instance.value.$1.$2, + 'truth': instance.value.$1.truth, + }, + 'named': { + r'$1': instance.value.named.$1, + r'$2': instance.value.named.$2, + 'truth': instance.value.named.truth, + }, + }, +}; SimpleClassNullableOfRecord _$SimpleClassNullableOfRecordFromJson( - Map json) => - SimpleClassNullableOfRecord( - _$recordConvertNullable( - json['value'], + Map json, +) => SimpleClassNullableOfRecord( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + _$recordConvert( + $jsonValue[r'$1'], ($jsonValue) => ( - _$recordConvert( - $jsonValue[r'$1'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - ), - named: _$recordConvert( - $jsonValue['named'], - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - ), + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, ), ), - ); + named: _$recordConvert( + $jsonValue['named'], + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ), + ), +); Map _$SimpleClassNullableOfRecordToJson( - SimpleClassNullableOfRecord instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': { - r'$1': instance.value!.$1.$1, - r'$2': instance.value!.$1.$2, - 'truth': instance.value!.$1.truth, - }, - 'named': { - r'$1': instance.value!.named.$1, - r'$2': instance.value!.named.$2, - 'truth': instance.value!.named.truth, - }, - }, - }; + SimpleClassNullableOfRecord instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': { + r'$1': instance.value!.$1.$1, + r'$2': instance.value!.$1.$2, + 'truth': instance.value!.$1.truth, + }, + 'named': { + r'$1': instance.value!.named.$1, + r'$2': instance.value!.named.$2, + 'truth': instance.value!.named.truth, + }, + }, +}; SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => SimpleClassOfString( _$recordConvert( json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as String, - named: $jsonValue['named'] as String, - ), + ($jsonValue) => + ($jsonValue[r'$1'] as String, named: $jsonValue['named'] as String), ), ); Map _$SimpleClassOfStringToJson( - SimpleClassOfString instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; + SimpleClassOfString instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; SimpleClassNullableOfString _$SimpleClassNullableOfStringFromJson( - Map json) => - SimpleClassNullableOfString( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as String, - named: $jsonValue['named'] as String, - ), - ), - ); + Map json, +) => SimpleClassNullableOfString( + _$recordConvertNullable( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as String, named: $jsonValue['named'] as String), + ), +); Map _$SimpleClassNullableOfStringToJson( - SimpleClassNullableOfString instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfString instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfStringNullable _$SimpleClassOfStringNullableFromJson( - Map json) => - SimpleClassOfStringNullable( - _$recordConvert( + Map json, +) => SimpleClassOfStringNullable( + _$recordConvert( + json['value'], + ($jsonValue) => + ($jsonValue[r'$1'] as String?, named: $jsonValue['named'] as String?), + ), +); + +Map _$SimpleClassOfStringNullableToJson( + SimpleClassOfStringNullable instance, +) => { + 'value': { + r'$1': instance.value.$1, + 'named': instance.value.named, + }, +}; + +SimpleClassNullableOfStringNullable +_$SimpleClassNullableOfStringNullableFromJson(Map json) => + SimpleClassNullableOfStringNullable( + _$recordConvertNullable( json['value'], ($jsonValue) => ( $jsonValue[r'$1'] as String?, @@ -1182,37 +1147,16 @@ SimpleClassOfStringNullable _$SimpleClassOfStringNullableFromJson( ), ); -Map _$SimpleClassOfStringNullableToJson( - SimpleClassOfStringNullable instance) => - { - 'value': { - r'$1': instance.value.$1, - 'named': instance.value.named, - }, - }; - -SimpleClassNullableOfStringNullable - _$SimpleClassNullableOfStringNullableFromJson(Map json) => - SimpleClassNullableOfStringNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] as String?, - named: $jsonValue['named'] as String?, - ), - ), - ); - Map _$SimpleClassNullableOfStringNullableToJson( - SimpleClassNullableOfStringNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1, - 'named': instance.value!.named, - }, - }; + SimpleClassNullableOfStringNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1, + 'named': instance.value!.named, + }, +}; SimpleClassOfUri _$SimpleClassOfUriFromJson(Map json) => SimpleClassOfUri( @@ -1234,76 +1178,72 @@ Map _$SimpleClassOfUriToJson(SimpleClassOfUri instance) => }; SimpleClassNullableOfUri _$SimpleClassNullableOfUriFromJson( - Map json) => - SimpleClassNullableOfUri( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - Uri.parse($jsonValue[r'$1'] as String), - named: Uri.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassNullableOfUri( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + Uri.parse($jsonValue[r'$1'] as String), + named: Uri.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassNullableOfUriToJson( - SimpleClassNullableOfUri instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1.toString(), - 'named': instance.value!.named.toString(), - }, - }; + SimpleClassNullableOfUri instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1.toString(), + 'named': instance.value!.named.toString(), + }, +}; SimpleClassOfUriNullable _$SimpleClassOfUriNullableFromJson( - Map json) => - SimpleClassOfUriNullable( - _$recordConvert( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] == null - ? null - : Uri.parse($jsonValue[r'$1'] as String), - named: $jsonValue['named'] == null - ? null - : Uri.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassOfUriNullable( + _$recordConvert( + json['value'], + ($jsonValue) => ( + $jsonValue[r'$1'] == null ? null : Uri.parse($jsonValue[r'$1'] as String), + named: $jsonValue['named'] == null + ? null + : Uri.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassOfUriNullableToJson( - SimpleClassOfUriNullable instance) => - { - 'value': { - r'$1': instance.value.$1?.toString(), - 'named': instance.value.named?.toString(), - }, - }; + SimpleClassOfUriNullable instance, +) => { + 'value': { + r'$1': instance.value.$1?.toString(), + 'named': instance.value.named?.toString(), + }, +}; SimpleClassNullableOfUriNullable _$SimpleClassNullableOfUriNullableFromJson( - Map json) => - SimpleClassNullableOfUriNullable( - _$recordConvertNullable( - json['value'], - ($jsonValue) => ( - $jsonValue[r'$1'] == null - ? null - : Uri.parse($jsonValue[r'$1'] as String), - named: $jsonValue['named'] == null - ? null - : Uri.parse($jsonValue['named'] as String), - ), - ), - ); + Map json, +) => SimpleClassNullableOfUriNullable( + _$recordConvertNullable( + json['value'], + ($jsonValue) => ( + $jsonValue[r'$1'] == null ? null : Uri.parse($jsonValue[r'$1'] as String), + named: $jsonValue['named'] == null + ? null + : Uri.parse($jsonValue['named'] as String), + ), + ), +); Map _$SimpleClassNullableOfUriNullableToJson( - SimpleClassNullableOfUriNullable instance) => - { - 'value': instance.value == null - ? null - : { - r'$1': instance.value!.$1?.toString(), - 'named': instance.value!.named?.toString(), - }, - }; + SimpleClassNullableOfUriNullable instance, +) => { + 'value': instance.value == null + ? null + : { + r'$1': instance.value!.$1?.toString(), + 'named': instance.value!.named?.toString(), + }, +}; diff --git a/json_serializable/test/supported_types/input.type_set.dart b/json_serializable/test/supported_types/input.type_set.dart index 398e3f7aa..f22d10928 100644 --- a/json_serializable/test/supported_types/input.type_set.dart +++ b/json_serializable/test/supported_types/input.type_set.dart @@ -14,10 +14,7 @@ class SimpleClass { @JsonKey(defaultValue: {42, true, false, null}) Set withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -32,10 +29,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: {42, true, false, null}) Set? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); @@ -47,9 +41,7 @@ class SimpleClassNullable { class SimpleClassOfBigInt { final Set value; - SimpleClassOfBigInt( - this.value, - ); + SimpleClassOfBigInt(this.value); factory SimpleClassOfBigInt.fromJson(Map json) => _$SimpleClassOfBigIntFromJson(json); @@ -61,9 +53,7 @@ class SimpleClassOfBigInt { class SimpleClassNullableOfBigInt { final Set? value; - SimpleClassNullableOfBigInt( - this.value, - ); + SimpleClassNullableOfBigInt(this.value); factory SimpleClassNullableOfBigInt.fromJson(Map json) => _$SimpleClassNullableOfBigIntFromJson(json); @@ -75,9 +65,7 @@ class SimpleClassNullableOfBigInt { class SimpleClassOfBigIntNullable { final Set value; - SimpleClassOfBigIntNullable( - this.value, - ); + SimpleClassOfBigIntNullable(this.value); factory SimpleClassOfBigIntNullable.fromJson(Map json) => _$SimpleClassOfBigIntNullableFromJson(json); @@ -89,13 +77,11 @@ class SimpleClassOfBigIntNullable { class SimpleClassNullableOfBigIntNullable { final Set? value; - SimpleClassNullableOfBigIntNullable( - this.value, - ); + SimpleClassNullableOfBigIntNullable(this.value); factory SimpleClassNullableOfBigIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBigIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBigIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBigIntNullableToJson(this); @@ -105,9 +91,7 @@ class SimpleClassNullableOfBigIntNullable { class SimpleClassOfBool { final Set value; - SimpleClassOfBool( - this.value, - ); + SimpleClassOfBool(this.value); factory SimpleClassOfBool.fromJson(Map json) => _$SimpleClassOfBoolFromJson(json); @@ -119,9 +103,7 @@ class SimpleClassOfBool { class SimpleClassNullableOfBool { final Set? value; - SimpleClassNullableOfBool( - this.value, - ); + SimpleClassNullableOfBool(this.value); factory SimpleClassNullableOfBool.fromJson(Map json) => _$SimpleClassNullableOfBoolFromJson(json); @@ -133,9 +115,7 @@ class SimpleClassNullableOfBool { class SimpleClassOfBoolNullable { final Set value; - SimpleClassOfBoolNullable( - this.value, - ); + SimpleClassOfBoolNullable(this.value); factory SimpleClassOfBoolNullable.fromJson(Map json) => _$SimpleClassOfBoolNullableFromJson(json); @@ -147,13 +127,11 @@ class SimpleClassOfBoolNullable { class SimpleClassNullableOfBoolNullable { final Set? value; - SimpleClassNullableOfBoolNullable( - this.value, - ); + SimpleClassNullableOfBoolNullable(this.value); factory SimpleClassNullableOfBoolNullable.fromJson( - Map json) => - _$SimpleClassNullableOfBoolNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfBoolNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfBoolNullableToJson(this); @@ -163,9 +141,7 @@ class SimpleClassNullableOfBoolNullable { class SimpleClassOfDateTime { final Set value; - SimpleClassOfDateTime( - this.value, - ); + SimpleClassOfDateTime(this.value); factory SimpleClassOfDateTime.fromJson(Map json) => _$SimpleClassOfDateTimeFromJson(json); @@ -177,9 +153,7 @@ class SimpleClassOfDateTime { class SimpleClassNullableOfDateTime { final Set? value; - SimpleClassNullableOfDateTime( - this.value, - ); + SimpleClassNullableOfDateTime(this.value); factory SimpleClassNullableOfDateTime.fromJson(Map json) => _$SimpleClassNullableOfDateTimeFromJson(json); @@ -191,9 +165,7 @@ class SimpleClassNullableOfDateTime { class SimpleClassOfDateTimeNullable { final Set value; - SimpleClassOfDateTimeNullable( - this.value, - ); + SimpleClassOfDateTimeNullable(this.value); factory SimpleClassOfDateTimeNullable.fromJson(Map json) => _$SimpleClassOfDateTimeNullableFromJson(json); @@ -205,13 +177,11 @@ class SimpleClassOfDateTimeNullable { class SimpleClassNullableOfDateTimeNullable { final Set? value; - SimpleClassNullableOfDateTimeNullable( - this.value, - ); + SimpleClassNullableOfDateTimeNullable(this.value); factory SimpleClassNullableOfDateTimeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDateTimeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDateTimeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDateTimeNullableToJson(this); @@ -221,9 +191,7 @@ class SimpleClassNullableOfDateTimeNullable { class SimpleClassOfDouble { final Set value; - SimpleClassOfDouble( - this.value, - ); + SimpleClassOfDouble(this.value); factory SimpleClassOfDouble.fromJson(Map json) => _$SimpleClassOfDoubleFromJson(json); @@ -235,9 +203,7 @@ class SimpleClassOfDouble { class SimpleClassNullableOfDouble { final Set? value; - SimpleClassNullableOfDouble( - this.value, - ); + SimpleClassNullableOfDouble(this.value); factory SimpleClassNullableOfDouble.fromJson(Map json) => _$SimpleClassNullableOfDoubleFromJson(json); @@ -249,9 +215,7 @@ class SimpleClassNullableOfDouble { class SimpleClassOfDoubleNullable { final Set value; - SimpleClassOfDoubleNullable( - this.value, - ); + SimpleClassOfDoubleNullable(this.value); factory SimpleClassOfDoubleNullable.fromJson(Map json) => _$SimpleClassOfDoubleNullableFromJson(json); @@ -263,13 +227,11 @@ class SimpleClassOfDoubleNullable { class SimpleClassNullableOfDoubleNullable { final Set? value; - SimpleClassNullableOfDoubleNullable( - this.value, - ); + SimpleClassNullableOfDoubleNullable(this.value); factory SimpleClassNullableOfDoubleNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDoubleNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDoubleNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDoubleNullableToJson(this); @@ -279,9 +241,7 @@ class SimpleClassNullableOfDoubleNullable { class SimpleClassOfDuration { final Set value; - SimpleClassOfDuration( - this.value, - ); + SimpleClassOfDuration(this.value); factory SimpleClassOfDuration.fromJson(Map json) => _$SimpleClassOfDurationFromJson(json); @@ -293,9 +253,7 @@ class SimpleClassOfDuration { class SimpleClassNullableOfDuration { final Set? value; - SimpleClassNullableOfDuration( - this.value, - ); + SimpleClassNullableOfDuration(this.value); factory SimpleClassNullableOfDuration.fromJson(Map json) => _$SimpleClassNullableOfDurationFromJson(json); @@ -307,9 +265,7 @@ class SimpleClassNullableOfDuration { class SimpleClassOfDurationNullable { final Set value; - SimpleClassOfDurationNullable( - this.value, - ); + SimpleClassOfDurationNullable(this.value); factory SimpleClassOfDurationNullable.fromJson(Map json) => _$SimpleClassOfDurationNullableFromJson(json); @@ -321,13 +277,11 @@ class SimpleClassOfDurationNullable { class SimpleClassNullableOfDurationNullable { final Set? value; - SimpleClassNullableOfDurationNullable( - this.value, - ); + SimpleClassNullableOfDurationNullable(this.value); factory SimpleClassNullableOfDurationNullable.fromJson( - Map json) => - _$SimpleClassNullableOfDurationNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfDurationNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfDurationNullableToJson(this); @@ -337,9 +291,7 @@ class SimpleClassNullableOfDurationNullable { class SimpleClassOfDynamic { final Set value; - SimpleClassOfDynamic( - this.value, - ); + SimpleClassOfDynamic(this.value); factory SimpleClassOfDynamic.fromJson(Map json) => _$SimpleClassOfDynamicFromJson(json); @@ -351,9 +303,7 @@ class SimpleClassOfDynamic { class SimpleClassNullableOfDynamic { final Set? value; - SimpleClassNullableOfDynamic( - this.value, - ); + SimpleClassNullableOfDynamic(this.value); factory SimpleClassNullableOfDynamic.fromJson(Map json) => _$SimpleClassNullableOfDynamicFromJson(json); @@ -365,9 +315,7 @@ class SimpleClassNullableOfDynamic { class SimpleClassOfEnumType { final Set value; - SimpleClassOfEnumType( - this.value, - ); + SimpleClassOfEnumType(this.value); factory SimpleClassOfEnumType.fromJson(Map json) => _$SimpleClassOfEnumTypeFromJson(json); @@ -379,9 +327,7 @@ class SimpleClassOfEnumType { class SimpleClassNullableOfEnumType { final Set? value; - SimpleClassNullableOfEnumType( - this.value, - ); + SimpleClassNullableOfEnumType(this.value); factory SimpleClassNullableOfEnumType.fromJson(Map json) => _$SimpleClassNullableOfEnumTypeFromJson(json); @@ -393,9 +339,7 @@ class SimpleClassNullableOfEnumType { class SimpleClassOfEnumTypeNullable { final Set value; - SimpleClassOfEnumTypeNullable( - this.value, - ); + SimpleClassOfEnumTypeNullable(this.value); factory SimpleClassOfEnumTypeNullable.fromJson(Map json) => _$SimpleClassOfEnumTypeNullableFromJson(json); @@ -407,13 +351,11 @@ class SimpleClassOfEnumTypeNullable { class SimpleClassNullableOfEnumTypeNullable { final Set? value; - SimpleClassNullableOfEnumTypeNullable( - this.value, - ); + SimpleClassNullableOfEnumTypeNullable(this.value); factory SimpleClassNullableOfEnumTypeNullable.fromJson( - Map json) => - _$SimpleClassNullableOfEnumTypeNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfEnumTypeNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfEnumTypeNullableToJson(this); @@ -423,13 +365,11 @@ class SimpleClassNullableOfEnumTypeNullable { class SimpleClassOfFromJsonDynamicParam { final Set value; - SimpleClassOfFromJsonDynamicParam( - this.value, - ); + SimpleClassOfFromJsonDynamicParam(this.value); factory SimpleClassOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonDynamicParamToJson(this); @@ -439,13 +379,11 @@ class SimpleClassOfFromJsonDynamicParam { class SimpleClassNullableOfFromJsonDynamicParam { final Set? value; - SimpleClassNullableOfFromJsonDynamicParam( - this.value, - ); + SimpleClassNullableOfFromJsonDynamicParam(this.value); factory SimpleClassNullableOfFromJsonDynamicParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonDynamicParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonDynamicParamToJson(this); @@ -455,13 +393,11 @@ class SimpleClassNullableOfFromJsonDynamicParam { class SimpleClassOfFromJsonNullableObjectParam { final Set value; - SimpleClassOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassOfFromJsonNullableObjectParam(this.value); factory SimpleClassOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonNullableObjectParamToJson(this); @@ -471,13 +407,11 @@ class SimpleClassOfFromJsonNullableObjectParam { class SimpleClassNullableOfFromJsonNullableObjectParam { final Set? value; - SimpleClassNullableOfFromJsonNullableObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonNullableObjectParam(this.value); factory SimpleClassNullableOfFromJsonNullableObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonNullableObjectParamToJson(this); @@ -487,13 +421,11 @@ class SimpleClassNullableOfFromJsonNullableObjectParam { class SimpleClassOfFromJsonObjectParam { final Set value; - SimpleClassOfFromJsonObjectParam( - this.value, - ); + SimpleClassOfFromJsonObjectParam(this.value); factory SimpleClassOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassOfFromJsonObjectParamToJson(this); @@ -503,13 +435,11 @@ class SimpleClassOfFromJsonObjectParam { class SimpleClassNullableOfFromJsonObjectParam { final Set? value; - SimpleClassNullableOfFromJsonObjectParam( - this.value, - ); + SimpleClassNullableOfFromJsonObjectParam(this.value); factory SimpleClassNullableOfFromJsonObjectParam.fromJson( - Map json) => - _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); + Map json, + ) => _$SimpleClassNullableOfFromJsonObjectParamFromJson(json); Map toJson() => _$SimpleClassNullableOfFromJsonObjectParamToJson(this); @@ -519,9 +449,7 @@ class SimpleClassNullableOfFromJsonObjectParam { class SimpleClassOfInt { final Set value; - SimpleClassOfInt( - this.value, - ); + SimpleClassOfInt(this.value); factory SimpleClassOfInt.fromJson(Map json) => _$SimpleClassOfIntFromJson(json); @@ -533,9 +461,7 @@ class SimpleClassOfInt { class SimpleClassNullableOfInt { final Set? value; - SimpleClassNullableOfInt( - this.value, - ); + SimpleClassNullableOfInt(this.value); factory SimpleClassNullableOfInt.fromJson(Map json) => _$SimpleClassNullableOfIntFromJson(json); @@ -547,9 +473,7 @@ class SimpleClassNullableOfInt { class SimpleClassOfIntNullable { final Set value; - SimpleClassOfIntNullable( - this.value, - ); + SimpleClassOfIntNullable(this.value); factory SimpleClassOfIntNullable.fromJson(Map json) => _$SimpleClassOfIntNullableFromJson(json); @@ -561,13 +485,11 @@ class SimpleClassOfIntNullable { class SimpleClassNullableOfIntNullable { final Set? value; - SimpleClassNullableOfIntNullable( - this.value, - ); + SimpleClassNullableOfIntNullable(this.value); factory SimpleClassNullableOfIntNullable.fromJson( - Map json) => - _$SimpleClassNullableOfIntNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfIntNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfIntNullableToJson(this); @@ -577,9 +499,7 @@ class SimpleClassNullableOfIntNullable { class SimpleClassOfNum { final Set value; - SimpleClassOfNum( - this.value, - ); + SimpleClassOfNum(this.value); factory SimpleClassOfNum.fromJson(Map json) => _$SimpleClassOfNumFromJson(json); @@ -591,9 +511,7 @@ class SimpleClassOfNum { class SimpleClassNullableOfNum { final Set? value; - SimpleClassNullableOfNum( - this.value, - ); + SimpleClassNullableOfNum(this.value); factory SimpleClassNullableOfNum.fromJson(Map json) => _$SimpleClassNullableOfNumFromJson(json); @@ -605,9 +523,7 @@ class SimpleClassNullableOfNum { class SimpleClassOfNumNullable { final Set value; - SimpleClassOfNumNullable( - this.value, - ); + SimpleClassOfNumNullable(this.value); factory SimpleClassOfNumNullable.fromJson(Map json) => _$SimpleClassOfNumNullableFromJson(json); @@ -619,13 +535,11 @@ class SimpleClassOfNumNullable { class SimpleClassNullableOfNumNullable { final Set? value; - SimpleClassNullableOfNumNullable( - this.value, - ); + SimpleClassNullableOfNumNullable(this.value); factory SimpleClassNullableOfNumNullable.fromJson( - Map json) => - _$SimpleClassNullableOfNumNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfNumNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfNumNullableToJson(this); @@ -635,9 +549,7 @@ class SimpleClassNullableOfNumNullable { class SimpleClassOfObject { final Set value; - SimpleClassOfObject( - this.value, - ); + SimpleClassOfObject(this.value); factory SimpleClassOfObject.fromJson(Map json) => _$SimpleClassOfObjectFromJson(json); @@ -649,9 +561,7 @@ class SimpleClassOfObject { class SimpleClassNullableOfObject { final Set? value; - SimpleClassNullableOfObject( - this.value, - ); + SimpleClassNullableOfObject(this.value); factory SimpleClassNullableOfObject.fromJson(Map json) => _$SimpleClassNullableOfObjectFromJson(json); @@ -663,9 +573,7 @@ class SimpleClassNullableOfObject { class SimpleClassOfObjectNullable { final Set value; - SimpleClassOfObjectNullable( - this.value, - ); + SimpleClassOfObjectNullable(this.value); factory SimpleClassOfObjectNullable.fromJson(Map json) => _$SimpleClassOfObjectNullableFromJson(json); @@ -677,13 +585,11 @@ class SimpleClassOfObjectNullable { class SimpleClassNullableOfObjectNullable { final Set? value; - SimpleClassNullableOfObjectNullable( - this.value, - ); + SimpleClassNullableOfObjectNullable(this.value); factory SimpleClassNullableOfObjectNullable.fromJson( - Map json) => - _$SimpleClassNullableOfObjectNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfObjectNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfObjectNullableToJson(this); @@ -693,9 +599,7 @@ class SimpleClassNullableOfObjectNullable { class SimpleClassOfRecord { final Set<(int, String, {bool truth})> value; - SimpleClassOfRecord( - this.value, - ); + SimpleClassOfRecord(this.value); factory SimpleClassOfRecord.fromJson(Map json) => _$SimpleClassOfRecordFromJson(json); @@ -707,9 +611,7 @@ class SimpleClassOfRecord { class SimpleClassNullableOfRecord { final Set<(int, String, {bool truth})>? value; - SimpleClassNullableOfRecord( - this.value, - ); + SimpleClassNullableOfRecord(this.value); factory SimpleClassNullableOfRecord.fromJson(Map json) => _$SimpleClassNullableOfRecordFromJson(json); @@ -721,9 +623,7 @@ class SimpleClassNullableOfRecord { class SimpleClassOfString { final Set value; - SimpleClassOfString( - this.value, - ); + SimpleClassOfString(this.value); factory SimpleClassOfString.fromJson(Map json) => _$SimpleClassOfStringFromJson(json); @@ -735,9 +635,7 @@ class SimpleClassOfString { class SimpleClassNullableOfString { final Set? value; - SimpleClassNullableOfString( - this.value, - ); + SimpleClassNullableOfString(this.value); factory SimpleClassNullableOfString.fromJson(Map json) => _$SimpleClassNullableOfStringFromJson(json); @@ -749,9 +647,7 @@ class SimpleClassNullableOfString { class SimpleClassOfStringNullable { final Set value; - SimpleClassOfStringNullable( - this.value, - ); + SimpleClassOfStringNullable(this.value); factory SimpleClassOfStringNullable.fromJson(Map json) => _$SimpleClassOfStringNullableFromJson(json); @@ -763,13 +659,11 @@ class SimpleClassOfStringNullable { class SimpleClassNullableOfStringNullable { final Set? value; - SimpleClassNullableOfStringNullable( - this.value, - ); + SimpleClassNullableOfStringNullable(this.value); factory SimpleClassNullableOfStringNullable.fromJson( - Map json) => - _$SimpleClassNullableOfStringNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfStringNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfStringNullableToJson(this); @@ -779,9 +673,7 @@ class SimpleClassNullableOfStringNullable { class SimpleClassOfUri { final Set value; - SimpleClassOfUri( - this.value, - ); + SimpleClassOfUri(this.value); factory SimpleClassOfUri.fromJson(Map json) => _$SimpleClassOfUriFromJson(json); @@ -793,9 +685,7 @@ class SimpleClassOfUri { class SimpleClassNullableOfUri { final Set? value; - SimpleClassNullableOfUri( - this.value, - ); + SimpleClassNullableOfUri(this.value); factory SimpleClassNullableOfUri.fromJson(Map json) => _$SimpleClassNullableOfUriFromJson(json); @@ -807,9 +697,7 @@ class SimpleClassNullableOfUri { class SimpleClassOfUriNullable { final Set value; - SimpleClassOfUriNullable( - this.value, - ); + SimpleClassOfUriNullable(this.value); factory SimpleClassOfUriNullable.fromJson(Map json) => _$SimpleClassOfUriNullableFromJson(json); @@ -821,13 +709,11 @@ class SimpleClassOfUriNullable { class SimpleClassNullableOfUriNullable { final Set? value; - SimpleClassNullableOfUriNullable( - this.value, - ); + SimpleClassNullableOfUriNullable(this.value); factory SimpleClassNullableOfUriNullable.fromJson( - Map json) => - _$SimpleClassNullableOfUriNullableFromJson(json); + Map json, + ) => _$SimpleClassNullableOfUriNullableFromJson(json); Map toJson() => _$SimpleClassNullableOfUriNullableToJson(this); diff --git a/json_serializable/test/supported_types/input.type_set.g.dart b/json_serializable/test/supported_types/input.type_set.g.dart index 234afad93..f7100e175 100644 --- a/json_serializable/test/supported_types/input.type_set.g.dart +++ b/json_serializable/test/supported_types/input.type_set.g.dart @@ -9,10 +9,9 @@ part of 'input.type_set.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - (json['value'] as List).toSet(), - (json['withDefault'] as List?)?.toSet() ?? - {42, true, false, null}, - ); + (json['value'] as List).toSet(), + (json['withDefault'] as List?)?.toSet() ?? {42, true, false, null}, +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -28,11 +27,11 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.toList(), - 'withDefault': instance.withDefault?.toList(), - }; + SimpleClassNullable instance, +) => { + 'value': instance.value?.toList(), + 'withDefault': instance.withDefault?.toList(), +}; SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => SimpleClassOfBigInt( @@ -42,52 +41,52 @@ SimpleClassOfBigInt _$SimpleClassOfBigIntFromJson(Map json) => ); Map _$SimpleClassOfBigIntToJson( - SimpleClassOfBigInt instance) => - { - 'value': instance.value.map((e) => e.toString()).toList(), - }; + SimpleClassOfBigInt instance, +) => { + 'value': instance.value.map((e) => e.toString()).toList(), +}; SimpleClassNullableOfBigInt _$SimpleClassNullableOfBigIntFromJson( - Map json) => - SimpleClassNullableOfBigInt( - (json['value'] as List?) - ?.map((e) => BigInt.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfBigInt( + (json['value'] as List?) + ?.map((e) => BigInt.parse(e as String)) + .toSet(), +); Map _$SimpleClassNullableOfBigIntToJson( - SimpleClassNullableOfBigInt instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfBigInt instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfBigIntNullable _$SimpleClassOfBigIntNullableFromJson( - Map json) => - SimpleClassOfBigIntNullable( - (json['value'] as List) - .map((e) => e == null ? null : BigInt.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassOfBigIntNullable( + (json['value'] as List) + .map((e) => e == null ? null : BigInt.parse(e as String)) + .toSet(), +); Map _$SimpleClassOfBigIntNullableToJson( - SimpleClassOfBigIntNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfBigIntNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfBigIntNullable - _$SimpleClassNullableOfBigIntNullableFromJson(Map json) => - SimpleClassNullableOfBigIntNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : BigInt.parse(e as String)) - .toSet(), - ); +_$SimpleClassNullableOfBigIntNullableFromJson(Map json) => + SimpleClassNullableOfBigIntNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : BigInt.parse(e as String)) + .toSet(), + ); Map _$SimpleClassNullableOfBigIntNullableToJson( - SimpleClassNullableOfBigIntNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfBigIntNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => SimpleClassOfBool( @@ -95,102 +94,93 @@ SimpleClassOfBool _$SimpleClassOfBoolFromJson(Map json) => ); Map _$SimpleClassOfBoolToJson(SimpleClassOfBool instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfBool _$SimpleClassNullableOfBoolFromJson( - Map json) => - SimpleClassNullableOfBool( - (json['value'] as List?)?.map((e) => e as bool).toSet(), - ); + Map json, +) => SimpleClassNullableOfBool( + (json['value'] as List?)?.map((e) => e as bool).toSet(), +); Map _$SimpleClassNullableOfBoolToJson( - SimpleClassNullableOfBool instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfBool instance, +) => {'value': instance.value?.toList()}; SimpleClassOfBoolNullable _$SimpleClassOfBoolNullableFromJson( - Map json) => - SimpleClassOfBoolNullable( - (json['value'] as List).map((e) => e as bool?).toSet(), - ); + Map json, +) => SimpleClassOfBoolNullable( + (json['value'] as List).map((e) => e as bool?).toSet(), +); Map _$SimpleClassOfBoolNullableToJson( - SimpleClassOfBoolNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfBoolNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfBoolNullable _$SimpleClassNullableOfBoolNullableFromJson( - Map json) => - SimpleClassNullableOfBoolNullable( - (json['value'] as List?)?.map((e) => e as bool?).toSet(), - ); + Map json, +) => SimpleClassNullableOfBoolNullable( + (json['value'] as List?)?.map((e) => e as bool?).toSet(), +); Map _$SimpleClassNullableOfBoolNullableToJson( - SimpleClassNullableOfBoolNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfBoolNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDateTime _$SimpleClassOfDateTimeFromJson( - Map json) => - SimpleClassOfDateTime( - (json['value'] as List) - .map((e) => DateTime.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassOfDateTime( + (json['value'] as List) + .map((e) => DateTime.parse(e as String)) + .toSet(), +); Map _$SimpleClassOfDateTimeToJson( - SimpleClassOfDateTime instance) => - { - 'value': instance.value.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassOfDateTime instance, +) => { + 'value': instance.value.map((e) => e.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTime _$SimpleClassNullableOfDateTimeFromJson( - Map json) => - SimpleClassNullableOfDateTime( - (json['value'] as List?) - ?.map((e) => DateTime.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfDateTime( + (json['value'] as List?) + ?.map((e) => DateTime.parse(e as String)) + .toSet(), +); Map _$SimpleClassNullableOfDateTimeToJson( - SimpleClassNullableOfDateTime instance) => - { - 'value': instance.value?.map((e) => e.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTime instance, +) => { + 'value': instance.value?.map((e) => e.toIso8601String()).toList(), +}; SimpleClassOfDateTimeNullable _$SimpleClassOfDateTimeNullableFromJson( - Map json) => - SimpleClassOfDateTimeNullable( - (json['value'] as List) - .map((e) => e == null ? null : DateTime.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassOfDateTimeNullable( + (json['value'] as List) + .map((e) => e == null ? null : DateTime.parse(e as String)) + .toSet(), +); Map _$SimpleClassOfDateTimeNullableToJson( - SimpleClassOfDateTimeNullable instance) => - { - 'value': instance.value.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassOfDateTimeNullable instance, +) => { + 'value': instance.value.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassNullableOfDateTimeNullable - _$SimpleClassNullableOfDateTimeNullableFromJson( - Map json) => - SimpleClassNullableOfDateTimeNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : DateTime.parse(e as String)) - .toSet(), - ); +_$SimpleClassNullableOfDateTimeNullableFromJson(Map json) => + SimpleClassNullableOfDateTimeNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : DateTime.parse(e as String)) + .toSet(), + ); Map _$SimpleClassNullableOfDateTimeNullableToJson( - SimpleClassNullableOfDateTimeNullable instance) => - { - 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), - }; + SimpleClassNullableOfDateTimeNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toIso8601String()).toList(), +}; SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => SimpleClassOfDouble( @@ -200,149 +190,129 @@ SimpleClassOfDouble _$SimpleClassOfDoubleFromJson(Map json) => ); Map _$SimpleClassOfDoubleToJson( - SimpleClassOfDouble instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDouble instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDouble _$SimpleClassNullableOfDoubleFromJson( - Map json) => - SimpleClassNullableOfDouble( - (json['value'] as List?) - ?.map((e) => (e as num).toDouble()) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfDouble( + (json['value'] as List?)?.map((e) => (e as num).toDouble()).toSet(), +); Map _$SimpleClassNullableOfDoubleToJson( - SimpleClassNullableOfDouble instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDouble instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDoubleNullable _$SimpleClassOfDoubleNullableFromJson( - Map json) => - SimpleClassOfDoubleNullable( - (json['value'] as List) - .map((e) => (e as num?)?.toDouble()) - .toSet(), - ); + Map json, +) => SimpleClassOfDoubleNullable( + (json['value'] as List).map((e) => (e as num?)?.toDouble()).toSet(), +); Map _$SimpleClassOfDoubleNullableToJson( - SimpleClassOfDoubleNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDoubleNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDoubleNullable - _$SimpleClassNullableOfDoubleNullableFromJson(Map json) => - SimpleClassNullableOfDoubleNullable( - (json['value'] as List?) - ?.map((e) => (e as num?)?.toDouble()) - .toSet(), - ); +_$SimpleClassNullableOfDoubleNullableFromJson(Map json) => + SimpleClassNullableOfDoubleNullable( + (json['value'] as List?) + ?.map((e) => (e as num?)?.toDouble()) + .toSet(), + ); Map _$SimpleClassNullableOfDoubleNullableToJson( - SimpleClassNullableOfDoubleNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDoubleNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfDuration _$SimpleClassOfDurationFromJson( - Map json) => - SimpleClassOfDuration( - (json['value'] as List) - .map((e) => Duration(microseconds: (e as num).toInt())) - .toSet(), - ); + Map json, +) => SimpleClassOfDuration( + (json['value'] as List) + .map((e) => Duration(microseconds: (e as num).toInt())) + .toSet(), +); Map _$SimpleClassOfDurationToJson( - SimpleClassOfDuration instance) => - { - 'value': instance.value.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassOfDuration instance, +) => { + 'value': instance.value.map((e) => e.inMicroseconds).toList(), +}; SimpleClassNullableOfDuration _$SimpleClassNullableOfDurationFromJson( - Map json) => - SimpleClassNullableOfDuration( - (json['value'] as List?) - ?.map((e) => Duration(microseconds: (e as num).toInt())) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfDuration( + (json['value'] as List?) + ?.map((e) => Duration(microseconds: (e as num).toInt())) + .toSet(), +); Map _$SimpleClassNullableOfDurationToJson( - SimpleClassNullableOfDuration instance) => - { - 'value': instance.value?.map((e) => e.inMicroseconds).toList(), - }; + SimpleClassNullableOfDuration instance, +) => { + 'value': instance.value?.map((e) => e.inMicroseconds).toList(), +}; SimpleClassOfDurationNullable _$SimpleClassOfDurationNullableFromJson( - Map json) => - SimpleClassOfDurationNullable( - (json['value'] as List) - .map((e) => - e == null ? null : Duration(microseconds: (e as num).toInt())) - .toSet(), - ); + Map json, +) => SimpleClassOfDurationNullable( + (json['value'] as List) + .map((e) => e == null ? null : Duration(microseconds: (e as num).toInt())) + .toSet(), +); Map _$SimpleClassOfDurationNullableToJson( - SimpleClassOfDurationNullable instance) => - { - 'value': instance.value.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassOfDurationNullable instance, +) => { + 'value': instance.value.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassNullableOfDurationNullable - _$SimpleClassNullableOfDurationNullableFromJson( - Map json) => - SimpleClassNullableOfDurationNullable( - (json['value'] as List?) - ?.map((e) => - e == null ? null : Duration(microseconds: (e as num).toInt())) - .toSet(), - ); +_$SimpleClassNullableOfDurationNullableFromJson(Map json) => + SimpleClassNullableOfDurationNullable( + (json['value'] as List?) + ?.map( + (e) => + e == null ? null : Duration(microseconds: (e as num).toInt()), + ) + .toSet(), + ); Map _$SimpleClassNullableOfDurationNullableToJson( - SimpleClassNullableOfDurationNullable instance) => - { - 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), - }; + SimpleClassNullableOfDurationNullable instance, +) => { + 'value': instance.value?.map((e) => e?.inMicroseconds).toList(), +}; SimpleClassOfDynamic _$SimpleClassOfDynamicFromJson( - Map json) => - SimpleClassOfDynamic( - (json['value'] as List).toSet(), - ); + Map json, +) => SimpleClassOfDynamic((json['value'] as List).toSet()); Map _$SimpleClassOfDynamicToJson( - SimpleClassOfDynamic instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfDynamic instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfDynamic _$SimpleClassNullableOfDynamicFromJson( - Map json) => - SimpleClassNullableOfDynamic( - (json['value'] as List?)?.toSet(), - ); + Map json, +) => SimpleClassNullableOfDynamic((json['value'] as List?)?.toSet()); Map _$SimpleClassNullableOfDynamicToJson( - SimpleClassNullableOfDynamic instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfDynamic instance, +) => {'value': instance.value?.toList()}; SimpleClassOfEnumType _$SimpleClassOfEnumTypeFromJson( - Map json) => - SimpleClassOfEnumType( - (json['value'] as List) - .map((e) => $enumDecode(_$EnumTypeEnumMap, e)) - .toSet(), - ); + Map json, +) => SimpleClassOfEnumType( + (json['value'] as List) + .map((e) => $enumDecode(_$EnumTypeEnumMap, e)) + .toSet(), +); Map _$SimpleClassOfEnumTypeToJson( - SimpleClassOfEnumType instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassOfEnumType instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; const _$EnumTypeEnumMap = { EnumType.alpha: 'alpha', @@ -352,135 +322,116 @@ const _$EnumTypeEnumMap = { }; SimpleClassNullableOfEnumType _$SimpleClassNullableOfEnumTypeFromJson( - Map json) => - SimpleClassNullableOfEnumType( - (json['value'] as List?) - ?.map((e) => $enumDecode(_$EnumTypeEnumMap, e)) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfEnumType( + (json['value'] as List?) + ?.map((e) => $enumDecode(_$EnumTypeEnumMap, e)) + .toSet(), +); Map _$SimpleClassNullableOfEnumTypeToJson( - SimpleClassNullableOfEnumType instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), - }; + SimpleClassNullableOfEnumType instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]!).toList(), +}; SimpleClassOfEnumTypeNullable _$SimpleClassOfEnumTypeNullableFromJson( - Map json) => - SimpleClassOfEnumTypeNullable( - (json['value'] as List) - .map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) - .toSet(), - ); + Map json, +) => SimpleClassOfEnumTypeNullable( + (json['value'] as List) + .map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) + .toSet(), +); Map _$SimpleClassOfEnumTypeNullableToJson( - SimpleClassOfEnumTypeNullable instance) => - { - 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassOfEnumTypeNullable instance, +) => { + 'value': instance.value.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassNullableOfEnumTypeNullable - _$SimpleClassNullableOfEnumTypeNullableFromJson( - Map json) => - SimpleClassNullableOfEnumTypeNullable( - (json['value'] as List?) - ?.map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) - .toSet(), - ); +_$SimpleClassNullableOfEnumTypeNullableFromJson(Map json) => + SimpleClassNullableOfEnumTypeNullable( + (json['value'] as List?) + ?.map((e) => $enumDecodeNullable(_$EnumTypeEnumMap, e)) + .toSet(), + ); Map _$SimpleClassNullableOfEnumTypeNullableToJson( - SimpleClassNullableOfEnumTypeNullable instance) => - { - 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), - }; + SimpleClassNullableOfEnumTypeNullable instance, +) => { + 'value': instance.value?.map((e) => _$EnumTypeEnumMap[e]).toList(), +}; SimpleClassOfFromJsonDynamicParam _$SimpleClassOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassOfFromJsonDynamicParam( - (json['value'] as List) - .map(FromJsonDynamicParam.fromJson) - .toSet(), - ); + Map json, +) => SimpleClassOfFromJsonDynamicParam( + (json['value'] as List).map(FromJsonDynamicParam.fromJson).toSet(), +); Map _$SimpleClassOfFromJsonDynamicParamToJson( - SimpleClassOfFromJsonDynamicParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonDynamicParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonDynamicParam - _$SimpleClassNullableOfFromJsonDynamicParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonDynamicParam( - (json['value'] as List?) - ?.map(FromJsonDynamicParam.fromJson) - .toSet(), - ); +_$SimpleClassNullableOfFromJsonDynamicParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonDynamicParam( + (json['value'] as List?)?.map(FromJsonDynamicParam.fromJson).toSet(), +); Map _$SimpleClassNullableOfFromJsonDynamicParamToJson( - SimpleClassNullableOfFromJsonDynamicParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonDynamicParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfFromJsonNullableObjectParam - _$SimpleClassOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonNullableObjectParam( - (json['value'] as List) - .map(FromJsonNullableObjectParam.fromJson) - .toSet(), - ); +_$SimpleClassOfFromJsonNullableObjectParamFromJson(Map json) => + SimpleClassOfFromJsonNullableObjectParam( + (json['value'] as List) + .map(FromJsonNullableObjectParam.fromJson) + .toSet(), + ); Map _$SimpleClassOfFromJsonNullableObjectParamToJson( - SimpleClassOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonNullableObjectParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonNullableObjectParam - _$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonNullableObjectParam( - (json['value'] as List?) - ?.map(FromJsonNullableObjectParam.fromJson) - .toSet(), - ); +_$SimpleClassNullableOfFromJsonNullableObjectParamFromJson( + Map json, +) => SimpleClassNullableOfFromJsonNullableObjectParam( + (json['value'] as List?) + ?.map(FromJsonNullableObjectParam.fromJson) + .toSet(), +); Map _$SimpleClassNullableOfFromJsonNullableObjectParamToJson( - SimpleClassNullableOfFromJsonNullableObjectParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonNullableObjectParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfFromJsonObjectParam _$SimpleClassOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassOfFromJsonObjectParam( - (json['value'] as List) - .map((e) => FromJsonObjectParam.fromJson(e as Object)) - .toSet(), - ); + Map json, +) => SimpleClassOfFromJsonObjectParam( + (json['value'] as List) + .map((e) => FromJsonObjectParam.fromJson(e as Object)) + .toSet(), +); Map _$SimpleClassOfFromJsonObjectParamToJson( - SimpleClassOfFromJsonObjectParam instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfFromJsonObjectParam instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfFromJsonObjectParam - _$SimpleClassNullableOfFromJsonObjectParamFromJson( - Map json) => - SimpleClassNullableOfFromJsonObjectParam( - (json['value'] as List?) - ?.map((e) => FromJsonObjectParam.fromJson(e as Object)) - .toSet(), - ); +_$SimpleClassNullableOfFromJsonObjectParamFromJson(Map json) => + SimpleClassNullableOfFromJsonObjectParam( + (json['value'] as List?) + ?.map((e) => FromJsonObjectParam.fromJson(e as Object)) + .toSet(), + ); Map _$SimpleClassNullableOfFromJsonObjectParamToJson( - SimpleClassNullableOfFromJsonObjectParam instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfFromJsonObjectParam instance, +) => {'value': instance.value?.toList()}; SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => SimpleClassOfInt( @@ -488,47 +439,37 @@ SimpleClassOfInt _$SimpleClassOfIntFromJson(Map json) => ); Map _$SimpleClassOfIntToJson(SimpleClassOfInt instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfInt _$SimpleClassNullableOfIntFromJson( - Map json) => - SimpleClassNullableOfInt( - (json['value'] as List?)?.map((e) => (e as num).toInt()).toSet(), - ); + Map json, +) => SimpleClassNullableOfInt( + (json['value'] as List?)?.map((e) => (e as num).toInt()).toSet(), +); Map _$SimpleClassNullableOfIntToJson( - SimpleClassNullableOfInt instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfInt instance, +) => {'value': instance.value?.toList()}; SimpleClassOfIntNullable _$SimpleClassOfIntNullableFromJson( - Map json) => - SimpleClassOfIntNullable( - (json['value'] as List).map((e) => (e as num?)?.toInt()).toSet(), - ); + Map json, +) => SimpleClassOfIntNullable( + (json['value'] as List).map((e) => (e as num?)?.toInt()).toSet(), +); Map _$SimpleClassOfIntNullableToJson( - SimpleClassOfIntNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfIntNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfIntNullable _$SimpleClassNullableOfIntNullableFromJson( - Map json) => - SimpleClassNullableOfIntNullable( - (json['value'] as List?) - ?.map((e) => (e as num?)?.toInt()) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfIntNullable( + (json['value'] as List?)?.map((e) => (e as num?)?.toInt()).toSet(), +); Map _$SimpleClassNullableOfIntNullableToJson( - SimpleClassNullableOfIntNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfIntNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => SimpleClassOfNum( @@ -536,45 +477,37 @@ SimpleClassOfNum _$SimpleClassOfNumFromJson(Map json) => ); Map _$SimpleClassOfNumToJson(SimpleClassOfNum instance) => - { - 'value': instance.value.toList(), - }; + {'value': instance.value.toList()}; SimpleClassNullableOfNum _$SimpleClassNullableOfNumFromJson( - Map json) => - SimpleClassNullableOfNum( - (json['value'] as List?)?.map((e) => e as num).toSet(), - ); + Map json, +) => SimpleClassNullableOfNum( + (json['value'] as List?)?.map((e) => e as num).toSet(), +); Map _$SimpleClassNullableOfNumToJson( - SimpleClassNullableOfNum instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfNum instance, +) => {'value': instance.value?.toList()}; SimpleClassOfNumNullable _$SimpleClassOfNumNullableFromJson( - Map json) => - SimpleClassOfNumNullable( - (json['value'] as List).map((e) => e as num?).toSet(), - ); + Map json, +) => SimpleClassOfNumNullable( + (json['value'] as List).map((e) => e as num?).toSet(), +); Map _$SimpleClassOfNumNullableToJson( - SimpleClassOfNumNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfNumNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfNumNullable _$SimpleClassNullableOfNumNullableFromJson( - Map json) => - SimpleClassNullableOfNumNullable( - (json['value'] as List?)?.map((e) => e as num?).toSet(), - ); + Map json, +) => SimpleClassNullableOfNumNullable( + (json['value'] as List?)?.map((e) => e as num?).toSet(), +); Map _$SimpleClassNullableOfNumNullableToJson( - SimpleClassNullableOfNumNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfNumNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => SimpleClassOfObject( @@ -582,105 +515,90 @@ SimpleClassOfObject _$SimpleClassOfObjectFromJson(Map json) => ); Map _$SimpleClassOfObjectToJson( - SimpleClassOfObject instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfObject instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfObject _$SimpleClassNullableOfObjectFromJson( - Map json) => - SimpleClassNullableOfObject( - (json['value'] as List?)?.map((e) => e as Object).toSet(), - ); + Map json, +) => SimpleClassNullableOfObject( + (json['value'] as List?)?.map((e) => e as Object).toSet(), +); Map _$SimpleClassNullableOfObjectToJson( - SimpleClassNullableOfObject instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfObject instance, +) => {'value': instance.value?.toList()}; SimpleClassOfObjectNullable _$SimpleClassOfObjectNullableFromJson( - Map json) => - SimpleClassOfObjectNullable( - (json['value'] as List).toSet(), - ); + Map json, +) => SimpleClassOfObjectNullable((json['value'] as List).toSet()); Map _$SimpleClassOfObjectNullableToJson( - SimpleClassOfObjectNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfObjectNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfObjectNullable - _$SimpleClassNullableOfObjectNullableFromJson(Map json) => - SimpleClassNullableOfObjectNullable( - (json['value'] as List?)?.toSet(), - ); +_$SimpleClassNullableOfObjectNullableFromJson(Map json) => + SimpleClassNullableOfObjectNullable( + (json['value'] as List?)?.toSet(), + ); Map _$SimpleClassNullableOfObjectNullableToJson( - SimpleClassNullableOfObjectNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfObjectNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfRecord _$SimpleClassOfRecordFromJson(Map json) => SimpleClassOfRecord( (json['value'] as List) - .map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )) + .map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ) .toSet(), ); Map _$SimpleClassOfRecordToJson( - SimpleClassOfRecord instance) => - { - 'value': instance.value - .map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassOfRecord instance, +) => { + 'value': instance.value + .map((e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}) + .toList(), +}; -$Rec _$recordConvert<$Rec>( - Object? value, - $Rec Function(Map) convert, -) => +$Rec _$recordConvert<$Rec>(Object? value, $Rec Function(Map) convert) => convert(value as Map); SimpleClassNullableOfRecord _$SimpleClassNullableOfRecordFromJson( - Map json) => - SimpleClassNullableOfRecord( - (json['value'] as List?) - ?.map((e) => _$recordConvert( - e, - ($jsonValue) => ( - ($jsonValue[r'$1'] as num).toInt(), - $jsonValue[r'$2'] as String, - truth: $jsonValue['truth'] as bool, - ), - )) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfRecord( + (json['value'] as List?) + ?.map( + (e) => _$recordConvert( + e, + ($jsonValue) => ( + ($jsonValue[r'$1'] as num).toInt(), + $jsonValue[r'$2'] as String, + truth: $jsonValue['truth'] as bool, + ), + ), + ) + .toSet(), +); Map _$SimpleClassNullableOfRecordToJson( - SimpleClassNullableOfRecord instance) => - { - 'value': instance.value - ?.map((e) => { - r'$1': e.$1, - r'$2': e.$2, - 'truth': e.truth, - }) - .toList(), - }; + SimpleClassNullableOfRecord instance, +) => { + 'value': instance.value + ?.map( + (e) => {r'$1': e.$1, r'$2': e.$2, 'truth': e.truth}, + ) + .toList(), +}; SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => SimpleClassOfString( @@ -688,46 +606,38 @@ SimpleClassOfString _$SimpleClassOfStringFromJson(Map json) => ); Map _$SimpleClassOfStringToJson( - SimpleClassOfString instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfString instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfString _$SimpleClassNullableOfStringFromJson( - Map json) => - SimpleClassNullableOfString( - (json['value'] as List?)?.map((e) => e as String).toSet(), - ); + Map json, +) => SimpleClassNullableOfString( + (json['value'] as List?)?.map((e) => e as String).toSet(), +); Map _$SimpleClassNullableOfStringToJson( - SimpleClassNullableOfString instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfString instance, +) => {'value': instance.value?.toList()}; SimpleClassOfStringNullable _$SimpleClassOfStringNullableFromJson( - Map json) => - SimpleClassOfStringNullable( - (json['value'] as List).map((e) => e as String?).toSet(), - ); + Map json, +) => SimpleClassOfStringNullable( + (json['value'] as List).map((e) => e as String?).toSet(), +); Map _$SimpleClassOfStringNullableToJson( - SimpleClassOfStringNullable instance) => - { - 'value': instance.value.toList(), - }; + SimpleClassOfStringNullable instance, +) => {'value': instance.value.toList()}; SimpleClassNullableOfStringNullable - _$SimpleClassNullableOfStringNullableFromJson(Map json) => - SimpleClassNullableOfStringNullable( - (json['value'] as List?)?.map((e) => e as String?).toSet(), - ); +_$SimpleClassNullableOfStringNullableFromJson(Map json) => + SimpleClassNullableOfStringNullable( + (json['value'] as List?)?.map((e) => e as String?).toSet(), + ); Map _$SimpleClassNullableOfStringNullableToJson( - SimpleClassNullableOfStringNullable instance) => - { - 'value': instance.value?.toList(), - }; + SimpleClassNullableOfStringNullable instance, +) => {'value': instance.value?.toList()}; SimpleClassOfUri _$SimpleClassOfUriFromJson(Map json) => SimpleClassOfUri( @@ -742,43 +652,41 @@ Map _$SimpleClassOfUriToJson(SimpleClassOfUri instance) => }; SimpleClassNullableOfUri _$SimpleClassNullableOfUriFromJson( - Map json) => - SimpleClassNullableOfUri( - (json['value'] as List?) - ?.map((e) => Uri.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfUri( + (json['value'] as List?)?.map((e) => Uri.parse(e as String)).toSet(), +); Map _$SimpleClassNullableOfUriToJson( - SimpleClassNullableOfUri instance) => - { - 'value': instance.value?.map((e) => e.toString()).toList(), - }; + SimpleClassNullableOfUri instance, +) => { + 'value': instance.value?.map((e) => e.toString()).toList(), +}; SimpleClassOfUriNullable _$SimpleClassOfUriNullableFromJson( - Map json) => - SimpleClassOfUriNullable( - (json['value'] as List) - .map((e) => e == null ? null : Uri.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassOfUriNullable( + (json['value'] as List) + .map((e) => e == null ? null : Uri.parse(e as String)) + .toSet(), +); Map _$SimpleClassOfUriNullableToJson( - SimpleClassOfUriNullable instance) => - { - 'value': instance.value.map((e) => e?.toString()).toList(), - }; + SimpleClassOfUriNullable instance, +) => { + 'value': instance.value.map((e) => e?.toString()).toList(), +}; SimpleClassNullableOfUriNullable _$SimpleClassNullableOfUriNullableFromJson( - Map json) => - SimpleClassNullableOfUriNullable( - (json['value'] as List?) - ?.map((e) => e == null ? null : Uri.parse(e as String)) - .toSet(), - ); + Map json, +) => SimpleClassNullableOfUriNullable( + (json['value'] as List?) + ?.map((e) => e == null ? null : Uri.parse(e as String)) + .toSet(), +); Map _$SimpleClassNullableOfUriNullableToJson( - SimpleClassNullableOfUriNullable instance) => - { - 'value': instance.value?.map((e) => e?.toString()).toList(), - }; + SimpleClassNullableOfUriNullable instance, +) => { + 'value': instance.value?.map((e) => e?.toString()).toList(), +}; diff --git a/json_serializable/test/supported_types/input.type_string.dart b/json_serializable/test/supported_types/input.type_string.dart index d199b13c0..4931a3af1 100644 --- a/json_serializable/test/supported_types/input.type_string.dart +++ b/json_serializable/test/supported_types/input.type_string.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: 'a string') String withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: 'a string') String? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_string.g.dart b/json_serializable/test/supported_types/input.type_string.g.dart index 6db4a402d..7e69d3b37 100644 --- a/json_serializable/test/supported_types/input.type_string.g.dart +++ b/json_serializable/test/supported_types/input.type_string.g.dart @@ -9,9 +9,9 @@ part of 'input.type_string.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - json['value'] as String, - json['withDefault'] as String? ?? 'a string', - ); + json['value'] as String, + json['withDefault'] as String? ?? 'a string', +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -26,8 +26,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value, - 'withDefault': instance.withDefault, - }; + SimpleClassNullable instance, +) => { + 'value': instance.value, + 'withDefault': instance.withDefault, +}; diff --git a/json_serializable/test/supported_types/input.type_uri.dart b/json_serializable/test/supported_types/input.type_uri.dart index 1be4d40f9..86e13bbc1 100644 --- a/json_serializable/test/supported_types/input.type_uri.dart +++ b/json_serializable/test/supported_types/input.type_uri.dart @@ -13,10 +13,7 @@ class SimpleClass { @JsonKey(defaultValue: _defaultValueFunc) Uri withDefault; - SimpleClass( - this.value, - this.withDefault, - ); + SimpleClass(this.value, this.withDefault); factory SimpleClass.fromJson(Map json) => _$SimpleClassFromJson(json); @@ -31,10 +28,7 @@ class SimpleClassNullable { @JsonKey(defaultValue: _defaultValueFunc) Uri? withDefault; - SimpleClassNullable( - this.value, - this.withDefault, - ); + SimpleClassNullable(this.value, this.withDefault); factory SimpleClassNullable.fromJson(Map json) => _$SimpleClassNullableFromJson(json); diff --git a/json_serializable/test/supported_types/input.type_uri.g.dart b/json_serializable/test/supported_types/input.type_uri.g.dart index b13890e87..33b5951d8 100644 --- a/json_serializable/test/supported_types/input.type_uri.g.dart +++ b/json_serializable/test/supported_types/input.type_uri.g.dart @@ -9,11 +9,11 @@ part of 'input.type_uri.dart'; // ************************************************************************** SimpleClass _$SimpleClassFromJson(Map json) => SimpleClass( - Uri.parse(json['value'] as String), - json['withDefault'] == null - ? _defaultValueFunc() - : Uri.parse(json['withDefault'] as String), - ); + Uri.parse(json['value'] as String), + json['withDefault'] == null + ? _defaultValueFunc() + : Uri.parse(json['withDefault'] as String), +); Map _$SimpleClassToJson(SimpleClass instance) => { @@ -30,8 +30,8 @@ SimpleClassNullable _$SimpleClassNullableFromJson(Map json) => ); Map _$SimpleClassNullableToJson( - SimpleClassNullable instance) => - { - 'value': instance.value?.toString(), - 'withDefault': instance.withDefault?.toString(), - }; + SimpleClassNullable instance, +) => { + 'value': instance.value?.toString(), + 'withDefault': instance.withDefault?.toString(), +}; diff --git a/json_serializable/test/supported_types/support_types_extra_test.dart b/json_serializable/test/supported_types/support_types_extra_test.dart index 4a02b2ade..ada23d236 100644 --- a/json_serializable/test/supported_types/support_types_extra_test.dart +++ b/json_serializable/test/supported_types/support_types_extra_test.dart @@ -12,10 +12,7 @@ import 'input.type_map.dart'; void main() { test('SimpleClassOfStringToDouble', () { const value = { - 'value': { - 'double': 1.0, - 'int': 1, - } + 'value': {'double': 1.0, 'int': 1}, }; final object = SimpleClassOfStringToDouble.fromJson(value); @@ -28,7 +25,7 @@ void main() { 'double': 1.0, // Note! Encoded as a double on output! 'int': 1.0, - } + }, }), ); @@ -40,9 +37,7 @@ void main() { test('SimpleClassOfStringToInt', () { const value = { - 'value': { - 'int': 1, - } + 'value': {'int': 1}, }; final object = SimpleClassOfStringToInt.fromJson(value); @@ -58,10 +53,7 @@ void main() { test('SimpleClassOfStringToNum', () { const value = { - 'value': { - 'double': 1.0, - 'int': 1, - } + 'value': {'double': 1.0, 'int': 1}, }; final object = SimpleClassOfStringToNum.fromJson(value); @@ -78,12 +70,8 @@ void main() { test('SimpleClassOfStringToRecord', () { const value = { 'value': { - 'key': { - r'$1': 1, - r'$2': 'string', - 'truth': false, - } - } + 'key': {r'$1': 1, r'$2': 'string', 'truth': false}, + }, }; final object = SimpleClassOfStringToRecord.fromJson(value); diff --git a/json_serializable/test/supported_types/type_test.bigint_test.dart b/json_serializable/test/supported_types/type_test.bigint_test.dart index 83cfa4031..b7af11dae 100644 --- a/json_serializable/test/supported_types/type_test.bigint_test.dart +++ b/json_serializable/test/supported_types/type_test.bigint_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = '12345'; const _altValue = '67890'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.bool_test.dart b/json_serializable/test/supported_types/type_test.bool_test.dart index dc28ab84c..fd5492a3c 100644 --- a/json_serializable/test/supported_types/type_test.bool_test.dart +++ b/json_serializable/test/supported_types/type_test.bool_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = true; const _altValue = false; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.dart b/json_serializable/test/supported_types/type_test.dart index 7cc6fc069..e65d9a7b3 100644 --- a/json_serializable/test/supported_types/type_test.dart +++ b/json_serializable/test/supported_types/type_test.dart @@ -55,21 +55,10 @@ void main() { const _defaultValue = 42; const _altValue = 43; -final _defaultInput = { - 'value': _defaultValue, -}; - -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; - -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; - -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _defaultInput = {'value': _defaultValue}; + +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; + +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; + +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.datetime_test.dart b/json_serializable/test/supported_types/type_test.datetime_test.dart index 88d5f53db..495e5ab74 100644 --- a/json_serializable/test/supported_types/type_test.datetime_test.dart +++ b/json_serializable/test/supported_types/type_test.datetime_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = '2020-01-01T00:00:00.000'; const _altValue = '2018-01-01T00:00:00.000'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.double_test.dart b/json_serializable/test/supported_types/type_test.double_test.dart index 5a55d9c93..bf3ebdb02 100644 --- a/json_serializable/test/supported_types/type_test.double_test.dart +++ b/json_serializable/test/supported_types/type_test.double_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 3.14; const _altValue = 6.28; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.duration_test.dart b/json_serializable/test/supported_types/type_test.duration_test.dart index 4d5f71814..3a5ca238b 100644 --- a/json_serializable/test/supported_types/type_test.duration_test.dart +++ b/json_serializable/test/supported_types/type_test.duration_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,18 +86,10 @@ void main() { const _defaultValue = 1234; const _altValue = 2345; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, -}; +final _nullableDefaultOutput = {'value': null}; -final _nonDefaultJson = { - 'value': _altValue, -}; +final _nonDefaultJson = {'value': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.enumtype_test.dart b/json_serializable/test/supported_types/type_test.enumtype_test.dart index 363d1ab9a..d16fa7651 100644 --- a/json_serializable/test/supported_types/type_test.enumtype_test.dart +++ b/json_serializable/test/supported_types/type_test.enumtype_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsArgumentError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsArgumentError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 'alpha'; const _altValue = 'beta'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.int_test.dart b/json_serializable/test/supported_types/type_test.int_test.dart index 4e8c0cb27..e3ef71a68 100644 --- a/json_serializable/test/supported_types/type_test.int_test.dart +++ b/json_serializable/test/supported_types/type_test.int_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 42; const _altValue = 43; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.iterable_test.dart b/json_serializable/test/supported_types/type_test.iterable_test.dart index 1a2ae5960..81cab5c49 100644 --- a/json_serializable/test/supported_types/type_test.iterable_test.dart +++ b/json_serializable/test/supported_types/type_test.iterable_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = [42, true, false, null]; const _altValue = [43, false]; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.list_test.dart b/json_serializable/test/supported_types/type_test.list_test.dart index 36e673318..74c165a28 100644 --- a/json_serializable/test/supported_types/type_test.list_test.dart +++ b/json_serializable/test/supported_types/type_test.list_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = [42, true, false, null]; const _altValue = [43, false]; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.map_test.dart b/json_serializable/test/supported_types/type_test.map_test.dart index 925f233c2..ea4b475e1 100644 --- a/json_serializable/test/supported_types/type_test.map_test.dart +++ b/json_serializable/test/supported_types/type_test.map_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = {'a': 1}; const _altValue = {'b': 2}; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.num_test.dart b/json_serializable/test/supported_types/type_test.num_test.dart index 8489d5ff7..b365ac6c4 100644 --- a/json_serializable/test/supported_types/type_test.num_test.dart +++ b/json_serializable/test/supported_types/type_test.num_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 88.6; const _altValue = 29; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.object_test.dart b/json_serializable/test/supported_types/type_test.object_test.dart index 5cad9da25..29fcabb63 100644 --- a/json_serializable/test/supported_types/type_test.object_test.dart +++ b/json_serializable/test/supported_types/type_test.object_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 'o1'; const _altValue = 'o2'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.set_test.dart b/json_serializable/test/supported_types/type_test.set_test.dart index b0af7da12..293f87be9 100644 --- a/json_serializable/test/supported_types/type_test.set_test.dart +++ b/json_serializable/test/supported_types/type_test.set_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = [42, true, false, null]; const _altValue = [43, false]; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.string_test.dart b/json_serializable/test/supported_types/type_test.string_test.dart index 2943b4424..4eaee4811 100644 --- a/json_serializable/test/supported_types/type_test.string_test.dart +++ b/json_serializable/test/supported_types/type_test.string_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 'a string'; const _altValue = 'another string'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/test/supported_types/type_test.uri_test.dart b/json_serializable/test/supported_types/type_test.uri_test.dart index 1d69a3c6f..5dc504981 100644 --- a/json_serializable/test/supported_types/type_test.uri_test.dart +++ b/json_serializable/test/supported_types/type_test.uri_test.dart @@ -27,10 +27,7 @@ void main() { }); test('round trip null', () { - expect( - () => loudEncode(SimpleClass.fromJson({})), - throwsTypeError, - ); + expect(() => loudEncode(SimpleClass.fromJson({})), throwsTypeError); }); test('round trip alternate values', () { @@ -89,21 +86,10 @@ void main() { const _defaultValue = 'https://example.com'; const _altValue = 'https://dart.dev'; -final _defaultInput = { - 'value': _defaultValue, -}; +final _defaultInput = {'value': _defaultValue}; -final _defaultOutput = { - 'value': _defaultValue, - 'withDefault': _defaultValue, -}; +final _defaultOutput = {'value': _defaultValue, 'withDefault': _defaultValue}; -final _nullableDefaultOutput = { - 'value': null, - 'withDefault': _defaultValue, -}; +final _nullableDefaultOutput = {'value': null, 'withDefault': _defaultValue}; -final _nonDefaultJson = { - 'value': _altValue, - 'withDefault': _altValue, -}; +final _nonDefaultJson = {'value': _altValue, 'withDefault': _altValue}; diff --git a/json_serializable/tool/field_matrix_builder.dart b/json_serializable/tool/field_matrix_builder.dart index 32084658b..9455f2cb7 100644 --- a/json_serializable/tool/field_matrix_builder.dart +++ b/json_serializable/tool/field_matrix_builder.dart @@ -32,7 +32,8 @@ part '$inputBaseName.field_matrix.g.dart'; for (var isPublic in [true, false]) { for (var includeToJson in [null, true, false]) { for (var includeFromJson in [null, true, false]) { - final className = 'ToJson${includeToJson.toString().pascal}' + final className = + 'ToJson${includeToJson.toString().pascal}' 'FromJson${includeFromJson.toString().pascal}' '${isPublic ? 'Public' : 'Private'}'; @@ -46,8 +47,9 @@ part '$inputBaseName.field_matrix.g.dart'; if (!isPublic) "name: 'field'", ]; - final fieldAnnotation = - bits.isEmpty ? '' : '@JsonKey(${bits.join()})'; + final fieldAnnotation = bits.isEmpty + ? '' + : '@JsonKey(${bits.join()})'; content.writeln(''' @JsonSerializable() @@ -85,6 +87,6 @@ const fromJsonFactories = )>{ @override Map> get buildExtensions => const { - '.dart': ['.field_matrix.dart'], - }; + '.dart': ['.field_matrix.dart'], + }; } diff --git a/json_serializable/tool/readme/readme_examples.dart b/json_serializable/tool/readme/readme_examples.dart index 0abc70fc5..0c684bcaa 100644 --- a/json_serializable/tool/readme/readme_examples.dart +++ b/json_serializable/tool/readme/readme_examples.dart @@ -63,10 +63,7 @@ class Sample3 { factory Sample3.fromJson(Map json) => _$Sample3FromJson(json); - @JsonKey( - toJson: _toJson, - fromJson: _fromJson, - ) + @JsonKey(toJson: _toJson, fromJson: _fromJson) final DateTime value; Map toJson() => _$Sample3ToJson(this); diff --git a/json_serializable/tool/readme/readme_examples.g.dart b/json_serializable/tool/readme/readme_examples.g.dart index b3a60ab36..5390b6d59 100644 --- a/json_serializable/tool/readme/readme_examples.g.dart +++ b/json_serializable/tool/readme/readme_examples.g.dart @@ -8,26 +8,24 @@ part of 'readme_examples.dart'; // JsonSerializableGenerator // ************************************************************************** -Sample1 _$Sample1FromJson(Map json) => Sample1( - Sample2.fromJson((json['value'] as num).toInt()), - ); +Sample1 _$Sample1FromJson(Map json) => + Sample1(Sample2.fromJson((json['value'] as num).toInt())); Map _$Sample1ToJson(Sample1 instance) => { - 'value': instance.value, - }; + 'value': instance.value, +}; -Sample3 _$Sample3FromJson(Map json) => Sample3( - Sample3._fromJson((json['value'] as num).toInt()), - ); +Sample3 _$Sample3FromJson(Map json) => + Sample3(Sample3._fromJson((json['value'] as num).toInt())); Map _$Sample3ToJson(Sample3 instance) => { - 'value': Sample3._toJson(instance.value), - }; + 'value': Sample3._toJson(instance.value), +}; Sample4 _$Sample4FromJson(Map json) => Sample4( - const EpochDateTimeConverter().fromJson((json['value'] as num).toInt()), - ); + const EpochDateTimeConverter().fromJson((json['value'] as num).toInt()), +); Map _$Sample4ToJson(Sample4 instance) => { - 'value': const EpochDateTimeConverter().toJson(instance.value), - }; + 'value': const EpochDateTimeConverter().toJson(instance.value), +}; diff --git a/json_serializable/tool/readme_builder.dart b/json_serializable/tool/readme_builder.dart index 1de8c6398..3709ee017 100644 --- a/json_serializable/tool/readme_builder.dart +++ b/json_serializable/tool/readme_builder.dart @@ -18,8 +18,9 @@ Builder readmeBuilder([BuilderOptions? _]) => _ReadmeBuilder(); class _ReadmeBuilder extends Builder { @override FutureOr build(BuildStep buildStep) async { - final templateAssetId = - buildStep.assetIdForInputPackage('tool/readme/readme_template.md'); + final templateAssetId = buildStep.assetIdForInputPackage( + 'tool/readme/readme_template.md', + ); final replacements = { ...await buildStep.getExampleContent('example/example.dart'), @@ -38,8 +39,8 @@ class _ReadmeBuilder extends Builder { String jsonAnnotationUri(String className, [String? member]) => member == null - ? '$jsonAnnotationBaseUri/$className-class.html' - : '$jsonAnnotationBaseUri/$className/$member.html'; + ? '$jsonAnnotationBaseUri/$className-class.html' + : '$jsonAnnotationBaseUri/$className/$member.html'; final foundClasses = SplayTreeMap(compareAsciiLowerCase); @@ -62,11 +63,11 @@ class _ReadmeBuilder extends Builder { linkValue = switch (context) { 'core' => _coreTypeUri(className), 'ja' => jsonAnnotationUri(className, memberName?.substring(1)), - _ => 'https://unknown.com/$context/$className' + _ => 'https://unknown.com/$context/$className', }; foundClasses[linkContent] = linkValue; return linkContent; - } + }, }; var content = (await buildStep.readAsString(templateAssetId)).trim(); @@ -81,7 +82,8 @@ class _ReadmeBuilder extends Builder { ); } - content = ''' + content = + ''' $content ${foundClasses.entries.map((e) => '${e.key}: ${e.value}').join('\n')} @@ -95,7 +97,7 @@ ${foundClasses.entries.map((e) => '${e.key}: ${e.value}').join('\n')} @override final buildExtensions = const { - _templatePath: [_readmePath] + _templatePath: [_readmePath], }; } @@ -106,13 +108,14 @@ String _coreTypeUri(String type) => 'https://api.dart.dev/dart-core/$type-class.html'; String _classCleanAndSort(Iterable classes) { - final initial = (classes.map((e) => e == customEnumType ? 'Enum' : e).toList() - ..sort(compareAsciiLowerCase)) - // Dropping `dynamic` – it's not linkable! - .where((element) => element != 'dynamic') - // Start by mapping to the output format – so we wrap correctly - .map((e) => '[`$e`]') - .join(', '); + final initial = + (classes.map((e) => e == customEnumType ? 'Enum' : e).toList() + ..sort(compareAsciiLowerCase)) + // Dropping `dynamic` – it's not linkable! + .where((element) => element != 'dynamic') + // Start by mapping to the output format – so we wrap correctly + .map((e) => '[`$e`]') + .join(', '); if (initial.length <= 80) { return initial; @@ -143,7 +146,9 @@ String _classCleanAndSort(Iterable classes) { lines.add(currentLine); } - return lines.join('\n').replaceAllMapped( + return lines + .join('\n') + .replaceAllMapped( // Now put in the core: logic so we autolink correctly RegExp(r'\[`(\w+)`\]'), (match) => '`core:${match[1]}`', @@ -154,16 +159,24 @@ extension on BuildStep { AssetId assetIdForInputPackage(String path) => AssetId(inputId.package, path); Future jsonAnnotationVersion() async { - final jsonAnnotationPubspecAssetId = - AssetId('json_annotation', 'pubspec.yaml'); - final jsonAnnotationPubspecContent = - await readAsString(jsonAnnotationPubspecAssetId); - final pubspecYaml = loadYaml(jsonAnnotationPubspecContent, - sourceUrl: jsonAnnotationPubspecAssetId.uri) as YamlMap; + final jsonAnnotationPubspecAssetId = AssetId( + 'json_annotation', + 'pubspec.yaml', + ); + final jsonAnnotationPubspecContent = await readAsString( + jsonAnnotationPubspecAssetId, + ); + final pubspecYaml = + loadYaml( + jsonAnnotationPubspecContent, + sourceUrl: jsonAnnotationPubspecAssetId.uri, + ) + as YamlMap; final jsonAnnotationVersionString = pubspecYaml['version'] as String; - final jsonAnnotationVersion = - Version.parse(jsonAnnotationVersionString.trim()); + final jsonAnnotationVersion = Version.parse( + jsonAnnotationVersionString.trim(), + ); final targetVersion = jsonAnnotationVersion.isPreRelease ? 'latest' @@ -173,9 +186,7 @@ extension on BuildStep { } Future> getExampleContent(String fileName) async { - final content = await readAsString( - assetIdForInputPackage(fileName), - ); + final content = await readAsString(assetIdForInputPackage(fileName)); final lines = LineSplitter.split(content); @@ -249,12 +260,11 @@ extension on BuildStep { if (currentBlock != null) finishBlock(); - return result - .map((key, value) => MapEntry('$fileName-$key', value.dartBlock)); + return result.map( + (key, value) => MapEntry('$fileName-$key', value.dartBlock), + ); } else { - return { - fileName: cleanedSourceLines.join('\n').dartBlock, - }; + return {fileName: cleanedSourceLines.join('\n').dartBlock}; } } } @@ -270,7 +280,8 @@ extension on String { return substring(start).trim(); } - String get dartBlock => ''' + String get dartBlock => + ''' ```dart ${trim()} ```'''; diff --git a/json_serializable/tool/shared.dart b/json_serializable/tool/shared.dart index 265031a22..ca7068d4c 100644 --- a/json_serializable/tool/shared.dart +++ b/json_serializable/tool/shared.dart @@ -11,10 +11,12 @@ import 'package:yaml/yaml.dart'; // Until we have verification in pkg:build and friends // https://github.com/dart-lang/build/issues/590 Builder validate(String builderName, Builder builder) { - var buildYaml = loadYaml( - File('build.yaml').readAsStringSync(), - sourceUrl: Uri.parse('build.yaml'), - ) as YamlMap; + var buildYaml = + loadYaml( + File('build.yaml').readAsStringSync(), + sourceUrl: Uri.parse('build.yaml'), + ) + as YamlMap; for (var key in ['builders', builderName, 'build_extensions']) { buildYaml = buildYaml[key] as YamlMap; @@ -50,8 +52,8 @@ class Replacement { const Replacement(this.existing, this.replacement); const Replacement.addJsonSerializableKey(String key, bool value) - : existing = '@JsonSerializable(', - replacement = '@JsonSerializable(\n $key: $value,'; + : existing = '@JsonSerializable(', + replacement = '@JsonSerializable(\n $key: $value,'; static String generate( String inputContent, @@ -73,5 +75,6 @@ class Replacement { extension BuildStepExtension on BuildStep { Future formatter() async => DartFormatter( - languageVersion: (await inputLibrary).languageVersion.effective); + languageVersion: (await inputLibrary).languageVersion.effective, + ); } diff --git a/json_serializable/tool/test_builder.dart b/json_serializable/tool/test_builder.dart index 8f742241c..4e325882a 100644 --- a/json_serializable/tool/test_builder.dart +++ b/json_serializable/tool/test_builder.dart @@ -36,15 +36,17 @@ class _TestBuilder implements Builder { Replacement( "part '$baseName.g.dart';", "part '$baseName$partName.g.dart';", - ) + ), ]; if (baseName == _kitchenSinkBaseName) { final description = _configToName(config.toSet()); - replacements.add(Replacement( - "String get description => '--defaults--';", - "String get description => '$description';", - )); + replacements.add( + Replacement( + "String get description => '--defaults--';", + "String get description => '$description';", + ), + ); factories['$baseName$partName.dart'] = description; } @@ -77,24 +79,24 @@ class _TestBuilder implements Builder { } @override - Map> get buildExtensions => - {'.dart': _fileConfigurations}; + Map> get buildExtensions => { + '.dart': _fileConfigurations, + }; } const _configReplacements = { 'any_map': Replacement.addJsonSerializableKey('anyMap', true), 'checked': Replacement.addJsonSerializableKey('checked', true), - 'explicit_to_json': - Replacement.addJsonSerializableKey('explicitToJson', true), + 'explicit_to_json': Replacement.addJsonSerializableKey( + 'explicitToJson', + true, + ), 'exclude_null': Replacement.addJsonSerializableKey('includeIfNull', false), }; const _kitchenSinkReplacements = { 'any_map': [ - Replacement( - 'bool get anyMap => false;', - 'bool get anyMap => true;', - ), + Replacement('bool get anyMap => false;', 'bool get anyMap => true;'), Replacement( 'class _Factory implements k.KitchenSinkFactory', 'class _Factory implements k.KitchenSinkFactory', @@ -109,10 +111,7 @@ const _kitchenSinkReplacements = { ), ], 'checked': [ - Replacement( - 'bool get checked => false;', - 'bool get checked => true;', - ) + Replacement('bool get checked => false;', 'bool get checked => true;'), ], 'exclude_null': [ Replacement( @@ -135,7 +134,9 @@ const _kitchenSinkReplacements = { }; Iterable _optionReplacement( - String baseName, String optionKey) sync* { + String baseName, + String optionKey, +) sync* { final value = _configReplacements[optionKey]; if (value == null) { log.warning('no replacement thingy for `$optionKey`.'); @@ -155,13 +156,14 @@ String _configToExtension(Iterable config) => String _configToName(Set config) => (config.toList()..sort()).join('__'); -List get _fileConfigurations => _fileConfigurationMap.values - .expand((v) => v) - .map(_configToExtension) - .followedBy(['.factories.dart']) - .toSet() - .toList() - ..sort(); +List get _fileConfigurations => + _fileConfigurationMap.values + .expand((v) => v) + .map(_configToExtension) + .followedBy(['.factories.dart']) + .toSet() + .toList() + ..sort(); const _kitchenSinkBaseName = 'kitchen_sink'; diff --git a/json_serializable/tool/test_type_builder.dart b/json_serializable/tool/test_type_builder.dart index 2c23c8d3a..54ef05688 100644 --- a/json_serializable/tool/test_type_builder.dart +++ b/json_serializable/tool/test_type_builder.dart @@ -16,39 +16,21 @@ const _trivialTypesToTest = { jsonExpression: "'12345'", altJsonExpression: "'67890'", ), - 'bool': TestTypeData( - defaultExpression: 'true', - altJsonExpression: 'false', - ), + 'bool': TestTypeData(defaultExpression: 'true', altJsonExpression: 'false'), 'DateTime': TestTypeData.defaultFunc( jsonExpression: "'2020-01-01T00:00:00.000'", altJsonExpression: "'2018-01-01T00:00:00.000'", ), - 'double': TestTypeData( - defaultExpression: '3.14', - altJsonExpression: '6.28', - ), - 'Duration': TestTypeData( - jsonExpression: '1234', - altJsonExpression: '2345', - ), + 'double': TestTypeData(defaultExpression: '3.14', altJsonExpression: '6.28'), + 'Duration': TestTypeData(jsonExpression: '1234', altJsonExpression: '2345'), customEnumType: TestTypeData( defaultExpression: '$customEnumType.alpha', jsonExpression: "'alpha'", altJsonExpression: "'beta'", ), - 'int': TestTypeData( - defaultExpression: '42', - altJsonExpression: '43', - ), - 'num': TestTypeData( - defaultExpression: '88.6', - altJsonExpression: '29', - ), - 'Object': TestTypeData( - defaultExpression: "'o1'", - altJsonExpression: "'o2'", - ), + 'int': TestTypeData(defaultExpression: '42', altJsonExpression: '43'), + 'num': TestTypeData(defaultExpression: '88.6', altJsonExpression: '29'), + 'Object': TestTypeData(defaultExpression: "'o1'", altJsonExpression: "'o2'"), 'String': TestTypeData( defaultExpression: "'a string'", altJsonExpression: "'another string'", @@ -90,13 +72,10 @@ final _collectionTypes = { recordType: TestTypeData( altJsonExpression: '{}', genericArgs: _iterableGenericArgs, - ) + ), }; -final _allTypes = { - ..._trivialTypesToTest, - ..._collectionTypes, -}; +final _allTypes = {..._trivialTypesToTest, ..._collectionTypes}; final _typesToTest = Map.of(_allTypes)..remove(recordType); @@ -112,8 +91,7 @@ final _iterableGenericArgs = ([ 'FromJsonObjectParam', 'dynamic', recordType, -]..sort(compareAsciiLowerCase)) - .toSet(); +]..sort(compareAsciiLowerCase)).toSet(); const _defaultCollectionExpressions = '42, true, false, null'; const _altCollectionExpressions = '43, false'; @@ -144,8 +122,9 @@ class _TypeBuilder implements Builder { } @override - Map> get buildExtensions => - {'.dart': _allTypes.keys.map(toTypeExtension).toSet().toList()..sort()}; + Map> get buildExtensions => { + '.dart': _allTypes.keys.map(toTypeExtension).toSet().toList()..sort(), + }; } Builder typeTestBuilder([BuilderOptions? _]) => @@ -162,8 +141,9 @@ class _TypeTestBuilder implements Builder { for (var entry in _typesToTest.entries) { final type = entry.key; - final newId = - buildStep.inputId.changeExtension(_toTypeTestExtension(type)); + final newId = buildStep.inputId.changeExtension( + _toTypeTestExtension(type), + ); await buildStep.writeAsString( newId, @@ -174,9 +154,9 @@ class _TypeTestBuilder implements Builder { @override Map> get buildExtensions => { - '.dart': _typesToTest.keys.map(_toTypeTestExtension).toSet().toList() - ..sort() - }; + '.dart': _typesToTest.keys.map(_toTypeTestExtension).toSet().toList() + ..sort(), + }; } String _toTypeTestExtension(String e) => '.${typeToPathPart(e)}_test.dart'; diff --git a/json_serializable/tool/test_type_data.dart b/json_serializable/tool/test_type_data.dart index 6d785a448..dd09e8bb0 100644 --- a/json_serializable/tool/test_type_data.dart +++ b/json_serializable/tool/test_type_data.dart @@ -1,3 +1,6 @@ +import 'package:dart_style/dart_style.dart'; +import 'package:pub_semver/pub_semver.dart'; + import 'shared.dart'; const customEnumType = 'EnumType'; @@ -19,18 +22,18 @@ class TestTypeData { String? jsonExpression, required String? altJsonExpression, this.genericArgs = const {}, - }) : jsonExpression = jsonExpression ?? defaultExpression, - altJsonExpression = - altJsonExpression ?? jsonExpression ?? defaultExpression, - stringParseType = false; + }) : jsonExpression = jsonExpression ?? defaultExpression, + altJsonExpression = + altJsonExpression ?? jsonExpression ?? defaultExpression, + stringParseType = false; const TestTypeData.defaultFunc({ this.jsonExpression, required String? altJsonExpression, - }) : altJsonExpression = altJsonExpression ?? jsonExpression, - genericArgs = const {}, - defaultExpression = null, - stringParseType = true; + }) : altJsonExpression = altJsonExpression ?? jsonExpression, + genericArgs = const {}, + defaultExpression = null, + stringParseType = true; String libContent(String source, String type) { const classAnnotationSplit = '@JsonSerializable()'; @@ -49,14 +52,12 @@ class TestTypeData { '$_annotationImport' "import 'enum_type.dart';", ), - Replacement( - "part 'input.g.dart';", - "part 'input$newPart.g.dart';", - ) + Replacement("part 'input.g.dart';", "part 'input$newPart.g.dart';"), ]; - final buffer = - StringBuffer(Replacement.generate(split[0], headerReplacements)); + final buffer = StringBuffer( + Replacement.generate(split[0], headerReplacements), + ); if (type == recordType) { buffer.writeln('typedef RecordTypeDef = ();'); @@ -75,10 +76,7 @@ class TestTypeData { ) ..write( Replacement.generate( - simpleClassContent.replaceAll( - 'SimpleClass', - 'SimpleClassNullable', - ), + simpleClassContent.replaceAll('SimpleClass', 'SimpleClassNullable'), _libReplacements('$simpleLiteral?'), ), ); @@ -101,8 +99,9 @@ class TestTypeData { ',$sampleRecordDefinition', ); - final genericType = - type == recordType ? '${theName}TypeDef' : '$type<$genericArgFixed>'; + final genericType = type == recordType + ? '${theName}TypeDef' + : '$type<$genericArgFixed>'; if (type == recordType) { buffer.writeln( @@ -114,10 +113,7 @@ class TestTypeData { buffer ..write( Replacement.generate( - simpleClassContent.replaceAll( - 'SimpleClass', - theName, - ), + simpleClassContent.replaceAll('SimpleClass', theName), _libReplacements(genericType), ), ) @@ -158,33 +154,25 @@ class TestTypeData { } Iterable _libReplacements(String type) sync* { - yield Replacement( - 'final dynamic value;', - 'final $type value;', - ); + yield Replacement('final dynamic value;', 'final $type value;'); final defaultNotSupported = - _annotationDefaultValue == null // no default provided + _annotationDefaultValue == + null // no default provided || - type.contains('<') // no support for default values and generic args + type.contains('<') // no support for default values and generic args ; final defaultReplacement = defaultNotSupported ? '' : _defaultSource - .replaceFirst('42', _annotationDefaultValue!) - .replaceFirst('dynamic', type); + .replaceFirst('42', _annotationDefaultValue!) + .replaceFirst('dynamic', type); - yield Replacement( - _defaultSource, - defaultReplacement, - ); + yield Replacement(_defaultSource, defaultReplacement); if (defaultNotSupported) { - yield const Replacement( - ' this.withDefault,', - '', - ); + yield const Replacement('this.withDefault', ''); } } @@ -201,8 +189,9 @@ class TestTypeData { .replaceAll('non-nullable', 'nullable') .replaceAll('SimpleClass', 'SimpleClassNullable'); - final thrownError = - type == customEnumType ? 'throwsArgumentError' : 'throwsTypeError'; + final thrownError = type == customEnumType + ? 'throwsArgumentError' + : 'throwsTypeError'; final newGroupContent = groupContent.replaceAll( r''' @@ -228,10 +217,12 @@ class TestTypeData { sourceContent.substring(endIndex), ].join(); - return Replacement.generate( + final value = Replacement.generate( updatedSourceContent, _testReplacements(type), ); + + return _formatter.format(value); } Iterable _testReplacements(String type) sync* { @@ -252,14 +243,8 @@ const _altValue = $altJsonExpression; ); if (defaultExpression == null && !stringParseType) { - yield const Replacement( - " 'withDefault': _defaultValue,\n", - '', - ); - yield const Replacement( - " 'withDefault': _altValue,\n", - '', - ); + yield const Replacement("'withDefault': _defaultValue", ''); + yield const Replacement("'withDefault': _altValue", ''); } } @@ -270,13 +255,16 @@ const _altValue = $altJsonExpression; '''; } +final _formatter = DartFormatter( + languageVersion: + // Using parse here so searching for the version string is easier! + Version.parse('3.8.0'), +); + String _genericClassPart(String genericArg) => genericArg .replaceAll('?', 'Nullable') .split(',') - .map((e) => [ - e.substring(0, 1).toUpperCase(), - e.substring(1), - ].join()) + .map((e) => [e.substring(0, 1).toUpperCase(), e.substring(1)].join()) .join('To'); String toTypeExtension(String e, {bool includeDotDart = true}) => diff --git a/pubspec.yaml b/pubspec.yaml index ac2343cc3..a5ba24d13 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: json_serial_workspace # Can be anything environment: - sdk: ^3.5.0 + sdk: ^3.8.0 publish_to: none diff --git a/shared_test/pubspec.yaml b/shared_test/pubspec.yaml index 23aed093a..9b6990a4b 100644 --- a/shared_test/pubspec.yaml +++ b/shared_test/pubspec.yaml @@ -1,7 +1,7 @@ name: _json_serial_shared_test publish_to: none environment: - sdk: ^3.6.0 + sdk: ^3.8.0 resolution: workspace diff --git a/tool/ci.sh b/tool/ci.sh index c6a601c34..8cecb2e3d 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.6.2 +# Created with package:mono_repo v6.6.3 # Support built in commands on windows out of the box. From 9c2d96ec34ad49f904707da7f06081370a58618f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 31 May 2025 15:47:09 -0700 Subject: [PATCH 2/4] fix readme --- checked_yaml/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/checked_yaml/README.md b/checked_yaml/README.md index 1a56f1e23..d5f83e9d6 100644 --- a/checked_yaml/README.md +++ b/checked_yaml/README.md @@ -1,7 +1,7 @@ [![Pub Package](https://img.shields.io/pub/v/checked_yaml.svg)](https://pub.dev/packages/checked_yaml) `package:checked_yaml` provides a `checkedYamlDecode` function that wraps the -the creation of classes annotated for [`package:json_serializable`] it helps +creation of classes annotated for [`package:json_serializable`] it helps provide more helpful exceptions when the provided YAML is not compatible with the target type. @@ -10,11 +10,7 @@ the target type. for the class annotation. ```dart -@JsonSerializable( - anyMap: true, - checked: true, - disallowUnrecognizedKeys: true, -) +@JsonSerializable(anyMap: true, checked: true, disallowUnrecognizedKeys: true) class Configuration { @JsonKey(required: true) final String name; From 8048baec1d5d55f3dbc9b79461959f39bedd31c4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 31 May 2025 15:53:59 -0700 Subject: [PATCH 3/4] oops --- _test_yaml/test/src/build_config.g.dart | 23 +++++++++++++---------- example/lib/example.g.dart | 15 ++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/_test_yaml/test/src/build_config.g.dart b/_test_yaml/test/src/build_config.g.dart index e453d996c..78bb619b9 100644 --- a/_test_yaml/test/src/build_config.g.dart +++ b/_test_yaml/test/src/build_config.g.dart @@ -119,17 +119,20 @@ Builder _$BuilderFromJson(Map json) => $checkedCreate( ); Map _$BuilderToJson(Builder instance) => { - 'target': ?instance.target, - 'import': ?instance.import, - 'is_optional': ?instance.isOptional, - 'configLocation': ?instance.configLocation?.toString(), - 'auto_apply': ?_$AutoApplyEnumMap[instance.autoApply], - 'build_to': ?_$BuildToEnumMap[instance.buildTo], - 'defaultEnumTest': ?_$AutoApplyEnumMap[instance.defaultEnumTest], + if (instance.target case final value?) 'target': value, + if (instance.import case final value?) 'import': value, + if (instance.isOptional case final value?) 'is_optional': value, + if (instance.configLocation?.toString() case final value?) + 'configLocation': value, + if (_$AutoApplyEnumMap[instance.autoApply] case final value?) + 'auto_apply': value, + if (_$BuildToEnumMap[instance.buildTo] case final value?) 'build_to': value, + if (_$AutoApplyEnumMap[instance.defaultEnumTest] case final value?) + 'defaultEnumTest': value, 'builder_factories': instance.builderFactories, - 'applies_builders': ?instance.appliesBuilders, - 'required_inputs': ?instance.requiredInputs, - 'build_extensions': ?instance.buildExtensions, + if (instance.appliesBuilders case final value?) 'applies_builders': value, + if (instance.requiredInputs case final value?) 'required_inputs': value, + if (instance.buildExtensions case final value?) 'build_extensions': value, }; const _$BuildToEnumMap = {BuildTo.cache: 'cache', BuildTo.source: 'source'}; diff --git a/example/lib/example.g.dart b/example/lib/example.g.dart index 6c1d3cb06..c35c960af 100644 --- a/example/lib/example.g.dart +++ b/example/lib/example.g.dart @@ -21,7 +21,7 @@ Person _$PersonFromJson(Map json) => Person( Map _$PersonToJson(Person instance) => { 'firstName': instance.firstName, - 'middleName': ?instance.middleName, + if (instance.middleName case final value?) 'middleName': value, 'lastName': instance.lastName, 'date-of-birth': instance.dateOfBirth.toIso8601String(), 'last-order': instance.lastOrder?.toIso8601String(), @@ -41,12 +41,13 @@ Order _$OrderFromJson(Map json) => ); Map _$OrderToJson(Order instance) => { - 'count': ?instance.count, - 'itemNumber': ?instance.itemNumber, - 'isRushed': ?instance.isRushed, - 'item': ?instance.item, - 'prep-time': ?Order._durationToMilliseconds(instance.prepTime), - 'date': ?Order._dateTimeToEpochUs(instance.date), + if (instance.count case final value?) 'count': value, + if (instance.itemNumber case final value?) 'itemNumber': value, + if (instance.isRushed case final value?) 'isRushed': value, + if (instance.item case final value?) 'item': value, + if (Order._durationToMilliseconds(instance.prepTime) case final value?) + 'prep-time': value, + if (Order._dateTimeToEpochUs(instance.date) case final value?) 'date': value, }; Item _$ItemFromJson(Map json) => Item() From 74bf337b0b832bb22c9cf93fbf424d36dbabd2ae Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 31 May 2025 16:27:39 -0700 Subject: [PATCH 4/4] update changelogs --- checked_yaml/CHANGELOG.md | 2 +- json_annotation/CHANGELOG.md | 2 +- json_serializable/CHANGELOG.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/checked_yaml/CHANGELOG.md b/checked_yaml/CHANGELOG.md index 6099e85b3..a3b7dac72 100644 --- a/checked_yaml/CHANGELOG.md +++ b/checked_yaml/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.4-wip -- Require Dart 3.6 +- Require Dart 3.8 ## 2.0.3 diff --git a/json_annotation/CHANGELOG.md b/json_annotation/CHANGELOG.md index 810c9d3d1..ae0b4d43d 100644 --- a/json_annotation/CHANGELOG.md +++ b/json_annotation/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.9.1-wip -- Require Dart 3.6 +- Require Dart 3.8 ## 4.9.0 diff --git a/json_serializable/CHANGELOG.md b/json_serializable/CHANGELOG.md index e49cc7918..4d1b7a639 100644 --- a/json_serializable/CHANGELOG.md +++ b/json_serializable/CHANGELOG.md @@ -1,6 +1,7 @@ ## 6.9.6-wip - Move `package:collection` to a dev dependency. +- Require Dart 3.8 ## 6.9.5