Skip to content

Commit

Permalink
Update dart mappable
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed May 21, 2024
1 parent f6cc71c commit d6b823e
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 127 deletions.
8 changes: 3 additions & 5 deletions lib/src/models/latest_version_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
14 changes: 5 additions & 9 deletions lib/src/models/package_documentation_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions lib/src/models/package_like_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions lib/src/models/package_metrics_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions lib/src/models/package_options_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions lib/src/models/package_publisher_model.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
94 changes: 36 additions & 58 deletions lib/src/models/package_score_card.mapper.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1263,19 +1246,19 @@ class ResultMapper extends ClassMapperBase<Result> {
@override
final String id = 'Result';

static String? _$repositoryUrl(Result v) => v.repositoryUrl;
static String _$repositoryUrl(Result v) => v.repositoryUrl;
static const Field<Result, String> _f$repositoryUrl =
Field('repositoryUrl', _$repositoryUrl);
static String? _$issueTrackerUrl(Result v) => v.issueTrackerUrl;
static String _$issueTrackerUrl(Result v) => v.issueTrackerUrl;
static const Field<Result, String> _f$issueTrackerUrl =
Field('issueTrackerUrl', _$issueTrackerUrl);
static Repository? _$repository(Result v) => v.repository;
static Repository _$repository(Result v) => v.repository;
static const Field<Result, Repository> _f$repository =
Field('repository', _$repository);
static int? _$grantedPoints(Result v) => v.grantedPoints;
static int _$grantedPoints(Result v) => v.grantedPoints;
static const Field<Result, int> _f$grantedPoints =
Field('grantedPoints', _$grantedPoints);
static int? _$maxPoints(Result v) => v.maxPoints;
static int _$maxPoints(Result v) => v.maxPoints;
static const Field<Result, int> _f$maxPoints =
Field('maxPoints', _$maxPoints);

Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -1363,21 +1343,21 @@ class _ResultCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, Result, $Out>
@override
late final ClassMapperBase<Result> $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(
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit d6b823e

Please sign in to comment.