runSync method

Future<Either<Exception, dynamic>> runSync(
  1. Function function
)

Implementation

Future<Either<Exception, dynamic>> runSync(Function function) async {
  try {
    return Right(await function.call());
  } catch (e) {
    return Left(Exception(e.toString()));
  }
}