copyWith method
- String? value,
- bool? enabled,
- bool? isSaving,
- PreferenceDetailError? error,
- bool clearError = false,
Implementation
PreferenceDetailState copyWith({
String? value,
bool? enabled,
bool? isSaving,
PreferenceDetailError? error,
bool clearError = false,
}) {
return PreferenceDetailState(
mode: mode,
value: value ?? this.value,
enabled: enabled ?? this.enabled,
isSaving: isSaving ?? this.isSaving,
error: clearError ? null : error ?? this.error,
);
}