import 'dart:collection'; import 'package:comunic/lists/users_list.dart'; import 'package:comunic/models/conversation.dart'; /// Conversations list /// /// @author Pierre HUBERT class ConversationsList extends ListBase { final List _list = List(); UsersList users; set length(l) => _list.length = l; int get length => _list.length; @override Conversation operator [](int index) => _list[index]; @override void operator []=(int index, Conversation value) => _list[index] = value; /// Get the entire lists of users ID in this list Set get allUsersID { final Set list = Set(); forEach((c) => c.members.forEach((member) => list.add(member.userID))); return list; } }