diff --git a/lib/src/models/latest_version_model.mapper.dart b/lib/src/models/latest_version_model.mapper.dart index a10549b..595f567 100644 --- a/lib/src/models/latest_version_model.mapper.dart +++ b/lib/src/models/latest_version_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'latest_version_model.dart'; @@ -79,10 +79,8 @@ mixin LatestVersionMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LatestVersionMapper.ensureInitialized() - .isValueEqual(this as LatestVersion, other)); + return LatestVersionMapper.ensureInitialized() + .equalsValue(this as LatestVersion, other); } @override diff --git a/lib/src/models/package_documentation_model.mapper.dart b/lib/src/models/package_documentation_model.mapper.dart index 406ba8a..34ea82f 100644 --- a/lib/src/models/package_documentation_model.mapper.dart +++ b/lib/src/models/package_documentation_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_documentation_model.dart'; @@ -75,10 +75,8 @@ mixin PackageDocumentationMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageDocumentationMapper.ensureInitialized() - .isValueEqual(this as PackageDocumentation, other)); + return PackageDocumentationMapper.ensureInitialized() + .equalsValue(this as PackageDocumentation, other); } @override @@ -221,10 +219,8 @@ mixin PackageDocumentationVersionMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageDocumentationVersionMapper.ensureInitialized() - .isValueEqual(this as PackageDocumentationVersion, other)); + return PackageDocumentationVersionMapper.ensureInitialized() + .equalsValue(this as PackageDocumentationVersion, other); } @override diff --git a/lib/src/models/package_like_model.mapper.dart b/lib/src/models/package_like_model.mapper.dart index 89a96ee..8509354 100644 --- a/lib/src/models/package_like_model.mapper.dart +++ b/lib/src/models/package_like_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_like_model.dart'; @@ -70,10 +70,8 @@ mixin PackageLikeMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageLikeMapper.ensureInitialized() - .isValueEqual(this as PackageLike, other)); + return PackageLikeMapper.ensureInitialized() + .equalsValue(this as PackageLike, other); } @override diff --git a/lib/src/models/package_metrics_model.mapper.dart b/lib/src/models/package_metrics_model.mapper.dart index b7c6eb8..9e92b90 100644 --- a/lib/src/models/package_metrics_model.mapper.dart +++ b/lib/src/models/package_metrics_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_metrics_model.dart'; @@ -74,10 +74,8 @@ mixin PackageMetricsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageMetricsMapper.ensureInitialized() - .isValueEqual(this as PackageMetrics, other)); + return PackageMetricsMapper.ensureInitialized() + .equalsValue(this as PackageMetrics, other); } @override diff --git a/lib/src/models/package_options_model.mapper.dart b/lib/src/models/package_options_model.mapper.dart index 0fca9e8..4d6e331 100644 --- a/lib/src/models/package_options_model.mapper.dart +++ b/lib/src/models/package_options_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_options_model.dart'; @@ -78,10 +78,8 @@ mixin PackageOptionsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageOptionsMapper.ensureInitialized() - .isValueEqual(this as PackageOptions, other)); + return PackageOptionsMapper.ensureInitialized() + .equalsValue(this as PackageOptions, other); } @override diff --git a/lib/src/models/package_publisher_model.mapper.dart b/lib/src/models/package_publisher_model.mapper.dart index b9396d0..2f585c6 100644 --- a/lib/src/models/package_publisher_model.mapper.dart +++ b/lib/src/models/package_publisher_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_publisher_model.dart'; @@ -67,10 +67,8 @@ mixin PackagePublisherMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackagePublisherMapper.ensureInitialized() - .isValueEqual(this as PackagePublisher, other)); + return PackagePublisherMapper.ensureInitialized() + .equalsValue(this as PackagePublisher, other); } @override diff --git a/lib/src/models/package_score_card.mapper.dart b/lib/src/models/package_score_card.mapper.dart index d511546..7c3bbe2 100644 --- a/lib/src/models/package_score_card.mapper.dart +++ b/lib/src/models/package_score_card.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_score_card.dart'; @@ -100,10 +100,8 @@ mixin PackageScoreCardMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageScoreCardMapper.ensureInitialized() - .isValueEqual(this as PackageScoreCard, other)); + return PackageScoreCardMapper.ensureInitialized() + .equalsValue(this as PackageScoreCard, other); } @override @@ -245,10 +243,8 @@ mixin DartdocReportMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DartdocReportMapper.ensureInitialized() - .isValueEqual(this as DartdocReport, other)); + return DartdocReportMapper.ensureInitialized() + .equalsValue(this as DartdocReport, other); } @override @@ -399,10 +395,8 @@ mixin PanaReportMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PanaReportMapper.ensureInitialized() - .isValueEqual(this as PanaReport, other)); + return PanaReportMapper.ensureInitialized() + .equalsValue(this as PanaReport, other); } @override @@ -619,10 +613,8 @@ mixin PanaRuntimeInfoMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PanaRuntimeInfoMapper.ensureInitialized() - .isValueEqual(this as PanaRuntimeInfo, other)); + return PanaRuntimeInfoMapper.ensureInitialized() + .equalsValue(this as PanaRuntimeInfo, other); } @override @@ -792,10 +784,8 @@ mixin FlutterVersionsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FlutterVersionsMapper.ensureInitialized() - .isValueEqual(this as FlutterVersions, other)); + return FlutterVersionsMapper.ensureInitialized() + .equalsValue(this as FlutterVersions, other); } @override @@ -946,10 +936,8 @@ mixin LicenseMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LicenseMapper.ensureInitialized() - .isValueEqual(this as License, other)); + return LicenseMapper.ensureInitialized() + .equalsValue(this as License, other); } @override @@ -1051,10 +1039,7 @@ mixin ReportMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReportMapper.ensureInitialized() - .isValueEqual(this as Report, other)); + return ReportMapper.ensureInitialized().equalsValue(this as Report, other); } @override @@ -1181,10 +1166,8 @@ mixin SectionMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SectionMapper.ensureInitialized() - .isValueEqual(this as Section, other)); + return SectionMapper.ensureInitialized() + .equalsValue(this as Section, other); } @override @@ -1263,19 +1246,19 @@ class ResultMapper extends ClassMapperBase { @override final String id = 'Result'; - static String? _$repositoryUrl(Result v) => v.repositoryUrl; + static String _$repositoryUrl(Result v) => v.repositoryUrl; static const Field _f$repositoryUrl = Field('repositoryUrl', _$repositoryUrl); - static String? _$issueTrackerUrl(Result v) => v.issueTrackerUrl; + static String _$issueTrackerUrl(Result v) => v.issueTrackerUrl; static const Field _f$issueTrackerUrl = Field('issueTrackerUrl', _$issueTrackerUrl); - static Repository? _$repository(Result v) => v.repository; + static Repository _$repository(Result v) => v.repository; static const Field _f$repository = Field('repository', _$repository); - static int? _$grantedPoints(Result v) => v.grantedPoints; + static int _$grantedPoints(Result v) => v.grantedPoints; static const Field _f$grantedPoints = Field('grantedPoints', _$grantedPoints); - static int? _$maxPoints(Result v) => v.maxPoints; + static int _$maxPoints(Result v) => v.maxPoints; static const Field _f$maxPoints = Field('maxPoints', _$maxPoints); @@ -1327,10 +1310,7 @@ mixin ResultMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ResultMapper.ensureInitialized() - .isValueEqual(this as Result, other)); + return ResultMapper.ensureInitialized().equalsValue(this as Result, other); } @override @@ -1346,7 +1326,7 @@ extension ResultValueCopy<$R, $Out> on ObjectCopyWith<$R, Result, $Out> { abstract class ResultCopyWith<$R, $In extends Result, $Out> implements ClassCopyWith<$R, $In, $Out> { - RepositoryCopyWith<$R, Repository, Repository>? get repository; + RepositoryCopyWith<$R, Repository, Repository> get repository; $R call( {String? repositoryUrl, String? issueTrackerUrl, @@ -1363,21 +1343,21 @@ class _ResultCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, Result, $Out> @override late final ClassMapperBase $mapper = ResultMapper.ensureInitialized(); @override - RepositoryCopyWith<$R, Repository, Repository>? get repository => + RepositoryCopyWith<$R, Repository, Repository> get repository => $value.repository.copyWith.$chain((v) => call(repository: v)); @override $R call( - {Object? repositoryUrl = $none, - Object? issueTrackerUrl = $none, - Object? repository = $none, - Object? grantedPoints = $none, - Object? maxPoints = $none}) => + {String? repositoryUrl, + String? issueTrackerUrl, + Repository? repository, + int? grantedPoints, + int? maxPoints}) => $apply(FieldCopyWithData({ - if (repositoryUrl != $none) #repositoryUrl: repositoryUrl, - if (issueTrackerUrl != $none) #issueTrackerUrl: issueTrackerUrl, - if (repository != $none) #repository: repository, - if (grantedPoints != $none) #grantedPoints: grantedPoints, - if (maxPoints != $none) #maxPoints: maxPoints + if (repositoryUrl != null) #repositoryUrl: repositoryUrl, + if (issueTrackerUrl != null) #issueTrackerUrl: issueTrackerUrl, + if (repository != null) #repository: repository, + if (grantedPoints != null) #grantedPoints: grantedPoints, + if (maxPoints != null) #maxPoints: maxPoints })); @override Result $make(CopyWithData data) => Result( @@ -1466,10 +1446,8 @@ mixin RepositoryMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - RepositoryMapper.ensureInitialized() - .isValueEqual(this as Repository, other)); + return RepositoryMapper.ensureInitialized() + .equalsValue(this as Repository, other); } @override diff --git a/lib/src/models/package_score_model.mapper.dart b/lib/src/models/package_score_model.mapper.dart index ae3eaab..10d888a 100644 --- a/lib/src/models/package_score_model.mapper.dart +++ b/lib/src/models/package_score_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'package_score_model.dart'; @@ -32,7 +32,7 @@ class PackageScoreMapper extends ClassMapperBase { static double? _$popularityScore(PackageScore v) => v.popularityScore; static const Field _f$popularityScore = Field('popularityScore', _$popularityScore); - static List? _$tags(PackageScore v) => v.tags; + static List _$tags(PackageScore v) => v.tags; static const Field> _f$tags = Field('tags', _$tags); static DateTime _$lastUpdated(PackageScore v) => v.lastUpdated; @@ -92,10 +92,8 @@ mixin PackageScoreMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageScoreMapper.ensureInitialized() - .isValueEqual(this as PackageScore, other)); + return PackageScoreMapper.ensureInitialized() + .equalsValue(this as PackageScore, other); } @override @@ -113,7 +111,7 @@ extension PackageScoreValueCopy<$R, $Out> abstract class PackageScoreCopyWith<$R, $In extends PackageScore, $Out> implements ClassCopyWith<$R, $In, $Out> { - ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get tags; + ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get tags; $R call( {int? grantedPoints, int? maxPoints, @@ -133,25 +131,23 @@ class _PackageScoreCopyWithImpl<$R, $Out> late final ClassMapperBase $mapper = PackageScoreMapper.ensureInitialized(); @override - ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get tags => - $value.tags != null - ? ListCopyWith($value.tags, (v, t) => ObjectCopyWith(v, $identity, t), - (v) => call(tags: v)) - : null; + ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get tags => + ListCopyWith($value.tags, (v, t) => ObjectCopyWith(v, $identity, t), + (v) => call(tags: v)); @override $R call( {int? grantedPoints, int? maxPoints, int? likeCount, Object? popularityScore = $none, - Object? tags = $none, + List? tags, DateTime? lastUpdated}) => $apply(FieldCopyWithData({ if (grantedPoints != null) #grantedPoints: grantedPoints, if (maxPoints != null) #maxPoints: maxPoints, if (likeCount != null) #likeCount: likeCount, if (popularityScore != $none) #popularityScore: popularityScore, - if (tags != $none) #tags: tags, + if (tags != null) #tags: tags, if (lastUpdated != null) #lastUpdated: lastUpdated })); @override diff --git a/lib/src/models/pub_package_model.mapper.dart b/lib/src/models/pub_package_model.mapper.dart index 455ccf1..511a929 100644 --- a/lib/src/models/pub_package_model.mapper.dart +++ b/lib/src/models/pub_package_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pub_package_model.dart'; @@ -78,10 +78,8 @@ mixin PubPackageMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PubPackageMapper.ensureInitialized() - .isValueEqual(this as PubPackage, other)); + return PubPackageMapper.ensureInitialized() + .equalsValue(this as PubPackage, other); } @override @@ -227,10 +225,8 @@ mixin PackageVersionMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageVersionMapper.ensureInitialized() - .isValueEqual(this as PackageVersion, other)); + return PackageVersionMapper.ensureInitialized() + .equalsValue(this as PackageVersion, other); } @override diff --git a/lib/src/models/search_order.mapper.dart b/lib/src/models/search_order.mapper.dart index 09f5821..84f2a13 100644 --- a/lib/src/models/search_order.mapper.dart +++ b/lib/src/models/search_order.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'search_order.dart'; diff --git a/lib/src/models/search_results_model.mapper.dart b/lib/src/models/search_results_model.mapper.dart index 3682628..a28fc47 100644 --- a/lib/src/models/search_results_model.mapper.dart +++ b/lib/src/models/search_results_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'search_results_model.dart'; @@ -73,10 +73,8 @@ mixin SearchResultsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SearchResultsMapper.ensureInitialized() - .isValueEqual(this as SearchResults, other)); + return SearchResultsMapper.ensureInitialized() + .equalsValue(this as SearchResults, other); } @override @@ -191,10 +189,8 @@ mixin PackageResultMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PackageResultMapper.ensureInitialized() - .isValueEqual(this as PackageResult, other)); + return PackageResultMapper.ensureInitialized() + .equalsValue(this as PackageResult, other); } @override diff --git a/pubspec.yaml b/pubspec.yaml index eb6712a..5c20417 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: - dart_mappable: ^4.2.1 + dart_mappable: ^4.2.2 http: ^1.1.0 oauth2: ^2.0.2 path: ^1.8.3 @@ -17,7 +17,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.8 build_version: ^2.1.1 - dart_mappable_builder: ^4.2.1 + dart_mappable_builder: ^4.2.3 lints: ^2.1.1 test: ^1.24.4 test_cov: ^1.0.1