getSharedWithMe method

Future<List<DomainModel>> getSharedWithMe()

Implementation

Future<List<DomainModel>> getSharedWithMe() async {
  final domainIds = await _sharedWithMeDomainIds();
  if (domainIds.isEmpty) return [];
  final response = await _client
      .from('domains')
      .select()
      .inFilter('id', domainIds.toList())
      .order('sort_order', ascending: true);
  return (response as List<dynamic>)
      .map((row) => DomainModel.fromJson(row as Map<String, dynamic>))
      .toList();
}