mapAsync<T, S> static method
Maps the value of the future to a new value.
Implementation
static Future<S> mapAsync<T, S>(
{required T data,
required Mapper<T, S> mapper,
bool printError = kDebugMode}) async {
try {
return await mapper(data);
} catch (e, s) {
if (printError) {
PlayxCore.logger.error('MapAsync Error', error: e, stackTrace: s);
}
// Handle any errors in the main thread
rethrow;
}
}