cacheLogs method
Implementation
@override
Future<Either<Failure, Success>> cacheLogs(List<MyLogModel> logs) async {
try {
final String jsonString =
jsonEncode(logs.map((obj) => obj.toJson()).toList());
_sharedPref.setString(local_key_logs, jsonString);
return Right(CacheSuccess());
} catch (e) {
return Left(LocalDatasourceFailure());
}
}