Skip to content

Commit

Permalink
chore(ratings_client): regenerate freezed files
Browse files Browse the repository at this point in the history
  • Loading branch information
d-loose committed Dec 13, 2024
1 parent 8924403 commit 700a664
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 15 deletions.
42 changes: 35 additions & 7 deletions packages/app_center_ratings_client/lib/src/ratings.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ mixin _$Rating {
String get snapId => throw _privateConstructorUsedError;
int get totalVotes => throw _privateConstructorUsedError;
RatingsBand get ratingsBand => throw _privateConstructorUsedError;
String get snapName => throw _privateConstructorUsedError;

/// Serializes this Rating to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Expand All @@ -38,7 +39,11 @@ abstract class $RatingCopyWith<$Res> {
factory $RatingCopyWith(Rating value, $Res Function(Rating) then) =
_$RatingCopyWithImpl<$Res, Rating>;
@useResult
$Res call({String snapId, int totalVotes, RatingsBand ratingsBand});
$Res call(
{String snapId,
int totalVotes,
RatingsBand ratingsBand,
String snapName});
}

/// @nodoc
Expand All @@ -59,6 +64,7 @@ class _$RatingCopyWithImpl<$Res, $Val extends Rating>
Object? snapId = null,
Object? totalVotes = null,
Object? ratingsBand = null,
Object? snapName = null,
}) {
return _then(_value.copyWith(
snapId: null == snapId
Expand All @@ -73,6 +79,10 @@ class _$RatingCopyWithImpl<$Res, $Val extends Rating>
? _value.ratingsBand
: ratingsBand // ignore: cast_nullable_to_non_nullable
as RatingsBand,
snapName: null == snapName
? _value.snapName
: snapName // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
Expand All @@ -84,7 +94,11 @@ abstract class _$$RatingImplCopyWith<$Res> implements $RatingCopyWith<$Res> {
__$$RatingImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String snapId, int totalVotes, RatingsBand ratingsBand});
$Res call(
{String snapId,
int totalVotes,
RatingsBand ratingsBand,
String snapName});
}

/// @nodoc
Expand All @@ -103,6 +117,7 @@ class __$$RatingImplCopyWithImpl<$Res>
Object? snapId = null,
Object? totalVotes = null,
Object? ratingsBand = null,
Object? snapName = null,
}) {
return _then(_$RatingImpl(
snapId: null == snapId
Expand All @@ -117,6 +132,10 @@ class __$$RatingImplCopyWithImpl<$Res>
? _value.ratingsBand
: ratingsBand // ignore: cast_nullable_to_non_nullable
as RatingsBand,
snapName: null == snapName
? _value.snapName
: snapName // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
Expand All @@ -127,7 +146,8 @@ class _$RatingImpl implements _Rating {
const _$RatingImpl(
{required this.snapId,
required this.totalVotes,
required this.ratingsBand});
required this.ratingsBand,
required this.snapName});

factory _$RatingImpl.fromJson(Map<String, dynamic> json) =>
_$$RatingImplFromJson(json);
Expand All @@ -138,10 +158,12 @@ class _$RatingImpl implements _Rating {
final int totalVotes;
@override
final RatingsBand ratingsBand;
@override
final String snapName;

@override
String toString() {
return 'Rating(snapId: $snapId, totalVotes: $totalVotes, ratingsBand: $ratingsBand)';
return 'Rating(snapId: $snapId, totalVotes: $totalVotes, ratingsBand: $ratingsBand, snapName: $snapName)';
}

@override
Expand All @@ -153,12 +175,15 @@ class _$RatingImpl implements _Rating {
(identical(other.totalVotes, totalVotes) ||
other.totalVotes == totalVotes) &&
(identical(other.ratingsBand, ratingsBand) ||
other.ratingsBand == ratingsBand));
other.ratingsBand == ratingsBand) &&
(identical(other.snapName, snapName) ||
other.snapName == snapName));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, snapId, totalVotes, ratingsBand);
int get hashCode =>
Object.hash(runtimeType, snapId, totalVotes, ratingsBand, snapName);

/// Create a copy of Rating
/// with the given fields replaced by the non-null parameter values.
Expand All @@ -180,7 +205,8 @@ abstract class _Rating implements Rating {
const factory _Rating(
{required final String snapId,
required final int totalVotes,
required final RatingsBand ratingsBand}) = _$RatingImpl;
required final RatingsBand ratingsBand,
required final String snapName}) = _$RatingImpl;

factory _Rating.fromJson(Map<String, dynamic> json) = _$RatingImpl.fromJson;

