copyTo method
SnapState<T>
copyTo({
- bool? isWaiting,
- bool? isIdle,
- bool? isActive,
- T? data,
- dynamic error,
- StackTrace? stackTrace,
Implementation
SnapState<T> copyTo({
bool? isWaiting,
bool? isIdle,
bool? isActive,
T? data,
dynamic error,
StackTrace? stackTrace,
}) {
if (isWaiting != null) {
return _copyToIsWaiting();
}
if (error != null) {
return _copyToHasError(error, () {}, stackTrace: stackTrace);
}
if (isIdle != null) {
return _copyToIsIdle();
}
if (isActive != null) {
return _copyWith(isActive: isActive);
}
return _copyToHasData(data);
}