then<R> method
回调
Implementation
void then<R>(VoidCallback onValue, {Function? onError}) {
if (isComplete) {
if (isError && onError != null) {
onError(error);
} else {
onValue(result);
}
} else {
(_callback ??= []).add(onValue);
if (onError != null) {
(_onError ??= []).add(onError);
}
}
}