cacheValorAccessToken method

  1. @override
Future<Either<Failure, Success>> cacheValorAccessToken(
  1. String token
)
override

Implementation

@override
Future<Either<Failure, Success>> cacheValorAccessToken(String token) async {
  try {
    var result = await _sharedPref.setString(localKeyValorToken, token);
    if (result) {
      return Right(CacheSuccess());
    } else {
      return Left(CacheFailure());
    }
  } catch (e) {
    return Left(LocalDatasourceFailure());
  }
}