getLogs method
Implementation
@override
Future<Either<Failure, List<MyLogModel>>> getLogs() async {
try {
final String jsonString = _sharedPref.getString(local_key_logs) ?? "";
final List<dynamic> jsonList = jsonDecode(jsonString);
final List<MyLogModel> objects =
jsonList.map((json) => MyLogModel.fromJson(json)).toList();
return Right(objects);
} catch (e) {
return const Right([]);
}
}