Expand All @@ -190,6 +216,8 @@ abstract class _Rating implements Rating {
int get totalVotes;
@override
RatingsBand get ratingsBand;
@override
String get snapName;

/// Create a copy of Rating
/// with the given fields replaced by the non-null parameter values.
Expand Down
45 changes: 37 additions & 8 deletions packages/app_center_ratings_client/lib/src/vote.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mixin _$Vote {
int get snapRevision => throw _privateConstructorUsedError;
bool get voteUp => throw _privateConstructorUsedError;
DateTime get dateTime => throw _privateConstructorUsedError;
String get snapName => throw _privateConstructorUsedError;

/// Create a copy of Vote
/// with the given fields replaced by the non-null parameter values.
Expand All @@ -32,7 +33,12 @@ abstract class $VoteCopyWith<$Res> {
factory $VoteCopyWith(Vote value, $Res Function(Vote) then) =
_$VoteCopyWithImpl<$Res, Vote>;
@useResult
$Res call({String snapId, int snapRevision, bool voteUp, DateTime dateTime});
$Res call(
{String snapId,
int snapRevision,
bool voteUp,
DateTime dateTime,
String snapName});
}

/// @nodoc
Expand All @@ -54,6 +60,7 @@ class _$VoteCopyWithImpl<$Res, $Val extends Vote>
Object? snapRevision = null,
Object? voteUp = null,
Object? dateTime = null,
Object? snapName = null,
}) {
return _then(_value.copyWith(
snapId: null == snapId
Expand All @@ -72,6 +79,10 @@ class _$VoteCopyWithImpl<$Res, $Val extends Vote>
? _value.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable
as DateTime,
snapName: null == snapName
? _value.snapName
: snapName // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
Expand All @@ -83,7 +94,12 @@ abstract class _$$VoteImplCopyWith<$Res> implements $VoteCopyWith<$Res> {
__$$VoteImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String snapId, int snapRevision, bool voteUp, DateTime dateTime});
$Res call(
{String snapId,
int snapRevision,
bool voteUp,
DateTime dateTime,
String snapName});
}

/// @nodoc
Expand All @@ -102,6 +118,7 @@ class __$$VoteImplCopyWithImpl<$Res>
Object? snapRevision = null,
Object? voteUp = null,
Object? dateTime = null,
Object? snapName = null,
}) {
return _then(_$VoteImpl(
snapId: null == snapId
Expand All @@ -120,6 +137,10 @@ class __$$VoteImplCopyWithImpl<$Res>
? _value.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable
as DateTime,
snapName: null == snapName
? _value.snapName
: snapName // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
Expand All @@ -131,7 +152,8 @@ class _$VoteImpl implements _Vote {
{required this.snapId,
required this.snapRevision,
required this.voteUp,
required this.dateTime});
required this.dateTime,
required this.snapName});

@override
final String snapId;
Expand All @@ -141,10 +163,12 @@ class _$VoteImpl implements _Vote {
final bool voteUp;
@override
final DateTime dateTime;
@override
final String snapName;

@override
String toString() {
return 'Vote(snapId: $snapId, snapRevision: $snapRevision, voteUp: $voteUp, dateTime: $dateTime)';
return 'Vote(snapId: $snapId, snapRevision: $snapRevision, voteUp: $voteUp, dateTime: $dateTime, snapName: $snapName)';
}

@override
Expand All @@ -157,12 +181,14 @@ class _$VoteImpl implements _Vote {
other.snapRevision == snapRevision) &&
(identical(other.voteUp, voteUp) || other.voteUp == voteUp) &&
(identical(other.dateTime, dateTime) ||
other.dateTime == dateTime));
other.dateTime == dateTime) &&
(identical(other.snapName, snapName) ||
other.snapName == snapName));
}

@override
int get hashCode =>
Object.hash(runtimeType, snapId, snapRevision, voteUp, dateTime);
int get hashCode => Object.hash(
runtimeType, snapId, snapRevision, voteUp, dateTime, snapName);

/// Create a copy of Vote
/// with the given fields replaced by the non-null parameter values.
Expand All @@ -178,7 +204,8 @@ abstract class _Vote implements Vote {
{required final String snapId,
required final int snapRevision,
required final bool voteUp,
required final DateTime dateTime}) = _$VoteImpl;
required final DateTime dateTime,
required final String snapName}) = _$VoteImpl;

@override
String get snapId;
Expand All @@ -188,6 +215,8 @@ abstract class _Vote implements Vote {
bool get voteUp;
@override
DateTime get dateTime;
@override
String get snapName;

/// Create a copy of Vote
/// with the given fields replaced by the non-null parameter values.
Expand Down

0 comments on commit 700a664

Please sign in to comment.