cryptoExchange<DV> static method
void
cryptoExchange<DV>({
- required DV defaultValue,
- required void changeValue(
- DV defaultValue
- bool isThrowOnError = false,
Implementation
static void cryptoExchange<DV>({
required DV defaultValue,
required void Function(DV defaultValue) changeValue,
bool isThrowOnError = false,
}) {
if (defaultValue == null) {
return;
}
try {
changeValue(defaultValue);
} catch (e) {
if (isThrowOnError) {
rethrow;
}
}
}