diff --git a/data/lib/api/ball_score/ball_score_model.freezed.dart b/data/lib/api/ball_score/ball_score_model.freezed.dart index db2916ef..fc687cb4 100644 --- a/data/lib/api/ball_score/ball_score_model.freezed.dart +++ b/data/lib/api/ball_score/ball_score_model.freezed.dart @@ -42,8 +42,12 @@ mixin _$BallScoreModel { @TimeStampJsonConverter() DateTime? get score_time => throw _privateConstructorUsedError; + /// Serializes this BallScoreModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of BallScoreModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $BallScoreModelCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -86,6 +90,8 @@ class _$BallScoreModelCopyWithImpl<$Res, $Val extends BallScoreModel> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of BallScoreModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -228,6 +234,8 @@ class __$$BallScoreModelImplCopyWithImpl<$Res> _$BallScoreModelImpl _value, $Res Function(_$BallScoreModelImpl) _then) : super(_value, _then); + /// Create a copy of BallScoreModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -445,7 +453,7 @@ class _$BallScoreModelImpl implements _BallScoreModel { other.score_time == score_time)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ runtimeType, @@ -470,7 +478,9 @@ class _$BallScoreModelImpl implements _BallScoreModel { score_time ]); - @JsonKey(ignore: true) + /// Create a copy of BallScoreModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$BallScoreModelImplCopyWith<_$BallScoreModelImpl> get copyWith => @@ -550,8 +560,11 @@ abstract class _BallScoreModel implements BallScoreModel { @override @TimeStampJsonConverter() DateTime? get score_time; + + /// Create a copy of BallScoreModel + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$BallScoreModelImplCopyWith<_$BallScoreModelImpl> get copyWith => throw _privateConstructorUsedError; } @@ -562,7 +575,9 @@ mixin _$UserStat { BowlingStat? get bowlingStat => throw _privateConstructorUsedError; FieldingStat? get fieldingStat => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $UserStatCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -592,6 +607,8 @@ class _$UserStatCopyWithImpl<$Res, $Val extends UserStat> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -615,6 +632,8 @@ class _$UserStatCopyWithImpl<$Res, $Val extends UserStat> ) as $Val); } + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BattingStatCopyWith<$Res>? get battingStat { @@ -627,6 +646,8 @@ class _$UserStatCopyWithImpl<$Res, $Val extends UserStat> }); } + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BowlingStatCopyWith<$Res>? get bowlingStat { @@ -639,6 +660,8 @@ class _$UserStatCopyWithImpl<$Res, $Val extends UserStat> }); } + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $FieldingStatCopyWith<$Res>? get fieldingStat { @@ -681,6 +704,8 @@ class __$$UserStatImplCopyWithImpl<$Res> _$UserStatImpl _value, $Res Function(_$UserStatImpl) _then) : super(_value, _then); + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -739,7 +764,9 @@ class _$UserStatImpl implements _UserStat { int get hashCode => Object.hash(runtimeType, battingStat, bowlingStat, fieldingStat); - @JsonKey(ignore: true) + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$UserStatImplCopyWith<_$UserStatImpl> get copyWith => @@ -758,8 +785,11 @@ abstract class _UserStat implements UserStat { BowlingStat? get bowlingStat; @override FieldingStat? get fieldingStat; + + /// Create a copy of UserStat + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$UserStatImplCopyWith<_$UserStatImpl> get copyWith => throw _privateConstructorUsedError; } @@ -777,7 +807,9 @@ mixin _$BattingStat { int get hundreds => throw _privateConstructorUsedError; int get ducks => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of BattingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $BattingStatCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -811,6 +843,8 @@ class _$BattingStatCopyWithImpl<$Res, $Val extends BattingStat> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of BattingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -899,6 +933,8 @@ class __$$BattingStatImplCopyWithImpl<$Res> _$BattingStatImpl _value, $Res Function(_$BattingStatImpl) _then) : super(_value, _then); + /// Create a copy of BattingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1034,7 +1070,9 @@ class _$BattingStatImpl implements _BattingStat { int get hashCode => Object.hash(runtimeType, innings, runScored, average, strikeRate, ballFaced, fours, sixes, fifties, hundreds, ducks); - @JsonKey(ignore: true) + /// Create a copy of BattingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$BattingStatImplCopyWith<_$BattingStatImpl> get copyWith => @@ -1074,8 +1112,11 @@ abstract class _BattingStat implements BattingStat { int get hundreds; @override int get ducks; + + /// Create a copy of BattingStat + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$BattingStatImplCopyWith<_$BattingStatImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1093,7 +1134,9 @@ mixin _$BowlingStat { double get strikeRate => throw _privateConstructorUsedError; double get economyRate => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of BowlingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $BowlingStatCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1127,6 +1170,8 @@ class _$BowlingStatCopyWithImpl<$Res, $Val extends BowlingStat> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of BowlingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1215,6 +1260,8 @@ class __$$BowlingStatImplCopyWithImpl<$Res> _$BowlingStatImpl _value, $Res Function(_$BowlingStatImpl) _then) : super(_value, _then); + /// Create a copy of BowlingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1361,7 +1408,9 @@ class _$BowlingStatImpl implements _BowlingStat { strikeRate, economyRate); - @JsonKey(ignore: true) + /// Create a copy of BowlingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$BowlingStatImplCopyWith<_$BowlingStatImpl> get copyWith => @@ -1401,8 +1450,11 @@ abstract class _BowlingStat implements BowlingStat { double get strikeRate; @override double get economyRate; + + /// Create a copy of BowlingStat + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$BowlingStatImplCopyWith<_$BowlingStatImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1413,7 +1465,9 @@ mixin _$FieldingStat { int get runOut => throw _privateConstructorUsedError; int get stumping => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of FieldingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $FieldingStatCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1437,6 +1491,8 @@ class _$FieldingStatCopyWithImpl<$Res, $Val extends FieldingStat> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of FieldingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1480,6 +1536,8 @@ class __$$FieldingStatImplCopyWithImpl<$Res> _$FieldingStatImpl _value, $Res Function(_$FieldingStatImpl) _then) : super(_value, _then); + /// Create a copy of FieldingStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1539,7 +1597,9 @@ class _$FieldingStatImpl implements _FieldingStat { @override int get hashCode => Object.hash(runtimeType, catches, runOut, stumping); - @JsonKey(ignore: true) + /// Create a copy of FieldingStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$FieldingStatImplCopyWith<_$FieldingStatImpl> get copyWith => @@ -1558,8 +1618,11 @@ abstract class _FieldingStat implements FieldingStat { int get runOut; @override int get stumping; + + /// Create a copy of FieldingStat + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$FieldingStatImplCopyWith<_$FieldingStatImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1574,8 +1637,12 @@ mixin _$OverStatModel { int get wicket => throw _privateConstructorUsedError; int get extra => throw _privateConstructorUsedError; + /// Serializes this OverStatModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of OverStatModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $OverStatModelCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1599,6 +1666,8 @@ class _$OverStatModelCopyWithImpl<$Res, $Val extends OverStatModel> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of OverStatModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1642,6 +1711,8 @@ class __$$OverStatModelImplCopyWithImpl<$Res> _$OverStatModelImpl _value, $Res Function(_$OverStatModelImpl) _then) : super(_value, _then); + /// Create a copy of OverStatModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1699,11 +1770,13 @@ class _$OverStatModelImpl implements _OverStatModel { (identical(other.extra, extra) || other.extra == extra)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, run, wicket, extra); - @JsonKey(ignore: true) + /// Create a copy of OverStatModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$OverStatModelImplCopyWith<_$OverStatModelImpl> get copyWith => @@ -1730,8 +1803,11 @@ abstract class _OverStatModel implements OverStatModel { int get wicket; @override int get extra; + + /// Create a copy of OverStatModel + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$OverStatModelImplCopyWith<_$OverStatModelImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1747,8 +1823,12 @@ mixin _$TeamRunStat { int get wicket => throw _privateConstructorUsedError; double get over => throw _privateConstructorUsedError; + /// Serializes this TeamRunStat to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of TeamRunStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $TeamRunStatCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1772,6 +1852,8 @@ class _$TeamRunStatCopyWithImpl<$Res, $Val extends TeamRunStat> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of TeamRunStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1820,6 +1902,8 @@ class __$$TeamRunStatImplCopyWithImpl<$Res> _$TeamRunStatImpl _value, $Res Function(_$TeamRunStatImpl) _then) : super(_value, _then); + /// Create a copy of TeamRunStat + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -1888,11 +1972,13 @@ class _$TeamRunStatImpl implements _TeamRunStat { (identical(other.over, over) || other.over == over)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, teamName, run, wicket, over); - @JsonKey(ignore: true) + /// Create a copy of TeamRunStat + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$TeamRunStatImplCopyWith<_$TeamRunStatImpl> get copyWith => @@ -1924,8 +2010,11 @@ abstract class _TeamRunStat implements TeamRunStat { int get wicket; @override double get over; + + /// Create a copy of TeamRunStat + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$TeamRunStatImplCopyWith<_$TeamRunStatImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1944,7 +2033,9 @@ mixin _$OverSummary { int get totalRuns => throw _privateConstructorUsedError; int get totalWickets => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $OverSummaryCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -1984,6 +2075,8 @@ class _$OverSummaryCopyWithImpl<$Res, $Val extends OverSummary> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2047,6 +2140,8 @@ class _$OverSummaryCopyWithImpl<$Res, $Val extends OverSummary> ) as $Val); } + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BowlerSummaryCopyWith<$Res> get bowler { @@ -2055,6 +2150,8 @@ class _$OverSummaryCopyWithImpl<$Res, $Val extends OverSummary> }); } + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BatsmanSummaryCopyWith<$Res> get striker { @@ -2063,6 +2160,8 @@ class _$OverSummaryCopyWithImpl<$Res, $Val extends OverSummary> }); } + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BatsmanSummaryCopyWith<$Res> get nonStriker { @@ -2071,6 +2170,8 @@ class _$OverSummaryCopyWithImpl<$Res, $Val extends OverSummary> }); } + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ExtraSummaryCopyWith<$Res> get extrasSummary { @@ -2119,6 +2220,8 @@ class __$$OverSummaryImplCopyWithImpl<$Res> _$OverSummaryImpl _value, $Res Function(_$OverSummaryImpl) _then) : super(_value, _then); + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2292,7 +2395,9 @@ class _$OverSummaryImpl implements _OverSummary { totalRuns, totalWickets); - @JsonKey(ignore: true) + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$OverSummaryImplCopyWith<_$OverSummaryImpl> get copyWith => @@ -2335,8 +2440,11 @@ abstract class _OverSummary implements OverSummary { int get totalRuns; @override int get totalWickets; + + /// Create a copy of OverSummary + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$OverSummaryImplCopyWith<_$OverSummaryImpl> get copyWith => throw _privateConstructorUsedError; } @@ -2353,7 +2461,9 @@ mixin _$BatsmanSummary { int get sixes => throw _privateConstructorUsedError; int get fours => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $BatsmanSummaryCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -2390,6 +2500,8 @@ class _$BatsmanSummaryCopyWithImpl<$Res, $Val extends BatsmanSummary> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2443,6 +2555,8 @@ class _$BatsmanSummaryCopyWithImpl<$Res, $Val extends BatsmanSummary> ) as $Val); } + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $UserModelCopyWith<$Res> get player { @@ -2451,6 +2565,8 @@ class _$BatsmanSummaryCopyWithImpl<$Res, $Val extends BatsmanSummary> }); } + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $PlayerCopyWith<$Res>? get ballBy { @@ -2463,6 +2579,8 @@ class _$BatsmanSummaryCopyWithImpl<$Res, $Val extends BatsmanSummary> }); } + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $PlayerCopyWith<$Res>? get catchBy { @@ -2511,6 +2629,8 @@ class __$$BatsmanSummaryImplCopyWithImpl<$Res> _$BatsmanSummaryImpl _value, $Res Function(_$BatsmanSummaryImpl) _then) : super(_value, _then); + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2631,7 +2751,9 @@ class _$BatsmanSummaryImpl implements _BatsmanSummary { int get hashCode => Object.hash(runtimeType, player, ballBy, catchBy, wicketType, outAtOver, runs, ballFaced, sixes, fours); - @JsonKey(ignore: true) + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$BatsmanSummaryImplCopyWith<_$BatsmanSummaryImpl> get copyWith => @@ -2669,8 +2791,11 @@ abstract class _BatsmanSummary implements BatsmanSummary { int get sixes; @override int get fours; + + /// Create a copy of BatsmanSummary + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$BatsmanSummaryImplCopyWith<_$BatsmanSummaryImpl> get copyWith => throw _privateConstructorUsedError; } @@ -2685,7 +2810,9 @@ mixin _$BowlerSummary { int get noBalls => throw _privateConstructorUsedError; int get wideBalls => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $BowlerSummaryCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -2718,6 +2845,8 @@ class _$BowlerSummaryCopyWithImpl<$Res, $Val extends BowlerSummary> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2761,6 +2890,8 @@ class _$BowlerSummaryCopyWithImpl<$Res, $Val extends BowlerSummary> ) as $Val); } + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $UserModelCopyWith<$Res> get player { @@ -2799,6 +2930,8 @@ class __$$BowlerSummaryImplCopyWithImpl<$Res> _$BowlerSummaryImpl _value, $Res Function(_$BowlerSummaryImpl) _then) : super(_value, _then); + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -2903,7 +3036,9 @@ class _$BowlerSummaryImpl implements _BowlerSummary { int get hashCode => Object.hash(runtimeType, player, runsConceded, maiden, overDelivered, wicket, noBalls, wideBalls); - @JsonKey(ignore: true) + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$BowlerSummaryImplCopyWith<_$BowlerSummaryImpl> get copyWith => @@ -2934,8 +3069,11 @@ abstract class _BowlerSummary implements BowlerSummary { int get noBalls; @override int get wideBalls; + + /// Create a copy of BowlerSummary + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$BowlerSummaryImplCopyWith<_$BowlerSummaryImpl> get copyWith => throw _privateConstructorUsedError; } @@ -2945,7 +3083,9 @@ mixin _$Player { String get id => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of Player + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $PlayerCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -2967,6 +3107,8 @@ class _$PlayerCopyWithImpl<$Res, $Val extends Player> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of Player + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -3004,6 +3146,8 @@ class __$$PlayerImplCopyWithImpl<$Res> _$PlayerImpl _value, $Res Function(_$PlayerImpl) _then) : super(_value, _then); + /// Create a copy of Player + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -3052,7 +3196,9 @@ class _$PlayerImpl implements _Player { @override int get hashCode => Object.hash(runtimeType, id, name); - @JsonKey(ignore: true) + /// Create a copy of Player + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$PlayerImplCopyWith<_$PlayerImpl> get copyWith => @@ -3066,8 +3212,11 @@ abstract class _Player implements Player { String get id; @override String get name; + + /// Create a copy of Player + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$PlayerImplCopyWith<_$PlayerImpl> get copyWith => throw _privateConstructorUsedError; } @@ -3080,7 +3229,9 @@ mixin _$ExtraSummary { int get wideBall => throw _privateConstructorUsedError; int get penalty => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of ExtraSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $ExtraSummaryCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -3104,6 +3255,8 @@ class _$ExtraSummaryCopyWithImpl<$Res, $Val extends ExtraSummary> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of ExtraSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -3157,6 +3310,8 @@ class __$$ExtraSummaryImplCopyWithImpl<$Res> _$ExtraSummaryImpl _value, $Res Function(_$ExtraSummaryImpl) _then) : super(_value, _then); + /// Create a copy of ExtraSummary + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -3239,7 +3394,9 @@ class _$ExtraSummaryImpl implements _ExtraSummary { int get hashCode => Object.hash(runtimeType, bye, legBye, noBall, wideBall, penalty); - @JsonKey(ignore: true) + /// Create a copy of ExtraSummary + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$ExtraSummaryImplCopyWith<_$ExtraSummaryImpl> get copyWith => @@ -3264,8 +3421,11 @@ abstract class _ExtraSummary implements ExtraSummary { int get wideBall; @override int get penalty; + + /// Create a copy of ExtraSummary + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$ExtraSummaryImplCopyWith<_$ExtraSummaryImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/data/lib/api/innings/inning_model.freezed.dart b/data/lib/api/innings/inning_model.freezed.dart index b5f3d90e..bd216a14 100644 --- a/data/lib/api/innings/inning_model.freezed.dart +++ b/data/lib/api/innings/inning_model.freezed.dart @@ -29,8 +29,12 @@ mixin _$InningModel { int get total_wickets => throw _privateConstructorUsedError; InningStatus? get innings_status => throw _privateConstructorUsedError; + /// Serializes this InningModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of InningModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $InningModelCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -62,6 +66,8 @@ class _$InningModelCopyWithImpl<$Res, $Val extends InningModel> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of InningModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -138,6 +144,8 @@ class __$$InningModelImplCopyWithImpl<$Res> _$InningModelImpl _value, $Res Function(_$InningModelImpl) _then) : super(_value, _then); + /// Create a copy of InningModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -248,12 +256,14 @@ class _$InningModelImpl implements _InningModel { other.innings_status == innings_status)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, id, match_id, team_id, overs, index, total_runs, total_wickets, innings_status); - @JsonKey(ignore: true) + /// Create a copy of InningModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$InningModelImplCopyWith<_$InningModelImpl> get copyWith => @@ -297,8 +307,11 @@ abstract class _InningModel implements InningModel { int get total_wickets; @override InningStatus? get innings_status; + + /// Create a copy of InningModel + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$InningModelImplCopyWith<_$InningModelImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/data/lib/api/match/match_model.dart b/data/lib/api/match/match_model.dart index bff384da..6832450b 100644 --- a/data/lib/api/match/match_model.dart +++ b/data/lib/api/match/match_model.dart @@ -63,6 +63,24 @@ class MatchModel with _$MatchModel { MatchModel.fromJson(snapshot.data()!); } +@freezed +class MatchSetting with _$MatchSetting { + const factory MatchSetting({ + @Default(true) bool continue_with_injured_player, + @Default(true) bool show_wagon_wheel_for_less_run, + @Default(true) bool show_wagon_wheel_for_dot_ball, + }) = _MatchSetting; + + factory MatchSetting.fromJson(Map json) => + _$MatchSettingFromJson(json); + + factory MatchSetting.fromFireStore( + DocumentSnapshot> snapshot, + SnapshotOptions? options, + ) => + MatchSetting.fromJson(snapshot.data()!); +} + @freezed class MatchTeamModel with _$MatchTeamModel { @JsonSerializable(anyMap: true, explicitToJson: true) diff --git a/data/lib/api/match/match_model.freezed.dart b/data/lib/api/match/match_model.freezed.dart index f538d5f4..963d511e 100644 --- a/data/lib/api/match/match_model.freezed.dart +++ b/data/lib/api/match/match_model.freezed.dart @@ -1026,6 +1026,212 @@ abstract class _MatchModel implements MatchModel { throw _privateConstructorUsedError; } +MatchSetting _$MatchSettingFromJson(Map json) { + return _MatchSetting.fromJson(json); +} + +/// @nodoc +mixin _$MatchSetting { + bool get continue_with_injured_player => throw _privateConstructorUsedError; + bool get show_wagon_wheel_for_less_run => throw _privateConstructorUsedError; + bool get show_wagon_wheel_for_dot_ball => throw _privateConstructorUsedError; + + /// Serializes this MatchSetting to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of MatchSetting + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $MatchSettingCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $MatchSettingCopyWith<$Res> { + factory $MatchSettingCopyWith( + MatchSetting value, $Res Function(MatchSetting) then) = + _$MatchSettingCopyWithImpl<$Res, MatchSetting>; + @useResult + $Res call( + {bool continue_with_injured_player, + bool show_wagon_wheel_for_less_run, + bool show_wagon_wheel_for_dot_ball}); +} + +/// @nodoc +class _$MatchSettingCopyWithImpl<$Res, $Val extends MatchSetting> + implements $MatchSettingCopyWith<$Res> { + _$MatchSettingCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of MatchSetting + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? continue_with_injured_player = null, + Object? show_wagon_wheel_for_less_run = null, + Object? show_wagon_wheel_for_dot_ball = null, + }) { + return _then(_value.copyWith( + continue_with_injured_player: null == continue_with_injured_player + ? _value.continue_with_injured_player + : continue_with_injured_player // ignore: cast_nullable_to_non_nullable + as bool, + show_wagon_wheel_for_less_run: null == show_wagon_wheel_for_less_run + ? _value.show_wagon_wheel_for_less_run + : show_wagon_wheel_for_less_run // ignore: cast_nullable_to_non_nullable + as bool, + show_wagon_wheel_for_dot_ball: null == show_wagon_wheel_for_dot_ball + ? _value.show_wagon_wheel_for_dot_ball + : show_wagon_wheel_for_dot_ball // ignore: cast_nullable_to_non_nullable + as bool, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$MatchSettingImplCopyWith<$Res> + implements $MatchSettingCopyWith<$Res> { + factory _$$MatchSettingImplCopyWith( + _$MatchSettingImpl value, $Res Function(_$MatchSettingImpl) then) = + __$$MatchSettingImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {bool continue_with_injured_player, + bool show_wagon_wheel_for_less_run, + bool show_wagon_wheel_for_dot_ball}); +} + +/// @nodoc +class __$$MatchSettingImplCopyWithImpl<$Res> + extends _$MatchSettingCopyWithImpl<$Res, _$MatchSettingImpl> + implements _$$MatchSettingImplCopyWith<$Res> { + __$$MatchSettingImplCopyWithImpl( + _$MatchSettingImpl _value, $Res Function(_$MatchSettingImpl) _then) + : super(_value, _then); + + /// Create a copy of MatchSetting + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? continue_with_injured_player = null, + Object? show_wagon_wheel_for_less_run = null, + Object? show_wagon_wheel_for_dot_ball = null, + }) { + return _then(_$MatchSettingImpl( + continue_with_injured_player: null == continue_with_injured_player + ? _value.continue_with_injured_player + : continue_with_injured_player // ignore: cast_nullable_to_non_nullable + as bool, + show_wagon_wheel_for_less_run: null == show_wagon_wheel_for_less_run + ? _value.show_wagon_wheel_for_less_run + : show_wagon_wheel_for_less_run // ignore: cast_nullable_to_non_nullable + as bool, + show_wagon_wheel_for_dot_ball: null == show_wagon_wheel_for_dot_ball + ? _value.show_wagon_wheel_for_dot_ball + : show_wagon_wheel_for_dot_ball // ignore: cast_nullable_to_non_nullable + as bool, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$MatchSettingImpl implements _MatchSetting { + const _$MatchSettingImpl( + {this.continue_with_injured_player = true, + this.show_wagon_wheel_for_less_run = true, + this.show_wagon_wheel_for_dot_ball = true}); + + factory _$MatchSettingImpl.fromJson(Map json) => + _$$MatchSettingImplFromJson(json); + + @override + @JsonKey() + final bool continue_with_injured_player; + @override + @JsonKey() + final bool show_wagon_wheel_for_less_run; + @override + @JsonKey() + final bool show_wagon_wheel_for_dot_ball; + + @override + String toString() { + return 'MatchSetting(continue_with_injured_player: $continue_with_injured_player, show_wagon_wheel_for_less_run: $show_wagon_wheel_for_less_run, show_wagon_wheel_for_dot_ball: $show_wagon_wheel_for_dot_ball)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$MatchSettingImpl && + (identical(other.continue_with_injured_player, + continue_with_injured_player) || + other.continue_with_injured_player == + continue_with_injured_player) && + (identical(other.show_wagon_wheel_for_less_run, + show_wagon_wheel_for_less_run) || + other.show_wagon_wheel_for_less_run == + show_wagon_wheel_for_less_run) && + (identical(other.show_wagon_wheel_for_dot_ball, + show_wagon_wheel_for_dot_ball) || + other.show_wagon_wheel_for_dot_ball == + show_wagon_wheel_for_dot_ball)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, continue_with_injured_player, + show_wagon_wheel_for_less_run, show_wagon_wheel_for_dot_ball); + + /// Create a copy of MatchSetting + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$MatchSettingImplCopyWith<_$MatchSettingImpl> get copyWith => + __$$MatchSettingImplCopyWithImpl<_$MatchSettingImpl>(this, _$identity); + + @override + Map toJson() { + return _$$MatchSettingImplToJson( + this, + ); + } +} + +abstract class _MatchSetting implements MatchSetting { + const factory _MatchSetting( + {final bool continue_with_injured_player, + final bool show_wagon_wheel_for_less_run, + final bool show_wagon_wheel_for_dot_ball}) = _$MatchSettingImpl; + + factory _MatchSetting.fromJson(Map json) = + _$MatchSettingImpl.fromJson; + + @override + bool get continue_with_injured_player; + @override + bool get show_wagon_wheel_for_less_run; + @override + bool get show_wagon_wheel_for_dot_ball; + + /// Create a copy of MatchSetting + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$MatchSettingImplCopyWith<_$MatchSettingImpl> get copyWith => + throw _privateConstructorUsedError; +} + MatchTeamModel _$MatchTeamModelFromJson(Map json) { return _MatchTeamModel.fromJson(json); } diff --git a/data/lib/api/match/match_model.g.dart b/data/lib/api/match/match_model.g.dart index bca56077..3e141a21 100644 --- a/data/lib/api/match/match_model.g.dart +++ b/data/lib/api/match/match_model.g.dart @@ -152,6 +152,23 @@ Json? _$JsonConverterToJson( ) => value == null ? null : toJson(value); +_$MatchSettingImpl _$$MatchSettingImplFromJson(Map json) => + _$MatchSettingImpl( + continue_with_injured_player: + json['continue_with_injured_player'] as bool? ?? true, + show_wagon_wheel_for_less_run: + json['show_wagon_wheel_for_less_run'] as bool? ?? true, + show_wagon_wheel_for_dot_ball: + json['show_wagon_wheel_for_dot_ball'] as bool? ?? true, + ); + +Map _$$MatchSettingImplToJson(_$MatchSettingImpl instance) => + { + 'continue_with_injured_player': instance.continue_with_injured_player, + 'show_wagon_wheel_for_less_run': instance.show_wagon_wheel_for_less_run, + 'show_wagon_wheel_for_dot_ball': instance.show_wagon_wheel_for_dot_ball, + }; + _$MatchTeamModelImpl _$$MatchTeamModelImplFromJson(Map json) => _$MatchTeamModelImpl( team_id: json['team_id'] as String, diff --git a/data/lib/api/support/support_models.freezed.dart b/data/lib/api/support/support_models.freezed.dart index 3ea16c58..d7c85808 100644 --- a/data/lib/api/support/support_models.freezed.dart +++ b/data/lib/api/support/support_models.freezed.dart @@ -30,8 +30,12 @@ mixin _$AddSupportCaseRequest { @TimeStampJsonConverter() DateTime? get createdTime => throw _privateConstructorUsedError; + /// Serializes this AddSupportCaseRequest to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of AddSupportCaseRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $AddSupportCaseRequestCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -63,6 +67,8 @@ class _$AddSupportCaseRequestCopyWithImpl<$Res, // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of AddSupportCaseRequest + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -135,6 +141,8 @@ class __$$AddSupportCaseRequestImplCopyWithImpl<$Res> $Res Function(_$AddSupportCaseRequestImpl) _then) : super(_value, _then); + /// Create a copy of AddSupportCaseRequest + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -241,7 +249,7 @@ class _$AddSupportCaseRequestImpl implements _AddSupportCaseRequest { other.createdTime == createdTime)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, @@ -253,7 +261,9 @@ class _$AddSupportCaseRequestImpl implements _AddSupportCaseRequest { createdAt, createdTime); - @JsonKey(ignore: true) + /// Create a copy of AddSupportCaseRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$AddSupportCaseRequestImplCopyWith<_$AddSupportCaseRequestImpl> @@ -297,8 +307,11 @@ abstract class _AddSupportCaseRequest implements AddSupportCaseRequest { @override @TimeStampJsonConverter() DateTime? get createdTime; + + /// Create a copy of AddSupportCaseRequest + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$AddSupportCaseRequestImplCopyWith<_$AddSupportCaseRequestImpl> get copyWith => throw _privateConstructorUsedError; } @@ -310,7 +323,9 @@ mixin _$Attachment { String get name => throw _privateConstructorUsedError; AttachmentUploadStatus get uploadStatus => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of Attachment + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $AttachmentCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -338,6 +353,8 @@ class _$AttachmentCopyWithImpl<$Res, $Val extends Attachment> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of Attachment + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -390,6 +407,8 @@ class __$$AttachmentImplCopyWithImpl<$Res> _$AttachmentImpl _value, $Res Function(_$AttachmentImpl) _then) : super(_value, _then); + /// Create a copy of Attachment + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -459,7 +478,9 @@ class _$AttachmentImpl implements _Attachment { @override int get hashCode => Object.hash(runtimeType, path, url, name, uploadStatus); - @JsonKey(ignore: true) + /// Create a copy of Attachment + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$AttachmentImplCopyWith<_$AttachmentImpl> get copyWith => @@ -481,8 +502,11 @@ abstract class _Attachment implements Attachment { String get name; @override AttachmentUploadStatus get uploadStatus; + + /// Create a copy of Attachment + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$AttachmentImplCopyWith<_$AttachmentImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/data/lib/api/user/user_models.freezed.dart b/data/lib/api/user/user_models.freezed.dart index b3dcf546..026870d9 100644 --- a/data/lib/api/user/user_models.freezed.dart +++ b/data/lib/api/user/user_models.freezed.dart @@ -37,8 +37,12 @@ mixin _$UserModel { bool get isActive => throw _privateConstructorUsedError; bool get notifications => throw _privateConstructorUsedError; + /// Serializes this UserModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of UserModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $UserModelCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -77,6 +81,8 @@ class _$UserModelCopyWithImpl<$Res, $Val extends UserModel> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of UserModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -201,6 +207,8 @@ class __$$UserModelImplCopyWithImpl<$Res> _$UserModelImpl _value, $Res Function(_$UserModelImpl) _then) : super(_value, _then); + /// Create a copy of UserModel + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -388,7 +396,7 @@ class _$UserModelImpl extends _UserModel { other.notifications == notifications)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, @@ -409,7 +417,9 @@ class _$UserModelImpl extends _UserModel { isActive, notifications); - @JsonKey(ignore: true) + /// Create a copy of UserModel + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$UserModelImplCopyWith<_$UserModelImpl> get copyWith => @@ -478,8 +488,11 @@ abstract class _UserModel extends UserModel { bool get isActive; @override bool get notifications; + + /// Create a copy of UserModel + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$UserModelImplCopyWith<_$UserModelImpl> get copyWith => throw _privateConstructorUsedError; } @@ -501,8 +514,12 @@ mixin _$ApiSession { DateTime? get created_at => throw _privateConstructorUsedError; bool get is_active => throw _privateConstructorUsedError; + /// Serializes this ApiSession to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of ApiSession + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $ApiSessionCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -536,6 +553,8 @@ class _$ApiSessionCopyWithImpl<$Res, $Val extends ApiSession> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of ApiSession + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -624,6 +643,8 @@ class __$$ApiSessionImplCopyWithImpl<$Res> _$ApiSessionImpl _value, $Res Function(_$ApiSessionImpl) _then) : super(_value, _then); + /// Create a copy of ApiSession + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -754,7 +775,7 @@ class _$ApiSessionImpl extends _ApiSession { other.is_active == is_active)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, @@ -769,7 +790,9 @@ class _$ApiSessionImpl extends _ApiSession { created_at, is_active); - @JsonKey(ignore: true) + /// Create a copy of ApiSession + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$ApiSessionImplCopyWith<_$ApiSessionImpl> get copyWith => @@ -820,8 +843,11 @@ abstract class _ApiSession extends ApiSession { DateTime? get created_at; @override bool get is_active; + + /// Create a copy of ApiSession + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$ApiSessionImplCopyWith<_$ApiSessionImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/data/lib/service/match/match_service.dart b/data/lib/service/match/match_service.dart index ecc4c548..73d46df2 100644 --- a/data/lib/service/match/match_service.dart +++ b/data/lib/service/match/match_service.dart @@ -37,6 +37,17 @@ class MatchService { toFirestore: (MatchModel match, _) => match.toJson(), ); + DocumentReference _matchSettingDocument(String matchId) => + _firestore + .collection(FireStoreConst.matchesCollection) + .doc(matchId) + .collection(FireStoreConst.matchSettingsSubCollection) + .doc(FireStoreConst.settingDocument) + .withConverter( + fromFirestore: MatchSetting.fromFireStore, + toFirestore: (MatchSetting setting, _) => setting.toJson(), + ); + String get generateMatchId => _matchCollection.doc().id; Future getMatchById(String id) async { @@ -88,6 +99,19 @@ class MatchService { } } + Stream streamMatchSetting(String matchId) { + return _matchSettingDocument(matchId) + .snapshots() + .map((snapshot) => snapshot.data()) + .handleError((error, stack) => throw AppError.fromError(error, stack)); + } + + Future updateMatchSetting(String matchId, MatchSetting settings) async { + await _matchSettingDocument(matchId) + .set(settings, SetOptions(merge: true)) + .catchError((error, stack) => throw AppError.fromError(error, stack)); + } + Stream> streamUserRelatedMatches(String userId) { final filter = Filter.or( Filter(FireStoreConst.createdBy, isEqualTo: userId), diff --git a/data/lib/utils/constant/firestore_constant.dart b/data/lib/utils/constant/firestore_constant.dart index 5b6d4550..4014a894 100644 --- a/data/lib/utils/constant/firestore_constant.dart +++ b/data/lib/utils/constant/firestore_constant.dart @@ -1,6 +1,8 @@ class FireStoreConst { // collection static const String matchesCollection = "matches"; + static const String matchSettingsSubCollection = "match_settings"; + static const String settingDocument = "setting"; static const String teamsCollection = "teams"; static const String inningsCollection = "innings"; static const String ballScoresCollection = "ball_scores"; diff --git a/khelo/assets/locales/app_en.arb b/khelo/assets/locales/app_en.arb index 40b5e33b..178e57a8 100644 --- a/khelo/assets/locales/app_en.arb +++ b/khelo/assets/locales/app_en.arb @@ -730,8 +730,8 @@ "score_board_penalty_run_title": "Penalty run", "score_board_awarded_to_text": "Awarded to - ?", "score_board_continue_with_injured_player_title": "Continue with injured player", - "score_board_not_show_for_less_run_title": "Don't show for 1s, 2s and 3s", - "score_board_not_show_for_dot_ball_title": "Don't show for dot balls", + "score_board_show_wheel_for_less_run_title": "Show wheel for 1s, 2s and 3s", + "score_board_show_wheel_for_dot_ball_title": "Show wheel for dot balls", "score_board_select_fielding_position_title": "Select fielding position", "score_board_pause_title": "Pause", "score_board_revised_target_title": "Revised target", diff --git a/khelo/lib/ui/flow/score_board/components/select_fielding_position_sheet.dart b/khelo/lib/ui/flow/score_board/components/select_fielding_position_sheet.dart index 1c174b16..949b6bb7 100644 --- a/khelo/lib/ui/flow/score_board/components/select_fielding_position_sheet.dart +++ b/khelo/lib/ui/flow/score_board/components/select_fielding_position_sheet.dart @@ -91,13 +91,13 @@ class _SelectFieldingPositionSheetState ), const SizedBox(height: 24), ToggleButtonTile( - title: context.l10n.score_board_not_show_for_less_run_title, + title: context.l10n.score_board_show_wheel_for_less_run_title, defaultEnabled: showForLessRun, onTap: (show) => showForLessRun = show, ), const SizedBox(height: 8), ToggleButtonTile( - title: context.l10n.score_board_not_show_for_dot_ball_title, + title: context.l10n.score_board_show_wheel_for_dot_ball_title, defaultEnabled: showForDotBall, onTap: (show) => showForDotBall = show, ), diff --git a/khelo/lib/ui/flow/score_board/components/select_player_sheet.dart b/khelo/lib/ui/flow/score_board/components/select_player_sheet.dart index ac75bef9..c39ef927 100644 --- a/khelo/lib/ui/flow/score_board/components/select_player_sheet.dart +++ b/khelo/lib/ui/flow/score_board/components/select_player_sheet.dart @@ -272,7 +272,8 @@ class _SelectPlayerSheetState extends ConsumerState { defaultEnabled: isEnabled, onTap: (value) => setState(() { isEnabled = !isEnabled; - notifier.onContinueWithInjuredPlayersChange(isEnabled); + notifier.onToggleMatchOptionChange( + isEnabled, MatchOption.continueWithInjuredPlayer); if (!isEnabled) { if (batsMan1?.performance .firstWhereOrNull( diff --git a/khelo/lib/ui/flow/score_board/score_board_screen.dart b/khelo/lib/ui/flow/score_board/score_board_screen.dart index d3ff7811..f75f0471 100644 --- a/khelo/lib/ui/flow/score_board/score_board_screen.dart +++ b/khelo/lib/ui/flow/score_board/score_board_screen.dart @@ -109,17 +109,17 @@ class _ScoreBoardScreenState extends ConsumerState { items: matchOptions .map((option) => BottomSheetAction( title: option.getTitle(context), + enabled: !option.showToggle(), onTap: () { - if (option != MatchOption.continueWithInjuredPlayer) { - context.pop(); - notifier.onMatchOptionSelect(option, true); - } + context.pop(); + notifier.onMatchOptionSelect(option, true); }, - child: option == MatchOption.continueWithInjuredPlayer + child: option.showToggle() ? toggleButton( context, - defaultEnabled: state.continueWithInjuredPlayers, - onTap: notifier.onContinueWithInjuredPlayersChange, + defaultEnabled: _getDefaultValue(state, option), + onTap: (result) => notifier + .onToggleMatchOptionChange(result, option), ) : null, )) @@ -127,6 +127,19 @@ class _ScoreBoardScreenState extends ConsumerState { ); } + bool _getDefaultValue(ScoreBoardViewState state, MatchOption option) { + switch (option) { + case MatchOption.continueWithInjuredPlayer: + return state.matchSetting.continue_with_injured_player; + case MatchOption.showForLessRuns: + return state.matchSetting.show_wagon_wheel_for_less_run; + case MatchOption.showForDotBall: + return state.matchSetting.show_wagon_wheel_for_dot_ball; + default: + return false; + } + } + Widget _body( BuildContext context, ScoreBoardViewState state, @@ -324,20 +337,20 @@ class _ScoreBoardScreenState extends ConsumerState { .select((value) => value.showSelectFieldingPositionSheet), (previous, next) async { if (next != null) { - final showForLessRun = ref.read( - scoreBoardStateProvider.select((value) => value.showForLessRun)); - final showForDotBall = ref.read( - scoreBoardStateProvider.select((value) => value.showForDotBall)); + final matchSetting = ref.read( + scoreBoardStateProvider.select((value) => value.matchSetting)); + final showForLessRun = matchSetting.show_wagon_wheel_for_less_run; + final showForDotBall = matchSetting.show_wagon_wheel_for_dot_ball; final tappedButton = ref.read( scoreBoardStateProvider.select((value) => value.tappedButton)); final isLongTapped = ref .read(scoreBoardStateProvider.select((value) => value.isLongTap)); final result = await SelectFieldingPositionSheet.show< (FieldingPositionType, bool, bool)>(context, - showForLessRun: !showForLessRun, showForDotBall: !showForDotBall); + showForLessRun: showForLessRun, showForDotBall: showForDotBall); if (context.mounted && result != null && tappedButton != null) { notifier.onFieldingPositionSelected(tappedButton, - isLongTapped ?? false, result.$1, !result.$2, !result.$3); + isLongTapped ?? false, result.$1, result.$2, result.$3); } } }); @@ -348,8 +361,9 @@ class _ScoreBoardScreenState extends ConsumerState { scoreBoardStateProvider.select((value) => value.showSelectBatsManSheet), (previous, next) { if (next != null) { - final continueWithInjuredPlayers = ref.read(scoreBoardStateProvider - .select((value) => value.continueWithInjuredPlayers)); + final continueWithInjuredPlayers = ref.read( + scoreBoardStateProvider.select( + (value) => value.matchSetting.continue_with_injured_player)); _showSelectPlayerSheet( context, continueWithInjuredPlayers, @@ -364,8 +378,9 @@ class _ScoreBoardScreenState extends ConsumerState { scoreBoardStateProvider.select((value) => value.showSelectBowlerSheet), (previous, next) { if (next != null) { - final continueWithInjuredPlayers = ref.read(scoreBoardStateProvider - .select((value) => value.continueWithInjuredPlayers)); + final continueWithInjuredPlayers = ref.read( + scoreBoardStateProvider.select( + (value) => value.matchSetting.continue_with_injured_player)); _showSelectPlayerSheet( context, continueWithInjuredPlayers, @@ -382,8 +397,9 @@ class _ScoreBoardScreenState extends ConsumerState { .select((value) => value.showSelectBowlerAndBatsManSheet), (previous, next) { if (next != null) { - final continueWithInjuredPlayers = ref.read(scoreBoardStateProvider - .select((value) => value.continueWithInjuredPlayers)); + final continueWithInjuredPlayers = ref.read( + scoreBoardStateProvider.select( + (value) => value.matchSetting.continue_with_injured_player)); _showSelectPlayerSheet( context, continueWithInjuredPlayers, @@ -398,8 +414,9 @@ class _ScoreBoardScreenState extends ConsumerState { scoreBoardStateProvider.select((value) => value.showSelectPlayerSheet), (previous, next) { if (next != null) { - final continueWithInjuredPlayers = ref.read(scoreBoardStateProvider - .select((value) => value.continueWithInjuredPlayers)); + final continueWithInjuredPlayers = ref.read( + scoreBoardStateProvider.select( + (value) => value.matchSetting.continue_with_injured_player)); _showSelectPlayerSheet( context, continueWithInjuredPlayers, diff --git a/khelo/lib/ui/flow/score_board/score_board_view_model.dart b/khelo/lib/ui/flow/score_board/score_board_view_model.dart index 47216d85..3abf20a4 100644 --- a/khelo/lib/ui/flow/score_board/score_board_view_model.dart +++ b/khelo/lib/ui/flow/score_board/score_board_view_model.dart @@ -35,6 +35,7 @@ class ScoreBoardViewNotifier extends StateNotifier { final BallScoreService _ballScoreService; StreamSubscription? _matchStreamSubscription; StreamSubscription>? _ballScoreStreamSubscription; + StreamSubscription? _matchSettingSubscription; final StreamController _matchStreamController = StreamController.broadcast(); String? matchId; @@ -48,6 +49,18 @@ class ScoreBoardViewNotifier extends StateNotifier { void setData(String matchId) { this.matchId = matchId; _loadMatchesAndInning(); + _loadMatchSetting(); + } + + void _loadMatchSetting() { + if (matchId == null) return; + _matchSettingSubscription = + _matchService.streamMatchSetting(matchId!).listen((setting) { + state = state.copyWith(matchSetting: setting ?? state.matchSetting); + }, onError: (e) { + debugPrint( + "ScoreBoardViewNotifier: Error while loading match setting. $e"); + }); } Stream> _loadBallScoresStream( @@ -526,8 +539,8 @@ class ScoreBoardViewNotifier extends StateNotifier { tapped == ScoreButton.three; return (tapped != ScoreButton.undo && - ((isDotBall && state.showForDotBall) || - (isLessRuns && state.showForLessRun) || + ((isDotBall && state.matchSetting.show_wagon_wheel_for_dot_ball) || + (isLessRuns && state.matchSetting.show_wagon_wheel_for_less_run) || (!isDotBall && !isLessRuns))); } @@ -789,13 +802,15 @@ class ScoreBoardViewNotifier extends StateNotifier { } }); - final totalWicket = state.continueWithInjuredPlayers + final totalWicket = state.matchSetting.continue_with_injured_player ? (battingSquad?.length ?? 0) : (battingSquad?.length ?? 0) - injuredCount; return yetToPlayCount == 0 && playingCount == 1 && state.otherInning!.total_wickets == totalWicket - 1 && - (state.continueWithInjuredPlayers ? injuredCount == 0 : true); + (state.matchSetting.continue_with_injured_player + ? injuredCount == 0 + : true); } bool _isAllDeliveryDelivered() { @@ -1117,7 +1132,6 @@ class ScoreBoardViewNotifier extends StateNotifier { previousScoresList: runningInning.index == 3 ? List.empty() : state.currentScoresList, currentScoresList: List.empty(), - continueWithInjuredPlayers: true, showSelectPlayerSheet: DateTime.now(), ballScoreQueryListenerSet: runningInning.index == 3 ? false @@ -1209,8 +1223,36 @@ class ScoreBoardViewNotifier extends StateNotifier { } } - void onContinueWithInjuredPlayersChange(bool isContinue) { - state = state.copyWith(continueWithInjuredPlayers: isContinue); + void onToggleMatchOptionChange(bool isTrue, MatchOption option) { + MatchSetting setting = state.matchSetting; + switch (option) { + case MatchOption.continueWithInjuredPlayer: + setting = setting.copyWith(continue_with_injured_player: isTrue); + break; + case MatchOption.showForLessRuns: + setting = setting.copyWith(show_wagon_wheel_for_less_run: isTrue); + break; + case MatchOption.showForDotBall: + setting = setting.copyWith(show_wagon_wheel_for_dot_ball: isTrue); + break; + default: + return; + } + _updateMatchSetting(setting); + } + + Future _updateMatchSetting(MatchSetting setting) async { + final matchId = this.matchId ?? state.match?.id; + if (matchId == null) return; + state = state.copyWith(actionError: null); + try { + await _matchService.updateMatchSetting(matchId, setting); + state = state.copyWith(matchSetting: setting); + } catch (e) { + state = state.copyWith(actionError: e); + debugPrint( + "ScoreBoardViewNotifier: Error while update match setting -> $e"); + } } Future setPlayers({ @@ -1459,17 +1501,19 @@ class ScoreBoardViewNotifier extends StateNotifier { return teamPlayers ?? []; } - void onFieldingPositionSelected( + Future onFieldingPositionSelected( ScoreButton tapped, bool isLongTapped, FieldingPositionType position, bool showForLessRun, bool showForDotBall, - ) { - state = state.copyWith( - position: position, - showForDotBall: showForDotBall, - showForLessRun: showForLessRun); + ) async { + final setting = state.matchSetting.copyWith( + show_wagon_wheel_for_less_run: showForLessRun, + show_wagon_wheel_for_dot_ball: showForDotBall, + ); + await _updateMatchSetting(setting); + state = state.copyWith(position: position); _handleAddingBall(tapped, isLongTapped); } @@ -1497,15 +1541,17 @@ class ScoreBoardViewNotifier extends StateNotifier { matchId: matchId, revisedTarget: revisedTarget); } - _cancelStreamSubscription() async { + _cancelStreamSubscription() async { await _matchStreamSubscription?.cancel(); await _ballScoreStreamSubscription?.cancel(); + await _matchSettingSubscription?.cancel(); await _matchStreamController.close(); } void onResume() { _cancelStreamSubscription(); _loadMatchesAndInning(); + _loadMatchSetting(); } @override @@ -1554,14 +1600,12 @@ class ScoreBoardViewState with _$ScoreBoardViewState { @Default([]) List allInnings, @Default([]) List currentScoresList, @Default([]) List previousScoresList, + @Default(MatchSetting()) MatchSetting matchSetting, @Default(false) bool loading, @Default(false) bool pop, - @Default(true) bool continueWithInjuredPlayers, @Default(false) bool ballScoreQueryListenerSet, @Default(true) bool isMatchUpdated, @Default(false) bool isActionInProgress, - @Default(true) bool showForLessRun, - @Default(true) bool showForDotBall, @Default(0) int ballCount, @Default(1) int overCount, @Default(0) int lastAssignedIndex, @@ -1621,6 +1665,8 @@ enum MatchOption { reviseTarget, pauseScoring, continueWithInjuredPlayer, + showForLessRuns, + showForDotBall, addSubstitute, endMatch; @@ -1640,6 +1686,21 @@ enum MatchOption { return context.l10n.score_board_add_substitute_title; case MatchOption.endMatch: return context.l10n.score_board_option_end_match; + case MatchOption.showForLessRuns: + return context.l10n.score_board_show_wheel_for_less_run_title; + case MatchOption.showForDotBall: + return context.l10n.score_board_show_wheel_for_dot_ball_title; + } + } + + bool showToggle() { + switch (this) { + case MatchOption.continueWithInjuredPlayer: + case MatchOption.showForLessRuns: + case MatchOption.showForDotBall: + return true; + default: + return false; } } } diff --git a/khelo/lib/ui/flow/score_board/score_board_view_model.freezed.dart b/khelo/lib/ui/flow/score_board/score_board_view_model.freezed.dart index aed8c671..0c3cc148 100644 --- a/khelo/lib/ui/flow/score_board/score_board_view_model.freezed.dart +++ b/khelo/lib/ui/flow/score_board/score_board_view_model.freezed.dart @@ -60,14 +60,12 @@ mixin _$ScoreBoardViewState { throw _privateConstructorUsedError; List get previousScoresList => throw _privateConstructorUsedError; + MatchSetting get matchSetting => throw _privateConstructorUsedError; bool get loading => throw _privateConstructorUsedError; bool get pop => throw _privateConstructorUsedError; - bool get continueWithInjuredPlayers => throw _privateConstructorUsedError; bool get ballScoreQueryListenerSet => throw _privateConstructorUsedError; bool get isMatchUpdated => throw _privateConstructorUsedError; bool get isActionInProgress => throw _privateConstructorUsedError; - bool get showForLessRun => throw _privateConstructorUsedError; - bool get showForDotBall => throw _privateConstructorUsedError; int get ballCount => throw _privateConstructorUsedError; int get overCount => throw _privateConstructorUsedError; int get lastAssignedIndex => throw _privateConstructorUsedError; @@ -122,14 +120,12 @@ abstract class $ScoreBoardViewStateCopyWith<$Res> { List allInnings, List currentScoresList, List previousScoresList, + MatchSetting matchSetting, bool loading, bool pop, - bool continueWithInjuredPlayers, bool ballScoreQueryListenerSet, bool isMatchUpdated, bool isActionInProgress, - bool showForLessRun, - bool showForDotBall, int ballCount, int overCount, int lastAssignedIndex}); @@ -139,6 +135,7 @@ abstract class $ScoreBoardViewStateCopyWith<$Res> { $InningModelCopyWith<$Res>? get otherInning; $MatchPlayerCopyWith<$Res>? get bowler; $InningModelCopyWith<$Res>? get nextInning; + $MatchSettingCopyWith<$Res> get matchSetting; } /// @nodoc @@ -192,14 +189,12 @@ class _$ScoreBoardViewStateCopyWithImpl<$Res, $Val extends ScoreBoardViewState> Object? allInnings = null, Object? currentScoresList = null, Object? previousScoresList = null, + Object? matchSetting = null, Object? loading = null, Object? pop = null, - Object? continueWithInjuredPlayers = null, Object? ballScoreQueryListenerSet = null, Object? isMatchUpdated = null, Object? isActionInProgress = null, - Object? showForLessRun = null, - Object? showForDotBall = null, Object? ballCount = null, Object? overCount = null, Object? lastAssignedIndex = null, @@ -345,6 +340,10 @@ class _$ScoreBoardViewStateCopyWithImpl<$Res, $Val extends ScoreBoardViewState> ? _value.previousScoresList : previousScoresList // ignore: cast_nullable_to_non_nullable as List, + matchSetting: null == matchSetting + ? _value.matchSetting + : matchSetting // ignore: cast_nullable_to_non_nullable + as MatchSetting, loading: null == loading ? _value.loading : loading // ignore: cast_nullable_to_non_nullable @@ -353,10 +352,6 @@ class _$ScoreBoardViewStateCopyWithImpl<$Res, $Val extends ScoreBoardViewState> ? _value.pop : pop // ignore: cast_nullable_to_non_nullable as bool, - continueWithInjuredPlayers: null == continueWithInjuredPlayers - ? _value.continueWithInjuredPlayers - : continueWithInjuredPlayers // ignore: cast_nullable_to_non_nullable - as bool, ballScoreQueryListenerSet: null == ballScoreQueryListenerSet ? _value.ballScoreQueryListenerSet : ballScoreQueryListenerSet // ignore: cast_nullable_to_non_nullable @@ -369,14 +364,6 @@ class _$ScoreBoardViewStateCopyWithImpl<$Res, $Val extends ScoreBoardViewState> ? _value.isActionInProgress : isActionInProgress // ignore: cast_nullable_to_non_nullable as bool, - showForLessRun: null == showForLessRun - ? _value.showForLessRun - : showForLessRun // ignore: cast_nullable_to_non_nullable - as bool, - showForDotBall: null == showForDotBall - ? _value.showForDotBall - : showForDotBall // ignore: cast_nullable_to_non_nullable - as bool, ballCount: null == ballCount ? _value.ballCount : ballCount // ignore: cast_nullable_to_non_nullable @@ -461,6 +448,16 @@ class _$ScoreBoardViewStateCopyWithImpl<$Res, $Val extends ScoreBoardViewState> return _then(_value.copyWith(nextInning: value) as $Val); }); } + + /// Create a copy of ScoreBoardViewState + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $MatchSettingCopyWith<$Res> get matchSetting { + return $MatchSettingCopyWith<$Res>(_value.matchSetting, (value) { + return _then(_value.copyWith(matchSetting: value) as $Val); + }); + } } /// @nodoc @@ -508,14 +505,12 @@ abstract class _$$ScoreBoardViewStateImplCopyWith<$Res> List allInnings, List currentScoresList, List previousScoresList, + MatchSetting matchSetting, bool loading, bool pop, - bool continueWithInjuredPlayers, bool ballScoreQueryListenerSet, bool isMatchUpdated, bool isActionInProgress, - bool showForLessRun, - bool showForDotBall, int ballCount, int overCount, int lastAssignedIndex}); @@ -530,6 +525,8 @@ abstract class _$$ScoreBoardViewStateImplCopyWith<$Res> $MatchPlayerCopyWith<$Res>? get bowler; @override $InningModelCopyWith<$Res>? get nextInning; + @override + $MatchSettingCopyWith<$Res> get matchSetting; } /// @nodoc @@ -581,14 +578,12 @@ class __$$ScoreBoardViewStateImplCopyWithImpl<$Res> Object? allInnings = null, Object? currentScoresList = null, Object? previousScoresList = null, + Object? matchSetting = null, Object? loading = null, Object? pop = null, - Object? continueWithInjuredPlayers = null, Object? ballScoreQueryListenerSet = null, Object? isMatchUpdated = null, Object? isActionInProgress = null, - Object? showForLessRun = null, - Object? showForDotBall = null, Object? ballCount = null, Object? overCount = null, Object? lastAssignedIndex = null, @@ -734,6 +729,10 @@ class __$$ScoreBoardViewStateImplCopyWithImpl<$Res> ? _value._previousScoresList : previousScoresList // ignore: cast_nullable_to_non_nullable as List, + matchSetting: null == matchSetting + ? _value.matchSetting + : matchSetting // ignore: cast_nullable_to_non_nullable + as MatchSetting, loading: null == loading ? _value.loading : loading // ignore: cast_nullable_to_non_nullable @@ -742,10 +741,6 @@ class __$$ScoreBoardViewStateImplCopyWithImpl<$Res> ? _value.pop : pop // ignore: cast_nullable_to_non_nullable as bool, - continueWithInjuredPlayers: null == continueWithInjuredPlayers - ? _value.continueWithInjuredPlayers - : continueWithInjuredPlayers // ignore: cast_nullable_to_non_nullable - as bool, ballScoreQueryListenerSet: null == ballScoreQueryListenerSet ? _value.ballScoreQueryListenerSet : ballScoreQueryListenerSet // ignore: cast_nullable_to_non_nullable @@ -758,14 +753,6 @@ class __$$ScoreBoardViewStateImplCopyWithImpl<$Res> ? _value.isActionInProgress : isActionInProgress // ignore: cast_nullable_to_non_nullable as bool, - showForLessRun: null == showForLessRun - ? _value.showForLessRun - : showForLessRun // ignore: cast_nullable_to_non_nullable - as bool, - showForDotBall: null == showForDotBall - ? _value.showForDotBall - : showForDotBall // ignore: cast_nullable_to_non_nullable - as bool, ballCount: null == ballCount ? _value.ballCount : ballCount // ignore: cast_nullable_to_non_nullable @@ -822,14 +809,12 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { final List allInnings = const [], final List currentScoresList = const [], final List previousScoresList = const [], + this.matchSetting = const MatchSetting(), this.loading = false, this.pop = false, - this.continueWithInjuredPlayers = true, this.ballScoreQueryListenerSet = false, this.isMatchUpdated = true, this.isActionInProgress = false, - this.showForLessRun = true, - this.showForDotBall = true, this.ballCount = 0, this.overCount = 1, this.lastAssignedIndex = 0}) @@ -943,13 +928,13 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { @override @JsonKey() - final bool loading; + final MatchSetting matchSetting; @override @JsonKey() - final bool pop; + final bool loading; @override @JsonKey() - final bool continueWithInjuredPlayers; + final bool pop; @override @JsonKey() final bool ballScoreQueryListenerSet; @@ -961,12 +946,6 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { final bool isActionInProgress; @override @JsonKey() - final bool showForLessRun; - @override - @JsonKey() - final bool showForDotBall; - @override - @JsonKey() final int ballCount; @override @JsonKey() @@ -977,7 +956,7 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { @override String toString() { - return 'ScoreBoardViewState(error: $error, actionError: $actionError, match: $match, currentInning: $currentInning, otherInning: $otherInning, bowler: $bowler, strikerId: $strikerId, batsMans: $batsMans, nextInning: $nextInning, showSelectFieldingPositionSheet: $showSelectFieldingPositionSheet, showSelectBatsManSheet: $showSelectBatsManSheet, showSelectBowlerSheet: $showSelectBowlerSheet, showSelectBowlerAndBatsManSheet: $showSelectBowlerAndBatsManSheet, showSelectPlayerSheet: $showSelectPlayerSheet, showSelectWicketTypeSheet: $showSelectWicketTypeSheet, showStrikerSelectionSheet: $showStrikerSelectionSheet, showUndoBallConfirmationDialog: $showUndoBallConfirmationDialog, showOverCompleteSheet: $showOverCompleteSheet, showInningCompleteSheet: $showInningCompleteSheet, showMatchCompleteSheet: $showMatchCompleteSheet, showAddExtraSheetForNoBall: $showAddExtraSheetForNoBall, showAddExtraSheetForLegBye: $showAddExtraSheetForLegBye, showAddExtraSheetForBye: $showAddExtraSheetForBye, showAddExtraSheetForFiveSeven: $showAddExtraSheetForFiveSeven, showPauseScoringSheet: $showPauseScoringSheet, showAddPenaltyRunSheet: $showAddPenaltyRunSheet, showEndMatchSheet: $showEndMatchSheet, showAddSubstituteSheet: $showAddSubstituteSheet, invalidUndoToast: $invalidUndoToast, showReviseTargetSheet: $showReviseTargetSheet, tappedButton: $tappedButton, isLongTap: $isLongTap, position: $position, allInnings: $allInnings, currentScoresList: $currentScoresList, previousScoresList: $previousScoresList, loading: $loading, pop: $pop, continueWithInjuredPlayers: $continueWithInjuredPlayers, ballScoreQueryListenerSet: $ballScoreQueryListenerSet, isMatchUpdated: $isMatchUpdated, isActionInProgress: $isActionInProgress, showForLessRun: $showForLessRun, showForDotBall: $showForDotBall, ballCount: $ballCount, overCount: $overCount, lastAssignedIndex: $lastAssignedIndex)'; + return 'ScoreBoardViewState(error: $error, actionError: $actionError, match: $match, currentInning: $currentInning, otherInning: $otherInning, bowler: $bowler, strikerId: $strikerId, batsMans: $batsMans, nextInning: $nextInning, showSelectFieldingPositionSheet: $showSelectFieldingPositionSheet, showSelectBatsManSheet: $showSelectBatsManSheet, showSelectBowlerSheet: $showSelectBowlerSheet, showSelectBowlerAndBatsManSheet: $showSelectBowlerAndBatsManSheet, showSelectPlayerSheet: $showSelectPlayerSheet, showSelectWicketTypeSheet: $showSelectWicketTypeSheet, showStrikerSelectionSheet: $showStrikerSelectionSheet, showUndoBallConfirmationDialog: $showUndoBallConfirmationDialog, showOverCompleteSheet: $showOverCompleteSheet, showInningCompleteSheet: $showInningCompleteSheet, showMatchCompleteSheet: $showMatchCompleteSheet, showAddExtraSheetForNoBall: $showAddExtraSheetForNoBall, showAddExtraSheetForLegBye: $showAddExtraSheetForLegBye, showAddExtraSheetForBye: $showAddExtraSheetForBye, showAddExtraSheetForFiveSeven: $showAddExtraSheetForFiveSeven, showPauseScoringSheet: $showPauseScoringSheet, showAddPenaltyRunSheet: $showAddPenaltyRunSheet, showEndMatchSheet: $showEndMatchSheet, showAddSubstituteSheet: $showAddSubstituteSheet, invalidUndoToast: $invalidUndoToast, showReviseTargetSheet: $showReviseTargetSheet, tappedButton: $tappedButton, isLongTap: $isLongTap, position: $position, allInnings: $allInnings, currentScoresList: $currentScoresList, previousScoresList: $previousScoresList, matchSetting: $matchSetting, loading: $loading, pop: $pop, ballScoreQueryListenerSet: $ballScoreQueryListenerSet, isMatchUpdated: $isMatchUpdated, isActionInProgress: $isActionInProgress, ballCount: $ballCount, overCount: $overCount, lastAssignedIndex: $lastAssignedIndex)'; } @override @@ -1048,14 +1027,12 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { const DeepCollectionEquality().equals(other._allInnings, _allInnings) && const DeepCollectionEquality().equals(other._currentScoresList, _currentScoresList) && const DeepCollectionEquality().equals(other._previousScoresList, _previousScoresList) && + (identical(other.matchSetting, matchSetting) || other.matchSetting == matchSetting) && (identical(other.loading, loading) || other.loading == loading) && (identical(other.pop, pop) || other.pop == pop) && - (identical(other.continueWithInjuredPlayers, continueWithInjuredPlayers) || other.continueWithInjuredPlayers == continueWithInjuredPlayers) && (identical(other.ballScoreQueryListenerSet, ballScoreQueryListenerSet) || other.ballScoreQueryListenerSet == ballScoreQueryListenerSet) && (identical(other.isMatchUpdated, isMatchUpdated) || other.isMatchUpdated == isMatchUpdated) && (identical(other.isActionInProgress, isActionInProgress) || other.isActionInProgress == isActionInProgress) && - (identical(other.showForLessRun, showForLessRun) || other.showForLessRun == showForLessRun) && - (identical(other.showForDotBall, showForDotBall) || other.showForDotBall == showForDotBall) && (identical(other.ballCount, ballCount) || other.ballCount == ballCount) && (identical(other.overCount, overCount) || other.overCount == overCount) && (identical(other.lastAssignedIndex, lastAssignedIndex) || other.lastAssignedIndex == lastAssignedIndex)); @@ -1100,14 +1077,12 @@ class _$ScoreBoardViewStateImpl implements _ScoreBoardViewState { const DeepCollectionEquality().hash(_allInnings), const DeepCollectionEquality().hash(_currentScoresList), const DeepCollectionEquality().hash(_previousScoresList), + matchSetting, loading, pop, - continueWithInjuredPlayers, ballScoreQueryListenerSet, isMatchUpdated, isActionInProgress, - showForLessRun, - showForDotBall, ballCount, overCount, lastAssignedIndex @@ -1161,14 +1136,12 @@ abstract class _ScoreBoardViewState implements ScoreBoardViewState { final List allInnings, final List currentScoresList, final List previousScoresList, + final MatchSetting matchSetting, final bool loading, final bool pop, - final bool continueWithInjuredPlayers, final bool ballScoreQueryListenerSet, final bool isMatchUpdated, final bool isActionInProgress, - final bool showForLessRun, - final bool showForDotBall, final int ballCount, final int overCount, final int lastAssignedIndex}) = _$ScoreBoardViewStateImpl; @@ -1246,22 +1219,18 @@ abstract class _ScoreBoardViewState implements ScoreBoardViewState { @override List get previousScoresList; @override + MatchSetting get matchSetting; + @override bool get loading; @override bool get pop; @override - bool get continueWithInjuredPlayers; - @override bool get ballScoreQueryListenerSet; @override bool get isMatchUpdated; @override bool get isActionInProgress; @override - bool get showForLessRun; - @override - bool get showForDotBall; - @override int get ballCount; @override int get overCount;