getByUserIdAsync static method

Future<List<PlatformPost>> getByUserIdAsync(
  1. String userId
)

Returns posts filtered by author id.

Implementation

static Future<List<PlatformPost>> getByUserIdAsync(String userId) async {
  return await IsarDB.isar.platformPosts
      .where()
      .userIdEqualTo(userId)
      .findAll()
      .onError(ErrorService.onErrorWithTraceIterable);
}