Skip to content

Commit

Permalink
Merge branch 'main' into sidhdhi/select-new-team-admin
Browse files Browse the repository at this point in the history
# Conflicts:
#	data/lib/api/ball_score/ball_score_model.freezed.dart
#	data/lib/api/match/match_model.freezed.dart
#	data/lib/service/match/match_service.dart
#	data/lib/service/team/team_service.dart
#	khelo/lib/components/action_bottom_sheet.dart
#	khelo/lib/components/profile_image_avatar.dart
#	khelo/lib/ui/flow/score_board/score_board_view_model.dart
#	khelo/lib/ui/flow/score_board/score_board_view_model.freezed.dart
  • Loading branch information
cp-sidhdhi-p committed Oct 23, 2024
2 parents 3a4e3ad + 5e8ea0f commit 0b155c5
Show file tree
Hide file tree
Showing 69 changed files with 6,672 additions and 448 deletions.
2 changes: 1 addition & 1 deletion data/.flutter-plugins-dependencies

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions data/lib/api/ball_score/ball_score_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ class UserStat with _$UserStat {
BowlingStat? bowlingStat,
FieldingStat? fieldingStat,
}) = _UserStat;

factory UserStat.fromJson(Map<String, dynamic> json) =>
_$UserStatFromJson(json);
}

@freezed
Expand All @@ -157,6 +160,9 @@ class BattingStat with _$BattingStat {
@Default(0) int hundreds,
@Default(0) int ducks,
}) = _BattingStat;

factory BattingStat.fromJson(Map<String, dynamic> json) =>
_$BattingStatFromJson(json);
}

@freezed
Expand All @@ -173,6 +179,9 @@ class BowlingStat with _$BowlingStat {
@Default(0.0) double strikeRate,
@Default(0.0) double economyRate,
}) = _BowlingStat;

factory BowlingStat.fromJson(Map<String, dynamic> json) =>
_$BowlingStatFromJson(json);
}

@freezed
Expand All @@ -182,6 +191,9 @@ class FieldingStat with _$FieldingStat {
@Default(0) int runOut,
@Default(0) int stumping,
}) = _FieldingStat;

factory FieldingStat.fromJson(Map<String, dynamic> json) =>
_$FieldingStatFromJson(json);
}

@freezed
Expand Down
92 changes: 88 additions & 4 deletions data/lib/api/ball_score/ball_score_model.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,19 @@ abstract class _BallScoreModel implements BallScoreModel {
throw _privateConstructorUsedError;
}

UserStat _$UserStatFromJson(Map<String, dynamic> json) {
return _UserStat.fromJson(json);
}

/// @nodoc
mixin _$UserStat {
BattingStat? get battingStat => throw _privateConstructorUsedError;
BowlingStat? get bowlingStat => throw _privateConstructorUsedError;
FieldingStat? get fieldingStat => throw _privateConstructorUsedError;

/// Serializes this UserStat to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

/// Create a copy of UserStat
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
Expand Down Expand Up @@ -731,10 +738,13 @@ class __$$UserStatImplCopyWithImpl<$Res>
}

/// @nodoc
@JsonSerializable()
class _$UserStatImpl implements _UserStat {
const _$UserStatImpl({this.battingStat, this.bowlingStat, this.fieldingStat});

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

@override
final BattingStat? battingStat;
@override
Expand All @@ -760,6 +770,7 @@ class _$UserStatImpl implements _UserStat {
other.fieldingStat == fieldingStat));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, battingStat, bowlingStat, fieldingStat);
Expand All @@ -771,6 +782,13 @@ class _$UserStatImpl implements _UserStat {
@pragma('vm:prefer-inline')
_$$UserStatImplCopyWith<_$UserStatImpl> get copyWith =>
__$$UserStatImplCopyWithImpl<_$UserStatImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$UserStatImplToJson(
this,
);
}
}

abstract class _UserStat implements UserStat {
Expand All @@ -779,6 +797,9 @@ abstract class _UserStat implements UserStat {
final BowlingStat? bowlingStat,
final FieldingStat? fieldingStat}) = _$UserStatImpl;

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

@override
BattingStat? get battingStat;
@override
Expand All @@ -794,6 +815,10 @@ abstract class _UserStat implements UserStat {
throw _privateConstructorUsedError;
}

BattingStat _$BattingStatFromJson(Map<String, dynamic> json) {
return _BattingStat.fromJson(json);
}

