copyWith method
- int? roundNumber,
- bool? loading,
- Object? error = _manter,
- bool? running,
- Object? result = _manter,
- Object? verdict = _manter,
- Object? errors = _manter,
- Object? previousBest = _manter,
- bool? repeating,
- bool? startedRound,
- List<
RoundResult> ? history, - Object? courseUse = _manter,
- Object? questionRound = _manter,
- ExerciseChartState? chart,
- int? serial,
Copia o estado. Os campos anuláveis aceitam null de propósito: quem não é
passado fica como está.
Implementation
ExerciseRoundState copyWith({
int? roundNumber,
bool? loading,
Object? error = _manter,
bool? running,
Object? result = _manter,
Object? verdict = _manter,
Object? errors = _manter,
Object? previousBest = _manter,
bool? repeating,
bool? startedRound,
List<RoundResult>? history,
Object? courseUse = _manter,
Object? questionRound = _manter,
ExerciseChartState? chart,
int? serial,
}) => ExerciseRoundState(
roundNumber: roundNumber ?? this.roundNumber,
loading: loading ?? this.loading,
error: identical(error, _manter) ? this.error : error as String?,
running: running ?? this.running,
result: identical(result, _manter) ? this.result : result as RoundResult?,
verdict: identical(verdict, _manter)
? this.verdict
: verdict as PassVerdict?,
errors: identical(errors, _manter) ? this.errors : errors as int?,
previousBest: identical(previousBest, _manter)
? this.previousBest
: previousBest as int?,
repeating: repeating ?? this.repeating,
startedRound: startedRound ?? this.startedRound,
history: history ?? this.history,
courseUse: identical(courseUse, _manter)
? this.courseUse
: courseUse as CourseUse?,
questionRound: identical(questionRound, _manter)
? this.questionRound
: questionRound as QuestionRound?,
chart: chart ?? this.chart,
serial: serial ?? this.serial,
);