isolatedRun<T> static method

Future<T?> isolatedRun<T>(
  1. FutureOr<T> func()
)

Implementation

static Future<T?> isolatedRun<T>(FutureOr<T> Function() func) async {
  try {
    return await func();
  } on AppException catch (ex) {
    Pen.error(ex.message);
    return null;
  } catch (ex) {
    rethrow;
  }
}