/// @nodoc
mixin _$BattingStat {
int get innings => throw _privateConstructorUsedError;
Expand All @@ -807,6 +832,9 @@ mixin _$BattingStat {
int get hundreds => throw _privateConstructorUsedError;
int get ducks => throw _privateConstructorUsedError;

/// Serializes this BattingStat to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

/// Create a copy of BattingStat
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
Expand Down Expand Up @@ -995,7 +1023,7 @@ class __$$BattingStatImplCopyWithImpl<$Res>
}

/// @nodoc
@JsonSerializable()
class _$BattingStatImpl implements _BattingStat {
const _$BattingStatImpl(
{this.innings = 0,
Expand All @@ -1009,6 +1037,9 @@ class _$BattingStatImpl implements _BattingStat {
this.hundreds = 0,
this.ducks = 0});

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

@override
@JsonKey()
final int innings;
Expand Down Expand Up @@ -1066,6 +1097,7 @@ class _$BattingStatImpl implements _BattingStat {
(identical(other.ducks, ducks) || other.ducks == ducks));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, innings, runScored, average,
strikeRate, ballFaced, fours, sixes, fifties, hundreds, ducks);
Expand All @@ -1077,6 +1109,13 @@ class _$BattingStatImpl implements _BattingStat {
@pragma('vm:prefer-inline')
_$$BattingStatImplCopyWith<_$BattingStatImpl> get copyWith =>
__$$BattingStatImplCopyWithImpl<_$BattingStatImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$BattingStatImplToJson(
this,
);
}
}

abstract class _BattingStat implements BattingStat {
Expand All @@ -1092,6 +1131,9 @@ abstract class _BattingStat implements BattingStat {
final int hundreds,
final int ducks}) = _$BattingStatImpl;

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

@override
int get innings;
@override
Expand Down Expand Up @@ -1121,6 +1163,10 @@ abstract class _BattingStat implements BattingStat {
throw _privateConstructorUsedError;
}

BowlingStat _$BowlingStatFromJson(Map<String, dynamic> json) {
return _BowlingStat.fromJson(json);
}

/// @nodoc
mixin _$BowlingStat {
int get innings => throw _privateConstructorUsedError;
Expand All @@ -1134,6 +1180,9 @@ mixin _$BowlingStat {
double get strikeRate => throw _privateConstructorUsedError;
double get economyRate => throw _privateConstructorUsedError;

/// Serializes this BowlingStat to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

/// Create a copy of BowlingStat
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
Expand Down Expand Up @@ -1322,7 +1371,7 @@ class __$$BowlingStatImplCopyWithImpl<$Res>
}

/// @nodoc
@JsonSerializable()
class _$BowlingStatImpl implements _BowlingStat {
const _$BowlingStatImpl(
{this.innings = 0,
Expand All @@ -1336,6 +1385,9 @@ class _$BowlingStatImpl implements _BowlingStat {
this.strikeRate = 0.0,
this.economyRate = 0.0});

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

@override
@JsonKey()
final int innings;
Expand Down Expand Up @@ -1394,6 +1446,7 @@ class _$BowlingStatImpl implements _BowlingStat {
other.economyRate == economyRate));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
Expand All @@ -1415,6 +1468,13 @@ class _$BowlingStatImpl implements _BowlingStat {
@pragma('vm:prefer-inline')
_$$BowlingStatImplCopyWith<_$BowlingStatImpl> get copyWith =>
__$$BowlingStatImplCopyWithImpl<_$BowlingStatImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$BowlingStatImplToJson(
this,
);
}
}

abstract class _BowlingStat implements BowlingStat {
Expand All @@ -1430,6 +1490,9 @@ abstract class _BowlingStat implements BowlingStat {
final double strikeRate,
final double economyRate}) = _$BowlingStatImpl;

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

@override
int get innings;
@override
Expand Down Expand Up @@ -1459,12 +1522,19 @@ abstract class _BowlingStat implements BowlingStat {
throw _privateConstructorUsedError;
}

FieldingStat _$FieldingStatFromJson(Map<String, dynamic> json) {
return _FieldingStat.fromJson(json);
}

/// @nodoc
mixin _$FieldingStat {
int get catches => throw _privateConstructorUsedError;
int get runOut => throw _privateConstructorUsedError;
int get stumping => throw _privateConstructorUsedError;

/// Serializes this FieldingStat to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

/// Create a copy of FieldingStat
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
Expand Down Expand Up @@ -1563,11 +1633,14 @@ class __$$FieldingStatImplCopyWithImpl<$Res>
}

/// @nodoc
@JsonSerializable()
class _$FieldingStatImpl implements _FieldingStat {
const _$FieldingStatImpl(
{this.catches = 0, this.runOut = 0, this.stumping = 0});

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

@override
@JsonKey()
final int catches;
Expand All @@ -1594,6 +1667,7 @@ class _$FieldingStatImpl implements _FieldingStat {
other.stumping == stumping));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, catches, runOut, stumping);

Expand All @@ -1604,6 +1678,13 @@ class _$FieldingStatImpl implements _FieldingStat {
@pragma('vm:prefer-inline')
_$$FieldingStatImplCopyWith<_$FieldingStatImpl> get copyWith =>
__$$FieldingStatImplCopyWithImpl<_$FieldingStatImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$FieldingStatImplToJson(
this,
);
}
}

abstract class _FieldingStat implements FieldingStat {
Expand All @@ -1612,6 +1693,9 @@ abstract class _FieldingStat implements FieldingStat {
final int runOut,
final int stumping}) = _$FieldingStatImpl;

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

@override
int get catches;
@override
Expand Down
Loading

0 comments on commit 0b155c5

Please sign in to comment.